@openagt/skill-github 0.1.3 → 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 CHANGED
@@ -23,13 +23,13 @@ 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
26
+ ## Commenting on an issue or a pull request
27
27
 
28
28
  ```
29
29
  npx @openagt/skill-github@0.1 comment <number> --body "<text>"
30
30
  ```
31
31
 
32
- It posts a new comment, opened with what you run on, so what you post is told apart from what people write.
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
33
 
34
34
  ## Reading pull requests and issues
35
35
 
@@ -39,7 +39,7 @@ npx @openagt/skill-github@0.1 requests [--branch <b>] [--state open|merged|all]
39
39
 
40
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).
41
41
 
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 issue comment <number> --body "<text>"`. `gh` is installed and logged in where you run.
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.
43
43
 
44
44
  ## Landing a pull request for a person
45
45
 
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 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.";
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;
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;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,KA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AE,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,GAAE,OAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CA0B3F"}
package/dist/cli.js CHANGED
@@ -28,11 +28,12 @@ export const USAGE = `usage: github <command>
28
28
 
29
29
  requests [--branch <b>] [--state open|merged|all] [--since <iso>]
30
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
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
34
35
  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
+ 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
36
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
37
38
  open [--branch <b>] --title <t> [--body <text>] [--draft] [--merge]
38
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
@@ -101,9 +102,11 @@ const COMMANDS = {
101
102
  }
102
103
  },
103
104
  async replies(args, { cwd, gh }) {
104
- 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}"`);
105
108
  try {
106
- return await listReplies(cwd, { gh });
109
+ return await listReplies(cwd, { gh, ...(values.since !== undefined ? { since: values.since } : {}) });
107
110
  }
