@openagt/skill-github 0.1.1 → 0.1.3
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 +8 -0
- 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 +32 -1
- 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 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/replies.d.ts +99 -0
- package/dist/replies.d.ts.map +1 -0
- package/dist/replies.js +213 -0
- package/dist/replies.js.map +1 -0
- package/package.json +6 -4
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 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.
|
|
33
|
+
|
|
26
34
|
## Reading pull requests and issues
|
|
27
35
|
|
|
28
36
|
```
|
|
@@ -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 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.";
|
|
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 what came on the open pull requests this machine's agents opened, since each agent ended: maintainers' comments\n and reviews that call the agent with /agent, checks that turned red, a conflict once the base branch moved; [{ run, text }], one per run, read\n from the project's run records; the check of a scheduler's row that resumes runs\n comment <number> --body <text>\n post a comment on 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,qBAAqB,CAAA;AACnE,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACnE,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAWrD;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,KAAK,wnEAmBkF,CAAA;AAEpG,mEAAmE;AACnE,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,oFAAoF;AACpF,MAAM,WAAW,OAAO;IACtB,EAAE,CAAC,EAAE,QAAQ,CAAA;IACb,GAAG,CAAC,EAAE,SAAS,CAAA;IACf,4FAA4F;IAC5F,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACvD,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAA;CACxB;AAED,8DAA8D;AAC9D,MAAM,MAAM,UAAU,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAA;AAY9E,2FAA2F;AAC3F,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,GAAE,OAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CA0B3F"}
|
package/dist/cli.js
CHANGED
|
@@ -8,6 +8,8 @@ import { watchAndMerge } from './merge-watch.js';
|
|
|
8
8
|
import { GIT_HOST_NAME, homeUrlFor } from './home.js';
|
|
9
9
|
import { createRepository, offerRepository } from './create.js';
|
|
10
10
|
import { signedIn } from './me.js';
|
|
11
|
+
import { listReplies } from './replies.js';
|
|
12
|
+
import { DIARY_ENV, byline, writeComment } from './comment.js';
|
|
11
13
|
/**
|
|
12
14
|
* The command line over the package (#1820): the same functions for an agent in a shell, and for
|
|
13
15
|
* OpenAgent and the scheduler, which run this command as the project's git host provider,
|
|
@@ -26,6 +28,12 @@ export const USAGE = `usage: github <command>
|
|
|
26
28
|
|
|
27
29
|
requests [--branch <b>] [--state open|merged|all] [--since <iso>]
|
|
28
30
|
the project's pull requests, newest first: number, url, state, title, draft, branch, head, createdAt, mergedAt, mergeCommit
|
|
31
|
+
replies what came on the open pull requests this machine's agents opened, since each agent ended: maintainers' comments
|
|
32
|
+
and reviews that call the agent with /agent, checks that turned red, a conflict once the base branch moved; [{ run, text }], one per run, read
|
|
33
|
+
from the project's run records; the check of a scheduler's row that resumes runs
|
|
34
|
+
comment <number> --body <text>
|
|
35
|
+
post a comment on pull request <number>: its id and url. It opens with the coding agent's logo, the model and the effort, as the agent's
|
|
36
|
+
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
|
|
29
37
|
open [--branch <b>] --title <t> [--body <text>] [--draft] [--merge]
|
|
30
38
|
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
|
|
31
39
|
merge <number> land pull request <number>: a draft is marked ready, then the merge is armed as --merge arms it
|
|
@@ -57,7 +65,7 @@ export async function runCli(argv, io, deps = {}) {
|
|
|
57
65
|
io.stderr(USAGE);
|
|
58
66
|
return 2;
|
|
59
67
|
}
|
|
60
|
-
const context = { cwd: io.cwd, gh: deps.gh ?? nodeGhRunner(), git: deps.git ?? nodeGitRunner(), ...(deps.watch ? { watch: deps.watch } : {}), stderr: io.stderr };
|
|
68
|
+
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 };
|
|
61
69
|
try {
|
|
62
70
|
io.stdout(JSON.stringify(await run(rest, context)));
|
|
63
71
|
return 0;
|
|
@@ -92,6 +100,29 @@ const COMMANDS = {
|
|
|
92
100
|
throw new Refused({ ok: false, reason: 'git-host-failed', detail }, `the pull requests could not be read: ${detail}`);
|
|
93
101
|
}
|
|
94
102
|
},
|
|
103
|
+
async replies(args, { cwd, gh }) {
|
|
104
|
+
parse(args, {}, 0);
|
|
105
|
+
try {
|
|
106
|
+
return await listReplies(cwd, { gh });
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
110
|
+
throw new Refused({ ok: false, reason: 'git-host-failed', detail }, `the pull requests could not be read: ${detail}`);
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
async comment(args, { cwd, gh, env }) {
|
|
114
|
+
const { values, positionals } = parse(args, { body: { type: 'string' } }, 1);
|
|
115
|
+
if (values.body === undefined || !values.body.trim())
|
|
116
|
+
throw new Usage('--body is required: the text of the comment');
|
|
117
|
+
const number = numberArg(positionals[0]);
|
|
118
|
+
try {
|
|
119
|
+
return { ok: true, ...(await writeComment(cwd, number, values.body, await byline(env[DIARY_ENV]), gh)) };
|
|
120
|
+
}
|
|
121
|
+
catch (err) {
|
|
122
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
123
|
+
throw new Refused({ ok: false, reason: 'git-host-failed', detail }, `the comment could not be written: ${detail}`);
|
|
124
|
+
}
|
|
125
|
+
},
|
|
95
126
|
async open(args, { cwd, gh, git, watch }) {
|
|
96
127
|
const { values } = parse(args, { branch: { type: 'string' }, title: { type: 'string' }, body: { type: 'string' }, merge: { type: 'boolean' }, draft: { type: 'boolean' } }, 0);
|
|
97
128
|
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,E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CAAC,GAAW;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 a pull request's thread: how an agent a row resumed 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 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 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,yGAAyG;AACzG,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAEjF;AAED,6JAA6J;AAC7J,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 a pull request's thread: how an agent a row resumed 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 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 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,OAAO,SAAS,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AE,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,yGAAyG;AACzG,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,6JAA6J;AAC7J,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,4 +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, parseOpenRequests, repliesArgs, repliesFor, seenArgs, watchedRequests, REPLIES_LIMIT, WHOLE_READ_EVERY_MS, type OpenRequest, type Reply, type Watched } from './replies.js';
|
|
11
|
+
export { writeComment, commentArgs, byline, COMMENT_MARK, DIARY_ENV, ASSETS_URL, type Comment } from './comment.js';
|
|
10
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,gBAAgB,EAAE,eAA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,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAE,mBAAmB,EAAE,KAAK,WAAW,EAAE,KAAK,KAAK,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AACjM,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,4 +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, parseOpenRequests, repliesArgs, repliesFor, seenArgs, watchedRequests, REPLIES_LIMIT, WHOLE_READ_EVERY_MS } from './replies.js';
|
|
11
|
+
export { writeComment, commentArgs, byline, COMMENT_MARK, DIARY_ENV, ASSETS_URL } from './comment.js';
|
|
10
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,cAAc,EAAE,YAAY,EAAE,aAAa,EAA0D,MAAM,kBAAkB,CAAA;AAClM,O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AAA"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type RunCard } from '@openagt/skill-logs';
|
|
2
|
+
import { type GhRunner } from './gh.js';
|
|
3
|
+
/**
|
|
4
|
+
* What came on the pull requests this machine's agents opened, since each agent ended (#2042):
|
|
5
|
+
* the check of a scheduler's row that resumes runs. It prints `[{ "run": "<id>", "text": "…" }]`,
|
|
6
|
+
* one item per run with something new, and the scheduler resumes each run with its words. Each
|
|
7
|
+
* comment and review it hands a run gets 👀 at once, so who wrote sees the agent saw it; the
|
|
8
|
+
* agent's answer comes later, a comment of its own.
|
|
9
|
+
*
|
|
10
|
+
* New is after the run last ended: no time is kept anywhere. Something that comes while the run
|
|
11
|
+
* still works is found at the first look after it ends; and what came before it ended, the run
|
|
12
|
+
* saw or left, so a red check it chose to leave does not wake it again and again.
|
|
13
|
+
*
|
|
14
|
+
* What counts:
|
|
15
|
+
* - a comment or a review of a maintainer, a person who can write to the repository: GitHub's
|
|
16
|
+
* owner, member or collaborator, that calls the agent: `/agent`, a word of its own anywhere in
|
|
17
|
+
* it. Other words on the pull request are people talking, the agent's own pull request too.
|
|
18
|
+
* One that carries the 🤖 line, or the hidden mark of a comment `comment` wrote, is an agent's,
|
|
19
|
+
* posted with a person's account, and never counts;
|
|
20
|
+
* - a check that turned red, with no word: nobody writes one;
|
|
21
|
+
* - a conflict with the base branch, once the base branch moved.
|
|
22
|
+
*
|
|
23
|
+
* Only the open pull requests whose last run was on this machine and has ended: only this machine
|
|
24
|
+
* holds that run's conversation, and a pull request another run still works on is that run's.
|
|
25
|
+
* A pull request is a run's when its branch is the run's branch, as the run's record keeps it:
|
|
26
|
+
* whoever opened the request, the run's agent with any tool or a person, and whether the run
|
|
27
|
+
* could tell its pull request or not. One GitHub call a look, whatever the number of pull requests.
|
|
28
|
+
*
|
|
29
|
+
* A look can be every few seconds (a row's `check-every`), so it first asks GitHub whether any
|
|
30
|
+
* comment of the repository changed, a conversation's or a line's, by the answer it last had
|
|
31
|
+
* (its ETag): "not modified" is free, and then nothing is read. Reviews with no line comments, red
|
|
32
|
+
* checks and conflicts have no such question, so the whole read is made at least once a minute
|
|
33
|
+
* anyway. What the questions last answered and when the last whole read was are a cache in the
|
|
34
|
+
* clone's own `.git` folder, never what decides what is new.
|
|
35
|
+
*/
|
|
36
|
+
/** A branch runs worked on, with the run that last did and when that run ended. */
|
|
37
|
+
export interface Watched {
|
|
38
|
+
branch: string;
|
|
39
|
+
run: string;
|
|
40
|
+
endedAt: string;
|
|
41
|
+
}
|
|
42
|
+
/** How long a whole read holds when no comment changed: reviews, checks and conflicts are seen at least this often. */
|
|
43
|
+
export declare const WHOLE_READ_EVERY_MS = 60000;
|
|
44
|
+
/** The open pull requests one GitHub call reads, newest change first. */
|
|
45
|
+
export declare const REPLIES_LIMIT = 50;
|
|
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;
|
|
48
|
+
/**
|
|
49
|
+
* Each branch the runs worked on, with the run that last did, when that run is this machine's
|
|
50
|
+
* and has ended. A branch a run still works on, on any machine, is left to it.
|
|
51
|
+
*/
|
|
52
|
+
export declare function watchedRequests(cards: RunCard[], host: string): Watched[];
|
|
53
|
+
/** The gh command line of the one read: the repository is the one the working directory is in. */
|
|
54
|
+
export declare function repliesArgs(): string[];
|
|
55
|
+
/** One thing that came on a pull request, as the run is told it, and the comment or review it is when a person's, by GitHub's id, for its 👀. */
|
|
56
|
+
interface Came {
|
|
57
|
+
at: string;
|
|
58
|
+
line: string;
|
|
59
|
+
seen?: string;
|
|
60
|
+
}
|
|
61
|
+
/** An open pull request as read: its branch, and what came on it, each with when. */
|
|
62
|
+
export interface OpenRequest {
|
|
63
|
+
number: number;
|
|
64
|
+
url: string;
|
|
65
|
+
branch: string;
|
|
66
|
+
came: Came[];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The pull requests GitHub answered, each with what came on it; one it answered in a shape not
|
|
70
|
+
* known is left out, and one from a fork too: a run's branch is on the project's repository, and
|
|
71
|
+
* a fork's branch of the same name is someone else's.
|
|
72
|
+
*/
|
|
73
|
+
export declare function parseOpenRequests(output: unknown): OpenRequest[];
|
|
74
|
+
/** What a run is told, and the comments and reviews among it, by GitHub's ids: a red check or a conflict is none. */
|
|
75
|
+
export interface Reply {
|
|
76
|
+
run: string;
|
|
77
|
+
text: string;
|
|
78
|
+
seen: string[];
|
|
79
|
+
}
|
|
80
|
+
/** For each open pull request of a watched branch with something new since its run ended, the run, the words it is told, and the comments and reviews among them. */
|
|
81
|
+
export declare function repliesFor(watched: Watched[], open: OpenRequest[]): Reply[];
|
|
82
|
+
/** The gh command line of 👀 on each comment and review of `ids`, by GitHub's ids, in one call. */
|
|
83
|
+
export declare function seenArgs(ids: string[]): string[];
|
|
84
|
+
/**
|
|
85
|
+
* What came on this machine's agents' open pull requests since each ended, as a scheduler's row
|
|
86
|
+
* reads it, each comment and review among it given 👀. Throws when GitHub cannot answer.
|
|
87
|
+
*/
|
|
88
|
+
export declare function listReplies(repo: string, deps?: {
|
|
89
|
+
gh?: GhRunner;
|
|
90
|
+
host?: string;
|
|
91
|
+
runs?: () => Promise<RunCard[]>;
|
|
92
|
+
now?: () => number;
|
|
93
|
+
cache?: string;
|
|
94
|
+
}): Promise<{
|
|
95
|
+
run: string;
|
|
96
|
+
text: string;
|
|
97
|
+
}[]>;
|
|
98
|
+
export {};
|
|
99
|
+
//# sourceMappingURL=replies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replies.d.ts","sourceRoot":"","sources":["../src/replies.ts"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAA;AAGrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,mFAAmF;AACnF,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAA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C,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,CAAA;CAAO,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,CAoB1M"}
|
package/dist/replies.js
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { mkdir, readFile, stat, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { hostname } from 'node:os';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { listRuns } from '@openagt/skill-logs';
|
|
5
|
+
import { nodeGhRunner } from './gh.js';
|
|
6
|
+
import { COMMENT_MARK } from './comment.js';
|
|
7
|
+
/** How long a whole read holds when no comment changed: reviews, checks and conflicts are seen at least this often. */
|
|
8
|
+
export const WHOLE_READ_EVERY_MS = 60_000;
|
|
9
|
+
/** The two cheap questions: did a conversation's comment change, did a comment on a line. */
|
|
10
|
+
const CHANGED = {
|
|
11
|
+
comments: 'repos/{owner}/{repo}/issues/comments?sort=updated&direction=desc&per_page=1',
|
|
12
|
+
lineComments: 'repos/{owner}/{repo}/pulls/comments?sort=updated&direction=desc&per_page=1',
|
|
13
|
+
};
|
|
14
|
+
/** The open pull requests one GitHub call reads, newest change first. */
|
|
15
|
+
export const REPLIES_LIMIT = 50;
|
|
16
|
+
/** The authors whose words count: those who can write to the repository. */
|
|
17
|
+
const MAINTAINERS = new Set(['OWNER', 'MEMBER', 'COLLABORATOR']);
|
|
18
|
+
/** What an agent puts on what it posts. */
|
|
19
|
+
const AGENT_MARK = '🤖';
|
|
20
|
+
/** The word that calls the agent: `/agent` with nothing of a word or a path on either side. */
|
|
21
|
+
export const MENTION = /(?<![\w/])\/agent(?![\w/-])/;
|
|
22
|
+
/** A check's ending that is red. */
|
|
23
|
+
const RED = new Set(['FAILURE', 'TIMED_OUT', 'STARTUP_FAILURE', 'ACTION_REQUIRED', 'ERROR', 'CANCELLED']);
|
|
24
|
+
/**
|
|
25
|
+
* Each branch the runs worked on, with the run that last did, when that run is this machine's
|
|
26
|
+
* and has ended. A branch a run still works on, on any machine, is left to it.
|
|
27
|
+
*/
|
|
28
|
+
export function watchedRequests(cards, host) {
|
|
29
|
+
const byBranch = new Map();
|
|
30
|
+
for (const card of cards)
|
|
31
|
+
if (card.branch)
|
|
32
|
+
byBranch.set(card.branch, [...(byBranch.get(card.branch) ?? []), card]);
|
|
33
|
+
const watched = [];
|
|
34
|
+
for (const [branch, runs] of byBranch) {
|
|
35
|
+
if (runs.some(card => card.status === 'running'))
|
|
36
|
+
continue;
|
|
37
|
+
const last = runs.filter(card => card.endedAt !== undefined).sort((a, b) => Date.parse(b.endedAt) - Date.parse(a.endedAt))[0];
|
|
38
|
+
if (last && last.caller?.['host'] === host)
|
|
39
|
+
watched.push({ branch, run: last.id, endedAt: last.endedAt });
|
|
40
|
+
}
|
|
41
|
+
return watched.sort((a, b) => a.branch.localeCompare(b.branch));
|
|
42
|
+
}
|
|
43
|
+
const QUERY = `query($owner: String!, $name: String!) {
|
|
44
|
+
repository(owner: $owner, name: $name) {
|
|
45
|
+
pullRequests(states: OPEN, first: ${REPLIES_LIMIT}, orderBy: { field: UPDATED_AT, direction: DESC }) {
|
|
46
|
+
nodes {
|
|
47
|
+
number url mergeable headRefName isCrossRepository
|
|
48
|
+
baseRef { name target { ... on Commit { committedDate } } }
|
|
49
|
+
comments(last: 30) { nodes { id author { login } authorAssociation body createdAt url } }
|
|
50
|
+
reviews(last: 30) {
|
|
51
|
+
nodes {
|
|
52
|
+
id author { login } authorAssociation body state submittedAt url
|
|
53
|
+
comments(first: 30) { nodes { id author { login } authorAssociation body path line createdAt url } }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
commits(last: 1) {
|
|
57
|
+
nodes { commit { statusCheckRollup { contexts(first: 50) { nodes {
|
|
58
|
+
__typename
|
|
59
|
+
... on CheckRun { name conclusion completedAt detailsUrl }
|
|
60
|
+
... on StatusContext { context state createdAt targetUrl }
|
|
61
|
+
} } } } }
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}`;
|
|
67
|
+
/** The gh command line of the one read: the repository is the one the working directory is in. */
|
|
68
|
+
export function repliesArgs() {
|
|
69
|
+
return ['api', 'graphql', '-F', 'owner={owner}', '-F', 'name={repo}', '-f', `query=${QUERY}`];
|
|
70
|
+
}
|
|
71
|
+
const nodes = (value) => {
|
|
72
|
+
const list = value?.nodes;
|
|
73
|
+
return Array.isArray(list) ? list.filter((n) => typeof n === 'object' && n !== null) : [];
|
|
74
|
+
};
|
|
75
|
+
const text = (value) => (typeof value === 'string' && value !== '' ? value : undefined);
|
|
76
|
+
const login = (node) => text(node['author']?.['login']) ?? 'someone';
|
|
77
|
+
/** A comment's or a review's id, for its 👀. */
|
|
78
|
+
const seen = (node) => (text(node['id']) !== undefined ? { seen: text(node['id']) } : {});
|
|
79
|
+
/** A maintainer's words that call the agent and are no agent's: what counts of a comment or a review. */
|
|
80
|
+
function maintainers(node) {
|
|
81
|
+
const body = text(node['body'])?.trim();
|
|
82
|
+
if (!body || !MENTION.test(body) || body.includes(AGENT_MARK) || body.includes(COMMENT_MARK) || !MAINTAINERS.has(String(node['authorAssociation'])))
|
|
83
|
+
return undefined;
|
|
84
|
+
return body;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The pull requests GitHub answered, each with what came on it; one it answered in a shape not
|
|
88
|
+
* known is left out, and one from a fork too: a run's branch is on the project's repository, and
|
|
89
|
+
* a fork's branch of the same name is someone else's.
|
|
90
|
+
*/
|
|
91
|
+
export function parseOpenRequests(output) {
|
|
92
|
+
const repository = output?.['data']?.['repository'];
|
|
93
|
+
const requests = [];
|
|
94
|
+
for (const pr of nodes(repository?.['pullRequests'])) {
|
|
95
|
+
if (typeof pr['number'] !== 'number' || typeof pr['url'] !== 'string' || typeof pr['headRefName'] !== 'string' || pr['isCrossRepository'] !== false)
|
|
96
|
+
continue;
|
|
97
|
+
const came = [];
|
|
98
|
+
for (const comment of nodes(pr['comments'])) {
|
|
99
|
+
const body = maintainers(comment);
|
|
100
|
+
const at = text(comment['createdAt']);
|
|
101
|
+
if (body && at)
|
|
102
|
+
came.push({ at, line: `@${login(comment)} commented (${comment['url']}):\n${body}`, ...seen(comment) });
|
|
103
|
+
}
|
|
104
|
+
for (const review of nodes(pr['reviews'])) {
|
|
105
|
+
const at = text(review['submittedAt']);
|
|
106
|
+
const body = maintainers(review);
|
|
107
|
+
// A review's comments count one by one, each by its own word.
|
|
108
|
+
if (at && body)
|
|
109
|
+
came.push({ at, line: `@${login(review)} ${review['state'] === 'CHANGES_REQUESTED' ? 'requested changes' : 'reviewed'} (${review['url']}):\n${body}`, ...seen(review) });
|
|
110
|
+
for (const comment of nodes(review['comments'])) {
|
|
111
|
+
const words = maintainers(comment);
|
|
112
|
+
const when = text(comment['createdAt']);
|
|
113
|
+
const where = `${comment['path']}${typeof comment['line'] === 'number' ? ` line ${comment['line']}` : ''}`;
|
|
114
|
+
if (words && when)
|
|
115
|
+
came.push({ at: when, line: `@${login(comment)} on ${where} (${comment['url']}):\n${words}`, ...seen(comment) });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const commit = nodes(pr['commits'])[0]?.['commit']?.['statusCheckRollup'];
|
|
119
|
+
for (const check of nodes(commit?.['contexts'])) {
|
|
120
|
+
const run = check['__typename'] === 'CheckRun';
|
|
121
|
+
const ending = String(run ? check['conclusion'] : check['state']);
|
|
122
|
+
const at = text(run ? check['completedAt'] : check['createdAt']);
|
|
123
|
+
if (at && RED.has(ending))
|
|
124
|
+
came.push({ at, line: `The check "${run ? check['name'] : check['context']}" failed (${(run ? check['detailsUrl'] : check['targetUrl']) ?? 'no link'}).` });
|
|
125
|
+
}
|
|
126
|
+
const base = pr['baseRef'];
|
|
127
|
+
const moved = text(base?.['target']?.['committedDate']);
|
|
128
|
+
if (pr['mergeable'] === 'CONFLICTING' && moved)
|
|
129
|
+
came.push({ at: moved, line: `It conflicts with ${base?.['name']}, which moved since.` });
|
|
130
|
+
requests.push({ number: pr['number'], url: pr['url'], branch: pr['headRefName'], came });
|
|
131
|
+
}
|
|
132
|
+
return requests;
|
|
133
|
+
}
|
|
134
|
+
/** For each open pull request of a watched branch with something new since its run ended, the run, the words it is told, and the comments and reviews among them. */
|
|
135
|
+
export function repliesFor(watched, open) {
|
|
136
|
+
const replies = [];
|
|
137
|
+
for (const { branch, run, endedAt } of watched) {
|
|
138
|
+
const request = open.find(r => r.branch === branch);
|
|
139
|
+
// ISO times compare as text only in one shape: GitHub's have no fraction, a record's do.
|
|
140
|
+
const after = Date.parse(endedAt);
|
|
141
|
+
const came = request?.came.filter(c => Date.parse(c.at) > after).sort((a, b) => Date.parse(a.at) - Date.parse(b.at)) ?? [];
|
|
142
|
+
if (request && came.length > 0)
|
|
143
|
+
replies.push({ run, text: [`On your pull request #${request.number} (${request.url}), since you ended:`, ...came.map(c => `- ${c.line}`)].join('\n'), seen: came.flatMap(c => (c.seen !== undefined ? [c.seen] : [])) });
|
|
144
|
+
}
|
|
145
|
+
return replies;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Whether what `path` answers changed since the answer whose ETag is `etag`, and the ETag now. gh
|
|
149
|
+
* says "not modified" as a failure, `HTTP 304`; any other failure throws.
|
|
150
|
+
*/
|
|
151
|
+
async function changedSince(gh, repo, path, etag) {
|
|
152
|
+
try {
|
|
153
|
+
const answered = await gh(['api', '--include', ...(etag !== undefined ? ['-H', `If-None-Match: ${etag}`] : []), path], repo);
|
|
154
|
+
const now = /^etag:\s*(.+?)\s*$/im.exec(answered)?.[1];
|
|
155
|
+
return { changed: true, ...(now !== undefined ? { etag: now } : {}) };
|
|
156
|
+
}
|
|
157
|
+
catch (err) {
|
|
158
|
+
if (/\bHTTP 304\b/.test(err instanceof Error ? err.message : String(err)))
|
|
159
|
+
return { changed: false, ...(etag !== undefined ? { etag } : {}) };
|
|
160
|
+
throw err;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
/** Where the cache is: the clone's own `.git` folder; none for a checkout whose `.git` is no folder. */
|
|
164
|
+
async function lookedPath(repo) {
|
|
165
|
+
const git = join(repo, '.git');
|
|
166
|
+
return (await stat(git).then(s => s.isDirectory(), () => false)) ? join(git, 'openagent', 'replies.json') : undefined;
|
|
167
|
+
}
|
|
168
|
+
async function readLooked(path) {
|
|
169
|
+
if (path === undefined)
|
|
170
|
+
return { etags: {} };
|
|
171
|
+
const read = await readFile(path, 'utf8').then(text => JSON.parse(text), () => ({}));
|
|
172
|
+
return { etags: typeof read.etags === 'object' && read.etags !== null ? read.etags : {}, ...(typeof read.wholeAt === 'number' ? { wholeAt: read.wholeAt } : {}) };
|
|
173
|
+
}
|
|
174
|
+
async function writeLooked(path, looked) {
|
|
175
|
+
if (path === undefined)
|
|
176
|
+
return;
|
|
177
|
+
await mkdir(dirname(path), { recursive: true });
|
|
178
|
+
await writeFile(path, JSON.stringify(looked));
|
|
179
|
+
}
|
|
180
|
+
/** The gh command line of 👀 on each comment and review of `ids`, by GitHub's ids, in one call. */
|
|
181
|
+
export function seenArgs(ids) {
|
|
182
|
+
const reactions = ids.map((id, i) => `r${i}: addReaction(input: { subjectId: ${JSON.stringify(id)}, content: EYES }) { clientMutationId }`);
|
|
183
|
+
return ['api', 'graphql', '-f', `query=mutation { ${reactions.join(' ')} }`];
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* What came on this machine's agents' open pull requests since each ended, as a scheduler's row
|
|
187
|
+
* reads it, each comment and review among it given 👀. Throws when GitHub cannot answer.
|
|
188
|
+
*/
|
|
189
|
+
export async function listReplies(repo, deps = {}) {
|
|
190
|
+
const watched = watchedRequests(await (deps.runs ?? (() => listRuns(repo)))(), deps.host ?? hostname());
|
|
191
|
+
// Nothing to watch asks GitHub nothing.
|
|
192
|
+
if (watched.length === 0)
|
|
193
|
+
return [];
|
|
194
|
+
const gh = deps.gh ?? nodeGhRunner();
|
|
195
|
+
const now = (deps.now ?? Date.now)();
|
|
196
|
+
const cache = deps.cache ?? (await lookedPath(repo));
|
|
197
|
+
const looked = await readLooked(cache);
|
|
198
|
+
const comments = await changedSince(gh, repo, CHANGED.comments, looked.etags.comments);
|
|
199
|
+
const lineComments = await changedSince(gh, repo, CHANGED.lineComments, looked.etags.lineComments);
|
|
200
|
+
const etags = { ...(comments.etag !== undefined ? { comments: comments.etag } : {}), ...(lineComments.etag !== undefined ? { lineComments: lineComments.etag } : {}) };
|
|
201
|
+
if (!comments.changed && !lineComments.changed && looked.wholeAt !== undefined && now - looked.wholeAt < WHOLE_READ_EVERY_MS)
|
|
202
|
+
return [];
|
|
203
|
+
const answered = await gh(repliesArgs(), repo);
|
|
204
|
+
const replies = repliesFor(watched, parseOpenRequests(JSON.parse(answered)));
|
|
205
|
+
// GitHub keeps one 👀 a person: one put again, at a look that finds the same comment while its
|
|
206
|
+
// run cannot start yet, is no second. One that could not be put leaves the answer to come.
|
|
207
|
+
const ids = replies.flatMap(r => r.seen);
|
|
208
|
+
if (ids.length > 0)
|
|
209
|
+
await gh(seenArgs(ids), repo).catch(() => undefined);
|
|
210
|
+
await writeLooked(cache, { etags, wholeAt: now });
|
|
211
|
+
return replies.map(({ run, text }) => ({ run, text }));
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=replies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"replies.js","sourceRoot":"","sources":["../src/replies.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE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|
|
1
1
|
{
|
|
2
2
|
"name": "@openagt/skill-github",
|
|
3
|
-
"version": "0.1.
|
|
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.",
|
|
3
|
+
"version": "0.1.3",
|
|
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": {
|
|
7
7
|
"type": "git",
|
|
@@ -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,8 @@
|
|
|
36
37
|
"./SKILL.md": "./SKILL.md"
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"@openagt/agent-data": "0.0.
|
|
40
|
+
"@openagt/agent-data": "0.0.7",
|
|
41
|
+
"@openagt/skill-logs": "0.1.3"
|
|
40
42
|
},
|
|
41
43
|
"devDependencies": {
|
|
42
44
|
"@types/node": "^20.0.0",
|