@danmoisan/drm-copilot-mcp 1.1.17 → 1.1.19

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 (225) hide show
  1. package/out/mcp-server.js +1405 -684
  2. package/package.json +6 -4
  3. package/resources/claude-customizations/.claude/agents/atomic-executor.md +11 -0
  4. package/resources/claude-customizations/.claude/agents/atomic-planner.md +10 -0
  5. package/resources/claude-customizations/.claude/agents/epic-orchestrator.md +12 -4
  6. package/resources/claude-customizations/.claude/agents/epic-planner.md +5 -4
  7. package/resources/claude-customizations/.claude/agents/feature-review.md +16 -5
  8. package/resources/claude-customizations/.claude/agents/orchestrator.md +21 -7
  9. package/resources/claude-customizations/.claude/agents/parallel-orchestrator.md +37 -13
  10. package/resources/claude-customizations/.claude/agents/parallel-planner.md +9 -6
  11. package/resources/claude-customizations/.claude/agents/pr-author.md +15 -2
  12. package/resources/claude-customizations/.claude/agents/prd-feature.md +1 -1
  13. package/resources/claude-customizations/.claude/hooks/check-powershell-test-purity.ps1 +7 -1
  14. package/resources/claude-customizations/.claude/hooks/check-python-test-purity.ps1 +7 -1
  15. package/resources/claude-customizations/.claude/hooks/enforce-checkpoint-monotonic.ps1 +7 -1
  16. package/resources/claude-customizations/.claude/hooks/enforce-completion-consistency.ps1 +111 -46
  17. package/resources/claude-customizations/.claude/hooks/enforce-completion-helpers.ps1 +105 -0
  18. package/resources/claude-customizations/.claude/hooks/enforce-discovery-artifact-gate.ps1 +8 -1
  19. package/resources/claude-customizations/.claude/hooks/enforce-epic-invocation-origin.ps1 +7 -1
  20. package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate-resolution.ps1 +116 -59
  21. package/resources/claude-customizations/.claude/hooks/enforce-epic-merge-gate.ps1 +55 -23
  22. package/resources/claude-customizations/.claude/hooks/enforce-epic-wave-barrier.ps1 +74 -75
  23. package/resources/claude-customizations/.claude/hooks/enforce-epic-worktree-removal-gate-resolution.ps1 +127 -35
  24. package/resources/claude-customizations/.claude/hooks/enforce-epic-worktree-removal-gate.ps1 +61 -57
  25. package/resources/claude-customizations/.claude/hooks/enforce-evidence-locations.ps1 +7 -1
  26. package/resources/claude-customizations/.claude/hooks/enforce-feature-folder-order.ps1 +129 -39
  27. package/resources/claude-customizations/.claude/hooks/enforce-mermaid-validation.ps1 +7 -1
  28. package/resources/claude-customizations/.claude/hooks/enforce-model-routing-receipt.ps1 +9 -3
  29. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate-epic-scope.ps1 +39 -51
  30. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate-helpers.ps1 +31 -58
  31. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate-modes.ps1 +63 -47
  32. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate-targets.ps1 +433 -0
  33. package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate.ps1 +17 -12
  34. package/resources/claude-customizations/.claude/hooks/enforce-parallel-abandon-gate.ps1 +9 -3
  35. package/resources/claude-customizations/.claude/hooks/enforce-parallel-cohort-barrier.ps1 +65 -50
  36. package/resources/claude-customizations/.claude/hooks/enforce-parallel-drift-gate.ps1 +49 -42
  37. package/resources/claude-customizations/.claude/hooks/enforce-parallel-worktree-removal-gate.ps1 +54 -72
  38. package/resources/claude-customizations/.claude/hooks/enforce-powershell-batch-budget.ps1 +8 -2
  39. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-command-allowlist.ps1 +279 -0
  40. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill-helpers.ps1 +129 -75
  41. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.artifact-root.ps1 +233 -0
  42. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.docs-only.ps1 +224 -0
  43. package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.ps1 +69 -24
  44. package/resources/claude-customizations/.claude/hooks/enforce-prd-feature-before-planner-helpers.ps1 +29 -18
  45. package/resources/claude-customizations/.claude/hooks/enforce-prd-feature-before-planner.ps1 +10 -4
  46. package/resources/claude-customizations/.claude/hooks/enforce-promotion-mcp-only.ps1 +14 -5
  47. package/resources/claude-customizations/.claude/hooks/enforce-python-batch-budget.ps1 +8 -2
  48. package/resources/claude-customizations/.claude/hooks/feature-folder-resolution.ps1 +373 -0
  49. package/resources/claude-customizations/.claude/hooks/feature-review-coverage-thresholds.ps1 +85 -0
  50. package/resources/claude-customizations/.claude/hooks/hook-command-heredoc.ps1 +119 -0
  51. package/resources/claude-customizations/.claude/hooks/hook-command-invocation-operands.ps1 +198 -0
  52. package/resources/claude-customizations/.claude/hooks/hook-command-invocation.ps1 +254 -255
  53. package/resources/claude-customizations/.claude/hooks/hook-command-payload-powershell.ps1 +201 -0
  54. package/resources/claude-customizations/.claude/hooks/hook-command-payload.ps1 +484 -0
  55. package/resources/claude-customizations/.claude/hooks/hook-command-scanner.ps1 +27 -110
  56. package/resources/claude-customizations/.claude/hooks/hook-dependency-guard.ps1 +114 -0
  57. package/resources/claude-customizations/.claude/hooks/hook-docs-only-diff.ps1 +493 -0
  58. package/resources/claude-customizations/.claude/hooks/subagentstop-envelope.ps1 +192 -0
  59. package/resources/claude-customizations/.claude/hooks/validate-bash.ps1 +9 -3
  60. package/resources/claude-customizations/.claude/hooks/validate-discovery-artifact-gate.ps1 +40 -42
  61. package/resources/claude-customizations/.claude/hooks/validate-executor-output.ps1 +66 -38
  62. package/resources/claude-customizations/.claude/hooks/validate-feature-review-coverage-metrics.ps1 +180 -0
  63. package/resources/claude-customizations/.claude/hooks/validate-feature-review-coverage-rules.ps1 +195 -0
  64. package/resources/claude-customizations/.claude/hooks/validate-feature-review-coverage.ps1 +141 -395
  65. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output-resolution.ps1 +311 -0
  66. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output-routing.ps1 +170 -0
  67. package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +115 -190
  68. package/resources/claude-customizations/.claude/hooks/validate-planner-output.ps1 +64 -32
  69. package/resources/claude-customizations/.claude/hooks/validate-pr-author-output.ps1 +39 -44
  70. package/resources/claude-customizations/.claude/hooks/validate-prd-feature-output.ps1 +43 -14
  71. package/resources/claude-customizations/.claude/hooks/validate-required-artifact-output.ps1 +66 -36
  72. package/resources/claude-customizations/.claude/hooks/validate-task-researcher-output.ps1 +31 -34
  73. package/resources/claude-customizations/.claude/lib/bash/mutate-parallel-run.sh +191 -0
  74. package/resources/claude-customizations/.claude/lib/bash/parallel-cohorts.sh +13 -3
  75. package/resources/claude-customizations/.claude/lib/bash/parallel-lane-assertion.sh +4 -2
  76. package/resources/claude-customizations/.claude/lib/bash/parallel-mutation-cli.sh +152 -0
  77. package/resources/claude-customizations/.claude/lib/bash/parallel-mutation-ops.sh +193 -0
  78. package/resources/claude-customizations/.claude/lib/bash/parallel-mutation.sh +322 -0
  79. package/resources/claude-customizations/.claude/lib/bash/remove-parallel-item.sh +146 -0
  80. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusExtraction.psm1 +23 -33
  81. package/resources/claude-customizations/.claude/lib/blast-radius/BlastRadiusTokenShape.psm1 +86 -6
  82. package/resources/claude-customizations/.claude/lib/ci-gate/Invoke-CiGateParser.ps1 +91 -19
  83. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorState.psm1 +6 -13
  84. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateEpicWaveBarrier.psm1 +346 -0
  85. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateIssueAdoption.psm1 +396 -0
  86. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateReceipts.psm1 +22 -15
  87. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateRemediationAccounting.psm1 +337 -0
  88. package/resources/claude-customizations/.claude/lib/orchestrator-state/OrchestratorStateRoutingContract.psm1 +9 -1
  89. package/resources/claude-customizations/.claude/lib/worktree-resolution/WorktreeItemResolution.psm1 +79 -2
  90. package/resources/claude-customizations/.claude/lib/worktree-resolution/WorktreeRunResolution.psm1 +3 -3
  91. package/resources/claude-customizations/.claude/rules/architecture-boundaries.md +5 -5
  92. package/resources/claude-customizations/.claude/rules/csharp.md +2 -2
  93. package/resources/claude-customizations/.claude/rules/general-code-change.md +1 -1
  94. package/resources/claude-customizations/.claude/rules/general-unit-test.md +3 -2
  95. package/resources/claude-customizations/.claude/rules/orchestrator-state.md +153 -4
  96. package/resources/claude-customizations/.claude/rules/parallel-orchestration.md +50 -5
  97. package/resources/claude-customizations/.claude/rules/plan-acceptance-gates.md +47 -8
  98. package/resources/claude-customizations/.claude/rules/quality-tiers.md +11 -7
  99. package/resources/claude-customizations/.claude/rules/shell.md +10 -8
  100. package/resources/claude-customizations/.claude/rules/typescript.md +1 -1
  101. package/resources/claude-customizations/.claude/settings.json +3 -4
  102. package/resources/claude-customizations/.claude/skills/acceptance-criteria-tracking/SKILL.md +9 -1
  103. package/resources/claude-customizations/.claude/skills/atomic-plan-contract/SKILL.md +7 -1
  104. package/resources/claude-customizations/.claude/skills/cleanup-merged-worktrees/SKILL.md +11 -3
  105. package/resources/claude-customizations/.claude/skills/cleanup-merged-worktrees/scripts/cleanup-worktrees.sh +11 -2
  106. package/resources/claude-customizations/.claude/skills/cleanup-merged-worktrees/scripts/cleanup_worktrees_detached_lib.sh +1 -1
  107. package/resources/claude-customizations/.claude/skills/cleanup-merged-worktrees/scripts/cleanup_worktrees_enumerate_lib.sh +171 -5
  108. package/resources/claude-customizations/.claude/skills/cleanup-merged-worktrees/scripts/cleanup_worktrees_preserve_lib.sh +1 -1
  109. package/resources/claude-customizations/.claude/skills/cleanup-merged-worktrees/scripts/cleanup_worktrees_report_records_lib.sh +6 -43
  110. package/resources/claude-customizations/.claude/skills/cleanup-merged-worktrees/scripts/cleanup_worktrees_scan_helper.sh +6 -15
  111. package/resources/claude-customizations/.claude/skills/epic-orchestrate/SKILL.md +45 -11
  112. package/resources/claude-customizations/.claude/skills/epic-plan/SKILL.md +1 -1
  113. package/resources/claude-customizations/.claude/skills/evidence-and-timestamp-conventions/SKILL.md +13 -0
  114. package/resources/claude-customizations/.claude/skills/feature-promotion-lifecycle/SKILL.md +10 -0
  115. package/resources/claude-customizations/.claude/skills/feature-review-workflow/SKILL.md +7 -4
  116. package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +42 -16
  117. package/resources/claude-customizations/.claude/skills/parallel-add/SKILL.md +52 -14
  118. package/resources/claude-customizations/.claude/skills/parallel-close/SKILL.md +22 -9
  119. package/resources/claude-customizations/.claude/skills/parallel-orchestrate/SKILL.md +97 -19
  120. package/resources/claude-customizations/.claude/skills/parallel-plan/SKILL.md +63 -7
  121. package/resources/claude-customizations/.claude/skills/parallel-remove/SKILL.md +35 -12
  122. package/resources/claude-customizations/.claude/skills/pr-author/SKILL.md +3 -1
  123. package/resources/claude-customizations/.claude/skills/quota-throttling/SKILL.md +1 -1
  124. package/resources/claude-customizations/.claude/skills/remediation-handoff-atomic-planner/SKILL.md +7 -3
  125. package/resources/claude-customizations/pack-manifests/core.json +25 -0
  126. package/resources/codex-and-agents-customizations/.agents/skills/acceptance-criteria-tracking/SKILL.md +9 -1
  127. package/resources/codex-and-agents-customizations/.agents/skills/architecture-boundaries/SKILL.md +5 -5
  128. package/resources/codex-and-agents-customizations/.agents/skills/atomic-executor/SKILL.md +11 -0
  129. package/resources/codex-and-agents-customizations/.agents/skills/atomic-plan-contract/SKILL.md +4 -0
  130. package/resources/codex-and-agents-customizations/.agents/skills/atomic-planner/SKILL.md +10 -0
  131. package/resources/codex-and-agents-customizations/.agents/skills/csharp/SKILL.md +2 -2
  132. package/resources/codex-and-agents-customizations/.agents/skills/csharp-qa-gate/SKILL.md +2 -2
  133. package/resources/codex-and-agents-customizations/.agents/skills/epic-orchestrate/SKILL.md +13 -3
  134. package/resources/codex-and-agents-customizations/.agents/skills/epic-plan/SKILL.md +17 -1
  135. package/resources/codex-and-agents-customizations/.agents/skills/epic-run/SKILL.md +2 -1
  136. package/resources/codex-and-agents-customizations/.agents/skills/evidence-and-timestamp-conventions/SKILL.md +13 -0
  137. package/resources/codex-and-agents-customizations/.agents/skills/feature-promotion-lifecycle/SKILL.md +1 -1
  138. package/resources/codex-and-agents-customizations/.agents/skills/feature-review/SKILL.md +30 -6
  139. package/resources/codex-and-agents-customizations/.agents/skills/feature-review-workflow/SKILL.md +16 -6
  140. package/resources/codex-and-agents-customizations/.agents/skills/general-code-change/SKILL.md +1 -1
  141. package/resources/codex-and-agents-customizations/.agents/skills/general-unit-test/SKILL.md +3 -2
  142. package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +43 -11
  143. package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-state/SKILL.md +41 -2
  144. package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +19 -4
  145. package/resources/codex-and-agents-customizations/.agents/skills/quality-tiers/SKILL.md +11 -7
  146. package/resources/codex-and-agents-customizations/.agents/skills/remediation-handoff-atomic-planner/SKILL.md +2 -0
  147. package/resources/codex-and-agents-customizations/.agents/skills/translate-claude-to-codex/SKILL.md +1 -1
  148. package/resources/codex-and-agents-customizations/.agents-variants/csharp-legacy/skills/csharp/SKILL.md +2 -2
  149. package/resources/codex-and-agents-customizations/.agents-variants/csharp-legacy/skills/csharp-qa-gate/SKILL.md +2 -2
  150. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c1.toml +11 -0
  151. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c2.toml +11 -0
  152. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c3-elevated.toml +11 -0
  153. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c3.toml +11 -0
  154. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c4.toml +11 -0
  155. package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor.toml +11 -0
  156. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c1.toml +10 -0
  157. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c2.toml +10 -0
  158. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c3-elevated.toml +10 -0
  159. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c3.toml +10 -0
  160. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c4.toml +10 -0
  161. package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner.toml +10 -0
  162. package/resources/codex-and-agents-customizations/.codex/agents/epic-orchestrator.toml +2 -1
  163. package/resources/codex-and-agents-customizations/.codex/agents/feature-review.toml +6 -6
  164. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c1.toml +1 -0
  165. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c2.toml +1 -0
  166. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c3-elevated.toml +1 -0
  167. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c3.toml +1 -0
  168. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c4.toml +1 -0
  169. package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer.toml +1 -0
  170. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c1.toml +3 -3
  171. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c2.toml +3 -3
  172. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c3-elevated.toml +3 -3
  173. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c3.toml +3 -3
  174. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c4.toml +3 -3
  175. package/resources/codex-and-agents-customizations/.codex/agents/orchestrator.toml +3 -3
  176. package/resources/codex-and-agents-customizations/.codex/codex-web-setup.sh +318 -273
  177. package/resources/codex-and-agents-customizations/.codex/config.toml +1 -1
  178. package/resources/codex-and-agents-customizations/.codex/hooks/check-powershell-test-purity.ps1 +7 -1
  179. package/resources/codex-and-agents-customizations/.codex/hooks/check-python-test-purity.ps1 +7 -1
  180. package/resources/codex-and-agents-customizations/.codex/hooks/codex-epic-child-launch-attestation.ps1 +1 -1
  181. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-checkpoint-monotonic.ps1 +7 -1
  182. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-codex-model-routing.ps1 +8 -2
  183. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-completion-consistency.ps1 +97 -44
  184. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-completion-helpers.ps1 +105 -0
  185. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-child-worktree-binding.ps1 +7 -1
  186. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-merge-gate.ps1 +37 -5
  187. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-planning-only.ps1 +6 -0
  188. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-root-invocation.ps1 +7 -1
  189. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-wave-barrier.ps1 +7 -1
  190. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-epic-worktree-removal-gate.ps1 +54 -41
  191. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-evidence-locations.ps1 +7 -1
  192. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate-epic-scope.ps1 +35 -14
  193. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate-helpers.ps1 +31 -58
  194. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate-modes.ps1 +63 -47
  195. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate-targets.ps1 +433 -0
  196. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate.ps1 +24 -11
  197. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-powershell-batch-budget.ps1 +8 -2
  198. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-promotion-mcp-only.ps1 +13 -4
  199. package/resources/codex-and-agents-customizations/.codex/hooks/enforce-python-batch-budget.ps1 +8 -2
  200. package/resources/codex-and-agents-customizations/.codex/hooks/feature-folder-resolution.ps1 +373 -0
  201. package/resources/codex-and-agents-customizations/.codex/hooks/feature-review-coverage-thresholds.ps1 +85 -0
  202. package/resources/codex-and-agents-customizations/.codex/hooks/hook-command-heredoc.ps1 +119 -0
  203. package/resources/codex-and-agents-customizations/.codex/hooks/hook-command-invocation-operands.ps1 +198 -0
  204. package/resources/codex-and-agents-customizations/.codex/hooks/hook-command-invocation.ps1 +254 -255
  205. package/resources/codex-and-agents-customizations/.codex/hooks/hook-command-payload-powershell.ps1 +201 -0
  206. package/resources/codex-and-agents-customizations/.codex/hooks/hook-command-payload.ps1 +484 -0
  207. package/resources/codex-and-agents-customizations/.codex/hooks/hook-command-scanner.ps1 +27 -110
  208. package/resources/codex-and-agents-customizations/.codex/hooks/hook-dependency-guard.ps1 +114 -0
  209. package/resources/codex-and-agents-customizations/.codex/hooks/hook-docs-only-diff.ps1 +493 -0
  210. package/resources/codex-and-agents-customizations/.codex/hooks/validate-bash.ps1 +8 -2
  211. package/resources/codex-and-agents-customizations/.codex/hooks/validate-codex-subagent-routing.ps1 +7 -1
  212. package/resources/codex-and-agents-customizations/.codex/hooks/validate-feature-review-coverage.ps1 +24 -8
  213. package/resources/codex-and-agents-customizations/pack-manifests/core.json +9 -0
  214. package/resources/customizations/.github/agents/csharp-typed-engineer.agent.md +2 -2
  215. package/resources/customizations/.github/instructions/csharp-code-change.instructions.md +4 -4
  216. package/resources/customizations/.github/instructions/csharp-unit-test.instructions.md +2 -2
  217. package/resources/customizations/.github/skills/acceptance-criteria-tracking/SKILL.md +9 -1
  218. package/resources/customizations/.github/skills/atomic-plan-contract/SKILL.md +4 -0
  219. package/resources/customizations/.github/skills/evidence-and-timestamp-conventions/SKILL.md +13 -0
  220. package/resources/customizations/.github/skills/feature-review-workflow/SKILL.md +1 -1
  221. package/resources/powershell/PoshQC/PoshQC.Coverage.psm1 +314 -0
  222. package/resources/powershell/PoshQC/PoshQC.Testing.psm1 +25 -28
  223. package/resources/powershell/PoshQC/PoshQC.psm1 +1 -0
  224. package/resources/powershell/PoshQC/README.md +8 -2
  225. package/resources/powershell/PoshQC/settings/pester.runsettings.psd1 +2 -315
