@danmoisan/drm-copilot-mcp 1.1.20 → 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/out/mcp-server.js +7 -7
- 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/lib/codex-routing/CodexDeployment.psm1 +10 -10
- package/resources/claude-customizations/.claude/skills/execution-environment/SKILL.md +2 -1
- package/resources/claude-customizations/config/orchestration-routing.json +7 -7
- package/resources/claude-customizations/pack-manifests/core.json +7 -0
- package/resources/codex-and-agents-customizations/.agents/skills/codex-model-routing/SKILL.md +6 -6
- package/resources/codex-and-agents-customizations/.agents/skills/epic-orchestrate/SKILL.md +7 -7
- package/resources/codex-and-agents-customizations/.agents/skills/epic-plan/SKILL.md +2 -2
- package/resources/codex-and-agents-customizations/.agents/skills/execution-environment/SKILL.md +2 -1
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +4 -4
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-executor.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/atomic-planner.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/commit-steward.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/csharp-typed-engineer.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/epic-orchestrator.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/epic-planner.toml +2 -2
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/feature-reviewer.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c1.toml +3 -3
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c2.toml +3 -3
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c3-elevated.toml +3 -3
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c3.toml +3 -3
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator-c4.toml +3 -3
- package/resources/codex-and-agents-customizations/.codex/agents/orchestrator.toml +3 -3
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/powershell-typed-engineer.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/pr-author.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/prd-feature.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/python-typed-engineer.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/task-researcher.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c1.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c2.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c3-elevated.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c3.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer-c4.toml +1 -1
- package/resources/codex-and-agents-customizations/.codex/agents/typescript-engineer.toml +1 -1
- 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/.codex/hooks/record-subagent-routing-attestation.ps1 +82 -70
- package/resources/codex-and-agents-customizations/.codex-variants/csharp-legacy/agents/csharp-typed-engineer.toml +1 -1
- package/resources/codex-and-agents-customizations/pack-manifests/core.json +1 -0
- package/resources/config/orchestration-routing.json +7 -7
- package/resources/customizations/.github/skills/execution-environment/SKILL.md +2 -1
- package/resources/lib/codex-routing/CodexDeployment.psm1 +10 -10
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")
|
|
@@ -177,7 +177,7 @@ function Get-CodexSubagentAttestation {
|
|
|
177
177
|
$profileValidationError = $null
|
|
178
178
|
$routingValid = $true
|
|
179
179
|
if ($isEpic) {
|
|
180
|
-
$expectedModel = 'gpt-
|
|
180
|
+
$expectedModel = 'gpt-6-astra'
|
|
181
181
|
$expectedReasoningEffort = 'ultra'
|
|
182
182
|
} elseif (Test-CodexRoutedAgentType -AgentType $agentType) {
|
|
183
183
|
$routingReceipt = Find-CodexModelRoutingReceipt -AgentType $agentType -Checkpoints $Checkpoints
|
|
@@ -246,23 +246,20 @@ function Write-CodexSubagentAttestation {
|
|
|
246
246
|
[CmdletBinding()]
|
|
247
247
|
param(
|
|
248
248
|
[Parameter(Mandatory)][string] $RepositoryRoot,
|
|
249
|
-
[Parameter(Mandatory)][System.Collections.IDictionary] $Attestation
|
|
249
|
+
[Parameter(Mandatory)][System.Collections.IDictionary] $Attestation,
|
|
250
|
+
[scriptblock] $OpenStream = { param($Path, $Mode, $Access, $Share) [System.IO.File]::Open($Path, $Mode, $Access, $Share) },
|
|
251
|
+
[scriptblock] $EnsureDirectory = { param($Path) [System.IO.Directory]::CreateDirectory($Path) | Out-Null }
|
|
250
252
|
)
|
|
251
253
|
|
|
252
254
|
$directory = Get-CodexAuthorityStateRoot `
|
|
253
255
|
-RepositoryRoot $RepositoryRoot `
|
|
254
256
|
-SessionId ([string]$Attestation.session_id)
|
|
255
|
-
|
|
257
|
+
& $EnsureDirectory $directory
|
|
256
258
|
$path = Get-CodexAuthorityAttestationPath `
|
|
257
259
|
-RepositoryRoot $RepositoryRoot `
|
|
258
260
|
-SessionId ([string]$Attestation.session_id) `
|
|
259
261
|
-AttestationKey ([string]$Attestation.attestation_key)
|
|
260
|
-
$stream = [System.IO.
|
|
261
|
-
$path,
|
|
262
|
-
[System.IO.FileMode]::CreateNew,
|
|
263
|
-
[System.IO.FileAccess]::Write,
|
|
264
|
-
[System.IO.FileShare]::None
|
|
265
|
-
)
|
|
262
|
+
$stream = & $OpenStream $path ([System.IO.FileMode]::CreateNew) ([System.IO.FileAccess]::Write) ([System.IO.FileShare]::None)
|
|
266
263
|
try {
|
|
267
264
|
$writer = [System.IO.StreamWriter]::new(
|
|
268
265
|
$stream,
|
|
@@ -288,7 +285,9 @@ function Get-CodexSubagentAttestationFromAuthority {
|
|
|
288
285
|
[Parameter(Mandatory)][AllowEmptyCollection()][object[]] $Checkpoints,
|
|
289
286
|
[Parameter(Mandatory)][string] $RepositoryRoot,
|
|
290
287
|
[Parameter(Mandatory)][string] $CurrentHeadSha,
|
|
291
|
-
[Parameter(Mandatory)][datetimeoffset] $Now
|
|
288
|
+
[Parameter(Mandatory)][datetimeoffset] $Now,
|
|
289
|
+
[scriptblock] $OpenStream = { param($Path, $Mode, $Access, $Share) [System.IO.File]::Open($Path, $Mode, $Access, $Share) },
|
|
290
|
+
[scriptblock] $FlushStream = { param($Stream) $Stream.Flush($true) }
|
|
292
291
|
)
|
|
293
292
|
|
|
294
293
|
$isEpic = $script:EpicPersonas -contains [string]$Payload.agent_type
|
|
@@ -302,12 +301,7 @@ function Get-CodexSubagentAttestationFromAuthority {
|
|
|
302
301
|
-Now $Now
|
|
303
302
|
}
|
|
304
303
|
|
|
305
|
-
$stream = [System.IO.
|
|
306
|
-
$ReceiptPath,
|
|
307
|
-
[System.IO.FileMode]::Open,
|
|
308
|
-
[System.IO.FileAccess]::ReadWrite,
|
|
309
|
-
[System.IO.FileShare]::None
|
|
310
|
-
)
|
|
304
|
+
$stream = & $OpenStream $ReceiptPath ([System.IO.FileMode]::Open) ([System.IO.FileAccess]::ReadWrite) ([System.IO.FileShare]::None)
|
|
311
305
|
try {
|
|
312
306
|
$reader = [System.IO.StreamReader]::new(
|
|
313
307
|
$stream,
|
|
@@ -344,7 +338,7 @@ function Get-CodexSubagentAttestationFromAuthority {
|
|
|
344
338
|
try {
|
|
345
339
|
$writer.Write(($receipt | ConvertTo-Json -Depth 8))
|
|
346
340
|
$writer.Flush()
|
|
347
|
-
$stream
|
|
341
|
+
& $FlushStream $stream
|
|
348
342
|
} finally {
|
|
349
343
|
$writer.Dispose()
|
|
350
344
|
}
|
|
@@ -355,60 +349,78 @@ function Get-CodexSubagentAttestationFromAuthority {
|
|
|
355
349
|
}
|
|
356
350
|
}
|
|
357
351
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
352
|
+
<#
|
|
353
|
+
.SYNOPSIS
|
|
354
|
+
Evaluates SubagentStart input while leaving console output and process exit to the entry wrapper.
|
|
355
|
+
#>
|
|
356
|
+
function Invoke-CodexSubagentAttestationCommand {
|
|
357
|
+
[CmdletBinding()]
|
|
358
|
+
[OutputType([System.Collections.Specialized.OrderedDictionary])]
|
|
359
|
+
param(
|
|
360
|
+
[string] $RepositoryRoot = (Split-Path (Split-Path $PSScriptRoot -Parent) -Parent),
|
|
361
|
+
[scriptblock] $ReadInput = { [Console]::In.ReadToEnd() },
|
|
362
|
+
[scriptblock] $ReadCheckpoint = { param($Path) Get-Content -Raw -LiteralPath $Path },
|
|
363
|
+
[scriptblock] $ReadHead = { param($Root) $sha = [string](& git -C $Root rev-parse HEAD 2>$null); @{ sha = $sha; exit_code = $LASTEXITCODE } },
|
|
364
|
+
[scriptblock] $GetNow = { [datetimeoffset]::UtcNow }
|
|
365
|
+
)
|
|
366
|
+
try {
|
|
367
|
+
$payload = ConvertFrom-SubagentAttestationJson -Raw (& $ReadInput) -Name 'SubagentStart input'
|
|
368
|
+
$stateRoot = Join-Path $repositoryRoot 'artifacts/orchestration'
|
|
369
|
+
$receiptPath = Get-CodexAuthorityReceiptPath `
|
|
370
|
+
-RepositoryRoot $repositoryRoot `
|
|
371
|
+
-SessionId ([string]$payload.session_id) `
|
|
372
|
+
-TurnId ([string]$payload.turn_id)
|
|
373
|
+
$checkpoints = @()
|
|
374
|
+
foreach ($name in @('epic-planner-state.json', 'epic-orchestrator-state.json', 'orchestrator-state.json')) {
|
|
375
|
+
$path = Join-Path $stateRoot $name
|
|
376
|
+
if (Test-Path -LiteralPath $path -PathType Leaf) {
|
|
377
|
+
$parsed = ConvertFrom-SubagentAttestationJson -Raw (& $ReadCheckpoint $path) -Name $name -Optional
|
|
378
|
+
if ($null -ne $parsed) {
|
|
379
|
+
$checkpoints += $parsed
|
|
380
|
+
}
|
|
377
381
|
}
|
|
378
382
|
}
|
|
383
|
+
$now = & $GetNow
|
|
384
|
+
$head = & $ReadHead $repositoryRoot
|
|
385
|
+
$headSha = [string]$head.sha
|
|
386
|
+
if ($head.exit_code -ne 0 -or $headSha -notmatch '^[0-9a-fA-F]{40,64}$') {
|
|
387
|
+
throw 'EPIC_INVOCATION_ORIGIN_BLOCKED: repository HEAD could not be resolved.'
|
|
388
|
+
}
|
|
389
|
+
$attestation = Get-CodexSubagentAttestationFromAuthority `
|
|
390
|
+
-Payload $payload `
|
|
391
|
+
-ReceiptPath $receiptPath `
|
|
392
|
+
-Checkpoints $checkpoints `
|
|
393
|
+
-RepositoryRoot $repositoryRoot `
|
|
394
|
+
-CurrentHeadSha $headSha `
|
|
395
|
+
-Now $now
|
|
396
|
+
$attestationPath = Write-CodexSubagentAttestation -RepositoryRoot $repositoryRoot -Attestation $attestation
|
|
397
|
+
$stdout = if (-not $attestation.provenance_valid) {
|
|
398
|
+
[ordered]@{
|
|
399
|
+
systemMessage = "EPIC_INVOCATION_ORIGIN_BLOCKED: $($payload.agent_type) requires a fresh root-session epic invocation receipt."
|
|
400
|
+
hookSpecificOutput = [ordered]@{
|
|
401
|
+
hookEventName = 'SubagentStart'
|
|
402
|
+
additionalContext = 'Do not mutate state. Report EPIC_INVOCATION_ORIGIN_BLOCKED and stop.'
|
|
403
|
+
}
|
|
404
|
+
} | ConvertTo-Json -Compress -Depth 5
|
|
405
|
+
} elseif (-not $attestation.routing_valid) {
|
|
406
|
+
[ordered]@{
|
|
407
|
+
systemMessage = "MODEL_ROUTING_ATTESTATION_BLOCKED: actual model/profile does not match the persisted routing receipt. Attestation: $attestationPath"
|
|
408
|
+
hookSpecificOutput = [ordered]@{
|
|
409
|
+
hookEventName = 'SubagentStart'
|
|
410
|
+
additionalContext = 'Do not mutate state until the parent corrects the deployment profile and routing receipt.'
|
|
411
|
+
}
|
|
412
|
+
} | ConvertTo-Json -Compress -Depth 5
|
|
413
|
+
}
|
|
414
|
+
return [ordered]@{ exit_code = 0; stdout = $stdout; stderr = $null }
|
|
415
|
+
} catch {
|
|
416
|
+
return [ordered]@{ exit_code = 2; stdout = $null; stderr = [string]$_ }
|
|
379
417
|
}
|
|
380
|
-
$now = [datetimeoffset]::UtcNow
|
|
381
|
-
$headSha = [string](& git -C $repositoryRoot rev-parse HEAD 2>$null)
|
|
382
|
-
if ($LASTEXITCODE -ne 0 -or $headSha -notmatch '^[0-9a-fA-F]{40,64}$') {
|
|
383
|
-
throw 'EPIC_INVOCATION_ORIGIN_BLOCKED: repository HEAD could not be resolved.'
|
|
384
|
-
}
|
|
385
|
-
$attestation = Get-CodexSubagentAttestationFromAuthority `
|
|
386
|
-
-Payload $payload `
|
|
387
|
-
-ReceiptPath $receiptPath `
|
|
388
|
-
-Checkpoints $checkpoints `
|
|
389
|
-
-RepositoryRoot $repositoryRoot `
|
|
390
|
-
-CurrentHeadSha $headSha `
|
|
391
|
-
-Now $now
|
|
392
|
-
$attestationPath = Write-CodexSubagentAttestation -RepositoryRoot $repositoryRoot -Attestation $attestation
|
|
393
|
-
if (-not $attestation.provenance_valid) {
|
|
394
|
-
[ordered]@{
|
|
395
|
-
systemMessage = "EPIC_INVOCATION_ORIGIN_BLOCKED: $($payload.agent_type) requires a fresh root-session epic invocation receipt."
|
|
396
|
-
hookSpecificOutput = [ordered]@{
|
|
397
|
-
hookEventName = 'SubagentStart'
|
|
398
|
-
additionalContext = 'Do not mutate state. Report EPIC_INVOCATION_ORIGIN_BLOCKED and stop.'
|
|
399
|
-
}
|
|
400
|
-
} | ConvertTo-Json -Compress -Depth 5 | Write-Output
|
|
401
|
-
} elseif (-not $attestation.routing_valid) {
|
|
402
|
-
[ordered]@{
|
|
403
|
-
systemMessage = "MODEL_ROUTING_ATTESTATION_BLOCKED: actual model/profile does not match the persisted routing receipt. Attestation: $attestationPath"
|
|
404
|
-
hookSpecificOutput = [ordered]@{
|
|
405
|
-
hookEventName = 'SubagentStart'
|
|
406
|
-
additionalContext = 'Do not mutate state until the parent corrects the deployment profile and routing receipt.'
|
|
407
|
-
}
|
|
408
|
-
} | ConvertTo-Json -Compress -Depth 5 | Write-Output
|
|
409
|
-
}
|
|
410
|
-
exit 0
|
|
411
|
-
} catch {
|
|
412
|
-
[Console]::Error.WriteLine([string]$_)
|
|
413
|
-
exit 2
|
|
414
418
|
}
|
|
419
|
+
|
|
420
|
+
if ($MyInvocation.InvocationName -eq '.') {
|
|
421
|
+
return
|
|
422
|
+
}
|
|
423
|
+
$commandResult = Invoke-CodexSubagentAttestationCommand
|
|
424
|
+
if ($null -ne $commandResult.stdout) { Write-Output $commandResult.stdout }
|
|
425
|
+
if ($null -ne $commandResult.stderr) { [Console]::Error.WriteLine($commandResult.stderr) }
|
|
426
|
+
exit $commandResult.exit_code
|
|
@@ -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",
|
|
@@ -289,28 +289,28 @@
|
|
|
289
289
|
"complexity_to_profile": {
|
|
290
290
|
"C1": {
|
|
291
291
|
"suffix": "c1",
|
|
292
|
-
"model": "gpt-
|
|
292
|
+
"model": "gpt-6-luna",
|
|
293
293
|
"model_reasoning_effort": "low"
|
|
294
294
|
},
|
|
295
295
|
"C2": {
|
|
296
296
|
"suffix": "c2",
|
|
297
|
-
"model": "gpt-
|
|
297
|
+
"model": "gpt-6.1-sol",
|
|
298
298
|
"model_reasoning_effort": "medium"
|
|
299
299
|
},
|
|
300
300
|
"C3": {
|
|
301
301
|
"suffix": "c3",
|
|
302
|
-
"model": "gpt-
|
|
302
|
+
"model": "gpt-6.1-sol",
|
|
303
303
|
"model_reasoning_effort": "high"
|
|
304
304
|
},
|
|
305
305
|
"C4": {
|
|
306
306
|
"suffix": "c4",
|
|
307
|
-
"model": "gpt-
|
|
307
|
+
"model": "gpt-6-astra",
|
|
308
308
|
"model_reasoning_effort": "max"
|
|
309
309
|
}
|
|
310
310
|
},
|
|
311
311
|
"c3_elevated_profile": {
|
|
312
312
|
"suffix": "c3-elevated",
|
|
313
|
-
"model": "gpt-
|
|
313
|
+
"model": "gpt-6-astra",
|
|
314
314
|
"model_reasoning_effort": "high",
|
|
315
315
|
"activation": {
|
|
316
316
|
"operator": "any",
|
|
@@ -329,12 +329,12 @@
|
|
|
329
329
|
"forced_personas": {
|
|
330
330
|
"epic-planner": {
|
|
331
331
|
"suffix": "",
|
|
332
|
-
"model": "gpt-
|
|
332
|
+
"model": "gpt-6-astra",
|
|
333
333
|
"model_reasoning_effort": "ultra"
|
|
334
334
|
},
|
|
335
335
|
"epic-orchestrator": {
|
|
336
336
|
"suffix": "",
|
|
337
|
-
"model": "gpt-
|
|
337
|
+
"model": "gpt-6-astra",
|
|
338
338
|
"model_reasoning_effort": "ultra"
|
|
339
339
|
}
|
|
340
340
|
},
|
|
@@ -60,7 +60,7 @@ Two separate mechanisms restrict Bash command text. They are kept apart here bec
|
|
|
60
60
|
- `.github/workflows/ci.yml` triggers on `push` to `main` and `development`, on `pull_request` to `main`, `development`, and `epic/**`, on `workflow_dispatch`, and on `merge_group` (`types: [checks_requested]`, added by issue #952), with no path filters. When the merge queue on `main` is enabled, every required check is produced by a `merge_group` run of `ci.yml` as well as by the pull-request run; `.github/workflows/README.md` (`## Triggers`) records the trigger set.
|
|
61
61
|
- Jobs in `ci.yml` and their check names: `Change scope` (job `changes`, the change-scope decision below); `CI full run` (job `full-run-marker`, which runs only on a full run, marks that run as a valid base for later decisions, and is not a required check); `quality-checks7 / Code Quality & Tests (<python-version>)` on Python 3.10, 3.11, 3.12, and 3.13 (`_quality-checks.yml`: Black check, Ruff, Pyright, the Codex generator `--check`, the tier classification, Pytest with line and branch coverage, and the coverage-threshold check on the JSON report totals); `security-scan / Security Scanning` (its `safety check` step carries `continue-on-error: true` and does not fail the check); `docs-validation / Documentation Validation`; `build-check / Build Package`; `shell-coverage / Shell Coverage (Bats + kcov)`; `drm-copilot-extension-tests / drm-copilot Extension Tests (<os>)` on `ubuntu-latest` and `windows-latest`; `root-typescript-tests / Root TypeScript Tests (<os>)` on `ubuntu-latest` and `windows-latest`; `NPM Audit Gate / npm audit (<manifest>)` (the calling job carries the name `NPM Audit Gate`); and the `poshqc` group below.
|
|
62
62
|
- PowerShell CI (`_poshqc.yml`): `poshqc / PowerShell QC static` (format and analyze on `windows-latest`); the shard matrix `poshqc / PowerShell QC shard 1`, `shard 2`, and `shard 3` (`Invoke-PoshQCTest -ShardIndex -ShardCount` over the scan folders of `config/poshqc-scan.json`, with coverage, on `windows-latest`); the aggregator `poshqc / PowerShell QC`, which requires the static and shard jobs to succeed, verifies shard completeness against a Pester discovery count, and merges shard coverage; and `poshqc / PowerShell hook suites (Linux)`, which runs only `tests/scripts/claude-hooks` and `tests/scripts/codex-hooks` on `ubuntu-latest` with coverage disabled. A new test file under a scanned folder is assigned to a shard automatically and is counted by the completeness check.
|
|
63
|
-
- Change-scope decision (issue #962): the `Change scope` job runs `scripts/ci/Invoke-CiChangeScope.ps1` and publishes the job output `code`. The decision is `code=false` (docs-only) only on a `pull_request` event from this repository
|
|
63
|
+
- Change-scope decision (issue #962): the `Change scope` job runs `scripts/ci/Invoke-CiChangeScope.ps1` and publishes the job output `code`. The decision is `code=false` (docs-only) only on a `pull_request` event from this repository, through one of two comparisons. Green-run base: every file changed since the newest successful `ci.yml` run on the pull-request branch whose `CI full run` job succeeded, and whose head commit is present and an ancestor of the current head, is on the allowlist `config/ci-docs-only-paths.json`; the reason is `DOCS_ONLY_SINCE_<green head sha>`. Merge-base fallback (issue #973): when the green-run step ends with no earlier full green run (`NO_FULL_GREEN_RUN`), a missing base (`BASE_NOT_PRESENT`), or a non-ancestor base (`BASE_NOT_ANCESTOR`), and the pull request's base ref is exactly `main`, the script computes `git merge-base` of the payload base SHA (`BASE_SHA`, from `github.event.pull_request.base.sha`; the base ref arrives as `BASE_REF`) and the head, lists the files changed since that merge base with the same diff arguments, and decides `DOCS_ONLY_SINCE_MERGE_BASE_<merge base sha>` when every changed file is allowlisted. Both comparisons run the diff with rename detection off, so both the old and the new path of a rename are classified. A path is allowlisted when it starts with `docs/features/active/`, `docs/features/archive/`, `docs/features/completed/`, `docs/features/epics/`, `docs/features/parallel/`, `docs/features/potential/`, or `docs/research/`, does not start with `docs/features/templates/` or `docs/features/potential/template.md`, and ends in `.md`, `.txt`, `.log`, `.json`, or `.xml`; the allowlist file itself is not allowlisted. Every other case is a full run (`code=true`): `push`, `merge_group`, and `workflow_dispatch` events, a fork pull request, unreadable run or job data, no earlier full green run or a missing or non-ancestor base when the base ref is not `main`, a merge base that cannot be resolved (`MERGE_BASE_UNRESOLVED`, for example a blank base SHA or a base commit missing from the checkout), a failed ancestry check, an empty diff, any path outside the allowlist, and any error. The decision step carries `continue-on-error: true` and the callers compare the output with `!= 'false'`, so a failed or missing decision also gives a full run.
|
|
64
64
|
- Docs-only behavior (`code=false`): `ci.yml` passes `run-heavy: false` to `_quality-checks.yml`, `_security-scan.yml`, `_build-check.yml`, `_poshqc.yml`, `_shell-coverage.yml`, and `_drm-copilot-extension-tests.yml`. Each required job still starts under its full-run check name with every step skipped, so every required context reports `success` without running its suite. In `_poshqc.yml` the aggregator `poshqc / PowerShell QC` runs with every step gated, and `poshqc / PowerShell QC static`, the shard jobs, and `poshqc / PowerShell hook suites (Linux)` are skipped at job level. `docs-validation / Documentation Validation` runs in full. `root-typescript-tests`, `NPM Audit Gate`, and `CI full run` are skipped at job level. A `success` on a docs-only commit is therefore not evidence that the heavy suites pass for that commit; that evidence is the newest run whose `CI full run` job succeeded.
|
|
65
65
|
- A commit that changes any path outside the allowlist (any code, workflow, configuration, script, test, or customization file) runs the full set of jobs, and its `CI full run` job marks it as a base for later docs-only decisions. A standalone `workflow_dispatch` of a reusable workflow, or a caller that omits `run-heavy`, also runs in full. `.github/workflows/README.md` (`## Change-Scope Decision (Issue #962)`) records the reason codes and the per-context behavior table.
|
|
66
66
|
- Required contexts of ruleset 15241672, confirmed by the orchestrator through `gh api` on 2026-10-16: `drm-copilot-extension-tests / drm-copilot Extension Tests (ubuntu-latest)`, `drm-copilot-extension-tests / drm-copilot Extension Tests (windows-latest)`, `docs-validation / Documentation Validation`, `poshqc / PowerShell QC`, `shell-coverage / Shell Coverage (Bats + kcov)`, `security-scan / Security Scanning`, `quality-checks7 / Code Quality & Tests (3.10)`, `quality-checks7 / Code Quality & Tests (3.11)`, `quality-checks7 / Code Quality & Tests (3.12)`, `quality-checks7 / Code Quality & Tests (3.13)`, `build-check / Build Package`.
|
|
@@ -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.
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
`scripts/dev_tools/resolve_codex_deployment.py`. It resolves the exact Codex
|
|
8
8
|
deployment agent, model, and reasoning effort for one delegation from the
|
|
9
9
|
logical agent, the assessed complexity band, the execution context, and the
|
|
10
|
-
orchestration complexity ceiling. C3 defaults to
|
|
11
|
-
|
|
12
|
-
planner and epic orchestrator personas are always forced to
|
|
10
|
+
orchestration complexity ceiling. C3 defaults to Sol/high and elevates to
|
|
11
|
+
Astra/high only for an epic child or a C4 orchestration ceiling; the epic
|
|
12
|
+
planner and epic orchestrator personas are always forced to Astra/ultra. No
|
|
13
13
|
model alias and no silent fallback is accepted.
|
|
14
14
|
|
|
15
15
|
SINGLE-IMPLEMENTATION RULE. The orchestrator-state U6.X checks
|
|
@@ -81,20 +81,20 @@ $script:LOGICAL_AGENT_ALIASES = @{ 'feature-review' = 'feature-reviewer' }
|
|
|
81
81
|
|
|
82
82
|
# The per-band deployment profiles (suffix, model, reasoning effort).
|
|
83
83
|
$script:BASE_PROFILES = @{
|
|
84
|
-
C1 = @{ suffix = 'c1'; model = 'gpt-
|
|
85
|
-
C2 = @{ suffix = 'c2'; model = 'gpt-
|
|
86
|
-
C3 = @{ suffix = 'c3'; model = 'gpt-
|
|
87
|
-
C4 = @{ suffix = 'c4'; model = 'gpt-
|
|
84
|
+
C1 = @{ suffix = 'c1'; model = 'gpt-6-luna'; model_reasoning_effort = 'low' }
|
|
85
|
+
C2 = @{ suffix = 'c2'; model = 'gpt-6.1-sol'; model_reasoning_effort = 'medium' }
|
|
86
|
+
C3 = @{ suffix = 'c3'; model = 'gpt-6.1-sol'; model_reasoning_effort = 'high' }
|
|
87
|
+
C4 = @{ suffix = 'c4'; model = 'gpt-6-astra'; model_reasoning_effort = 'max' }
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
# The profile a C3 delegation elevates to when the overlay applies.
|
|
91
|
-
$script:C3_ELEVATED_PROFILE = @{ suffix = 'c3-elevated'; model = 'gpt-
|
|
91
|
+
$script:C3_ELEVATED_PROFILE = @{ suffix = 'c3-elevated'; model = 'gpt-6-astra'; model_reasoning_effort = 'high' }
|
|
92
92
|
|
|
93
93
|
# The personas whose profile is forced regardless of band, context, or ceiling.
|
|
94
94
|
# Their deployment agent is the logical agent itself (empty suffix).
|
|
95
95
|
$script:FORCED_PERSONA_PROFILES = @{
|
|
96
|
-
'epic-planner' = @{ suffix = ''; model = 'gpt-
|
|
97
|
-
'epic-orchestrator' = @{ suffix = ''; model = 'gpt-
|
|
96
|
+
'epic-planner' = @{ suffix = ''; model = 'gpt-6-astra'; model_reasoning_effort = 'ultra' }
|
|
97
|
+
'epic-orchestrator' = @{ suffix = ''; model = 'gpt-6-astra'; model_reasoning_effort = 'ultra' }
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
|