@lannguyensi/harness 0.63.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +90 -0
- package/README.md +46 -42
- package/dist/cli/add/index.js +17 -21
- package/dist/cli/add/index.js.map +1 -1
- package/dist/cli/adopt/derive.d.ts +2 -2
- package/dist/cli/adopt/derive.js +2 -19
- package/dist/cli/adopt/derive.js.map +1 -1
- package/dist/cli/adopt/index.d.ts +1 -1
- package/dist/cli/adopt/index.js +1 -12
- package/dist/cli/adopt/index.js.map +1 -1
- package/dist/cli/apply/apply.d.ts +20 -35
- package/dist/cli/apply/apply.js +61 -136
- package/dist/cli/apply/apply.js.map +1 -1
- package/dist/cli/apply/generate-codex-config.js +10 -58
- package/dist/cli/apply/generate-codex-config.js.map +1 -1
- package/dist/cli/apply/generate-memory-index.js +1 -2
- package/dist/cli/apply/generate-memory-index.js.map +1 -1
- package/dist/cli/apply/generate-opencode-config.d.ts +2 -10
- package/dist/cli/apply/generate-opencode-config.js +74 -113
- package/dist/cli/apply/generate-opencode-config.js.map +1 -1
- package/dist/cli/apply/generate-settings.d.ts +11 -64
- package/dist/cli/apply/generate-settings.js +27 -132
- package/dist/cli/apply/generate-settings.js.map +1 -1
- package/dist/cli/apply/index.d.ts +1 -1
- package/dist/cli/apply/index.js +1 -1
- package/dist/cli/apply/index.js.map +1 -1
- package/dist/cli/apply/install-codex-config.d.ts +153 -1
- package/dist/cli/apply/install-codex-config.js +445 -70
- package/dist/cli/apply/install-codex-config.js.map +1 -1
- package/dist/cli/apply/next-steps.d.ts +7 -0
- package/dist/cli/apply/next-steps.js +13 -1
- package/dist/cli/apply/next-steps.js.map +1 -1
- package/dist/cli/bounded-stdin.d.ts +0 -23
- package/dist/cli/bounded-stdin.js +2 -49
- package/dist/cli/bounded-stdin.js.map +1 -1
- package/dist/cli/describe.d.ts +1 -1
- package/dist/cli/describe.js +0 -3
- package/dist/cli/describe.js.map +1 -1
- package/dist/cli/diff/engine.d.ts +0 -11
- package/dist/cli/diff/engine.js +1 -17
- package/dist/cli/diff/engine.js.map +1 -1
- package/dist/cli/diff/index.js +14 -25
- package/dist/cli/diff/index.js.map +1 -1
- package/dist/cli/doctor/claude-mcp.d.ts +4 -19
- package/dist/cli/doctor/claude-mcp.js +11 -22
- package/dist/cli/doctor/claude-mcp.js.map +1 -1
- package/dist/cli/doctor/codex.d.ts +12 -14
- package/dist/cli/doctor/codex.js +31 -144
- package/dist/cli/doctor/codex.js.map +1 -1
- package/dist/cli/doctor/format.js +23 -338
- package/dist/cli/doctor/format.js.map +1 -1
- package/dist/cli/doctor/hook-liveness.d.ts +56 -0
- package/dist/cli/doctor/hook-liveness.js +455 -0
- package/dist/cli/doctor/hook-liveness.js.map +1 -0
- package/dist/cli/doctor/index.d.ts +13 -87
- package/dist/cli/doctor/index.js +57 -705
- package/dist/cli/doctor/index.js.map +1 -1
- package/dist/cli/doctor/opencode.d.ts +2 -1
- package/dist/cli/doctor/opencode.js.map +1 -1
- package/dist/cli/doctor/types.d.ts +21 -378
- package/dist/cli/doctor/types.js.map +1 -1
- package/dist/cli/drain-stdio.d.ts +31 -0
- package/dist/cli/drain-stdio.js +76 -0
- package/dist/cli/drain-stdio.js.map +1 -0
- package/dist/cli/export.d.ts +3 -1
- package/dist/cli/export.js +7 -16
- package/dist/cli/export.js.map +1 -1
- package/dist/cli/gate/codex-disable.d.ts +29 -0
- package/dist/cli/gate/codex-disable.js +195 -0
- package/dist/cli/gate/codex-disable.js.map +1 -0
- package/dist/cli/gate/codex-enable.d.ts +41 -0
- package/dist/cli/gate/codex-enable.js +127 -0
- package/dist/cli/gate/codex-enable.js.map +1 -0
- package/dist/cli/gate/codex-snapshot.d.ts +208 -0
- package/dist/cli/gate/codex-snapshot.js +402 -0
- package/dist/cli/gate/codex-snapshot.js.map +1 -0
- package/dist/cli/gate/disable.d.ts +9 -0
- package/dist/cli/gate/disable.js +263 -28
- package/dist/cli/gate/disable.js.map +1 -1
- package/dist/cli/gate/enable.d.ts +26 -6
- package/dist/cli/gate/enable.js +152 -80
- package/dist/cli/gate/enable.js.map +1 -1
- package/dist/cli/gate/link-chain.d.ts +53 -0
- package/dist/cli/gate/link-chain.js +122 -0
- package/dist/cli/gate/link-chain.js.map +1 -0
- package/dist/cli/gate/snapshot.d.ts +289 -12
- package/dist/cli/gate/snapshot.js +481 -22
- package/dist/cli/gate/snapshot.js.map +1 -1
- package/dist/cli/index.d.ts +0 -9
- package/dist/cli/index.js +15 -2607
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init/composer.d.ts +3 -6
- package/dist/cli/init/composer.js +6 -370
- package/dist/cli/init/composer.js.map +1 -1
- package/dist/cli/init/dependencies.d.ts +1 -2
- package/dist/cli/init/dependencies.js +4 -80
- package/dist/cli/init/dependencies.js.map +1 -1
- package/dist/cli/init/detect.js +5 -4
- package/dist/cli/init/detect.js.map +1 -1
- package/dist/cli/init/interactive.d.ts +1 -23
- package/dist/cli/init/interactive.js +33 -247
- package/dist/cli/init/interactive.js.map +1 -1
- package/dist/cli/init/profiles.d.ts +2 -2
- package/dist/cli/init/profiles.js +51 -243
- package/dist/cli/init/profiles.js.map +1 -1
- package/dist/cli/init/templates.d.ts +2 -37
- package/dist/cli/init/templates.js +25 -1237
- package/dist/cli/init/templates.js.map +1 -1
- package/dist/cli/list.d.ts +1 -1
- package/dist/cli/list.js +1 -38
- package/dist/cli/list.js.map +1 -1
- package/dist/cli/loader.d.ts +15 -1
- package/dist/cli/loader.js +56 -39
- package/dist/cli/loader.js.map +1 -1
- package/dist/cli/main.js +7 -2
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/migrate-home/index.js +2 -2
- package/dist/cli/migrate-home/index.js.map +1 -1
- package/dist/cli/pack/add.js +1 -1
- package/dist/cli/pack/add.js.map +1 -1
- package/dist/cli/pack/hook-bootstrap.d.ts +5 -164
- package/dist/cli/pack/hook-bootstrap.js +15 -291
- package/dist/cli/pack/hook-bootstrap.js.map +1 -1
- package/dist/cli/pack/hook-branch-protection.d.ts +28 -21
- package/dist/cli/pack/hook-branch-protection.js +365 -340
- package/dist/cli/pack/hook-branch-protection.js.map +1 -1
- package/dist/cli/pack/index.d.ts +0 -1
- package/dist/cli/pack/index.js +0 -1
- package/dist/cli/pack/index.js.map +1 -1
- package/dist/cli/pack/list.js +1 -6
- package/dist/cli/pack/list.js.map +1 -1
- package/dist/cli/pack/mutate.d.ts +7 -9
- package/dist/cli/pack/mutate.js +6 -9
- package/dist/cli/pack/mutate.js.map +1 -1
- package/dist/cli/pack/reseed.d.ts +2 -2
- package/dist/cli/pack/reseed.js +16 -22
- package/dist/cli/pack/reseed.js.map +1 -1
- package/dist/cli/register-gate-group.d.ts +5 -0
- package/dist/cli/register-gate-group.js +348 -0
- package/dist/cli/register-gate-group.js.map +1 -0
- package/dist/cli/register-inspect-group.d.ts +6 -0
- package/dist/cli/register-inspect-group.js +189 -0
- package/dist/cli/register-inspect-group.js.map +1 -0
- package/dist/cli/register-operator-lifecycle.d.ts +5 -0
- package/dist/cli/register-operator-lifecycle.js +20 -0
- package/dist/cli/register-operator-lifecycle.js.map +1 -0
- package/dist/cli/register-pack-group.d.ts +5 -0
- package/dist/cli/register-pack-group.js +134 -0
- package/dist/cli/register-pack-group.js.map +1 -0
- package/dist/cli/register-setup-group.d.ts +5 -0
- package/dist/cli/register-setup-group.js +495 -0
- package/dist/cli/register-setup-group.js.map +1 -0
- package/dist/cli/remove/index.d.ts +0 -14
- package/dist/cli/remove/index.js +2 -115
- package/dist/cli/remove/index.js.map +1 -1
- package/dist/cli/remove/mutate.d.ts +0 -2
- package/dist/cli/remove/mutate.js +1 -19
- package/dist/cli/remove/mutate.js.map +1 -1
- package/dist/cli/remove/register.d.ts +5 -0
- package/dist/cli/remove/register.js +25 -0
- package/dist/cli/remove/register.js.map +1 -0
- package/dist/cli/shell-quote.d.ts +7 -0
- package/dist/cli/shell-quote.js +17 -0
- package/dist/cli/shell-quote.js.map +1 -0
- package/dist/cli/uninstall/index.d.ts +4 -2
- package/dist/cli/uninstall/index.js +15 -7
- package/dist/cli/uninstall/index.js.map +1 -1
- package/dist/cli/uninstall/register.d.ts +5 -0
- package/dist/cli/uninstall/register.js +171 -0
- package/dist/cli/uninstall/register.js.map +1 -0
- package/dist/cli/uninstall/snapshot.d.ts +15 -0
- package/dist/cli/uninstall/snapshot.js +38 -0
- package/dist/cli/uninstall/snapshot.js.map +1 -1
- package/dist/cli/validate/checks.d.ts +0 -77
- package/dist/cli/validate/checks.js +3 -1049
- package/dist/cli/validate/checks.js.map +1 -1
- package/dist/cli/validate/index.js +19 -15
- package/dist/cli/validate/index.js.map +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -3
- package/dist/index.js.map +1 -1
- package/dist/io/claude-mcp.d.ts +1 -1
- package/dist/io/claude-mcp.js +27 -14
- package/dist/io/claude-mcp.js.map +1 -1
- package/dist/io/harness-lock.js +2 -2
- package/dist/io/harness-lock.js.map +1 -1
- package/dist/io/lock.d.ts +0 -26
- package/dist/io/lock.js +10 -27
- package/dist/io/lock.js.map +1 -1
- package/dist/io/merge-settings.js +6 -4
- package/dist/io/merge-settings.js.map +1 -1
- package/dist/io/project-name.d.ts +22 -39
- package/dist/io/project-name.js +25 -42
- package/dist/io/project-name.js.map +1 -1
- package/dist/io/read-regular-file.d.ts +103 -40
- package/dist/io/read-regular-file.js +196 -35
- package/dist/io/read-regular-file.js.map +1 -1
- package/dist/io/restart-hints.js +3 -6
- package/dist/io/restart-hints.js.map +1 -1
- package/dist/io/version-compare.d.ts +1 -3
- package/dist/io/version-compare.js +1 -3
- package/dist/io/version-compare.js.map +1 -1
- package/dist/io/write-regular-file.d.ts +30 -0
- package/dist/io/write-regular-file.js +85 -0
- package/dist/io/write-regular-file.js.map +1 -0
- package/dist/overrides/index.d.ts +1 -0
- package/dist/overrides/index.js +1 -0
- package/dist/overrides/index.js.map +1 -1
- package/dist/overrides/merge-layers.d.ts +43 -0
- package/dist/overrides/merge-layers.js +76 -0
- package/dist/overrides/merge-layers.js.map +1 -0
- package/dist/overrides/merge.d.ts +16 -0
- package/dist/overrides/merge.js +21 -8
- package/dist/overrides/merge.js.map +1 -1
- package/dist/policy-packs/builtin/branch-protection-runtime.d.ts +4 -69
- package/dist/policy-packs/builtin/branch-protection-runtime.js +12 -84
- package/dist/policy-packs/builtin/branch-protection-runtime.js.map +1 -1
- package/dist/policy-packs/builtin/branch-protection.d.ts +7 -30
- package/dist/policy-packs/builtin/branch-protection.js +56 -89
- package/dist/policy-packs/builtin/branch-protection.js.map +1 -1
- package/dist/policy-packs/config-check.d.ts +7 -5
- package/dist/policy-packs/config-check.js +2 -2
- package/dist/policy-packs/config-check.js.map +1 -1
- package/dist/policy-packs/expand.d.ts +1 -3
- package/dist/policy-packs/expand.js +5 -42
- package/dist/policy-packs/expand.js.map +1 -1
- package/dist/policy-packs/index.d.ts +3 -3
- package/dist/policy-packs/index.js +2 -2
- package/dist/policy-packs/index.js.map +1 -1
- package/dist/policy-packs/registry.d.ts +9 -38
- package/dist/policy-packs/registry.js +5 -65
- package/dist/policy-packs/registry.js.map +1 -1
- package/dist/policy-packs/runtime.d.ts +0 -4
- package/dist/policy-packs/runtime.js +9 -22
- package/dist/policy-packs/runtime.js.map +1 -1
- package/dist/policy-packs/types.d.ts +0 -19
- package/dist/policy-packs/ux-compare.d.ts +1 -11
- package/dist/policy-packs/ux-compare.js +6 -42
- package/dist/policy-packs/ux-compare.js.map +1 -1
- package/dist/policy-packs/ux-drift-check.d.ts +5 -5
- package/dist/policy-packs/ux-drift-check.js +17 -22
- package/dist/policy-packs/ux-drift-check.js.map +1 -1
- package/dist/policy-packs/version-check.d.ts +5 -26
- package/dist/policy-packs/version-check.js +19 -74
- package/dist/policy-packs/version-check.js.map +1 -1
- package/dist/probes/memory.d.ts +1 -1
- package/dist/probes/memory.js +1 -1
- package/dist/probes/memory.js.map +1 -1
- package/dist/runtime/agent-facing.d.ts +9 -0
- package/dist/runtime/agent-facing.js +28 -14
- package/dist/runtime/agent-facing.js.map +1 -1
- package/dist/runtime/bounded-text.d.ts +15 -0
- package/dist/runtime/bounded-text.js +27 -0
- package/dist/runtime/bounded-text.js.map +1 -0
- package/dist/runtime/git-branch.d.ts +125 -0
- package/dist/runtime/git-branch.js +381 -0
- package/dist/runtime/git-branch.js.map +1 -0
- package/dist/runtime/hermetic-spawn-guard.d.ts +2 -2
- package/dist/runtime/hermetic-spawn-guard.js +24 -34
- package/dist/runtime/hermetic-spawn-guard.js.map +1 -1
- package/dist/runtime/home-dir.js +3 -2
- package/dist/runtime/home-dir.js.map +1 -1
- package/dist/runtime/tool-name-aliases.d.ts +0 -6
- package/dist/runtime/tool-name-aliases.js +5 -18
- package/dist/runtime/tool-name-aliases.js.map +1 -1
- package/dist/schema/grounding.d.ts +7 -54
- package/dist/schema/grounding.js +10 -12
- package/dist/schema/grounding.js.map +1 -1
- package/dist/schema/hooks.d.ts +39 -136
- package/dist/schema/hooks.js +3 -6
- package/dist/schema/hooks.js.map +1 -1
- package/dist/schema/index.d.ts +114 -3828
- package/dist/schema/index.js +41 -80
- package/dist/schema/index.js.map +1 -1
- package/dist/schema/memory.d.ts +54 -131
- package/dist/schema/memory.js +2 -2
- package/dist/schema/memory.js.map +1 -1
- package/dist/schema/policy-packs.d.ts +3 -45
- package/dist/schema/policy-packs.js +7 -13
- package/dist/schema/policy-packs.js.map +1 -1
- package/dist/schema/policy-ux.d.ts +7 -0
- package/dist/schema/policy-ux.js +18 -0
- package/dist/schema/policy-ux.js.map +1 -0
- package/dist/schema/removed-keys.d.ts +185 -0
- package/dist/schema/removed-keys.js +531 -0
- package/dist/schema/removed-keys.js.map +1 -0
- package/dist/schema/tools.d.ts +30 -268
- package/dist/schema/tools.js +4 -4
- package/dist/schema/tools.js.map +1 -1
- package/package.json +5 -16
- package/dist/cli/approve/branch-protection.d.ts +0 -69
- package/dist/cli/approve/branch-protection.js +0 -144
- package/dist/cli/approve/branch-protection.js.map +0 -1
- package/dist/cli/approve/risk.d.ts +0 -112
- package/dist/cli/approve/risk.js +0 -197
- package/dist/cli/approve/risk.js.map +0 -1
- package/dist/cli/approve/stdin-report.d.ts +0 -57
- package/dist/cli/approve/stdin-report.js +0 -145
- package/dist/cli/approve/stdin-report.js.map +0 -1
- package/dist/cli/approve/understanding.d.ts +0 -410
- package/dist/cli/approve/understanding.js +0 -996
- package/dist/cli/approve/understanding.js.map +0 -1
- package/dist/cli/audit.d.ts +0 -80
- package/dist/cli/audit.js +0 -252
- package/dist/cli/audit.js.map +0 -1
- package/dist/cli/delegate/index.d.ts +0 -76
- package/dist/cli/delegate/index.js +0 -443
- package/dist/cli/delegate/index.js.map +0 -1
- package/dist/cli/doctor/auto-approve-mode.d.ts +0 -37
- package/dist/cli/doctor/auto-approve-mode.js +0 -80
- package/dist/cli/doctor/auto-approve-mode.js.map +0 -1
- package/dist/cli/doctor/bypass-without-auto-approve.d.ts +0 -38
- package/dist/cli/doctor/bypass-without-auto-approve.js +0 -95
- package/dist/cli/doctor/bypass-without-auto-approve.js.map +0 -1
- package/dist/cli/doctor/codex-config-drift.d.ts +0 -28
- package/dist/cli/doctor/codex-config-drift.js +0 -240
- package/dist/cli/doctor/codex-config-drift.js.map +0 -1
- package/dist/cli/doctor/rogue-ledger.d.ts +0 -53
- package/dist/cli/doctor/rogue-ledger.js +0 -153
- package/dist/cli/doctor/rogue-ledger.js.map +0 -1
- package/dist/cli/doctor/session-start-preflight-setup-version.d.ts +0 -83
- package/dist/cli/doctor/session-start-preflight-setup-version.js +0 -114
- package/dist/cli/doctor/session-start-preflight-setup-version.js.map +0 -1
- package/dist/cli/doctor/settings-drift.d.ts +0 -25
- package/dist/cli/doctor/settings-drift.js +0 -213
- package/dist/cli/doctor/settings-drift.js.map +0 -1
- package/dist/cli/doctor/toolchain-parity.d.ts +0 -63
- package/dist/cli/doctor/toolchain-parity.js +0 -154
- package/dist/cli/doctor/toolchain-parity.js.map +0 -1
- package/dist/cli/doctor/ug-auto-approvals.d.ts +0 -40
- package/dist/cli/doctor/ug-auto-approvals.js +0 -91
- package/dist/cli/doctor/ug-auto-approvals.js.map +0 -1
- package/dist/cli/doctor/ug-delegations.d.ts +0 -26
- package/dist/cli/doctor/ug-delegations.js +0 -121
- package/dist/cli/doctor/ug-delegations.js.map +0 -1
- package/dist/cli/doctor/ug-inflight.d.ts +0 -35
- package/dist/cli/doctor/ug-inflight.js +0 -57
- package/dist/cli/doctor/ug-inflight.js.map +0 -1
- package/dist/cli/doctor/understanding-mode-env.d.ts +0 -51
- package/dist/cli/doctor/understanding-mode-env.js +0 -98
- package/dist/cli/doctor/understanding-mode-env.js.map +0 -1
- package/dist/cli/dry-run.d.ts +0 -46
- package/dist/cli/dry-run.js +0 -250
- package/dist/cli/dry-run.js.map +0 -1
- package/dist/cli/event-input.d.ts +0 -28
- package/dist/cli/event-input.js +0 -73
- package/dist/cli/event-input.js.map +0 -1
- package/dist/cli/explain-action.d.ts +0 -20
- package/dist/cli/explain-action.js +0 -27
- package/dist/cli/explain-action.js.map +0 -1
- package/dist/cli/explain-policy.d.ts +0 -135
- package/dist/cli/explain-policy.js +0 -266
- package/dist/cli/explain-policy.js.map +0 -1
- package/dist/cli/explain.d.ts +0 -31
- package/dist/cli/explain.js +0 -159
- package/dist/cli/explain.js.map +0 -1
- package/dist/cli/gc/index.d.ts +0 -63
- package/dist/cli/gc/index.js +0 -566
- package/dist/cli/gc/index.js.map +0 -1
- package/dist/cli/pack/approve-escape.d.ts +0 -19
- package/dist/cli/pack/approve-escape.js +0 -190
- package/dist/cli/pack/approve-escape.js.map +0 -1
- package/dist/cli/pack/auto-approve-path.d.ts +0 -146
- package/dist/cli/pack/auto-approve-path.js +0 -462
- package/dist/cli/pack/auto-approve-path.js.map +0 -1
- package/dist/cli/pack/hook-codex-post-tool-use.d.ts +0 -25
- package/dist/cli/pack/hook-codex-post-tool-use.js +0 -160
- package/dist/cli/pack/hook-codex-post-tool-use.js.map +0 -1
- package/dist/cli/pack/hook-codex-pre-tool-use.d.ts +0 -48
- package/dist/cli/pack/hook-codex-pre-tool-use.js +0 -474
- package/dist/cli/pack/hook-codex-pre-tool-use.js.map +0 -1
- package/dist/cli/pack/hook-codex-stop.d.ts +0 -35
- package/dist/cli/pack/hook-codex-stop.js +0 -329
- package/dist/cli/pack/hook-codex-stop.js.map +0 -1
- package/dist/cli/pack/hook-codex-user-prompt-submit.d.ts +0 -24
- package/dist/cli/pack/hook-codex-user-prompt-submit.js +0 -93
- package/dist/cli/pack/hook-codex-user-prompt-submit.js.map +0 -1
- package/dist/cli/pack/hook-post-merge-gate-record.d.ts +0 -37
- package/dist/cli/pack/hook-post-merge-gate-record.js +0 -190
- package/dist/cli/pack/hook-post-merge-gate-record.js.map +0 -1
- package/dist/cli/pack/hook-post-merge-gate.d.ts +0 -34
- package/dist/cli/pack/hook-post-merge-gate.js +0 -277
- package/dist/cli/pack/hook-post-merge-gate.js.map +0 -1
- package/dist/cli/pack/hook-post-tool-use.d.ts +0 -45
- package/dist/cli/pack/hook-post-tool-use.js +0 -137
- package/dist/cli/pack/hook-post-tool-use.js.map +0 -1
- package/dist/cli/pack/hook-pre-tool-use.d.ts +0 -92
- package/dist/cli/pack/hook-pre-tool-use.js +0 -1328
- package/dist/cli/pack/hook-pre-tool-use.js.map +0 -1
- package/dist/cli/pack/hook-runtime-reality.d.ts +0 -63
- package/dist/cli/pack/hook-runtime-reality.js +0 -210
- package/dist/cli/pack/hook-runtime-reality.js.map +0 -1
- package/dist/cli/pack/hook-solution-acceptance-writeguard.d.ts +0 -32
- package/dist/cli/pack/hook-solution-acceptance-writeguard.js +0 -337
- package/dist/cli/pack/hook-solution-acceptance-writeguard.js.map +0 -1
- package/dist/cli/pack/hook-solution-acceptance.d.ts +0 -157
- package/dist/cli/pack/hook-solution-acceptance.js +0 -530
- package/dist/cli/pack/hook-solution-acceptance.js.map +0 -1
- package/dist/cli/pack/hook-stay-in-scope.d.ts +0 -37
- package/dist/cli/pack/hook-stay-in-scope.js +0 -128
- package/dist/cli/pack/hook-stay-in-scope.js.map +0 -1
- package/dist/cli/pack/hook-subagent-start.d.ts +0 -23
- package/dist/cli/pack/hook-subagent-start.js +0 -88
- package/dist/cli/pack/hook-subagent-start.js.map +0 -1
- package/dist/cli/pack/hook-subagent-stop.d.ts +0 -19
- package/dist/cli/pack/hook-subagent-stop.js +0 -41
- package/dist/cli/pack/hook-subagent-stop.js.map +0 -1
- package/dist/cli/pack/hook-track-active-claim.d.ts +0 -27
- package/dist/cli/pack/hook-track-active-claim.js +0 -275
- package/dist/cli/pack/hook-track-active-claim.js.map +0 -1
- package/dist/cli/pack/transcript-report-scan.d.ts +0 -71
- package/dist/cli/pack/transcript-report-scan.js +0 -359
- package/dist/cli/pack/transcript-report-scan.js.map +0 -1
- package/dist/cli/pack/understanding-report-schema-hint.d.ts +0 -26
- package/dist/cli/pack/understanding-report-schema-hint.js +0 -120
- package/dist/cli/pack/understanding-report-schema-hint.js.map +0 -1
- package/dist/cli/pack/upgrade.d.ts +0 -32
- package/dist/cli/pack/upgrade.js +0 -273
- package/dist/cli/pack/upgrade.js.map +0 -1
- package/dist/cli/pause/index.d.ts +0 -113
- package/dist/cli/pause/index.js +0 -251
- package/dist/cli/pause/index.js.map +0 -1
- package/dist/cli/pause-check.d.ts +0 -22
- package/dist/cli/pause-check.js +0 -54
- package/dist/cli/pause-check.js.map +0 -1
- package/dist/cli/policy/intercept.d.ts +0 -233
- package/dist/cli/policy/intercept.js +0 -1020
- package/dist/cli/policy/intercept.js.map +0 -1
- package/dist/cli/policy/risk-envelope-enrichment.d.ts +0 -40
- package/dist/cli/policy/risk-envelope-enrichment.js +0 -108
- package/dist/cli/policy/risk-envelope-enrichment.js.map +0 -1
- package/dist/cli/record/index.d.ts +0 -81
- package/dist/cli/record/index.js +0 -348
- package/dist/cli/record/index.js.map +0 -1
- package/dist/cli/resolve-env.d.ts +0 -32
- package/dist/cli/resolve-env.js +0 -47
- package/dist/cli/resolve-env.js.map +0 -1
- package/dist/cli/session-export/index.d.ts +0 -46
- package/dist/cli/session-export/index.js +0 -169
- package/dist/cli/session-export/index.js.map +0 -1
- package/dist/cli/session-export/redact.d.ts +0 -22
- package/dist/cli/session-export/redact.js +0 -47
- package/dist/cli/session-export/redact.js.map +0 -1
- package/dist/cli/session-export/transcript.d.ts +0 -24
- package/dist/cli/session-export/transcript.js +0 -164
- package/dist/cli/session-export/transcript.js.map +0 -1
- package/dist/cli/session-start/branch-check.d.ts +0 -18
- package/dist/cli/session-start/branch-check.js +0 -140
- package/dist/cli/session-start/branch-check.js.map +0 -1
- package/dist/cli/session-start/index.d.ts +0 -121
- package/dist/cli/session-start/index.js +0 -591
- package/dist/cli/session-start/index.js.map +0 -1
- package/dist/cli/session-start/shared-options.d.ts +0 -103
- package/dist/cli/session-start/shared-options.js +0 -107
- package/dist/cli/session-start/shared-options.js.map +0 -1
- package/dist/cli/session-start/stale-base-check.d.ts +0 -46
- package/dist/cli/session-start/stale-base-check.js +0 -352
- package/dist/cli/session-start/stale-base-check.js.map +0 -1
- package/dist/cli/session-start/toolchain-parity.d.ts +0 -267
- package/dist/cli/session-start/toolchain-parity.js +0 -797
- package/dist/cli/session-start/toolchain-parity.js.map +0 -1
- package/dist/cli/smoke/assertions.d.ts +0 -46
- package/dist/cli/smoke/assertions.js +0 -170
- package/dist/cli/smoke/assertions.js.map +0 -1
- package/dist/cli/smoke/index.d.ts +0 -76
- package/dist/cli/smoke/index.js +0 -245
- package/dist/cli/smoke/index.js.map +0 -1
- package/dist/cli/smoke/runner.d.ts +0 -55
- package/dist/cli/smoke/runner.js +0 -134
- package/dist/cli/smoke/runner.js.map +0 -1
- package/dist/cli/smoke/stream-parser.d.ts +0 -65
- package/dist/cli/smoke/stream-parser.js +0 -115
- package/dist/cli/smoke/stream-parser.js.map +0 -1
- package/dist/cli/test-risk.d.ts +0 -26
- package/dist/cli/test-risk.js +0 -34
- package/dist/cli/test-risk.js.map +0 -1
- package/dist/io/display-path.d.ts +0 -11
- package/dist/io/display-path.js +0 -29
- package/dist/io/display-path.js.map +0 -1
- package/dist/io/duration.d.ts +0 -5
- package/dist/io/duration.js +0 -50
- package/dist/io/duration.js.map +0 -1
- package/dist/io/extract.d.ts +0 -79
- package/dist/io/extract.js +0 -226
- package/dist/io/extract.js.map +0 -1
- package/dist/io/ledger-record.d.ts +0 -83
- package/dist/io/ledger-record.js +0 -301
- package/dist/io/ledger-record.js.map +0 -1
- package/dist/io/read-json-dir-entries.d.ts +0 -36
- package/dist/io/read-json-dir-entries.js +0 -48
- package/dist/io/read-json-dir-entries.js.map +0 -1
- package/dist/io/safe-json-parse.d.ts +0 -5
- package/dist/io/safe-json-parse.js +0 -21
- package/dist/io/safe-json-parse.js.map +0 -1
- package/dist/policies/index.d.ts +0 -5
- package/dist/policies/index.js +0 -6
- package/dist/policies/index.js.map +0 -1
- package/dist/policies/ledger-client.d.ts +0 -113
- package/dist/policies/ledger-client.js +0 -500
- package/dist/policies/ledger-client.js.map +0 -1
- package/dist/policies/producers.d.ts +0 -12
- package/dist/policies/producers.js +0 -61
- package/dist/policies/producers.js.map +0 -1
- package/dist/policies/requires.d.ts +0 -75
- package/dist/policies/requires.js +0 -240
- package/dist/policies/requires.js.map +0 -1
- package/dist/policies/timestamp.d.ts +0 -14
- package/dist/policies/timestamp.js +0 -36
- package/dist/policies/timestamp.js.map +0 -1
- package/dist/policy-packs/builtin/permission-profiles.d.ts +0 -11
- package/dist/policy-packs/builtin/permission-profiles.js +0 -74
- package/dist/policy-packs/builtin/permission-profiles.js.map +0 -1
- package/dist/policy-packs/builtin/post-merge-gate-runtime.d.ts +0 -286
- package/dist/policy-packs/builtin/post-merge-gate-runtime.js +0 -397
- package/dist/policy-packs/builtin/post-merge-gate-runtime.js.map +0 -1
- package/dist/policy-packs/builtin/post-merge-gate.d.ts +0 -56
- package/dist/policy-packs/builtin/post-merge-gate.js +0 -347
- package/dist/policy-packs/builtin/post-merge-gate.js.map +0 -1
- package/dist/policy-packs/builtin/solution-acceptance-reconnect.d.ts +0 -50
- package/dist/policy-packs/builtin/solution-acceptance-reconnect.js +0 -151
- package/dist/policy-packs/builtin/solution-acceptance-reconnect.js.map +0 -1
- package/dist/policy-packs/builtin/solution-acceptance-runtime.d.ts +0 -323
- package/dist/policy-packs/builtin/solution-acceptance-runtime.js +0 -672
- package/dist/policy-packs/builtin/solution-acceptance-runtime.js.map +0 -1
- package/dist/policy-packs/builtin/solution-acceptance.d.ts +0 -45
- package/dist/policy-packs/builtin/solution-acceptance.js +0 -226
- package/dist/policy-packs/builtin/solution-acceptance.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/active-claim.d.ts +0 -25
- package/dist/policy-packs/builtin/understanding-before-execution/active-claim.js +0 -94
- package/dist/policy-packs/builtin/understanding-before-execution/active-claim.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/auto-approve-default.d.ts +0 -35
- package/dist/policy-packs/builtin/understanding-before-execution/auto-approve-default.js +0 -86
- package/dist/policy-packs/builtin/understanding-before-execution/auto-approve-default.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/auto-approve.d.ts +0 -210
- package/dist/policy-packs/builtin/understanding-before-execution/auto-approve.js +0 -361
- package/dist/policy-packs/builtin/understanding-before-execution/auto-approve.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/delegation-markers.d.ts +0 -304
- package/dist/policy-packs/builtin/understanding-before-execution/delegation-markers.js +0 -734
- package/dist/policy-packs/builtin/understanding-before-execution/delegation-markers.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/expiry-reason.d.ts +0 -36
- package/dist/policy-packs/builtin/understanding-before-execution/expiry-reason.js +0 -73
- package/dist/policy-packs/builtin/understanding-before-execution/expiry-reason.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/index.d.ts +0 -19
- package/dist/policy-packs/builtin/understanding-before-execution/index.js +0 -83
- package/dist/policy-packs/builtin/understanding-before-execution/index.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/inflight-records.d.ts +0 -135
- package/dist/policy-packs/builtin/understanding-before-execution/inflight-records.js +0 -618
- package/dist/policy-packs/builtin/understanding-before-execution/inflight-records.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/ledger.d.ts +0 -25
- package/dist/policy-packs/builtin/understanding-before-execution/ledger.js +0 -56
- package/dist/policy-packs/builtin/understanding-before-execution/ledger.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.d.ts +0 -20
- package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.js +0 -93
- package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/markers.d.ts +0 -126
- package/dist/policy-packs/builtin/understanding-before-execution/markers.js +0 -245
- package/dist/policy-packs/builtin/understanding-before-execution/markers.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/measured-permission-modes.d.ts +0 -29
- package/dist/policy-packs/builtin/understanding-before-execution/measured-permission-modes.js +0 -82
- package/dist/policy-packs/builtin/understanding-before-execution/measured-permission-modes.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/permission-mode-observations.d.ts +0 -71
- package/dist/policy-packs/builtin/understanding-before-execution/permission-mode-observations.js +0 -175
- package/dist/policy-packs/builtin/understanding-before-execution/permission-mode-observations.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.d.ts +0 -620
- package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js +0 -1047
- package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.d.ts +0 -128
- package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.js +0 -213
- package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/stay-in-scope-config.d.ts +0 -129
- package/dist/policy-packs/builtin/understanding-before-execution/stay-in-scope-config.js +0 -166
- package/dist/policy-packs/builtin/understanding-before-execution/stay-in-scope-config.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution/task-markers.d.ts +0 -164
- package/dist/policy-packs/builtin/understanding-before-execution/task-markers.js +0 -275
- package/dist/policy-packs/builtin/understanding-before-execution/task-markers.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution-runtime.d.ts +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution-runtime.js +0 -10
- package/dist/policy-packs/builtin/understanding-before-execution-runtime.js.map +0 -1
- package/dist/policy-packs/builtin/understanding-before-execution.d.ts +0 -526
- package/dist/policy-packs/builtin/understanding-before-execution.js +0 -1074
- package/dist/policy-packs/builtin/understanding-before-execution.js.map +0 -1
- package/dist/policy-packs/permission-translator.d.ts +0 -9
- package/dist/policy-packs/permission-translator.js +0 -76
- package/dist/policy-packs/permission-translator.js.map +0 -1
- package/dist/runtime/action-envelope.d.ts +0 -64
- package/dist/runtime/action-envelope.js +0 -46
- package/dist/runtime/action-envelope.js.map +0 -1
- package/dist/runtime/approval-signing.d.ts +0 -111
- package/dist/runtime/approval-signing.js +0 -384
- package/dist/runtime/approval-signing.js.map +0 -1
- package/dist/runtime/bash-match-facts.d.ts +0 -60
- package/dist/runtime/bash-match-facts.js +0 -196
- package/dist/runtime/bash-match-facts.js.map +0 -1
- package/dist/runtime/bash-match-registry.d.ts +0 -112
- package/dist/runtime/bash-match-registry.js +0 -406
- package/dist/runtime/bash-match-registry.js.map +0 -1
- package/dist/runtime/bash-prefix-parse.d.ts +0 -31
- package/dist/runtime/bash-prefix-parse.js +0 -576
- package/dist/runtime/bash-prefix-parse.js.map +0 -1
- package/dist/runtime/command-normalize.d.ts +0 -658
- package/dist/runtime/command-normalize.js +0 -2410
- package/dist/runtime/command-normalize.js.map +0 -1
- package/dist/runtime/deletion-target-resolve.d.ts +0 -28
- package/dist/runtime/deletion-target-resolve.js +0 -1078
- package/dist/runtime/deletion-target-resolve.js.map +0 -1
- package/dist/runtime/destructive-shell-floor.d.ts +0 -19
- package/dist/runtime/destructive-shell-floor.js +0 -611
- package/dist/runtime/destructive-shell-floor.js.map +0 -1
- package/dist/runtime/environment-resolver.d.ts +0 -36
- package/dist/runtime/environment-resolver.js +0 -138
- package/dist/runtime/environment-resolver.js.map +0 -1
- package/dist/runtime/git-context.d.ts +0 -201
- package/dist/runtime/git-context.js +0 -422
- package/dist/runtime/git-context.js.map +0 -1
- package/dist/runtime/index.d.ts +0 -12
- package/dist/runtime/index.js +0 -13
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/intercept.d.ts +0 -494
- package/dist/runtime/intercept.js +0 -1313
- package/dist/runtime/intercept.js.map +0 -1
- package/dist/runtime/kube-context.d.ts +0 -16
- package/dist/runtime/kube-context.js +0 -63
- package/dist/runtime/kube-context.js.map +0 -1
- package/dist/runtime/kubectl-target-parse.d.ts +0 -31
- package/dist/runtime/kubectl-target-parse.js +0 -249
- package/dist/runtime/kubectl-target-parse.js.map +0 -1
- package/dist/runtime/ledger-add.d.ts +0 -16
- package/dist/runtime/ledger-add.js +0 -150
- package/dist/runtime/ledger-add.js.map +0 -1
- package/dist/runtime/ledger-writer.d.ts +0 -27
- package/dist/runtime/ledger-writer.js +0 -46
- package/dist/runtime/ledger-writer.js.map +0 -1
- package/dist/runtime/pause-sentinel.d.ts +0 -60
- package/dist/runtime/pause-sentinel.js +0 -156
- package/dist/runtime/pause-sentinel.js.map +0 -1
- package/dist/runtime/pending-approval.d.ts +0 -23
- package/dist/runtime/pending-approval.js +0 -67
- package/dist/runtime/pending-approval.js.map +0 -1
- package/dist/runtime/read-only-bash.d.ts +0 -141
- package/dist/runtime/read-only-bash.js +0 -2204
- package/dist/runtime/read-only-bash.js.map +0 -1
- package/dist/runtime/recovery-git-commit.d.ts +0 -22
- package/dist/runtime/recovery-git-commit.js +0 -284
- package/dist/runtime/recovery-git-commit.js.map +0 -1
- package/dist/runtime/reject-malformed-session-id.d.ts +0 -8
- package/dist/runtime/reject-malformed-session-id.js +0 -16
- package/dist/runtime/reject-malformed-session-id.js.map +0 -1
- package/dist/runtime/risk-classifier.d.ts +0 -38
- package/dist/runtime/risk-classifier.js +0 -311
- package/dist/runtime/risk-classifier.js.map +0 -1
- package/dist/runtime/session-id.d.ts +0 -113
- package/dist/runtime/session-id.js +0 -193
- package/dist/runtime/session-id.js.map +0 -1
- package/dist/runtime/shell-word.d.ts +0 -62
- package/dist/runtime/shell-word.js +0 -410
- package/dist/runtime/shell-word.js.map +0 -1
- package/dist/runtime/task-providers/agent-tasks.d.ts +0 -103
- package/dist/runtime/task-providers/agent-tasks.js +0 -245
- package/dist/runtime/task-providers/agent-tasks.js.map +0 -1
- package/dist/runtime/when-eval.d.ts +0 -62
- package/dist/runtime/when-eval.js +0 -212
- package/dist/runtime/when-eval.js.map +0 -1
- package/dist/runtime/workflow-policies.d.ts +0 -207
- package/dist/runtime/workflow-policies.js +0 -596
- package/dist/runtime/workflow-policies.js.map +0 -1
- package/dist/schema/audit.d.ts +0 -71
- package/dist/schema/audit.js +0 -32
- package/dist/schema/audit.js.map +0 -1
- package/dist/schema/doctor.d.ts +0 -25
- package/dist/schema/doctor.js +0 -23
- package/dist/schema/doctor.js.map +0 -1
- package/dist/schema/environments.d.ts +0 -215
- package/dist/schema/environments.js +0 -101
- package/dist/schema/environments.js.map +0 -1
- package/dist/schema/extract.d.ts +0 -9
- package/dist/schema/extract.js +0 -86
- package/dist/schema/extract.js.map +0 -1
- package/dist/schema/permission-profiles.d.ts +0 -2292
- package/dist/schema/permission-profiles.js +0 -60
- package/dist/schema/permission-profiles.js.map +0 -1
- package/dist/schema/policies.d.ts +0 -974
- package/dist/schema/policies.js +0 -298
- package/dist/schema/policies.js.map +0 -1
- package/dist/schema/requires.d.ts +0 -131
- package/dist/schema/requires.js +0 -88
- package/dist/schema/requires.js.map +0 -1
- package/dist/schema/risk.d.ts +0 -144
- package/dist/schema/risk.js +0 -194
- package/dist/schema/risk.js.map +0 -1
- package/dist/schema/session-start-preflight.d.ts +0 -10
- package/dist/schema/session-start-preflight.js +0 -106
- package/dist/schema/session-start-preflight.js.map +0 -1
- package/dist/schema/stale-base-check.d.ts +0 -18
- package/dist/schema/stale-base-check.js +0 -37
- package/dist/schema/stale-base-check.js.map +0 -1
- package/dist/schema/toolchain-parity.d.ts +0 -21
- package/dist/schema/toolchain-parity.js +0 -48
- package/dist/schema/toolchain-parity.js.map +0 -1
- package/dist/schema/workflows.d.ts +0 -519
- package/dist/schema/workflows.js +0 -81
- package/dist/schema/workflows.js.map +0 -1
- package/scripts/runtime-reality-docker-probe.mjs +0 -71
|
@@ -20,21 +20,14 @@
|
|
|
20
20
|
// UNIT: Claude Code's settings.json `timeout` is documented in SECONDS,
|
|
21
21
|
// not milliseconds like the manifest's `budget_ms`; see
|
|
22
22
|
// `hookTimeoutSeconds` below for the conversion and its history.
|
|
23
|
-
// -
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
// (
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
// `
|
|
31
|
-
// the script's behaviour can be cross-checked, but `harness apply`
|
|
32
|
-
// does not synthesise wrapper shell to enforce them. Wrapping was
|
|
33
|
-
// considered and rejected: it (a) doubles the surface for hook bugs,
|
|
34
|
-
// (b) hard-codes shell semantics into the manifest projection, and
|
|
35
|
-
// (c) the canonical hook scripts already enforce these filters.
|
|
36
|
-
// - `blocking` is harness-internal: it tells `validate`/`doctor` how to
|
|
37
|
-
// classify a hook for soft/hard-failure reporting. Claude Code's
|
|
23
|
+
// - Hook-level filters beyond the tool-name `match` do not exist in the
|
|
24
|
+
// manifest: `hooks[].path_match` and `hooks[].bash_match` were never
|
|
25
|
+
// projected (Claude Code's settings.json `matcher` filters only on the
|
|
26
|
+
// tool name) and are removed keys that the manifest load strips with a
|
|
27
|
+
// warning (src/schema/removed-keys.ts). A hook script filters on whatever
|
|
28
|
+
// it needs to by itself.
|
|
29
|
+
// - `blocking` is harness-internal: declared intent that `doctor`,
|
|
30
|
+
// `list` and `describe` display; nothing enforces it. Claude Code's
|
|
38
31
|
// settings.json has no documented equivalent (verified against the
|
|
39
32
|
// ecosystem as of 2026-04 — revisit if a runtime field appears), so
|
|
40
33
|
// it does NOT survive the projection.
|
|
@@ -46,16 +39,12 @@
|
|
|
46
39
|
// - Within an event, groups sorted by (matcher, command).
|
|
47
40
|
// - Within a group, the inner hooks[] preserves matcher-grouping order
|
|
48
41
|
// and is sorted by command for the same reason.
|
|
49
|
-
import * as path from "node:path";
|
|
50
42
|
import { expandHome } from "../../io/expand-home.js";
|
|
51
|
-
import { signingKeyPathFor } from "../../runtime/approval-signing.js";
|
|
52
43
|
export const DEFAULT_BUDGET_MS = 30_000;
|
|
53
44
|
/** The manifest `tools.mcp[]` entry name that grounding enforcement keys off. */
|
|
54
45
|
export const GROUNDING_MCP_SERVER_NAME = "grounding-mcp";
|
|
55
46
|
/** The env var grounding-mcp's ledger-bridge reads for the evidence-ledger DB path. */
|
|
56
47
|
export const EVIDENCE_LEDGER_DB_ENV = "EVIDENCE_LEDGER_DB";
|
|
57
|
-
/** The env var grounding-mcp (>= 0.8.0) reads for the harness's own approval-marker signing-key path. */
|
|
58
|
-
export const SOLUTION_VERDICT_SIGNING_KEY_ENV = "SOLUTION_VERDICT_SIGNING_KEY";
|
|
59
48
|
export function generateSettings(manifest) {
|
|
60
49
|
return generateSettingsWithWarnings(manifest).root;
|
|
61
50
|
}
|
|
@@ -93,27 +82,11 @@ export function generateSettingsWithWarnings(manifest, extras = {}) {
|
|
|
93
82
|
// GenerateSettingsResult.mcpServers.
|
|
94
83
|
const desiredMcp = buildDesiredMcpServers(manifest, {
|
|
95
84
|
homeDir: extras.homeDir,
|
|
96
|
-
generatedDir: extras.generatedDir,
|
|
97
85
|
});
|
|
98
86
|
warnings.push(...desiredMcp.warnings);
|
|
99
87
|
const mcp = desiredMcp.mcp;
|
|
100
|
-
const permissions = compactPermissions(extras.packPermissions);
|
|
101
|
-
if (permissions)
|
|
102
|
-
out.permissions = permissions;
|
|
103
88
|
return { root: out, warnings, mcpServers: mcp };
|
|
104
89
|
}
|
|
105
|
-
function compactPermissions(p) {
|
|
106
|
-
if (!p)
|
|
107
|
-
return null;
|
|
108
|
-
const out = {};
|
|
109
|
-
if (p.allow && p.allow.length > 0)
|
|
110
|
-
out.allow = [...p.allow].sort();
|
|
111
|
-
if (p.ask && p.ask.length > 0)
|
|
112
|
-
out.ask = [...p.ask].sort();
|
|
113
|
-
if (p.deny && p.deny.length > 0)
|
|
114
|
-
out.deny = [...p.deny].sort();
|
|
115
|
-
return Object.keys(out).length > 0 ? out : null;
|
|
116
|
-
}
|
|
117
90
|
// Translate manifest `tools.mcp[]` into Claude Code's `mcpServers` map.
|
|
118
91
|
// - `enabled: false` entries are dropped (matches ARCHITECTURE §3 and the
|
|
119
92
|
// asset-locking surface in harness-lock.ts: disabled MCPs are removed
|
|
@@ -188,9 +161,9 @@ export function buildMcpServers(entries, warnings) {
|
|
|
188
161
|
* - The projected value is `~`-expanded to an absolute path, so the
|
|
189
162
|
* literal-tilde child-process footgun (agent-tasks/42d224a6, the very
|
|
190
163
|
* warning above in buildMcpServers) cannot re-enter via this path.
|
|
191
|
-
* - `
|
|
192
|
-
*
|
|
193
|
-
*
|
|
164
|
+
* - `session.*` stays RESERVED: nothing consumes it yet, and projecting
|
|
165
|
+
* an env no server reads would be decorative again (`retention_days` and
|
|
166
|
+
* `policies_source` were removed from the schema, task a4d8adc5). See
|
|
194
167
|
* the status comments in src/schema/grounding.ts.
|
|
195
168
|
*/
|
|
196
169
|
function projectGroundingEnv(manifest, mcp, homeDir) {
|
|
@@ -215,97 +188,27 @@ function projectGroundingEnv(manifest, mcp, homeDir) {
|
|
|
215
188
|
export function groundingLedgerEnvValue(manifest, homeDir) {
|
|
216
189
|
return expandHome(manifest.grounding.evidence_ledger.path, homeDir);
|
|
217
190
|
}
|
|
218
|
-
/**
|
|
219
|
-
* Wire the harness's own approval-signing key path into the grounding-mcp
|
|
220
|
-
* server entry (task 03a917fd/H1, agent-grounding 9b6c4beb comment 2,
|
|
221
|
-
* Option 2), exactly mirroring `projectGroundingEnv` above.
|
|
222
|
-
*
|
|
223
|
-
* `<generatedDir>/.approval-signing.key` (see `signingKeyPathFor`,
|
|
224
|
-
* src/runtime/approval-signing.ts) becomes the `SOLUTION_VERDICT_SIGNING_KEY`
|
|
225
|
-
* env on the `tools.mcp[grounding-mcp]` entry — the variable grounding-mcp
|
|
226
|
-
* (>= 0.8.0) reads primarily and THROWS on a non-absolute value, so this
|
|
227
|
-
* projects only the fully-resolved, already-absolute key PATH, never the
|
|
228
|
-
* key bytes themselves.
|
|
229
|
-
*
|
|
230
|
-
* Rules (mirrors `projectGroundingEnv`):
|
|
231
|
-
* - Projection only fires when a grounding-mcp entry exists; without one
|
|
232
|
-
* there is no consumer.
|
|
233
|
-
* - An operator-declared `env.SOLUTION_VERDICT_SIGNING_KEY` on the entry
|
|
234
|
-
* wins — an explicit override is never clobbered (same truthiness check:
|
|
235
|
-
* an empty-string "override" is treated as absent).
|
|
236
|
-
* - No `generatedDir` passed in -> no projection, no crash. There is
|
|
237
|
-
* nothing correct to derive without it (see `GenerateSettingsExtras`).
|
|
238
|
-
* - `generatedDir` is normalized at this projection boundary before it
|
|
239
|
-
* reaches `signingKeyPathFor` (review round H1, Finding 1): `expandHome`
|
|
240
|
-
* (same idiom `projectGroundingEnv` above and `groundingLedgerEnvValue`
|
|
241
|
-
* use) then `path.resolve`, so a relative `generatedDir` or one carrying
|
|
242
|
-
* a literal `~` still projects an absolute path — the same
|
|
243
|
-
* never-a-tilde, always-absolute contract `groundingLedgerEnvValue`
|
|
244
|
-
* already gives `EVIDENCE_LEDGER_DB`. This harness never THROWS on a
|
|
245
|
-
* relative/tilde `generatedDir` the way grounding-mcp's own consumer
|
|
246
|
-
* throws on a non-absolute env value; it normalizes instead. The
|
|
247
|
-
* normalization lives in `signingKeyEnvValue` so every producer of this
|
|
248
|
-
* env value shares it (review round H1-R2: the adopt mirror in
|
|
249
|
-
* adopt/derive.ts computes the SAME value through the SAME function;
|
|
250
|
-
* a producer that hand-rolls `signingKeyPathFor` on a raw `generatedDir`
|
|
251
|
-
* reintroduces phantom adopt drift). The key FILE's on-disk location for
|
|
252
|
-
* a non-absolute `generatedDir` is a separate, tracked follow-up.
|
|
253
|
-
*/
|
|
254
|
-
function projectSigningKeyEnv(mcp, generatedDir, homeDir) {
|
|
255
|
-
const server = mcp[GROUNDING_MCP_SERVER_NAME];
|
|
256
|
-
if (!server)
|
|
257
|
-
return;
|
|
258
|
-
if (!generatedDir)
|
|
259
|
-
return;
|
|
260
|
-
const env = server.env ?? {};
|
|
261
|
-
if (!env[SOLUTION_VERDICT_SIGNING_KEY_ENV]) {
|
|
262
|
-
env[SOLUTION_VERDICT_SIGNING_KEY_ENV] = signingKeyEnvValue(generatedDir, homeDir);
|
|
263
|
-
server.env = env;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* The single source of the projected `SOLUTION_VERDICT_SIGNING_KEY` VALUE
|
|
268
|
-
* (mirrors how `EVIDENCE_LEDGER_DB` shares its value): `expandHome` +
|
|
269
|
-
* `path.resolve` on `generatedDir`, then `signingKeyPathFor`. Both the
|
|
270
|
-
* apply-side projection above and the adopt-side mirror
|
|
271
|
-
* (adopt/derive.ts) MUST call this, never `signingKeyPathFor` on a raw
|
|
272
|
-
* `generatedDir` — otherwise apply and adopt disagree for relative or
|
|
273
|
-
* literal-tilde `generatedDir` values and adopt reports phantom drift.
|
|
274
|
-
*/
|
|
275
|
-
export function signingKeyEnvValue(generatedDir, homeDir) {
|
|
276
|
-
return signingKeyPathFor(path.resolve(expandHome(generatedDir, homeDir)));
|
|
277
|
-
}
|
|
278
191
|
/**
|
|
279
192
|
* Single choke point for the manifest -> Claude-Code-shaped MCP
|
|
280
193
|
* server-spec projection (review round H1, Finding 2 — STRUCTURAL fix).
|
|
281
194
|
* Encapsulates the fixed sequence `buildMcpServers` -> `projectGroundingEnv`
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
* Before this helper existed, that sequence had to be wired into each
|
|
290
|
-
* call site by hand: three of the four remembered to call
|
|
291
|
-
* `projectSigningKeyEnv` when it was added (task 03a917fd/H1b), and
|
|
292
|
-
* doctor's registration check did not, so its "not registered, run this
|
|
293
|
-
* `claude mcp add-json ...`" hint silently omitted
|
|
294
|
-
* `SOLUTION_VERDICT_SIGNING_KEY` (review round H1, Finding 2). Routing
|
|
295
|
-
* every producer through this function means the NEXT projected env only
|
|
296
|
-
* needs to be added here once, and cannot again reach only some of the
|
|
297
|
-
* call sites.
|
|
195
|
+
* so every producer of this shape, `harness apply`'s settings.json
|
|
196
|
+
* generation (this module), the init wizard's `claude mcp` CLI wiring
|
|
197
|
+
* (`src/cli/init/interactive.ts`), the doctor registration-health check
|
|
198
|
+
* (`src/cli/doctor/claude-mcp.ts`), and the opencode config generator
|
|
199
|
+
* (`generate-opencode-config.ts`), calls this ONE function instead of
|
|
200
|
+
* hand-rolling the same sequence. A NEW projected env only needs to be
|
|
201
|
+
* added here once, and cannot reach only some of the call sites.
|
|
298
202
|
*/
|
|
299
203
|
export function buildDesiredMcpServers(manifest, opts = {}) {
|
|
300
204
|
const warnings = [];
|
|
301
205
|
const mcp = buildMcpServers(manifest.tools.mcp, warnings);
|
|
302
206
|
projectGroundingEnv(manifest, mcp, opts.homeDir);
|
|
303
|
-
projectSigningKeyEnv(mcp, opts.generatedDir, opts.homeDir);
|
|
304
207
|
return { mcp, warnings };
|
|
305
208
|
}
|
|
306
209
|
// Translate manifest `memory.router` into a synthetic UserPromptSubmit
|
|
307
|
-
// hook so per-prompt context augmentation actually fires
|
|
308
|
-
//
|
|
210
|
+
// hook so per-prompt context augmentation actually fires on prompt
|
|
211
|
+
// submit. Returns null when memory.router is absent or
|
|
309
212
|
// `enabled: false`, in which case no entry lands in settings.json.
|
|
310
213
|
//
|
|
311
214
|
// Command joining: the schema accepts `command: string[]` (min 1). For
|
|
@@ -319,10 +222,9 @@ export function buildDesiredMcpServers(manifest, opts = {}) {
|
|
|
319
222
|
// avoid spaces in installed binary paths.
|
|
320
223
|
//
|
|
321
224
|
// Timeout: `memory.router` has no manifest-level budget_ms field, so we
|
|
322
|
-
// pick 5000ms
|
|
323
|
-
//
|
|
324
|
-
//
|
|
325
|
-
// memory-file scan.
|
|
225
|
+
// pick 5000ms for prompt-submit latency: a per-prompt augmentation that
|
|
226
|
+
// visibly delays prompt-submit would be hostile UX, and 5s is generous
|
|
227
|
+
// for the router's typical memory-file scan.
|
|
326
228
|
export function buildMemoryRouterHook(manifest) {
|
|
327
229
|
const router = manifest.memory.router;
|
|
328
230
|
if (!router)
|
|
@@ -372,12 +274,10 @@ function buildGroups(hooks) {
|
|
|
372
274
|
const groups = [];
|
|
373
275
|
for (const key of matcherKeys) {
|
|
374
276
|
const groupHooks = byMatcher.get(key) ?? [];
|
|
375
|
-
// Multiple harness hooks
|
|
376
|
-
// generic `harness policy intercept` engine is the obvious case:
|
|
377
|
-
// every PreToolUse policy in the full template wires to it). Claude
|
|
277
|
+
// Multiple harness hooks can share the same command. Claude
|
|
378
278
|
// Code spawns each entry in `hooks[]` independently for the same
|
|
379
279
|
// tool event, so emitting duplicates causes redundant Node bootstraps
|
|
380
|
-
//
|
|
280
|
+
// per tool call. Dedupe by (command, timeout)
|
|
381
281
|
// inside each matcher group so only one spawn happens per
|
|
382
282
|
// logically-identical hook, regardless of how many manifest entries
|
|
383
283
|
// map to it.
|
|
@@ -410,15 +310,10 @@ function buildGroups(hooks) {
|
|
|
410
310
|
* helper is the single source of truth both projections now share so they
|
|
411
311
|
* cannot diverge again.
|
|
412
312
|
*
|
|
413
|
-
* `Math.ceil` never rounds a budget down to 0s
|
|
414
|
-
* policy intercept`, 1s otherwise) matches Codex's existing floor rationale
|
|
415
|
-
* (generate-codex-config.ts): the policy-intercept engine's own ledger
|
|
416
|
-
* round-trip regularly needs slightly longer than a bare 1s floor would
|
|
417
|
-
* allow.
|
|
313
|
+
* `Math.ceil` never rounds a budget down to 0s: every hook gets a 1s floor.
|
|
418
314
|
*/
|
|
419
315
|
export function hookTimeoutSeconds(h) {
|
|
420
|
-
|
|
421
|
-
return Math.max(minimumSeconds, Math.ceil(h.budget_ms / 1000));
|
|
316
|
+
return Math.max(1, Math.ceil(h.budget_ms / 1000));
|
|
422
317
|
}
|
|
423
318
|
function toSettingsCommand(h) {
|
|
424
319
|
return { type: "command", command: h.command, timeout: hookTimeoutSeconds(h) };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-settings.js","sourceRoot":"","sources":["../../../src/cli/apply/generate-settings.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,iFAAiF;AACjF,sEAAsE;AACtE,EAAE;AACF,sEAAsE;AACtE,EAAE;AACF,uFAAuF;AACvF,EAAE;AACF,wEAAwE;AACxE,0EAA0E;AAC1E,2EAA2E;AAC3E,kCAAkC;AAClC,6EAA6E;AAC7E,0EAA0E;AAC1E,mDAAmD;AACnD,4EAA4E;AAC5E,uEAAuE;AACvE,wEAAwE;AACxE,yEAAyE;AACzE,4EAA4E;AAC5E,4DAA4D;AAC5D,qEAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"generate-settings.js","sourceRoot":"","sources":["../../../src/cli/apply/generate-settings.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,iFAAiF;AACjF,sEAAsE;AACtE,EAAE;AACF,sEAAsE;AACtE,EAAE;AACF,uFAAuF;AACvF,EAAE;AACF,wEAAwE;AACxE,0EAA0E;AAC1E,2EAA2E;AAC3E,kCAAkC;AAClC,6EAA6E;AAC7E,0EAA0E;AAC1E,mDAAmD;AACnD,4EAA4E;AAC5E,uEAAuE;AACvE,wEAAwE;AACxE,yEAAyE;AACzE,4EAA4E;AAC5E,4DAA4D;AAC5D,qEAAqE;AACrE,0E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ED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,kBAAkB,CAAC,CAAO;IACxC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC;AACpD,CAAC;AAED,SAAS,iBAAiB,CAAC,CAAO;IAChC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;AACjF,CAAC"}
|
|
@@ -3,4 +3,4 @@ export { CodexInstallRefusalError } from "./install-codex-config.js";
|
|
|
3
3
|
export { formatNextSteps, type NextStepsContext } from "./next-steps.js";
|
|
4
4
|
export { generateCodexConfig, type CodexConfigResult } from "./generate-codex-config.js";
|
|
5
5
|
export { generateOpencodeConfig, OPENCODE_GENERATED_HEADER_LINE, type OpencodeConfigResult, type OpencodeLocalMcpServer, type OpencodeDisabledMcpServer, type OpencodeMcpEntry, } from "./generate-opencode-config.js";
|
|
6
|
-
export { CODEX_MANAGED_BEGIN, CODEX_MANAGED_END,
|
|
6
|
+
export { CODEX_MANAGED_BEGIN, CODEX_MANAGED_END, defaultCodexConfigPath, planCodexConfigInstall, writeCodexConfigInstall, type CodexConfigInstallPlan, type CodexConfigInstallResult, } from "./install-codex-config.js";
|
package/dist/cli/apply/index.js
CHANGED
|
@@ -3,5 +3,5 @@ export { CodexInstallRefusalError } from "./install-codex-config.js";
|
|
|
3
3
|
export { formatNextSteps } from "./next-steps.js";
|
|
4
4
|
export { generateCodexConfig } from "./generate-codex-config.js";
|
|
5
5
|
export { generateOpencodeConfig, OPENCODE_GENERATED_HEADER_LINE, } from "./generate-opencode-config.js";
|
|
6
|
-
export { CODEX_MANAGED_BEGIN, CODEX_MANAGED_END,
|
|
6
|
+
export { CODEX_MANAGED_BEGIN, CODEX_MANAGED_END, defaultCodexConfigPath, planCodexConfigInstall, writeCodexConfigInstall, } from "./install-codex-config.js";
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/apply/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,GAOlB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAyB,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAA0B,MAAM,4BAA4B,CAAC;AACzF,OAAO,EACL,sBAAsB,EACtB,8BAA8B,GAK/B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/apply/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,GAOlB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,eAAe,EAAyB,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAA0B,MAAM,4BAA4B,CAAC;AACzF,OAAO,EACL,sBAAsB,EACtB,8BAA8B,GAK/B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,GAGxB,MAAM,2BAA2B,CAAC"}
|
|
@@ -2,6 +2,19 @@ import { HarnessExitError } from "../exit-codes.js";
|
|
|
2
2
|
export declare const CODEX_MANAGED_SOURCE_PREFIX = "# Harness Codex hook wiring.";
|
|
3
3
|
export declare const CODEX_MANAGED_BEGIN = "# BEGIN harness-managed codex hooks";
|
|
4
4
|
export declare const CODEX_MANAGED_END = "# END harness-managed codex hooks";
|
|
5
|
+
/**
|
|
6
|
+
* The comment line the installer writes directly under the BEGIN fence,
|
|
7
|
+
* followed by the block's generation: the sha256 of the generated content
|
|
8
|
+
* the block holds (`codexBlockGeneration`). `harness gate disable --runtime
|
|
9
|
+
* codex` records it in its snapshot, and a snapshot whose recorded generation
|
|
10
|
+
* differs from the block's is one a later install re-rendered the block over:
|
|
11
|
+
* it is retired as superseded and never applied, wherever it sits and whatever
|
|
12
|
+
* backup files exist. A comment adds, removes and reorders no hook entry, so
|
|
13
|
+
* Codex keeps every hook at the position its trust state was recorded for.
|
|
14
|
+
* The same content renders the same line, so an install of an unchanged
|
|
15
|
+
* manifest stays a no-op.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CODEX_BLOCK_GENERATION_PREFIX = "# harness block generation: ";
|
|
5
18
|
/**
|
|
6
19
|
* Thrown instead of a plain `Error` when the install refuses rather than
|
|
7
20
|
* guesses (a duplicate/moved BEGIN marker, or a foreign table wedged
|
|
@@ -32,6 +45,12 @@ export interface CodexConfigInstallPlan {
|
|
|
32
45
|
* directory is typically a dotfiles git work tree.
|
|
33
46
|
*/
|
|
34
47
|
linkPath?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The requested config path, set only when the call named one
|
|
50
|
+
* (`--codex-config`). A command a message prints repeats the flag only
|
|
51
|
+
* then, so a pasted command acts on the config the call acted on.
|
|
52
|
+
*/
|
|
53
|
+
namedConfigPath?: string;
|
|
35
54
|
generatedPath: string;
|
|
36
55
|
currentContent: string;
|
|
37
56
|
nextContent: string;
|
|
@@ -85,6 +104,14 @@ export interface CodexConfigInstallPlan {
|
|
|
85
104
|
export interface CodexConfigInstallResult extends CodexConfigInstallPlan {
|
|
86
105
|
backupPath?: string;
|
|
87
106
|
written: boolean;
|
|
107
|
+
/** Live `harness gate disable --runtime codex` snapshots of this config the
|
|
108
|
+
* write retired as `*.superseded.json`: the block they were taken from no
|
|
109
|
+
* longer exists. */
|
|
110
|
+
supersededSnapshots?: string[];
|
|
111
|
+
/** A snapshot that could not be retired or read (the install itself
|
|
112
|
+
* succeeded): what to do by hand. The callers print them through their own
|
|
113
|
+
* io. */
|
|
114
|
+
snapshotWarnings?: string[];
|
|
88
115
|
}
|
|
89
116
|
export interface CodexConfigInstallOptions {
|
|
90
117
|
configPath?: string;
|
|
@@ -240,7 +267,132 @@ export declare function validateCodexManagedConfig(content: string): void;
|
|
|
240
267
|
* install would (both go through `planCodexConfigInstall`).
|
|
241
268
|
*/
|
|
242
269
|
export declare function assertConfigSemanticInvariant(currentContent: string, nextContent: string, configPath: string): void;
|
|
270
|
+
/**
|
|
271
|
+
* Resolves a symlinked config path to the regular file it points at (task
|
|
272
|
+
* 1637fbc8). `atomicWriteFile` renames a temp file over its destination,
|
|
273
|
+
* which would replace a symlink with a regular file and leave the link's
|
|
274
|
+
* target (typically a dotfiles repo) silently stale; writing to the
|
|
275
|
+
* resolved target instead keeps the link intact. A non-symlink path
|
|
276
|
+
* (including a missing one) is returned unchanged. A dangling link, an
|
|
277
|
+
* unresolvable chain (a loop, a permission error) or a link to anything
|
|
278
|
+
* other than a regular file is refused before anything is written. The
|
|
279
|
+
* chain is walked as the kernel walks it (`walkLinkChain`): a `..` after a
|
|
280
|
+
* directory link climbs out of the directory that link leads to, so the file
|
|
281
|
+
* written is the one a read through the path gives. The path itself is taken
|
|
282
|
+
* as given; a caller passes a spelling with `..` through `kernelEntry` first.
|
|
283
|
+
*/
|
|
284
|
+
export declare function resolveConfigSymlink(requestedPath: string): string;
|
|
243
285
|
export declare function planCodexConfigInstall(opts: CodexConfigInstallOptions): CodexConfigInstallPlan;
|
|
244
|
-
|
|
286
|
+
/** The time of the newest install that rewrote the config at `filePath`, in
|
|
287
|
+
* epoch milliseconds, read from the `<filePath>.harness-backup-<timestamp>`
|
|
288
|
+
* files `writeCodexConfigInstall` leaves beside it (one per write of an
|
|
289
|
+
* existing config), or null when there is none. `harness gate enable
|
|
290
|
+
* --runtime codex` uses it to tell a snapshot taken before a re-install
|
|
291
|
+
* (whose units that install re-rendered) from one taken after it. Reads the
|
|
292
|
+
* directory only. */
|
|
293
|
+
export declare function latestCodexInstallBackupMs(filePath: string): number | null;
|
|
294
|
+
/** Like {@link latestCodexInstallBackupMs}, and also the path of the newest
|
|
295
|
+
* backup file, so a message can name the install that dated a snapshot. A
|
|
296
|
+
* backup whose name spells the file in another letter case or normalization
|
|
297
|
+
* form (an install that ran through `Config.toml` for `config.toml` on a
|
|
298
|
+
* filesystem that folds those) counts when both spellings are one entry
|
|
299
|
+
* (`namesSameEntry`); on a filesystem that keeps them apart, another file's
|
|
300
|
+
* backups never do. */
|
|
301
|
+
export declare function latestCodexInstallBackup(filePath: string): {
|
|
302
|
+
ms: number;
|
|
303
|
+
path: string;
|
|
304
|
+
} | null;
|
|
305
|
+
/** The config holds operator secrets (API tokens under `[mcp_servers.*]`,
|
|
306
|
+
* Codex hook trust hashes); the install must never widen its permissions.
|
|
307
|
+
* Preserves the existing file's own mode for both the rewritten config and
|
|
308
|
+
* its backup, and falls back to `0o600` (owner read/write only) when
|
|
309
|
+
* creating a config that did not exist before this install, rather than
|
|
310
|
+
* `atomicWriteFile`'s own `0o644` default. */
|
|
311
|
+
export declare function existingFileMode(filePath: string): number;
|
|
312
|
+
/**
|
|
313
|
+
* Writes the install. A live gate snapshot of the config holds the hook
|
|
314
|
+
* lines of the block this write replaces, so enabling it later would put an
|
|
315
|
+
* outdated line back: every such snapshot (beside every hop of the requested
|
|
316
|
+
* path's link chain and beside the target) is renamed to `*.superseded.json` right after the
|
|
317
|
+
* write, whatever backup files exist. A rename that fails never fails the
|
|
318
|
+
* install, which is already on disk: it is a warning (`snapshotWarnings`,
|
|
319
|
+
* printed by the caller) naming the snapshot and the move-aside step. A
|
|
320
|
+
* snapshot this cannot find (beside a link outside that chain) records the
|
|
321
|
+
* block's generation marker, which this write changes when the content
|
|
322
|
+
* changes, so `gate enable` and `gate disable` retire it on sight. The
|
|
323
|
+
* backup-file dating in the gate stays as a further line of defence for a
|
|
324
|
+
* snapshot without a marker (taken before the marker existed).
|
|
325
|
+
*/
|
|
326
|
+
export declare function writeCodexConfigInstall(planned: CodexConfigInstallPlan, opts?: {
|
|
245
327
|
now?: Date;
|
|
246
328
|
}): CodexConfigInstallResult;
|
|
329
|
+
/** One harness-owned hook unit inside the fenced managed block: the block
|
|
330
|
+
* `generate-codex-config.ts`'s `emitHook` writes (a `# harness hook:` comment
|
|
331
|
+
* line, the `[[hooks.<Event>]]` header, an optional `matcher =` line and the
|
|
332
|
+
* `hooks = [...]` line). `harness gate disable` neutralises a unit in place
|
|
333
|
+
* by replacing its `hooks = [...]` value with `hooks = []`; such a unit is
|
|
334
|
+
* `disabled`. */
|
|
335
|
+
export interface CodexManagedHookUnit {
|
|
336
|
+
/** The id in the comment line, e.g. `policy-pack:branch-protection:pre-tool-use`. */
|
|
337
|
+
id: string;
|
|
338
|
+
event: string;
|
|
339
|
+
matcher: string | null;
|
|
340
|
+
commands: string[];
|
|
341
|
+
/** True when the unit's `hooks` array is empty (neutralised by the gate). */
|
|
342
|
+
disabled: boolean;
|
|
343
|
+
/** Offset of the unit's comment line. */
|
|
344
|
+
start: number;
|
|
345
|
+
/** Offsets `[hooksStart, hooksEnd)` of the `hooks = [...]` line, without
|
|
346
|
+
* its indentation, trailing blanks or line terminator, so a replacement
|
|
347
|
+
* leaves LF and CRLF files byte-for-byte alike outside that span. */
|
|
348
|
+
hooksStart: number;
|
|
349
|
+
hooksEnd: number;
|
|
350
|
+
}
|
|
351
|
+
export interface CodexManagedHookBlock {
|
|
352
|
+
units: CodexManagedHookUnit[];
|
|
353
|
+
/**
|
|
354
|
+
* The block's generation (`CODEX_BLOCK_GENERATION_PREFIX`): the hash on the
|
|
355
|
+
* line right under the BEGIN fence, or null when that line is not exactly
|
|
356
|
+
* that shape (a block an older install wrote, or a line removed or edited by
|
|
357
|
+
* hand). A null generation dates nothing, so the gate falls back to its
|
|
358
|
+
* other rules and never refuses an enable for the line alone.
|
|
359
|
+
*/
|
|
360
|
+
generation: string | null;
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* The harness-owned hook units of the fenced managed block in `text`, with
|
|
364
|
+
* exact offsets, for `harness gate` (the operator's switch for a blocking
|
|
365
|
+
* hook). It reuses the installer's own range scan (`findManagedRange`), so
|
|
366
|
+
* the refusals that scan raises (a duplicate BEGIN marker, a foreign table
|
|
367
|
+
* wedged inside the block) apply here unchanged, and adds the stricter
|
|
368
|
+
* reading an edit needs: the block must be fenced by BEGIN and a closing END
|
|
369
|
+
* marker line, every non-blank line inside it must be a comment or part of a
|
|
370
|
+
* unit of the exact shape the generator writes, and no harness hook comment
|
|
371
|
+
* may sit outside the block (`assertNoOrphanHarnessHookTable`). Anything else
|
|
372
|
+
* refuses instead of guessing which bytes are harness-owned. Returns null
|
|
373
|
+
* when the file holds no managed block. The block's generation marker is read
|
|
374
|
+
* too, never required: a block without it reads as `generation: null`.
|
|
375
|
+
* Reads only; the file is never touched.
|
|
376
|
+
*/
|
|
377
|
+
export declare function readCodexManagedHookUnits(text: string, configPath: string): CodexManagedHookBlock | null;
|
|
378
|
+
/** What a gate edit of the managed block is allowed to change. A `disable`
|
|
379
|
+
* neutralises units (a unit's `hooks` array becomes empty); an `enable` puts
|
|
380
|
+
* the original `hooks` arrays back. `counts` is how many entries of each hook
|
|
381
|
+
* event the edit changes. */
|
|
382
|
+
export interface CodexHookEditExpectation {
|
|
383
|
+
direction: "neutralise" | "restore";
|
|
384
|
+
counts: Record<string, number>;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* The safety net for a gate edit of the managed block. First the installer's
|
|
388
|
+
* own semantic invariant (both documents parse, and everything outside the
|
|
389
|
+
* hook event arrays is deep-equal), then the part that invariant leaves out
|
|
390
|
+
* on purpose, compared entry by entry: per hook event the arrays have the
|
|
391
|
+
* same length, every entry is deep-equal to its counterpart except exactly
|
|
392
|
+
* `expected.counts[event]` entries, and each of those differs only in its
|
|
393
|
+
* `hooks` array (emptied by a neutralise, filled again by a restore). So a
|
|
394
|
+
* gate edit can neither drop, add or reorder an entry nor move a key from one
|
|
395
|
+
* entry to another, and Codex keeps every other hook at the position its
|
|
396
|
+
* trust state was recorded for.
|
|
397
|
+
*/
|
|
398
|
+
export declare function assertCodexHookEditInvariant(before: string, after: string, configPath: string, expected: CodexHookEditExpectation): void;
|