opencode-forgekeeper 2.1.1 → 2.2.1

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.
Files changed (4) hide show
  1. package/README.md +34 -14
  2. package/dist/index.js +376 -44
  3. package/dist/tui.js +429 -200
  4. package/package.json +1 -1
package/README.md CHANGED
@@ -168,8 +168,8 @@ With several PR/MR targets, the footer shows counts instead of one PR/MR's statu
168
168
  status dialog, which lists each PR/MR.
169
169
 
170
170
  The footer shows checks or the pipeline, unresolved threads, conflicts, approval, and a
171
- running GitLab Duo review. GitHub also shows a requested change. Unknown mergeability stays
172
- unknown rather than appearing conflict-free.
171
+ running automated review, from GitLab Duo or GitHub Copilot. GitHub also shows a requested
172
+ change. Unknown mergeability stays unknown rather than appearing conflict-free.
173
173
 
174
174
  The footer shows `approved` only when GitLab reports that approval requirements are met,
175
175
  at least one person approved, and every human reviewer approved. Bot approvals, such as
@@ -232,16 +232,23 @@ Before it sends a notification, the server checks that the PR/MR is still one of
232
232
  session's targets. A lookup that started before the targets changed is discarded, so a
233
233
  removed target never triggers a notification.
234
234
 
235
- | Notification | GitLab | GitHub |
236
- | ------------------------------------------ | ----------- | ------------- |
237
- | An automated review finished with feedback | GitLab Duo | Not supported |
238
- | New human review feedback | MR comments | Not supported |
239
-
240
- - **Automated reviews**: Duo's final state of `REVIEWED` or `REQUESTED_CHANGES` asks the
241
- agent to read its comments. Other final states, such as `APPROVED`, send nothing. The
242
- server notifies only when it sees a review go from running to finished, so a review that
243
- finished before the server first saw it running isn't announced. Reviews that finish in
244
- the same poll share one message.
235
+ | Notification | GitLab | GitHub |
236
+ | ------------------------------------------ | ----------- | -------------- |
237
+ | An automated review finished with feedback | GitLab Duo | GitHub Copilot |
238
+ | New human review feedback | MR comments | PR comments |
239
+
240
+ - **Automated reviews**: for GitLab, Duo's final state of `REVIEWED` or `REQUESTED_CHANGES`
241
+ asks the agent to read its comments. Other final states, such as `APPROVED`, send nothing.
242
+ The server notifies when it sees a review go from running to finished, so a Duo review
243
+ that finished before the server first saw it running isn't announced. Reviews that finish
244
+ in the same poll share one message.
245
+ - **Copilot reviews**: the server notifies when a submitted, undismissed review has at least
246
+ one inline comment. A review without inline comments, such as one that
247
+ found nothing or couldn't run for lack of quota, sends nothing. Copilot reviews are
248
+ identified, so a review that started and finished between two polls is announced too. A
249
+ review that the server finds on a PR's first look isn't announced. Observed and delivered
250
+ review IDs persist across restarts. A completed review can be announced while another
251
+ review is requested.
245
252
  - **Human reviews**: new comments and replies from people other than you and bots are
246
253
  announced once none of their unresolved comments has changed for 5 minutes. Expect one
247
254
  message 5 to 7 minutes after the review goes quiet. Resolved threads are skipped.
@@ -261,6 +268,17 @@ records. A failed storage write shows an error toast once.
261
268
  On GitLab, the server reads the newest 2,000 comments. On busier MRs, edits to older
262
269
  comments don't count as activity.
263
270
 
271
+ On GitHub, the server reads three lists: conversation comments, the text of submitted
272
+ reviews, and the inline comments of review threads. It keeps the newest 2,000 of each.
273
+ It scans every thread to include recent replies in old threads, within a limit of 200 API
274
+ requests per fetch. If it cannot complete that scan, it defers notifications until a complete
275
+ fetch succeeds. Review text counts when it isn't empty, whether the
276
+ review approves, requests changes, or only comments. Comments from GitHub Apps, such as
277
+ Copilot, count as bots. Hidden comments and unsubmitted review comments are skipped.
278
+ The baseline also records comment IDs at its timestamp, so a new comment posted in the same
279
+ second can still be announced. Baselines stored by older plugin versions retain their
280
+ timestamp-only behavior until a new baseline is created.
281
+
264
282
  ## Options
265
283
 
266
284
  Set options with the object form of the `plugins` entry in `opencode.json`:
@@ -368,6 +386,8 @@ notifications resume the session. Set `reviewStatus` to `false` to keep only tit
368
386
  `src/tui.tsx` connects it to the RPC and renders the footer, dialog, commands, and notices.
369
387
  - `src/forge.ts` defines the forge-neutral types, the `Forge` adapter interface, and
370
388
  `ForgeTraits` with its optional `automatedReview` and `feedback` capabilities.
389
+ - `src/gitlab-feedback.ts` and `src/github-feedback.ts` read each forge's comments for its
390
+ `feedback` capability.
371
391
  - `src/gitlab.ts` and `src/github.ts` provide each forge's adapter and traits. Adapters own
372
392
  API calls, pagination, error classification, and status normalization. Traits cover
373
393
  everything else: hosts, URL parsing, reference syntax, vocabulary, and forge-specific
@@ -378,8 +398,8 @@ notifications resume the session. Set `reviewStatus` to `false` to keep only tit
378
398
  - `src/locate.ts` picks each key's PRs/MRs. `src/store.ts` caches lookups, polls, backs off
379
399
  after failures, and discards lookups that started before a change. `src/format.ts`
380
400
  renders the footer and dialog.
381
- - `src/automated-review-watch.ts`, `src/human-review-watch.ts`, and
382
- `src/gitlab-feedback.ts` decide when to notify the agent.
401
+ - `src/automated-review-watch.ts` and `src/human-review-watch.ts` decide when to notify the
402
+ agent.
383
403
 
384
404
  Shared code never compares a forge against a specific name. It asks the forge's traits, or
385
405
  checks for a capability, instead. To add a forge, add its kind to `ForgeKind` and