@sjawhar/opencode-legion-envoy 1.4.1 → 1.4.2

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.
@@ -13552,6 +13552,9 @@ function date4(params) {
13552
13552
  // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
13553
13553
  config(en_default());
13554
13554
  // ../contracts/src/dispatch-api.ts
13555
+ function searchOwnerOf(result) {
13556
+ return result.owner ?? { kind: "issue", key: result.issue.key };
13557
+ }
13555
13558
  var DispatchEventSchema = object({
13556
13559
  issue_key: string2().nullable(),
13557
13560
  artifact_id: string2().nullish(),
@@ -14898,9 +14901,14 @@ function duplicateCandidates(error) {
14898
14901
  return error.candidates;
14899
14902
  }
14900
14903
  function searchResultLine(result, baseUrl) {
14904
+ const href = new URL(result.href, baseUrl).toString();
14905
+ const owner = searchOwnerOf(result);
14906
+ if (owner.kind === "document") {
14907
+ const reference = `dispatch://${owner.project}/artifact/${owner.slug}`;
14908
+ return `${reference} [document] ${owner.name} - ${result.kind}: ${snippetText(result.snippet)} -> ${href}`;
14909
+ }
14901
14910
  const artifactName = result.artifact ? ` ${result.artifact.name}` : "";
14902
14911
  const label = `${result.issue.key} [${result.issue.status}] ${result.issue.title} - ${result.kind}${artifactName}`;
14903
- const href = new URL(result.href, baseUrl).toString();
14904
14912
  return `${label}: ${snippetText(result.snippet)} -> ${href}`;
14905
14913
  }
14906
14914
  function askUrgency(args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/opencode-legion-envoy",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "type": "module",
5
5
  "main": "dist/src/server.js",
6
6
  "exports": {
@@ -78,9 +78,11 @@ Before you create an issue or start a design document, search:
78
78
  ```ts
79
79
  dispatch_search({ query, project?, limit? })
80
80
  ```
81
- It returns every issue, document, comment, ask, and message that contains the words, with the issue key and a link. Cite the hit you
82
- build on (`dispatch://KEY` or the document reference), or state "no prior issue" in the spec. Websearch syntax applies: `"merge queue"`,
83
- `-daemon`, `OR`.
81
+ It returns every issue, document, comment, ask, and message that contains the words. Issue-owned hit lines
82
+ start with the issue key; standalone project-document hit lines start with
83
+ `dispatch://PROJECT/artifact/<slug>`, followed by the absolute link. Cite the hit you build on
84
+ (`dispatch://KEY` or the document reference), or state "no prior issue" in the spec. Websearch syntax applies:
85
+ `"merge queue"`, `-daemon`, `OR`.
84
86
 
85
87
  `dispatch_issue` refuses a title that near-duplicates an issue in the same project and returns the candidates (`POSSIBLE_DUPLICATE`).
86
88
  Read them; reference the existing issue, or repeat the call with `force: true` when it is genuinely new work.