@post-print/agent-harness 0.1.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/README.md +18 -0
- package/dist/adapters/index.d.ts +15 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +65 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/replay.d.ts +7 -0
- package/dist/adapters/replay.d.ts.map +1 -0
- package/dist/adapters/replay.js +61 -0
- package/dist/adapters/replay.js.map +1 -0
- package/dist/capture.d.ts +69 -0
- package/dist/capture.d.ts.map +1 -0
- package/dist/capture.js +352 -0
- package/dist/capture.js.map +1 -0
- package/dist/context.d.ts +11 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +93 -0
- package/dist/context.js.map +1 -0
- package/dist/cursor-run.d.ts +44 -0
- package/dist/cursor-run.d.ts.map +1 -0
- package/dist/cursor-run.js +159 -0
- package/dist/cursor-run.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/judge.d.ts +35 -0
- package/dist/judge.d.ts.map +1 -0
- package/dist/judge.js +222 -0
- package/dist/judge.js.map +1 -0
- package/dist/routing-contract.d.ts +4 -0
- package/dist/routing-contract.d.ts.map +1 -0
- package/dist/routing-contract.js +22 -0
- package/dist/routing-contract.js.map +1 -0
- package/dist/skills-context.d.ts +25 -0
- package/dist/skills-context.d.ts.map +1 -0
- package/dist/skills-context.js +120 -0
- package/dist/skills-context.js.map +1 -0
- package/dist/types.d.ts +72 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/working-tree-guard.d.ts +6 -0
- package/dist/working-tree-guard.d.ts.map +1 -0
- package/dist/working-tree-guard.js +20 -0
- package/dist/working-tree-guard.js.map +1 -0
- package/dist/worktree.d.ts +10 -0
- package/dist/worktree.d.ts.map +1 -0
- package/dist/worktree.js +58 -0
- package/dist/worktree.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Live dogfood output contract derived from agent-routing.md (not scenario answer keys). */
|
|
2
|
+
export function buildRoutingContract(mode) {
|
|
3
|
+
if (mode === "hands-off") {
|
|
4
|
+
return [
|
|
5
|
+
"Output contract (mandatory — first lines of your reply, before tools or other prose):",
|
|
6
|
+
"Print the PR § Routing block from agent-routing.md exactly as markdown:",
|
|
7
|
+
"## Routing",
|
|
8
|
+
"- **Tier:** Low | Medium | High",
|
|
9
|
+
"- **Signals:** …",
|
|
10
|
+
"- **Invariant applied:** …",
|
|
11
|
+
"- **Escalations:** none | …",
|
|
12
|
+
"- **Open questions:** none | …",
|
|
13
|
+
"Do not call tools or write planning text until this block is complete.",
|
|
14
|
+
].join("\n");
|
|
15
|
+
}
|
|
16
|
+
return [
|
|
17
|
+
"Output contract (before any tools or edits):",
|
|
18
|
+
"Announce routing per agent-routing.md hands-on rule — one line with tier, e.g.:",
|
|
19
|
+
" Tier: low — … OR Medium — … OR Routing: Medium — …",
|
|
20
|
+
].join("\n");
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=routing-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing-contract.js","sourceRoot":"","sources":["../src/routing-contract.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,MAAM,UAAU,oBAAoB,CAAC,IAAqB;IACzD,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;QAC1B,OAAO;YACN,uFAAuF;YACvF,yEAAyE;YACzE,YAAY;YACZ,iCAAiC;YACjC,kBAAkB;YAClB,4BAA4B;YAC5B,6BAA6B;YAC7B,gCAAgC;YAChC,wEAAwE;SACxE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;IAED,OAAO;QACN,8CAA8C;QAC9C,iFAAiF;QACjF,8DAA8D;KAC9D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type SkillContextMode = "none" | "catalog" | "full";
|
|
2
|
+
export interface SkillContextOptions {
|
|
3
|
+
mode: SkillContextMode;
|
|
4
|
+
/** Full mode: load only these skill folder names. Omit = all public skills. */
|
|
5
|
+
include?: string[];
|
|
6
|
+
}
|
|
7
|
+
export type SkillContextSetting = SkillContextMode | SkillContextOptions;
|
|
8
|
+
export interface SkillCatalogEntry {
|
|
9
|
+
name: string;
|
|
10
|
+
dir: string;
|
|
11
|
+
relPath: string;
|
|
12
|
+
description: string;
|
|
13
|
+
disableModelInvocation: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare function normalizeSkillContext(setting: SkillContextSetting | undefined): SkillContextOptions;
|
|
16
|
+
export interface LoadedSkillContext {
|
|
17
|
+
mode: SkillContextMode;
|
|
18
|
+
sources: string[];
|
|
19
|
+
preamble: string;
|
|
20
|
+
catalog: SkillCatalogEntry[];
|
|
21
|
+
}
|
|
22
|
+
/** Load skill catalog index and/or full SKILL.md bodies for agent preamble. */
|
|
23
|
+
export declare function loadSkillContext(cwd: string, setting: SkillContextSetting | undefined): Promise<LoadedSkillContext>;
|
|
24
|
+
export { normalizeSkillContext };
|
|
25
|
+
//# sourceMappingURL=skills-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills-context.d.ts","sourceRoot":"","sources":["../src/skills-context.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,gBAAgB,CAAC;IACvB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG,mBAAmB,CAAC;AAEzE,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,OAAO,CAAC;CAChC;AAsBD,iBAAS,qBAAqB,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,GAAG,mBAAmB,CAQ5F;AAiED,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAC7B;AAED,+EAA+E;AAC/E,wBAAsB,gBAAgB,CACrC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,mBAAmB,GAAG,SAAS,GACtC,OAAO,CAAC,kBAAkB,CAAC,CA+B7B;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
const SKILLS_ROOT = ".claude/skills";
|
|
4
|
+
const INTERNAL_SKILL_NAMES = new Set(["align-commands"]);
|
|
5
|
+
const FRONTMATTER_PATTERN = /^---\r?\n([\s\S]*?)\r?\n---/;
|
|
6
|
+
function parseFrontmatter(raw) {
|
|
7
|
+
const match = FRONTMATTER_PATTERN.exec(raw);
|
|
8
|
+
if (!match?.[1]) {
|
|
9
|
+
return {};
|
|
10
|
+
}
|
|
11
|
+
const fields = {};
|
|
12
|
+
for (const line of match[1].split("\n")) {
|
|
13
|
+
const colon = line.indexOf(":");
|
|
14
|
+
if (colon === -1) {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
const key = line.slice(0, colon).trim();
|
|
18
|
+
const value = line.slice(colon + 1).trim();
|
|
19
|
+
if (key) {
|
|
20
|
+
fields[key] = value;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return fields;
|
|
24
|
+
}
|
|
25
|
+
function normalizeSkillContext(setting) {
|
|
26
|
+
if (!setting) {
|
|
27
|
+
return { mode: "none" };
|
|
28
|
+
}
|
|
29
|
+
if (typeof setting === "string") {
|
|
30
|
+
return { mode: setting };
|
|
31
|
+
}
|
|
32
|
+
return setting;
|
|
33
|
+
}
|
|
34
|
+
async function discoverSkills(cwd) {
|
|
35
|
+
const skillsDir = join(cwd, SKILLS_ROOT);
|
|
36
|
+
let entries;
|
|
37
|
+
try {
|
|
38
|
+
entries = await readdir(skillsDir, { withFileTypes: true }).then((items) => items.filter((item) => item.isDirectory()).map((item) => item.name));
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
const skills = [];
|
|
44
|
+
for (const dir of entries.sort()) {
|
|
45
|
+
const relPath = `${SKILLS_ROOT}/${dir}/SKILL.md`;
|
|
46
|
+
const absPath = join(cwd, relPath);
|
|
47
|
+
let raw;
|
|
48
|
+
try {
|
|
49
|
+
raw = await readFile(absPath, "utf8");
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const frontmatter = parseFrontmatter(raw);
|
|
55
|
+
const name = frontmatter.name ?? dir;
|
|
56
|
+
if (INTERNAL_SKILL_NAMES.has(name) || INTERNAL_SKILL_NAMES.has(dir)) {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
skills.push({
|
|
60
|
+
name,
|
|
61
|
+
dir,
|
|
62
|
+
relPath,
|
|
63
|
+
description: frontmatter.description ?? "",
|
|
64
|
+
disableModelInvocation: frontmatter["disable-model-invocation"] === "true",
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
return skills;
|
|
68
|
+
}
|
|
69
|
+
function filterSkills(skills, include) {
|
|
70
|
+
if (!include?.length) {
|
|
71
|
+
return skills;
|
|
72
|
+
}
|
|
73
|
+
const wanted = new Set(include.map((name) => name.toLowerCase()));
|
|
74
|
+
return skills.filter((skill) => wanted.has(skill.name.toLowerCase()) || wanted.has(skill.dir));
|
|
75
|
+
}
|
|
76
|
+
function buildCatalogSection(skills) {
|
|
77
|
+
const lines = [
|
|
78
|
+
"## Skill catalog (available skills — read SKILL.md before following a skill)",
|
|
79
|
+
"",
|
|
80
|
+
"| Skill | Path | Invocation | Description |",
|
|
81
|
+
"|-------|------|------------|-------------|",
|
|
82
|
+
];
|
|
83
|
+
for (const skill of skills) {
|
|
84
|
+
const invocation = skill.disableModelInvocation ? "user-invoked" : "model-invoked";
|
|
85
|
+
const description = skill.description.replace(/\|/g, "\\|");
|
|
86
|
+
lines.push(`| ${skill.name} | \`${skill.relPath}\` | ${invocation} | ${description} |`);
|
|
87
|
+
}
|
|
88
|
+
return lines.join("\n");
|
|
89
|
+
}
|
|
90
|
+
/** Load skill catalog index and/or full SKILL.md bodies for agent preamble. */
|
|
91
|
+
export async function loadSkillContext(cwd, setting) {
|
|
92
|
+
const options = normalizeSkillContext(setting);
|
|
93
|
+
if (options.mode === "none") {
|
|
94
|
+
return { mode: "none", sources: [], preamble: "", catalog: [] };
|
|
95
|
+
}
|
|
96
|
+
const allSkills = await discoverSkills(cwd);
|
|
97
|
+
const skills = filterSkills(allSkills, options.include);
|
|
98
|
+
const sources = [];
|
|
99
|
+
const parts = [];
|
|
100
|
+
if (options.mode === "catalog" || options.mode === "full") {
|
|
101
|
+
parts.push(buildCatalogSection(skills));
|
|
102
|
+
sources.push(`${SKILLS_ROOT}/catalog`);
|
|
103
|
+
}
|
|
104
|
+
if (options.mode === "full") {
|
|
105
|
+
for (const skill of skills) {
|
|
106
|
+
const absPath = join(cwd, skill.relPath);
|
|
107
|
+
const body = await readFile(absPath, "utf8");
|
|
108
|
+
sources.push(skill.relPath);
|
|
109
|
+
parts.push(`<!-- ${skill.relPath} -->\n${body}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
mode: options.mode,
|
|
114
|
+
sources,
|
|
115
|
+
preamble: parts.join("\n\n---\n\n"),
|
|
116
|
+
catalog: skills,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export { normalizeSkillContext };
|
|
120
|
+
//# sourceMappingURL=skills-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills-context.js","sourceRoot":"","sources":["../src/skills-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,WAAW,GAAG,gBAAgB,CAAC;AACrC,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;AACzD,MAAM,mBAAmB,GAAG,6BAA6B,CAAC;AAoB1D,SAAS,gBAAgB,CAAC,GAAW;IACpC,MAAM,KAAK,GAAG,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5C,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjB,OAAO,EAAE,CAAC;IACX,CAAC;IACD,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACzC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YAClB,SAAS;QACV,CAAC;QACD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;QACxC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QAC3C,IAAI,GAAG,EAAE,CAAC;YACT,MAAM,CAAC,GAAG,CAAC,GAAG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AO,CAAC,CAAC;YACzC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAC7C,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC5B,KAAK,CAAC,IAAI,CAAC,QAAQ,KAAK,CAAC,OAAO,SAAS,IAAI,EAAE,CAAC,CAAC;QAClD,CAAC;IACF,CAAC;IAED,OAAO;QACN,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO;QACP,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC;QACnC,OAAO,EAAE,MAAM;KACf,CAAC;AACH,CAAC;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export type AgentHost = "cursor" | "claude" | "replay";
|
|
2
|
+
import type { RoutingContract } from "./routing-contract";
|
|
3
|
+
import type { SkillContextMode } from "./skills-context";
|
|
4
|
+
export type { RoutingContract } from "./routing-contract";
|
|
5
|
+
export type { SkillContextMode, SkillContextOptions, SkillContextSetting } from "./skills-context";
|
|
6
|
+
/** Which entry router to inject alongside shared skills context. */
|
|
7
|
+
export type ContextProfile = "shared" | "cursor" | "claude";
|
|
8
|
+
export interface AgentMessage {
|
|
9
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
10
|
+
content: string;
|
|
11
|
+
}
|
|
12
|
+
export interface AgentToolCall {
|
|
13
|
+
name: string;
|
|
14
|
+
args?: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export interface AgentTrace {
|
|
17
|
+
messages: AgentMessage[];
|
|
18
|
+
toolCalls: AgentToolCall[];
|
|
19
|
+
shellCommands: string[];
|
|
20
|
+
/** Skill folder names inferred from Read tool paths (e.g. grill, crystallize). */
|
|
21
|
+
skillsInvoked?: string[];
|
|
22
|
+
gitDiff?: string;
|
|
23
|
+
prBody?: string;
|
|
24
|
+
artifacts: Record<string, string>;
|
|
25
|
+
routing?: {
|
|
26
|
+
tier?: "low" | "medium" | "high";
|
|
27
|
+
signals?: string[];
|
|
28
|
+
invariantApplied?: string[];
|
|
29
|
+
escalations?: string[];
|
|
30
|
+
};
|
|
31
|
+
/** Live SDK: assistant prose before the first tool call. Replay: omit (all messages[] precede toolCalls[]). */
|
|
32
|
+
assistantTextBeforeTools?: string;
|
|
33
|
+
judgeVerdicts?: Array<{
|
|
34
|
+
id: string;
|
|
35
|
+
pass: boolean;
|
|
36
|
+
rationale: string;
|
|
37
|
+
}>;
|
|
38
|
+
raw?: unknown;
|
|
39
|
+
}
|
|
40
|
+
export interface LoadedContext {
|
|
41
|
+
profile: ContextProfile;
|
|
42
|
+
cwd: string;
|
|
43
|
+
/** Repo-relative paths loaded for the agent prompt preamble. */
|
|
44
|
+
sources: string[];
|
|
45
|
+
preamble: string;
|
|
46
|
+
/** Skill catalog / full SKILL.md loading mode when enabled. */
|
|
47
|
+
skillsMode?: SkillContextMode;
|
|
48
|
+
}
|
|
49
|
+
export interface RunAgentOptions {
|
|
50
|
+
host: AgentHost;
|
|
51
|
+
cwd: string;
|
|
52
|
+
context: LoadedContext;
|
|
53
|
+
prompt: string;
|
|
54
|
+
/** Live dogfood: rubric-derived hands-off ## Routing contract (not the user prompt). */
|
|
55
|
+
outputContract?: RoutingContract;
|
|
56
|
+
/** Required when host is replay. */
|
|
57
|
+
replayTracePath?: string;
|
|
58
|
+
env?: Record<string, string>;
|
|
59
|
+
}
|
|
60
|
+
export type RunStatus = "completed" | "failed" | "skipped";
|
|
61
|
+
export interface AgentSession {
|
|
62
|
+
host: AgentHost;
|
|
63
|
+
status: RunStatus;
|
|
64
|
+
trace: AgentTrace;
|
|
65
|
+
durationMs: number;
|
|
66
|
+
error?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface HostAdapter {
|
|
69
|
+
readonly host: AgentHost;
|
|
70
|
+
run(options: RunAgentOptions): Promise<AgentSession>;
|
|
71
|
+
}
|
|
72
|
+
//#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eAAe,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACrD"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Porcelain snapshot of the caller repo root — used to detect live-run leakage. */
|
|
2
|
+
export declare function captureWorkingTreeStatus(repoRoot: string): Promise<string>;
|
|
3
|
+
/** Lines present after a scenario that were not in the before snapshot. */
|
|
4
|
+
export declare function findWorkingTreeLeak(before: string, after: string): string[];
|
|
5
|
+
export declare function formatWorkingTreeLeak(lines: string[]): string;
|
|
6
|
+
//# sourceMappingURL=working-tree-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"working-tree-guard.d.ts","sourceRoot":"","sources":["../src/working-tree-guard.ts"],"names":[],"mappings":"AAKA,oFAAoF;AACpF,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGhF;AAED,2EAA2E;AAC3E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAM3E;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAE7D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { promisify } from "node:util";
|
|
3
|
+
const execFileAsync = promisify(execFile);
|
|
4
|
+
/** Porcelain snapshot of the caller repo root — used to detect live-run leakage. */
|
|
5
|
+
export async function captureWorkingTreeStatus(repoRoot) {
|
|
6
|
+
const { stdout } = await execFileAsync("git", ["status", "--porcelain"], { cwd: repoRoot });
|
|
7
|
+
return stdout.trim();
|
|
8
|
+
}
|
|
9
|
+
/** Lines present after a scenario that were not in the before snapshot. */
|
|
10
|
+
export function findWorkingTreeLeak(before, after) {
|
|
11
|
+
const beforeLines = new Set(before.split("\n").filter(Boolean));
|
|
12
|
+
return after
|
|
13
|
+
.split("\n")
|
|
14
|
+
.filter(Boolean)
|
|
15
|
+
.filter((line) => !beforeLines.has(line));
|
|
16
|
+
}
|
|
17
|
+
export function formatWorkingTreeLeak(lines) {
|
|
18
|
+
return lines.join("\n");
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=working-tree-guard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"working-tree-guard.js","sourceRoot":"","sources":["../src/working-tree-guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C,oFAAoF;AACpF,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,QAAgB;IAC9D,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,aAAa,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC5F,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;AACtB,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,mBAAmB,CAAC,MAAc,EAAE,KAAa;IAChE,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,OAAO,KAAK;SACV,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,OAAO,CAAC;SACf,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,KAAe;IACpD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const SCENARIO_WORKTREE_DIR_PREFIX = "agent-harness-wt-";
|
|
2
|
+
export interface ScenarioWorktree {
|
|
3
|
+
path: string;
|
|
4
|
+
cleanup: () => Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
/** Remove orphaned agent-test worktrees left after SIGKILL (exit 137) or crash. */
|
|
7
|
+
export declare function cleanupStaleScenarioWorktrees(repoRoot: string): Promise<string[]>;
|
|
8
|
+
/** Detached git worktree so live agent runs do not mutate the caller's working tree. */
|
|
9
|
+
export declare function createScenarioWorktree(repoRoot: string, label: string): Promise<ScenarioWorktree>;
|
|
10
|
+
//# sourceMappingURL=worktree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../src/worktree.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,4BAA4B,sBAAsB,CAAC;AAEhE,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAwBD,mFAAmF;AACnF,wBAAsB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAcvF;AAED,wFAAwF;AACxF,wBAAsB,sBAAsB,CAC3C,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACX,OAAO,CAAC,gBAAgB,CAAC,CAc3B"}
|
package/dist/worktree.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { execFile } from "node:child_process";
|
|
2
|
+
import { mkdtemp, rm } from "node:fs/promises";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
import { promisify } from "node:util";
|
|
6
|
+
const execFileAsync = promisify(execFile);
|
|
7
|
+
const WORKTREE_LIST_PATH_SPLIT = /\s+/;
|
|
8
|
+
export const SCENARIO_WORKTREE_DIR_PREFIX = "agent-harness-wt-";
|
|
9
|
+
function slugify(label) {
|
|
10
|
+
return label
|
|
11
|
+
.toLowerCase()
|
|
12
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
13
|
+
.replace(/^-+|-+$/g, "")
|
|
14
|
+
.slice(0, 48);
|
|
15
|
+
}
|
|
16
|
+
async function removeWorktreeAt(repoRoot, worktreePath) {
|
|
17
|
+
try {
|
|
18
|
+
await execFileAsync("git", ["worktree", "remove", "--force", worktreePath], {
|
|
19
|
+
cwd: repoRoot,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
// Best-effort when worktree is already gone.
|
|
24
|
+
}
|
|
25
|
+
const parent = dirname(worktreePath);
|
|
26
|
+
if (parent.includes(SCENARIO_WORKTREE_DIR_PREFIX)) {
|
|
27
|
+
await rm(parent, { recursive: true, force: true });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/** Remove orphaned agent-test worktrees left after SIGKILL (exit 137) or crash. */
|
|
31
|
+
export async function cleanupStaleScenarioWorktrees(repoRoot) {
|
|
32
|
+
const { stdout } = await execFileAsync("git", ["worktree", "list"], { cwd: repoRoot });
|
|
33
|
+
const removed = [];
|
|
34
|
+
for (const line of stdout.split("\n")) {
|
|
35
|
+
const path = line.split(WORKTREE_LIST_PATH_SPLIT)[0];
|
|
36
|
+
if (!path?.includes(SCENARIO_WORKTREE_DIR_PREFIX)) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
await removeWorktreeAt(repoRoot, path);
|
|
40
|
+
removed.push(path);
|
|
41
|
+
}
|
|
42
|
+
return removed;
|
|
43
|
+
}
|
|
44
|
+
/** Detached git worktree so live agent runs do not mutate the caller's working tree. */
|
|
45
|
+
export async function createScenarioWorktree(repoRoot, label) {
|
|
46
|
+
const parent = await mkdtemp(join(tmpdir(), SCENARIO_WORKTREE_DIR_PREFIX));
|
|
47
|
+
const worktreePath = join(parent, slugify(label) || "scenario");
|
|
48
|
+
await execFileAsync("git", ["worktree", "add", "--detach", worktreePath, "HEAD"], {
|
|
49
|
+
cwd: repoRoot,
|
|
50
|
+
});
|
|
51
|
+
return {
|
|
52
|
+
path: worktreePath,
|
|
53
|
+
cleanup: async () => {
|
|
54
|
+
await removeWorktreeAt(repoRoot, worktreePath);
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=worktree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worktree.js","sourceRoot":"","sources":["../src/worktree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C,MAAM,wBAAwB,GAAG,KAAK,CAAC;AAEvC,MAAM,CAAC,MAAM,4BAA4B,GAAG,mBAAmB,CAAC;AAOhE,SAAS,OAAO,CAAC,KAAa;IAC7B,OAAO,KAAK;SACV,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAChB,CAAC;AAED,KAAK,UAAU,gBAAgB,CAAC,QAAgB,EAAE,YAAoB;IACrE,IAAI,CAAC;QACJ,MAAM,aAAa,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,SA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I,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,CAAC;IAEhE,MAAM,aAAa,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,CAAC,EAAE;QACjF,GAAG,EAAE,QAAQ;KACb,CAAC,CAAC;IAEH,OAAO;QACN,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,KAAK,IAAI,EAAE;YACnB,MAAM,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAChD,CAAC;KACD,CAAC;AACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@post-print/agent-harness",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "bunx tsc --build",
|
|
18
|
+
"typecheck": "bunx tsc --build",
|
|
19
|
+
"lint": "bunx biome check .",
|
|
20
|
+
"lint:fix": "bunx biome check . --write",
|
|
21
|
+
"test": "vitest run --passWithNoTests",
|
|
22
|
+
"clean": "rm -rf dist tsconfig.tsbuildinfo"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"@cursor/sdk": ">=0.1.0"
|
|
27
|
+
},
|
|
28
|
+
"peerDependenciesMeta": {
|
|
29
|
+
"@cursor/sdk": {
|
|
30
|
+
"optional": true
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@cursor/sdk": "^1.0.23",
|
|
35
|
+
"@types/node": "^22.10.0",
|
|
36
|
+
"typescript": "~6.0.2",
|
|
37
|
+
"vitest": "^4.0.17"
|
|
38
|
+
},
|
|
39
|
+
"description": "Host-agnostic agent runtime for capture, replay, and judging",
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "https://github.com/post-print/agent-spec.git",
|
|
43
|
+
"directory": "packages/harness"
|
|
44
|
+
},
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
}
|
|
49
|
+
}
|