@@ -1,290 +1,334 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
- REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
4
+ # Print the repository root. Codex Web copies this script to /tmp before running it, so
5
+ # the script-relative root can resolve to / rather than the actual checkout. The checkout
6
+ # is recognized by a solution file at its root; the solution name is not assumed. When the
7
+ # script-relative root lists no solution file, fall back to the working directory, which
8
+ # Codex sets to the repo root.
9
+ # Args: $1 = script-relative root; $2 = solution file names at that root, one per line.
10
+ resolve_repo_root() {
11
+ if [ -n "$2" ]; then
12
+ printf '%s\n' "$1"
13
+ else
14
+ pwd
15
+ fi
16
+ }
17
+
18
+ # Print the first solution file name in LC_ALL=C order, or nothing when none is listed.
19
+ # Args: $1 = solution file names, one per line.
20
+ select_solution_file() {
21
+ if [ -n "$1" ]; then
22
+ printf '%s\n' "$1" | LC_ALL=C sort | sed -n '1p'
23
+ fi
24
+ }
25
+
26
+ # Print the names of the solution files at the root of a directory, one per line.
27
+ # Args: $1 = directory.
28
+ list_root_solution_files() {
29
+ # GNU find is required: -printf is a GNU extension, and other find implementations fail with the error hidden by 2>/dev/null.
30
+ find "$1" -maxdepth 1 -type f -name '*.sln' -printf '%f\n' 2>/dev/null
31
+ }
6
32
 
