@sjawhar/opencode-legion-envoy 1.35.0 → 1.36.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
@@ -28,11 +28,12 @@ This package exposes:
28
28
  - `dispatch_artifact`
29
29
  - `dispatch_read`
30
30
  - `dispatch_search`
31
+ - `dispatch_issues`
31
32
  - `dispatch_open_asks`
32
33
  - `dispatch_whoami`
33
34
 
34
- The eighteen native `dispatch_*` tools create and read Dispatch issues, asks, comments,
35
- documents, and artifacts, or search all of them. They are present when `dispatch.enabled`
35
+ The nineteen native `dispatch_*` tools create and read Dispatch issues, asks, comments,
36
+ documents, and artifacts, list a project's issues, or search all of them. They are present when `dispatch.enabled`
36
37
  resolves a server URL and bearer token from envoy.json (`~/.config/opencode/envoy.json`, merged
37
38
  with `<repo>/.opencode/envoy.json`) or the `DISPATCH_URL` and `DISPATCH_TOKEN` environment
38
39
  variables; `dispatch.enabled: true` without `dispatch.serverUrl` targets `http://localhost:8766`.
@@ -14024,10 +14024,24 @@ var dispatchToolSpecs = [
14024
14024
  limit: z.number({ int: true, min: 1, max: 50 }).describe("Maximum results, 1-50; default 20.").optional()
14025
14025
  })
14026
14026
  },
14027
+ {
14028
+ name: "dispatch_issues",
14029
+ description: "List a project's issues for a roadmap or backlog pass: every issue in one project, each carrying " + "its status, priority, parent, labels, and open-ask count, so you can see backlog shape without " + "opening every issue. Optionally filter by status, parent, label, or how recently it changed. Do " + "not use it to search by keyword or phrase; dispatch_search remains the keyword surface. Rows are " + "capped at limit (default 50, max 250), applied to the response here, not by the server.",
14030
+ arguments: (z) => ({
14031
+ project: z.string().describe("Project key to list issues from."),
14032
+ status: z.enum(ISSUE_STATUSES).describe("Optional lifecycle status filter.").optional(),
14033
+ parent: z.string().describe("Optional parent issue key filter.").optional(),
14034
+ label: z.string().describe("Optional label filter.").optional(),
14035
+ updated_since: z.string().describe("Optional RFC3339 timestamp; only issues updated at or after it.").optional(),
14036
+ limit: z.number({ int: true, min: 1, max: 250 }).describe("Maximum rows, 1-250; default 50.").optional()
14037
+ })
14038
+ },
14027
14039
  {
14028
14040
  name: "dispatch_open_asks",
14029
- description: "List this session's active unanswered asks across issues and project documents, including age and whose reply is needed. Call before saying you are waiting for human input.",
14030
- arguments: () => ({}),
14041
+ description: "List active unanswered asks, oldest first, with age and whose reply is needed. Omit project to " + "see only this session's own authored asks (call before saying you are waiting for human input); " + "supply project to see every open ask across that project's issues and documents, whoever authored " + "them.",
14042
+ arguments: (z) => ({
14043
+ project: z.string().describe("Project key; when supplied, lists every open ask in the project instead of only this session's own.").optional()
14044
+ }),
14031
14045
  strict: true
14032
14046
  },
14033
14047
  {
@@ -14856,6 +14870,9 @@ class DispatchClient {
14856
14870
  ...since === undefined ? {} : { since }
14857
14871
  });
14858
14872
  }
14873
+ async openAsksForProject(project) {
14874
+ return this.#json("GET", ["api", "v1", "asks", "open"], undefined, { project });
14875
+ }
14859
14876
  async whoami() {
14860
14877
  return this.#json("GET", ["api", "v1", "whoami"]);
14861
14878
  }
@@ -15272,6 +15289,7 @@ var issueFreeTools = {
15272
15289
  dispatch_resolve_comment: true,
15273
15290
  dispatch_follow: true,
15274
15291
  dispatch_search: true,
15292
+ dispatch_issues: true,
15275
15293
  dispatch_open_asks: true,
15276
15294
  dispatch_whoami: true
15277
15295
  };
