opencode-forgekeeper 5.1.1 → 6.0.0

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/README.md CHANGED
@@ -32,19 +32,19 @@ For self-managed hosts, configure `hosts` for GitLab hosts not named `gitlab.*`,
32
32
 
33
33
  Ask the agent to work on an issue or PR/MR. Forgekeeper provides `set_session_target` and
34
34
  instructions for the agent to keep the session's target up to date, including after creating
35
- a PR/MR. Targets persist across reloads and need not match the checked-out branch.
35
+ a PR/MR. Targets persist across reloads and need not match the checked-out branch. A new
36
+ session for a general question has no target, title prefix, or PR/MR status.
36
37
 
37
38
  For example, a session working on issue `#12` and MR `!45` gets a title prefix such as
38
39
  `[#12, !45]`. Several targets produce `[!101, !102]`, or `[!101, !102, !103, +3]` for a larger set.
39
40
  Your own title text is preserved.
40
41
 
41
42
  Run `/forge-detach` to clear all explicit targets without a model call. To remove only specific
42
- targets, pass their full URLs separated by spaces. After you remove the last target,
43
- Forgekeeper follows the checked-out branch and its open PR/MR again. Default branches
44
- get no branch-based prefix. Child sessions aren't renamed.
43
+ targets, pass their full URLs separated by spaces. Removing the last target clears the
44
+ Forgekeeper title prefix and PR/MR status. The agent can also clear all targets with
45
+ `set_session_target({ target: "none" })`. Child sessions aren't renamed.
45
46
 