7
- # Codex Web copies this script to /tmp before running it, so the script-relative
8
- # REPO_ROOT resolves to / rather than the actual checkout. Fall back to the
9
- # working directory, which Codex sets to the repo root.
10
- if [ ! -f "${REPO_ROOT}/TaskMaster.sln" ]; then
11
- REPO_ROOT="$(pwd)"
12
- fi
33
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
34
+ SCRIPT_RELATIVE_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
35
+ REPO_ROOT="$(resolve_repo_root "${SCRIPT_RELATIVE_ROOT}" "$(list_root_solution_files "${SCRIPT_RELATIVE_ROOT}")")"
36
+ SOLUTION_FILE="$(select_solution_file "$(list_root_solution_files "${REPO_ROOT}")")"
13
37
 
14
38
  log() {
15
- printf '[codex-web-setup] %s\n' "$*"
39
+ printf '[codex-web-setup] %s\n' "$*"
16
40
  }
17
41
 
18
42
  fail() {
19
- printf '[codex-web-setup] error: %s\n' "$*" >&2
20
- exit 1
43
+ printf '[codex-web-setup] error: %s\n' "$*" >&2
44
+ exit 1
21
45
  }
22
46
 
23
47
  warn() {
24
- printf '[codex-web-setup] warning: %s\n' "$*" >&2
48
+ printf '[codex-web-setup] warning: %s\n' "$*" >&2
49
+ }
50
+
51
+ # Log the selected solution file and the number of root solution files found; log nothing
52
+ # when no solution file is listed.
53
+ # Args: $1 = solution file names, one per line; $2 = the selected solution file name.
54
+ log_solution_selection() {
55
+ local listing="$1"
56
+ local selected="$2"
57
+ local count=""
58
+
59
+ if [ -n "${listing}" ]; then
60
+ count="$(printf '%s\n' "${listing}" | sed -n '$=')"
61
+ log "Selected solution file ${selected}; root *.sln files found: ${count}."
62
+ fi
25
63
  }