108
111
  catch (err) {
109
112
  const detail = err instanceof Error ? err.message : String(err);
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;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE9D;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;oGAmB+E,CAAA;AAsBpG,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,2FAA2F;AAC3F,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAc,EAAE,EAAS,EAAE,IAAI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AS,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"}
package/dist/comment.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { GhRunner } from './gh.js';
2
2
  /**
3
- * A comment on a pull request's thread: how an agent a row resumed answers there (#2042). Asked
3
+ * A comment on an issue's or a pull request's thread: how an agent a row woke answers there (#2042). Asked
4
4
  * of GitHub's REST API through `gh`, in the repository the working directory is in.
5
5
  *
6
6
  * It opens with what wrote it: the coding agent's logo, the model and how hard it thought, as the
@@ -28,8 +28,8 @@ export interface Comment {
28
28
  id: number;
29
29
  url: string;
30
30
  }
31
- /** The gh command line of a new comment on pull request `number`: the first line, the text, the mark. */
31
+ /** The gh command line of a new comment on issue or pull request `number`: the first line, the text, the mark. */
32
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. */
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
34
  export declare function writeComment(cwd: string, number: number, body: string, first: string, gh: GhRunner): Promise<Comment>;
35
35
  //# sourceMappingURL=comment.d.ts.map
@@ -1 +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"}
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 CHANGED
@@ -1,7 +1,7 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import { createRequire } from 'node:module';
3
3
  /**
4
- * A comment on a pull request's thread: how an agent a row resumed answers there (#2042). Asked
4
+ * A comment on an issue's or a pull request's thread: how an agent a row woke answers there (#2042). Asked
5
5
  * of GitHub's REST API through `gh`, in the repository the working directory is in.
6
6
  *
7
7
  * It opens with what wrote it: the coding agent's logo, the model and how hard it thought, as the
@@ -42,11 +42,11 @@ export async function byline(diary) {
42
42
  const on = [model, effort].filter(part => part !== undefined).join(' · ');
43
43
  return on === '' ? logo : `${logo} ${on}`;
44
44
  }
45
- /** The gh command line of a new comment on pull request `number`: the first line, the text, the mark. */
45
+ /** The gh command line of a new comment on issue or pull request `number`: the first line, the text, the mark. */
46
46
  export function commentArgs(number, body, first) {
47
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
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. */
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
50
  export async function writeComment(cwd, number, body, first, gh) {
51
51
  const answer = JSON.parse(await gh(commentArgs(number, body, first), cwd));
52
52
  if (typeof answer?.id !== 'number' || typeof answer.url !== 'string')
@@ -1 +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,CAAA;AAE3K,sEAAsE;AACtE,MAAM,KAAK,GAA2B;IACpC,aAAa,EAAE,aAAa,UAAU,oEAAoE;IAC1G,KAAK,EAAE,iEAAiE,UAAU,8BAA8B,UAAU,6EAA6E;CACxM,CAAA;AAED,uFAAuF;AACvF,MAAM,SAAS,GAAG,gBAAgB,CAAA;AAElC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,KAAyB;IACpD,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,SAAS,C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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,6 +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';
10
+ export { answersFor, listReplies, parseThreads, repliesArgs, seenArgs, MENTION, REPLIES_LIMIT, WHOLE_READ_EVERY_MS, type Answer, type Thread, type Told } from './replies.js';
11
11
  export { writeComment, commentArgs, byline, COMMENT_MARK, DIARY_ENV, ASSETS_URL, type Comment } from './comment.js';
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -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,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAA;AACrG,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAA;AA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B,EAAE,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAA;AACrG,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,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,6 +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';
10
+ export { answersFor, listReplies, parseThreads, repliesArgs, seenArgs, MENTION, REPLIES_LIMIT, WHOLE_READ_EVERY_MS } from './replies.js';
11
11
  export { writeComment, commentArgs, byline, COMMENT_MARK, DIARY_ENV, ASSETS_URL } from './comment.js';
12
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,WA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AAa,EAAE,MAAM,WAAW,CAAA;AACxE,OAAO,EAAE,MAAM,EAAE,KAAK,EAA6C,MAAM,UAAU,CAAA;AACnF,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAwC,MAAM,aAAa,CAAA;AACrG,OAAO,EAAE,QAAQ,EAAkB,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAuC,MAAM,cAAc,CAAA;AAC7K,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAgB,MAAM,cAAc,CAAA"}
package/dist/replies.d.ts CHANGED
@@ -1,89 +1,100 @@
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 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.
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.
9
11
  *
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.
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.
13
17
  *
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.
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.
22
23
  *
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.
24
+ * What counts:
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.
28
34
  *
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
+ * 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.
35
41
  */
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. */
42
+ /** How long a whole read holds when nothing changed: reviews, checks and conflicts are seen at least this often. */
43
43
  export declare const WHOLE_READ_EVERY_MS = 60000;
44
- /** The open pull requests one GitHub call reads, newest change first. */
44
+ /** The open issues, and the open pull requests, one GitHub call reads, newest change first. */
45
45
  export declare const REPLIES_LIMIT = 50;
46
46
  /** The word that calls the agent: `/agent` with nothing of a word or a path on either side. */
47
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
48
  /** The gh command line of the one read: the repository is the one the working directory is in. */
54
49
  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 👀. */
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 👀. */
56
51
  interface Came {
57
52
  at: string;
58
53
  line: string;
59
54
  seen?: string;
60
55
  }
61
- /** An open pull request as read: its branch, and what came on it, each with when. */
62
- export interface OpenRequest {
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';
63
59
  number: number;
64
60
  url: string;
65
- branch: string;
66
- came: Came[];
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[];
67
70
  }
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 {
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 = {
76
75
  run: string;
77
76
  text: string;
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 & {
78
84
  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. */
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. */
83
93
  export declare function seenArgs(ids: string[]): string[];
84
94
  /**
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.
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.
87
98
  */
88
99
  export declare function listReplies(repo: string, deps?: {
89
100
  gh?: GhRunner;
@@ -91,9 +102,7 @@ export declare function listReplies(repo: string, deps?: {
91
102
  runs?: () => Promise<RunCard[]>;
92
103
  now?: () => number;
93
104
  cache?: string;
94
- }): Promise<{
95
- run: string;
96
- text: string;
97
- }[]>;
105
+ since?: string;
106
+ }): Promise<Told[]>;
98
107
  export {};
99
108
  //# sourceMappingURL=replies.d.ts.map
@@ -1 +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,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,uHAAuH;AACvH,eAAO,MAAM,mBAAmB,QAAS,CAAA;AAczC,yEAAyE;AACzE,eAAO,MAAM,aAAa,KAAK,CAAA;AAQ/B,+FAA+F;AAC/F,eAAO,MAAM,OAAO,QAAgC,CAAA;AAKpD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MA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CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEjG,0GAA0G;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
@@ -4,14 +4,54 @@ import { dirname, join } from 'node:path';
4
4
  import { listRuns } from '@openagt/skill-logs';
5
5
  import { nodeGhRunner } from './gh.js';
6
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. */
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. */
8
47
  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. */
48
+ /** The cheap questions: did an issue or a pull request change, a conversation's comment, a comment on a line. */
10
49
  const CHANGED = {
50
+ threads: 'repos/{owner}/{repo}/issues?state=all&sort=updated&direction=desc&per_page=1',
11
51
  comments: 'repos/{owner}/{repo}/issues/comments?sort=updated&direction=desc&per_page=1',
12
52
  lineComments: 'repos/{owner}/{repo}/pulls/comments?sort=updated&direction=desc&per_page=1',
13
53
  };
14
- /** The open pull requests one GitHub call reads, newest change first. */
54
+ /** The open issues, and the open pull requests, one GitHub call reads, newest change first. */
15
55
  export const REPLIES_LIMIT = 50;
16
56
  /** The authors whose words count: those who can write to the repository. */
17
57
  const MAINTAINERS = new Set(['OWNER', 'MEMBER', 'COLLABORATOR']);
@@ -21,36 +61,22 @@ const AGENT_MARK = '🤖';
21
61
  export const MENTION = /(?<![\w/])\/agent(?![\w/-])/;
22
62
  /** A check's ending that is red. */
23
63
  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
- }
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';
43
66
  const QUERY = `query($owner: String!, $name: String!) {
44
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
+ }
45
71
  pullRequests(states: OPEN, first: ${REPLIES_LIMIT}, orderBy: { field: UPDATED_AT, direction: DESC }) {
46
72
  nodes {
47
- number url mergeable headRefName isCrossRepository
73
+ number title ${WORDS} mergeable headRefName isCrossRepository
48
74
  baseRef { name target { ... on Commit { committedDate } } }
49
- comments(last: 30) { nodes { id author { login } authorAssociation body createdAt url } }
75
+ comments(last: 30) { nodes { ${WORDS} } }
50
76
  reviews(last: 30) {
51
77
  nodes {
52
- id author { login } authorAssociation body state submittedAt url
53
- comments(first: 30) { nodes { id author { login } authorAssociation body path line createdAt url } }
78
+ id author { login } authorAssociation body state submittedAt lastEditedAt url
79
+ comments(first: 30) { nodes { ${WORDS} path line } }
54
80
  }
55
81
  }
56
82
  commits(last: 1) {
@@ -74,75 +100,119 @@ const nodes = (value) => {
74
100
  };
75
101
  const text = (value) => (typeof value === 'string' && value !== '' ? value : undefined);
76
102
  const login = (node) => text(node['author']?.['login']) ?? 'someone';
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
+ };
77
109
  /** A comment's or a review's id, for its 👀. */
78
110
  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. */
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. */
80
112
  function maintainers(node) {
81
113
  const body = text(node['body'])?.trim();
82
114
  if (!body || !MENTION.test(body) || body.includes(AGENT_MARK) || body.includes(COMMENT_MARK) || !MAINTAINERS.has(String(node['authorAssociation'])))
83
115
  return undefined;
84
116
  return body;
85
117
  }
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) {
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) {
92
135
  const repository = output?.['data']?.['repository'];
93
- const requests = [];
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
+ }
94
142
  for (const pr of nodes(repository?.['pullRequests'])) {
95
- if (typeof pr['number'] !== 'number' || typeof pr['url'] !== 'string' || typeof pr['headRefName'] !== 'string' || pr['isCrossRepository'] !== false)
143
+ if (!known(pr) || typeof pr['headRefName'] !== 'string' || typeof pr['isCrossRepository'] !== 'boolean')
96
144
  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
- }
145
+ const calls = threadCalls(pr);
104
146
  for (const review of nodes(pr['reviews'])) {
105
- const at = text(review['submittedAt']);
147
+ const at = writtenAt(review, 'submittedAt');
106
148
  const body = maintainers(review);
107
149
  // A review's comments count one by one, each by its own word.
108
150
  if (at && body)
109
- came.push({ at, line: `@${login(review)} ${review['state'] === 'CHANGES_REQUESTED' ? 'requested changes' : 'reviewed'} (${review['url']}):\n${body}`, ...seen(review) });
151
+ calls.push({ at, line: `@${login(review)} ${review['state'] === 'CHANGES_REQUESTED' ? 'requested changes' : 'reviewed'} (${review['url']}):\n${body}`, ...seen(review) });
110
152
  for (const comment of nodes(review['comments'])) {
111
153
  const words = maintainers(comment);
112
- const when = text(comment['createdAt']);
154
+ const when = writtenAt(comment, 'createdAt');
113
155
  const where = `${comment['path']}${typeof comment['line'] === 'number' ? ` line ${comment['line']}` : ''}`;
114
156
  if (words && when)
115
- came.push({ at: when, line: `@${login(comment)} on ${where} (${comment['url']}):\n${words}`, ...seen(comment) });
157
+ calls.push({ at: when, line: `@${login(comment)} on ${where} (${comment['url']}):\n${words}`, ...seen(comment) });
116
158
  }
117
159
  }
160
+ const broken = [];
118
161
  const commit = nodes(pr['commits'])[0]?.['commit']?.['statusCheckRollup'];
119
162
  for (const check of nodes(commit?.['contexts'])) {
120
163
  const run = check['__typename'] === 'CheckRun';
121
164
  const ending = String(run ? check['conclusion'] : check['state']);
122
165
  const at = text(run ? check['completedAt'] : check['createdAt']);
123
166
  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'}).` });
167
+ broken.push({ at, line: `The check "${run ? check['name'] : check['context']}" failed (${(run ? check['detailsUrl'] : check['targetUrl']) ?? 'no link'}).` });
125
168
  }
126
169
  const base = pr['baseRef'];
127
170
  const moved = text(base?.['target']?.['committedDate']);
128
171
  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 });
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 });
131
175
  }
