@openagt/agent-runner 0.0.1 → 0.0.2
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/dist/cleanup.d.ts +37 -0
- package/dist/cleanup.d.ts.map +1 -0
- package/dist/cleanup.js +83 -0
- package/dist/cleanup.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +13 -2
- package/dist/cli.js.map +1 -1
- package/dist/git-host.d.ts +1 -1
- package/dist/init.d.ts +2 -2
- package/dist/init.js +2 -2
- package/dist/live-card.d.ts +4 -4
- package/dist/live-card.d.ts.map +1 -1
- package/dist/live-card.js +4 -4
- package/dist/live-card.js.map +1 -1
- package/dist/names.d.ts +2 -2
- package/dist/names.d.ts.map +1 -1
- package/dist/names.js +1 -1
- package/dist/names.js.map +1 -1
- package/dist/run.d.ts +1 -1
- package/dist/run.js +1 -1
- package/dist/test-repo.d.ts.map +1 -1
- package/dist/test-repo.js +3 -1
- package/dist/test-repo.js.map +1 -1
- package/package.json +11 -10
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type GitRunner } from '@openagt/agent-data';
|
|
2
|
+
/**
|
|
3
|
+
* `cleanup`: what this tool left in a project, removed, for a person who takes the project out of
|
|
4
|
+
* a dashboard and asks for the tool's files to go too. The tool removes its own and nothing else:
|
|
5
|
+
* a dashboard asks for it by the `cleanup` kind the package declares under `openagent` in its
|
|
6
|
+
* package.json, and holds no list of this tool's files.
|
|
7
|
+
*
|
|
8
|
+
* What goes is the runs' locks and stderr files, one by one, and then the directories they left
|
|
9
|
+
* empty. The settings file is the person's own writing and stays, and so does anything else
|
|
10
|
+
* found there, each named with the reason. A file git tracks is never removed. The rule that
|
|
11
|
+
* hides the directory from git goes only when this pass removed the directory and no other
|
|
12
|
+
* checkout of the repository holds one: every checkout reads the same exclude file. While a
|
|
13
|
+
* run's process is alive nothing is removed at all: its lock is what keeps a second process off
|
|
14
|
+
* the run.
|
|
15
|
+
*/
|
|
16
|
+
/** One thing left where it was, by its path from the project's root, and why. */
|
|
17
|
+
export interface Kept {
|
|
18
|
+
path: string;
|
|
19
|
+
reason: string;
|
|
20
|
+
}
|
|
21
|
+
export type CleanupOutcome = {
|
|
22
|
+
ok: true;
|
|
23
|
+
removed: string[];
|
|
24
|
+
kept: Kept[];
|
|
25
|
+
}
|
|
26
|
+
/** Runs whose process is alive on this machine: stop them first. */
|
|
27
|
+
| {
|
|
28
|
+
ok: false;
|
|
29
|
+
reason: 'running';
|
|
30
|
+
runs: string[];
|
|
31
|
+
};
|
|
32
|
+
export interface CleanupDeps {
|
|
33
|
+
isAlive?: (pid: number) => boolean;
|
|
34
|
+
git?: GitRunner;
|
|
35
|
+
}
|
|
36
|
+
export declare function cleanup(repo: string, deps?: CleanupDeps): Promise<CleanupOutcome>;
|
|
37
|
+
//# sourceMappingURL=cleanup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup.d.ts","sourceRoot":"","sources":["../src/cleanup.ts"],"names":[],"mappings":"AAEA,OAAO,EAAwD,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAI1G;;;;;;;;;;;;;GAaG;AAEH,iFAAiF;AACjF,MAAM,WAAW,IAAI;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,cAAc,GACtB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,IAAI,EAAE,CAAA;CAAE;AAC/C,oEAAoE;GAClE;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AAEpD,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAA;IAClC,GAAG,CAAC,EAAE,SAAS,CAAA;CAChB;AAID,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,CA8C3F"}
|
package/dist/cleanup.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { lstat, readdir, rm, rmdir } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { nodeGitRunner, repositoryCheckouts, unexcludeFromGit } from '@openagt/agent-data';
|
|
4
|
+
import { RUNNER_CONFIG, RUNNER_DIR, RUNS_DIR } from './names.js';
|
|
5
|
+
import { isPidAlive, lockHolder } from './run-lock.js';
|
|
6
|
+
const NOT_OURS = 'not made by agent-runner';
|
|
7
|
+
export async function cleanup(repo, deps = {}) {
|
|
8
|
+
const isAlive = deps.isAlive ?? isPidAlive;
|
|
9
|
+
const git = deps.git ?? nodeGitRunner();
|
|
10
|
+
const dir = join(repo, RUNNER_DIR);
|
|
11
|
+
const runs = join(dir, RUNS_DIR);
|
|
12
|
+
const runsPath = `${RUNNER_DIR}/${RUNS_DIR}`;
|
|
13
|
+
const removed = [];
|
|
14
|
+
const kept = [];
|
|
15
|
+
// A link is followed nowhere: what it points at may lie outside the project.
|
|
16
|
+
const kind = await kindOf(dir);
|
|
17
|
+
if (kind === 'none')
|
|
18
|
+
return { ok: true, removed, kept };
|
|
19
|
+
if (kind !== 'directory')
|
|
20
|
+
return { ok: true, removed, kept: [{ path: RUNNER_DIR, reason: NOT_OURS }] };
|
|
21
|
+
const running = [];
|
|
22
|
+
for (const name of await names(runs)) {
|
|
23
|
+
if (!name.endsWith('.lock'))
|
|
24
|
+
continue;
|
|
25
|
+
const id = name.slice(0, -'.lock'.length);
|
|
26
|
+
if ((await lockHolder(repo, id, isAlive)) !== undefined)
|
|
27
|
+
running.push(id);
|
|
28
|
+
}
|
|
29
|
+
if (running.length > 0)
|
|
30
|
+
return { ok: false, reason: 'running', runs: running };
|
|
31
|
+
const runsKind = await kindOf(runs);
|
|
32
|
+
if (runsKind === 'directory') {
|
|
33
|
+
const tracked = new Set((await git(['ls-files', '-z', '--', runsPath], repo)).split('\0').filter(Boolean));
|
|
34
|
+
for (const name of await names(runs)) {
|
|
35
|
+
const path = `${runsPath}/${name}`;
|
|
36
|
+
if (tracked.has(path))
|
|
37
|
+
kept.push({ path, reason: 'git tracks it' });
|
|
38
|
+
else if ((name.endsWith('.lock') || name.endsWith('.stderr')) && (await kindOf(join(runs, name))) === 'file')
|
|
39
|
+
await rm(join(runs, name), { force: true });
|
|
40
|
+
else
|
|
41
|
+
kept.push({ path, reason: NOT_OURS });
|
|
42
|
+
}
|
|
43
|
+
// rmdir, never a recursive remove: whatever is left in it keeps it.
|
|
44
|
+
if (await rmdir(runs).then(() => true, () => false))
|
|
45
|
+
removed.push(runsPath);
|
|
46
|
+
else if (!kept.some(entry => entry.path.startsWith(`${runsPath}/`)))
|
|
47
|
+
kept.push({ path: runsPath, reason: 'not empty' });
|
|
48
|
+
}
|
|
49
|
+
else if (runsKind !== 'none')
|
|
50
|
+
kept.push({ path: runsPath, reason: NOT_OURS });
|
|
51
|
+
for (const name of await names(dir)) {
|
|
52
|
+
if (name !== RUNS_DIR)
|
|
53
|
+
kept.push({ path: `${RUNNER_DIR}/${name}`, reason: name === RUNNER_CONFIG ? 'your settings for agent-runner' : NOT_OURS });
|
|
54
|
+
}
|
|
55
|
+
if (kept.length > 0)
|
|
56
|
+
return { ok: true, removed, kept };
|
|
57
|
+
if (!(await rmdir(dir).then(() => true, () => false)))
|
|
58
|
+
return { ok: true, removed, kept: [{ path: RUNNER_DIR, reason: 'not empty' }] };
|
|
59
|
+
removed.push(RUNNER_DIR);
|
|
60
|
+
// The rule is the repository's, read by every checkout of it: it stays while one still has the directory.
|
|
61
|
+
const checkouts = await repositoryCheckouts(repo, git).catch(() => undefined);
|
|
62
|
+
if (checkouts && !(await anyHolds(checkouts, RUNNER_DIR)))
|
|
63
|
+
await unexcludeFromGit(repo, `/${RUNNER_DIR}`, undefined, git).catch(() => { });
|
|
64
|
+
return { ok: true, removed, kept };
|
|
65
|
+
}
|
|
66
|
+
/** The names in `dir`; a directory that is not there holds none. */
|
|
67
|
+
async function names(dir) {
|
|
68
|
+
return readdir(dir).catch(() => []);
|
|
69
|
+
}
|
|
70
|
+
/** What sits at `path`, a link read as a link and never followed. */
|
|
71
|
+
async function kindOf(path) {
|
|
72
|
+
const entry = await lstat(path).catch(() => undefined);
|
|
73
|
+
if (!entry)
|
|
74
|
+
return 'none';
|
|
75
|
+
return entry.isDirectory() ? 'directory' : entry.isFile() ? 'file' : 'other';
|
|
76
|
+
}
|
|
77
|
+
async function anyHolds(checkouts, name) {
|
|
78
|
+
for (const checkout of checkouts)
|
|
79
|
+
if ((await kindOf(join(checkout, name))) !== 'none')
|
|
80
|
+
return true;
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=cleanup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../src/cleanup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,gBAAgB,EAAkB,MAAM,qBAAqB,CAAA;AAC1G,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAChE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAiCtD,MAAM,QAAQ,GAAG,0BAA0B,CAAA;AAE3C,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAY,EAAE,IAAI,GAAgB,EAAE;IAChE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,UAAU,CAAA;IAC1C,MA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E,IAAI,SAAS,IAAI,CAAC,CAAC,MAAM,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAAE,MAAM,gBAAgB,CAAC,IAAI,EAAE,IAAI,UAAU,EAAE,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;IACzI,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;AACpC,CAAC;AAED,oEAAoE;AACpE,KAAK,UAAU,KAAK,CAAC,GAAW;IAC9B,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAa,EAAE,CAAC,EAAE,CAAC,CAAA;AAC/C,CAAC;AAED,qEAAqE;AACrE,KAAK,UAAU,MAAM,CAAC,IAAY;IAChC,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;IACtD,IAAI,CAAC,KAAK;QAAE,OAAO,MAAM,CAAA;IACzB,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAA;AAC9E,CAAC;AAED,KAAK,UAAU,QAAQ,CAAC,SAA4B,EAAE,IAAY;IAChE,KAAK,MAAM,QAAQ,IAAI,SAAS;QAAE,IAAI,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,MAAM;YAAE,OAAO,IAAI,CAAA;IAClG,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/dist/cli.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { type GitRunner } from '@openagt/agent-data';
|
|
|
4
4
|
* it went — 0 for a result, 1 for a refusal or a failure, 2 for a command that could not be read.
|
|
5
5
|
* The same contract as the skills' commands, so a person and a dashboard read it the same way.
|
|
6
6
|
*/
|
|
7
|
-
export declare const USAGE = "usage: agent-runner <command>\n\n run <prompt> [--model <id>] [--driver <claude-code|codex>] [--then <prompt>] [--publish <commit|branch|pr|merge>] [--parent <id>] [--base <ref>]\n one run of <prompt> in its own checkout, now, recorded; on Claude Code unless --driver says Codex,\n on the coding agent's own default model unless --model names one;\n with --then, once it ends done with a pull request, a fresh agent on its branch gets that prompt and the run's id, and the merge waits for it;\n with --publish, the agent is told, in one sentence after the prompt, how far to take its work when it finishes: commit it, and from there push its branch,\n open its pull request, or set the request to merge once its checks pass; without it the prompt goes as written, and nothing is committed or published unless the prompt asks;\n with --parent, the run <id> is told when this one ends: which run, how it ended, its last words, as its next prompt;\n with --base, the run's branch starts from <ref> instead of origin's default branch\n run --detach <prompt> the same run in its own process, answered at once with its id: what a dashboard's start hook runs\n run --resume <id> [<text>] [--answer <label>]\n continue an ended run: the same record, its session resumed; the text as the next prompt, or the answer to the question it ended on\n run --detach --resume <id> \u2026 the same continuing in its own process, answered at once: what a dashboard's resume hook runs\n check [--driver <claude-code|codex>]\n whether a run can start here: the coding agent's CLI installed and logged in, and its warnings; what a dashboard's check hook runs\n init this tool's lines in the dashboard's .
|
|
7
|
+
export declare const USAGE = "usage: agent-runner <command>\n\n run <prompt> [--model <id>] [--driver <claude-code|codex>] [--then <prompt>] [--publish <commit|branch|pr|merge>] [--parent <id>] [--base <ref>]\n one run of <prompt> in its own checkout, now, recorded; on Claude Code unless --driver says Codex,\n on the coding agent's own default model unless --model names one;\n with --then, once it ends done with a pull request, a fresh agent on its branch gets that prompt and the run's id, and the merge waits for it;\n with --publish, the agent is told, in one sentence after the prompt, how far to take its work when it finishes: commit it, and from there push its branch,\n open its pull request, or set the request to merge once its checks pass; without it the prompt goes as written, and nothing is committed or published unless the prompt asks;\n with --parent, the run <id> is told when this one ends: which run, how it ended, its last words, as its next prompt;\n with --base, the run's branch starts from <ref> instead of origin's default branch\n run --detach <prompt> the same run in its own process, answered at once with its id: what a dashboard's start hook runs\n run --resume <id> [<text>] [--answer <label>]\n continue an ended run: the same record, its session resumed; the text as the next prompt, or the answer to the question it ended on\n run --detach --resume <id> \u2026 the same continuing in its own process, answered at once: what a dashboard's resume hook runs\n check [--driver <claude-code|codex>]\n whether a run can start here: the coding agent's CLI installed and logged in, and its warnings; what a dashboard's check hook runs\n init this tool's lines in the dashboard's .openagent/hooks.yml, so its Start works; a line already there is kept\n cleanup remove what this tool left in the project: the runs' locks and stderr files, then .agent-runner/ and the rule hiding it from git once it is empty;\n config.yml is yours and stays; refused while a run's process is alive; the command a dashboard asks for when a project is removed with its files\n\nWhen a run ends waiting on a question, or ends done with a pull request it did not have, the `ended:` line in the\nproject's .agent-runner/config.yml runs, if there is one, in the project's root, with MESSAGE (one line for a person),\nRUN_ID, STATUS, QUESTION and PR_URL in its environment. The file is this machine's: keep it out of git (this tool hides\n.agent-runner/ from git once a run has started here). A run's coding agent loads the person's own setup, as when\nstarted by hand; in the same file, each part is left out with its own line under `personal:`, so a run does the same\njob on every machine:\n personal:\n memory: off Claude Code's auto-memory; Codex's memories\n connectors: off your claude.ai connectors; Codex's apps and plugins\n skills: off Claude Code: your user settings (effort, model, hooks, a login through apiKeyHelper or env), the skills\n synced from your claude.ai account, ~/.claude/CLAUDE.md, ~/.claude/skills.\n Codex: ~/.codex/AGENTS.md, ~/.codex/skills, ~/.codex/config.toml (with a model provider or\n login set there) and its memories, so Codex's memory stays on only with skills on too (`check` warns).\n Codex loads skills in ~/.agents/skills either way; with skills off, `check --driver codex` warns about them.\n\nJSON on stdout. Exit code 1 for a refusal or a failure (the reason on stderr), 2 for a usage error.";
|
|
8
8
|
export interface CliIo {
|
|
9
9
|
cwd: string;
|
|
10
10
|
stdout: (line: string) => void;
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAQnE;;;;GAIG;AAEH,eAAO,MAAM,KAAK,4zHAmCkF,CAAA;AAEpG,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC9B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/B;AAED,MAAM,MAAM,UAAU,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAA;AAU9E,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BzG"}
|
package/dist/cli.js
CHANGED
|
@@ -4,6 +4,7 @@ import { projectRoot } from '@openagt/skill-branches';
|
|
|
4
4
|
import { findRun } from '@openagt/skill-logs';
|
|
5
5
|
import { DRIVER_NAMES, detachResume, detachRun, isDriverName, readyToRun, resumeProject, runProject } from './runner.js';
|
|
6
6
|
import { initHooks } from './init.js';
|
|
7
|
+
import { cleanup } from './cleanup.js';
|
|
7
8
|
import { isPublish, PUBLISH_LEVELS } from './records.js';
|
|
8
9
|
/**
|
|
9
10
|
* The command line: JSON on stdout, one line for a person on stderr, and the exit code says how
|
|
@@ -26,7 +27,9 @@ export const USAGE = `usage: agent-runner <command>
|
|
|
26
27
|
run --detach --resume <id> … the same continuing in its own process, answered at once: what a dashboard's resume hook runs
|
|
27
28
|
check [--driver <claude-code|codex>]
|
|
28
29
|
whether a run can start here: the coding agent's CLI installed and logged in, and its warnings; what a dashboard's check hook runs
|
|
29
|
-
init this tool's lines in the dashboard's .
|
|
30
|
+
init this tool's lines in the dashboard's .openagent/hooks.yml, so its Start works; a line already there is kept
|
|
31
|
+
cleanup remove what this tool left in the project: the runs' locks and stderr files, then .agent-runner/ and the rule hiding it from git once it is empty;
|
|
32
|
+
config.yml is yours and stays; refused while a run's process is alive; the command a dashboard asks for when a project is removed with its files
|
|
30
33
|
|
|
31
34
|
When a run ends waiting on a question, or ends done with a pull request it did not have, the \`ended:\` line in the
|
|
32
35
|
project's .agent-runner/config.yml runs, if there is one, in the project's root, with MESSAGE (one line for a person),
|
|
@@ -178,9 +181,17 @@ const COMMANDS = {
|
|
|
178
181
|
const outcome = await initHooks(repo);
|
|
179
182
|
if (outcome.ok)
|
|
180
183
|
return outcome;
|
|
181
|
-
const line = outcome.reason === 'no-dashboard' ? 'no .
|
|
184
|
+
const line = outcome.reason === 'no-dashboard' ? 'no .openagent/ here: add the project in the dashboard first' : `${outcome.file}: ${outcome.detail ?? 'unreadable'}`;
|
|
182
185
|
throw new Refused(outcome, line);
|
|
183
186
|
},
|
|
187
|
+
async cleanup(args, io, git) {
|
|
188
|
+
parse(args, {}, 0);
|
|
189
|
+
const repo = await project(io.cwd, git);
|
|
190
|
+
const outcome = await cleanup(repo, { git });
|
|
191
|
+
if (outcome.ok)
|
|
192
|
+
return outcome;
|
|
193
|
+
throw new Refused(outcome, `a run is still working here (${outcome.runs.join(', ')}): stop it first`);
|
|
194
|
+
},
|
|
184
195
|
};
|
|
185
196
|
/** The project the working directory belongs to, even from inside a checkout under `.branches/`. */
|
|
186
197
|
async function project(cwd, git) {
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,aAAa,EAAkB,MAA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GAAG,CAAC,CAAC;YAAE,MAAM,GAAG,CAAA;QAC9F,MAAM,IAAI,OAAO,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,6BAA6B,CAAC,CAAA;IACvF,CAAC;AACH,CAAC;AAID,SAAS,KAAK,CAAoB,IAAc,EAAE,OAAU,EAAE,GAAW,EAAE,GAAG,GAAW,GAAG;IAC1F,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAA;QACjF,IAAI,MAAM,CAAC,WAAW,CAAC,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;YACvE,MAAM,IAAI,KAAK,CAAC,YAAY,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,GAAG,EAAE,qBAAqB,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAA;QACrH,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;IAChG,CAAC;AACH,CAAC"}
|
package/dist/git-host.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The project's git host (#1820), reached by declaration: whichever of the project's packages
|
|
3
|
-
* declares `"
|
|
3
|
+
* declares `"openagent": { "git-host": "<command>" }` answers the pull requests, and this tool runs
|
|
4
4
|
* that command the way the dashboard runs any provided command. The tool names no git host and no
|
|
5
5
|
* package: a project with none has no pull requests to read back and nothing to merge.
|
|
6
6
|
*
|
package/dist/init.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* `init`: this tool's lines written into a dashboard's hooks file, so a project added to the
|
|
3
3
|
* dashboard can check, start and resume a run with nothing typed by hand. The tool writes its own
|
|
4
4
|
* lines: the dashboard runs `init` when a project is added (the package declares it under
|
|
5
|
-
* `
|
|
5
|
+
* `openagent.hooks` in its package.json) and holds no copy of them, and a project that wants
|
|
6
6
|
* another tool writes that tool's lines. The writer takes any tool's lines, so
|
|
7
7
|
* another tool's `init` (a scheduler's) writes its own through it.
|
|
8
8
|
*
|
|
@@ -29,7 +29,7 @@ export type InitOutcome = {
|
|
|
29
29
|
/** This tool's lines into the dashboard's hooks file. */
|
|
30
30
|
export declare function initHooks(repo: string): Promise<InitOutcome>;
|
|
31
31
|
/**
|
|
32
|
-
* Write `lines` into `<repo>/.
|
|
32
|
+
* Write `lines` into `<repo>/.openagent/hooks.yml`: a key is a one-line hook when its line is
|
|
33
33
|
* a string, a list (`open`, `close`) when it is an array. The dashboard's directory must be there
|
|
34
34
|
* already (the dashboard makes it when the project is added, and hides it from git); without it
|
|
35
35
|
* nothing is written. `added` names the keys that gained a line, `kept` the ones already set
|
package/dist/init.js
CHANGED
|
@@ -6,7 +6,7 @@ import { DASHBOARD_DIR, DASHBOARD_HOOKS } from './names.js';
|
|
|
6
6
|
* `init`: this tool's lines written into a dashboard's hooks file, so a project added to the
|
|
7
7
|
* dashboard can check, start and resume a run with nothing typed by hand. The tool writes its own
|
|
8
8
|
* lines: the dashboard runs `init` when a project is added (the package declares it under
|
|
9
|
-
* `
|
|
9
|
+
* `openagent.hooks` in its package.json) and holds no copy of them, and a project that wants
|
|
10
10
|
* another tool writes that tool's lines. The writer takes any tool's lines, so
|
|
11
11
|
* another tool's `init` (a scheduler's) writes its own through it.
|
|
12
12
|
*
|
|
@@ -28,7 +28,7 @@ export function initHooks(repo) {
|
|
|
28
28
|
return writeHookLines(repo, HOOK_LINES);
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* Write `lines` into `<repo>/.
|
|
31
|
+
* Write `lines` into `<repo>/.openagent/hooks.yml`: a key is a one-line hook when its line is
|
|
32
32
|
* a string, a list (`open`, `close`) when it is an array. The dashboard's directory must be there
|
|
33
33
|
* already (the dashboard makes it when the project is added, and hides it from git); without it
|
|
34
34
|
* nothing is written. `added` names the keys that gained a line, `kept` the ones already set
|
package/dist/live-card.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type AnyDiaryLine, type RunCard, type RunStatus } from '@openagt/skill-logs';
|
|
2
2
|
/**
|
|
3
|
-
* A run's live record: the card and the diary agent-driver keeps under `.
|
|
3
|
+
* A run's live record: the card and the diary agent-driver keeps under `.openagent/` in the
|
|
4
4
|
* run's checkout, in the run record's shape, while the agent works. The dashboard reads them
|
|
5
5
|
* there; the run copies them onto the `agent-data` branch unchanged when it ends; the sweep
|
|
6
6
|
* reads them to find a run whose process died, and closes them from outside.
|
|
7
7
|
*/
|
|
8
8
|
/** The dashboard's directory in a checkout, where the two files live. */
|
|
9
|
-
export declare const LIVE_DIR = ".
|
|
9
|
+
export declare const LIVE_DIR = ".openagent";
|
|
10
10
|
/** The inbox's file name under the live directory: what reaches the agent from outside. */
|
|
11
11
|
export declare const INBOX_FILE = "inbox.jsonl";
|
|
12
12
|
export declare function liveDir(checkout: string): string;
|
|
@@ -14,8 +14,8 @@ export declare function inboxPath(checkout: string): string;
|
|
|
14
14
|
/**
|
|
15
15
|
* Keep the live directory out of git in this checkout alone, so the tree stays clean for the
|
|
16
16
|
* reclaim: a `.gitignore` of `*` inside it. Never a rule in the repository's shared exclude file,
|
|
17
|
-
* which every checkout reads, the project's own included, where it would
|
|
18
|
-
*
|
|
17
|
+
* which every checkout reads, the project's own included, where it would hide a file the project
|
|
18
|
+
* tracks there. A `.gitignore` already there is kept as it is.
|
|
19
19
|
*/
|
|
20
20
|
export declare function hideLiveDir(checkout: string): Promise<void>;
|
|
21
21
|
/** A checkout's live card, or `undefined` when it holds none, it does not parse, or it is not this tool's (no mark). */
|
package/dist/live-card.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-card.d.ts","sourceRoot":"","sources":["../src/live-card.ts"],"names":[],"mappings":"AAGA,OAAO,EAA4B,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAG/G;;;;;GAKG;AAEH,yEAAyE;AACzE,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"live-card.d.ts","sourceRoot":"","sources":["../src/live-card.ts"],"names":[],"mappings":"AAGA,OAAO,EAA4B,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAG/G;;;;;GAKG;AAEH,yEAAyE;AACzE,eAAO,MAAM,QAAQ,eAAe,CAAA;AAEpC,2FAA2F;AAC3F,eAAO,MAAM,UAAU,gBAAgB,CAAA;AAEvC,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMjE;AAED,wHAAwH;AACxH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAK7F;AAED,uDAAuD;AACvD,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAGzF;AAED,8HAA8H;AAC9H,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAKtJ"}
|
package/dist/live-card.js
CHANGED
|
@@ -4,13 +4,13 @@ import { logCardFile, logDiaryFile } from '@openagt/agent-driver';
|
|
|
4
4
|
import { parseDiary, parseRunCard } from '@openagt/skill-logs';
|
|
5
5
|
import { runnerMark } from './records.js';
|
|
6
6
|
/**
|
|
7
|
-
* A run's live record: the card and the diary agent-driver keeps under `.
|
|
7
|
+
* A run's live record: the card and the diary agent-driver keeps under `.openagent/` in the
|
|
8
8
|
* run's checkout, in the run record's shape, while the agent works. The dashboard reads them
|
|
9
9
|
* there; the run copies them onto the `agent-data` branch unchanged when it ends; the sweep
|
|
10
10
|
* reads them to find a run whose process died, and closes them from outside.
|
|
11
11
|
*/
|
|
12
12
|
/** The dashboard's directory in a checkout, where the two files live. */
|
|
13
|
-
export const LIVE_DIR = '.
|
|
13
|
+
export const LIVE_DIR = '.openagent';
|
|
14
14
|
/** The inbox's file name under the live directory: what reaches the agent from outside. */
|
|
15
15
|
export const INBOX_FILE = 'inbox.jsonl';
|
|
16
16
|
export function liveDir(checkout) {
|
|
@@ -22,8 +22,8 @@ export function inboxPath(checkout) {
|
|
|
22
22
|
/**
|
|
23
23
|
* Keep the live directory out of git in this checkout alone, so the tree stays clean for the
|
|
24
24
|
* reclaim: a `.gitignore` of `*` inside it. Never a rule in the repository's shared exclude file,
|
|
25
|
-
* which every checkout reads, the project's own included, where it would
|
|
26
|
-
*
|
|
25
|
+
* which every checkout reads, the project's own included, where it would hide a file the project
|
|
26
|
+
* tracks there. A `.gitignore` already there is kept as it is.
|
|
27
27
|
*/
|
|
28
28
|
export async function hideLiveDir(checkout) {
|
|
29
29
|
const dir = liveDir(checkout);
|
package/dist/live-card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-card.js","sourceRoot":"","sources":["../src/live-card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAmD,MAAM,qBAAqB,CAAA;AAC/G,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;GAKG;AAEH,yEAAyE;AACzE,MAAM,CAAC,MAAM,QAAQ,GAAG,
|
|
1
|
+
{"version":3,"file":"live-card.js","sourceRoot":"","sources":["../src/live-card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAmD,MAAM,qBAAqB,CAAA;AAC/G,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;GAKG;AAEH,yEAAyE;AACzE,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAA;AAEpC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAG,aAAa,CAAA;AAEvC,MAAM,UAAU,OAAO,CAAC,QAAgB;IACtC,OAAO,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;AACjC,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,QAAgB;IACxC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAA;AAC5C,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAA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AAED,8HAA8H;AAC9H,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,QAAgB,EAAE,IAAa,EAAE,MAAqC,EAAE,MAAc,EAAE,EAAU;IAClI,MAAM,KAAK,GAAY,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAA;IACvD,MAAM,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;IAC9I,MAAM,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;IACrH,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/dist/names.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ export declare const RUNNER_DIR = ".agent-runner";
|
|
|
4
4
|
/** Under the tool's directory: one lock and one stderr file per run. */
|
|
5
5
|
export declare const RUNS_DIR = "runs";
|
|
6
6
|
/** The dashboard's directory in a project it knows: made and hidden from git when the project is added. */
|
|
7
|
-
export declare const DASHBOARD_DIR = ".
|
|
7
|
+
export declare const DASHBOARD_DIR = ".openagent";
|
|
8
8
|
/** The dashboard's hooks file, the lines it runs for the project: where `init` writes this tool's. */
|
|
9
|
-
export declare const DASHBOARD_HOOKS = ".
|
|
9
|
+
export declare const DASHBOARD_HOOKS = ".openagent/hooks.yml";
|
|
10
10
|
/** Under the tool's directory: this machine's settings for the tool, the `ended:` line and the `personal:` parts. */
|
|
11
11
|
export declare const RUNNER_CONFIG = "config.yml";
|
|
12
12
|
//# sourceMappingURL=names.d.ts.map
|
package/dist/names.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../src/names.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,2FAA2F;AAC3F,eAAO,MAAM,UAAU,kBAAkB,CAAA;AAEzC,wEAAwE;AACxE,eAAO,MAAM,QAAQ,SAAS,CAAA;AAE9B,2GAA2G;AAC3G,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../src/names.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,2FAA2F;AAC3F,eAAO,MAAM,UAAU,kBAAkB,CAAA;AAEzC,wEAAwE;AACxE,eAAO,MAAM,QAAQ,SAAS,CAAA;AAE9B,2GAA2G;AAC3G,eAAO,MAAM,aAAa,eAAe,CAAA;AAEzC,sGAAsG;AACtG,eAAO,MAAM,eAAe,yBAA+B,CAAA;AAE3D,qHAAqH;AACrH,eAAO,MAAM,aAAa,eAAe,CAAA"}
|
package/dist/names.js
CHANGED
|
@@ -4,7 +4,7 @@ export const RUNNER_DIR = '.agent-runner';
|
|
|
4
4
|
/** Under the tool's directory: one lock and one stderr file per run. */
|
|
5
5
|
export const RUNS_DIR = 'runs';
|
|
6
6
|
/** The dashboard's directory in a project it knows: made and hidden from git when the project is added. */
|
|
7
|
-
export const DASHBOARD_DIR = '.
|
|
7
|
+
export const DASHBOARD_DIR = '.openagent';
|
|
8
8
|
/** The dashboard's hooks file, the lines it runs for the project: where `init` writes this tool's. */
|
|
9
9
|
export const DASHBOARD_HOOKS = `${DASHBOARD_DIR}/hooks.yml`;
|
|
10
10
|
/** Under the tool's directory: this machine's settings for the tool, the `ended:` line and the `personal:` parts. */
|
package/dist/names.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.js","sourceRoot":"","sources":["../src/names.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,2FAA2F;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAA;AAEzC,wEAAwE;AACxE,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAA;AAE9B,2GAA2G;AAC3G,MAAM,CAAC,MAAM,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"names.js","sourceRoot":"","sources":["../src/names.ts"],"names":[],"mappings":"AAAA,wDAAwD;AAExD,2FAA2F;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,CAAA;AAEzC,wEAAwE;AACxE,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAA;AAE9B,2GAA2G;AAC3G,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAA;AAEzC,sGAAsG;AACtG,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,aAAa,YAAY,CAAA;AAE3D,qHAAqH;AACrH,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAA"}
|
package/dist/run.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { type ParentDeps } from './parent.js';
|
|
|
17
17
|
* This process records the run and reclaims the checkout when the
|
|
18
18
|
* agent stops; a run that dies is caught by the sweep, which a scheduler runs on every tick.
|
|
19
19
|
*
|
|
20
|
-
* The session keeps the run's live record itself, the card and the diary under `.
|
|
20
|
+
* The session keeps the run's live record itself, the card and the diary under `.openagent/`
|
|
21
21
|
* in the checkout, in the run record's shape; this process adds its mark, the pid and the host,
|
|
22
22
|
* and copies the two files onto the branch unchanged when the run ends. What reaches the agent
|
|
23
23
|
* from outside comes through the session's inbox: a line waiting when a turn ends becomes the
|
package/dist/run.js
CHANGED
|
@@ -24,7 +24,7 @@ import { childEndedLine, tellParent } from './parent.js';
|
|
|
24
24
|
* This process records the run and reclaims the checkout when the
|
|
25
25
|
* agent stops; a run that dies is caught by the sweep, which a scheduler runs on every tick.
|
|
26
26
|
*
|
|
27
|
-
* The session keeps the run's live record itself, the card and the diary under `.
|
|
27
|
+
* The session keeps the run's live record itself, the card and the diary under `.openagent/`
|
|
28
28
|
* in the checkout, in the run record's shape; this process adds its mark, the pid and the host,
|
|
29
29
|
* and copies the two files onto the branch unchanged when the run ends. What reaches the agent
|
|
30
30
|
* from outside comes through the session's inbox: a line waiting when a turn ends becomes the
|
package/dist/test-repo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-repo.d.ts","sourceRoot":"","sources":["../src/test-repo.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElE;;;;GAIG;AAEH,eAAO,MAAM,GAAG,yCAAkB,CAAA;AAElC,eAAO,MAAM,UAAU;aAAK,SAAS;aAAQ,KAAK;aAAQ,UAAU,EAAE,EAAE;CAAW,CAAA;AAEnF,wBAAsB,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"test-repo.d.ts","sourceRoot":"","sources":["../src/test-repo.ts"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElE;;;;GAIG;AAEH,eAAO,MAAM,GAAG,yCAAkB,CAAA;AAElC,eAAO,MAAM,UAAU;aAAK,SAAS;aAAQ,KAAK;aAAQ,UAAU,EAAE,EAAE;CAAW,CAAA;AAEnF,wBAAsB,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAwBhD;AAED,iDAAiD;AACjD,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5D;AAED,gGAAgG;AAChG,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAMxF"}
|
package/dist/test-repo.js
CHANGED
|
@@ -2,7 +2,7 @@ import { mkdir, mkdtemp, realpath, rm, writeFile } from 'node:fs/promises';
|
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { dirname, join } from 'node:path';
|
|
4
4
|
import { strict as assert } from 'node:assert';
|
|
5
|
-
import { DATA_BRANCH, nodeGitRunner } from '@openagt/agent-data';
|
|
5
|
+
import { DATA_BRANCH, nodeGitRunner, writeSharing } from '@openagt/agent-data';
|
|
6
6
|
import { readDiary } from '@openagt/skill-logs';
|
|
7
7
|
/**
|
|
8
8
|
* A project for the tests: one commit on `main`, a bare `origin`, the `agent-data` branch born
|
|
@@ -32,6 +32,8 @@ export async function testRepo() {
|
|
|
32
32
|
const commit = (await git(['commit-tree', tree, '-m', `create the ${DATA_BRANCH} branch`], repo)).trim();
|
|
33
33
|
await git(['push', '-q', 'origin', `${commit}:refs/heads/${DATA_BRANCH}`], repo);
|
|
34
34
|
await git(['fetch', '-q', 'origin'], repo);
|
|
35
|
+
// A project that shares its records with origin: the person's yes, given once per clone.
|
|
36
|
+
await writeSharing(repo, true);
|
|
35
37
|
return repo;
|
|
36
38
|
}
|
|
37
39
|
/** The repository and its origin go together. */
|
package/dist/test-repo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-repo.js","sourceRoot":"","sources":["../src/test-repo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"test-repo.js","sourceRoot":"","sources":["../src/test-repo.ts"],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AAQ,EAAE,GAAG,MAAM,eAAe,WAAW,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;IAChF,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAA;IAC1C,yFAAyF;IACzF,MAAM,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IAC9B,OAAO,IAAI,CAAA;AACb,CAAC;AAED,iDAAiD;AACjD,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAY;IAC3C,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAA;AACrC,CAAC;AAED,gGAAgG;AAChG,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,IAAY,EAAE,EAAU;IAC7D,MAAM,KAAK,GAAG,CAAC,MAAM,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAA;IAC9E,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;QACnC,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,QAAQ,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,aAAa,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;QAChG,OAAO,IAAoB,CAAA;IAC7B,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openagt/agent-runner",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Run one coding agent from start to end: its own checkout, one prompt, the agent's own loop, a run record on the project's agent-data branch; resume a run that ended on a question; and the sweep a scheduler runs to record the runs whose process died.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/
|
|
8
|
+
"url": "git+https://github.com/openagt/openagent.git",
|
|
9
9
|
"directory": "packages/agent-runner"
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
"bin": {
|
|
20
20
|
"agent-runner": "bin/agent-runner"
|
|
21
21
|
},
|
|
22
|
-
"
|
|
23
|
-
"hooks": "agent-runner"
|
|
22
|
+
"openagent": {
|
|
23
|
+
"hooks": "agent-runner",
|
|
24
|
+
"cleanup": "agent-runner"
|
|
24
25
|
},
|
|
25
26
|
"exports": {
|
|
26
27
|
".": {
|
|
@@ -31,12 +32,12 @@
|
|
|
31
32
|
},
|
|
32
33
|
"dependencies": {
|
|
33
34
|
"yaml": "^2.5.0",
|
|
34
|
-
"@openagt/agent-driver-
|
|
35
|
-
"@openagt/agent-driver-
|
|
36
|
-
"@openagt/agent-data": "0.0.
|
|
37
|
-
"@openagt/skill-branches": "0.0.
|
|
38
|
-
"@openagt/skill-logs": "0.0.
|
|
39
|
-
"@openagt/agent-driver": "0.0.
|
|
35
|
+
"@openagt/agent-driver-codex": "0.0.2",
|
|
36
|
+
"@openagt/agent-driver-claude": "0.0.2",
|
|
37
|
+
"@openagt/agent-data": "0.0.2",
|
|
38
|
+
"@openagt/skill-branches": "0.0.2",
|
|
39
|
+
"@openagt/skill-logs": "0.0.2",
|
|
40
|
+
"@openagt/agent-driver": "0.0.2"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@types/node": "^20.0.0",
|