26
64
 
27
65
  read_global_json_sdk_version() {
28
- local global_json_path="${REPO_ROOT}/global.json"
66
+ local global_json_path="${REPO_ROOT}/global.json"
29
67
 
30
- if [ ! -f "${global_json_path}" ]; then
31
- return 1
32
- fi
68
+ if [ ! -f "${global_json_path}" ]; then
69
+ return 1
70
+ fi
33
71
 
34
- grep -oE '"version"[[:space:]]*:[[:space:]]*"[^"]+"' "${global_json_path}" |
35
- head -n 1 |
36
- sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/'
72
+ grep -oE '"version"[[:space:]]*:[[:space:]]*"[^"]+"' "${global_json_path}" |
73
+ head -n 1 |
74
+ sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/'
37
75
  }
38
76
 
39
77
  append_if_missing() {
40
- local file="$1"
41
- local line="$2"
78
+ local file="$1"
79
+ local line="$2"
42
80
 
43
- touch "$file"
44
- if ! grep -Fqx "$line" "$file"; then
45
- printf '%s\n' "$line" >>"$file"
46
- fi
81
+ touch "$file"
82
+ if ! grep -Fqx "$line" "$file"; then
83
+ printf '%s\n' "$line" >>"$file"
84
+ fi
47
85
  }
48
86
 
49
87
  install_apt_packages() {
50
- if ! command -v apt-get >/dev/null 2>&1; then
51
- warn "apt-get is unavailable; skipping OS package installation."
52
- return
53
- fi
54
-
55
- local runner=""
56
- if [ "$(id -u)" -eq 0 ]; then
57
- runner=""
58
- elif command -v sudo >/dev/null 2>&1; then
59
- runner="sudo"
60
- else
61
- warn "apt-get requires root and sudo is unavailable; skipping OS package installation."
62
- return
63
- fi
64
-
65
- log "Installing Codex Web dependencies with apt-get..."
66
- ${runner} apt-get update
67
- ${runner} apt-get install -y \
68
- ca-certificates \
69
- curl \
70
- git \
71
- jq \
72
- lsb-release \
73
- mono-complete \
74
- ripgrep \
75
- unzip \
76
- zip
88
+ if ! command -v apt-get >/dev/null 2>&1; then
89
+ warn "apt-get is unavailable; skipping OS package installation."
90
+ return
91
+ fi
92
+
93
+ local runner=""
94
+ if [ "$(id -u)" -eq 0 ]; then
95
+ runner=""
96
+ elif command -v sudo >/dev/null 2>&1; then
97
+ runner="sudo"
98
+ else
99
+ warn "apt-get requires root and sudo is unavailable; skipping OS package installation."
100
+ return
101
+ fi
102
+
103
+ log "Installing Codex Web dependencies with apt-get..."
104
+ ${runner} apt-get update
105
+ ${runner} apt-get install -y \
106
+ ca-certificates \
107
+ curl \
108
+ git \
109
+ jq \
110
+ lsb-release \
111
+ mono-complete \
112
+ ripgrep \
113
+ unzip \
114
+ zip
77
115
  }