132
- return requests;
176
+ return threads;
133
177
  }
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] : [])) });
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) });
144
214
  }
145
- return replies;
215
+ return answers;
146
216
  }
147
217
  /**
148
218
  * Whether what `path` answers changed since the answer whose ETag is `etag`, and the ETag now. gh
@@ -177,37 +247,44 @@ async function writeLooked(path, looked) {
177
247
  await mkdir(dirname(path), { recursive: true });
178
248
  await writeFile(path, JSON.stringify(looked));
179
249
  }
180
- /** The gh command line of 👀 on each comment and review of `ids`, by GitHub's ids, in one call. */
250
+ /** The gh command line of 👀 on each thread, comment and review of `ids`, by GitHub's ids, in one call. */
181
251
  export function seenArgs(ids) {
182
252
  const reactions = ids.map((id, i) => `r${i}: addReaction(input: { subjectId: ${JSON.stringify(id)}, content: EYES }) { clientMutationId }`);
183
253
  return ['api', 'graphql', '-f', `query=mutation { ${reactions.join(' ')} }`];
184
254
  }
185
255
  /**
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.
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.
188
259
  */
189
260
  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)
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))
193
265
  return [];
194
266
  const gh = deps.gh ?? nodeGhRunner();
195
267
  const now = (deps.now ?? Date.now)();
