@danmoisan/drm-copilot-mcp 1.1.21 → 1.1.22
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/package.json +1 -1
- package/resources/claude-customizations/.claude/hooks/enforce-completion-consistency.ps1 +4 -3
- package/resources/claude-customizations/.claude/hooks/enforce-discovery-artifact-gate.ps1 +2 -1
- package/resources/claude-customizations/.claude/hooks/enforce-powershell-batch-budget.ps1 +2 -1
- package/resources/claude-customizations/.claude/hooks/enforce-python-batch-budget.ps1 +2 -1
- package/resources/claude-customizations/.claude/skills/execution-environment/SKILL.md +1 -0
- package/resources/claude-customizations/pack-manifests/core.json +7 -0
- package/resources/codex-and-agents-customizations/.agents/skills/execution-environment/SKILL.md +1 -0
- package/resources/codex-and-agents-customizations/.codex/config.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-powershell-batch-budget.ps1 +2 -1
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-python-batch-budget.ps1 +2 -1
- package/resources/codex-and-agents-customizations/pack-manifests/core.json +1 -0
- package/resources/customizations/.github/skills/execution-environment/SKILL.md +1 -0
package/package.json
CHANGED
|
@@ -50,9 +50,9 @@ $script:HookDependencyGuardLoadFailed = $false; try { . (Join-Path $PSScriptRoot
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
try { Import-Module (Join-Path $PSScriptRoot '../lib/hook-payload/HookPayload.psm1') -Force -ErrorAction Stop } catch { Add-HookDependencyFailure -Name 'HookPayload.psm1' -ErrorRecord $_ }
|
|
53
|
-
# Dot-source the shared validation helpers.
|
|
54
|
-
#
|
|
55
|
-
try { . (Join-Path $PSScriptRoot 'enforce-completion-helpers.ps1') } catch {
|
|
53
|
+
# Dot-source the shared validation helpers (handler H9, issue #984). A failed load is recorded in
|
|
54
|
+
# $script:CompletionHelpersImportFailure and denies only checkpoint writes; other paths are allowed.
|
|
55
|
+
$script:CompletionHelpersImportFailure = $null; try { . (Join-Path $PSScriptRoot 'enforce-completion-helpers.ps1') } catch { $script:CompletionHelpersImportFailure = 'enforce-completion-helpers.ps1' }
|
|
56
56
|
|
|
57
57
|
function ConvertFrom-CheckpointJson {
|
|
58
58
|
<#
|
|
@@ -402,6 +402,7 @@ function Invoke-CompletionConsistencyDecision {
|
|
|
402
402
|
if (-not (Test-IsCheckpointPath -NormalizedPath $normalized)) {
|
|
403
403
|
return [ordered]@{ hookSpecificOutput = [ordered]@{ hookEventName = 'PreToolUse'; permissionDecision = 'allow' } }
|
|
404
404
|
}
|
|
405
|
+
if ($script:CompletionHelpersImportFailure) { return ConvertTo-CompletionDenyDecision -Reason "COMPLETION_CONSISTENCY_BLOCKED: the shared helpers '$($script:CompletionHelpersImportFailure)' failed to load, so the canonical checkpoint cannot be validated; the gate fails closed." }
|
|
405
406
|
|
|
406
407
|
# Write tool: a present content property is validated directly, and empty
|
|
407
408
|
# content is denied. Edit tool: no content property is supplied, so read the
|
|
@@ -36,7 +36,7 @@ $script:HookDependencyGuardLoadFailed = $false; try { . (Join-Path $PSScriptRoot
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
try { Import-Module (Join-Path $PSScriptRoot '../lib/hook-payload/HookPayload.psm1') -Force -ErrorAction Stop } catch { Add-HookDependencyFailure -Name 'HookPayload.psm1' -ErrorRecord $_ }
|
|
39
|
-
try { Import-Module (Join-Path $PSScriptRoot '../lib/discovery-validation/DiscoveryValidation.psm1') -Force -Global -ErrorAction Stop } catch {
|
|
39
|
+
$script:DiscoveryValidationImportFailure = $null; try { Import-Module (Join-Path $PSScriptRoot '../lib/discovery-validation/DiscoveryValidation.psm1') -Force -Global -ErrorAction Stop } catch { $script:DiscoveryValidationImportFailure = 'DiscoveryValidation.psm1' }
|
|
40
40
|
function Invoke-DiscoveryValidatorExe {
|
|
41
41
|
<#
|
|
42
42
|
.SYNOPSIS
|
|
@@ -201,6 +201,7 @@ function Invoke-DiscoveryArtifactGateDecision {
|
|
|
201
201
|
if (-not $artifactType) {
|
|
202
202
|
return [ordered]@{ hookSpecificOutput = [ordered]@{ hookEventName = 'PreToolUse'; permissionDecision = 'allow' } }
|
|
203
203
|
}
|
|
204
|
+
if ($script:DiscoveryValidationImportFailure) { return [ordered]@{ hookSpecificOutput = [ordered]@{ hookEventName = 'PreToolUse'; permissionDecision = 'deny'; permissionDecisionReason = "DISCOVERY_ARTIFACT_GATE_BLOCKED: the validation module '$($script:DiscoveryValidationImportFailure)' failed to load, so the $artifactType artifact cannot be validated; the gate fails closed." } } }
|
|
204
205
|
|
|
205
206
|
$requiredDeclaration = & $RequiredArtifactReader
|
|
206
207
|
if (-not $requiredDeclaration.Present) {
|
|
@@ -61,7 +61,7 @@ $script:HookDependencyGuardLoadFailed = $false; try { . (Join-Path $PSScriptRoot
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
try { Import-Module (Join-Path $PSScriptRoot '../lib/hook-payload/HookPayload.psm1') -Force -ErrorAction Stop } catch { Add-HookDependencyFailure -Name 'HookPayload.psm1' -ErrorRecord $_ }
|
|
64
|
-
try { . (Join-Path $PSScriptRoot 'enforce-batch-budget-route.ps1') } catch {
|
|
64
|
+
$script:PowerShellBatchBudgetRouteImportFailure = $null; try { . (Join-Path $PSScriptRoot 'enforce-batch-budget-route.ps1') } catch { $script:PowerShellBatchBudgetRouteImportFailure = 'enforce-batch-budget-route.ps1' }
|
|
65
65
|
|
|
66
66
|
function Test-PowerShellBatchBudgetPathInRoot {
|
|
67
67
|
<#
|
|
@@ -371,6 +371,7 @@ function Invoke-PowerShellBatchBudgetHook {
|
|
|
371
371
|
if ($normalized -notmatch '\.(ps1|psm1|psd1)$') {
|
|
372
372
|
return [ordered]@{ hookSpecificOutput = [ordered]@{ hookEventName = 'PreToolUse'; permissionDecision = 'allow' } }
|
|
373
373
|
}
|
|
374
|
+
if ($script:PowerShellBatchBudgetRouteImportFailure) { return Get-PowerShellBatchBudgetBlockDecision -Reason "POWERSHELL_LARGE_PATH_REQUIRED: the route helper '$($script:PowerShellBatchBudgetRouteImportFailure)' failed to load, so the batch budget for '$normalized' cannot be evaluated; the gate fails closed." }
|
|
374
375
|
|
|
375
376
|
$stateDir = Join-Path -Path $Root -ChildPath '.claude/state'
|
|
376
377
|
|
|
@@ -61,7 +61,7 @@ $script:HookDependencyGuardLoadFailed = $false; try { . (Join-Path $PSScriptRoot
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
try { Import-Module (Join-Path $PSScriptRoot '../lib/hook-payload/HookPayload.psm1') -Force -ErrorAction Stop } catch { Add-HookDependencyFailure -Name 'HookPayload.psm1' -ErrorRecord $_ }
|
|
64
|
-
try { . (Join-Path $PSScriptRoot 'enforce-batch-budget-route.ps1') } catch {
|
|
64
|
+
$script:PythonBatchBudgetRouteImportFailure = $null; try { . (Join-Path $PSScriptRoot 'enforce-batch-budget-route.ps1') } catch { $script:PythonBatchBudgetRouteImportFailure = 'enforce-batch-budget-route.ps1' }
|
|
65
65
|
|
|
66
66
|
function Test-PythonBatchBudgetPathInRoot {
|
|
67
67
|
<#
|
|
@@ -374,6 +374,7 @@ function Invoke-PythonBatchBudgetHook {
|
|
|
374
374
|
if ($normalized -notmatch '\.py$') {
|
|
375
375
|
return [ordered]@{ hookSpecificOutput = [ordered]@{ hookEventName = 'PreToolUse'; permissionDecision = 'allow' } }
|
|
376
376
|
}
|
|
377
|
+
if ($script:PythonBatchBudgetRouteImportFailure) { return Get-PythonBatchBudgetBlockDecision -Reason "PYTHON_LARGE_PATH_REQUIRED: the route helper '$($script:PythonBatchBudgetRouteImportFailure)' failed to load, so the batch budget for '$normalized' cannot be evaluated; the gate fails closed." }
|
|
377
378
|
|
|
378
379
|
$stateDir = Join-Path -Path $Root -ChildPath '.claude/state'
|
|
379
380
|
|
|
@@ -83,6 +83,7 @@ Run these after editing any mirrored or bundled file; each is under `tests/scrip
|
|
|
83
83
|
|
|
84
84
|
- `test_push_down_claude_resource_contracts.py` and `test_push_down_codex_and_agents_resource_contracts.py`: every distributable `.claude`, `.agents`, and `.codex` file exists in the bundle with equal text.
|
|
85
85
|
- `test_push_down_claude_pack_manifest_completeness.py` and `test_push_down_codex_and_agents_pack_manifest_completeness.py`: every bundled file is listed in a pack manifest.
|
|
86
|
+
- `test_push_down_pack_manifest_dependency_closure.py`: every `$PSScriptRoot` dependency of a manifested PowerShell file, and every hook script named by `.claude/settings.json`, manifested agent frontmatter, or `.codex/config.toml`, is in core plus the owning pack.
|
|
86
87
|
- The Codex generator check: `scripts/dev_tools/generate_codex_agent_variants.py` run in module form with `--check` (base agents are hand-edited; variants, bundle copies, and the Codex `core.json` are generated).
|
|
87
88
|
- `test_codex_agent_wrapper_contracts.py` and `test_codex_handoff_contract_parity.py`: pinned Codex agent fragments and handoff parity.
|
|
88
89
|
- `test_claude_rules_frontmatter.py`: rule `paths:` scopes and that every preloaded skill exists.
|
|
@@ -16,15 +16,19 @@
|
|
|
16
16
|
".claude/agents/orchestrator.md",
|
|
17
17
|
".claude/agents/parallel-orchestrator.md",
|
|
18
18
|
".claude/agents/parallel-planner.md",
|
|
19
|
+
".claude/agents/pr-author.md",
|
|
19
20
|
".claude/agents/prd-feature.md",
|
|
20
21
|
".claude/agents/requirements-reconciler.md",
|
|
21
22
|
".claude/agents/runtime-characterization-analyst.md",
|
|
22
23
|
".claude/agents/staged-review.md",
|
|
23
24
|
".claude/agents/status-updater.md",
|
|
24
25
|
".claude/agents/task-researcher.md",
|
|
26
|
+
".claude/hooks/check-powershell-test-purity.ps1",
|
|
27
|
+
".claude/hooks/check-python-test-purity.ps1",
|
|
25
28
|
".claude/hooks/enforce-batch-budget-route.ps1",
|
|
26
29
|
".claude/hooks/enforce-checkpoint-monotonic.ps1",
|
|
27
30
|
".claude/hooks/enforce-completion-consistency.ps1",
|
|
31
|
+
".claude/hooks/enforce-completion-helpers.ps1",
|
|
28
32
|
".claude/hooks/enforce-discovery-artifact-gate.ps1",
|
|
29
33
|
".claude/hooks/enforce-epic-invocation-origin.ps1",
|
|
30
34
|
".claude/hooks/enforce-epic-merge-gate.ps1",
|
|
@@ -48,6 +52,7 @@
|
|
|
48
52
|
".claude/hooks/enforce-parallel-drift-gate.ps1",
|
|
49
53
|
".claude/hooks/enforce-parallel-drift-gate-helpers.ps1",
|
|
50
54
|
".claude/hooks/enforce-parallel-worktree-removal-gate.ps1",
|
|
55
|
+
".claude/hooks/enforce-powershell-batch-budget.ps1",
|
|
51
56
|
".claude/hooks/enforce-pr-author-command-allowlist.ps1",
|
|
52
57
|
".claude/hooks/enforce-pr-author-skill.artifact-root.ps1",
|
|
53
58
|
".claude/hooks/enforce-pr-author-skill.docs-only.ps1",
|
|
@@ -57,6 +62,7 @@
|
|
|
57
62
|
".claude/hooks/enforce-prd-feature-before-planner-helpers.ps1",
|
|
58
63
|
".claude/hooks/enforce-prd-feature-before-planner.ps1",
|
|
59
64
|
".claude/hooks/enforce-promotion-mcp-only.ps1",
|
|
65
|
+
".claude/hooks/enforce-python-batch-budget.ps1",
|
|
60
66
|
".claude/hooks/feature-folder-resolution.ps1",
|
|
61
67
|
".claude/hooks/feature-review-coverage-thresholds.ps1",
|
|
62
68
|
".claude/hooks/hook-command-heredoc.ps1",
|
|
@@ -80,6 +86,7 @@
|
|
|
80
86
|
".claude/hooks/validate-orchestrator-output-routing.ps1",
|
|
81
87
|
".claude/hooks/validate-orchestrator-output.ps1",
|
|
82
88
|
".claude/hooks/validate-planner-output.ps1",
|
|
89
|
+
".claude/hooks/validate-pr-author-output.ps1",
|
|
83
90
|
".claude/hooks/validate-prd-feature-output.ps1",
|
|
84
91
|
".claude/hooks/validate-required-artifact-output.ps1",
|
|
85
92
|
".claude/hooks/validate-task-researcher-output.ps1",
|
package/resources/codex-and-agents-customizations/.agents/skills/execution-environment/SKILL.md
CHANGED
|
@@ -83,6 +83,7 @@ Run these after editing any mirrored or bundled file; each is under `tests/scrip
|
|
|
83
83
|
|
|
84
84
|
- `test_push_down_claude_resource_contracts.py` and `test_push_down_codex_and_agents_resource_contracts.py`: every distributable `.claude`, `.agents`, and `.codex` file exists in the bundle with equal text.
|
|
85
85
|
- `test_push_down_claude_pack_manifest_completeness.py` and `test_push_down_codex_and_agents_pack_manifest_completeness.py`: every bundled file is listed in a pack manifest.
|
|
86
|
+
- `test_push_down_pack_manifest_dependency_closure.py`: every `$PSScriptRoot` dependency of a manifested PowerShell file, and every hook script named by `.claude/settings.json`, manifested agent frontmatter, or `.codex/config.toml`, is in core plus the owning pack.
|
|
86
87
|
- The Codex generator check: `scripts/dev_tools/generate_codex_agent_variants.py` run in module form with `--check` (base agents are hand-edited; variants, bundle copies, and the Codex `core.json` are generated).
|
|
87
88
|
- `test_codex_agent_wrapper_contracts.py` and `test_codex_handoff_contract_parity.py`: pinned Codex agent fragments and handoff parity.
|
|
88
89
|
- `test_claude_rules_frontmatter.py`: rule `paths:` scopes and that every preloaded skill exists.
|
package/resources/codex-and-agents-customizations/.codex/hooks/enforce-powershell-batch-budget.ps1
CHANGED
|
@@ -52,7 +52,7 @@ $script:HookDependencyGuardLoadFailed = $false; try { . (Join-Path $PSScriptRoot
|
|
|
52
52
|
try { . (Join-Path $PSScriptRoot 'codex-pretooluse-file-mapping.ps1') } catch { Add-HookDependencyFailure -Name 'codex-pretooluse-file-mapping.ps1' -ErrorRecord $_ }
|
|
53
53
|
|
|
54
54
|
# Shared route helpers; this file is byte-identical to the Claude runtime copy.
|
|
55
|
-
try { . (Join-Path $PSScriptRoot 'enforce-batch-budget-route.ps1') } catch {
|
|
55
|
+
$script:PowerShellBatchBudgetRouteImportFailure = $null; try { . (Join-Path $PSScriptRoot 'enforce-batch-budget-route.ps1') } catch { $script:PowerShellBatchBudgetRouteImportFailure = 'enforce-batch-budget-route.ps1' }
|
|
56
56
|
|
|
57
57
|
function Get-PowerShellBatchBudgetState {
|
|
58
58
|
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', 'TestCap', Justification = 'Accepted and ignored for callers written against the removed test-file cap.')]
|
|
@@ -216,6 +216,7 @@ function Invoke-PowerShellBatchBudgetHook {
|
|
|
216
216
|
if ($normalized -notmatch '\.(ps1|psm1|psd1)$') {
|
|
217
217
|
return [ordered]@{ hookSpecificOutput = [ordered]@{ hookEventName = 'PreToolUse'; permissionDecision = 'allow' } }
|
|
218
218
|
}
|
|
219
|
+
if ($script:PowerShellBatchBudgetRouteImportFailure) { return Get-PowerShellBatchBudgetBlockDecision -Reason "POWERSHELL_LARGE_PATH_REQUIRED: the route helper '$($script:PowerShellBatchBudgetRouteImportFailure)' failed to load, so the batch budget for '$normalized' cannot be evaluated; the gate fails closed." }
|
|
219
220
|
|
|
220
221
|
$stateDir = Join-Path -Path $Root -ChildPath '.codex/state'
|
|
221
222
|
$stateFile = Join-Path -Path $stateDir -ChildPath ("powershell-batch-budget.$SessionId.json")
|
package/resources/codex-and-agents-customizations/.codex/hooks/enforce-python-batch-budget.ps1
CHANGED
|
@@ -52,7 +52,7 @@ $script:HookDependencyGuardLoadFailed = $false; try { . (Join-Path $PSScriptRoot
|
|
|
52
52
|
try { . (Join-Path $PSScriptRoot 'codex-pretooluse-file-mapping.ps1') } catch { Add-HookDependencyFailure -Name 'codex-pretooluse-file-mapping.ps1' -ErrorRecord $_ }
|
|
53
53
|
|
|
54
54
|
# Shared route helpers; this file is byte-identical to the Claude runtime copy.
|
|
55
|
-
try { . (Join-Path $PSScriptRoot 'enforce-batch-budget-route.ps1') } catch {
|
|
55
|
+
$script:PythonBatchBudgetRouteImportFailure = $null; try { . (Join-Path $PSScriptRoot 'enforce-batch-budget-route.ps1') } catch { $script:PythonBatchBudgetRouteImportFailure = 'enforce-batch-budget-route.ps1' }
|
|
56
56
|
|
|
57
57
|
function Get-PythonBatchBudgetState {
|
|
58
58
|
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', 'TestCap', Justification = 'Accepted and ignored for callers written against the removed test-file cap.')]
|
|
@@ -219,6 +219,7 @@ function Invoke-PythonBatchBudgetHook {
|
|
|
219
219
|
if ($normalized -notmatch '\.py$') {
|
|
220
220
|
return [ordered]@{ hookSpecificOutput = [ordered]@{ hookEventName = 'PreToolUse'; permissionDecision = 'allow' } }
|
|
221
221
|
}
|
|
222
|
+
if ($script:PythonBatchBudgetRouteImportFailure) { return Get-PythonBatchBudgetBlockDecision -Reason "PYTHON_LARGE_PATH_REQUIRED: the route helper '$($script:PythonBatchBudgetRouteImportFailure)' failed to load, so the batch budget for '$normalized' cannot be evaluated; the gate fails closed." }
|
|
222
223
|
|
|
223
224
|
$stateDir = Join-Path -Path $Root -ChildPath '.codex/state'
|
|
224
225
|
$stateFile = Join-Path -Path $stateDir -ChildPath ("python-batch-budget.$SessionId.json")
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
".codex/scripts/codex-routing-cli-common.ps1",
|
|
80
80
|
".codex/scripts/Resolve-CodexDeployment.ps1",
|
|
81
81
|
".codex/scripts/Resolve-CodexTopology.ps1",
|
|
82
|
+
".codex/scripts/post-codex-worktree-session.ps1",
|
|
82
83
|
".codex/prompts/generate-pr.md",
|
|
83
84
|
".codex/prompts/orchestrate-work.md",
|
|
84
85
|
".codex/agents/feature-reviewer.toml",
|
|
@@ -83,6 +83,7 @@ Run these after editing any mirrored or bundled file; each is under `tests/scrip
|
|
|
83
83
|
|
|
84
84
|
- `test_push_down_claude_resource_contracts.py` and `test_push_down_codex_and_agents_resource_contracts.py`: every distributable `.claude`, `.agents`, and `.codex` file exists in the bundle with equal text.
|
|
85
85
|
- `test_push_down_claude_pack_manifest_completeness.py` and `test_push_down_codex_and_agents_pack_manifest_completeness.py`: every bundled file is listed in a pack manifest.
|
|
86
|
+
- `test_push_down_pack_manifest_dependency_closure.py`: every `$PSScriptRoot` dependency of a manifested PowerShell file, and every hook script named by `.claude/settings.json`, manifested agent frontmatter, or `.codex/config.toml`, is in core plus the owning pack.
|
|
86
87
|
- The Codex generator check: `scripts/dev_tools/generate_codex_agent_variants.py` run in module form with `--check` (base agents are hand-edited; variants, bundle copies, and the Codex `core.json` are generated).
|
|
87
88
|
- `test_codex_agent_wrapper_contracts.py` and `test_codex_handoff_contract_parity.py`: pinned Codex agent fragments and handoff parity.
|
|
88
89
|
- `test_claude_rules_frontmatter.py`: rule `paths:` scopes and that every preloaded skill exists.
|