78
116
 
79
117
  install_powershell() {
80
- if command -v pwsh >/dev/null 2>&1; then
81
- log "PowerShell is already available; skipping."
82
- return
83
- fi
84
-
85
- if ! command -v apt-get >/dev/null 2>&1; then
86
- warn "apt-get is unavailable; skipping PowerShell installation."
87
- return
88
- fi
89
-
90
- local runner=""
91
- if [ "$(id -u)" -ne 0 ]; then
92
- if command -v sudo >/dev/null 2>&1; then
93
- runner="sudo"
94
- else
95
- warn "PowerShell installation requires root; skipping."
96
- return
97
- fi
98
- fi
99
-
100
- local ubuntu_version
101
- ubuntu_version="$(lsb_release -rs 2>/dev/null || echo '24.04')"
102
-
103
- log "Registering Microsoft package repository for PowerShell (Ubuntu ${ubuntu_version})..."
104
- local ms_pkg
105
- ms_pkg="$(mktemp --suffix=.deb)"
106
- if curl -fsSL "https://packages.microsoft.com/config/ubuntu/${ubuntu_version}/packages-microsoft-prod.deb" -o "${ms_pkg}"; then
107
- ${runner} dpkg -i "${ms_pkg}" || true
108
- rm -f "${ms_pkg}"
109
- ${runner} apt-get update
110
- ${runner} apt-get install -y powershell
111
- else
112
- rm -f "${ms_pkg}"
113
- warn "Could not download Microsoft package repo; skipping PowerShell installation."
114
- fi
118
+ if command -v pwsh >/dev/null 2>&1; then
119
+ log "PowerShell is already available; skipping."
120
+ return
121
+ fi
122
+
123
+ if ! command -v apt-get >/dev/null 2>&1; then
124
+ warn "apt-get is unavailable; skipping PowerShell installation."
125
+ return
126
+ fi
127
+
128
+ local runner=""
129
+ if [ "$(id -u)" -ne 0 ]; then
130
+ if command -v sudo >/dev/null 2>&1; then
131
+ runner="sudo"
132
+ else
133
+ warn "PowerShell installation requires root; skipping."
134
+ return
135
+ fi
136
+ fi
137
+
138
+ local ubuntu_version
139
+ ubuntu_version="$(lsb_release -rs 2>/dev/null || echo '24.04')"
140
+
141
+ log "Registering Microsoft package repository for PowerShell (Ubuntu ${ubuntu_version})..."
142
+ local ms_pkg
143
+ ms_pkg="$(mktemp --suffix=.deb)"
144
+ if curl -fsSL "https://packages.microsoft.com/config/ubuntu/${ubuntu_version}/packages-microsoft-prod.deb" -o "${ms_pkg}"; then
145
+ ${runner} dpkg -i "${ms_pkg}" || true
146
+ rm -f "${ms_pkg}"
147
+ ${runner} apt-get update
148
+ ${runner} apt-get install -y powershell
149
+ else
150
+ rm -f "${ms_pkg}"
151
+ warn "Could not download Microsoft package repo; skipping PowerShell installation."
152
+ fi
115
153
  }
116
154
 
117
155
  install_nuget() {
118
- if command -v nuget >/dev/null 2>&1; then
119
- log "nuget is already available; skipping."
120
- return
121
- fi
122
-
123
- if ! command -v mono >/dev/null 2>&1; then
124
- warn "mono is unavailable; cannot install nuget wrapper."
125
- return
126
- fi
127
-
128
- log "Downloading nuget.exe and creating mono wrapper..."
129
- local nuget_exe="/usr/local/bin/nuget.exe"
130
- local nuget_wrapper="/usr/local/bin/nuget"
131
-
132
- local runner=""
133
- if [ "$(id -u)" -ne 0 ]; then
134
- runner="sudo"
135
- fi
136
-
137
- if curl -fsSL "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -o "${nuget_exe}"; then
138
- printf '#!/usr/bin/env bash\nexec mono %s "$@"\n' "${nuget_exe}" | ${runner} tee "${nuget_wrapper}" >/dev/null
139
- ${runner} chmod +x "${nuget_wrapper}"
140
- log "nuget wrapper installed at ${nuget_wrapper}."
141
- else
142
- warn "Could not download nuget.exe; skipping."
143
- fi
156
+ if command -v nuget >/dev/null 2>&1; then
157
+ log "nuget is already available; skipping."
158
+ return
159
+ fi
160
+
161
+ if ! command -v mono >/dev/null 2>&1; then
162
+ warn "mono is unavailable; cannot install nuget wrapper."
163
+ return
164
+ fi
165
+
166
+ log "Downloading nuget.exe and creating mono wrapper..."
167
+ local nuget_exe="/usr/local/bin/nuget.exe"
168
+ local nuget_wrapper="/usr/local/bin/nuget"
169
+
170
+ local runner=""
171
+ if [ "$(id -u)" -ne 0 ]; then
172
+ runner="sudo"
173
+ fi
174
+
175
+ if curl -fsSL "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -o "${nuget_exe}"; then
176
+ printf '#!/usr/bin/env bash\nexec mono %s "$@"\n' "${nuget_exe}" | ${runner} tee "${nuget_wrapper}" >/dev/null
177
+ ${runner} chmod +x "${nuget_wrapper}"
178
+ log "nuget wrapper installed at ${nuget_wrapper}."
179
+ else
180
+ warn "Could not download nuget.exe; skipping."
181
+ fi
144
182
  }
145
183
 