196
268
  const cache = deps.cache ?? (await lookedPath(repo));
197
269
  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)
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)
202
279
  return [];
203
280
  const answered = await gh(repliesArgs(), repo);
204
- const replies = repliesFor(watched, parseOpenRequests(JSON.parse(answered)));
281
+ const answers = answersFor(parseThreads(JSON.parse(answered)), cards, host, deps.since);
205
282
  // GitHub keeps one 👀 a person: one put again, at a look that finds the same comment while its
206
283
  // 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);
284
+ const ids = answers.flatMap(a => a.seen);
208
285
  if (ids.length > 0)
209
286
  await gh(seenArgs(ids), repo).catch(() => undefined);
210
287
  await writeLooked(cache, { etags, wholeAt: now });
211
- return replies.map(({ run, text }) => ({ run, text }));
288
+ return answers.map(({ seen: _seen, ...answer }) => answer);
212
289
  }
213
290
  //# sourceMappingURL=replies.js.map
@@ -1 +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,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAgB,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAiB,MAAM,SAAS,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AA2C3C,uHAAuH;AACvH,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAA;AAEzC,6FAA6F;AAC7F,MAAM,OAAO,GAAG;IACd,QAAQ,EAAE,6EAA6E;IACvF,YAAY,EAAE,4EAA4E;CAClF,CAAA;AAQV,yEAAyE;AACzE,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAA;AAE/B,4EAA4E;AAC5E,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAA;AAEhE,2CAA2C;AAC3C,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,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",
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": {