46
- See the reference for [target rules](https://github.com/pedropombeiro/opencode-plugins/blob/main/packages/forgekeeper/docs/reference.md#session-targets) and
47
- [branch-based naming](https://github.com/pedropombeiro/opencode-plugins/blob/main/packages/forgekeeper/docs/reference.md#branch-based-naming).
47
+ See the reference for [target rules](https://github.com/pedropombeiro/opencode-plugins/blob/main/packages/forgekeeper/docs/reference.md#session-targets).
48
48
 
49
49
  ## PR/MR status
50
50
 
@@ -88,14 +88,14 @@ The report stays out of the session's history.
88
88
 
89
89
  Status normally refreshes every 2 minutes, or every 30 seconds during automated reviews and
90
90
  while new review feedback settles.
91
- Explicit PR/MR targets take precedence over title references and branch discovery. Issue
92
- targets have no PR/MR status.
91
+ Status shows only PR/MRs set as session targets. Forgekeeper does not infer targets from
92
+ the session title or the checked-out branch. Issue targets have no PR/MR status.
93
93
 
94
94
  ## Reviews and updates
95
95
 
96
- Forgekeeper watches explicit PR/MR targets for human and automated review feedback, conflicts,
97
- failed jobs, and merges. Recent top-level sessions can receive updates even if their tabs
98
- aren't open. Branch-derived PRs/MRs get status but no review notifications.
96
+ Forgekeeper watches explicit PR/MR targets for human and automated review feedback, reviewer
97
+ approvals, conflicts, failed jobs, requested changes, and merges. Recent top-level sessions can
98
+ receive updates even if their tabs aren't open.
99
99
 
100
100
  New checkouts show status without collecting inbox updates. Open `/forge-feedback` and choose
101
101
  **Enable feedback inbox** (Ctrl+S in the terminal) to start monitoring this checkout. Set
@@ -143,12 +143,15 @@ Forgekeeper reports failed jobs but never retries or fixes them. For tracked sta
143
143
  also propose retargeting dependents after a parent merges, but never retargets or rebases itself.
144
144
 
145
145
  Optionally, `automation.rules` lets exact reviewers on exact projects, such as GitLab Duo, start
146
- a coding turn that prepares fixes for their feedback. It runs only on PRs/MRs you wrote, or that
147
- an account in the rule's `authors` wrote, in the one session that targets them, with the
148
- checkout on the source branch. A rule can require models
149
- you trust with code changes. The turn uses the session's instructions and permissions, and
150
- leaves changes uncommitted. In `/forge-feedback`, **Act on feedback** (Ctrl+A) starts the same
151
- turn on request, and **Retry feedback work** (Ctrl+T) retries one after you inspect it.
146
+ a coding turn that prepares fixes for their feedback, or a restricted owning-session follow-up turn
147
+ when a watched non-human reviewer explicitly approves (providing only target-bound status reads and
148
+ marking that verified draft PR/MR ready, with all general tools disabled). Human reviewer approvals
149
+ are informational only and never start a turn with tools. Review preparation runs only on PRs/MRs
150
+ you wrote, or that an account in the rule's `authors` wrote, in the one session that targets them,
151
+ with the checkout on the source branch. A rule can require models you trust with code changes. The
152
+ turn uses the session's instructions and permissions, and leaves changes uncommitted. In
153
+ `/forge-feedback`, **Act on feedback** (Ctrl+A) starts the same turn on request, and **Retry
154
+ feedback work** (Ctrl+T) retries one after you inspect it.
152
155
 
153
156
  A `job-failed` rule investigates failed jobs on exact projects instead. Once a pipeline's
154
157
  failures go quiet for four minutes, or the pipeline finishes, one turn reads the failed jobs'
@@ -176,24 +179,25 @@ See [review detection and summaries](https://github.com/pedropombeiro/opencode-p
176
179
  Set options in the object form of the plugin entry in `opencode.json`, as in the example above.
177
180
  Only specify values you want to change. The terminal part has no separate options.
178
181
 
179
- | Option | Default | Purpose |
180
- | --------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
181
- | `status` | `true` | Set to `false` to keep only session targets and titles, without polling or notifications. |
182
- | `hosts` | `["gitlab.com"]` | Additional recognized GitLab hosts, besides hosts named `gitlab.*`. |
183
- | `githubHosts` | `["github.com"]` | Recognized GitHub hosts, including Enterprise. |
184
- | `pollSeconds` | `120` | Normal status polling interval. |
185
- | `watch.humanReviews` | `true` | Monitor human review feedback. |
186
- | `watch.automatedReviews` | `true` | Monitor GitLab Duo and GitHub Copilot review feedback. |
187
- | `watch.reviewBots` | `true` | Monitor configured review-bot accounts. |
188
- | `watch.lifecycle` | `true` | Monitor conflicts, failed jobs, and merges. |
189
- | `watch.reviewRequests` | `true` | Monitor requests for your review on GitLab MRs, including repeated ones. |
190
- | `reviewBots` | GitLab.com security reviewers | Exact bot usernames by host. Your list replaces the defaults. |
191
- | `inbox` | `false` | Enable inbox monitoring for checkouts without a saved monitoring preference. Automation rules also enable it. |
192
- | `delivery.reviews` | `"inbox"` | Review delivery: `inbox`, `passive`, or `summary`. |
193
- | `delivery.lifecycle` | `"inbox"` | Conflict, job-failure, and merge delivery. |
194
- | `lifecycleExecution.parentMerged` | `{ "mode": "notify" }` | Optionally prepare retarget proposals for tracked dependents. |
195
- | `automation.rules` | No rules | Reviewers whose feedback starts a coding turn that prepares fixes, or projects whose failed jobs start an investigation, optionally limited to allowed models. Set `"execution": "environment"` to permit the configured environment provider when the owning checkout doesn't match. |
196
- | `automation.modelGroups` | No groups | Named lists of `provider/model` IDs that rules reference in `allowedModelGroup`. |
182
+ | Option | Default | Purpose |
183
+ | --------------------------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
184
+ | `status` | `true` | Set to `false` to keep only session targets and titles, without polling or notifications. |
185
+ | `hosts` | `["gitlab.com"]` | Additional recognized GitLab hosts, besides hosts named `gitlab.*`. |
186
+ | `githubHosts` | `["github.com"]` | Recognized GitHub hosts, including Enterprise. |
187
+ | `pollSeconds` | `120` | Normal status polling interval. |
188
+ | `watch.humanReviews` | `true` | Monitor human review feedback. |
189
+ | `watch.automatedReviews` | `true` | Monitor GitLab Duo and GitHub Copilot review feedback. |
190
+ | `watch.reviewBots` | `true` | Monitor configured review-bot accounts. |
191
+ | `watch.lifecycle` | `true` | Monitor conflicts, failed jobs, requested changes, and merges. |
192
+ | `watch.issues` | `true` | Monitor related issues: outdated GitLab issue fields and open issues left behind after all tracked GitLab MRs or GitHub PRs merge. Needs `watch.lifecycle`. |
193
+ | `watch.reviewRequests` | `true` | Monitor requests for your review on GitLab MRs, including repeated ones. |
194
+ | `reviewBots` | GitLab.com security reviewers | Exact bot usernames by host. Your list replaces the defaults. |
195
+ | `inbox` | `false` | Enable inbox monitoring for checkouts without a saved monitoring preference. Automation rules also enable it. |
196
+ | `delivery.reviews` | `"inbox"` | Review delivery: `inbox`, `passive`, or `summary`. |
197
+ | `delivery.lifecycle` | `"inbox"` | Conflict, job-failure, and merge delivery. |
198
+ | `lifecycleExecution.parentMerged` | `{ "mode": "notify" }` | Optionally prepare retarget proposals for tracked dependents. |
199
+ | `automation.rules` | No rules | Reviewers whose feedback starts a coding turn that prepares fixes (when the checkout matches or an environment is enabled), and whose explicit non-human approvals start a restricted owning-session follow-up (even on another branch) with `forgekeeper_approval_status` and `forgekeeper_mark_ready` — for example, to honor a session instruction such as "mark this draft MR ready once Duo approves and CI is green" — or projects whose failed jobs start an investigation, optionally limited to allowed models. Set `"execution": "environment"` to permit the configured environment provider when the owning checkout doesn't match. |
200
+ | `automation.modelGroups` | No groups | Named lists of `provider/model` IDs that rules reference in `allowedModelGroup`. |
197
201
 
198
202
  See the [configuration reference](https://github.com/pedropombeiro/opencode-plugins/blob/main/packages/forgekeeper/docs/reference.md#options) for validation behavior and
199
203
  [review-bot configuration](https://github.com/pedropombeiro/opencode-plugins/blob/main/packages/forgekeeper/docs/reference.md#review-notifications) for account matching.
@@ -203,10 +207,14 @@ See the [configuration reference](https://github.com/pedropombeiro/opencode-plug
203
207
  Monitoring reads forge data through your authenticated CLI. It doesn't modify the forge,
204
208
  edit files, commit, push, reply to comments, or resolve discussions. Only an
205
209
  [automation rule](https://github.com/pedropombeiro/opencode-plugins/blob/main/packages/forgekeeper/docs/reference.md#prepare-fixes-from-review-feedback)
206
- or **Act on feedback** starts a coding turn that edits files, with the session's permissions.
207
- That turn sends reviewer text to the model as untrusted data, keeps it in the session's
208
- history, and leaves changes uncommitted. A failed-job investigation sends job names and
209
- links the same way, and the agent reads job logs with the session's tools.
210
+ or **Act on feedback** starts a turn with tools, with the session's permissions: review feedback
211
+ starts a coding turn that leaves changes uncommitted, and an explicit non-human approval starts a
212
+ restricted owning-session turn exposing only `forgekeeper_approval_status` and
213
+ `forgekeeper_mark_ready` (subject to OpenCode permission rules for the bound PR/MR URL, so denying
214
+ `forgekeeper_mark_ready` keeps comment preparation while blocking draft-ready writes). Review
215
+ preparation sends reviewer text to the model as untrusted data and keeps it in the session's
216
+ history. A failed-job investigation sends job names and links the same way, and the agent reads
217
+ job logs with the session's tools.
210
218
 
211
219
  Optional review summaries send review text to the session's model, isolated from conversation
212
220
  history and ordinary tools. On GitLab, a restricted tool can read notes directly linked by