146
184
  install_dotnet_sdk() {
147
- local dotnet_root="${REPO_ROOT}/.dotnet-sdk"
148
- local dotnet_version=""
149
- local install_script=""
150
-
151
- dotnet_version="$(read_global_json_sdk_version || true)"
152
- if [ -z "${dotnet_version}" ]; then
153
- warn "Could not read the SDK version from global.json; skipping repo-local .NET SDK installation."
154
- return
155
- fi
156
-
157
- if [ -x "${dotnet_root}/dotnet" ] && [ -d "${dotnet_root}/sdk/${dotnet_version}" ]; then
158
- log "Repo-local .NET SDK ${dotnet_version} is already available at ${dotnet_root}."
159
- else
160
- log "Installing repo-local .NET SDK ${dotnet_version} into ${dotnet_root}..."
161
- install_script="$(mktemp)"
162
- curl -fsSL https://dot.net/v1/dotnet-install.sh -o "${install_script}"
163
- bash "${install_script}" --version "${dotnet_version}" --install-dir "${dotnet_root}"
164
- rm -f "${install_script}"
165
- fi
166
-
167
- export DOTNET_ROOT="${dotnet_root}"
168
- export PATH="${dotnet_root}:${PATH}"
169
-
170
- append_if_missing "${HOME}/.bashrc" "export DOTNET_ROOT=\"${dotnet_root}\""
171
- append_if_missing "${HOME}/.bashrc" "export PATH=\"${dotnet_root}:\$PATH\""
185
+ local dotnet_root="${REPO_ROOT}/.dotnet-sdk"
186
+ local dotnet_version=""
187
+ local install_script=""
188
+
189
+ dotnet_version="$(read_global_json_sdk_version || true)"
190
+ if [ -z "${dotnet_version}" ]; then
191
+ warn "Could not read the SDK version from global.json; skipping repo-local .NET SDK installation."
192
+ return
193
+ fi
194
+
195
+ if [ -x "${dotnet_root}/dotnet" ] && [ -d "${dotnet_root}/sdk/${dotnet_version}" ]; then
196
+ log "Repo-local .NET SDK ${dotnet_version} is already available at ${dotnet_root}."
197
+ else
198
+ log "Installing repo-local .NET SDK ${dotnet_version} into ${dotnet_root}..."
199
+ install_script="$(mktemp)"
200
+ curl -fsSL https://dot.net/v1/dotnet-install.sh -o "${install_script}"
201
+ bash "${install_script}" --version "${dotnet_version}" --install-dir "${dotnet_root}"
202
+ rm -f "${install_script}"
203
+ fi
204
+
205
+ export DOTNET_ROOT="${dotnet_root}"
206
+ export PATH="${dotnet_root}:${PATH}"
207
+
208
+ append_if_missing "${HOME}/.bashrc" "export DOTNET_ROOT=\"${dotnet_root}\""
209
+ append_if_missing "${HOME}/.bashrc" "export PATH=\"${dotnet_root}:\$PATH\""
172
210
  }
173
211
 
174
212
  install_dotnet_tools() {
175
- if ! command -v dotnet >/dev/null 2>&1; then
176
- fail "dotnet is unavailable; cannot restore the required dotnet tool manifest."
177
- fi
178
-
179
- if [ ! -f "${REPO_ROOT}/dotnet-tools.json" ]; then
180
- fail "Required dotnet tool manifest not found at ${REPO_ROOT}/dotnet-tools.json."
181
- fi
182
-
183
- log "Restoring repo-local dotnet tools from dotnet-tools.json..."
184
- (
185
- cd "${REPO_ROOT}"
186
- dotnet tool restore --tool-manifest "${REPO_ROOT}/dotnet-tools.json"
187
- )
213
+ if ! command -v dotnet >/dev/null 2>&1; then
214
+ fail "dotnet is unavailable; cannot restore the required dotnet tool manifest."
215
+ fi
216
+
217
+ if [ ! -f "${REPO_ROOT}/dotnet-tools.json" ]; then
218
+ fail "Required dotnet tool manifest not found at ${REPO_ROOT}/dotnet-tools.json."
219
+ fi
220
+
221
+ log "Restoring repo-local dotnet tools from dotnet-tools.json..."
222
+ (
223
+ cd "${REPO_ROOT}"
224
+ dotnet tool restore --tool-manifest "${REPO_ROOT}/dotnet-tools.json"
225
+ )
188
226
  }
189
227
 
190
228
  install_dotnet_coverage() {
191
- if ! command -v dotnet >/dev/null 2>&1; then
192
- fail "dotnet is unavailable; cannot install dotnet-coverage."
193
- fi
194
-
195
- local dotnet_tools_dir="${HOME}/.dotnet/tools"
196
- mkdir -p "${dotnet_tools_dir}"
197
-
198
- export PATH="${dotnet_tools_dir}:${PATH}"
199
- append_if_missing "${HOME}/.bashrc" "export PATH=\"\$HOME/.dotnet/tools:\$PATH\""
200
-
201
- if command -v dotnet-coverage >/dev/null 2>&1; then
202
- log "dotnet-coverage is already available; skipping."
203
- return
204
- fi
205
-
206
- log "Installing dotnet-coverage as a global dotnet tool..."
207
- if dotnet tool list --global | grep -Eq '^dotnet-coverage\s'; then
208
- dotnet tool update --global dotnet-coverage
209
- else
210
- dotnet tool install --global dotnet-coverage
211
- fi
229
+ if ! command -v dotnet >/dev/null 2>&1; then
230
+ fail "dotnet is unavailable; cannot install dotnet-coverage."
231
+ fi
232
+
233
+ local dotnet_tools_dir="${HOME}/.dotnet/tools"
234
+ mkdir -p "${dotnet_tools_dir}"
235
+
236
+ export PATH="${dotnet_tools_dir}:${PATH}"
237
+ append_if_missing "${HOME}/.bashrc" "export PATH=\"\$HOME/.dotnet/tools:\$PATH\""
238
+
239
+ if command -v dotnet-coverage >/dev/null 2>&1; then
240
+ log "dotnet-coverage is already available; skipping."
241
+ return
242
+ fi
243
+
244
+ log "Installing dotnet-coverage as a global dotnet tool..."
245
+ if dotnet tool list --global | grep -Eq '^dotnet-coverage\s'; then
246
+ dotnet tool update --global dotnet-coverage
247
+ else
248
+ dotnet tool install --global dotnet-coverage
249
+ fi
212
250
  }
213
251
 
