@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.
- package/assets/capability-packs/azure-governance-discovery/source/scripts/discover.py +1189 -0
- package/assets/capability-packs/azure-governance-discovery/source/scripts/render_governance.py +676 -0
- package/assets/capability-packs/registry.v1.json +73 -0
- package/assets/client-projection-metadata/copilot-cli-agent-tools.json +92 -0
- package/assets/client-projections/github-copilot-cli/.github/agents/apex-architect.agent.md +78 -0
- package/assets/client-projections/github-copilot-cli/.github/agents/apex-operator.agent.md +71 -0
- package/assets/client-projections/github-copilot-cli/.github/agents/apex-planner.agent.md +79 -0
- package/assets/client-projections/github-copilot-cli/.github/agents/apex-requirements.agent.md +69 -0
- package/assets/client-projections/github-copilot-cli/.github/agents/apex.agent.md +52 -0
- package/assets/client-projections/github-copilot-cli/.github/copilot-instructions.md +13 -0
- package/assets/client-projections/github-copilot-cli/.github/mcp.json +54 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-architecture/SKILL.md +36 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/SKILL.md +65 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/references/presentation-conventions.md +52 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/references/reference-only-outlines.md +78 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/architecture-assessment.md +35 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/cost-estimate.md +47 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/deployment-summary.md +35 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/governance-constraints.md +35 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/implementation-plan.md +43 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/operations-runbook.md +35 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/requirements.md +42 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-artifacts/templates/resource-inventory.md +29 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/SKILL.md +52 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/references/decision-examples.md +38 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/references/decision-guardrails.md +36 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/references/decision-quality.md +21 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-adr/references/decision-record-fields.md +57 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/SKILL.md +55 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/references/lambda-to-functions-assessment.md +29 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/references/migration-readiness.md +27 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/references/staged-validation-handoff.md +26 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cloud-migrate/references/workload-mapping.md +27 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compliance/SKILL.md +58 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compliance/references/compliance-finding-criteria.md +63 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compliance/references/operational-checklist.md +24 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compute/SKILL.md +36 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compute/references/compute-selection.md +26 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compute/references/pricing-evidence.md +11 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-compute/references/recommendation-and-scale-rules.md +44 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cost-optimization/SKILL.md +61 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cost-optimization/references/cost-assessment-criteria.md +61 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-cost-optimization/references/operational-checklist.md +24 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/SKILL.md +59 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/avm-binding-guidance.md +29 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/baseline-fallbacks.md +53 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/cost-monitoring.md +47 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/decision-boundaries.md +19 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/governance-effects.md +28 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/naming.md +47 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/network-planning.md +47 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/security-baseline.md +40 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/service-selection.md +51 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-defaults/references/tag-precedence.md +31 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-deploy/SKILL.md +50 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-deploy/references/operational-checklist.md +26 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-deploy/references/preview-recovery-verification.md +48 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-diagnostics/SKILL.md +60 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-diagnostics/references/diagnostic-interpretation.md +42 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-diagnostics/references/operational-checklist.md +24 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-governance/SKILL.md +52 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-governance/references/evidence-interpretation.md +58 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-governance/references/operational-checklist.md +25 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-kusto/SKILL.md +58 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-kusto/references/kql-evidence-interpretation.md +41 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-kusto/references/operational-checklist.md +25 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-prepare/SKILL.md +52 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-prepare/references/functions-recipe-pack.md +27 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-prepare/references/preparation-lineage.md +36 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-quotas/SKILL.md +53 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-quotas/references/capacity-decision-rules.md +48 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-quotas/references/operational-checklist.md +23 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-rbac/SKILL.md +45 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-rbac/references/assignment-intent.md +39 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-rbac/references/least-privilege-selection.md +50 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-resources/SKILL.md +54 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-resources/references/inventory-query-patterns.md +49 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-resources/references/operational-checklist.md +24 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-storage/SKILL.md +35 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-storage/references/security-and-governance.md +12 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-storage/references/service-auth-and-sdk-boundary.md +33 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-storage/references/storage-selection.md +12 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-validate/SKILL.md +49 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-validate/references/operational-checklist.md +24 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-azure-validate/references/preflight-evidence.md +43 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/SKILL.md +41 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/avm-and-codegen-acceptance.md +11 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/codegen-acceptance-checklist.md +46 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/compiler-and-provider-gotchas.md +74 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/module-interfaces-and-parameters.md +56 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-bicep-patterns/references/network-and-observability.md +52 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-codegen/SKILL.md +32 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/SKILL.md +53 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/references/capability-receipts.md +21 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/references/design-and-diagnostics.md +36 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/references/oauth-registration-model.md +26 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-entra-app-registration/references/permissions-and-credentials.md +27 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-mermaid/SKILL.md +44 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-mermaid/references/styling.md +33 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-mermaid/references/syntax.md +99 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-microsoft-docs/SKILL.md +53 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-microsoft-docs/references/research-method.md +91 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-operations/SKILL.md +34 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-planning/SKILL.md +36 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-requirements/SKILL.md +43 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/SKILL.md +47 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/references/adoption-attestation.md +10 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/references/import-assessment.md +14 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/references/import-mapping.md +27 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-import/references/mapping-and-adoption-attestation.md +12 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/SKILL.md +49 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/module-composition-and-refactor.md +20 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/module-composition-and-state-boundaries.md +11 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/module-locks-and-codegen-acceptance.md +14 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/network-and-observability.md +12 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-patterns/references/plan-and-change-assessment.md +24 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/SKILL.md +45 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/evidence-acceptance.md +10 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/plan-mode-and-mock-design.md +12 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/plan-mode-test-design.md +23 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-terraform-test/references/test-design.md +13 -0
- package/assets/client-projections/github-copilot-cli/.github/skills/apex-workflow/SKILL.md +37 -0
- package/assets/client-projections/github-copilot-vscode/.github/agents/apex-architect.agent.md +87 -0
- package/assets/client-projections/github-copilot-vscode/.github/agents/apex-codegen.agent.md +54 -0
- package/assets/client-projections/github-copilot-vscode/.github/agents/apex-operator.agent.md +75 -0
- package/assets/client-projections/github-copilot-vscode/.github/agents/apex-planner.agent.md +89 -0
- package/assets/client-projections/github-copilot-vscode/.github/agents/apex-requirements.agent.md +78 -0
- package/assets/client-projections/github-copilot-vscode/.github/agents/apex-reviewer.agent.md +45 -0
- package/assets/client-projections/github-copilot-vscode/.github/agents/apex-validator.agent.md +50 -0
- package/assets/client-projections/github-copilot-vscode/.github/agents/apex.agent.md +71 -0
- package/assets/client-projections/github-copilot-vscode/.github/copilot-instructions.md +13 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-architecture/SKILL.md +36 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/SKILL.md +65 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/references/presentation-conventions.md +52 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/references/reference-only-outlines.md +78 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/architecture-assessment.md +35 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/cost-estimate.md +47 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/deployment-summary.md +35 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/governance-constraints.md +35 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/implementation-plan.md +43 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/operations-runbook.md +35 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/requirements.md +42 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-artifacts/templates/resource-inventory.md +29 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/SKILL.md +52 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/references/decision-examples.md +38 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/references/decision-guardrails.md +36 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/references/decision-quality.md +21 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-adr/references/decision-record-fields.md +57 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/SKILL.md +55 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/references/lambda-to-functions-assessment.md +29 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/references/migration-readiness.md +27 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/references/staged-validation-handoff.md +26 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cloud-migrate/references/workload-mapping.md +27 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compliance/SKILL.md +58 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compliance/references/compliance-finding-criteria.md +63 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compliance/references/operational-checklist.md +24 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compute/SKILL.md +36 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compute/references/compute-selection.md +26 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compute/references/pricing-evidence.md +11 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-compute/references/recommendation-and-scale-rules.md +44 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cost-optimization/SKILL.md +61 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cost-optimization/references/cost-assessment-criteria.md +61 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-cost-optimization/references/operational-checklist.md +24 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/SKILL.md +59 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/avm-binding-guidance.md +29 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/baseline-fallbacks.md +53 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/cost-monitoring.md +47 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/decision-boundaries.md +19 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/governance-effects.md +28 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/naming.md +47 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/network-planning.md +47 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/security-baseline.md +40 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/service-selection.md +51 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-defaults/references/tag-precedence.md +31 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-deploy/SKILL.md +50 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-deploy/references/operational-checklist.md +26 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-deploy/references/preview-recovery-verification.md +48 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-diagnostics/SKILL.md +60 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-diagnostics/references/diagnostic-interpretation.md +42 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-diagnostics/references/operational-checklist.md +24 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-governance/SKILL.md +52 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-governance/references/evidence-interpretation.md +58 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-governance/references/operational-checklist.md +25 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-kusto/SKILL.md +58 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-kusto/references/kql-evidence-interpretation.md +41 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-kusto/references/operational-checklist.md +25 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-prepare/SKILL.md +52 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-prepare/references/functions-recipe-pack.md +27 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-prepare/references/preparation-lineage.md +36 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-quotas/SKILL.md +53 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-quotas/references/capacity-decision-rules.md +48 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-quotas/references/operational-checklist.md +23 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-rbac/SKILL.md +45 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-rbac/references/assignment-intent.md +39 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-rbac/references/least-privilege-selection.md +50 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-resources/SKILL.md +54 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-resources/references/inventory-query-patterns.md +49 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-resources/references/operational-checklist.md +24 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-storage/SKILL.md +35 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-storage/references/security-and-governance.md +12 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-storage/references/service-auth-and-sdk-boundary.md +33 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-storage/references/storage-selection.md +12 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-validate/SKILL.md +49 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-validate/references/operational-checklist.md +24 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-azure-validate/references/preflight-evidence.md +43 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/SKILL.md +41 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/avm-and-codegen-acceptance.md +11 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/codegen-acceptance-checklist.md +46 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/compiler-and-provider-gotchas.md +74 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/module-interfaces-and-parameters.md +56 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-bicep-patterns/references/network-and-observability.md +52 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-codegen/SKILL.md +32 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/SKILL.md +53 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/references/capability-receipts.md +21 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/references/design-and-diagnostics.md +36 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/references/oauth-registration-model.md +26 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-entra-app-registration/references/permissions-and-credentials.md +27 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-mermaid/SKILL.md +44 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-mermaid/references/styling.md +33 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-mermaid/references/syntax.md +99 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-microsoft-docs/SKILL.md +53 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-microsoft-docs/references/research-method.md +91 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-operations/SKILL.md +34 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-planning/SKILL.md +36 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-requirements/SKILL.md +43 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/SKILL.md +47 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/references/adoption-attestation.md +10 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/references/import-assessment.md +14 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/references/import-mapping.md +27 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-import/references/mapping-and-adoption-attestation.md +12 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/SKILL.md +49 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/module-composition-and-refactor.md +20 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/module-composition-and-state-boundaries.md +11 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/module-locks-and-codegen-acceptance.md +14 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/network-and-observability.md +12 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-patterns/references/plan-and-change-assessment.md +24 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/SKILL.md +45 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/references/evidence-acceptance.md +10 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/references/plan-mode-and-mock-design.md +12 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/references/plan-mode-test-design.md +23 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-terraform-test/references/test-design.md +13 -0
- package/assets/client-projections/github-copilot-vscode/.github/skills/apex-workflow/SKILL.md +37 -0
- package/assets/client-projections/github-copilot-vscode/.vscode/mcp.json +21 -0
- package/assets/config/capability-packs.v1.json +43 -0
- package/assets/config/defaults.v1.json +98 -0
- package/assets/config/improvement-policy.v1.json +37 -0
- package/assets/config/quality-scorecard.v1.json +105 -0
- package/assets/config/recipe-packs.v1.json +29 -0
- package/assets/config/runtime-bundle.v1.json +84 -0
- package/assets/config/toolchain.v1.json +134 -0
- package/assets/config/workflow.v1.json +876 -0
- package/assets/customizations/.github/agents/apex-architect.agent.md +80 -0
- package/assets/customizations/.github/agents/apex-codegen.agent.md +51 -0
- package/assets/customizations/.github/agents/apex-operator.agent.md +68 -0
- package/assets/customizations/.github/agents/apex-planner.agent.md +82 -0
- package/assets/customizations/.github/agents/apex-requirements.agent.md +71 -0
- package/assets/customizations/.github/agents/apex-reviewer.agent.md +42 -0
- package/assets/customizations/.github/agents/apex-validator.agent.md +47 -0
- package/assets/customizations/.github/agents/apex.agent.md +64 -0
- package/assets/customizations/.github/copilot-instructions.md +13 -0
- package/assets/customizations/.github/mcp.json +54 -0
- package/assets/customizations/.github/skills/apex-architecture/SKILL.md +36 -0
- package/assets/customizations/.github/skills/apex-artifacts/SKILL.md +65 -0
- package/assets/customizations/.github/skills/apex-artifacts/references/presentation-conventions.md +52 -0
- package/assets/customizations/.github/skills/apex-artifacts/references/reference-only-outlines.md +78 -0
- package/assets/customizations/.github/skills/apex-artifacts/templates/architecture-assessment.md +35 -0
- package/assets/customizations/.github/skills/apex-artifacts/templates/cost-estimate.md +47 -0
- package/assets/customizations/.github/skills/apex-artifacts/templates/deployment-summary.md +35 -0
- package/assets/customizations/.github/skills/apex-artifacts/templates/governance-constraints.md +35 -0
- package/assets/customizations/.github/skills/apex-artifacts/templates/implementation-plan.md +43 -0
- package/assets/customizations/.github/skills/apex-artifacts/templates/operations-runbook.md +35 -0
- package/assets/customizations/.github/skills/apex-artifacts/templates/requirements.md +42 -0
- package/assets/customizations/.github/skills/apex-artifacts/templates/resource-inventory.md +29 -0
- package/assets/customizations/.github/skills/apex-azure-adr/SKILL.md +52 -0
- package/assets/customizations/.github/skills/apex-azure-adr/references/decision-examples.md +38 -0
- package/assets/customizations/.github/skills/apex-azure-adr/references/decision-guardrails.md +36 -0
- package/assets/customizations/.github/skills/apex-azure-adr/references/decision-quality.md +21 -0
- package/assets/customizations/.github/skills/apex-azure-adr/references/decision-record-fields.md +57 -0
- package/assets/customizations/.github/skills/apex-azure-cloud-migrate/SKILL.md +55 -0
- package/assets/customizations/.github/skills/apex-azure-cloud-migrate/references/lambda-to-functions-assessment.md +29 -0
- package/assets/customizations/.github/skills/apex-azure-cloud-migrate/references/migration-readiness.md +27 -0
- package/assets/customizations/.github/skills/apex-azure-cloud-migrate/references/staged-validation-handoff.md +26 -0
- package/assets/customizations/.github/skills/apex-azure-cloud-migrate/references/workload-mapping.md +27 -0
- package/assets/customizations/.github/skills/apex-azure-compliance/SKILL.md +58 -0
- package/assets/customizations/.github/skills/apex-azure-compliance/references/compliance-finding-criteria.md +63 -0
- package/assets/customizations/.github/skills/apex-azure-compliance/references/operational-checklist.md +24 -0
- package/assets/customizations/.github/skills/apex-azure-compute/SKILL.md +36 -0
- package/assets/customizations/.github/skills/apex-azure-compute/references/compute-selection.md +26 -0
- package/assets/customizations/.github/skills/apex-azure-compute/references/pricing-evidence.md +11 -0
- package/assets/customizations/.github/skills/apex-azure-compute/references/recommendation-and-scale-rules.md +44 -0
- package/assets/customizations/.github/skills/apex-azure-cost-optimization/SKILL.md +61 -0
- package/assets/customizations/.github/skills/apex-azure-cost-optimization/references/cost-assessment-criteria.md +61 -0
- package/assets/customizations/.github/skills/apex-azure-cost-optimization/references/operational-checklist.md +24 -0
- package/assets/customizations/.github/skills/apex-azure-defaults/SKILL.md +59 -0
- package/assets/customizations/.github/skills/apex-azure-defaults/references/avm-binding-guidance.md +29 -0
- package/assets/customizations/.github/skills/apex-azure-defaults/references/baseline-fallbacks.md +53 -0
- package/assets/customizations/.github/skills/apex-azure-defaults/references/cost-monitoring.md +47 -0
- package/assets/customizations/.github/skills/apex-azure-defaults/references/decision-boundaries.md +19 -0
- package/assets/customizations/.github/skills/apex-azure-defaults/references/governance-effects.md +28 -0
- package/assets/customizations/.github/skills/apex-azure-defaults/references/naming.md +47 -0
- package/assets/customizations/.github/skills/apex-azure-defaults/references/network-planning.md +47 -0
- package/assets/customizations/.github/skills/apex-azure-defaults/references/security-baseline.md +40 -0
- package/assets/customizations/.github/skills/apex-azure-defaults/references/service-selection.md +51 -0
- package/assets/customizations/.github/skills/apex-azure-defaults/references/tag-precedence.md +31 -0
- package/assets/customizations/.github/skills/apex-azure-deploy/SKILL.md +50 -0
- package/assets/customizations/.github/skills/apex-azure-deploy/references/operational-checklist.md +26 -0
- package/assets/customizations/.github/skills/apex-azure-deploy/references/preview-recovery-verification.md +48 -0
- package/assets/customizations/.github/skills/apex-azure-diagnostics/SKILL.md +60 -0
- package/assets/customizations/.github/skills/apex-azure-diagnostics/references/diagnostic-interpretation.md +42 -0
- package/assets/customizations/.github/skills/apex-azure-diagnostics/references/operational-checklist.md +24 -0
- package/assets/customizations/.github/skills/apex-azure-governance/SKILL.md +52 -0
- package/assets/customizations/.github/skills/apex-azure-governance/references/evidence-interpretation.md +58 -0
- package/assets/customizations/.github/skills/apex-azure-governance/references/operational-checklist.md +25 -0
- package/assets/customizations/.github/skills/apex-azure-kusto/SKILL.md +58 -0
- package/assets/customizations/.github/skills/apex-azure-kusto/references/kql-evidence-interpretation.md +41 -0
- package/assets/customizations/.github/skills/apex-azure-kusto/references/operational-checklist.md +25 -0
- package/assets/customizations/.github/skills/apex-azure-prepare/SKILL.md +52 -0
- package/assets/customizations/.github/skills/apex-azure-prepare/references/functions-recipe-pack.md +27 -0
- package/assets/customizations/.github/skills/apex-azure-prepare/references/preparation-lineage.md +36 -0
- package/assets/customizations/.github/skills/apex-azure-quotas/SKILL.md +53 -0
- package/assets/customizations/.github/skills/apex-azure-quotas/references/capacity-decision-rules.md +48 -0
- package/assets/customizations/.github/skills/apex-azure-quotas/references/operational-checklist.md +23 -0
- package/assets/customizations/.github/skills/apex-azure-rbac/SKILL.md +45 -0
- package/assets/customizations/.github/skills/apex-azure-rbac/references/assignment-intent.md +39 -0
- package/assets/customizations/.github/skills/apex-azure-rbac/references/least-privilege-selection.md +50 -0
- package/assets/customizations/.github/skills/apex-azure-resources/SKILL.md +54 -0
- package/assets/customizations/.github/skills/apex-azure-resources/references/inventory-query-patterns.md +49 -0
- package/assets/customizations/.github/skills/apex-azure-resources/references/operational-checklist.md +24 -0
- package/assets/customizations/.github/skills/apex-azure-storage/SKILL.md +35 -0
- package/assets/customizations/.github/skills/apex-azure-storage/references/security-and-governance.md +12 -0
- package/assets/customizations/.github/skills/apex-azure-storage/references/service-auth-and-sdk-boundary.md +33 -0
- package/assets/customizations/.github/skills/apex-azure-storage/references/storage-selection.md +12 -0
- package/assets/customizations/.github/skills/apex-azure-validate/SKILL.md +49 -0
- package/assets/customizations/.github/skills/apex-azure-validate/references/operational-checklist.md +24 -0
- package/assets/customizations/.github/skills/apex-azure-validate/references/preflight-evidence.md +43 -0
- package/assets/customizations/.github/skills/apex-bicep-patterns/SKILL.md +41 -0
- package/assets/customizations/.github/skills/apex-bicep-patterns/references/avm-and-codegen-acceptance.md +11 -0
- package/assets/customizations/.github/skills/apex-bicep-patterns/references/codegen-acceptance-checklist.md +46 -0
- package/assets/customizations/.github/skills/apex-bicep-patterns/references/compiler-and-provider-gotchas.md +74 -0
- package/assets/customizations/.github/skills/apex-bicep-patterns/references/module-interfaces-and-parameters.md +56 -0
- package/assets/customizations/.github/skills/apex-bicep-patterns/references/network-and-observability.md +52 -0
- package/assets/customizations/.github/skills/apex-codegen/SKILL.md +32 -0
- package/assets/customizations/.github/skills/apex-entra-app-registration/SKILL.md +53 -0
- package/assets/customizations/.github/skills/apex-entra-app-registration/references/capability-receipts.md +21 -0
- package/assets/customizations/.github/skills/apex-entra-app-registration/references/design-and-diagnostics.md +36 -0
- package/assets/customizations/.github/skills/apex-entra-app-registration/references/oauth-registration-model.md +26 -0
- package/assets/customizations/.github/skills/apex-entra-app-registration/references/permissions-and-credentials.md +27 -0
- package/assets/customizations/.github/skills/apex-mermaid/SKILL.md +44 -0
- package/assets/customizations/.github/skills/apex-mermaid/references/styling.md +33 -0
- package/assets/customizations/.github/skills/apex-mermaid/references/syntax.md +99 -0
- package/assets/customizations/.github/skills/apex-microsoft-docs/SKILL.md +53 -0
- package/assets/customizations/.github/skills/apex-microsoft-docs/references/research-method.md +91 -0
- package/assets/customizations/.github/skills/apex-operations/SKILL.md +34 -0
- package/assets/customizations/.github/skills/apex-planning/SKILL.md +36 -0
- package/assets/customizations/.github/skills/apex-requirements/SKILL.md +43 -0
- package/assets/customizations/.github/skills/apex-terraform-import/SKILL.md +47 -0
- package/assets/customizations/.github/skills/apex-terraform-import/references/adoption-attestation.md +10 -0
- package/assets/customizations/.github/skills/apex-terraform-import/references/import-assessment.md +14 -0
- package/assets/customizations/.github/skills/apex-terraform-import/references/import-mapping.md +27 -0
- package/assets/customizations/.github/skills/apex-terraform-import/references/mapping-and-adoption-attestation.md +12 -0
- package/assets/customizations/.github/skills/apex-terraform-patterns/SKILL.md +49 -0
- package/assets/customizations/.github/skills/apex-terraform-patterns/references/module-composition-and-refactor.md +20 -0
- package/assets/customizations/.github/skills/apex-terraform-patterns/references/module-composition-and-state-boundaries.md +11 -0
- package/assets/customizations/.github/skills/apex-terraform-patterns/references/module-locks-and-codegen-acceptance.md +14 -0
- package/assets/customizations/.github/skills/apex-terraform-patterns/references/network-and-observability.md +12 -0
- package/assets/customizations/.github/skills/apex-terraform-patterns/references/plan-and-change-assessment.md +24 -0
- package/assets/customizations/.github/skills/apex-terraform-test/SKILL.md +45 -0
- package/assets/customizations/.github/skills/apex-terraform-test/references/evidence-acceptance.md +10 -0
- package/assets/customizations/.github/skills/apex-terraform-test/references/plan-mode-and-mock-design.md +12 -0
- package/assets/customizations/.github/skills/apex-terraform-test/references/plan-mode-test-design.md +23 -0
- package/assets/customizations/.github/skills/apex-terraform-test/references/test-design.md +13 -0
- package/assets/customizations/.github/skills/apex-workflow/SKILL.md +37 -0
- package/assets/customizations/.vscode/mcp.json +21 -0
- package/assets/customizations/README.md +22 -0
- package/assets/customizations/manifest.json +251 -0
- package/assets/manifest.json +5027 -0
- package/dist/assets.d.ts +69 -0
- package/dist/assets.js +336 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.js +643 -0
- package/dist/dependency-revision.d.ts +5 -0
- package/dist/dependency-revision.js +21 -0
- package/dist/errors.d.ts +19 -0
- package/dist/errors.js +34 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +7 -0
- package/dist/mcp.d.ts +5 -0
- package/dist/mcp.js +210 -0
- package/dist/provider-runtime.d.ts +27 -0
- package/dist/provider-runtime.js +229 -0
- package/dist/provider-transfer.d.ts +52 -0
- package/dist/provider-transfer.js +533 -0
- package/dist/service.d.ts +806 -0
- package/dist/service.js +3817 -0
- package/dist/state-transfer.d.ts +51 -0
- package/dist/state-transfer.js +559 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +2 -0
- package/dist/workflow-validators.d.ts +80 -0
- package/dist/workflow-validators.js +843 -0
- package/package.json +57 -0
package/dist/assets.d.ts
ADDED
|
@@ -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