@openagt/skill-github 0.1.2 → 0.1.4
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/SKILL.md +9 -1
- package/assets/claude.svg +1 -0
- package/assets/codex-dark.svg +1 -0
- package/assets/codex-light.svg +1 -0
- package/dist/cli.d.ts +3 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +26 -6
- package/dist/cli.js.map +1 -1
- package/dist/comment.d.ts +35 -0
- package/dist/comment.d.ts.map +1 -0
- package/dist/comment.js +56 -0
- package/dist/comment.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/replies.d.ts +82 -40
- package/dist/replies.d.ts.map +1 -1
- package/dist/replies.js +216 -65
- package/dist/replies.js.map +1 -1
- package/package.json +4 -3
package/SKILL.md
CHANGED
|
@@ -23,6 +23,14 @@ It opens the pull request for the branch you are on and prints it in `request` (
|
|
|
23
23
|
|
|
24
24
|
A pull request whose body has a line `Closes #<number>` closes that issue when it merges.
|
|
25
25
|
|
|
26
|
+
## Commenting on an issue or a pull request
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
npx @openagt/skill-github@0.1 comment <number> --body "<text>"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
It posts a new comment, opened with what you run on, so what you post is told apart from what people write. Always comment this way, never with `gh`.
|
|
33
|
+
|
|
26
34
|
## Reading pull requests and issues
|
|
27
35
|
|
|
28
36
|
```
|
|
@@ -31,7 +39,7 @@ npx @openagt/skill-github@0.1 requests [--branch <b>] [--state open|merged|all]
|
|
|
31
39
|
|
|
32
40
|
The project's newest 50 pull requests, newest first, all states unless `--state`, only `<b>`'s with `--branch`; `--since` keeps those created since, or merged since with `--state merged`. Each has `number`, `url`, `state` (`open`, `merged`, `closed`), `title`, `draft`, `branch`, `head`, `createdAt`, and for a merged one `mergedAt` and `mergeCommit` (the commit it landed as).
|
|
33
41
|
|
|
34
|
-
For a pull request's discussion and diff, and for the project's issues, use `gh` directly: `gh pr view <number> --comments`, `gh pr diff <number>`, `gh issue list`, `gh issue view <number> --comments
|
|
42
|
+
For a pull request's discussion and diff, and for the project's issues, use `gh` directly: `gh pr view <number> --comments`, `gh pr diff <number>`, `gh issue list`, `gh issue view <number> --comments`. `gh` is installed and logged in where you run.
|
|
35
43
|
|
|
36
44
|
## Landing a pull request for a person
|
|
37
45
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#D97757"><path d="m4.714 15.956l4.718-2.648l.079-.23l-.08-.128h-.23l-.79-.048l-2.695-.073l-2.337-.097l-2.265-.122l-.57-.121l-.535-.704l.055-.353l.48-.321l.685.06l1.518.104l2.277.157l1.651.098l2.447.255h.389l.054-.158l-.133-.097l-.103-.098l-2.356-1.596l-2.55-1.688l-1.336-.972l-.722-.491L2 6.223l-.158-1.008l.656-.722l.88.06l.224.061l.893.686l1.906 1.476l2.49 1.833l.364.304l.146-.104l.018-.072l-.164-.274l-1.354-2.446l-1.445-2.49l-.644-1.032l-.17-.619a3 3 0 0 1-.103-.729L6.287.133L6.7 0l.995.134l.42.364l.619 1.415L9.735 4.14l1.555 3.03l.455.898l.243.832l.09.255h.159V9.01l.127-1.706l.237-2.095l.23-2.695l.08-.76l.376-.91l.747-.492l.583.28l.48.685l-.067.444l-.286 1.851l-.558 2.903l-.365 1.942h.213l.243-.242l.983-1.306l1.652-2.064l.728-.82l.85-.904l.547-.431h1.032l.759 1.129l-.34 1.166l-1.063 1.347l-.88 1.142l-1.263 1.7l-.79 1.36l.074.11l.188-.02l2.853-.606l1.542-.28l1.84-.315l.832.388l.09.395l-.327.807l-1.967.486l-2.307.462l-3.436.813l-.043.03l.049.061l1.548.146l.662.036h1.62l3.018.225l.79.522l.473.638l-.08.485l-1.213.62l-1.64-.389l-3.825-.91l-1.31-.329h-.183v.11l1.093 1.068l2.003 1.81l2.508 2.33l.127.578l-.321.455l-.34-.049l-2.204-1.657l-.85-.747l-1.925-1.62h-.127v.17l.443.649l2.343 3.521l.122 1.08l-.17.353l-.607.213l-.668-.122l-1.372-1.924l-1.415-2.168l-1.141-1.943l-.14.08l-.674 7.254l-.316.37l-.728.28l-.607-.461l-.322-.747l.322-1.476l.388-1.924l.316-1.53l.285-1.9l.17-.632l-.012-.042l-.14.018l-1.432 1.967l-2.18 2.945l-1.724 1.845l-.413.164l-.716-.37l.066-.662l.401-.589l2.386-3.036l1.439-1.882l.929-1.086l-.006-.158h-.055L4.138 18.56l-1.13.146l-.485-.456l.06-.746l.231-.243l1.907-1.312Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#f0f6fc"><path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.0201 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#1f2328"><path d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.0201 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/></svg>
|
package/dist/cli.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { type GhRunner } from './gh.js';
|
|
|
14
14
|
* Every command acts on the repository the working directory is in: `gh` finds the repository
|
|
15
15
|
* and its remote from there, as it does for a person.
|
|
16
16
|
*/
|
|
17
|
-
export declare const USAGE = "usage: github <command>\n\n requests [--branch <b>] [--state open|merged|all] [--since <iso>]\n the project's pull requests, newest first: number, url, state, title, draft, branch, head, createdAt, mergedAt, mergeCommit\n replies
|
|
17
|
+
export declare const USAGE = "usage: github <command>\n\n requests [--branch <b>] [--state open|merged|all] [--since <iso>]\n the project's pull requests, newest first: number, url, state, title, draft, branch, head, createdAt, mergedAt, mergeCommit\n replies [--since <iso>] what came on the open issues and pull requests this machine's agents worked on, since each agent ended: maintainers' words\n that call the agent with /agent, and on an agent's own pull request checks that turned red and a conflict once the base branch moved;\n [{ run, text }], one per run, read from the project's run records; with --since, also [{ for, text, branch? }] for each open issue or\n pull request no run was on, where a maintainer called the agent since then: the check of a scheduler's row with each\n comment <number> --body <text>\n post a comment on issue or pull request <number>: its id and url. It opens with the coding agent's logo, the model and the effort, as the agent's\n run record says (found through AGENT_DIARY, which its runner sets), else the line \uD83E\uDD16 automated; a hidden mark after the text, so replies never counts it\n open [--branch <b>] --title <t> [--body <text>] [--draft] [--merge]\n open the pull request of branch <b> (default: the current branch; it must be on the remote already); an open one is answered as it is; --merge lands it on green\n merge <number> land pull request <number>: a draft is marked ready, then the merge is armed as --merge arms it\n watch <number> wait for pull request <number>'s checks and merge it once they pass; what --merge starts where the repository has no auto-merge\n home the project's page on GitHub, from its origin remote\n me who is signed in to GitHub through gh: login, name, avatar (a picture's https address)\n create [--check] create a private repository for a project with no origin, named <account>/<folder>, set it as origin and push;\n --check only says which repository that would be\n\nJSON on stdout. Exit code 1 for a refusal or a failure (the reason on stderr), 2 for a usage error.";
|
|
18
18
|
/** The streams and the working directory a run of the CLI sees. */
|
|
19
19
|
export interface CliIo {
|
|
20
20
|
cwd: string;
|
|
@@ -27,6 +27,8 @@ export interface CliDeps {
|
|
|
27
27
|
git?: GitRunner;
|
|
28
28
|
/** Start the merge watcher for a request; the default starts this package's own process. */
|
|
29
29
|
watch?: (repo: string, number: number) => Promise<void>;
|
|
30
|
+
/** The environment the command runs in; the default is this process's. */
|
|
31
|
+
env?: NodeJS.ProcessEnv;
|
|
30
32
|
}
|
|
31
33
|
/** A refusal: a rule said no, and the caller learns which. */
|
|
32
34
|
export type CliRefusal = {
|
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,qBAA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
|
import { createRepository, offerRepository } from './create.js';
|
|
10
10
|
import { signedIn } from './me.js';
|
|
11
11
|
import { listReplies } from './replies.js';
|
|
12
|
+
import { DIARY_ENV, byline, writeComment } from './comment.js';
|
|
12
13
|
/**
|
|
13
14
|
* The command line over the package (#1820): the same functions for an agent in a shell, and for
|
|
14
15
|
* OpenAgent and the scheduler, which run this command as the project's git host provider,
|
|
@@ -27,9 +28,13 @@ export const USAGE = `usage: github <command>
|
|
|
27
28
|
|
|
28
29
|
requests [--branch <b>] [--state open|merged|all] [--since <iso>]
|
|
29
30
|
the project's pull requests, newest first: number, url, state, title, draft, branch, head, createdAt, mergedAt, mergeCommit
|
|
30
|
-
replies
|
|
31
|
-
|
|
32
|
-
from the project's run records;
|
|
31
|
+
replies [--since <iso>] what came on the open issues and pull requests this machine's agents worked on, since each agent ended: maintainers' words
|
|
32
|
+
that call the agent with /agent, and on an agent's own pull request checks that turned red and a conflict once the base branch moved;
|
|
33
|
+
[{ run, text }], one per run, read from the project's run records; with --since, also [{ for, text, branch? }] for each open issue or
|
|
34
|
+
pull request no run was on, where a maintainer called the agent since then: the check of a scheduler's row with each
|
|
35
|
+
comment <number> --body <text>
|
|
36
|
+
post a comment on issue or pull request <number>: its id and url. It opens with the coding agent's logo, the model and the effort, as the agent's
|
|
37
|
+
run record says (found through AGENT_DIARY, which its runner sets), else the line 🤖 automated; a hidden mark after the text, so replies never counts it
|
|
33
38
|
open [--branch <b>] --title <t> [--body <text>] [--draft] [--merge]
|
|
34
39
|
open the pull request of branch <b> (default: the current branch; it must be on the remote already); an open one is answered as it is; --merge lands it on green
|
|
35
40
|
merge <number> land pull request <number>: a draft is marked ready, then the merge is armed as --merge arms it
|
|
@@ -61,7 +66,7 @@ export async function runCli(argv, io, deps = {}) {
|
|
|
61
66
|
io.stderr(USAGE);
|
|
62
67
|
return 2;
|
|
63
68
|
}
|
|
64
|
-
const context = { cwd: io.cwd, gh: deps.gh ?? nodeGhRunner(), git: deps.git ?? nodeGitRunner(), ...(deps.watch ? { watch: deps.watch } : {}), stderr: io.stderr };
|
|
69
|
+
const context = { cwd: io.cwd, gh: deps.gh ?? nodeGhRunner(), git: deps.git ?? nodeGitRunner(), ...(deps.watch ? { watch: deps.watch } : {}), env: deps.env ?? process.env, stderr: io.stderr };
|
|
65
70
|
try {
|
|
66
71
|
io.stdout(JSON.stringify(await run(rest, context)));
|
|
67
72
|
return 0;
|
|
@@ -97,15 +102,30 @@ const COMMANDS = {
|
|
|
97
102
|
}
|
|
98
103
|
},
|
|
99
104
|
async replies(args, { cwd, gh }) {
|
|
100
|
-
parse(args, {}, 0);
|
|
105
|
+
const { values } = parse(args, { since: { type: 'string' } }, 0);
|
|
106
|
+
if (values.since !== undefined && Number.isNaN(Date.parse(values.since)))
|
|
107
|
+
throw new Usage(`--since is a time, like 2026-10-09T10:00:00Z, not "${values.since}"`);
|
|
101
108
|
try {
|
|
102
|
-
return await listReplies(cwd, { gh });
|
|
109
|
+
return await listReplies(cwd, { gh, ...(values.since !== undefined ? { since: values.since } : {}) });
|
|
103
110
|
}
|
|
104
111
|
catch (err) {
|
|
105
112
|
const detail = err instanceof Error ? err.message : String(err);
|
|
106
113
|
throw new Refused({ ok: false, reason: 'git-host-failed', detail }, `the pull requests could not be read: ${detail}`);
|
|
107
114
|
}
|
|
108
115
|
},
|
|
116
|
+
async comment(args, { cwd, gh, env }) {
|
|
117
|
+
const { values, positionals } = parse(args, { body: { type: 'string' } }, 1);
|
|
118
|
+
if (values.body === undefined || !values.body.trim())
|
|
119
|
+
throw new Usage('--body is required: the text of the comment');
|
|
120
|
+
const number = numberArg(positionals[0]);
|
|
121
|
+
try {
|
|
122
|
+
return { ok: true, ...(await writeComment(cwd, number, values.body, await byline(env[DIARY_ENV]), gh)) };
|
|
123
|
+
}
|
|
124
|
+
catch (err) {
|
|
125
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
126
|
+
throw new Refused({ ok: false, reason: 'git-host-failed', detail }, `the comment could not be written: ${detail}`);
|
|
127
|
+
}
|
|
128
|
+
},
|
|
109
129
|
async open(args, { cwd, gh, git, watch }) {
|
|
110
130
|
const { values } = parse(args, { branch: { type: 'string' }, title: { type: 'string' }, body: { type: 'string' }, merge: { type: 'boolean' }, draft: { type: 'boolean' } }, 0);
|
|
111
131
|
if (!values.title?.trim())
|
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,MAAM,qBAAqB,CAAA;AACnE,OAAO,EAAE,YAAY,EAAiB,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAoB,MAAM,WAAW,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAwC,MAAM,aAAa,CAAA;AACrG,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;oGAgB+E,CAAA;AAoBpG,wDAAwD;AACxD,MAAM,OAAQ,SAAQ,KAAK;IACJ,OAAO;IAAuB,IAAI;IAAvD,YAAqB,OAAmB,EAAW,IAAY;QAC7D,KAAK,CAAC,IAAI,CAAC,CAAA;uBADQ,OAAO;oBAAuB,IAAI;IAEvD,CAAC;CACF;AAED,4FAA4F;AAC5F,MAAM,KAAM,SAAQ,KAAK;CAAG;AAE5B,2FAA2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IAC5B,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;IAC1B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,+BAA+B,CAAC,CAAA;IACpG,OAAO,MAAM,CAAA;AACf,CAAC;AAID,2FAA2F;AAC3F,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;YAAE,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;QAC3L,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"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { GhRunner } from './gh.js';
|
|
2
|
+
/**
|
|
3
|
+
* A comment on an issue's or a pull request's thread: how an agent a row woke answers there (#2042). Asked
|
|
4
|
+
* of GitHub's REST API through `gh`, in the repository the working directory is in.
|
|
5
|
+
*
|
|
6
|
+
* It opens with what wrote it: the coding agent's logo, the model and how hard it thought, as the
|
|
7
|
+
* agent's run record says, found through the log path its runner hands the agent (`AGENT_DIARY`).
|
|
8
|
+
* An agent with no run record behind it is said with the 🤖 line. The logos are this package's
|
|
9
|
+
* `assets`, at the version that wrote the comment, as the npm registry serves them through
|
|
10
|
+
* jsDelivr: a comment keeps its pictures however the package changes later.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* The line every comment this command writes ends with, hidden from readers: what an agent
|
|
14
|
+
* writes here is posted with a person's account, and `replies` must never count it as theirs.
|
|
15
|
+
*/
|
|
16
|
+
export declare const COMMENT_MARK = "<!-- openagent -->";
|
|
17
|
+
/** Where the agent's runner put its log: its run record is beside it. */
|
|
18
|
+
export declare const DIARY_ENV = "AGENT_DIARY";
|
|
19
|
+
/** Where this package's pictures are served from: its own version's, on the npm registry. */
|
|
20
|
+
export declare const ASSETS_URL: string;
|
|
21
|
+
/**
|
|
22
|
+
* The first line, from the run record beside the log at `diary`: the logo, the model (a Claude
|
|
23
|
+
* model without its `claude-` prefix) and the effort, each when the record says it.
|
|
24
|
+
*/
|
|
25
|
+
export declare function byline(diary: string | undefined): Promise<string>;
|
|
26
|
+
/** A comment as GitHub answered it: its id and its address. */
|
|
27
|
+
export interface Comment {
|
|
28
|
+
id: number;
|
|
29
|
+
url: string;
|
|
30
|
+
}
|
|
31
|
+
/** The gh command line of a new comment on issue or pull request `number`: the first line, the text, the mark. */
|
|
32
|
+
export declare function commentArgs(number: number, body: string, first: string): string[];
|
|
33
|
+
/** Post a comment on issue or pull request `number`, opened with `first`: the comment as GitHub answered. Throws when GitHub cannot answer, or answers no comment. */
|
|
34
|
+
export declare function writeComment(cwd: string, number: number, body: string, first: string, gh: GhRunner): Promise<Comment>;
|
|
35
|
+
//# sourceMappingURL=comment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../src/comment.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC;;;;;;;;;GASG;AAEH;;;GAGG;AACH,eAAO,MAAM,YAAY,uBAAuB,CAAA;AAEhD,yEAAyE;AACzE,eAAO,MAAM,SAAS,gBAAgB,CAAA;AAEtC,6FAA6F;AAC7F,eAAO,MAAM,UAAU,QAAoJ,CAAA;AAW3K;;;GAGG;AACH,wBAAsB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CASvE;AAED,+DAA+D;AAC/D,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,kHAAkH;AAClH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAEjF;AAED,sKAAsK;AACtK,wBAAsB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAI3H"}
|
package/dist/comment.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
/**
|
|
4
|
+
* A comment on an issue's or a pull request's thread: how an agent a row woke answers there (#2042). Asked
|
|
5
|
+
* of GitHub's REST API through `gh`, in the repository the working directory is in.
|
|
6
|
+
*
|
|
7
|
+
* It opens with what wrote it: the coding agent's logo, the model and how hard it thought, as the
|
|
8
|
+
* agent's run record says, found through the log path its runner hands the agent (`AGENT_DIARY`).
|
|
9
|
+
* An agent with no run record behind it is said with the 🤖 line. The logos are this package's
|
|
10
|
+
* `assets`, at the version that wrote the comment, as the npm registry serves them through
|
|
11
|
+
* jsDelivr: a comment keeps its pictures however the package changes later.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* The line every comment this command writes ends with, hidden from readers: what an agent
|
|
15
|
+
* writes here is posted with a person's account, and `replies` must never count it as theirs.
|
|
16
|
+
*/
|
|
17
|
+
export const COMMENT_MARK = '<!-- openagent -->';
|
|
18
|
+
/** Where the agent's runner put its log: its run record is beside it. */
|
|
19
|
+
export const DIARY_ENV = 'AGENT_DIARY';
|
|
20
|
+
/** Where this package's pictures are served from: its own version's, on the npm registry. */
|
|
21
|
+
export const ASSETS_URL = `https://cdn.jsdelivr.net/npm/@openagt/skill-github@${createRequire(import.meta.url)('../package.json').version}/assets`;
|
|
22
|
+
/** The coding agents' logos, by the id a run record names them by. */
|
|
23
|
+
const LOGOS = {
|
|
24
|
+
'claude-code': `<img src="${ASSETS_URL}/claude.svg" width="16" height="16" align="top" alt="Claude Code">`,
|
|
25
|
+
codex: `<picture><source media="(prefers-color-scheme: dark)" srcset="${ASSETS_URL}/codex-dark.svg"><img src="${ASSETS_URL}/codex-light.svg" width="16" height="16" align="top" alt="Codex"></picture>`,
|
|
26
|
+
};
|
|
27
|
+
/** What an agent with no run record, or on a coding agent with no logo, opens with. */
|
|
28
|
+
const AUTOMATED = '🤖 *automated*';
|
|
29
|
+
/**
|
|
30
|
+
* The first line, from the run record beside the log at `diary`: the logo, the model (a Claude
|
|
31
|
+
* model without its `claude-` prefix) and the effort, each when the record says it.
|
|
32
|
+
*/
|
|
33
|
+
export async function byline(diary) {
|
|
34
|
+
if (diary === undefined || !diary.endsWith('.jsonl'))
|
|
35
|
+
return AUTOMATED;
|
|
36
|
+
const card = await readFile(`${diary.slice(0, -'.jsonl'.length)}.json`, 'utf8').then(text => JSON.parse(text), () => undefined);
|
|
37
|
+
const logo = typeof card?.['driver'] === 'string' ? LOGOS[card['driver']] : undefined;
|
|
38
|
+
if (logo === undefined)
|
|
39
|
+
return AUTOMATED;
|
|
40
|
+
const model = typeof card['model'] === 'string' ? card['model'].replace(/^claude-/, '') : undefined;
|
|
41
|
+
const effort = typeof card['effort'] === 'string' ? `${card['effort']} effort` : undefined;
|
|
42
|
+
const on = [model, effort].filter(part => part !== undefined).join(' · ');
|
|
43
|
+
return on === '' ? logo : `${logo} ${on}`;
|
|
44
|
+
}
|
|
45
|
+
/** The gh command line of a new comment on issue or pull request `number`: the first line, the text, the mark. */
|
|
46
|
+
export function commentArgs(number, body, first) {
|
|
47
|
+
return ['api', `repos/{owner}/{repo}/issues/${number}/comments`, '-f', `body=${first}\n\n${body}\n\n${COMMENT_MARK}`, '--jq', '{id: .id, url: .html_url}'];
|
|
48
|
+
}
|
|
49
|
+
/** Post a comment on issue or pull request `number`, opened with `first`: the comment as GitHub answered. Throws when GitHub cannot answer, or answers no comment. */
|
|
50
|
+
export async function writeComment(cwd, number, body, first, gh) {
|
|
51
|
+
const answer = JSON.parse(await gh(commentArgs(number, body, first), cwd));
|
|
52
|
+
if (typeof answer?.id !== 'number' || typeof answer.url !== 'string')
|
|
53
|
+
throw new Error('GitHub answered no comment');
|
|
54
|
+
return { id: answer.id, url: answer.url };
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=comment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comment.js","sourceRoot":"","sources":["../src/comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAG3C;;;;;;;;;GASG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,oBAAoB,CAAA;AAEhD,yEAAyE;AACzE,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAAA;AAEtC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,UAAU,GAAG,sDAAuD,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAyB,CAAC,O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C,KAAK,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACzE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,EAAE,EAAE,CAAA;AAC3C,CAAC;AAQD,kHAAkH;AAClH,MAAM,UAAU,WAAW,CAAC,MAAc,EAAE,IAAY,EAAE,KAAa;IACrE,OAAO,CAAC,KAAK,EAAE,+BAA+B,MAAM,WAAW,EAAE,IAAI,EAAE,QAAQ,KAAK,OAAO,IAAI,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,2BAA2B,CAAC,CAAA;AAC5J,CAAC;AAED,sKAAsK;AACtK,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,GAAW,EAAE,MAAc,EAAE,IAAY,EAAE,KAAa,EAAE,EAAY;IACvG,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,GAAG,CAAC,CAA4B,CAAA;IACrG,IAAI,OAAO,MAAM,EAAE,EAAE,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,GAAG,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;IACnH,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAA;AAC3C,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,5 +7,6 @@ export { homeUrlFromRemote, homeUrlFor, GIT_HOST_NAME } from './home.js';
|
|
|
7
7
|
export { runCli, USAGE, type CliIo, type CliDeps, type CliRefusal } from './cli.js';
|
|
8
8
|
export { createRepository, offerRepository, type CreateOffer, type CreateOutcome } from './create.js';
|
|
9
9
|
export { signedIn, type MeOutcome } from './me.js';
|
|
10
|
-
export { listReplies,
|
|
10
|
+
export { answersFor, listReplies, parseThreads, repliesArgs, seenArgs, MENTION, REPLIES_LIMIT, WHOLE_READ_EVERY_MS, type Answer, type Thread, type Told } from './replies.js';
|
|
11
|
+
export { writeComment, commentArgs, byline, COMMENT_MARK, DIARY_ENV, ASSETS_URL, type Comment } from './comment.js';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAA;AACvJ,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AACzG,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9H,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,kBAAkB,EAAE,cAAc,EAAE,YAAY,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAClM,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACxE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,EAAE,KAAK,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAA;AACnF,OAAO,EAAE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AAS,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAA;AAC7K,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -7,5 +7,6 @@ export { homeUrlFromRemote, homeUrlFor, GIT_HOST_NAME } from './home.js';
|
|
|
7
7
|
export { runCli, USAGE } from './cli.js';
|
|
8
8
|
export { createRepository, offerRepository } from './create.js';
|
|
9
9
|
export { signedIn } from './me.js';
|
|
10
|
-
export { listReplies,
|
|
10
|
+
export { answersFor, listReplies, parseThreads, repliesArgs, seenArgs, MENTION, REPLIES_LIMIT, WHOLE_READ_EVERY_MS } from './replies.js';
|
|
11
|
+
export { writeComment, commentArgs, byline, COMMENT_MARK, DIARY_ENV, ASSETS_URL } from './comment.js';
|
|
11
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAoC,MAAM,eAAe,CAAA;AACvJ,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAsC,MAAM,WAAW,CAAA;AACzG,OAAO,EAAE,QAAQ,EAAE,YAAY,EAA6E,MAAM,YAAY,CAAA;AAC9H,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,kBAAkB,EAAE,cAA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E,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAA"}
|
package/dist/replies.d.ts
CHANGED
|
@@ -1,66 +1,108 @@
|
|
|
1
1
|
import { type RunCard } from '@openagt/skill-logs';
|
|
2
2
|
import { type GhRunner } from './gh.js';
|
|
3
3
|
/**
|
|
4
|
-
* What came on the pull requests this machine's agents
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* What came on the project's open issues and pull requests for this machine's agents (#2042): the
|
|
5
|
+
* check of a scheduler's row with `each`. It prints one item per run: `{ "run": "<id>", "text":
|
|
6
|
+
* "…" }` for a run to continue with its words, `{ "for": "<address>", "text": "…" }` for a thread
|
|
7
|
+
* no run is on, where someone called the agent, and the scheduler starts a run for it, its record
|
|
8
|
+
* naming the thread, so the next call there finds that run. Each comment and review it hands a run
|
|
9
|
+
* gets 👀 at once, so who wrote sees the agent saw it; the agent's answer comes later, a comment of
|
|
10
|
+
* its own.
|
|
7
11
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
12
|
+
* A thread's run is the run that last worked on it: one started for it, or, on a pull request, one
|
|
13
|
+
* whose branch is the request's, as the run's record keeps it, whoever opened the request, the
|
|
14
|
+
* run's agent with any tool or a person, and whether the run could tell its pull request or not.
|
|
15
|
+
* Only a thread whose run is this machine's and has ended: only this machine holds that run's
|
|
16
|
+
* conversation, and a thread another run still works on is that run's.
|
|
17
|
+
*
|
|
18
|
+
* New, for a run, is after it last ended: no time is kept anywhere. Something that comes while the
|
|
19
|
+
* run still works is found at the first look after it ends; and what came before it ended, the run
|
|
20
|
+
* saw or left, so a red check it chose to leave does not wake it again and again. For a thread no
|
|
21
|
+
* run is on, new is after the row was switched on on this machine (`--since`): a call made before
|
|
22
|
+
* starts nothing. Without `--since`, no run is started.
|
|
11
23
|
*
|
|
12
24
|
* What counts:
|
|
13
|
-
* -
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
25
|
+
* - an issue's or a pull request's text, a comment, a review or a line comment of a maintainer, a
|
|
26
|
+
* person who can write to the repository: GitHub's owner, member or collaborator, that calls the
|
|
27
|
+
* agent: `/agent`, a word of its own anywhere in it, when written or last edited. Other words
|
|
28
|
+
* are people talking, on the agent's own pull request too. One that carries the 🤖 line, or the
|
|
29
|
+
* hidden mark of a comment `comment` wrote, is an agent's, posted with a person's account, and
|
|
30
|
+
* never counts;
|
|
31
|
+
* - on the agent's own pull request only, one whose branch its run made: a check that turned red,
|
|
32
|
+
* with no word, nobody writes one; a conflict with the base branch, once the base branch moved.
|
|
33
|
+
* A person's pull request an agent was called on is the person's: only a call counts there.
|
|
18
34
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
35
|
+
* One GitHub call a look, whatever the number of threads. A look can be every few seconds (a row's
|
|
36
|
+
* `check-every`), so it first asks GitHub whether any issue or comment of the repository changed,
|
|
37
|
+
* by the answer it last had (its ETag): "not modified" is free, and then nothing is read. Reviews
|
|
38
|
+
* with no line comments, red checks and conflicts have no such question, so the whole read is made
|
|
39
|
+
* at least once a minute anyway. What the questions last answered and when the last whole read was
|
|
40
|
+
* are a cache in the clone's own `.git` folder, never what decides what is new.
|
|
22
41
|
*/
|
|
23
|
-
/**
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
run: string;
|
|
27
|
-
endedAt: string;
|
|
28
|
-
}
|
|
29
|
-
/** The open pull requests one GitHub call reads, newest change first. */
|
|
42
|
+
/** How long a whole read holds when nothing changed: reviews, checks and conflicts are seen at least this often. */
|
|
43
|
+
export declare const WHOLE_READ_EVERY_MS = 60000;
|
|
44
|
+
/** The open issues, and the open pull requests, one GitHub call reads, newest change first. */
|
|
30
45
|
export declare const REPLIES_LIMIT = 50;
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
* machine's and has ended. A pull request a run still works on, on any machine, is left to it.
|
|
34
|
-
*/
|
|
35
|
-
export declare function watchedRequests(cards: RunCard[], host: string): Watched[];
|
|
46
|
+
/** The word that calls the agent: `/agent` with nothing of a word or a path on either side. */
|
|
47
|
+
export declare const MENTION: RegExp;
|
|
36
48
|
/** The gh command line of the one read: the repository is the one the working directory is in. */
|
|
37
49
|
export declare function repliesArgs(): string[];
|
|
38
|
-
/** One thing that came on a
|
|
50
|
+
/** One thing that came on a thread, as a run is told it, and the words it is when a person's, by GitHub's id, for their 👀. */
|
|
39
51
|
interface Came {
|
|
40
52
|
at: string;
|
|
41
53
|
line: string;
|
|
54
|
+
seen?: string;
|
|
42
55
|
}
|
|
43
|
-
/** An open pull request as read: what came on it, each with when. */
|
|
44
|
-
export interface
|
|
56
|
+
/** An open issue or pull request as read: where it is, its pull request's branch, and what came on it, each with when. */
|
|
57
|
+
export interface Thread {
|
|
58
|
+
kind: 'issue' | 'pull request';
|
|
45
59
|
number: number;
|
|
46
60
|
url: string;
|
|
47
|
-
|
|
61
|
+
title: string;
|
|
62
|
+
/** A pull request's branch on the project's repository; none for an issue, and none for a fork's: a fork's branch of a run's branch name is someone else's. */
|
|
63
|
+
branch?: string;
|
|
64
|
+
/** Whether the pull request comes from a fork. */
|
|
65
|
+
fork?: true;
|
|
66
|
+
/** The maintainers' words that call the agent. */
|
|
67
|
+
calls: Came[];
|
|
68
|
+
/** A pull request's red checks and its conflict: what wakes the agent on its own pull request with no word. */
|
|
69
|
+
broken: Came[];
|
|
48
70
|
}
|
|
49
|
-
/** The pull requests GitHub answered, each with what came on it; one it answered in a shape not known is left out. */
|
|
50
|
-
export declare function
|
|
51
|
-
/**
|
|
52
|
-
export
|
|
71
|
+
/** The open issues and pull requests GitHub answered, each with what came on it; one it answered in a shape not known is left out. */
|
|
72
|
+
export declare function parseThreads(output: unknown): Thread[];
|
|
73
|
+
/** What the scheduler is told for a thread: the run to continue, or what a new run is for and the branch it works on, with the words. */
|
|
74
|
+
export type Told = {
|
|
53
75
|
run: string;
|
|
54
76
|
text: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
77
|
+
} | {
|
|
78
|
+
for: string;
|
|
79
|
+
branch?: string;
|
|
80
|
+
text: string;
|
|
81
|
+
};
|
|
82
|
+
/** The same, and the words among it, by GitHub's ids, for their 👀: a red check or a conflict is none. */
|
|
83
|
+
export type Answer = Told & {
|
|
84
|
+
seen: string[];
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* For each thread with something new: its run, when that run is this machine's and has ended, and
|
|
88
|
+
* the words it is told; or, for a thread no run was ever on, what a new run is for, with the calls
|
|
89
|
+
* made there since `since`. A thread a run still works on, on any machine, is left to it.
|
|
90
|
+
*/
|
|
91
|
+
export declare function answersFor(threads: Thread[], cards: RunCard[], host: string, since?: string): Answer[];
|
|
92
|
+
/** The gh command line of 👀 on each thread, comment and review of `ids`, by GitHub's ids, in one call. */
|
|
93
|
+
export declare function seenArgs(ids: string[]): string[];
|
|
94
|
+
/**
|
|
95
|
+
* What came on the project's open issues and pull requests for this machine's agents, as a
|
|
96
|
+
* scheduler's row reads it, each call among it given 👀; with `since`, the threads no run is on
|
|
97
|
+
* where someone called the agent since then too. Throws when GitHub cannot answer.
|
|
98
|
+
*/
|
|
57
99
|
export declare function listReplies(repo: string, deps?: {
|
|
58
100
|
gh?: GhRunner;
|
|
59
101
|
host?: string;
|
|
60
102
|
runs?: () => Promise<RunCard[]>;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}[]>;
|
|
103
|
+
now?: () => number;
|
|
104
|
+
cache?: string;
|
|
105
|
+
since?: string;
|
|
106
|
+
}): Promise<Told[]>;
|
|
65
107
|
export {};
|
|
66
108
|
//# sourceMappingURL=replies.d.ts.map
|
package/dist/replies.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replies.d.ts","sourceRoot":"","sources":["../src/replies.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"replies.d.ts","sourceRoot":"","sources":["../src/replies.ts"],"names":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AA0G;AAC1G,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG;IAAE,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AAuB9C;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAqBtG;AAmCD,2GAA2G;AAC3G,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAGhD;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,EAAE,CAAC,EAAE,QAAQ,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAyBjM"}
|
package/dist/replies.js
CHANGED
|
@@ -1,44 +1,82 @@
|
|
|
1
|
+
import { mkdir, readFile, stat, writeFile } from 'node:fs/promises';
|
|
1
2
|
import { hostname } from 'node:os';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
2
4
|
import { listRuns } from '@openagt/skill-logs';
|
|
3
5
|
import { nodeGhRunner } from './gh.js';
|
|
4
|
-
|
|
6
|
+
import { COMMENT_MARK } from './comment.js';
|
|
7
|
+
/**
|
|
8
|
+
* What came on the project's open issues and pull requests for this machine's agents (#2042): the
|
|
9
|
+
* check of a scheduler's row with `each`. It prints one item per run: `{ "run": "<id>", "text":
|
|
10
|
+
* "…" }` for a run to continue with its words, `{ "for": "<address>", "text": "…" }` for a thread
|
|
11
|
+
* no run is on, where someone called the agent, and the scheduler starts a run for it, its record
|
|
12
|
+
* naming the thread, so the next call there finds that run. Each comment and review it hands a run
|
|
13
|
+
* gets 👀 at once, so who wrote sees the agent saw it; the agent's answer comes later, a comment of
|
|
14
|
+
* its own.
|
|
15
|
+
*
|
|
16
|
+
* A thread's run is the run that last worked on it: one started for it, or, on a pull request, one
|
|
17
|
+
* whose branch is the request's, as the run's record keeps it, whoever opened the request, the
|
|
18
|
+
* run's agent with any tool or a person, and whether the run could tell its pull request or not.
|
|
19
|
+
* Only a thread whose run is this machine's and has ended: only this machine holds that run's
|
|
20
|
+
* conversation, and a thread another run still works on is that run's.
|
|
21
|
+
*
|
|
22
|
+
* New, for a run, is after it last ended: no time is kept anywhere. Something that comes while the
|
|
23
|
+
* run still works is found at the first look after it ends; and what came before it ended, the run
|
|
24
|
+
* saw or left, so a red check it chose to leave does not wake it again and again. For a thread no
|
|
25
|
+
* run is on, new is after the row was switched on on this machine (`--since`): a call made before
|
|
26
|
+
* starts nothing. Without `--since`, no run is started.
|
|
27
|
+
*
|
|
28
|
+
* What counts:
|
|
29
|
+
* - an issue's or a pull request's text, a comment, a review or a line comment of a maintainer, a
|
|
30
|
+
* person who can write to the repository: GitHub's owner, member or collaborator, that calls the
|
|
31
|
+
* agent: `/agent`, a word of its own anywhere in it, when written or last edited. Other words
|
|
32
|
+
* are people talking, on the agent's own pull request too. One that carries the 🤖 line, or the
|
|
33
|
+
* hidden mark of a comment `comment` wrote, is an agent's, posted with a person's account, and
|
|
34
|
+
* never counts;
|
|
35
|
+
* - on the agent's own pull request only, one whose branch its run made: a check that turned red,
|
|
36
|
+
* with no word, nobody writes one; a conflict with the base branch, once the base branch moved.
|
|
37
|
+
* A person's pull request an agent was called on is the person's: only a call counts there.
|
|
38
|
+
*
|
|
39
|
+
* One GitHub call a look, whatever the number of threads. A look can be every few seconds (a row's
|
|
40
|
+
* `check-every`), so it first asks GitHub whether any issue or comment of the repository changed,
|
|
41
|
+
* by the answer it last had (its ETag): "not modified" is free, and then nothing is read. Reviews
|
|
42
|
+
* with no line comments, red checks and conflicts have no such question, so the whole read is made
|
|
43
|
+
* at least once a minute anyway. What the questions last answered and when the last whole read was
|
|
44
|
+
* are a cache in the clone's own `.git` folder, never what decides what is new.
|
|
45
|
+
*/
|
|
46
|
+
/** How long a whole read holds when nothing changed: reviews, checks and conflicts are seen at least this often. */
|
|
47
|
+
export const WHOLE_READ_EVERY_MS = 60_000;
|
|
48
|
+
/** The cheap questions: did an issue or a pull request change, a conversation's comment, a comment on a line. */
|
|
49
|
+
const CHANGED = {
|
|
50
|
+
threads: 'repos/{owner}/{repo}/issues?state=all&sort=updated&direction=desc&per_page=1',
|
|
51
|
+
comments: 'repos/{owner}/{repo}/issues/comments?sort=updated&direction=desc&per_page=1',
|
|
52
|
+
lineComments: 'repos/{owner}/{repo}/pulls/comments?sort=updated&direction=desc&per_page=1',
|
|
53
|
+
};
|
|
54
|
+
/** The open issues, and the open pull requests, one GitHub call reads, newest change first. */
|
|
5
55
|
export const REPLIES_LIMIT = 50;
|
|
6
56
|
/** The authors whose words count: those who can write to the repository. */
|
|
7
57
|
const MAINTAINERS = new Set(['OWNER', 'MEMBER', 'COLLABORATOR']);
|
|
8
58
|
/** What an agent puts on what it posts. */
|
|
9
59
|
const AGENT_MARK = '🤖';
|
|
60
|
+
/** The word that calls the agent: `/agent` with nothing of a word or a path on either side. */
|
|
61
|
+
export const MENTION = /(?<![\w/])\/agent(?![\w/-])/;
|
|
10
62
|
/** A check's ending that is red. */
|
|
11
63
|
const RED = new Set(['FAILURE', 'TIMED_OUT', 'STARTUP_FAILURE', 'ACTION_REQUIRED', 'ERROR', 'CANCELLED']);
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
* machine's and has ended. A pull request a run still works on, on any machine, is left to it.
|
|
15
|
-
*/
|
|
16
|
-
export function watchedRequests(cards, host) {
|
|
17
|
-
const byRequest = new Map();
|
|
18
|
-
for (const card of cards)
|
|
19
|
-
if (card.pr)
|
|
20
|
-
byRequest.set(card.pr.number, [...(byRequest.get(card.pr.number) ?? []), card]);
|
|
21
|
-
const watched = [];
|
|
22
|
-
for (const [number, runs] of byRequest) {
|
|
23
|
-
if (runs.some(card => card.status === 'running'))
|
|
24
|
-
continue;
|
|
25
|
-
const last = runs.filter(card => card.endedAt !== undefined).sort((a, b) => Date.parse(b.endedAt) - Date.parse(a.endedAt))[0];
|
|
26
|
-
if (last && last.caller?.['host'] === host)
|
|
27
|
-
watched.push({ number, run: last.id, endedAt: last.endedAt });
|
|
28
|
-
}
|
|
29
|
-
return watched.sort((a, b) => a.number - b.number);
|
|
30
|
-
}
|
|
64
|
+
/** The words of a thread, a comment or a review, as the query reads them. */
|
|
65
|
+
const WORDS = 'id author { login } authorAssociation body createdAt lastEditedAt url';
|
|
31
66
|
const QUERY = `query($owner: String!, $name: String!) {
|
|
32
67
|
repository(owner: $owner, name: $name) {
|
|
68
|
+
issues(states: OPEN, first: ${REPLIES_LIMIT}, orderBy: { field: UPDATED_AT, direction: DESC }) {
|
|
69
|
+
nodes { number title ${WORDS} comments(last: 30) { nodes { ${WORDS} } } }
|
|
70
|
+
}
|
|
33
71
|
pullRequests(states: OPEN, first: ${REPLIES_LIMIT}, orderBy: { field: UPDATED_AT, direction: DESC }) {
|
|
34
72
|
nodes {
|
|
35
|
-
number
|
|
73
|
+
number title ${WORDS} mergeable headRefName isCrossRepository
|
|
36
74
|
baseRef { name target { ... on Commit { committedDate } } }
|
|
37
|
-
comments(last: 30) { nodes {
|
|
75
|
+
comments(last: 30) { nodes { ${WORDS} } }
|
|
38
76
|
reviews(last: 30) {
|
|
39
77
|
nodes {
|
|
40
|
-
author { login } authorAssociation body state submittedAt url
|
|
41
|
-
comments(first: 30) { nodes {
|
|
78
|
+
id author { login } authorAssociation body state submittedAt lastEditedAt url
|
|
79
|
+
comments(first: 30) { nodes { ${WORDS} path line } }
|
|
42
80
|
}
|
|
43
81
|
}
|
|
44
82
|
commits(last: 1) {
|
|
@@ -62,78 +100,191 @@ const nodes = (value) => {
|
|
|
62
100
|
};
|
|
63
101
|
const text = (value) => (typeof value === 'string' && value !== '' ? value : undefined);
|
|
64
102
|
const login = (node) => text(node['author']?.['login']) ?? 'someone';
|
|
65
|
-
/**
|
|
103
|
+
/** When words were written, or last edited when that is later: an edit that adds a call is a call. */
|
|
104
|
+
const writtenAt = (node, written) => {
|
|
105
|
+
const at = text(node[written]);
|
|
106
|
+
const edited = text(node['lastEditedAt']);
|
|
107
|
+
return at === undefined ? undefined : edited !== undefined && Date.parse(edited) > Date.parse(at) ? edited : at;
|
|
108
|
+
};
|
|
109
|
+
/** A comment's or a review's id, for its 👀. */
|
|
110
|
+
const seen = (node) => (text(node['id']) !== undefined ? { seen: text(node['id']) } : {});
|
|
111
|
+
/** A maintainer's words that call the agent and are no agent's: what counts of a thread's text, a comment or a review. */
|
|
66
112
|
function maintainers(node) {
|
|
67
113
|
const body = text(node['body'])?.trim();
|
|
68
|
-
if (!body || body.includes(AGENT_MARK) || !MAINTAINERS.has(String(node['authorAssociation'])))
|
|
114
|
+
if (!body || !MENTION.test(body) || body.includes(AGENT_MARK) || body.includes(COMMENT_MARK) || !MAINTAINERS.has(String(node['authorAssociation'])))
|
|
69
115
|
return undefined;
|
|
70
116
|
return body;
|
|
71
117
|
}
|
|
72
|
-
/** The
|
|
73
|
-
|
|
118
|
+
/** The calls in a thread's own text and in its conversation's comments. */
|
|
119
|
+
function threadCalls(thread) {
|
|
120
|
+
const came = [];
|
|
121
|
+
const body = maintainers(thread);
|
|
122
|
+
const opened = writtenAt(thread, 'createdAt');
|
|
123
|
+
if (body && opened)
|
|
124
|
+
came.push({ at: opened, line: `@${login(thread)} opened it (${thread['url']}):\n${body}`, ...seen(thread) });
|
|
125
|
+
for (const comment of nodes(thread['comments'])) {
|
|
126
|
+
const words = maintainers(comment);
|
|
127
|
+
const at = writtenAt(comment, 'createdAt');
|
|
128
|
+
if (words && at)
|
|
129
|
+
came.push({ at, line: `@${login(comment)} commented (${comment['url']}):\n${words}`, ...seen(comment) });
|
|
130
|
+
}
|
|
131
|
+
return came;
|
|
132
|
+
}
|
|
133
|
+
/** The open issues and pull requests GitHub answered, each with what came on it; one it answered in a shape not known is left out. */
|
|
134
|
+
export function parseThreads(output) {
|
|
74
135
|
const repository = output?.['data']?.['repository'];
|
|
75
|
-
const
|
|
136
|
+
const threads = [];
|
|
137
|
+
const known = (node) => typeof node['number'] === 'number' && typeof node['url'] === 'string';
|
|
138
|
+
for (const issue of nodes(repository?.['issues'])) {
|
|
139
|
+
if (known(issue))
|
|
140
|
+
threads.push({ kind: 'issue', number: issue.number, url: issue.url, title: text(issue['title']) ?? '', calls: threadCalls(issue), broken: [] });
|
|
141
|
+
}
|
|
76
142
|
for (const pr of nodes(repository?.['pullRequests'])) {
|
|
77
|
-
if (typeof pr['
|
|
143
|
+
if (!known(pr) || typeof pr['headRefName'] !== 'string' || typeof pr['isCrossRepository'] !== 'boolean')
|
|
78
144
|
continue;
|
|
79
|
-
const
|
|
80
|
-
for (const comment of nodes(pr['comments'])) {
|
|
81
|
-
const body = maintainers(comment);
|
|
82
|
-
const at = text(comment['createdAt']);
|
|
83
|
-
if (body && at)
|
|
84
|
-
came.push({ at, line: `@${login(comment)} commented (${comment['url']}):\n${body}` });
|
|
85
|
-
}
|
|
145
|
+
const calls = threadCalls(pr);
|
|
86
146
|
for (const review of nodes(pr['reviews'])) {
|
|
87
|
-
const at =
|
|
147
|
+
const at = writtenAt(review, 'submittedAt');
|
|
88
148
|
const body = maintainers(review);
|
|
89
|
-
// A
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
came.push({ at, line: `@${login(review)} ${changes ? 'requested changes' : 'reviewed'} (${review['url']})${body ? `:\n${body}` : '.'}` });
|
|
149
|
+
// A review's comments count one by one, each by its own word.
|
|
150
|
+
if (at && body)
|
|
151
|
+
calls.push({ at, line: `@${login(review)} ${review['state'] === 'CHANGES_REQUESTED' ? 'requested changes' : 'reviewed'} (${review['url']}):\n${body}`, ...seen(review) });
|
|
93
152
|
for (const comment of nodes(review['comments'])) {
|
|
94
153
|
const words = maintainers(comment);
|
|
95
|
-
const when =
|
|
154
|
+
const when = writtenAt(comment, 'createdAt');
|
|
96
155
|
const where = `${comment['path']}${typeof comment['line'] === 'number' ? ` line ${comment['line']}` : ''}`;
|
|
97
156
|
if (words && when)
|
|
98
|
-
|
|
157
|
+
calls.push({ at: when, line: `@${login(comment)} on ${where} (${comment['url']}):\n${words}`, ...seen(comment) });
|
|
99
158
|
}
|
|
100
159
|
}
|
|
160
|
+
const broken = [];
|
|
101
161
|
const commit = nodes(pr['commits'])[0]?.['commit']?.['statusCheckRollup'];
|
|
102
162
|
for (const check of nodes(commit?.['contexts'])) {
|
|
103
163
|
const run = check['__typename'] === 'CheckRun';
|
|
104
164
|
const ending = String(run ? check['conclusion'] : check['state']);
|
|
105
165
|
const at = text(run ? check['completedAt'] : check['createdAt']);
|
|
106
166
|
if (at && RED.has(ending))
|
|
107
|
-
|
|
167
|
+
broken.push({ at, line: `The check "${run ? check['name'] : check['context']}" failed (${(run ? check['detailsUrl'] : check['targetUrl']) ?? 'no link'}).` });
|
|
108
168
|
}
|
|
109
169
|
const base = pr['baseRef'];
|
|
110
170
|
const moved = text(base?.['target']?.['committedDate']);
|
|
111
171
|
if (pr['mergeable'] === 'CONFLICTING' && moved)
|
|
112
|
-
|
|
113
|
-
|
|
172
|
+
broken.push({ at: moved, line: `It conflicts with ${base?.['name']}, which moved since.` });
|
|
173
|
+
const fork = pr['isCrossRepository'] === true;
|
|
174
|
+
threads.push({ kind: 'pull request', number: pr.number, url: pr.url, title: text(pr['title']) ?? '', ...(fork ? { fork: true } : { branch: pr['headRefName'] }), calls, broken });
|
|
175
|
+
}
|
|
176
|
+
return threads;
|
|
177
|
+
}
|
|
178
|
+
function ran(card) {
|
|
179
|
+
const started = card.caller?.['for'];
|
|
180
|
+
const host = card.caller?.['host'];
|
|
181
|
+
return { id: card.id, ...(card.branch !== undefined ? { branch: card.branch } : {}), ...(typeof started === 'string' ? { for: started } : {}), running: card.status === 'running', ...(card.endedAt !== undefined ? { endedAt: card.endedAt } : {}), ...(typeof host === 'string' ? { host } : {}) };
|
|
182
|
+
}
|
|
183
|
+
/** Oldest first, and only what came after `since`. ISO times compare as text only in one shape: GitHub's have no fraction, a record's do. */
|
|
184
|
+
const cameAfter = (came, since) => came.filter(c => Date.parse(c.at) > Date.parse(since)).sort((a, b) => Date.parse(a.at) - Date.parse(b.at));
|
|
185
|
+
const told = (head, came) => ({ text: [head, ...came.map(c => `- ${c.line}`)].join('\n'), seen: came.flatMap(c => (c.seen !== undefined ? [c.seen] : [])) });
|
|
186
|
+
/**
|
|
187
|
+
* For each thread with something new: its run, when that run is this machine's and has ended, and
|
|
188
|
+
* the words it is told; or, for a thread no run was ever on, what a new run is for, with the calls
|
|
189
|
+
* made there since `since`. A thread a run still works on, on any machine, is left to it.
|
|
190
|
+
*/
|
|
191
|
+
export function answersFor(threads, cards, host, since) {
|
|
192
|
+
const runs = cards.map(ran);
|
|
193
|
+
const answers = [];
|
|
194
|
+
for (const thread of threads) {
|
|
195
|
+
const its = runs.filter(r => r.for === thread.url || (thread.branch !== undefined && r.branch === thread.branch));
|
|
196
|
+
if (its.some(r => r.running))
|
|
197
|
+
continue;
|
|
198
|
+
const last = its.filter(r => r.endedAt !== undefined).sort((a, b) => Date.parse(b.endedAt) - Date.parse(a.endedAt))[0];
|
|
199
|
+
const name = `${thread.kind} #${thread.number} (${thread.url})`;
|
|
200
|
+
if (last === undefined) {
|
|
201
|
+
const came = since !== undefined ? cameAfter(thread.calls, since) : [];
|
|
202
|
+
const on = thread.branch !== undefined ? `, on its branch ${thread.branch}` : thread.fork ? ', from a fork: you are not on its branch, and cannot push to it' : '';
|
|
203
|
+
if (came.length > 0)
|
|
204
|
+
answers.push({ for: thread.url, ...(thread.branch !== undefined ? { branch: thread.branch } : {}), ...told(`You are called on ${name}, "${thread.title}"${on}:`, came) });
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
if (last.host !== host)
|
|
208
|
+
continue;
|
|
209
|
+
// The agent's own pull request: its run made the branch, and no run was started for the request.
|
|
210
|
+
const own = thread.kind === 'pull request' && !its.some(r => r.for === thread.url);
|
|
211
|
+
const came = cameAfter([...thread.calls, ...(own ? thread.broken : [])], last.endedAt);
|
|
212
|
+
if (came.length > 0)
|
|
213
|
+
answers.push({ run: last.id, ...told(`On ${own ? `your ${name}` : name}, since you ended:`, came) });
|
|
114
214
|
}
|
|
115
|
-
return
|
|
215
|
+
return answers;
|
|
116
216
|
}
|
|
117
|
-
/**
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
217
|
+
/**
|
|
218
|
+
* Whether what `path` answers changed since the answer whose ETag is `etag`, and the ETag now. gh
|
|
219
|
+
* says "not modified" as a failure, `HTTP 304`; any other failure throws.
|
|
220
|
+
*/
|
|
221
|
+
async function changedSince(gh, repo, path, etag) {
|
|
222
|
+
try {
|
|
223
|
+
const answered = await gh(['api', '--include', ...(etag !== undefined ? ['-H', `If-None-Match: ${etag}`] : []), path], repo);
|
|
224
|
+
const now = /^etag:\s*(.+?)\s*$/im.exec(answered)?.[1];
|
|
225
|
+
return { changed: true, ...(now !== undefined ? { etag: now } : {}) };
|
|
226
|
+
}
|
|
227
|
+
catch (err) {
|
|
228
|
+
if (/\bHTTP 304\b/.test(err instanceof Error ? err.message : String(err)))
|
|
229
|
+
return { changed: false, ...(etag !== undefined ? { etag } : {}) };
|
|
230
|
+
throw err;
|
|
127
231
|
}
|
|
128
|
-
return replies;
|
|
129
232
|
}
|
|
130
|
-
/**
|
|
233
|
+
/** Where the cache is: the clone's own `.git` folder; none for a checkout whose `.git` is no folder. */
|
|
234
|
+
async function lookedPath(repo) {
|
|
235
|
+
const git = join(repo, '.git');
|
|
236
|
+
return (await stat(git).then(s => s.isDirectory(), () => false)) ? join(git, 'openagent', 'replies.json') : undefined;
|
|
237
|
+
}
|
|
238
|
+
async function readLooked(path) {
|
|
239
|
+
if (path === undefined)
|
|
240
|
+
return { etags: {} };
|
|
241
|
+
const read = await readFile(path, 'utf8').then(text => JSON.parse(text), () => ({}));
|
|
242
|
+
return { etags: typeof read.etags === 'object' && read.etags !== null ? read.etags : {}, ...(typeof read.wholeAt === 'number' ? { wholeAt: read.wholeAt } : {}) };
|
|
243
|
+
}
|
|
244
|
+
async function writeLooked(path, looked) {
|
|
245
|
+
if (path === undefined)
|
|
246
|
+
return;
|
|
247
|
+
await mkdir(dirname(path), { recursive: true });
|
|
248
|
+
await writeFile(path, JSON.stringify(looked));
|
|
249
|
+
}
|
|
250
|
+
/** The gh command line of 👀 on each thread, comment and review of `ids`, by GitHub's ids, in one call. */
|
|
251
|
+
export function seenArgs(ids) {
|
|
252
|
+
const reactions = ids.map((id, i) => `r${i}: addReaction(input: { subjectId: ${JSON.stringify(id)}, content: EYES }) { clientMutationId }`);
|
|
253
|
+
return ['api', 'graphql', '-f', `query=mutation { ${reactions.join(' ')} }`];
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* What came on the project's open issues and pull requests for this machine's agents, as a
|
|
257
|
+
* scheduler's row reads it, each call among it given 👀; with `since`, the threads no run is on
|
|
258
|
+
* where someone called the agent since then too. Throws when GitHub cannot answer.
|
|
259
|
+
*/
|
|
131
260
|
export async function listReplies(repo, deps = {}) {
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
261
|
+
const cards = await (deps.runs ?? (() => listRuns(repo)))();
|
|
262
|
+
const host = deps.host ?? hostname();
|
|
263
|
+
// Nothing to resume and no thread to start for asks GitHub nothing.
|
|
264
|
+
if (deps.since === undefined && !cards.some(card => card.caller?.['host'] === host && card.endedAt !== undefined))
|
|
265
|
+
return [];
|
|
266
|
+
const gh = deps.gh ?? nodeGhRunner();
|
|
267
|
+
const now = (deps.now ?? Date.now)();
|
|
268
|
+
const cache = deps.cache ?? (await lookedPath(repo));
|
|
269
|
+
const looked = await readLooked(cache);
|
|
270
|
+
const etags = {};
|
|
271
|
+
let changed = false;
|
|
272
|
+
for (const what of Object.keys(CHANGED)) {
|
|
273
|
+
const asked = await changedSince(gh, repo, CHANGED[what], looked.etags[what]);
|
|
274
|
+
if (asked.etag !== undefined)
|
|
275
|
+
etags[what] = asked.etag;
|
|
276
|
+
changed ||= asked.changed;
|
|
277
|
+
}
|
|
278
|
+
if (!changed && looked.wholeAt !== undefined && now - looked.wholeAt < WHOLE_READ_EVERY_MS)
|
|
135
279
|
return [];
|
|
136
|
-
const answered = await
|
|
137
|
-
|
|
280
|
+
const answered = await gh(repliesArgs(), repo);
|
|
281
|
+
const answers = answersFor(parseThreads(JSON.parse(answered)), cards, host, deps.since);
|
|
282
|
+
// GitHub keeps one 👀 a person: one put again, at a look that finds the same comment while its
|
|
283
|
+
// run cannot start yet, is no second. One that could not be put leaves the answer to come.
|
|
284
|
+
const ids = answers.flatMap(a => a.seen);
|
|
285
|
+
if (ids.length > 0)
|
|
286
|
+
await gh(seenArgs(ids), repo).catch(() => undefined);
|
|
287
|
+
await writeLooked(cache, { etags, wholeAt: now });
|
|
288
|
+
return answers.map(({ seen: _seen, ...answer }) => answer);
|
|
138
289
|
}
|
|
139
290
|
//# sourceMappingURL=replies.js.map
|
package/dist/replies.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replies.js","sourceRoot":"","sources":["../src/replies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,QAAQ,EAAgB,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAiB,MAAM,SAAS,CAAA;AA8BrD,yEAAyE;AACzE,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAA;AAE/B,4EAA4E;AAC5E,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAA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;IACD,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,IAAI,GAAG,GAAG,MAAM,CAAC,OAAO,GAAG,mBAAmB;QAAE,OAAO,EAAE,CAAA;IACrG,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,WAAW,EAAE,EAAE,IAAI,CAAC,CAAA;IAC9C,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;IAClG,+FAA+F;IAC/F,2FAA2F;IAC3F,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;IACxC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;IACxE,MAAM,WAAW,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAA;IACjD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,CAAA;AAC5D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openagt/skill-github",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "GitHub as a skill for coding agents: the project's pull requests and issues through gh, and the one command OpenAgent and the scheduler run for the git host: requests, open, merge, home, and replies, what came on the pull requests this machine's agents opened since each ended.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|
|
20
20
|
"bin/github",
|
|
21
|
-
"SKILL.md"
|
|
21
|
+
"SKILL.md",
|
|
22
|
+
"assets"
|
|
22
23
|
],
|
|
23
24
|
"bin": {
|
|
24
25
|
"github": "bin/github"
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
"./SKILL.md": "./SKILL.md"
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"@openagt/agent-data": "0.0.
|
|
40
|
+
"@openagt/agent-data": "0.0.7",
|
|
40
41
|
"@openagt/skill-logs": "0.1.3"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|