214
252
  install_actionlint() {
215
- if command -v actionlint >/dev/null 2>&1; then
216
- log "actionlint is already available; skipping."
217
- return
218
- fi
219
-
220
- if ! command -v tar >/dev/null 2>&1; then
221
- warn "tar is unavailable; skipping actionlint installation."
222
- return
223
- fi
224
-
225
- local actionlint_version="1.7.7"
226
- local temp_dir=""
227
- local runner=""
228
-
229
- if [ "$(id -u)" -ne 0 ]; then
230
- if command -v sudo >/dev/null 2>&1; then
231
- runner="sudo"
232
- else
233
- warn "actionlint installation requires root or sudo; skipping."
234
- return
235
- fi
236
- fi
237
-
238
- temp_dir="$(mktemp -d)"
239
- log "Installing actionlint v${actionlint_version}..."
240
- if curl -fsSL "https://github.com/rhysd/actionlint/releases/download/v${actionlint_version}/actionlint_${actionlint_version}_linux_amd64.tar.gz" -o "${temp_dir}/actionlint.tar.gz"; then
241
- tar -xzf "${temp_dir}/actionlint.tar.gz" -C "${temp_dir}" actionlint
242
- ${runner} install -m 0755 "${temp_dir}/actionlint" /usr/local/bin/actionlint
243
- log "actionlint installed at /usr/local/bin/actionlint."
244
- else
245
- warn "Could not download actionlint; skipping."
246
- fi
247
-
248
- rm -rf "${temp_dir}"
253
+ if command -v actionlint >/dev/null 2>&1; then
254
+ log "actionlint is already available; skipping."
255
+ return
256
+ fi
257
+
258
+ if ! command -v tar >/dev/null 2>&1; then
259
+ warn "tar is unavailable; skipping actionlint installation."
260
+ return
261
+ fi
262
+
263
+ local actionlint_version="1.7.7"
264
+ local temp_dir=""
265
+ local runner=""
266
+
267
+ if [ "$(id -u)" -ne 0 ]; then
268
+ if command -v sudo >/dev/null 2>&1; then
269
+ runner="sudo"
270
+ else
271
+ warn "actionlint installation requires root or sudo; skipping."
272
+ return
273
+ fi
274
+ fi
275
+
276
+ temp_dir="$(mktemp -d)"
277
+ log "Installing actionlint v${actionlint_version}..."
278
+ if curl -fsSL "https://github.com/rhysd/actionlint/releases/download/v${actionlint_version}/actionlint_${actionlint_version}_linux_amd64.tar.gz" -o "${temp_dir}/actionlint.tar.gz"; then
279
+ tar -xzf "${temp_dir}/actionlint.tar.gz" -C "${temp_dir}" actionlint
280
+ ${runner} install -m 0755 "${temp_dir}/actionlint" /usr/local/bin/actionlint
281
+ log "actionlint installed at /usr/local/bin/actionlint."
282
+ else
283
+ warn "Could not download actionlint; skipping."
284
+ fi
285
+
286
+ rm -rf "${temp_dir}"
249
287
  }
250
288
 
251
289
  restore_packages_if_needed() {
252
- cd "${REPO_ROOT}"
290
+ cd "${REPO_ROOT}"
291
+
292
+ if [ -d "${REPO_ROOT}/packages" ] && [ -n "$(find "${REPO_ROOT}/packages" -mindepth 1 -maxdepth 1 -print -quit)" ]; then
293
+ log "packages/ is already populated; skipping restore."
294
+ return
295
+ fi
253
296
 
254
- if [ -d "${REPO_ROOT}/packages" ] && [ -n "$(find "${REPO_ROOT}/packages" -mindepth 1 -maxdepth 1 -print -quit)" ]; then
255
- log "packages/ is already populated; skipping restore."
256
- return
257
- fi
297
+ if ! command -v nuget >/dev/null 2>&1; then
298
+ warn "nuget is unavailable; cannot restore packages.config dependencies."
299
+ return
300
+ fi
258
301
 
259
- if ! command -v nuget >/dev/null 2>&1; then
260
- warn "nuget is unavailable; cannot restore packages.config dependencies."
261
- return
262
- fi
302
+ if [ -z "${SOLUTION_FILE}" ]; then
303
+ warn "No solution file was found at ${REPO_ROOT}; skipping package restore."
304
+ return
305
+ fi
263
306
 
264
- log "Restoring solution packages into packages/..."
265
- nuget restore "${REPO_ROOT}/TaskMaster.sln" -PackagesDirectory "${REPO_ROOT}/packages"
307
+ log "Restoring solution packages into packages/..."
308
+ nuget restore "${REPO_ROOT}/${SOLUTION_FILE}" -PackagesDirectory "${REPO_ROOT}/packages"
266
309
  }
267
310
 
268
311
  verify_formatting_capability() {
269
- log "Verifying formatting capability..."
312
+ log "Verifying formatting capability..."
270
313
 
271
- command -v dotnet >/dev/null 2>&1 || fail "dotnet is not available after setup."
272
- command -v pwsh >/dev/null 2>&1 || fail "pwsh is not available after setup."
314
+ command -v dotnet >/dev/null 2>&1 || fail "dotnet is not available after setup."
315
+ command -v pwsh >/dev/null 2>&1 || fail "pwsh is not available after setup."
273
316
 
274
- (
275
- cd "${REPO_ROOT}"
276
- dotnet tool run csharpier --version >/dev/null
277
- ) || fail "CSharpier is not runnable via 'dotnet tool run csharpier'."
317
+ (
318
+ cd "${REPO_ROOT}"
319
+ dotnet tool run csharpier --version >/dev/null
320
+ ) || fail "CSharpier is not runnable via 'dotnet tool run csharpier'."
278
321
  }
279
322
 
280
323
  is_windows_powershell_host() {
281
- pwsh -NoProfile -ExecutionPolicy Bypass -Command "& { if (\$IsWindows) { exit 0 } ; exit 1 }" >/dev/null 2>&1
324
+ pwsh -NoProfile -ExecutionPolicy Bypass -Command "& { if (\$IsWindows) { exit 0 } ; exit 1 }" >/dev/null 2>&1
282
325
  }
283
326
 
