@sjawhar/opencode-legion-envoy 9.5.3 → 9.6.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/dist/dispatch.js CHANGED
@@ -14719,7 +14719,7 @@ var dispatchToolSpecs = [
14719
14719
  {
14720
14720
  name: "dispatch_search",
14721
14721
  example: { query: "astrolabe" },
14722
- description: "Search every issue, document, comment, ask, and message for a keyword or phrase and get deep links. " + "Use it before creating an issue or a design document, and to find where a word was written. " + 'Websearch syntax: "quoted phrase", -excluded, OR. ' + "Each kind of content is ranked on its own and the lists are merged, so the top holds the best " + "issue, document, ask, comment and message; an issue key searched alone lists that issue first. " + `The answer names how many results match; offset pages through them, and each kind lists at most its best ${SEARCH_KIND_DEPTH}, ` + "so narrow the query or name a project to reach the rest. Paging is exact only while the " + "corpus holds still: content added, changed, or removed between two offsets can shift rows " + "across a page boundary, so one hit can come back twice and another never.",
14722
+ description: "Search every issue, document, comment, ask, and message for a keyword or phrase and get deep links. " + "Use it before creating an issue or a design document, and to find where a word was written. " + 'Websearch syntax: "quoted phrase", -excluded, OR. ' + "Each kind of content is ranked on its own and the lists are merged, so the top holds the best " + "issue, document, ask, comment and message; an issue key searched alone lists that issue first. " + "An ask hit says whether it is answered: an answered one shows the latest answer, who gave it, " + "when, the options chosen and its text; a closed one says it was closed with no answer, or " + "shows the last answer it had. " + `The answer names how many results match; offset pages through them, and each kind lists at most its best ${SEARCH_KIND_DEPTH}, ` + "so narrow the query or name a project to reach the rest. Paging is exact only while the " + "corpus holds still: content added, changed, or removed between two offsets can shift rows " + "across a page boundary, so one hit can come back twice and another never.",
14723
14723
  arguments: (z) => ({
14724
14724
  query: z.string({
14725
14725
  min: 2,
@@ -15365,6 +15365,15 @@ function commandsHelp() {
15365
15365
  // ../envoy-client/src/dispatch-execute.ts
15366
15366
  import { resolve as resolvePath2 } from "path";
15367
15367
 
15368
+ // ../envoy-client/src/actor-text.ts
15369
+ function actorText(actor) {
15370
+ const service = actor.kind === "session" ? actor.service : undefined;
15371
+ if (service === undefined) {
15372
+ return `${actor.kind} ${actor.id}`;
15373
+ }
15374
+ return `${actor.kind} ${actor.id} (as ${serviceSubjectLabel(service)})`;
15375
+ }
15376
+
15368
15377
  // ../envoy-client/src/ask-answer.ts
15369
15378
  var HEAD_LENGTH = 120;
15370
15379
  function textHead(text) {
@@ -16633,7 +16642,7 @@ function humanEditHead(edit) {
16633
16642
  function pageSummaryText(offset, count, total) {
16634
16643
  return `showing ${offset + 1}-${offset + count} of ${total}`;
16635
16644
  }
16636
- function searchResultLine(result, baseUrl) {
16645
+ function searchHitLine(result, baseUrl) {
16637
16646
  const href = new URL(result.href, baseUrl).toString();
16638
16647
  const { owner } = result;
16639
16648
  if (owner.kind === "document") {
@@ -16644,6 +16653,42 @@ function searchResultLine(result, baseUrl) {
16644
16653
  const label = `${owner.key} [${owner.status}] ${owner.title} - ${result.kind}${artifactName}`;
16645
16654
  return `${label}: ${snippetText(result.snippet)} -> ${href}`;
16646
16655
  }
16656
+ function indentedText(text) {
16657
+ return text.split(/\r?\n/u).join(`
16658
+ `);
16659
+ }
16660
+ function answerLines(lead, answer) {
16661
+ const selected = answer.selected.length === 0 ? "none" : answer.selected.join(", ");
16662
+ const text = answer.text === null || answer.text === "" ? "none" : indentedText(answer.text);
16663
+ return [
16664
+ ` ${lead} by ${answer.user} at ${answer.at} \xB7 options chosen: ${selected}`,
16665
+ ` Answer text: ${text}`
16666
+ ];
16667
+ }
16668
+ function resolutionText(resolution) {
16669
+ return `${resolution.kind} by ${actorText(resolution.actor)} at ${resolution.at}: ${indentedText(resolution.reason)}`;
16670
+ }
16671
+ function askStateLines(ask) {
16672
+ if (ask === undefined) {
16673
+ return [" Answer state not reported by this Dispatch; open the link to read the ask."];
16674
+ }
16675
+ switch (ask.state) {
16676
+ case "open":
16677
+ return [" Open: no answer yet."];
16678
+ case "answered":
16679
+ return answerLines("Answered", ask.answer);
16680
+ case "resolved":
16681
+ return ask.answer === undefined ? [` Closed with no answer: ${resolutionText(ask.resolution)}`] : [
16682
+ ` Closed after an answer: ${resolutionText(ask.resolution)}`,
16683
+ ...answerLines("Last answer", ask.answer)
16684
+ ];
16685
+ }
16686
+ }
16687
+ function searchResultLine(result, baseUrl) {
16688
+ const line = searchHitLine(result, baseUrl);
16689
+ return result.kind === "ask" ? [line, ...askStateLines(result.ask)].join(`
16690
+ `) : line;
16691
+ }
16647
16692
  function searchAnswer(search, query, offset, configUrl) {
16648
16693
  const results = search.results;
16649
16694
  const count = results.length;
@@ -17836,13 +17881,6 @@ function eventHead(event) {
17836
17881
  return;
17837
17882
  }
17838
17883
  }
17839
- function actorText(actor) {
17840
- const service = actor.kind === "session" ? actor.service : undefined;
17841
- if (service === undefined) {
17842
- return `${actor.kind} ${actor.id}`;
17843
- }
17844
- return `${actor.kind} ${actor.id} (as ${serviceSubjectLabel(service)})`;
17845
- }
17846
17884
  function eventRef(event) {
17847
17885
  const payload = event.payload;
17848
17886
  const id = typeof payload === "object" && payload !== null && "id" in payload ? payload.id : undefined;
@@ -14248,7 +14248,7 @@ var dispatchToolSpecs = [
14248
14248
  {
14249
14249
  name: "dispatch_search",
14250
14250
  example: { query: "astrolabe" },
14251
- description: "Search every issue, document, comment, ask, and message for a keyword or phrase and get deep links. " + "Use it before creating an issue or a design document, and to find where a word was written. " + 'Websearch syntax: "quoted phrase", -excluded, OR. ' + "Each kind of content is ranked on its own and the lists are merged, so the top holds the best " + "issue, document, ask, comment and message; an issue key searched alone lists that issue first. " + `The answer names how many results match; offset pages through them, and each kind lists at most its best ${SEARCH_KIND_DEPTH}, ` + "so narrow the query or name a project to reach the rest. Paging is exact only while the " + "corpus holds still: content added, changed, or removed between two offsets can shift rows " + "across a page boundary, so one hit can come back twice and another never.",
14251
+ description: "Search every issue, document, comment, ask, and message for a keyword or phrase and get deep links. " + "Use it before creating an issue or a design document, and to find where a word was written. " + 'Websearch syntax: "quoted phrase", -excluded, OR. ' + "Each kind of content is ranked on its own and the lists are merged, so the top holds the best " + "issue, document, ask, comment and message; an issue key searched alone lists that issue first. " + "An ask hit says whether it is answered: an answered one shows the latest answer, who gave it, " + "when, the options chosen and its text; a closed one says it was closed with no answer, or " + "shows the last answer it had. " + `The answer names how many results match; offset pages through them, and each kind lists at most its best ${SEARCH_KIND_DEPTH}, ` + "so narrow the query or name a project to reach the rest. Paging is exact only while the " + "corpus holds still: content added, changed, or removed between two offsets can shift rows " + "across a page boundary, so one hit can come back twice and another never.",
14252
14252
  arguments: (z) => ({
14253
14253
  query: z.string({
14254
14254
  min: 2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/opencode-legion-envoy",
3
- "version": "9.5.3",
3
+ "version": "9.6.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/src/server.js",