@lannguyensi/harness 0.28.1 → 0.29.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 +20 -0
- package/dist/cli/apply/generate-codex-config.js +24 -4
- package/dist/cli/apply/generate-codex-config.js.map +1 -1
- package/dist/cli/approve/risk.d.ts +8 -6
- package/dist/cli/approve/risk.js +19 -6
- package/dist/cli/approve/risk.js.map +1 -1
- package/dist/cli/approve/understanding.d.ts +38 -2
- package/dist/cli/approve/understanding.js +145 -28
- package/dist/cli/approve/understanding.js.map +1 -1
- package/dist/cli/index.js +66 -16
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/pack/hook-codex-pre-tool-use.js +38 -0
- package/dist/cli/pack/hook-codex-pre-tool-use.js.map +1 -1
- package/dist/cli/policy/intercept.d.ts +18 -0
- package/dist/cli/policy/intercept.js +66 -10
- package/dist/cli/policy/intercept.js.map +1 -1
- package/dist/runtime/git-context.js +7 -0
- package/dist/runtime/git-context.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.29.0] - 2026-05-25
|
|
11
|
+
|
|
12
|
+
**Headline: Codex hook diagnostics get sharp, `harness approve understanding` actually enforces the Prior Art rule, and read-only Codex shell commands stop tripping the Understanding Gate.** Three feats + three fixes tighten the operator surface around the Codex adapter and the approve verb. The Codex `harness policy intercept` projection now floors at a 2s timeout (PR #255), self-identifies via `--hook <name>` in the projected command + `[hook=<name>]`-prefixed stderr (PR #256), and resolves the per-call workdir for git-context builtins (PR #254). The Understanding Gate now lets read-only Codex shell commands through (PR #252) and `harness approve understanding` validates the persisted report before writing the marker, refusing reports with missing / empty / literal-`- None` `Prior Art` sections (PR #253). The `harness approve` env-var resolution chain is also fixed to read `$CLAUDE_CODE_SESSION_ID` (PR #251). **Operator action**: none required; all changes are back-compat. After upgrade, regenerate Codex config via `harness apply --runtime codex` to pick up the new `--hook` flags and 2s timeout floor in the projected `~/.codex/config.toml`. Re-run `npm i -g @lannguyensi/harness` to upgrade.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **`harness policy intercept` self-identifies in Codex via `--hook <name>`** (#256, task 16683705). The Codex generator (`generate-codex-config.ts`) now appends ` --hook <name>` to every projected `harness policy intercept` command so each spawned process is identifiable from `ps`, audit logs, and any error string that echoes the command line. The intercept entrypoint (`policy/intercept.ts`) accepts the new flag via a commander option and prefixes every stderr emission with `[hook=<name>]`: no-match hint, verbose decision diagnostic, malformed-event JSON error, manifest-load failure, audit-write failure. Unsafe hook names (whitespace, shell metachars) silently skip the flag (`SAFE_HOOK_NAME_RE` is `[A-Za-z0-9._:-]+`, which excludes every POSIX shell active token) and fall back to the un-tagged emission. The Claude Code projection (`generate-settings.ts`) is deliberately NOT changed: that generator dedupes by `(command, timeout)` within each matcher group, so per-hook flag injection would diverge the dedupe key and N-multiply ledger queries plus audit writes per tool event. Codex has no such dedupe so the change is safe there. Back-compat: invocations without `--hook` (operator probes, smoke scripts, pre-0.29.0 installed configs) keep the un-tagged stderr format. Covered by 3 new tests in `tests/cli/apply/generate-codex-config.test.ts` (positive injection, non-policy bypass, unsafe-name skip) and 6 new tests in `tests/runtime/intercept-cli.test.ts` (tag in no-match / verbose / malformed-JSON / manifest-load / audit-write paths, plus back-compat untagged path).
|
|
17
|
+
|
|
18
|
+
- **`harness approve understanding` validates the persisted Understanding Report before writing the marker** (#253, task 2947c2a9). A `grill_me` report with missing, empty, or literal-`- None` `priorArt` is now refused before the canonical `.approvals/<sessionId>` marker is written, the ledger entry is appended, or the report is flipped from `pending` to `approved`. `fast_confirm` reports skip the check (the relaxed schema variant intentionally drops `priorArt` from `required`); legacy reports without a `mode` field pass through unchanged so the v0.4.0 schema bump doesn't retroactively invalidate historical reports. A new `--force` flag bypasses the check for emergency unblock; the ledger tag is stamped `understanding-approved:<session>:forced:<field>` so audit can distinguish forced approvals from clean ones, and the CLI prints a `validation:` line on stdout so a forced approval is visible at the call site. Closes a gap found via dogfood on 2026-05-24: the prompt declared Section 10 (Prior Art) required since `@lannguyensi/understanding-gate@0.4.0` BREAKING, but no operator-side path enforced it, so an agent could skip the section and still get the gate open. Covered by 11 new tests in `tests/cli/approve-understanding.test.ts`.
|
|
19
|
+
|
|
20
|
+
- **Read-only Codex shell commands skip the Understanding Gate pre-tool-use blocker** (#252, task c0e67c14). The Codex variant of the `understanding-before-execution` pack pre-tool-use hook (`src/cli/pack/hook-codex-pre-tool-use.ts`) now reuses the existing read-only Bash classifier (introduced for the Claude side in PR #242) to allow read-only shell commands (`git status`, `git log`, `git diff`, `ls`, `pwd`, `cat`, `grep`, `find`, etc.) through without an approved report. Mutating commands, shell-chained commands, and `apply_patch` still hard-block. Codex shell extraction reads `raw_input.command`, `raw_input.cmd`, and raw string payloads, failing closed on conflicting aliases. Closes the Codex-side gap left by PR #242, which only treated the Claude pre-tool-use blocker. Covered by `tests/cli/pack-hook-codex-pre-tool-use.test.ts` and `tests/cli/pack-read-only-bash.test.ts`.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- **Codex `harness policy intercept` hooks float at a 2s timeout floor** (#255, task 25dec529). The Codex generator (`generate-codex-config.ts`) now projects every `harness policy intercept` hook with `Math.max(2, ceil(budget_ms / 1000))` instead of `Math.max(1, ceil(...))`, so the Full-template policy-intercept hooks with `budget_ms: 1000` (`require-preflight-evidence`, `require-preflight-push-evidence`) get `timeout = 2` instead of `timeout = 1` in the emitted `~/.codex/config.toml`. The 1s floor was too tight under Codex's cold-start path (manifest load, git-context resolution, ledger query, risk/env evaluation, process startup), so the gates surfaced spurious `PreToolUse hook (failed) error: hook timed out after 1s` errors on routine Bash. Non-policy hooks with `budget_ms: 1000` still floor at `timeout = 1` (the bump is scoped via exact-match `h.command.trim() === "harness policy intercept"`). Each generated `[[hooks.*]]` block now also carries a `# harness hook: <name> (budget_ms=N)` comment so an operator opening `~/.codex/config.toml` can identify the source hook. Operators must re-run `harness apply --runtime codex --install` to pick up the floor for an existing install. Covered by regressions in `tests/cli/apply/generate-codex-config.test.ts`.
|
|
25
|
+
|
|
26
|
+
- **Codex `harness policy intercept` resolves the per-call shell workdir for git-context builtins** (#254). When a Codex `exec_command` / `shell` event arrives without a top-level `event.cwd` (Codex's default for non-Bash-aliased shell tools), `harness policy intercept` now resolves the policy cwd from `event.raw_input.workdir`, then `event.tool_input.workdir`, then `event.input.workdir`, then the Codex sandbox `--command-cwd` from `/proc/1/cmdline`, before falling back to `process.cwd()`. This gives the `REPO` / `BRANCH` builtins a meaningful work tree to derive from, so per-repo and per-branch ledger tags (`preflight:${REPO}`, `preflight:${BRANCH}`) actually namespace under Codex rather than collapsing to the harness process's cwd. The git-context resolver also now rejects directory-form `.git` entries without a readable `HEAD`, so an empty parent `.git/` directory no longer becomes a fake repo with a blank `BRANCH`. Covered by new Codex workdir-extraction tests in `tests/runtime/intercept-cli.test.ts` and a directory-`.git`-fallback test in `tests/runtime/git-context.test.ts`.
|
|
27
|
+
|
|
28
|
+
- **`harness approve` reads `$CLAUDE_CODE_SESSION_ID` before legacy env vars** (#251, task 058b31a3). The env-var fallback chain on both `harness approve risk` and `harness approve understanding` previously only checked `$CLAUDE_SESSION_ID` and `$CODEX_SESSION_ID`. Claude Code exports its session id as `$CLAUDE_CODE_SESSION_ID` (not `$CLAUDE_SESSION_ID`), so an arg-less `harness approve` invoked from inside a Claude Code session never resolved via the env tier: it only worked via `--session` or the hook-staged `.pending-approval` marker. The resolver now reads `$CLAUDE_CODE_SESSION_ID` first (canonical, runtime-exported), then `$CLAUDE_SESSION_ID` (legacy / docs-name peer, back-compat), then `$CODEX_SESSION_ID`, before falling through to `.pending-approval` and (for understanding) the newest pending Understanding Report. The no-session-id error message and the `--session` option help text are rewritten to name the full chain. A new `sessionSource: "env-claude-code"` variant lets the CLI annotate `(from $CLAUDE_CODE_SESSION_ID)` in stdout so a wrong env pick is visible before it lands. Tests in `tests/cli/approve-risk.test.ts` and `tests/cli/approve-understanding.test.ts` cover each env-var path independently and assert documented precedence; hermetic env hygiene additions clear all three vars in beforeEach so an external shell's exports cannot leak into a test run.
|
|
29
|
+
|
|
10
30
|
## [0.28.1] - 2026-05-24
|
|
11
31
|
|
|
12
32
|
**Hotfix: arg-less `harness approve risk` now actually works after a Risk Gate block, and `harness doctor` warns on the misconfiguration that caused the original lockout.** Surfaced during the 0.28.0 release-cut session: a Risk Gate block fired against a routine read-only Bash probe (`--version`), and recovery via `harness approve risk` failed arg-less because the session id was never staged where the operator could read it. Two complementary fixes ship together.
|
|
@@ -111,19 +111,39 @@ function eventKey(event) {
|
|
|
111
111
|
return event;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
function codexTimeoutSeconds(
|
|
115
|
-
|
|
114
|
+
function codexTimeoutSeconds(h) {
|
|
115
|
+
const minimumSeconds = h.command.trim() === "harness policy intercept" ? 2 : 1;
|
|
116
|
+
return Math.max(minimumSeconds, Math.ceil(h.budget_ms / 1000));
|
|
117
|
+
}
|
|
118
|
+
// Hook names safe to splice into the emitted command literal as
|
|
119
|
+
// `--hook <name>`. Restricted to a quote/space/metachar-free charset so
|
|
120
|
+
// the projection never produces a shell-broken command, even though the
|
|
121
|
+
// underlying `Hook.name` schema (z.string().min(1)) accepts anything.
|
|
122
|
+
// All policy-pack hook names ship within this charset; an exotic name
|
|
123
|
+
// silently skips the flag and falls back to the un-tagged emission, with
|
|
124
|
+
// the preceding `# harness hook: <name>` TOML comment still naming it.
|
|
125
|
+
const SAFE_HOOK_NAME_RE = /^[A-Za-z0-9._:-]+$/;
|
|
126
|
+
function commandWithHookTag(h) {
|
|
127
|
+
if (h.command.trim() !== "harness policy intercept")
|
|
128
|
+
return h.command;
|
|
129
|
+
if (!SAFE_HOOK_NAME_RE.test(h.name))
|
|
130
|
+
return h.command;
|
|
131
|
+
return `${h.command} --hook ${h.name}`;
|
|
116
132
|
}
|
|
117
133
|
function emitCommandHook(h) {
|
|
118
134
|
const fields = [
|
|
119
135
|
`type = "command"`,
|
|
120
|
-
`command = ${tomlString(h
|
|
121
|
-
`timeout = ${codexTimeoutSeconds(h
|
|
136
|
+
`command = ${tomlString(commandWithHookTag(h))}`,
|
|
137
|
+
`timeout = ${codexTimeoutSeconds(h)}`,
|
|
122
138
|
];
|
|
123
139
|
return `{ ${fields.join(", ")} }`;
|
|
124
140
|
}
|
|
141
|
+
function tomlCommentText(s) {
|
|
142
|
+
return s.replace(CONTROL_CHAR_RE, " ").replace(/\s+/g, " ").trim();
|
|
143
|
+
}
|
|
125
144
|
function emitHook(h) {
|
|
126
145
|
const lines = [];
|
|
146
|
+
lines.push(`# harness hook: ${tomlCommentText(h.name)} (budget_ms=${h.budget_ms})`);
|
|
127
147
|
lines.push(`[[hooks.${eventKey(h.event)}]]`);
|
|
128
148
|
if (h.match !== undefined) {
|
|
129
149
|
lines.push(`matcher = ${tomlString(expandCodexHookMatchPattern(h.match))}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-codex-config.js","sourceRoot":"","sources":["../../../src/cli/apply/generate-codex-config.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,EAAE;AACF,oEAAoE;AACpE,+DAA+D;AAC/D,yEAAyE;AACzE,sCAAsC;AACtC,mEAAmE;AACnE,qEAAqE;AACrE,uEAAuE;AACvE,EAAE;AACF,gDAAgD;AAChD,sEAAsE;AACtE,6DAA6D;AAC7D,EAAE;AACF,wEAAwE;AACxE,kBAAkB;AAClB,oDAAoD;AACpD,4DAA4D;AAC5D,EAAE;AACF,kCAAkC;AAClC,uEAAuE;AACvE,wEAAwE;AACxE,wEAAwE;AACxE,oEAAoE;AACpE,uDAAuD;AACvD,qEAAqE;AACrE,qEAAqE;AACrE,2CAA2C;AAG3C,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,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,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;QAClE,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,UAAU,CAAC,CAAS;IAC3B,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC;AACpC,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa;IAC7B,iEAAiE;IACjE,sEAAsE;IACtE,mEAAmE;IACnE,qEAAqE;IACrE,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,kBAAkB;YACrB,OAAO,kBAAkB,CAAC;QAC5B,KAAK,YAAY;YACf,OAAO,YAAY,CAAC;QACtB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,aAAa;YAChB,OAAO,aAAa,CAAC;QACvB,KAAK,cAAc;YACjB,OAAO,cAAc,CAAC;QACxB;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"generate-codex-config.js","sourceRoot":"","sources":["../../../src/cli/apply/generate-codex-config.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,EAAE;AACF,oEAAoE;AACpE,+DAA+D;AAC/D,yEAAyE;AACzE,sCAAsC;AACtC,mEAAmE;AACnE,qEAAqE;AACrE,uEAAuE;AACvE,EAAE;AACF,gDAAgD;AAChD,sEAAsE;AACtE,6DAA6D;AAC7D,EAAE;AACF,wEAAwE;AACxE,kBAAkB;AAClB,oDAAoD;AACpD,4DAA4D;AAC5D,EAAE;AACF,kCAAkC;AAClC,uEAAuE;AACvE,wEAAwE;AACxE,wEAAwE;AACxE,oEAAoE;AACpE,uDAAuD;AACvD,qEAAqE;AACrE,qEAAqE;AACrE,2CAA2C;AAG3C,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAw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AAK,CAAC,EAAE,CAAC;QACvB,QAAQ,CAAC,IAAI,CACX,oFAAoF,CACrF,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9C,MAAM,OAAO,GAAG,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACjE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Manifest } from "../../schema/index.js";
|
|
2
2
|
import { type LoaderOptions } from "../loader.js";
|
|
3
3
|
export interface ApproveRiskOptions extends LoaderOptions {
|
|
4
|
-
/** Explicit session id (overrides $CLAUDE_SESSION_ID / $CODEX_SESSION_ID). */
|
|
4
|
+
/** Explicit session id (overrides $CLAUDE_CODE_SESSION_ID / $CLAUDE_SESSION_ID / $CODEX_SESSION_ID). */
|
|
5
5
|
session?: string;
|
|
6
6
|
/** Override the harness.generated/ directory (test injection). */
|
|
7
7
|
generatedDir?: string;
|
|
@@ -18,7 +18,7 @@ export interface ApproveRiskOptions extends LoaderOptions {
|
|
|
18
18
|
export interface ApproveRiskResult {
|
|
19
19
|
sessionId: string;
|
|
20
20
|
/** Where `sessionId` came from — surfaced so the operator can sanity-check it. */
|
|
21
|
-
sessionSource: "flag" | "env-claude" | "env-codex" | "pending-approval";
|
|
21
|
+
sessionSource: "flag" | "env-claude-code" | "env-claude" | "env-codex" | "pending-approval";
|
|
22
22
|
ledger: {
|
|
23
23
|
ok: boolean;
|
|
24
24
|
tag: string;
|
|
@@ -30,10 +30,12 @@ export declare function riskApprovedTagFor(sessionId: string): string;
|
|
|
30
30
|
/**
|
|
31
31
|
* Resolve the target session id and write its `risk-approved:` ledger
|
|
32
32
|
* tag. Session id precedence mirrors `harness approve understanding`
|
|
33
|
-
* tiers 1-4: explicit `--session`, then `$
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* the
|
|
33
|
+
* tiers 1-4: explicit `--session`, then `$CLAUDE_CODE_SESSION_ID`
|
|
34
|
+
* (the var Claude Code itself sets), then `$CLAUDE_SESSION_ID` (legacy
|
|
35
|
+
* / docs name), then `$CODEX_SESSION_ID`, then the `.pending-approval`
|
|
36
|
+
* file the gate hook staged on its last block. There is no
|
|
37
|
+
* persisted-report tier-5 guess: the Risk Gate produces no persisted
|
|
38
|
+
* reports.
|
|
37
39
|
*
|
|
38
40
|
* Throws `HarnessExitError(EX_FAIL)` when no session id can be resolved.
|
|
39
41
|
* A degraded ledger (grounding-mcp absent / unreachable) is surfaced in
|
package/dist/cli/approve/risk.js
CHANGED
|
@@ -49,10 +49,12 @@ async function writeLedgerTag(manifest, sessionId, content, opts) {
|
|
|
49
49
|
/**
|
|
50
50
|
* Resolve the target session id and write its `risk-approved:` ledger
|
|
51
51
|
* tag. Session id precedence mirrors `harness approve understanding`
|
|
52
|
-
* tiers 1-4: explicit `--session`, then `$
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* the
|
|
52
|
+
* tiers 1-4: explicit `--session`, then `$CLAUDE_CODE_SESSION_ID`
|
|
53
|
+
* (the var Claude Code itself sets), then `$CLAUDE_SESSION_ID` (legacy
|
|
54
|
+
* / docs name), then `$CODEX_SESSION_ID`, then the `.pending-approval`
|
|
55
|
+
* file the gate hook staged on its last block. There is no
|
|
56
|
+
* persisted-report tier-5 guess: the Risk Gate produces no persisted
|
|
57
|
+
* reports.
|
|
56
58
|
*
|
|
57
59
|
* Throws `HarnessExitError(EX_FAIL)` when no session id can be resolved.
|
|
58
60
|
* A degraded ledger (grounding-mcp absent / unreachable) is surfaced in
|
|
@@ -71,6 +73,15 @@ export async function approveRisk(opts = {}) {
|
|
|
71
73
|
sessionId = opts.session;
|
|
72
74
|
sessionSource = "flag";
|
|
73
75
|
}
|
|
76
|
+
else if (typeof process.env.CLAUDE_CODE_SESSION_ID === "string" &&
|
|
77
|
+
process.env.CLAUDE_CODE_SESSION_ID.length > 0) {
|
|
78
|
+
// Canonical: the var Claude Code actually exports into the agent
|
|
79
|
+
// shell. Read before the legacy $CLAUDE_SESSION_ID so an operator
|
|
80
|
+
// who has both set (e.g. a manual export plus the runtime export)
|
|
81
|
+
// gets the runtime's id, not whatever they typed by hand.
|
|
82
|
+
sessionId = process.env.CLAUDE_CODE_SESSION_ID;
|
|
83
|
+
sessionSource = "env-claude-code";
|
|
84
|
+
}
|
|
74
85
|
else if (typeof process.env.CLAUDE_SESSION_ID === "string" &&
|
|
75
86
|
process.env.CLAUDE_SESSION_ID.length > 0) {
|
|
76
87
|
sessionId = process.env.CLAUDE_SESSION_ID;
|
|
@@ -90,7 +101,9 @@ export async function approveRisk(opts = {}) {
|
|
|
90
101
|
}
|
|
91
102
|
if (sessionId === "") {
|
|
92
103
|
throw new HarnessExitError([
|
|
93
|
-
"no session id available. Pass --session <id>, or set
|
|
104
|
+
"no session id available. Pass --session <id>, or set one of",
|
|
105
|
+
"$CLAUDE_CODE_SESSION_ID (Claude Code) / $CLAUDE_SESSION_ID (legacy) /",
|
|
106
|
+
"$CODEX_SESSION_ID (Codex).",
|
|
94
107
|
"",
|
|
95
108
|
"The understanding-gate PreToolUse hook and `harness preflight` both stage the",
|
|
96
109
|
`session id in ${generatedDir}/.pending-approval, so an arg-less`,
|
|
@@ -98,7 +111,7 @@ export async function approveRisk(opts = {}) {
|
|
|
98
111
|
"neither has run for the current session yet.",
|
|
99
112
|
"",
|
|
100
113
|
"From inside the running agent you can also read the id directly:",
|
|
101
|
-
"Claude Code exposes $
|
|
114
|
+
"Claude Code exposes $CLAUDE_CODE_SESSION_ID; Codex exposes $CODEX_SESSION_ID.",
|
|
102
115
|
].join("\n"), EX_FAIL);
|
|
103
116
|
}
|
|
104
117
|
// The manifest is needed only for the grounding-mcp command. If it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"risk.js","sourceRoot":"","sources":["../../../src/cli/approve/risk.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,oEAAoE;AACpE,qEAAqE;AACrE,uEAAuE;AACvE,mEAAmE;AACnE,wEAAwE;AACxE,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,yEAAyE;AACzE,mEAAmE;AACnE,wEAAwE;AACxE,oEAAoE;AACpE,0EAA0E;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAsB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"risk.js","sourceRoot":"","sources":["../../../src/cli/approve/risk.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,oEAAoE;AACpE,qEAAqE;AACrE,uEAAuE;AACvE,mEAAmE;AACnE,wEAAwE;AACxE,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,yEAAyE;AACzE,mEAAmE;AACnE,wEAAwE;AACxE,oEAAoE;AACpE,0EAA0E;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAsB,MAAM,cAAc,CAAC;AA4B9E,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAE7C,8EAA8E;AAC9E,MAAM,UAAU,kBAAkB,CAAC,SAAiB;IAClD,OAAO,GAAG,oBAAoB,IAAI,SAAS,EAAE,CAA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KACpD,CAAC;AACJ,CAAC"}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import type { Manifest } from "../../schema/index.js";
|
|
2
2
|
import { type LoaderOptions } from "../loader.js";
|
|
3
3
|
export interface ApproveUnderstandingOptions extends LoaderOptions {
|
|
4
|
-
/** Explicit session id (overrides $CLAUDE_SESSION_ID). */
|
|
4
|
+
/** Explicit session id (overrides $CLAUDE_CODE_SESSION_ID / $CLAUDE_SESSION_ID / $CODEX_SESSION_ID). */
|
|
5
5
|
session?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Override the approve-time report validation (priorArt enforcement for
|
|
8
|
+
* `grill_me` reports). Writes the marker / ledger / report-flip anyway
|
|
9
|
+
* and stamps the ledger tag content with a `:forced:<field>-<reason>`
|
|
10
|
+
* suffix so the audit trail records the bypass. Emergency-unblock path:
|
|
11
|
+
* the default refuses the marker when validation fails so an agent
|
|
12
|
+
* cannot ship a hollow Understanding Report and still get the gate open.
|
|
13
|
+
*/
|
|
14
|
+
force?: boolean;
|
|
6
15
|
/**
|
|
7
16
|
* Optional agent-tasks task id (harness/1ee26e77). When set, an
|
|
8
17
|
* additional task-scoped marker file is written at
|
|
@@ -73,7 +82,7 @@ export interface ApproveUnderstandingResult {
|
|
|
73
82
|
* operator when the id was not explicit (`pending-approval` / `env`),
|
|
74
83
|
* which is the moment to sanity-check it against the live session.
|
|
75
84
|
*/
|
|
76
|
-
sessionSource: "flag" | "env-claude" | "env-codex" | "pending-approval" | "newest-report";
|
|
85
|
+
sessionSource: "flag" | "env-claude-code" | "env-claude" | "env-codex" | "pending-approval" | "newest-report";
|
|
77
86
|
/**
|
|
78
87
|
* When `sessionSource` is `"newest-report"`, the absolute path of the
|
|
79
88
|
* persisted report the session id was guessed from. Undefined for
|
|
@@ -125,6 +134,33 @@ export interface ApproveUnderstandingResult {
|
|
|
125
134
|
ok: false;
|
|
126
135
|
reason: string;
|
|
127
136
|
};
|
|
137
|
+
/**
|
|
138
|
+
* Approve-time content validation of the persisted report. `mode` is
|
|
139
|
+
* the report's stamped mode field (the schema variant the report is
|
|
140
|
+
* judged against). `ok: false` means a structural rule the prompt
|
|
141
|
+
* already declared was violated (today: `grill_me` reports must have
|
|
142
|
+
* a non-empty priorArt list with no literal `- None`).
|
|
143
|
+
*
|
|
144
|
+
* `enforced: false` means the failure was bypassed via `--force`; the
|
|
145
|
+
* marker / ledger / report-flip still ran, and `ledger.tag` carries a
|
|
146
|
+
* `:forced:<field>-<reason>` suffix so audit can distinguish forced
|
|
147
|
+
* approvals from clean ones.
|
|
148
|
+
*
|
|
149
|
+
* `skipped: true` means no report was loaded to validate (no `latest`
|
|
150
|
+
* matched the session, ledger-only path); validation is silently
|
|
151
|
+
* waived because there is nothing to enforce.
|
|
152
|
+
*/
|
|
153
|
+
validation: {
|
|
154
|
+
ok: true;
|
|
155
|
+
mode: string | null;
|
|
156
|
+
} | {
|
|
157
|
+
ok: false;
|
|
158
|
+
field: string;
|
|
159
|
+
reason: string;
|
|
160
|
+
enforced: boolean;
|
|
161
|
+
} | {
|
|
162
|
+
skipped: true;
|
|
163
|
+
};
|
|
128
164
|
}
|
|
129
165
|
/**
|
|
130
166
|
* Normalise a list of task ids supplied via `opts.tasks` (or the CLI's
|
|
@@ -136,6 +136,48 @@ function findLatestParseError(dir, sessionId) {
|
|
|
136
136
|
}
|
|
137
137
|
return null;
|
|
138
138
|
}
|
|
139
|
+
function validatePersistedReport(parsed) {
|
|
140
|
+
const mode = typeof parsed["mode"] === "string" ? parsed["mode"] : null;
|
|
141
|
+
if (mode !== "grill_me")
|
|
142
|
+
return { ok: true, mode };
|
|
143
|
+
const priorArt = parsed["priorArt"];
|
|
144
|
+
if (!Array.isArray(priorArt) || priorArt.length === 0) {
|
|
145
|
+
return {
|
|
146
|
+
ok: false,
|
|
147
|
+
field: "priorArt",
|
|
148
|
+
reason: "grill_me report is missing required Section 10 (Prior Art). " +
|
|
149
|
+
"The schema requires a non-empty list naming the channels searched " +
|
|
150
|
+
"and the closest existing solution.",
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
// Mirror the schema's `items: { type: "string", minLength: 1 }`.
|
|
154
|
+
for (const item of priorArt) {
|
|
155
|
+
if (typeof item !== "string" || item.trim().length === 0) {
|
|
156
|
+
return {
|
|
157
|
+
ok: false,
|
|
158
|
+
field: "priorArt",
|
|
159
|
+
reason: "grill_me report's priorArt contains a non-string or empty item; " +
|
|
160
|
+
"every entry must be a non-empty string.",
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
// Deterrent for the literal `- None` / `None` placeholder. The parser
|
|
165
|
+
// intentionally accepts these structurally; approve-time is where the
|
|
166
|
+
// prompt's "do not write `- None`" rule turns into a hard refusal.
|
|
167
|
+
// Only blocks when EVERY item is the None literal; a mixed list with
|
|
168
|
+
// real content is accepted.
|
|
169
|
+
const isNone = (x) => typeof x === "string" && ["none", "- none"].includes(x.trim().toLowerCase());
|
|
170
|
+
if (priorArt.every(isNone)) {
|
|
171
|
+
return {
|
|
172
|
+
ok: false,
|
|
173
|
+
field: "priorArt",
|
|
174
|
+
reason: "grill_me report's priorArt is entirely literal `None` / `- None`. " +
|
|
175
|
+
"The section exists to force a written answer to 'should this be " +
|
|
176
|
+
"built at all'; name the channels searched and the closest existing tool.",
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
return { ok: true, mode };
|
|
180
|
+
}
|
|
139
181
|
function rewriteReportApproved(filePath, approvedAt, approvedBy, sessionId) {
|
|
140
182
|
const raw = fs.readFileSync(filePath, "utf8");
|
|
141
183
|
const parsed = JSON.parse(raw);
|
|
@@ -192,13 +234,19 @@ export async function approveUnderstanding(opts = {}) {
|
|
|
192
234
|
});
|
|
193
235
|
// Session id resolution, in precedence order:
|
|
194
236
|
// 1. explicit --session flag
|
|
195
|
-
// 2. $
|
|
196
|
-
//
|
|
197
|
-
//
|
|
198
|
-
//
|
|
237
|
+
// 2. $CLAUDE_CODE_SESSION_ID — the canonical Claude Code env, the
|
|
238
|
+
// variable Claude Code itself exports into the agent shell. Read
|
|
239
|
+
// first so the runtime's id wins over a manually exported legacy
|
|
240
|
+
// $CLAUDE_SESSION_ID that may not match.
|
|
241
|
+
// 3. $CLAUDE_SESSION_ID — legacy / docs-name peer, kept for the
|
|
242
|
+
// Codex pre-tool-use hook's own fallback chain and for operators
|
|
243
|
+
// who set it by hand in older `!`-shell recipes.
|
|
244
|
+
// 4. $CODEX_SESSION_ID (set inside a live Codex session — symmetric
|
|
245
|
+
// with the Codex pre-tool-use hook's own env fallback).
|
|
246
|
+
// 5. the `.pending-approval` file the gate hook staged on its last
|
|
199
247
|
// block — this is what makes an arg-less `harness approve` work
|
|
200
248
|
// from the operator's `!`-shell, where neither of the above is set.
|
|
201
|
-
//
|
|
249
|
+
// 6. the freshest persisted Understanding Report under <reportsDir>
|
|
202
250
|
// whose JSON `sessionId` field is non-null. Runtime-neutral
|
|
203
251
|
// fallback when the gate has not blocked yet (e.g. arg-less
|
|
204
252
|
// approval right after the agent produced an Understanding Report,
|
|
@@ -220,6 +268,11 @@ export async function approveUnderstanding(opts = {}) {
|
|
|
220
268
|
sessionId = opts.session;
|
|
221
269
|
sessionSource = "flag";
|
|
222
270
|
}
|
|
271
|
+
else if (typeof process.env.CLAUDE_CODE_SESSION_ID === "string" &&
|
|
272
|
+
process.env.CLAUDE_CODE_SESSION_ID.length > 0) {
|
|
273
|
+
sessionId = process.env.CLAUDE_CODE_SESSION_ID;
|
|
274
|
+
sessionSource = "env-claude-code";
|
|
275
|
+
}
|
|
223
276
|
else if (typeof process.env.CLAUDE_SESSION_ID === "string" &&
|
|
224
277
|
process.env.CLAUDE_SESSION_ID.length > 0) {
|
|
225
278
|
sessionId = process.env.CLAUDE_SESSION_ID;
|
|
@@ -259,16 +312,19 @@ export async function approveUnderstanding(opts = {}) {
|
|
|
259
312
|
}
|
|
260
313
|
}
|
|
261
314
|
if (sessionId === "") {
|
|
262
|
-
// Reaching here means: no --session flag, no $
|
|
263
|
-
// $CODEX_SESSION_ID env, no staged
|
|
264
|
-
// `pending` persisted Understanding
|
|
265
|
-
// carries a sessionId field. Either the
|
|
266
|
-
// session and the agent never produced a
|
|
267
|
-
//
|
|
268
|
-
// fresh `pending` report).
|
|
269
|
-
// operator does not have to
|
|
315
|
+
// Reaching here means: no --session flag, no $CLAUDE_CODE_SESSION_ID
|
|
316
|
+
// / $CLAUDE_SESSION_ID / $CODEX_SESSION_ID env, no staged
|
|
317
|
+
// `.pending-approval`, AND no `pending` persisted Understanding
|
|
318
|
+
// Report under <reportsDir> carries a sessionId field. Either the
|
|
319
|
+
// gate has never blocked this session and the agent never produced a
|
|
320
|
+
// report, or every report is already approved/expired or
|
|
321
|
+
// sessionId-null (tier 6 only adopts a fresh `pending` report).
|
|
322
|
+
// Spell out the retrieval paths so the operator does not have to
|
|
323
|
+
// dig through docs.
|
|
270
324
|
throw new HarnessExitError([
|
|
271
|
-
"no session id available. Pass --session <id>, or set
|
|
325
|
+
"no session id available. Pass --session <id>, or set one of",
|
|
326
|
+
"$CLAUDE_CODE_SESSION_ID (Claude Code) / $CLAUDE_SESSION_ID (legacy) /",
|
|
327
|
+
"$CODEX_SESSION_ID (Codex).",
|
|
272
328
|
"",
|
|
273
329
|
`Both the understanding-gate PreToolUse hook AND \`harness session-start preflight\``,
|
|
274
330
|
"stage the session id in",
|
|
@@ -287,7 +343,7 @@ export async function approveUnderstanding(opts = {}) {
|
|
|
287
343
|
" so this is the canonical session-id source for both Claude Code",
|
|
288
344
|
" and Codex runtimes regardless of cwd.",
|
|
289
345
|
" • From inside the running agent: ask it to print its session id",
|
|
290
|
-
" (Claude Code exposes $
|
|
346
|
+
" (Claude Code exposes $CLAUDE_CODE_SESSION_ID; Codex exposes",
|
|
291
347
|
" $CODEX_SESSION_ID and also prints it in `codex doctor --json`).",
|
|
292
348
|
"",
|
|
293
349
|
"If approve writes the tag but the gate still blocks, the running",
|
|
@@ -305,6 +361,67 @@ export async function approveUnderstanding(opts = {}) {
|
|
|
305
361
|
catch {
|
|
306
362
|
/* swallow; ledger write becomes a degraded-ok */
|
|
307
363
|
}
|
|
364
|
+
// Approve-time validation. Resolve the report we would flip BEFORE
|
|
365
|
+
// writing the marker, so a validation failure can short-circuit every
|
|
366
|
+
// downstream write. The `latest` + `reports` values are reused later;
|
|
367
|
+
// we do not list / find twice.
|
|
368
|
+
const reports = listPersistedReports(reportsDir);
|
|
369
|
+
const latest = findLatestReportForSession(reports, sessionId, {
|
|
370
|
+
tolerantFallback: "uncompleted",
|
|
371
|
+
});
|
|
372
|
+
let validation;
|
|
373
|
+
if (!latest) {
|
|
374
|
+
validation = { skipped: true };
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
let parsed = null;
|
|
378
|
+
try {
|
|
379
|
+
parsed = JSON.parse(fs.readFileSync(latest.filePath, "utf8"));
|
|
380
|
+
}
|
|
381
|
+
catch {
|
|
382
|
+
parsed = null;
|
|
383
|
+
}
|
|
384
|
+
if (!parsed) {
|
|
385
|
+
validation = { skipped: true };
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
const v = validatePersistedReport(parsed);
|
|
389
|
+
validation = v.ok ? v : { ...v, enforced: !opts.force };
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
// Short-circuit before any side effect if validation rejects and the
|
|
393
|
+
// operator did not pass --force. No marker, no ledger tag, no report
|
|
394
|
+
// flip — the gate stays closed and the audit trail records no
|
|
395
|
+
// approval. The CLI surfaces this as a hard failure so the operator
|
|
396
|
+
// does not believe they approved when they didn't.
|
|
397
|
+
if ("ok" in validation && validation.ok === false && validation.enforced) {
|
|
398
|
+
// Any --task / --tasks ids the operator passed are dropped on the
|
|
399
|
+
// floor: pre-approving a batch alongside a session whose own report
|
|
400
|
+
// failed validation would write task markers for a session that the
|
|
401
|
+
// gate is still going to refuse. The CLI surfaces this empty array
|
|
402
|
+
// alongside the rejection so an operator who batched several tasks
|
|
403
|
+
// can see the batch was NOT pre-approved.
|
|
404
|
+
return {
|
|
405
|
+
sessionId,
|
|
406
|
+
sessionSource,
|
|
407
|
+
...(newestReportPath !== undefined ? { newestReportPath } : {}),
|
|
408
|
+
marker: {
|
|
409
|
+
ok: false,
|
|
410
|
+
reason: `validation failed (${validation.field}): ${validation.reason}`,
|
|
411
|
+
},
|
|
412
|
+
taskMarkers: [],
|
|
413
|
+
ledger: {
|
|
414
|
+
ok: false,
|
|
415
|
+
tag: approvedLedgerTagFor(sessionId),
|
|
416
|
+
reason: `skipped: ${validation.field} validation failed`,
|
|
417
|
+
},
|
|
418
|
+
persistedReport: {
|
|
419
|
+
ok: false,
|
|
420
|
+
reason: `skipped: ${validation.field} validation failed`,
|
|
421
|
+
},
|
|
422
|
+
validation,
|
|
423
|
+
};
|
|
424
|
+
}
|
|
308
425
|
// Write the canonical approval marker first. The gate consults this
|
|
309
426
|
// file (not the ledger) since agent-tasks/88ca4bb3 closed the self-
|
|
310
427
|
// approval backdoor: the agent has direct MCP access to the ledger,
|
|
@@ -375,22 +492,21 @@ export async function approveUnderstanding(opts = {}) {
|
|
|
375
492
|
});
|
|
376
493
|
}
|
|
377
494
|
}
|
|
378
|
-
|
|
495
|
+
// Ledger tag content: a `--force`-bypass of a validation failure
|
|
496
|
+
// stamps the bypass into the tag so audit can distinguish a clean
|
|
497
|
+
// approval from one that overrode a structural rule. The base tag
|
|
498
|
+
// shape (`understanding-approved:<session>`) stays intact so the gate
|
|
499
|
+
// matcher still recognises it; the `:forced:<field>` suffix is
|
|
500
|
+
// additive metadata.
|
|
501
|
+
const tag = "ok" in validation && validation.ok === false
|
|
502
|
+
? `${approvedLedgerTagFor(sessionId)}:forced:${validation.field}`
|
|
503
|
+
: approvedLedgerTagFor(sessionId);
|
|
379
504
|
const ledgerResult = manifest
|
|
380
505
|
? await writeLedgerTag(manifest, sessionId, tag, opts)
|
|
381
506
|
: { ok: false, reason: "manifest unreadable; skipped ledger write" };
|
|
382
|
-
// Persisted report: flip the latest matching one. `
|
|
383
|
-
// resolved up front (alongside
|
|
384
|
-
//
|
|
385
|
-
const reports = listPersistedReports(reportsDir);
|
|
386
|
-
// `tolerantFallback: "uncompleted"` — never adopt a sessionId-null
|
|
387
|
-
// report that is already `approved` / `expired`. Such a report is
|
|
388
|
-
// from a prior, finished cycle (often a different task days ago);
|
|
389
|
-
// flipping it would bind the live session to a stale, unrelated
|
|
390
|
-
// Understanding Report (harness/0dce3880 friction #1).
|
|
391
|
-
const latest = findLatestReportForSession(reports, sessionId, {
|
|
392
|
-
tolerantFallback: "uncompleted",
|
|
393
|
-
});
|
|
507
|
+
// Persisted report: flip the latest matching one. `reports` + `latest`
|
|
508
|
+
// were resolved up front (alongside validation) so both paths agree
|
|
509
|
+
// on the same artefact.
|
|
394
510
|
let persistedReport;
|
|
395
511
|
if (!latest) {
|
|
396
512
|
// When no matching report exists, look at the sibling parse-errors
|
|
@@ -451,6 +567,7 @@ export async function approveUnderstanding(opts = {}) {
|
|
|
451
567
|
? { ok: true, tag }
|
|
452
568
|
: { ok: false, tag, reason: ledgerResult.reason },
|
|
453
569
|
persistedReport,
|
|
570
|
+
validation,
|
|
454
571
|
};
|
|
455
572
|
}
|
|
456
573
|
//# sourceMappingURL=understanding.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"understanding.js","sourceRoot":"","sources":["../../../src/cli/approve/understanding.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,4CAA4C;AAC5C,yCAAyC;AACzC,EAAE;AACF,6EAA6E;AAC7E,wEAAwE;AACxE,mDAAmD;AACnD,uEAAuE;AACvE,oEAAoE;AACpE,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,qEAAqE;AACrE,oEAAoE;AAEpE,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC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AoB,CAAC,YAAY,CAAC,CAAC;IACrC,CAAC;IAED,OAAO;QACL,SAAS;QACT,aAAa;QACb,GAAG,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,MAAM,EAAE,YAAY;QACpB,WAAW;QACX,MAAM,EAAE,YAAY,CAAC,EAAE;YACrB,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE;YACnB,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,MAAM,EAAE;QACnD,eAAe;KAChB,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"understanding.js","sourceRoot":"","sources":["../../../src/cli/approve/understanding.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,4CAA4C;AAC5C,yCAAyC;AACzC,EAAE;AACF,6EAA6E;AAC7E,wEAAwE;AACxE,mDAAmD;AACnD,uEAAuE;AACvE,oEAAoE;AACpE,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,qEAAqE;AACrE,oEAAoE;AAEpE,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,0BAA0B,EAC1B,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,sEAAsE,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,gBAAgB,EA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