284
327
  verify_windows_visual_studio_task_capability() {
285
- pwsh -NoProfile -ExecutionPolicy Bypass -File "${REPO_ROOT}/scripts/vscode/Invoke-VSBuild.ps1" -SolutionPath TaskMaster.sln -Configuration Debug -Platform 'Any CPU' -NoExecute >/dev/null || fail "MSBuild tooling required by the restore/build/lint/type-check tasks is unavailable."
328
+ [ -n "${SOLUTION_FILE}" ] || fail "No solution file was found at ${REPO_ROOT}; MSBuild task verification needs one."
329
+ pwsh -NoProfile -ExecutionPolicy Bypass -File "${REPO_ROOT}/scripts/vscode/Invoke-VSBuild.ps1" -SolutionPath "${SOLUTION_FILE}" -Configuration Debug -Platform 'Any CPU' -NoExecute >/dev/null || fail "MSBuild tooling required by the restore/build/lint/type-check tasks is unavailable."
286
330
 
287
- pwsh -NoProfile -ExecutionPolicy Bypass -Command "& {
331
+ pwsh -NoProfile -ExecutionPolicy Bypass -Command "& {
288
332
  \$vswherePath = Join-Path \${env:ProgramFiles(x86)} 'Microsoft Visual Studio\Installer\vswhere.exe'
289
333
  if (-not (Test-Path \$vswherePath)) {
290
334
  throw 'vswhere.exe was not found. Install Visual Studio 2022 (or Build Tools) with Test Platform components.'
@@ -298,27 +342,27 @@ verify_windows_visual_studio_task_capability() {
298
342
  }
299
343
 
300
344
  verify_build_and_test_capability() {
301
- log "Verifying restore/build/lint/type-check/test capability..."
345
+ log "Verifying restore/build/lint/type-check/test capability..."
302
346
 
303
- command -v pwsh >/dev/null 2>&1 || fail "pwsh is not available after setup."
304
- command -v dotnet-coverage >/dev/null 2>&1 || fail "dotnet-coverage is not available after setup."
305
- [ -f "${REPO_ROOT}/coverage.config" ] || fail "coverage.config is missing from the repository root."
347
+ command -v pwsh >/dev/null 2>&1 || fail "pwsh is not available after setup."
348
+ command -v dotnet-coverage >/dev/null 2>&1 || fail "dotnet-coverage is not available after setup."
349
+ [ -f "${REPO_ROOT}/coverage.config" ] || fail "coverage.config is missing from the repository root."
306
350
 
307
- if ! is_windows_powershell_host; then
308
- warn "Skipping Windows-only Visual Studio task verification because this host is not Windows. Restore/build/test parity still requires Windows plus Visual Studio tooling discoverable via vswhere.exe."
309
- return
310
- fi
351
+ if ! is_windows_powershell_host; then
352
+ warn "Skipping Windows-only Visual Studio task verification because this host is not Windows. Restore/build/test parity still requires Windows plus Visual Studio tooling discoverable via vswhere.exe."
353
+ return
354
+ fi
311
355
 
312
- verify_windows_visual_studio_task_capability
356
+ verify_windows_visual_studio_task_capability
313
357
  }
314
358
 
315
359
  verify_required_task_tooling() {
316
- verify_formatting_capability
317
- verify_build_and_test_capability
360
+ verify_formatting_capability
361
+ verify_build_and_test_capability
318
362
  }
319
363
 
320
364
  write_repo_notes() {
321
- cat <<'EOF'
365
+ cat <<'EOF'
322
366
 
323
367
  Workspace profile detected:
324
368
  - Legacy Visual Studio solution targeting .NET Framework 4.8.1
@@ -337,9 +381,9 @@ Useful follow-up commands after a successful setup run:
337
381
  - source ~/.bashrc
338
382
  - dotnet --info
339
383
  - dotnet tool run csharpier format .
340
- - pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/vscode/Invoke-Restore.ps1 -SolutionPath TaskMaster.sln -Configuration Debug -Platform "Any CPU"
341
- - pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/vscode/Invoke-VSBuild.ps1 -SolutionPath TaskMaster.sln -Configuration Debug -Platform "Any CPU" -EnableNETAnalyzers -EnforceCodeStyleInBuild
342
- - pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/vscode/Invoke-VSBuild.ps1 -SolutionPath TaskMaster.sln -Configuration Debug -Platform "Any CPU" -EnableNullable -TreatWarningsAsErrors
384
+ - pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/vscode/Invoke-Restore.ps1 -SolutionPath <solution>.sln -Configuration Debug -Platform "Any CPU"
385
+ - pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/vscode/Invoke-VSBuild.ps1 -SolutionPath <solution>.sln -Configuration Debug -Platform "Any CPU" -EnableNETAnalyzers -EnforceCodeStyleInBuild
386
+ - pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/vscode/Invoke-VSBuild.ps1 -SolutionPath <solution>.sln -Configuration Debug -Platform "Any CPU" -EnableNullable -TreatWarningsAsErrors
343
387
  - pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/vscode/Invoke-MSTest.ps1 -SearchRoot . -Configuration Debug
344
388
  - pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/vscode/Invoke-MSTestWithCoverage.ps1 -SearchRoot . -Configuration Debug
345
389
 
@@ -349,36 +393,37 @@ EOF
349
393
  }
350
394
 
351
395
  main() {
352
- log "Bootstrapping a Codex Web environment for ${REPO_ROOT}"
353
-
354
- export CI=true
355
- export DOTNET_CLI_TELEMETRY_OPTOUT=1
356
- export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
357
- export DOTNET_MULTILEVEL_LOOKUP=0
358
- export NUGET_XMLDOC_MODE=skip
359
-
360
- append_if_missing "${HOME}/.bashrc" 'export CI=true'
361
- append_if_missing "${HOME}/.bashrc" 'export DOTNET_CLI_TELEMETRY_OPTOUT=1'
362
- append_if_missing "${HOME}/.bashrc" 'export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1'
363
- append_if_missing "${HOME}/.bashrc" 'export DOTNET_MULTILEVEL_LOOKUP=0'
364
- append_if_missing "${HOME}/.bashrc" 'export NUGET_XMLDOC_MODE=skip'
365
-
366
- install_apt_packages
367
- install_powershell
368
- install_nuget
369
- install_dotnet_sdk
370
- install_dotnet_tools
371
- install_dotnet_coverage
372
- verify_required_task_tooling
373
- install_actionlint
374
- restore_packages_if_needed
375
-
376
- if command -v git >/dev/null 2>&1; then
377
- git config --global core.autocrlf input || true
378
- fi
379
-
380
- write_repo_notes
381
- log "Setup complete."
396
+ log "Bootstrapping a Codex Web environment for ${REPO_ROOT}"
397
+ log_solution_selection "$(list_root_solution_files "${REPO_ROOT}")" "${SOLUTION_FILE}"
398
+
399
+ export CI=true
400
+ export DOTNET_CLI_TELEMETRY_OPTOUT=1
401
+ export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
402
+ export DOTNET_MULTILEVEL_LOOKUP=0
403
+ export NUGET_XMLDOC_MODE=skip
404
+
405
+ append_if_missing "${HOME}/.bashrc" 'export CI=true'
406
+ append_if_missing "${HOME}/.bashrc" 'export DOTNET_CLI_TELEMETRY_OPTOUT=1'
407
+ append_if_missing "${HOME}/.bashrc" 'export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1'
408
+ append_if_missing "${HOME}/.bashrc" 'export DOTNET_MULTILEVEL_LOOKUP=0'
409
+ append_if_missing "${HOME}/.bashrc" 'export NUGET_XMLDOC_MODE=skip'
410
+
411
+ install_apt_packages
412
+ install_powershell
413
+ install_nuget
414
+ install_dotnet_sdk
415
+ install_dotnet_tools
416
+ install_dotnet_coverage
417
+ verify_required_task_tooling
418
+ install_actionlint
419
+ restore_packages_if_needed
420
+
421
+ if command -v git >/dev/null 2>&1; then
422
+ git config --global core.autocrlf input || true
423
+ fi
424
+
425
+ write_repo_notes
426
+ log "Setup complete."
382
427
  }
383
428
 
384
- main "$@"
429
+ if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then main "$@"; fi