@lannguyensi/harness 0.57.0 → 0.58.1
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 +45 -0
- package/README.md +1 -1
- package/dist/cli/apply/apply.d.ts +6 -0
- package/dist/cli/apply/apply.js +2 -0
- package/dist/cli/apply/apply.js.map +1 -1
- package/dist/cli/apply/generate-codex-config.js +3 -3
- package/dist/cli/apply/generate-codex-config.js.map +1 -1
- package/dist/cli/apply/index.d.ts +1 -0
- package/dist/cli/apply/index.js +1 -0
- package/dist/cli/apply/index.js.map +1 -1
- package/dist/cli/apply/install-codex-config.d.ts +65 -0
- package/dist/cli/apply/install-codex-config.js +689 -20
- package/dist/cli/apply/install-codex-config.js.map +1 -1
- package/dist/cli/approve/understanding.d.ts +4 -4
- package/dist/cli/index.js +50 -21
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/pack/hook-codex-user-prompt-submit.d.ts +0 -32
- package/dist/cli/pack/hook-codex-user-prompt-submit.js +11 -118
- package/dist/cli/pack/hook-codex-user-prompt-submit.js.map +1 -1
- package/dist/cli/pack/hook-solution-acceptance.d.ts +55 -0
- package/dist/cli/pack/hook-solution-acceptance.js +210 -23
- package/dist/cli/pack/hook-solution-acceptance.js.map +1 -1
- package/dist/cli/pack/hook-track-active-claim.d.ts +1 -0
- package/dist/cli/pack/hook-track-active-claim.js +91 -8
- package/dist/cli/pack/hook-track-active-claim.js.map +1 -1
- package/dist/cli/validate/checks.js +11 -1
- package/dist/cli/validate/checks.js.map +1 -1
- package/dist/io/lock.d.ts +26 -0
- package/dist/io/lock.js +25 -0
- package/dist/io/lock.js.map +1 -1
- package/dist/policy-packs/builtin/solution-acceptance-reconnect.d.ts +9 -7
- package/dist/policy-packs/builtin/solution-acceptance-reconnect.js +25 -20
- package/dist/policy-packs/builtin/solution-acceptance-reconnect.js.map +1 -1
- package/dist/policy-packs/builtin/solution-acceptance-runtime.d.ts +43 -4
- package/dist/policy-packs/builtin/solution-acceptance-runtime.js +40 -26
- package/dist/policy-packs/builtin/solution-acceptance-runtime.js.map +1 -1
- package/dist/policy-packs/builtin/understanding-before-execution.js +7 -5
- package/dist/policy-packs/builtin/understanding-before-execution.js.map +1 -1
- package/dist/runtime/task-providers/agent-tasks.d.ts +65 -3
- package/dist/runtime/task-providers/agent-tasks.js +145 -3
- package/dist/runtime/task-providers/agent-tasks.js.map +1 -1
- package/package.json +4 -1
|
@@ -5,30 +5,22 @@
|
|
|
5
5
|
// `understanding-gate-claude-hook` bin (the npm package owns the
|
|
6
6
|
// instruction template). The Codex adapter mirrors that contract here:
|
|
7
7
|
// reads the upstream prompt JSON on stdin, writes a system-style
|
|
8
|
-
// instruction block on stdout
|
|
9
|
-
// prompt before the agent runs.
|
|
8
|
+
// instruction block on stdout as developer context before the agent runs.
|
|
10
9
|
//
|
|
11
|
-
// Wire format on stdin:
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
// operator's actual prompt text, the same way the sibling Codex hooks
|
|
16
|
-
// alias-tolerate `tool`/`tool_name` and `raw_input`/`tool_input`. The
|
|
17
|
-
// generated `config.toml` header for other Codex hooks documents the
|
|
18
|
-
// wire shape as `{ session_id?, tool_name?, raw_input?, event? }`, with
|
|
19
|
-
// no prompt field at all, so an envelope carrying none of the known
|
|
20
|
-
// aliases is expected, not an error.
|
|
10
|
+
// Wire format on stdin: Codex invokes this hook for an operator prompt.
|
|
11
|
+
// The adapter deliberately does not inspect the envelope to infer which
|
|
12
|
+
// kind of turn caused it. The hook event itself is the protocol boundary:
|
|
13
|
+
// if Codex invokes UserPromptSubmit, inject the instruction block.
|
|
21
14
|
//
|
|
22
|
-
// stdout: a plain-text instruction block (no JSON wrapper)
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
// upstream-package concern.
|
|
15
|
+
// stdout: a plain-text developer-context instruction block (no JSON wrapper).
|
|
16
|
+
// The block is identical across modes for v1; finer-grained per-mode
|
|
17
|
+
// templating is an upstream-package concern.
|
|
26
18
|
//
|
|
27
19
|
// Failure mode: any error → exit 0, no stdout, diagnostic on stderr.
|
|
28
20
|
// A missing injector text must never fail the agent's prompt path.
|
|
29
21
|
//
|
|
30
|
-
//
|
|
31
|
-
// producing
|
|
22
|
+
// One short-circuit happens before any manifest/mode logic runs,
|
|
23
|
+
// producing "no stdout, no injection":
|
|
32
24
|
//
|
|
33
25
|
// 1. Pause sentinel (task 63fefe3a): honoured the same way every other
|
|
34
26
|
// pack hook honours it (`checkHookPause`, mirrored from
|
|
@@ -36,27 +28,6 @@
|
|
|
36
28
|
// `harness pause` must silence this injector exactly like it silences
|
|
37
29
|
// the PreToolUse/PostToolUse gates. Checked BEFORE manifest load so a
|
|
38
30
|
// broken install still respects an active pause.
|
|
39
|
-
// 2. No real user input (task 63fefe3a, corrected same task after an
|
|
40
|
-
// advisor review caught the first cut fail-closed): a notification
|
|
41
|
-
// turn, subagent completion, a Monitor event, a background-bash
|
|
42
|
-
// finishing, carries no operator text, and injecting the full
|
|
43
|
-
// instruction block on it is pure noise (and, per the pack's own
|
|
44
|
-
// contract, prompts the agent to write a fresh Understanding Report
|
|
45
|
-
// against nothing). BUT the module's own documented envelope
|
|
46
|
-
// (`{ session_id?, prompt? }` above) is unverified against a real
|
|
47
|
-
// Codex payload: the generated `config.toml` header for every other
|
|
48
|
-
// Codex hook documents the wire shape as `{ session_id?, tool_name?,
|
|
49
|
-
// raw_input?, event? }`, no `prompt` field at all, and the sibling
|
|
50
|
-
// hooks (`hook-codex-pre-tool-use.ts` etc.) never trust a single
|
|
51
|
-
// field name, they alias-tolerate (`tool`/`tool_name`,
|
|
52
|
-
// `raw_input`/`tool_input`) via `pickString`. So this check is
|
|
53
|
-
// FAIL-OPEN-TO-INJECT: it only suppresses when a recognized
|
|
54
|
-
// prompt-carrying field is POSITIVELY present and empty. A missing
|
|
55
|
-
// field, an unrecognized envelope shape, or unparsable stdin is not
|
|
56
|
-
// evidence of "no user input", it is evidence the real Codex wire
|
|
57
|
-
// format is not what this module assumed, and the safe default in
|
|
58
|
-
// that case is the pre-task-63fefe3a behavior: inject. See
|
|
59
|
-
// `hasRealUserPrompt` below.
|
|
60
31
|
import { resolveMode } from "../../policy-packs/builtin/understanding-before-execution.js";
|
|
61
32
|
import { checkHookPause, loadManifestOrInjected, readStdin } from "./hook-bootstrap.js";
|
|
62
33
|
const PACK_NAME = "understanding-before-execution";
|
|
@@ -87,96 +58,18 @@ export function buildInstructionBlock(mode) {
|
|
|
87
58
|
].join("\n");
|
|
88
59
|
return base + "\n";
|
|
89
60
|
}
|
|
90
|
-
/**
|
|
91
|
-
* Field names that could plausibly carry the operator's actual prompt
|
|
92
|
-
* text on a Codex UserPromptSubmit envelope. `prompt` is this module's
|
|
93
|
-
* own documented guess; the others are tolerated the same way the
|
|
94
|
-
* sibling Codex hooks tolerate `tool`/`tool_name` and
|
|
95
|
-
* `raw_input`/`tool_input`, a real integration may use a different
|
|
96
|
-
* name than the one this package assumed. None of this is confirmed
|
|
97
|
-
* against a real Codex payload (see module header); the alias list only
|
|
98
|
-
* WIDENS which fields can prove a real prompt, it never narrows what
|
|
99
|
-
* counts as "unknown, so inject".
|
|
100
|
-
*/
|
|
101
|
-
const REAL_PROMPT_FIELD_ALIASES = [
|
|
102
|
-
"prompt",
|
|
103
|
-
"text",
|
|
104
|
-
"input",
|
|
105
|
-
"message",
|
|
106
|
-
"user_prompt",
|
|
107
|
-
"user_input",
|
|
108
|
-
];
|
|
109
|
-
/**
|
|
110
|
-
* True when the UserPromptSubmit envelope should trigger injection.
|
|
111
|
-
*
|
|
112
|
-
* FAIL-OPEN TO INJECT: this only returns `false` (suppress) when at
|
|
113
|
-
* least one recognized prompt-carrying field (see
|
|
114
|
-
* `REAL_PROMPT_FIELD_ALIASES`) is POSITIVELY present on the parsed
|
|
115
|
-
* envelope with a string value, and every string-valued alias present
|
|
116
|
-
* is empty or whitespace-only, a real signal that the sender
|
|
117
|
-
* explicitly marked this turn as carrying no operator text. The
|
|
118
|
-
* decision considers every alias present, not just the first match in
|
|
119
|
-
* list order: a single non-empty string alias anywhere in the envelope
|
|
120
|
-
* (for example `{"prompt":"","text":"real operator text"}`) is real
|
|
121
|
-
* user input and must inject, even when an earlier-listed alias on the
|
|
122
|
-
* same envelope is empty. Everything else defaults to `true` (inject,
|
|
123
|
-
* i.e. the pre-task-63fefe3a behavior):
|
|
124
|
-
*
|
|
125
|
-
* - unparsable / non-JSON stdin,
|
|
126
|
-
* - a parsed value that is not an object,
|
|
127
|
-
* - an object that carries none of the known aliases as a string
|
|
128
|
-
* value at all (this is the documented `{ session_id?, tool_name?,
|
|
129
|
-
* raw_input?, event? }` shape from the generated config.toml
|
|
130
|
-
* header, no prompt field by design, not evidence of a
|
|
131
|
-
* notification turn, and a non-string alias value is ignored the
|
|
132
|
-
* same way),
|
|
133
|
-
*
|
|
134
|
-
* An envelope harness cannot parse, or cannot recognize, is not
|
|
135
|
-
* evidence that there was no real user input; it is evidence this
|
|
136
|
-
* module's assumption about the wire format was wrong, and the correct
|
|
137
|
-
* failure direction for a governance-adjacent injector is to keep
|
|
138
|
-
* injecting, not to go silently dark.
|
|
139
|
-
*/
|
|
140
|
-
export function hasRealUserPrompt(raw) {
|
|
141
|
-
let parsed;
|
|
142
|
-
try {
|
|
143
|
-
parsed = JSON.parse(raw);
|
|
144
|
-
}
|
|
145
|
-
catch {
|
|
146
|
-
return true;
|
|
147
|
-
}
|
|
148
|
-
if (typeof parsed !== "object" || parsed === null)
|
|
149
|
-
return true;
|
|
150
|
-
const obj = parsed;
|
|
151
|
-
let sawStringAlias = false;
|
|
152
|
-
for (const key of REAL_PROMPT_FIELD_ALIASES) {
|
|
153
|
-
const value = obj[key];
|
|
154
|
-
if (typeof value !== "string")
|
|
155
|
-
continue;
|
|
156
|
-
sawStringAlias = true;
|
|
157
|
-
if (value.trim().length > 0)
|
|
158
|
-
return true;
|
|
159
|
-
}
|
|
160
|
-
return !sawStringAlias;
|
|
161
|
-
}
|
|
162
61
|
export async function runPackHookCodexUserPromptSubmitCli(opts = {}) {
|
|
163
62
|
const stdin = opts.stdin ?? process.stdin;
|
|
164
63
|
const stdout = opts.stdout ?? process.stdout;
|
|
165
64
|
const stderr = opts.stderr ?? process.stderr;
|
|
166
65
|
const packName = opts.pack ?? PACK_NAME;
|
|
167
|
-
|
|
66
|
+
await readStdin(stdin).catch(() => "");
|
|
168
67
|
// Pause sentinel, operator-only kill switch. Honoured BEFORE manifest
|
|
169
68
|
// load, same ordering as every other pack hook (see module header).
|
|
170
69
|
if (checkHookPause("codex-user-prompt-submit", stderr, opts, opts.generatedDir, opts.now).paused) {
|
|
171
70
|
stderr.write("harness pack hook codex-user-prompt-submit: harness paused, skipping injection.\n");
|
|
172
71
|
return { exitCode: 0, emitted: false, text: "" };
|
|
173
72
|
}
|
|
174
|
-
// No real user input on this turn: nothing to react to, so nothing to
|
|
175
|
-
// inject. See `hasRealUserPrompt` above.
|
|
176
|
-
if (!hasRealUserPrompt(raw)) {
|
|
177
|
-
stderr.write("harness pack hook codex-user-prompt-submit: no real user prompt on this turn, suppressing injection.\n");
|
|
178
|
-
return { exitCode: 0, emitted: false, text: "" };
|
|
179
|
-
}
|
|
180
73
|
let manifest;
|
|
181
74
|
try {
|
|
182
75
|
({ manifest } = loadManifestOrInjected(opts, opts.manifest));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook-codex-user-prompt-submit.js","sourceRoot":"","sources":["../../../src/cli/pack/hook-codex-user-prompt-submit.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,qEAAqE;AACrE,2EAA2E;AAC3E,iEAAiE;AACjE,uEAAuE;AACvE,iEAAiE;AACjE,
|
|
1
|
+
{"version":3,"file":"hook-codex-user-prompt-submit.js","sourceRoot":"","sources":["../../../src/cli/pack/hook-codex-user-prompt-submit.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,qEAAqE;AACrE,2EAA2E;AAC3E,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EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IACnD,CAAC;IAED,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAChD,IAAI,OAAO;QAAE,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;IAC1C,MAAM,IAAI,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACzC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnB,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC9C,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type VerdictReadOutcome } from "../../policy-packs/builtin/solution-acceptance-runtime.js";
|
|
2
|
+
import { type LockCheckResult } from "../../io/lock.js";
|
|
1
3
|
import { type Manifest } from "../../schema/index.js";
|
|
2
4
|
import { type LoaderOptions } from "../loader.js";
|
|
3
5
|
export interface PackHookSolutionAcceptanceOptions extends LoaderOptions {
|
|
@@ -25,4 +27,57 @@ export interface PackHookSolutionAcceptanceResult {
|
|
|
25
27
|
blocked: boolean;
|
|
26
28
|
diagnostic: string;
|
|
27
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Staleness window this hook applies when READING the attempt-lock anchor:
|
|
32
|
+
* the producer's own DOCUMENTED default, `DEFAULT_ATTEMPT_LOCK_STALE_MS`
|
|
33
|
+
* (grounding-mcp-v0.12.0 packages/grounding-mcp/src/solution-attempt-log.ts:102,
|
|
34
|
+
* `= 30_000`), the `staleMs` `acquireAttemptLock` passes straight through
|
|
35
|
+
* to `lockfile.lock(anchor, { retries: 0, realpath: false, stale:
|
|
36
|
+
* options.staleMs, ... })` (same file, lines 472-475) on every DEFAULT
|
|
37
|
+
* acquisition, pinned here as a literal rather than imported (this package
|
|
38
|
+
* has no dependency on grounding-mcp's internals). This hook applies the
|
|
39
|
+
* producer's documented default window pinned to grounding-mcp-v0.12.0; it
|
|
40
|
+
* diverges from what the producer actually enforces for a given attempt
|
|
41
|
+
* if the producer's own default changes in a later release, or if a
|
|
42
|
+
* caller of `acquireAttemptLock` overrides `staleMs` away from that
|
|
43
|
+
* default (the producer's own option is caller-settable, same file),
|
|
44
|
+
* since neither is observable from this side of the lock: an operational
|
|
45
|
+
* pin, not a mathematical guarantee, that needs re-checking on every
|
|
46
|
+
* grounding-mcp bump this pack's producer floor moves past.
|
|
47
|
+
*/
|
|
48
|
+
export declare const ATTEMPT_LOCK_STALE_MS = 30000;
|
|
49
|
+
export type NullVerdictReading = "live-attempt" | "never-evaluated" | "unreadable-marker";
|
|
50
|
+
/**
|
|
51
|
+
* WHY a present marker path yielded no verdict, carried straight from the
|
|
52
|
+
* ONE `readVerdictDetailed` observation the gate decided on, never
|
|
53
|
+
* re-derived from a second look at the path. Exactly the non-`ok`,
|
|
54
|
+
* non-`missing`, non-`invalid-id` kinds of `VerdictReadOutcome`, so the
|
|
55
|
+
* agent-facing line for reading (3) names what that read established
|
|
56
|
+
* rather than restating a disjunction by hand.
|
|
57
|
+
*/
|
|
58
|
+
export type RejectedMarkerKind = Exclude<VerdictReadOutcome["kind"], "ok" | "missing" | "invalid-id">;
|
|
59
|
+
/**
|
|
60
|
+
* Every state the null-verdict note renders a line for, as data. The note
|
|
61
|
+
* is a total function over this list (`noteStateOf` below maps each
|
|
62
|
+
* `NullVerdictInfo` onto exactly one member, and the compiler rejects a
|
|
63
|
+
* member without a line), and
|
|
64
|
+
* `tests/cli/pack-hook-solution-acceptance.test.ts` iterates it to assert
|
|
65
|
+
* the state table has a row per member. A state added to the classifier
|
|
66
|
+
* without a row therefore fails the build or the suite, instead of
|
|
67
|
+
* shipping an unpinned line to an agent.
|
|
68
|
+
*/
|
|
69
|
+
export declare const NULL_VERDICT_NOTE_STATES: readonly ["unusable-id", "never-evaluated", "marker-symlink", "marker-not-regular", "marker-unreadable", "marker-invalid-record", "live-attempt"];
|
|
70
|
+
export type NullVerdictNoteState = (typeof NULL_VERDICT_NOTE_STATES)[number];
|
|
71
|
+
/**
|
|
72
|
+
* Three-valued liveness read, never a boolean: `"live"`, `"not-live"` (no
|
|
73
|
+
* lock directory, or one past the stale window: `proper-lockfile`'s own
|
|
74
|
+
* check answers `false` for both, swallowing the absent-lock `ENOENT`
|
|
75
|
+
* inside the library), or `"unknown"` (the check threw: an unreadable
|
|
76
|
+
* directory, a symlink loop, ...). `"unknown"` must never be
|
|
77
|
+
* treated as `"not-live"` downstream: that would assert an attempt is
|
|
78
|
+
* confirmed absent when liveness simply could not be determined (see
|
|
79
|
+
* `classifyNullVerdictReading` and `nullVerdictReadingNote` below, which
|
|
80
|
+
* keep the two states distinct all the way into the agent-facing text).
|
|
81
|
+
*/
|
|
82
|
+
export type AttemptLockLiveness = LockCheckResult;
|
|
28
83
|
export declare function runPackHookSolutionAcceptanceCli(opts?: PackHookSolutionAcceptanceOptions): Promise<PackHookSolutionAcceptanceResult>;
|
|
@@ -23,10 +23,12 @@
|
|
|
23
23
|
// finish through would defeat the purpose. The block envelope always names
|
|
24
24
|
// `solution_evaluate` as the recovery path so the operator is never wedged;
|
|
25
25
|
// `harness pause` (honored first) is the operator's hard override.
|
|
26
|
+
import * as path from "node:path";
|
|
26
27
|
import { readActiveClaim, } from "../../policy-packs/builtin/understanding-before-execution-runtime.js";
|
|
27
|
-
import { DEFAULT_PUSH_BASH_RE, evaluateGate, PACK_NAME,
|
|
28
|
+
import { DEFAULT_PUSH_BASH_RE, evaluateGate, PACK_NAME, readVerdictDetailed, resolveExplicitVerdictId, resolveProtectedCompletionTools, sanitizeVerdictId, VERDICT_ID_ENV, verdictDir as resolveVerdictDir, } from "../../policy-packs/builtin/solution-acceptance-runtime.js";
|
|
28
29
|
import { renderReconnectDenyParagraph } from "../../policy-packs/builtin/solution-acceptance-reconnect.js";
|
|
29
30
|
import { resolveGeneratedDir } from "../../io/generated-dir.js";
|
|
31
|
+
import { checkFileLock } from "../../io/lock.js";
|
|
30
32
|
import { resolveGitContext } from "../../runtime/git-context.js";
|
|
31
33
|
import { renderAgentFacing } from "../../runtime/agent-facing.js";
|
|
32
34
|
import { canonicalAgentTasksVerb, DEFAULT_PROTECTED_COMPLETION_TOOLS, } from "../../runtime/task-providers/agent-tasks.js";
|
|
@@ -57,30 +59,208 @@ function completionActionLabel(toolName, toolInput, protectedVerbs) {
|
|
|
57
59
|
return null;
|
|
58
60
|
}
|
|
59
61
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
*
|
|
62
|
+
* Suffix of the attempt-lock ANCHOR file grounding-mcp writes beside the
|
|
63
|
+
* verdict marker, mirroring its own `LOCK_ANCHOR_SUFFIX`
|
|
64
|
+
* (grounding-mcp-v0.12.0 packages/grounding-mcp/src/solution-attempt-log.ts:209)
|
|
65
|
+
* and README table row "Attempt lock anchor" (`<verdict dir>/<id>.attempt-lock`,
|
|
66
|
+
* mode `0600`; the lock itself is the `<id>.attempt-lock.lock` directory
|
|
67
|
+
* `proper-lockfile` manages beside it, packages/grounding-mcp/README.md:42
|
|
68
|
+
* at that tag).
|
|
69
|
+
*/
|
|
70
|
+
const ATTEMPT_LOCK_ANCHOR_SUFFIX = ".attempt-lock";
|
|
71
|
+
/**
|
|
72
|
+
* Staleness window this hook applies when READING the attempt-lock anchor:
|
|
73
|
+
* the producer's own DOCUMENTED default, `DEFAULT_ATTEMPT_LOCK_STALE_MS`
|
|
74
|
+
* (grounding-mcp-v0.12.0 packages/grounding-mcp/src/solution-attempt-log.ts:102,
|
|
75
|
+
* `= 30_000`), the `staleMs` `acquireAttemptLock` passes straight through
|
|
76
|
+
* to `lockfile.lock(anchor, { retries: 0, realpath: false, stale:
|
|
77
|
+
* options.staleMs, ... })` (same file, lines 472-475) on every DEFAULT
|
|
78
|
+
* acquisition, pinned here as a literal rather than imported (this package
|
|
79
|
+
* has no dependency on grounding-mcp's internals). This hook applies the
|
|
80
|
+
* producer's documented default window pinned to grounding-mcp-v0.12.0; it
|
|
81
|
+
* diverges from what the producer actually enforces for a given attempt
|
|
82
|
+
* if the producer's own default changes in a later release, or if a
|
|
83
|
+
* caller of `acquireAttemptLock` overrides `staleMs` away from that
|
|
84
|
+
* default (the producer's own option is caller-settable, same file),
|
|
85
|
+
* since neither is observable from this side of the lock: an operational
|
|
86
|
+
* pin, not a mathematical guarantee, that needs re-checking on every
|
|
87
|
+
* grounding-mcp bump this pack's producer floor moves past.
|
|
88
|
+
*/
|
|
89
|
+
export const ATTEMPT_LOCK_STALE_MS = 30_000;
|
|
90
|
+
/**
|
|
91
|
+
* Every state the null-verdict note renders a line for, as data. The note
|
|
92
|
+
* is a total function over this list (`noteStateOf` below maps each
|
|
93
|
+
* `NullVerdictInfo` onto exactly one member, and the compiler rejects a
|
|
94
|
+
* member without a line), and
|
|
95
|
+
* `tests/cli/pack-hook-solution-acceptance.test.ts` iterates it to assert
|
|
96
|
+
* the state table has a row per member. A state added to the classifier
|
|
97
|
+
* without a row therefore fails the build or the suite, instead of
|
|
98
|
+
* shipping an unpinned line to an agent.
|
|
99
|
+
*/
|
|
100
|
+
export const NULL_VERDICT_NOTE_STATES = [
|
|
101
|
+
"unusable-id",
|
|
102
|
+
"never-evaluated",
|
|
103
|
+
"marker-symlink",
|
|
104
|
+
"marker-not-regular",
|
|
105
|
+
"marker-unreadable",
|
|
106
|
+
"marker-invalid-record",
|
|
107
|
+
"live-attempt",
|
|
108
|
+
];
|
|
109
|
+
function attemptLockAnchorPath(dir, id) {
|
|
110
|
+
return path.join(dir, `${sanitizeVerdictId(id)}${ATTEMPT_LOCK_ANCHOR_SUFFIX}`);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Read-only, three-valued liveness check: does `id`'s attempt-lock
|
|
114
|
+
* anchor's `.lock` directory exist and read as NOT stale under
|
|
115
|
+
* `ATTEMPT_LOCK_STALE_MS`? Routed through `src/io/lock.ts`'s
|
|
116
|
+
* `checkFileLock` (the designated read-only wrapper around
|
|
117
|
+
* `proper-lockfile`'s own `checkSync`, the SAME library the producer
|
|
118
|
+
* acquires the lock with), so the stale/live split is decided by the
|
|
119
|
+
* producer's own mechanism, not a reimplementation of its mtime
|
|
120
|
+
* arithmetic. `realpath: false` mirrors the producer's own
|
|
121
|
+
* `acquireAttemptLock` call (cited above): with the library default
|
|
122
|
+
* `realpath: true`, checking an anchor that was never created (the
|
|
123
|
+
* anchor is created lazily, on first acquisition, the common "never
|
|
124
|
+
* evaluated" case) would `realpath` the anchor FILE itself first and
|
|
125
|
+
* throw `ENOENT`, instead of answering the ordinary "not locked" case.
|
|
126
|
+
* Never acquires or mutates the lock; a check-only read has no cleanup
|
|
127
|
+
* to restore.
|
|
128
|
+
*
|
|
129
|
+
* PRECONDITION: `id` is already known usable. `attemptLockAnchorPath`'s
|
|
130
|
+
* only throw source is `sanitizeVerdictId`, which the caller has already
|
|
131
|
+
* passed (`readVerdictDetailed` answered something other than
|
|
132
|
+
* `invalid-id` for the same id, through the same function), so this has no
|
|
133
|
+
* catch of its own: an unreachable arm cannot be tested and cannot be
|
|
134
|
+
* killed by a mutant, which is worse than no arm at all (review finding,
|
|
135
|
+
* harness/799de976, round 6).
|
|
136
|
+
*/
|
|
137
|
+
function readAttemptLockLiveness(dir, id) {
|
|
138
|
+
return checkFileLock(attemptLockAnchorPath(dir, id), { staleMs: ATTEMPT_LOCK_STALE_MS });
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Classify WHY `gate.verdict === null` for `id`: whether the id is usable
|
|
142
|
+
* at all, and if it is, which of the three readings applies, AND the raw
|
|
143
|
+
* liveness result the classification rests
|
|
144
|
+
* on, so the deny text can name the reading it detected without ever
|
|
145
|
+
* collapsing "liveness could not be determined" into "confirmed not
|
|
146
|
+
* live" (see docs/policy-packs/solution-acceptance.md, "Reading the
|
|
147
|
+
* attempt-lock anchor to distinguish the three readings", for the
|
|
148
|
+
* record). Live-attempt takes priority over the marker-presence check: a
|
|
149
|
+
* live attempt can coexist with a stale or corrupt marker left by an
|
|
150
|
+
* earlier run for the same id, and "reconnect to the live attempt" is
|
|
151
|
+
* the actionable reading in that overlap.
|
|
152
|
+
*/
|
|
153
|
+
function classifyNullVerdictReading(dir, id, read) {
|
|
154
|
+
// The marker is NOT looked at again here. `read` is the same observation
|
|
155
|
+
// `evaluateGate` decided on, passed in: a second look can disagree with
|
|
156
|
+
// the first (a background attempt finishing between the two), and a note
|
|
157
|
+
// rendered from the later one would describe a rejection the gate never
|
|
158
|
+
// made (review finding, harness/799de976, round 6). Only the LOCK, a
|
|
159
|
+
// different subject with its own clause, is read here.
|
|
160
|
+
if (read.kind === "invalid-id")
|
|
161
|
+
return { kind: "unusable-id" };
|
|
162
|
+
const liveness = readAttemptLockLiveness(dir, id);
|
|
163
|
+
if (liveness === "live")
|
|
164
|
+
return { kind: "reading", reading: "live-attempt", liveness };
|
|
165
|
+
if (read.kind === "missing")
|
|
166
|
+
return { kind: "reading", reading: "never-evaluated", liveness };
|
|
167
|
+
// `ok` cannot reach here: the classifier runs only when the gate's own
|
|
168
|
+
// verdict is null, which for a readable, valid record it never is.
|
|
169
|
+
const markerKind = read.kind === "ok" ? "invalid-record" : read.kind;
|
|
170
|
+
return { kind: "reading", reading: "unreadable-marker", liveness, markerKind };
|
|
171
|
+
}
|
|
172
|
+
/** The one note state a classification renders, as a total mapping. */
|
|
173
|
+
function noteStateOf(info) {
|
|
174
|
+
if (info.kind === "unusable-id")
|
|
175
|
+
return "unusable-id";
|
|
176
|
+
switch (info.reading) {
|
|
177
|
+
case "live-attempt":
|
|
178
|
+
return "live-attempt";
|
|
179
|
+
case "never-evaluated":
|
|
180
|
+
return "never-evaluated";
|
|
181
|
+
case "unreadable-marker":
|
|
182
|
+
switch (info.markerKind) {
|
|
183
|
+
case "symlink":
|
|
184
|
+
return "marker-symlink";
|
|
185
|
+
case "not-regular":
|
|
186
|
+
return "marker-not-regular";
|
|
187
|
+
case "unreadable":
|
|
188
|
+
return "marker-unreadable";
|
|
189
|
+
case "invalid-record":
|
|
190
|
+
return "marker-invalid-record";
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/** The liveness clause, which names what the lock check actually said. */
|
|
195
|
+
const UNDETERMINED_LIVENESS_CLAUSE = "liveness could not be determined";
|
|
196
|
+
const NOT_LIVE_CLAUSE = "no attempt reads as currently live";
|
|
197
|
+
/**
|
|
198
|
+
* One line per note state, as a total `Record` keyed by
|
|
199
|
+
* `NULL_VERDICT_NOTE_STATES`: a state added to the list without a line
|
|
200
|
+
* here fails the build, which is what makes the list a checklist rather
|
|
201
|
+
* than a convention.
|
|
202
|
+
*
|
|
203
|
+
* Invariant across every line: it states only what the gate established,
|
|
204
|
+
* and never a cause that was not observed. The liveness clause names what
|
|
205
|
+
* the lock check said ("no attempt reads as currently live" vs "liveness
|
|
206
|
+
* could not be determined") instead of always asserting absence, and the
|
|
207
|
+
* marker lines come from the gate's OWN read of the marker, never from a
|
|
208
|
+
* second look at the path. `tests/cli/pack-hook-solution-acceptance.test.ts`
|
|
209
|
+
* pins one exact expected line per state and asserts every member of the
|
|
210
|
+
* list has a row, so a future state whose line would overstate fails there
|
|
211
|
+
* rather than reaching an agent.
|
|
212
|
+
*/
|
|
213
|
+
const NULL_VERDICT_NOTE_RENDERERS = {
|
|
214
|
+
// Nothing was read here and no liveness was established, so the note
|
|
215
|
+
// claims neither: it reports the one fact the classifier settled, names
|
|
216
|
+
// the only surface this id can have come from, and names the verb that
|
|
217
|
+
// clears it. An explicit SOLUTION_VERDICT_ID cannot reach this state:
|
|
218
|
+
// `resolveExplicitVerdictId` validates through the same
|
|
219
|
+
// `sanitizeVerdictId` and answers null for anything it rejects.
|
|
220
|
+
"unusable-id": (taskId) => `The claimed id ${JSON.stringify(taskId)} is not a usable verdict id: no verdict marker path and no attempt-lock path can be derived from it, so neither was read. Release the active claim carrying it (mcp__agent-tasks__task_abandon, or have the operator clear harness.generated/active-claim), claim the real task, then run solution_evaluate for it.`,
|
|
221
|
+
// Only the marker's absence is established, plus whatever the lock check
|
|
222
|
+
// said. Neither clause names a cause: earlier versions guessed one ("the
|
|
223
|
+
// verdict directory could not be read"), then a narrower disjunction of
|
|
224
|
+
// two, and each guess was falsified by a state that reached this branch
|
|
225
|
+
// without it (review findings, harness/799de976, rounds 4 and 5).
|
|
226
|
+
"never-evaluated": (taskId, clause) => clause === UNDETERMINED_LIVENESS_CLAUSE
|
|
227
|
+
? `No readable verdict marker for "${taskId}" and liveness could not be determined: run solution_evaluate for this id.`
|
|
228
|
+
: `No verdict marker exists for "${taskId}"; ${clause}: solution_evaluate has not (yet) been called for this id, or a prior call never got far enough to record one.`,
|
|
229
|
+
// One line per rejection kind, each naming exactly what the gate's own
|
|
230
|
+
// read established. A hand-written disjunction over the kinds was the
|
|
231
|
+
// round-6 finding: it read as a claim about the path as it is NOW, while
|
|
232
|
+
// the kinds come from the read the gate decided on.
|
|
233
|
+
"marker-symlink": (taskId, clause) => `The verdict marker path for "${taskId}" is a symlink, which this gate refuses to follow; ${clause}: replace it with a marker recorded by solution_evaluate.`,
|
|
234
|
+
"marker-not-regular": (taskId, clause) => `The verdict marker path for "${taskId}" is not a regular file; ${clause}: replace it with a marker recorded by solution_evaluate.`,
|
|
235
|
+
"marker-unreadable": (taskId, clause) => `The verdict marker for "${taskId}" could not be read; ${clause}: re-run solution_evaluate to record a fresh one.`,
|
|
236
|
+
"marker-invalid-record": (taskId, clause) => `The verdict marker for "${taskId}" was read but is not a valid verdict record; ${clause}: re-run solution_evaluate to record a fresh one.`,
|
|
237
|
+
"live-attempt": (taskId) => `A solution_evaluate attempt for "${taskId}" is still live: its attempt-lock anchor is held.`,
|
|
238
|
+
};
|
|
239
|
+
function nullVerdictReadingNote(taskId, info) {
|
|
240
|
+
const clause = info.kind === "reading" && info.liveness === "unknown"
|
|
241
|
+
? UNDETERMINED_LIVENESS_CLAUSE
|
|
242
|
+
: NOT_LIVE_CLAUSE;
|
|
243
|
+
return NULL_VERDICT_NOTE_RENDERERS[noteStateOf(info)](taskId, clause);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Reconnect-vs-retry guidance appended to the default deny text only for
|
|
247
|
+
* reading (2), "an attempt is live" (`classifyNullVerdictReading` above
|
|
248
|
+
* returned `reading: "live-attempt"`): the paragraph is rendered from
|
|
71
249
|
* `solution-acceptance-reconnect.ts`, the SAME fact source the pack's
|
|
72
|
-
* `instructions.md` "Reconnecting vs. retrying" section renders from
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
250
|
+
* `instructions.md` "Reconnecting vs. retrying" section renders from, so
|
|
251
|
+
* the two surfaces cannot silently drift apart. Readings (1)
|
|
252
|
+
* (never-evaluated) and (3) (unreadable-marker) instead get their own
|
|
253
|
+
* short `nullVerdictReadingNote` line, with no reconnect paragraph: there
|
|
254
|
+
* is no live attempt to reconnect to. See
|
|
255
|
+
* docs/policy-packs/solution-acceptance.md, "Reading the attempt-lock
|
|
256
|
+
* anchor to distinguish the three readings", for the decision record.
|
|
77
257
|
*/
|
|
78
|
-
function reconnectGuidanceFor(taskId,
|
|
79
|
-
if (
|
|
258
|
+
function reconnectGuidanceFor(taskId, info) {
|
|
259
|
+
if (info === null || info.kind !== "reading" || info.reading !== "live-attempt")
|
|
80
260
|
return "";
|
|
81
261
|
return renderReconnectDenyParagraph(taskId);
|
|
82
262
|
}
|
|
83
|
-
function blockJson(actionLabel, toolName, taskId, detail, ux, sessionId,
|
|
263
|
+
function blockJson(actionLabel, toolName, taskId, detail, ux, sessionId, nullVerdict = null) {
|
|
84
264
|
let reasonText;
|
|
85
265
|
if (ux) {
|
|
86
266
|
reasonText = renderAgentFacing(ux, {
|
|
@@ -91,12 +271,13 @@ function blockJson(actionLabel, toolName, taskId, detail, ux, sessionId, showRec
|
|
|
91
271
|
else {
|
|
92
272
|
reasonText =
|
|
93
273
|
`solution-acceptance: refusing ${actionLabel} (${toolName}). ${detail}\n` +
|
|
274
|
+
(nullVerdict !== null ? `${nullVerdictReadingNote(taskId, nullVerdict)}\n` : "") +
|
|
94
275
|
`Completion must be EARNED from a real preflight run at the CURRENT HEAD, not claimed.\n` +
|
|
95
276
|
`Converge in this order, all at one commit:\n` +
|
|
96
277
|
` 1. If the working tree is dirty, COMMIT first. The verdict is pinned to the HEAD it was evaluated at, so any commit you make afterward makes it stale; commit the change before evaluating so the verdict pins to the final HEAD.\n` +
|
|
97
278
|
` 2. mcp__grounding-mcp__solution_evaluate({ id: "${taskId}" }) — runs \`preflight run --json\` (lint/typecheck/test/audit/secret) and records a HEAD-pinned verdict. A clean run at the current HEAD unblocks this tool; a failing run lists the blockers to fix (then back to step 1).\n` +
|
|
98
279
|
` 3. For \`git push\` / \`gh pr merge\`: the separate preflight-before-push gate is satisfied by a preflight at the current HEAD (its \`at_head\` rule), so refresh it at this same commit with \`harness preflight\` before retrying. Satisfy both push-gates at one HEAD.\n` +
|
|
99
|
-
reconnectGuidanceFor(taskId,
|
|
280
|
+
reconnectGuidanceFor(taskId, nullVerdict) +
|
|
100
281
|
`\n` +
|
|
101
282
|
`Operator override: \`harness pause\` (yields this and every other gate).`;
|
|
102
283
|
}
|
|
@@ -227,7 +408,12 @@ export async function runPackHookSolutionAcceptanceCli(opts = {}) {
|
|
|
227
408
|
// production both see the same process.env, and tests inject opts.verdictDir.
|
|
228
409
|
const dir = opts.verdictDir ?? resolveVerdictDir();
|
|
229
410
|
const currentHead = resolveGitContext(cwd).sha || null;
|
|
230
|
-
|
|
411
|
+
// ONE observation of the marker, shared by the gate decision below and,
|
|
412
|
+
// when it denies, by the deny text's own classification: the text must
|
|
413
|
+
// describe the read the decision rests on, not a later, possibly
|
|
414
|
+
// different state of the same path (harness/799de976, round 6).
|
|
415
|
+
const read = readVerdictDetailed(dir, taskId);
|
|
416
|
+
const verdict = read.kind === "ok" ? read.verdict : null;
|
|
231
417
|
// generatedDir (harness's own .generated/ dir, NOT the verdict dir) holds
|
|
232
418
|
// the shared approval-signing key evaluateGate needs to verify the
|
|
233
419
|
// verdict's HMAC signature (harness/c7c3f606); undefined fails closed
|
|
@@ -253,7 +439,8 @@ export async function runPackHookSolutionAcceptanceCli(opts = {}) {
|
|
|
253
439
|
const forgedTag = gate.forged ? " [audit: forged/unsigned verdict marker rejected]" : "";
|
|
254
440
|
const diagnostic = `BLOCK — ${gate.reason}${forgedTag}`;
|
|
255
441
|
note(diagnostic);
|
|
256
|
-
|
|
442
|
+
const nullVerdict = gate.verdict === null ? classifyNullVerdictReading(dir, taskId, read) : null;
|
|
443
|
+
stdout.write(`${blockJson(actionLabel, toolName, taskId, gate.reason, configUx, sessionId, nullVerdict)}\n`);
|
|
257
444
|
return { exitCode: 0, blocked: true, diagnostic };
|
|
258
445
|
}
|
|
259
446
|
//# sourceMappingURL=hook-solution-acceptance.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook-solution-acceptance.js","sourceRoot":"","sources":["../../../src/cli/pack/hook-solution-acceptance.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,yCAAyC;AACzC,EAAE;AACF,oEAAoE;AACpE,4EAA4E;AAC5E,qEAAqE;AACrE,0EAA0E;AAC1E,QAAQ;AACR,EAAE;AACF,2EAA2E;AAC3E,wEAAwE;AACxE,4EAA4E;AAC5E,wEAAwE;AACxE,4EAA4E;AAC5E,yEAAyE;AACzE,uEAAuE;AACvE,oCAAoC;AACpC,EAAE;AACF,2EAA2E;AAC3E,kEAAkE;AAClE,sEAAsE;AACtE,yEAAyE;AACzE,2EAA2E;AAC3E,4EAA4E;AAC5E,mEAAmE;AAEnE,OAAO,EACL,eAAe,GAChB,MAAM,sEAAsE,CAAC;AAC9E,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,SAAS,EACT,WAAW,EACX,wBAAwB,EACxB,+BAA+B,EAC/B,cAAc,EACd,UAAU,I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
1
|
+
{"version":3,"file":"hook-solution-acceptance.js","sourceRoot":"","sources":["../../../src/cli/pack/hook-solution-acceptance.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,yCAAyC;AACzC,EAAE;AACF,oEAAoE;AACpE,4EAA4E;AAC5E,qEAAqE;AACrE,0EAA0E;AAC1E,QAAQ;AACR,EAAE;AACF,2EAA2E;AAC3E,wEAAwE;AACxE,4EAA4E;AAC5E,wEAAwE;AACxE,4EAA4E;AAC5E,yEAAyE;AACzE,uEAAuE;AACvE,oCAAoC;AACpC,EAAE;AACF,2EAA2E;AAC3E,kEAAkE;AAClE,sEAAsE;AACtE,yEAAyE;AACzE,2EAA2E;AAC3E,4EAA4E;AAC5E,mEAAmE;AAEnE,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,eAAe,GAChB,MAAM,sEAAsE,CAAC;AAC9E,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,wBAAwB,EACxB,+BAA+B,EAC/B,iBAAiB,EACjB,cAAc,EACd,UAAU,IAAI,iBAAiB,GAEhC,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,6DAA6D,CAAC;AAC3G,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAwB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,uBAAuB,EACvB,kCAAkC,GACnC,MAAM,6CAA6C,CAAC;AAGrD,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,aAAa,EACb,SAAS,GACV,MAAM,qBAAqB,CAAC;AAoC7B,SAAS,aAAa,CAAC,SAAkB;IACvC,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,IAAI;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AAO,EAAE,CAAC;QACjB,MAAM,UAAU,GAAG,GAAG,IAAI,CAAC,MAAM,cAAc,WAAW,EAAE,CAAC;QAC7D,IAAI,CAAC,UAAU,CAAC,CAAC;QACjB,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;IACrD,CAAC;IAED,wEAAwE;IACxE,iEAAiE;IACjE,wEAAwE;IACxE,yEAAyE;IACzE,wEAAwE;IACxE,wEAAwE;IACxE,yEAAyE;IACzE,wEAAwE;IACxE,oEAAoE;IACpE,wEAAwE;IACxE,uEAAuE;IACvE,oEAAoE;IACpE,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,mDAAmD,CAAC,CAAC,CAAC,EAAE,CAAC;IACzF,MAAM,UAAU,GAAG,WAAW,IAAI,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;IACxD,IAAI,CAAC,UAAU,CAAC,CAAC;IACjB,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACjG,MAAM,CAAC,KAAK,CACV,GAAG,SAAS,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,IAAI,CAC/F,CAAC;IACF,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AACpD,CAAC"}
|
|
@@ -4,6 +4,7 @@ export declare const TOOL_NAME_TASK_START = "mcp__agent-tasks__task_start";
|
|
|
4
4
|
export declare const TOOL_NAME_TASK_FINISH = "mcp__agent-tasks__task_finish";
|
|
5
5
|
export declare const TOOL_NAME_TASK_ABANDON = "mcp__agent-tasks__task_abandon";
|
|
6
6
|
export declare const TOOL_NAME_TASKS_TRANSITION = "mcp__agent-tasks__tasks_transition";
|
|
7
|
+
export declare const TOOL_NAME_TASK_MERGE = "mcp__agent-tasks__task_merge";
|
|
7
8
|
export declare const TRACK_ACTIVE_CLAIM_TOOLS: readonly string[];
|
|
8
9
|
export interface PackHookTrackActiveClaimOptions extends LoaderOptions {
|
|
9
10
|
pack?: string;
|