@lannguyensi/harness 0.64.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 +64 -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 -345
- 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 -713
- 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 -387
- 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 +9 -2131
- 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 -245
- 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/{delegate/register.d.ts → register-gate-group.d.ts} +1 -1
- 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 +1 -1
- package/dist/cli/register-operator-lifecycle.js +3 -100
- package/dist/cli/register-operator-lifecycle.js.map +1 -1
- 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-audit-group.d.ts → register-setup-group.d.ts} +1 -1
- 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.js +2 -19
- package/dist/cli/remove/register.js.map +1 -1
- 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.js +6 -4
- package/dist/cli/uninstall/register.js.map +1 -1
- 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 -444
- package/dist/cli/delegate/index.js.map +0 -1
- package/dist/cli/delegate/register.js +0 -90
- package/dist/cli/delegate/register.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/expire-on-tool-match.d.ts +0 -15
- package/dist/cli/doctor/expire-on-tool-match.js +0 -58
- package/dist/cli/doctor/expire-on-tool-match.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 -58
- package/dist/cli/dry-run.js +0 -283
- package/dist/cli/dry-run.js.map +0 -1
- package/dist/cli/enriched-event.d.ts +0 -35
- package/dist/cli/enriched-event.js +0 -60
- package/dist/cli/enriched-event.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 -25
- package/dist/cli/explain-action.js +0 -57
- package/dist/cli/explain-action.js.map +0 -1
- package/dist/cli/explain-policy.d.ts +0 -147
- package/dist/cli/explain-policy.js +0 -248
- 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 -438
- 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 -1022
- 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 -110
- 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/register-audit-group.js +0 -91
- package/dist/cli/register-audit-group.js.map +0 -1
- package/dist/cli/resolve-env.d.ts +0 -32
- package/dist/cli/resolve-env.js +0 -46
- 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 -27
- package/dist/cli/test-risk.js +0 -38
- 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 -643
- 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 -106
- 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 -625
- package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js +0 -1076
- 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 -1078
- 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 -623
- package/dist/runtime/intercept.js +0 -1384
- 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 -105
- package/dist/runtime/task-providers/agent-tasks.js +0 -247
- 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
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type LoaderOptions } from "./loader.js";
|
|
2
|
-
export interface CheckPauseOptions {
|
|
3
|
-
/** Loader options (configPath, homeDir, project). */
|
|
4
|
-
loaderOpts?: LoaderOptions;
|
|
5
|
-
/** Test-injected generatedDir; bypasses path resolution when supplied. */
|
|
6
|
-
generatedDir?: string;
|
|
7
|
-
/** Short label identifying the hook in the stderr notice. */
|
|
8
|
-
hookLabel: string;
|
|
9
|
-
/** Where to write the notice. Defaults to process.stderr. */
|
|
10
|
-
stderr?: NodeJS.WritableStream;
|
|
11
|
-
/** Override "now" for tests. */
|
|
12
|
-
now?: Date;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Returns `{ paused: true }` when a non-expired pause sentinel exists at
|
|
16
|
-
* the resolved generatedDir, after emitting a one-line stderr notice.
|
|
17
|
-
* Returns `{ paused: false }` for absent, expired (auto-resumes), or
|
|
18
|
-
* resolution-failure cases.
|
|
19
|
-
*/
|
|
20
|
-
export declare function checkPauseFromLoader(opts: CheckPauseOptions): {
|
|
21
|
-
paused: boolean;
|
|
22
|
-
};
|
package/dist/cli/pause-check.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// Hook-side wrapper around the pause sentinel. Every PreToolUse /
|
|
2
|
-
// PostToolUse hook — the policy-intercept gate and the pack hooks alike —
|
|
3
|
-
// calls `checkPauseFromLoader` immediately after parsing stdin and BEFORE
|
|
4
|
-
// attempting to load the manifest: a broken install (corrupted YAML,
|
|
5
|
-
// missing file) must still honour an operator pause, since the
|
|
6
|
-
// lockout-recovery flow is the exact scenario where the install is in a
|
|
7
|
-
// degraded state.
|
|
8
|
-
//
|
|
9
|
-
// Lives at the `cli/` root rather than under `cli/pack/` because it is a
|
|
10
|
-
// cross-layer helper, consumed by `cli/policy/intercept.ts` as well as the
|
|
11
|
-
// pack hooks. Keeping it out of `src/runtime/pause-sentinel.ts` preserves
|
|
12
|
-
// the runtime tree's no-loader rule: runtime/ already imports io/, but
|
|
13
|
-
// pulling in cli/loader.ts would transitively drag YAML parsing into
|
|
14
|
-
// every consumer.
|
|
15
|
-
import { resolveGeneratedDir } from "../io/generated-dir.js";
|
|
16
|
-
import { maybeAnnouncePause } from "../runtime/pause-sentinel.js";
|
|
17
|
-
import { resolvePaths } from "./loader.js";
|
|
18
|
-
/**
|
|
19
|
-
* Returns `{ paused: true }` when a non-expired pause sentinel exists at
|
|
20
|
-
* the resolved generatedDir, after emitting a one-line stderr notice.
|
|
21
|
-
* Returns `{ paused: false }` for absent, expired (auto-resumes), or
|
|
22
|
-
* resolution-failure cases.
|
|
23
|
-
*/
|
|
24
|
-
export function checkPauseFromLoader(opts) {
|
|
25
|
-
let generatedDir;
|
|
26
|
-
if (opts.generatedDir !== undefined) {
|
|
27
|
-
generatedDir = opts.generatedDir;
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
try {
|
|
31
|
-
const loader = opts.loaderOpts ?? {};
|
|
32
|
-
generatedDir = resolveGeneratedDir({
|
|
33
|
-
...(loader.homeDir !== undefined ? { homeDir: loader.homeDir } : {}),
|
|
34
|
-
manifestPath: resolvePaths(loader).base,
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
catch {
|
|
38
|
-
// resolvePaths only fails in pathological env states (HOME unset,
|
|
39
|
-
// unreadable cwd). Degrade silently: a broken path resolver should
|
|
40
|
-
// never escalate into a hook block.
|
|
41
|
-
return { paused: false };
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
const announceOpts = {
|
|
45
|
-
generatedDir,
|
|
46
|
-
hookLabel: opts.hookLabel,
|
|
47
|
-
};
|
|
48
|
-
if (opts.stderr !== undefined)
|
|
49
|
-
announceOpts.stderr = opts.stderr;
|
|
50
|
-
if (opts.now !== undefined)
|
|
51
|
-
announceOpts.now = opts.now;
|
|
52
|
-
return maybeAnnouncePause(announceOpts);
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=pause-check.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pause-check.js","sourceRoot":"","sources":["../../src/cli/pause-check.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,0EAA0E;AAC1E,0EAA0E;AAC1E,qEAAqE;AACrE,+DAA+D;AAC/D,wEAAwE;AACxE,kBAAkB;AAClB,EAAE;AACF,yEAAyE;AACzE,2EAA2E;AAC3E,0EAA0E;AAC1E,uEAAuE;AACvE,qEAAqE;AACrE,kBAAkB;AAElB,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAsB,MAAM,aAAa,CAAC;AAe/D;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAuB;IAC1D,IAAI,YAAoB,CAAC;IACzB,IAAI,IAAI,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QACpC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;IACnC,CAAC;SAAM,CAAC;QACN,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC;YACrC,YAAY,GAAG,mBAAmB,CAAC;gBACjC,GAAG,CAAC,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACpE,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,IAAI;aACxC,CAAC,CAAC;QACL,CAAC;QAAC,MAAM,CAAC;YACP,kEAAkE;YAClE,mEAAmE;YACnE,oCAAoC;YACpC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;QAC3B,CAAC;IACH,CAAC;IACD,MAAM,YAAY,GAA6C;QAC7D,YAAY;QACZ,SAAS,EAAE,IAAI,CAAC,SAAS;KAC1B,CAAC;IACF,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS;QAAE,YAAY,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IACjE,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS;QAAE,YAAY,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IACxD,OAAO,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import { type LedgerEntry } from "../../policies/index.js";
|
|
2
|
-
import { type LedgerClient, type PolicyDecision } from "../../runtime/index.js";
|
|
3
|
-
import type { Manifest, McpServer } from "../../schema/index.js";
|
|
4
|
-
import { type LoaderOptions } from "../loader.js";
|
|
5
|
-
export interface InterceptCliOptions extends LoaderOptions {
|
|
6
|
-
/** Defaults to process.stdin. */
|
|
7
|
-
stdin?: NodeJS.ReadableStream;
|
|
8
|
-
/** Defaults to process.stdout. */
|
|
9
|
-
stdout?: NodeJS.WritableStream;
|
|
10
|
-
/** Defaults to process.stderr. */
|
|
11
|
-
stderr?: NodeJS.WritableStream;
|
|
12
|
-
/** Override timeout per ledger call. */
|
|
13
|
-
ledgerTimeoutMs?: number;
|
|
14
|
-
/** Override "now" for deterministic tests. */
|
|
15
|
-
now?: Date;
|
|
16
|
-
/** Idle bound, in ms, for the stdin read (default STDIN_IDLE_TIMEOUT_MS). Tests inject a short value. */
|
|
17
|
-
stdinIdleTimeoutMs?: number;
|
|
18
|
-
/** Inject a fake ledger client (tests). */
|
|
19
|
-
ledger?: LedgerClient;
|
|
20
|
-
/** Inject the resolved manifest (tests). */
|
|
21
|
-
manifest?: Manifest;
|
|
22
|
-
/**
|
|
23
|
-
* Test-injected generatedDir for the pause-sentinel lookup; bypasses
|
|
24
|
-
* path resolution when supplied. Mirrors the pack hooks' option.
|
|
25
|
-
*/
|
|
26
|
-
generatedDir?: string;
|
|
27
|
-
/**
|
|
28
|
-
* When true (or `HARNESS_POLICY_VERBOSE` env is truthy), emit a
|
|
29
|
-
* human-readable diagnostic block to stderr for each non-allow
|
|
30
|
-
* decision. stdout is unaffected, so Claude Code's deny JSON contract
|
|
31
|
-
* is preserved. Phase 5 #3 — opt-in only.
|
|
32
|
-
*/
|
|
33
|
-
verbose?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Risk Gate seams (Phase 7 #5). Override the ambient inputs the
|
|
36
|
-
* Context Resolver matches `environments.resolvers[]` signals
|
|
37
|
-
* against, so a test exercising a `when:` policy stays hermetic.
|
|
38
|
-
* `env` defaults to `process.env`; the kube seams bypass the
|
|
39
|
-
* `~/.kube/config` read when either is supplied.
|
|
40
|
-
*/
|
|
41
|
-
env?: Record<string, string | undefined>;
|
|
42
|
-
kubeContext?: string;
|
|
43
|
-
kubeNamespace?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Test seam for Codex's sandbox `--command-cwd` process argument.
|
|
46
|
-
* Production resolves it from `/proc/1/cmdline` when Codex does not
|
|
47
|
-
* include a cwd/workdir in the hook event payload.
|
|
48
|
-
*/
|
|
49
|
-
codexCommandCwd?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Name of the manifest hook that fired this intercept invocation. Set
|
|
52
|
-
* by the Codex generator (`generate-codex-config.ts`) as the argv flag
|
|
53
|
-
* `--hook <name>` so every spawned process self-identifies. Used as a
|
|
54
|
-
* stderr-line prefix and a tag in the no-match hint; when absent the
|
|
55
|
-
* existing back-compat behaviour (un-tagged stderr) holds. Codex emits
|
|
56
|
-
* one `[[hooks.*]]` block per manifest hook so the per-hook tag is
|
|
57
|
-
* unambiguous; the Claude Code generator dedupes by `(command, timeout)`
|
|
58
|
-
* within a matcher group, so this flag is NOT injected there (it would
|
|
59
|
-
* defeat the dedupe and N-multiply audit-writes per tool event).
|
|
60
|
-
*/
|
|
61
|
-
hookName?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface InterceptCliResult {
|
|
64
|
-
exitCode: number;
|
|
65
|
-
decisions: PolicyDecision[];
|
|
66
|
-
blocked: boolean;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Real grounding-mcp-backed ledger client. Exported for testing: the
|
|
70
|
-
* `record` adapter's failure-surfacing path is exercised against a
|
|
71
|
-
* bogus mcpCommand in tests/runtime/intercept-cli.test.ts.
|
|
72
|
-
*
|
|
73
|
-
* Connection discipline (2026-07-01 review, enforcement-subprocess-latency):
|
|
74
|
-
* ONE lazily-opened grounding-mcp session serves every query and audit
|
|
75
|
-
* record of the intercept invocation this client was constructed for,
|
|
76
|
-
* instead of 2 fresh subprocess spawns per matching policy. On top,
|
|
77
|
-
* `ledger_summary` returns the WHOLE session's entries (per-tag filtering
|
|
78
|
-
* happens client-side in `intercept()`), so the K per-policy queries are
|
|
79
|
-
* textually identical — they collapse into one cached round-trip per
|
|
80
|
-
* sessionId. `runInterceptCli` calls `dispose()` when the intercept
|
|
81
|
-
* completes; a caller constructing this client directly owns that call.
|
|
82
|
-
*/
|
|
83
|
-
export declare function realLedgerClient(server: McpServer, opts: InterceptCliOptions): LedgerClient;
|
|
84
|
-
/**
|
|
85
|
-
* Per-call budget of the audit-retry session (task f1aea826, review
|
|
86
|
-
* round 2): a quarter of the ledger timeout with a 250ms floor (a fresh
|
|
87
|
-
* node subprocess must cold-start + initialize within it). Exported as a
|
|
88
|
-
* pure function so the FORMULA itself is pinned by a unit test — the
|
|
89
|
-
* round-1 finding this bounds was precisely that an unbounded retry
|
|
90
|
-
* reused the full budget, and nothing would go red if that regressed.
|
|
91
|
-
*/
|
|
92
|
-
export declare function auditRetryTimeoutMs(timeoutMs: number): number;
|
|
93
|
-
/**
|
|
94
|
-
* Recognise a hook `command` string as an invocation of `harness policy
|
|
95
|
-
* intercept`'s subcommand, regardless of how the leading interpreter /
|
|
96
|
-
* binary token is spelled: a bare `harness policy intercept`, a node-path
|
|
97
|
-
* form (`node /abs/path/dist/cli/index.js policy intercept`, e.g. a local
|
|
98
|
-
* dev build), an `npx` form (`npx harness policy intercept`), a leading
|
|
99
|
-
* inline env-var assignment (`FOO=bar harness policy intercept` — the
|
|
100
|
-
* same shape `understanding-before-execution.ts`'s `wrap()` helper
|
|
101
|
-
* prefixes pack-contributed commands with), or a trailing flag
|
|
102
|
-
* (`harness policy intercept --hook <name>`, the tag
|
|
103
|
-
* `generate-codex-config.ts#commandWithHookTag` appends).
|
|
104
|
-
*
|
|
105
|
-
* Every OTHER call site that needs to recognise this subcommand in this
|
|
106
|
-
* codebase today (`generate-settings.ts#hookTimeoutSeconds`,
|
|
107
|
-
* `generate-codex-config.ts#commandWithHookTag`) still compares
|
|
108
|
-
* `command.trim() === "harness policy intercept"` VERBATIM — deliberately
|
|
109
|
-
* left unchanged (task d20a7e0c scope: the hook-timeout projection
|
|
110
|
-
* contract those two own is out of scope). For THEM a missed match only
|
|
111
|
-
* changes a floor/flag on a command harness itself emits byte-for-byte,
|
|
112
|
-
* so the single canonical spelling is enough. This matcher exists for a
|
|
113
|
-
* caller (the validate/doctor hook-budget-vs-ledger-timeout guard, task
|
|
114
|
-
* d20a7e0c) where under-recognition is a false NEGATIVE on a security
|
|
115
|
-
* check against an OPERATOR-authored `manifest.hooks[]` entry, which is
|
|
116
|
-
* under no obligation to spell the command exactly the way harness's own
|
|
117
|
-
* generators do.
|
|
118
|
-
*
|
|
119
|
-
* Deliberately narrow, not a shell parser: matches the two literal words
|
|
120
|
-
* `policy` and `intercept` as adjacent, whitespace-separated tokens,
|
|
121
|
-
* preceded by start-of-string / whitespace / a path separator (so
|
|
122
|
-
* `mypolicy intercept` inside one longer token cannot match) and followed
|
|
123
|
-
* by whitespace, end-of-string, or a semicolon/quote character (`;`, `"`,
|
|
124
|
-
* `'`) immediately abutting the word — the shape a chained shell command
|
|
125
|
-
* (`harness policy intercept; echo done`) or an embedded `sh -c
|
|
126
|
-
* "harness policy intercept"` wrapper produces, where nothing whitespace
|
|
127
|
-
* separates `intercept` from the next token (review 2026-08-09, fix round
|
|
128
|
-
* 1, finding 3). The quote arm accepts more than it strictly should: a
|
|
129
|
-
* quote glued directly onto the word (`intercept'or'`) also matches, even
|
|
130
|
-
* though a shell concatenates that into a different, longer identifier
|
|
131
|
-
* (`interceptor`). This is a deliberate, harmless OVER-flag — at worst a
|
|
132
|
-
* spurious validate/doctor diagnostic on an exotic command, never a missed
|
|
133
|
-
* real hook — accepted because the same quote boundary is load-bearing for
|
|
134
|
-
* the legitimate `sh -c "...intercept"` wrapper above. Still not
|
|
135
|
-
* exhaustive: a trailing `)`, `|`, `&`, or
|
|
136
|
-
* backtick immediately abutting the word (e.g. `$(harness policy
|
|
137
|
-
* intercept)`) is a KNOWN, deliberately-unclosed gap — widening further
|
|
138
|
-
* risks matching inside an unrelated longer token with no whitespace
|
|
139
|
-
* boundary at all, and the shapes above already cover the realistic
|
|
140
|
-
* manifest-authoring patterns this matcher exists for. A false negative
|
|
141
|
-
* here degrades to the pre-existing verbatim behaviour (the hook is
|
|
142
|
-
* simply not classified as ledger-consulting, so the margin check has
|
|
143
|
-
* nothing to say about it) — not a runtime bypass; the dispatch this
|
|
144
|
-
* check advises about is unaffected either way.
|
|
145
|
-
*/
|
|
146
|
-
export declare function isPolicyInterceptCommand(command: string): boolean;
|
|
147
|
-
/**
|
|
148
|
-
* Minimum `budget_ms` a blocking, ledger-consulting hook needs to clear
|
|
149
|
-
* the worst-case wall time `realLedgerClient` (below) can spend before it
|
|
150
|
-
* writes its own fail-closed decision — derived from that function's OWN
|
|
151
|
-
* two round-trip shapes, not a measured-then-eyeballed constant. Both
|
|
152
|
-
* halves are pinned against the real client in
|
|
153
|
-
* tests/e2e/policy-intercept.test.ts ("hook-budget-ledger-margin
|
|
154
|
-
* derivation (task d20a7e0c)").
|
|
155
|
-
*
|
|
156
|
-
* SCOPE, stated precisely (review 2026-08-09, fix round 1): this is the
|
|
157
|
-
* worst case on the PURE-TIMEOUT HANG SHAPE — the shape where the
|
|
158
|
-
* `query()` call that degrades does so by tripping `LedgerSession`'s own
|
|
159
|
-
* session-wide `timedOut` latch (src/policies/ledger-client.ts), which is
|
|
160
|
-
* what lets the retry sequence below start from an INSTANT first
|
|
161
|
-
* `record()` attempt. A query() that instead degrades via a NON-timeout
|
|
162
|
-
* path — `ledger_summary` coming back a genuine JSON-RPC error, an
|
|
163
|
-
* unparseable payload, or a payload missing the `entries` shape
|
|
164
|
-
* (`querySummary`'s non-timeout `degraded` branches in
|
|
165
|
-
* src/policies/ledger-client.ts) — never sets that latch, so it falls
|
|
166
|
-
* OUTSIDE this bound. See the KNOWN RESIDUAL paragraph at the end of this
|
|
167
|
-
* comment; do not read this function, or the `checkHookBudgetLedgerMargin`
|
|
168
|
-
* diagnostic it backs, as a blanket worst-case guarantee.
|
|
169
|
-
*
|
|
170
|
-
* `T` = the ledger's own per-call budget (`health.timeout_ms`, defaulted
|
|
171
|
-
* to 5000 exactly like `realLedgerClient` itself). `R` =
|
|
172
|
-
* `auditRetryTimeoutMs(T)`, the audit-retry session's own per-call budget.
|
|
173
|
-
*
|
|
174
|
-
* 1. query() — up to 2×T. `LedgerSession.querySummary`
|
|
175
|
-
* (src/policies/ledger-client.ts) performs `ensureInitialized()`
|
|
176
|
-
* (the `initialize` handshake, its own T-bounded wait) and, only
|
|
177
|
-
* once THAT resolves, the actual `ledger_summary` `tools/call` (a
|
|
178
|
-
* SEPARATE T-bounded wait). A ledger that is merely SLOW rather than
|
|
179
|
-
* hard-down (the threat class docs/risk-gate.md and this file's own
|
|
180
|
-
* `deny-degraded` diagnostics already name, distinct from an
|
|
181
|
-
* instantly-refusing one) can answer `initialize` just under T and
|
|
182
|
-
* still time out on the following `ledger_summary` — the case a
|
|
183
|
-
* naive "1×T" assumption undercounts.
|
|
184
|
-
*
|
|
185
|
-
* 2. the deny-degraded audit retry — up to 3×R. On the pure-timeout
|
|
186
|
-
* hang shape, the pooled session's `timedOut` latch (tripped by the
|
|
187
|
-
* query()-side timeout itself) makes the FIRST `record()` attempt on
|
|
188
|
-
* it instant (see `realLedgerClient`'s own doc comment above). The
|
|
189
|
-
* ONE reserved retry then opens a FRESH session budgeted at R and
|
|
190
|
-
* calls `recordPolicyDecisionOnSession` (src/runtime/ledger-
|
|
191
|
-
* record.ts), which can spend up to three independent R-bounded
|
|
192
|
-
* round-trips before it can report success or give up: the fresh
|
|
193
|
-
* session's own `initialize` handshake, the first `ledger_add`
|
|
194
|
-
* attempt at `type: "policy_decision"`, and — only reached when that
|
|
195
|
-
* attempt comes back a genuine JSON-RPC error rather than a
|
|
196
|
-
* transport timeout (an older/incompatible grounding-mcp rejecting
|
|
197
|
-
* the newer type) — the legacy `type: "fact"` fallback `ledger_add`.
|
|
198
|
-
*
|
|
199
|
-
* query() must complete (or degrade) before any policy decision — and so
|
|
200
|
-
* any record() — is computed (`intercept()`'s per-policy loop in
|
|
201
|
-
* src/runtime/intercept.ts awaits `evaluateOnePolicy`, which calls
|
|
202
|
-
* `ledger.query`, before it calls `ledger.record`), and the retry only
|
|
203
|
-
* starts after the first record() attempt on the pooled session already
|
|
204
|
-
* failed, so the two stages are SEQUENTIAL within one hook invocation:
|
|
205
|
-
* worst case ON THE PURE-TIMEOUT HANG SHAPE = 2T + 3R.
|
|
206
|
-
*
|
|
207
|
-
* KNOWN RESIDUAL (review 2026-08-09, fix round 1): when `query()` instead
|
|
208
|
-
* degrades via one of the NON-timeout branches named in the SCOPE
|
|
209
|
-
* paragraph above, the pooled session's `timedOut` latch is never set, so
|
|
210
|
-
* `record()`'s own first attempt is a REAL round-trip too — up to T for
|
|
211
|
-
* the `type: "policy_decision"` `ledger_add` attempt, plus another up to
|
|
212
|
-
* T for the legacy `type: "fact"` fallback if that attempt is itself
|
|
213
|
-
* rejected non-timeout — BEFORE the 3R retry sequence even starts. Worst
|
|
214
|
-
* case on this "error-then-hang" shape is therefore up to 4T + 3R, not
|
|
215
|
-
* 2T + 3R: 23750ms at the shipped T=5000 default, against this
|
|
216
|
-
* function's 13750ms. This formula is DELIBERATELY NOT raised to
|
|
217
|
-
* 4T + 3R: doing so would fail `checkHookBudgetLedgerMargin` against the
|
|
218
|
-
* shipped, reviewer-confirmed-clean fresh-init budget of 15000ms
|
|
219
|
-
* (src/cli/init/templates.ts, task 7bf47554/#414 — out of scope here) at
|
|
220
|
-
* the same T=5000 default, since 15000 < 23750. The guard this function
|
|
221
|
-
* backs GUARANTEES delivery of the fail-closed verdict on the
|
|
222
|
-
* pure-timeout hang shape, but NOT on this error-then-hang shape.
|
|
223
|
-
* Unlike an earlier draft of this note, this residual is NOT confined to
|
|
224
|
-
* one runtime projection: Claude Code and Codex both convert `budget_ms`
|
|
225
|
-
* into the outer hook-kill seconds via the identical `hookTimeoutSeconds`
|
|
226
|
-
* helper (src/cli/apply/generate-settings.ts, shared by
|
|
227
|
-
* generate-codex-config.ts) since task 7bf47554/#414, so a manifest at
|
|
228
|
-
* the shipped defaults is equally exposed on both — this was checked
|
|
229
|
-
* against both generators' current source, not assumed.
|
|
230
|
-
*/
|
|
231
|
-
export declare function requiredHookBudgetMs(ledgerTimeoutMs: number): number;
|
|
232
|
-
export declare function runInterceptCli(opts?: InterceptCliOptions): Promise<InterceptCliResult>;
|
|
233
|
-
export type { LedgerEntry };
|