@sjawhar/opencode-legion-envoy 1.52.0 → 1.53.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/opencode-legion-envoy",
3
- "version": "1.52.0",
3
+ "version": "1.53.1",
4
4
  "type": "module",
5
5
  "main": "dist/src/server.js",
6
6
  "exports": {
@@ -158,6 +158,47 @@ dispatch_issue({ project, title, parent?, external?, spec?, force?, labels?: str
158
158
  `details` `{ issue }`; creating an issue does not subscribe you to it (see [Following](#following)). Use `dispatch_issue` only to create an issue; never use it to park a question. When `spec` is supplied,
159
159
  follow [Writing a spec](#writing-a-spec).
160
160
 
161
+ ## Claim the issue before you work it
162
+
163
+ Two sessions once spent a night implementing the same issue, because nothing on it said who was
164
+ on it (Sami, 2026-09-24, verbatim: "It seems like we need a better way of tracking what's already
165
+ in progress"). So before you start implementing an issue, claim it:
166
+
167
+ ```ts
168
+ dispatch_claim({ issue: "LEGION-234" }) // I am implementing this
169
+ dispatch_claim({ issue: "LEGION-234", release: true }) // I have stopped; it is free
170
+ ```
171
+
172
+ A claim records **your** session — the one making the call, never another — and shows on every
173
+ read of the issue: the dashboard header, the issue list and board, `dispatch_read` (a
174
+ `Claimed by:` line) and `dispatch_issues` (a claim on the row). `dispatch_issues` plus the
175
+ dashboard's **Unclaimed** filter is how you find work nobody is on.
176
+
177
+ - **`409 ISSUE_CLAIMED` means someone else holds this issue.** When it is another session, the
178
+ refusal names it and says it is still running: do not work the issue in parallel — message
179
+ that session (its id is in the message; `envoy_send` reaches it) or pick up something else,
180
+ and tell the human if you believe the work should be yours. When a **human** holds it, the
181
+ refusal names the person and says nothing about a session running, because there is none to
182
+ message: ask them on the issue (`dispatch_message`) instead, and never assume their claim has
183
+ lapsed — only a human releases or forces a human's claim.
184
+ - **`409 CLAIM_CONTENDED` means the issue changed hands twice while your call ran**, so nothing
185
+ was applied and nobody's liveness was checked. Read the issue and decide again; it is not a
186
+ refusal by a live holder.
187
+ - **A claim whose session has ended is yours to take.** If the Envoy listener no longer lists
188
+ the holder, your claim simply succeeds; the takeover is recorded on the issue and the session
189
+ that lost it is told.
190
+ - **Release it when you stop** — finished, handing over, or moving to something else. A claim is
191
+ released by its holder or any human — and by any agent once the holder's session is no longer
192
+ running, the same rule that lets you take it. Closing the issue releases it for you.
193
+ - A claim is intent to implement, not contact: reading the issue, commenting, asking, or gating
194
+ its pull request claims nothing, so a coordinator never collides with an implementer.
195
+
196
+ **Claiming and moving the status are two separate actions, and you do both.** A claim says which
197
+ session is on the work; the status says where the work has got to, and humans use it to track
198
+ that too (Sami, 2026-09-24, verbatim: "Keep them separate — Separate because humans might be
199
+ using them to keep track of work"). So when you start: `dispatch_claim({ issue })` **and**
200
+ `dispatch_issue_update({ issue, status: "in_progress" })`.
201
+
161
202
  ## Issue status is yours to move
162
203
 
163
204
  The issue's status is how a human sees delivery without asking a session. Outside Legion (where