pi-daddy 0.14.0 → 0.16.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 +123 -0
- package/README.md +37 -14
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +10 -4
- package/dist/cli.js.map +1 -1
- package/dist/executor.d.ts +38 -0
- package/dist/executor.d.ts.map +1 -0
- package/dist/executor.js +93 -0
- package/dist/executor.js.map +1 -0
- package/dist/grant-store.d.ts +68 -0
- package/dist/grant-store.d.ts.map +1 -0
- package/dist/grant-store.js +142 -0
- package/dist/grant-store.js.map +1 -0
- package/dist/herdr-cli.d.ts +78 -0
- package/dist/herdr-cli.d.ts.map +1 -0
- package/dist/herdr-cli.js +113 -0
- package/dist/herdr-cli.js.map +1 -0
- package/dist/herdr-name.d.ts +37 -0
- package/dist/herdr-name.d.ts.map +1 -0
- package/dist/herdr-name.js +59 -0
- package/dist/herdr-name.js.map +1 -0
- package/dist/herdr-poll.d.ts +104 -0
- package/dist/herdr-poll.d.ts.map +1 -0
- package/dist/herdr-poll.js +150 -0
- package/dist/herdr-poll.js.map +1 -0
- package/dist/herdr-stage.d.ts +40 -0
- package/dist/herdr-stage.d.ts.map +1 -0
- package/dist/herdr-stage.js +54 -0
- package/dist/herdr-stage.js.map +1 -0
- package/dist/ledger-report.d.ts +18 -0
- package/dist/ledger-report.d.ts.map +1 -1
- package/dist/ledger-report.js +10 -0
- package/dist/ledger-report.js.map +1 -1
- package/dist/ledger.d.ts +17 -0
- package/dist/ledger.d.ts.map +1 -1
- package/dist/ledger.js +1 -0
- package/dist/ledger.js.map +1 -1
- package/dist/pane-reaper.d.ts +66 -4
- package/dist/pane-reaper.d.ts.map +1 -1
- package/dist/pane-reaper.js +131 -9
- package/dist/pane-reaper.js.map +1 -1
- package/dist/progress.d.ts +96 -0
- package/dist/progress.d.ts.map +1 -0
- package/dist/progress.js +167 -0
- package/dist/progress.js.map +1 -0
- package/dist/run-child.d.ts +27 -0
- package/dist/run-child.d.ts.map +1 -1
- package/dist/run-child.js +84 -7
- package/dist/run-child.js.map +1 -1
- package/dist/run-herdr.d.ts +41 -28
- package/dist/run-herdr.d.ts.map +1 -1
- package/dist/run-herdr.js +150 -167
- package/dist/run-herdr.js.map +1 -1
- package/dist/skill-packages.d.ts +16 -0
- package/dist/skill-packages.d.ts.map +1 -1
- package/dist/skill-packages.js +39 -10
- package/dist/skill-packages.js.map +1 -1
- package/extensions/delegation.ts +94 -2
- package/extensions/grants-command.ts +57 -1
- package/extensions/grants.ts +109 -165
- package/extensions/init-command.ts +132 -0
- package/extensions/run-delegation.ts +70 -8
- package/extensions/session-report.ts +231 -0
- package/extensions/session.ts +138 -17
- package/extensions/tripwire.ts +44 -0
- package/package.json +17 -1
- package/src/cli.ts +10 -4
- package/src/executor.ts +122 -0
- package/src/grant-store.ts +151 -0
- package/src/herdr-cli.ts +125 -0
- package/src/herdr-name.ts +61 -0
- package/src/herdr-poll.ts +185 -0
- package/src/herdr-stage.ts +55 -0
- package/src/ledger-report.ts +21 -0
- package/src/ledger.ts +18 -0
- package/src/pane-reaper.ts +147 -9
- package/src/progress.ts +206 -0
- package/src/run-child.ts +96 -7
- package/src/run-herdr.ts +170 -174
- package/src/skill-packages.ts +41 -10
package/dist/run-child.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-child.js","sourceRoot":"","sources":["../src/run-child.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,yBAAyB,CAAC;AAE3D,iGAAiG;AACjG,MAAM,UAAU,cAAc,CAAC,GAAuB;IACpD,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAChC,mGAAmG;IACnG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EAAE,OAAO,CAAC,CAAC;QAElC,MAAM,CAAC,IAAI,CACT,UAAU,CAAC,GAAG,EAAE;YACd,QAAQ,GAAG,IAAI,CAAC;YAChB,IAAI,EAAE,CAAC;QACT,CAAC,EAAE,SAAS,CAAC,CACd,CAAC;QAEF,MAAM,OAAO,GAAG,GAAG,EAAE;YACnB,OAAO,GAAG,IAAI,CAAC;YACf,IAAI,EAAE,CAAC;QACT,CAAC,CAAC;QACF,OAAO,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAEnE,MAAM,MAAM,GAAG,CAAC,MAAsB,EAAE,EAAE;YACxC,IAAI,IAAI;gBAAE,OAAO;YACjB,IAAI,GAAG,IAAI,CAAC;YACZ,WAAW,EAAE,CAAC;YACd,OAAO,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACtD,MAAM,CAAC,MAAM,CAAC,CAAC;QACjB,CAAC,CAAC;QAEF,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAC1B,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CACtF,CAAC;QACF,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;IACpF,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/run-herdr.d.ts
CHANGED
|
@@ -21,12 +21,25 @@
|
|
|
21
21
|
* child. Humans are not this project's threat model, but nothing here should be read as containing one.
|
|
22
22
|
*/
|
|
23
23
|
import type { ChildRunResult } from "./run-child.ts";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
import { type HerdrExec } from "./herdr-cli.ts";
|
|
25
|
+
/**
|
|
26
|
+
* Re-exported so importers of the executor still reach the protocol at the name they always used.
|
|
27
|
+
*
|
|
28
|
+
* Deliberate rather than lazy: `test/run-herdr.test.ts` imports `HerdrExec` from here and must pass
|
|
29
|
+
* **unmodified** across this extraction — that is the only available proof the move changed no behaviour.
|
|
30
|
+
*/
|
|
31
|
+
export { type HerdrExec, parseReply } from "./herdr-cli.ts";
|
|
32
|
+
/** Re-exported: `splitSystemPrompt` moved to `./herdr-stage.ts` under the ceiling, its tests import it here. */
|
|
33
|
+
export { splitSystemPrompt, stageSystemPrompt } from "./herdr-stage.ts";
|
|
34
|
+
/** Re-exported: the name rules moved to `./herdr-name.ts` under the ceiling; tests import them here. */
|
|
35
|
+
export { uniqueAgentName } from "./herdr-name.ts";
|
|
36
|
+
/**
|
|
37
|
+
* Re-exported so `test/run-herdr.test.ts` and any importer keep reaching these where they always were.
|
|
38
|
+
*
|
|
39
|
+
* `POLL_INTERVAL_MS` and `newSuffix` moved to `./herdr-poll.ts` under the 400-line ceiling; the names are part
|
|
40
|
+
* of this module's surface and moving a file should not move an export.
|
|
41
|
+
*/
|
|
42
|
+
export { DEFAULT_SNAPSHOT_LINES, POLL_INTERVAL_MS, readPane, tailLines, waitForSettled, type PollTarget } from "./herdr-poll.ts";
|
|
30
43
|
export interface HerdrRunRequest {
|
|
31
44
|
/** `planSpawn` args **without** the prompt — see `prompt`. */
|
|
32
45
|
args: string[];
|
|
@@ -56,29 +69,29 @@ export interface HerdrRunRequest {
|
|
|
56
69
|
*/
|
|
57
70
|
keepPane?: boolean;
|
|
58
71
|
exec?: HerdrExec;
|
|
72
|
+
/**
|
|
73
|
+
* The pane's last few lines, re-reported every poll — a SNAPSHOT the consumer REPLACES, not appends.
|
|
74
|
+
*
|
|
75
|
+
* **Display only**, exactly as in `runChild`: the child's answer is still the returned `text`. Unlike
|
|
76
|
+
* `runChild`'s `onOutput`, this is not a stream: `agent read` returns a snapshot of a bounded terminal, and
|
|
77
|
+
* the previous append-shaped design produced an 89,000× amplification once a pane scrolled or passed the
|
|
78
|
+
* output cap. See `tailLines` in `./herdr-poll.ts`.
|
|
79
|
+
*
|
|
80
|
+
* Exceptions are swallowed; a renderer must not be able to break a governed run.
|
|
81
|
+
*/
|
|
82
|
+
onSnapshot?: (lines: string[]) => void;
|
|
83
|
+
/** How many pane lines to report per poll. Defaults to `DEFAULT_SNAPSHOT_LINES`. */
|
|
84
|
+
snapshotLines?: number;
|
|
85
|
+
/**
|
|
86
|
+
* The pane id, reported as soon as `tab create` returns it.
|
|
87
|
+
*
|
|
88
|
+
* Separate from `onOutput` because it arrives once and arrives *early*: it is what lets the parent print a
|
|
89
|
+
* name a human can switch to **while the child is alive**, which is the whole point of the pane surviving.
|
|
90
|
+
*/
|
|
91
|
+
onPane?: (paneId: string, agentName: string) => void;
|
|
92
|
+
/** Poll cadence override. Exists so tests do not wait `POLL_INTERVAL_MS` per state transition. */
|
|
93
|
+
pollIntervalMs?: number;
|
|
59
94
|
}
|
|
60
|
-
/**
|
|
61
|
-
* Move a multi-line `--append-system-prompt` out of argv, because herdr cannot encode it.
|
|
62
|
-
*
|
|
63
|
-
* **Measured.** `herdr agent start` types the argv into the pane's shell, so a value containing newlines
|
|
64
|
-
* is rejected outright: `invalid_agent_argument — agent arguments cannot be encoded safely for the target
|
|
65
|
-
* shell`. A definition's `SKILL.md` body is always multi-line, so every `delegate({agent})` spawn would
|
|
66
|
-
* fail on this path.
|
|
67
|
-
*
|
|
68
|
-
* pi accepts a **file path** there as readily as literal text (`resolvePromptInput` + `existsSync` in
|
|
69
|
-
* `dist/core/resource-loader.js`), so the fix is to write the body to a temp file and pass its path — one
|
|
70
|
-
* short, shell-safe argument.
|
|
71
|
-
*
|
|
72
|
-
* The split lives here rather than in `planSpawn` because the constraint is **herdr's**, not pi's: the
|
|
73
|
-
* direct executor passes the same text inline with no trouble, and a plan builder that pre-emptively wrote
|
|
74
|
-
* temp files for everybody would be paying one executor's tax on both paths.
|
|
75
|
-
*/
|
|
76
|
-
export declare function splitSystemPrompt(args: string[]): {
|
|
77
|
-
args: string[];
|
|
78
|
-
systemPrompt?: string;
|
|
79
|
-
};
|
|
80
|
-
/** How often to poll `agent get` while waiting for the child to settle. */
|
|
81
|
-
export declare const POLL_INTERVAL_MS = 750;
|
|
82
95
|
/** How often to retry `agent start` while a freshly created pane is still reaching its shell prompt. */
|
|
83
96
|
export declare const PANE_READY_POLL_MS = 300;
|
|
84
97
|
/**
|
package/dist/run-herdr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-herdr.d.ts","sourceRoot":"","sources":["../src/run-herdr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"run-herdr.d.ts","sourceRoot":"","sources":["../src/run-herdr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,EAA2B,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAKzE;;;;;GAKG;AACH,OAAO,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5D,gHAAgH;AAChH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxE,wGAAwG;AACxG,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD;;;;;GAKG;AACH,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEjI,MAAM,WAAW,eAAe;IAC9B,8DAA8D;IAC9D,IAAI,EAAE,MAAM,EAAE,CAAC;IACf;;;;;;OAMG;IACH,MAAM,EAAE,MAAM,CAAC;IACf,uFAAuF;IACvF,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACvC,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,kGAAkG;IAClG,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAGD,wGAAwG;AACxG,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAGtC;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CA2MpF"}
|
package/dist/run-herdr.js
CHANGED
|
@@ -20,67 +20,33 @@
|
|
|
20
20
|
* `bash` escape is unchanged, and a pane is *attachable by design*, so a human can type into a governed
|
|
21
21
|
* child. Humans are not this project's threat model, but nothing here should be read as containing one.
|
|
22
22
|
*/
|
|
23
|
-
import {
|
|
24
|
-
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
25
|
-
import { tmpdir } from "node:os";
|
|
26
|
-
import { join } from "node:path";
|
|
23
|
+
import { rm } from "node:fs/promises";
|
|
27
24
|
import { DEFAULT_MAX_OUTPUT_BYTES, DEFAULT_TIMEOUT_MS } from "./run-child.js";
|
|
28
|
-
import { trackPane, untrackPane } from "./pane-reaper.js";
|
|
25
|
+
import { MAX_OPEN_PANES, markPaneSettled, trackPane, trimOpenPanes, untrackPane } from "./pane-reaper.js";
|
|
26
|
+
import { defaultExec, parseReply } from "./herdr-cli.js";
|
|
27
|
+
import { readPane, waitForSettled } from "./herdr-poll.js";
|
|
28
|
+
import { stageSystemPrompt } from "./herdr-stage.js";
|
|
29
|
+
import { uniqueAgentName } from "./herdr-name.js";
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
31
|
+
* Re-exported so importers of the executor still reach the protocol at the name they always used.
|
|
31
32
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* shell`. A definition's `SKILL.md` body is always multi-line, so every `delegate({agent})` spawn would
|
|
35
|
-
* fail on this path.
|
|
36
|
-
*
|
|
37
|
-
* pi accepts a **file path** there as readily as literal text (`resolvePromptInput` + `existsSync` in
|
|
38
|
-
* `dist/core/resource-loader.js`), so the fix is to write the body to a temp file and pass its path — one
|
|
39
|
-
* short, shell-safe argument.
|
|
40
|
-
*
|
|
41
|
-
* The split lives here rather than in `planSpawn` because the constraint is **herdr's**, not pi's: the
|
|
42
|
-
* direct executor passes the same text inline with no trouble, and a plan builder that pre-emptively wrote
|
|
43
|
-
* temp files for everybody would be paying one executor's tax on both paths.
|
|
33
|
+
* Deliberate rather than lazy: `test/run-herdr.test.ts` imports `HerdrExec` from here and must pass
|
|
34
|
+
* **unmodified** across this extraction — that is the only available proof the move changed no behaviour.
|
|
44
35
|
*/
|
|
45
|
-
export
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
/** Statuses herdr reports for a settled agent. `blocked` counts: it is waiting for a human, not working. */
|
|
52
|
-
const TERMINAL = new Set(["idle", "done", "blocked"]);
|
|
53
|
-
/** How often to poll `agent get` while waiting for the child to settle. */
|
|
54
|
-
export const POLL_INTERVAL_MS = 750;
|
|
55
|
-
/** How often to retry `agent start` while a freshly created pane is still reaching its shell prompt. */
|
|
56
|
-
export const PANE_READY_POLL_MS = 300;
|
|
57
|
-
const defaultExec = (args) => new Promise((settle) => {
|
|
58
|
-
execFile("herdr", args, { maxBuffer: 32 * 1024 * 1024 }, (error, stdout, stderr) => {
|
|
59
|
-
const code = error && typeof error.code === "number" ? error.code : error ? 1 : 0;
|
|
60
|
-
settle({ code, stdout: String(stdout), stderr: String(stderr) });
|
|
61
|
-
});
|
|
62
|
-
});
|
|
36
|
+
export { parseReply } from "./herdr-cli.js";
|
|
37
|
+
/** Re-exported: `splitSystemPrompt` moved to `./herdr-stage.ts` under the ceiling, its tests import it here. */
|
|
38
|
+
export { splitSystemPrompt, stageSystemPrompt } from "./herdr-stage.js";
|
|
39
|
+
/** Re-exported: the name rules moved to `./herdr-name.ts` under the ceiling; tests import them here. */
|
|
40
|
+
export { uniqueAgentName } from "./herdr-name.js";
|
|
63
41
|
/**
|
|
64
|
-
*
|
|
42
|
+
* Re-exported so `test/run-herdr.test.ts` and any importer keep reaching these where they always were.
|
|
65
43
|
*
|
|
66
|
-
* `
|
|
67
|
-
*
|
|
68
|
-
* hides the substrate's own error message costs more time than it saves.
|
|
44
|
+
* `POLL_INTERVAL_MS` and `newSuffix` moved to `./herdr-poll.ts` under the 400-line ceiling; the names are part
|
|
45
|
+
* of this module's surface and moving a file should not move an export.
|
|
69
46
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (parsed.error)
|
|
74
|
-
return { error: parsed.error.message ?? parsed.error.code ?? "herdr reported an error" };
|
|
75
|
-
return { result: parsed.result };
|
|
76
|
-
}
|
|
77
|
-
catch {
|
|
78
|
-
// A non-JSON reply is a herdr-version or PATH problem, not a governance decision. Surfaced as a spawn
|
|
79
|
-
// error so the caller reports "could not start" rather than "the child produced nothing".
|
|
80
|
-
const detail = [reply.stdout.trim(), reply.stderr.trim()].filter((t) => t.length > 0).join(" | ");
|
|
81
|
-
return { error: `unparseable herdr reply: ${detail.slice(0, 300) || "(no output)"}` };
|
|
82
|
-
}
|
|
83
|
-
}
|
|
47
|
+
export { DEFAULT_SNAPSHOT_LINES, POLL_INTERVAL_MS, readPane, tailLines, waitForSettled } from "./herdr-poll.js";
|
|
48
|
+
/** How often to retry `agent start` while a freshly created pane is still reaching its shell prompt. */
|
|
49
|
+
export const PANE_READY_POLL_MS = 300;
|
|
84
50
|
/**
|
|
85
51
|
* Run one governed child in a pane and return its output.
|
|
86
52
|
*
|
|
@@ -109,30 +75,31 @@ export async function runHerdrPane(request) {
|
|
|
109
75
|
"and never be detected. Build the plan with `print: false` for this executor.",
|
|
110
76
|
};
|
|
111
77
|
}
|
|
112
|
-
// A multi-line system prompt becomes a file; see `
|
|
113
|
-
//
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
promptDir = await mkdtemp(join(tmpdir(), "grants-herdr-"));
|
|
120
|
-
const file = join(promptDir, "system-prompt.md");
|
|
121
|
-
await writeFile(file, split.systemPrompt, "utf8");
|
|
122
|
-
effectiveArgs = [...split.args, "--append-system-prompt", file];
|
|
123
|
-
}
|
|
124
|
-
catch (error) {
|
|
125
|
-
return { ...empty, spawnError: `could not stage the system prompt for herdr: ${String(error)}` };
|
|
126
|
-
}
|
|
127
|
-
}
|
|
78
|
+
// A multi-line system prompt becomes a file; see `stageSystemPrompt`. Removed on every path that does not
|
|
79
|
+
// end up tracking a pane, because only a tracked pane's dir is reachable by a sweep.
|
|
80
|
+
const staged = await stageSystemPrompt(request.args);
|
|
81
|
+
if (staged.error)
|
|
82
|
+
return { ...empty, spawnError: staged.error };
|
|
83
|
+
const promptDir = staged.promptDir;
|
|
84
|
+
const effectiveArgs = staged.args;
|
|
128
85
|
const create = ["tab", "create", "--label", request.name, "--cwd", request.cwd];
|
|
129
86
|
if (request.workspace)
|
|
130
87
|
create.push("--workspace", request.workspace);
|
|
131
88
|
for (const [key, value] of Object.entries(request.env))
|
|
132
89
|
create.push("--env", `${key}=${value}`);
|
|
90
|
+
// The name herdr will actually know this agent by. Every later command in this function uses `agentName`,
|
|
91
|
+
// never `request.name`, which is only a base.
|
|
92
|
+
const agentName = uniqueAgentName(request.name);
|
|
133
93
|
const created = parseReply(await exec(create));
|
|
134
|
-
if (created.error)
|
|
94
|
+
if (created.error) {
|
|
95
|
+
// **The staged prompt is removed here too.** This path returned without touching it, and nothing tracked it,
|
|
96
|
+
// so neither sweep could ever reach it — a permanent `/tmp/grants-herdr-*` per failed `tab create`. Measured
|
|
97
|
+
// by a reviewer, who also found leftovers from earlier runs already sitting in `/tmp`. It is the most likely
|
|
98
|
+
// failure on a machine where herdr is not running, i.e. the common case.
|
|
99
|
+
if (promptDir)
|
|
100
|
+
await rm(promptDir, { recursive: true, force: true }).catch(() => undefined);
|
|
135
101
|
return { ...empty, spawnError: `herdr tab create failed: ${created.error}` };
|
|
102
|
+
}
|
|
136
103
|
const rootPane = (created.result?.root_pane ?? {});
|
|
137
104
|
const paneId = rootPane.pane_id;
|
|
138
105
|
const tabId = rootPane.tab_id;
|
|
@@ -140,8 +107,34 @@ export async function runHerdrPane(request) {
|
|
|
140
107
|
// so registering later leaves a window — one herdr round-trip wide — in which a killed process orphans a
|
|
141
108
|
// tab nothing would reap. The normal path had no such window and the error path did, which is backwards:
|
|
142
109
|
// the error path is the one more likely to be taken while something is already going wrong.
|
|
143
|
-
if (tabId &&
|
|
144
|
-
|
|
110
|
+
if (tabId && request.keepPane && promptDir) {
|
|
111
|
+
// `keepPane` keeps the PANE, and the staged prompt with it — a human inspecting the pane may want to see
|
|
112
|
+
// what the child was told. Registered `settled` so the trim never touches it, but registered nonetheless so
|
|
113
|
+
// the `exit` sweep can remove the temp dir rather than leaving one per kept pane forever. Measured: this
|
|
114
|
+
// path leaked a `/tmp/grants-herdr-*` that neither sweep could reach.
|
|
115
|
+
trackPane({ tab: tabId, name: agentName, promptDir, settled: true, keepTab: true });
|
|
116
|
+
}
|
|
117
|
+
if (tabId && !request.keepPane) {
|
|
118
|
+
trackPane({ tab: tabId, name: agentName, promptDir });
|
|
119
|
+
// ADR-0032: panes now live until `agent_settled`, so they accumulate across one agent run — and a plain
|
|
120
|
+
// blocking `delegate` spends nothing from the fan-out budget, so the count is otherwise unbounded. Trimmed
|
|
121
|
+
// here rather than at settle time so the bound holds DURING a long run, not only after it.
|
|
122
|
+
//
|
|
123
|
+
// Whatever is closed is reported through `onOutput` rather than dropped: an operator whose pane vanished
|
|
124
|
+
// while they were reading it deserves to know why (R-48's rule, applied to a display).
|
|
125
|
+
const dropped = await trimOpenPanes(exec);
|
|
126
|
+
if (dropped.length > 0 && request.onSnapshot) {
|
|
127
|
+
try {
|
|
128
|
+
request.onSnapshot([
|
|
129
|
+
`[grants] closed ${dropped.length} older pane(s) to stay within the ${MAX_OPEN_PANES}-pane limit: ` +
|
|
130
|
+
dropped.join(", "),
|
|
131
|
+
]);
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
/* display only */
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
145
138
|
if (!paneId) {
|
|
146
139
|
// The tab may exist even though the reply carried no pane id, and this return used to be BEFORE
|
|
147
140
|
// `cleanup` was defined — so the one path where herdr half-succeeded was the one that leaked a tab.
|
|
@@ -152,65 +145,117 @@ export async function runHerdrPane(request) {
|
|
|
152
145
|
if (reply !== undefined && !parseReply(reply).error)
|
|
153
146
|
untrackPane(tabId);
|
|
154
147
|
}
|
|
155
|
-
//
|
|
156
|
-
//
|
|
157
|
-
// that away on the one path where there is no agent in the pane to ask instead.
|
|
148
|
+
// There is no agent in this pane to ask, so the staged prompt has no reader — remove it. Kept only under
|
|
149
|
+
// `keepPane`, where the operator asked to inspect whatever exists.
|
|
158
150
|
if (promptDir && !request.keepPane)
|
|
159
151
|
await rm(promptDir, { recursive: true, force: true }).catch(() => undefined);
|
|
160
152
|
return { ...empty, spawnError: "herdr tab create returned no pane id" };
|
|
161
153
|
}
|
|
162
|
-
/**
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
154
|
+
/**
|
|
155
|
+
* End this call. **A child that did not settle has its tab closed, because that is the only way to stop it.**
|
|
156
|
+
*
|
|
157
|
+
* ADR-0032 keeps a pane alive past its tool call so a human can read it. The original version of that also
|
|
158
|
+
* called `herdr agent stop` and claimed *"the agent is still stopped here… what survives is a terminal, not a
|
|
159
|
+
* running descendant."* **`herdr agent stop` does not exist.** Measured against herdr 0.7.5: the `agent`
|
|
160
|
+
* subcommands are `list get read send-keys prompt rename focus wait attach start explain`, and `agent stop`
|
|
161
|
+
* prints the usage banner and exits 0 — which `defaultExec` reports as a success, so nothing ever noticed.
|
|
162
|
+
* `docs/probes/g16-herdr/README.md` asserted it worked, in a *How to rerun* block that was never run.
|
|
163
|
+
*
|
|
164
|
+
* So there is exactly one kill available: closing the tab. That forces the distinction below.
|
|
165
|
+
*
|
|
166
|
+
* - **Settled cleanly** (`idle`/`done`/`blocked` with an advanced counter): the child has answered and is
|
|
167
|
+
* sitting idle. Its pane stays, which is the whole feature, and the `agent_settled` sweep reaps it.
|
|
168
|
+
* - **Anything else** — a timeout, an abort, a failed start, a failed prompt, an unreadable pane: the child
|
|
169
|
+
* may still be **working, with its grant**, after its tool call has already returned a result. Leaving
|
|
170
|
+
* that running is a governance failure, not an untidy workspace, so the tab is closed here and now.
|
|
171
|
+
*
|
|
172
|
+
* `keepPane` is the operator overriding the whole question, and it is honoured either way: nothing is tracked
|
|
173
|
+
* and nothing is closed, which is what "keep this pane for me to inspect" has to mean.
|
|
174
|
+
*/
|
|
175
|
+
const cleanup = async (settledCleanly) => {
|
|
176
|
+
if (request.keepPane)
|
|
177
|
+
return;
|
|
178
|
+
if (settledCleanly)
|
|
179
|
+
return;
|
|
180
|
+
if (!tabId)
|
|
181
|
+
return;
|
|
182
|
+
const reply = await exec(["tab", "close", tabId]).catch(() => undefined);
|
|
183
|
+
// Untracked only if provably closed — R-62's rule. A close herdr refused stays the reaper's problem rather
|
|
184
|
+
// than being dropped on the assumption that it worked.
|
|
185
|
+
if (reply !== undefined && !parseReply(reply).error) {
|
|
181
186
|
untrackPane(tabId);
|
|
187
|
+
if (promptDir)
|
|
188
|
+
await rm(promptDir, { recursive: true, force: true }).catch(() => undefined);
|
|
189
|
+
}
|
|
182
190
|
};
|
|
191
|
+
// ADR-0032: the pane exists and has a name, so tell the caller NOW. A pane id that arrives with the result is
|
|
192
|
+
// useless — the point is switching to a child while it is still working. Guarded because a renderer must not
|
|
193
|
+
// be able to strand a pane we have already created.
|
|
194
|
+
if (request.onPane) {
|
|
195
|
+
try {
|
|
196
|
+
request.onPane(paneId, agentName);
|
|
197
|
+
}
|
|
198
|
+
catch {
|
|
199
|
+
/* display only */
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
// Set only on the one path where the child answered and stopped working. Everything else — including an
|
|
203
|
+
// early `return` from a failed start or prompt — leaves it false, so `cleanup` closes the tab.
|
|
204
|
+
let settledCleanly = false;
|
|
183
205
|
try {
|
|
184
|
-
const started = await startAgent(exec,
|
|
206
|
+
const started = await startAgent(exec, agentName, paneId, effectiveArgs, deadline);
|
|
185
207
|
if (started.error)
|
|
186
208
|
return { ...empty, spawnError: `herdr agent start failed: ${started.error}` };
|
|
187
209
|
// The state counter BEFORE prompting is what makes the wait correct — see the R-33 note below.
|
|
188
210
|
const before = seqOf(started.result);
|
|
189
|
-
const prompted = parseReply(await exec(["agent", "prompt",
|
|
211
|
+
const prompted = parseReply(await exec(["agent", "prompt", agentName, request.prompt]));
|
|
190
212
|
if (prompted.error)
|
|
191
213
|
return { ...empty, spawnError: `herdr agent prompt failed: ${prompted.error}` };
|
|
192
|
-
const settled = await waitForSettled(exec, request, before, deadline);
|
|
214
|
+
const settled = await waitForSettled(exec, { ...request, name: agentName }, before, deadline, maxOutputBytes);
|
|
193
215
|
if (settled.aborted || settled.timedOut) {
|
|
194
216
|
// Still read: a timed-out child usually produced something, and a partial answer labelled partial is
|
|
195
217
|
// more useful than none. R-03's rule — a missing result must never look like an empty one.
|
|
196
|
-
const partial = await readPane(exec,
|
|
197
|
-
return { ...empty, ...settled, text: partial.text, truncated: partial.truncated };
|
|
218
|
+
const partial = await readPane(exec, agentName, maxOutputBytes);
|
|
219
|
+
return { ...empty, ...settled, text: partial.readFailed ? "" : partial.text, truncated: partial.truncated };
|
|
198
220
|
}
|
|
199
221
|
if (settled.spawnError)
|
|
200
222
|
return { ...empty, spawnError: settled.spawnError };
|
|
201
|
-
const out = await readPane(exec,
|
|
223
|
+
const out = await readPane(exec, agentName, maxOutputBytes);
|
|
224
|
+
// **A failed read is a failed spawn, not an empty answer.** This branch used to return `readPane`'s own
|
|
225
|
+
// diagnostic as `text` with `code: 0`, so the orchestrator received
|
|
226
|
+
// `[grants] could not read the agent pane: …` **as the sub-agent's report** — R-03 exactly, and measured.
|
|
227
|
+
// The child may well have done its work; what we cannot do is claim to know what it said.
|
|
228
|
+
if (out.readFailed) {
|
|
229
|
+
return {
|
|
230
|
+
...empty,
|
|
231
|
+
spawnError: `the child settled but its pane could not be read (${out.readFailed}), so its answer is unknown. ` +
|
|
232
|
+
`The work may have been done — check pane ${paneId} if it is still open.`,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
settledCleanly = true;
|
|
236
|
+
// The trim may now reclaim this pane if the cap is exceeded. Until this point it must not: closing the tab
|
|
237
|
+
// kills the child, and the child was still working.
|
|
238
|
+
if (tabId)
|
|
239
|
+
markPaneSettled(tabId);
|
|
202
240
|
return {
|
|
203
241
|
code: settled.status === "blocked" ? 1 : 0,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
242
|
+
// `truncated` is returned in the result too, but it was never SAID on this path, so a model received a
|
|
243
|
+
// tail with no indication that a head existed. The direct executor has always flagged it; a delegation
|
|
244
|
+
// that silently drops the first megabyte of an answer is the same defect wearing the other executor.
|
|
245
|
+
text: [
|
|
246
|
+
out.truncated ? `[grants] this pane exceeded the output cap; only its most recent output is below.\n` : "",
|
|
247
|
+
out.text,
|
|
248
|
+
settled.status === "blocked"
|
|
249
|
+
? `\n\n[grants] this agent is BLOCKED waiting for a human in pane ${paneId}.`
|
|
250
|
+
: "",
|
|
251
|
+
].join(""),
|
|
207
252
|
truncated: out.truncated,
|
|
208
253
|
timedOut: false,
|
|
209
254
|
aborted: false,
|
|
210
255
|
};
|
|
211
256
|
}
|
|
212
257
|
finally {
|
|
213
|
-
await cleanup();
|
|
258
|
+
await cleanup(settledCleanly);
|
|
214
259
|
}
|
|
215
260
|
}
|
|
216
261
|
/**
|
|
@@ -241,66 +286,4 @@ function seqOf(result) {
|
|
|
241
286
|
const agent = (result?.agent ?? {});
|
|
242
287
|
return typeof agent.state_change_seq === "number" ? agent.state_change_seq : -1;
|
|
243
288
|
}
|
|
244
|
-
/**
|
|
245
|
-
* Wait for the child to settle, without accepting the state it was already in.
|
|
246
|
-
*
|
|
247
|
-
* **R-33, measured.** `herdr agent wait --until idle` called right after `agent prompt` returned
|
|
248
|
-
* *immediately*, matching the agent's **pre-existing** idle state with `state_change_seq` unchanged — a
|
|
249
|
-
* reply indistinguishable from a completed run. For fan-out that is not an inconvenience but a
|
|
250
|
-
* correctness bug: an orchestrator would "collect" N children that never ran and merge N empty results
|
|
251
|
-
* into a confident summary (R-03 with a new cause).
|
|
252
|
-
*
|
|
253
|
-
* So this polls `agent get` and requires **both** that the status is terminal **and** that
|
|
254
|
-
* `state_change_seq` has advanced past the value observed before prompting. `agent wait` is deliberately
|
|
255
|
-
* not used at all: its contract cannot express "settled *after* this point".
|
|
256
|
-
*/
|
|
257
|
-
async function waitForSettled(exec, request, before, deadline) {
|
|
258
|
-
for (;;) {
|
|
259
|
-
if (request.signal?.aborted)
|
|
260
|
-
return { aborted: true };
|
|
261
|
-
if (Date.now() >= deadline)
|
|
262
|
-
return { timedOut: true };
|
|
263
|
-
const reply = parseReply(await exec(["agent", "get", request.name]));
|
|
264
|
-
if (reply.error)
|
|
265
|
-
return { spawnError: `herdr agent get failed: ${reply.error}` };
|
|
266
|
-
const agent = (reply.result?.agent ?? reply.result ?? {});
|
|
267
|
-
const status = agent.agent_status;
|
|
268
|
-
const seq = typeof agent.state_change_seq === "number" ? agent.state_change_seq : -1;
|
|
269
|
-
if (status && TERMINAL.has(status) && seq > before)
|
|
270
|
-
return { status };
|
|
271
|
-
await new Promise((r) => setTimeout(r, Math.min(POLL_INTERVAL_MS, Math.max(0, deadline - Date.now()))));
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Read the pane's contents.
|
|
276
|
-
*
|
|
277
|
-
* `agent read` is the ONE command that does not return herdr's JSON envelope — it writes the terminal's
|
|
278
|
-
* text straight to stdout. Running it through `parseReply` turned every successful read into
|
|
279
|
-
* "unparseable herdr reply", i.e. reported the child's actual answer as a failure to read it. Found by the
|
|
280
|
-
* end-to-end run; the unit fake had been written to the envelope shape and so agreed with the bug.
|
|
281
|
-
*
|
|
282
|
-
* A JSON envelope is still accepted first, because an `error` reply here IS JSON and must not be mistaken
|
|
283
|
-
* for terminal output.
|
|
284
|
-
*/
|
|
285
|
-
async function readPane(exec, name, maxOutputBytes) {
|
|
286
|
-
const reply = await exec(["agent", "read", name]);
|
|
287
|
-
let text;
|
|
288
|
-
try {
|
|
289
|
-
const parsed = JSON.parse(reply.stdout);
|
|
290
|
-
if (parsed.error) {
|
|
291
|
-
return { text: `[grants] could not read the agent pane: ${parsed.error.message ?? "unknown error"}`, truncated: false };
|
|
292
|
-
}
|
|
293
|
-
const raw = parsed.result?.output ?? parsed.result?.text ?? parsed.result?.content ?? "";
|
|
294
|
-
text = typeof raw === "string" ? raw : JSON.stringify(raw);
|
|
295
|
-
}
|
|
296
|
-
catch {
|
|
297
|
-
text = reply.stdout;
|
|
298
|
-
}
|
|
299
|
-
if (Buffer.byteLength(text) <= maxOutputBytes)
|
|
300
|
-
return { text, truncated: false };
|
|
301
|
-
// Keep the TAIL, not the head: a terminal's useful content is its most recent output, and the head is
|
|
302
|
-
// the startup banner. `runChild` keeps the head because it streams and must stop a runaway producer;
|
|
303
|
-
// here the output is already complete, so the choice is free and the tail is the answer.
|
|
304
|
-
return { text: text.slice(-maxOutputBytes), truncated: true };
|
|
305
|
-
}
|
|
306
289
|
//# sourceMappingURL=run-herdr.js.map
|
package/dist/run-herdr.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-herdr.js","sourceRoot":"","sources":["../src/run-herdr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAoC1D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAc;IAC9C,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAClD,IAAI,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACxD,OAAO,EAAE,IAAI,EAAE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AAU,CAAC,MAAM,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAChH,IAAI,CAAC,KAAK,CAAC,KAAK;YAAE,OAAO,KAAK,CAAC;QAC/B,MAAM,IAAI,GAAG,wCAAwC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACxE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,QAAQ;YAAE,OAAO,KAAK,CAAC;QAClD,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC;AAED,SAAS,KAAK,CAAC,MAA2C;IACxD,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,KAAK,IAAI,EAAE,CAAkC,CAAC;IACrE,OAAO,OAAO,KAAK,CAAC,gBAAgB,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClF,CAAC"}
|
package/dist/skill-packages.d.ts
CHANGED
|
@@ -108,5 +108,21 @@ export declare function readSkillPackage(packageDir: string): Promise<SkillPacka
|
|
|
108
108
|
* `node_modules`: a transitive skill package is not something an operator asked to install definitions
|
|
109
109
|
* from, and scaffolding one into their project would be a surprise wearing a helpful face.
|
|
110
110
|
*/
|
|
111
|
+
/**
|
|
112
|
+
* Every place a pi package can be installed, most specific first (R-75).
|
|
113
|
+
*
|
|
114
|
+
* **Two roots, because pi has two install paths and only one of them is `npm install`.** `pi install
|
|
115
|
+
* npm:principal-pi-skills` — the documented, pi-native way, and the only one that registers the package so
|
|
116
|
+
* pi will auto-load its extension — puts it in `$PI_CODING_AGENT_DIR/npm/node_modules`, and leaves the
|
|
117
|
+
* project without a `node_modules` at all. Searching only `<cwd>/node_modules` therefore found **nothing**
|
|
118
|
+
* for an operator who followed pi's own instructions, and said "install principal-pi-skills" to somebody
|
|
119
|
+
* who just had.
|
|
120
|
+
*
|
|
121
|
+
* Measured, in a fresh `PI_CODING_AGENT_DIR` with an empty project: `pi install` populates the agent root
|
|
122
|
+
* and creates no project root.
|
|
123
|
+
*
|
|
124
|
+
* Project first when both exist, because a package pinned in the repository is the one the team agreed on.
|
|
125
|
+
*/
|
|
126
|
+
export declare function skillPackageRoots(cwd: string): string[];
|
|
111
127
|
export declare function discoverSkillPackages(cwd: string): Promise<SkillPackage[]>;
|
|
112
128
|
//# sourceMappingURL=skill-packages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-packages.d.ts","sourceRoot":"","sources":["../src/skill-packages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;
|
|
1
|
+
{"version":3,"file":"skill-packages.d.ts","sourceRoot":"","sources":["../src/skill-packages.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAKH,OAAO,EAA8C,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEpG,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/D,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,eAAe,CAAC;IAC5B,2GAA2G;IAC3G,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,6FAA6F;AAC7F,MAAM,MAAM,aAAa;AACvB,uFAAuF;AACrF,aAAa;AACf,yFAAyF;GACvF,mBAAmB;AACrB,yGAAyG;GACvG,UAAU;AACZ,iFAAiF;GAC/E,UAAU,CAAC;AAEf,MAAM,WAAW,YAAY;IAC3B,uFAAuF;IACvF,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,aAAa,CAAC;IACtB,sDAAsD;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