@@ -15933,10 +15951,15 @@ async function executeDispatchTool(input) {
15933
15951
  if (problems.length > 0)
15934
15952
  throw new ToolInputError(input.tool, problems);
15935
15953
  if (input.tool === "dispatch_open_asks") {
15954
+ const client = new DispatchClient(configUrl, configToken, fetchImpl, input.signal);
15955
+ const project = optionalString(ownerArguments.args, "project");
15956
+ if (project !== undefined) {
15957
+ const response = await client.openAsksForProject(project);
15958
+ return { text: formatOpenAsksSummary(response, configUrl), details: { ...response } };
15959
+ }
15936
15960
  const sessionId = input.sessionId?.trim();
15937
15961
  if (!sessionId)
15938
15962
  throw new Error("host session id is required for dispatch_open_asks");
15939
- const client = new DispatchClient(configUrl, configToken, fetchImpl, input.signal);
15940
15963
  const response = await client.openAsks(sessionId);
15941
15964
  return { text: formatOpenAsksSummary(response, configUrl), details: { ...response } };
15942
15965
  }
@@ -16083,6 +16106,39 @@ async function executeDispatchTool(input) {
16083
16106
  details: { query, results }
16084
16107
  };
16085
16108
  }
16109
+ case "dispatch_issues": {
16110
+ const project = stringArg(args, "project");
16111
+ const status = optionalString(args, "status");
16112
+ const parent = optionalString(args, "parent");
16113
+ const label = optionalString(args, "label");
16114
+ const updatedSince = optionalString(args, "updated_since");
16115
+ const limit = Math.min(Math.max(optionalNumber(args, "limit") ?? 50, 1), 250);
16116
+ const issues = await client.listIssues({
16117
+ project,
16118
+ ...status === undefined ? {} : { status },
16119
+ ...parent === undefined ? {} : { parent },
16120
+ ...label === undefined ? {} : { label },
16121
+ ...updatedSince === undefined ? {} : { updated_since: updatedSince }
16122
+ });
16123
+ const rows = issues.slice(0, limit).map((row) => ({
16124
+ key: row.key,
16125
+ title: row.title,
16126
+ status: row.status,
16127
+ priority: row.priority,
16128
+ parent: row.parent,
16129
+ labels: row.labels ?? [],
16130
+ open_asks: row.open_asks,
16131
+ updated_at: row.updated_at
16132
+ }));
16133
+ return {
16134
+ text: rows.length === 0 ? `No issues in ${project}.` : [
16135
+ `${rows.length} ${rows.length === 1 ? "issue" : "issues"} in ${project}` + (issues.length > rows.length ? ` (showing ${rows.length} of ${issues.length})` : ""),
16136
+ ...rows.map((row) => `${row.key} [${row.status}]${row.priority === null ? "" : ` P${row.priority}`} ${row.title}` + (row.open_asks === 0 ? "" : ` \xB7 ${row.open_asks} open ${row.open_asks === 1 ? "ask" : "asks"}`))
16137
+ ].join(`
16138
+ `),
16139
+ details: { issues: rows }
16140
+ };
16141
+ }
16086
16142
  case "dispatch_resolve_ask": {
16087
16143
  const kind = stringArg(args, "kind");
16088
16144
  const ask = await client.resolveAsk(stringArg(args, "ask"), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/opencode-legion-envoy",
3
- "version": "1.35.0",
3
+ "version": "1.36.0",
4
4
  "type": "module",
5
5
  "main": "dist/src/server.js",
6
6
  "exports": {
@@ -148,6 +148,20 @@ start with the issue key; standalone project-document hit lines start with
148
148
  `dispatch_issue` refuses a title that near-duplicates an issue in the same project and returns the candidates (`POSSIBLE_DUPLICATE`).
149
149
  Read them; reference the existing issue, or repeat the call with `force: true` when it is genuinely new work.
150
150
 
151
+ ## Reading a project's backlog
152
+
153
+ To see the shape of a project rather than find a phrase, list its issues:
154
+ ```ts
155
+ dispatch_issues({ project, status?, parent?, label?, updated_since?, limit? })
156
+ ```
157
+ Each row carries the issue key, title, status, priority, parent, labels, its open-ask count, and
158
+ when it last changed — a roadmap or backlog pass without opening every issue. Filter with `status`
159
+ (a lifecycle status), `parent` (one issue's children), `label`, or `updated_since` (an RFC3339
160
+ timestamp, for "what moved this week"). `limit` caps the rows at 50 by default and 250 at most.
161
+
162
+ This is not search: it matches no text. Use `dispatch_search` for a keyword or phrase, and
163
+ `dispatch_issues` when you want every issue in a project and its current state.
164
+
151
165
  ## Asking
152
166
 
153
167
  ### Before you ask
@@ -171,8 +185,8 @@ production import). Every `dispatch_ask` passes three gates first:
171
185
  would have to define. This is the phone test in [Writing for the human](#writing-for-the-human).
172
186
  If you cannot write it that way, you do not understand it well enough to ask.
173
187
 
174
- The platform PO audits open asks. One that fails a gate is retracted, with the PO's answer as the
175
- record.
188
+ The platform PO audits open asks. One that fails a gate — or that points at another message in
189
+ prose instead of carrying its content (below) — is retracted, with the PO's answer as the record.
176
190
 
177
191
  Open a decision with:
178
192
  ```ts
@@ -209,11 +223,32 @@ passage with `anchor`. Follow up on an ask or comment with `dispatch_comment`; c
209
223
  with a `dispatch://` reference (see [References](#references)). Never write "see above", "the
210
224
  message above", or "as attached".
211
225
 
226
+ **Pointing at another message is a defect, not a shortcut.** Sami, 2026-09-17, verbatim, on an
227
+ ask that read "the settings listed in my comment just above" after a long procedure had been posted
228
+ as a comment: "you just dump information into messages and then add a new ask that references a
229
+ previous message in prose with no link or no context whatsoever and uses compressed shorthand
230
+ jargon." The ask view does not show the issue's comments, so that ask was unanswerable; "Cloud
231
+ Identity licence check / 2SV override / 1-day grace" was shorthand he had never used. The rules
232
+ that follow from it:
233
+
234
+ - An ask that names another message in prose — "my comment above", "the procedure I posted",
235
+ "see the earlier message" — is retracted by the PO as failing the gates. Put the content IN the
236
+ ask. If it does not fit the 800-character budget, the step is too big: split the step, never
237
+ point elsewhere. The only pointers an ask may carry are a `dispatch://` reference or a document
238
+ `anchor`, and they cite — the ask still says in one line what the reader will find there and can
239
+ be answered without following them.
240
+ - Expand every term the reader has not used first. A product name, an internal setting, an
241
+ acronym, a value you coined this session — write what it is in the ask, in his words.
242
+ - A runbook the human must execute is one ask per step, each self-contained: what to do, where,
243
+ what result proves it, `Done` / `Can't` options. Each later step opens only after the previous is
244
+ answered and states that step's verified result in one line ("Step 1 done: the licence shows
245
+ Cloud Identity Free on the admin console.") — never a pointer to the earlier ask.
246
+
212
247
  **A decision about an uploaded artifact links it.** If the human must read an artifact to answer,
213
248
  the question carries `dispatch://KEY/artifact/<slug>` (or `ref`), never just its filename. Text
214
249
  they must read to decide belongs in the spec in the first place — see [Artifacts](#artifacts).
215
250
 
216
- Before saying you are waiting for human input, call `dispatch_open_asks`. It lists this session's active asks across open issues and project documents, including whether the human or agent owes the next reply.
251
+ Before saying you are waiting for human input, call `dispatch_open_asks`. With no arguments it lists this session's active asks across open issues and project documents, including whether the human or agent owes the next reply. With `dispatch_open_asks({ project })` it lists every open ask in that project — on its issues and on its documents, whoever authored them — which is how you audit what a whole project is waiting on rather than just your own asks.
217
252
 
218
253
  **Anything that needs the human is an ask, or it does not exist.** An approval, a credential,
219
254
  a setting only they can change, a review click, a conflict between two of their own rules - if