@sjawhar/claude-envoy 2.4.0 → 2.5.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.
@@ -2,5 +2,5 @@
2
2
  "name": "claude-envoy",
3
3
  "description": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
4
4
  "mcpServers": "./.mcp.json",
5
- "version": "2.4.0"
5
+ "version": "2.5.0"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-envoy",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Put Envoy events into the Claude Code session's own conversation and expose Envoy MCP tools.",
5
5
  "mcpServers": {}
6
6
  }
package/dist/dispatch.js CHANGED
@@ -15755,7 +15755,7 @@ var dispatchToolSpecs = [
15755
15755
  {
15756
15756
  name: "dispatch_related",
15757
15757
  example: { project: "CORE", title: "Retry failed webhook deliveries" },
15758
- description: "Run the related-item check that dispatch issue, dispatch ask and a new decision block in " + "dispatch doc-edit run on their own write, and write nothing: it lists the three items of " + "one project most like a title and a text (at most one per issue or document, open ones " + "first), each ask with whether it is answered, and a past decision that already answers " + "the same question. Use it to check a draft before filing it. It searches by meaning and by " + "the text's rarest words, and says how it searched; when meaning search cannot run it " + "searches by keywords only and says why. When it could not search at all it says why and " + "names the dispatch search to run instead. exclude_issues leaves each named issue's own " + "items out of the results, at most 50 of them, so a draft under a parent can leave out " + "that parent and its children without changing how rare the text's words are; " + "keywords_only skips meaning search.",
15758
+ description: "Run the related-item check that dispatch issue, dispatch ask and a new decision block in " + "dispatch doc-edit run on their own write, and write nothing: it lists the three items of " + "one project most like a title and a text (at most one per issue or document, open ones " + "first), each ask with whether it is answered. Use it to check a draft before filing it. " + "It calls the POST form of the related route, which is the form that also lists the " + "answered asks of other projects: at most two answered questions of another project, " + "each naming the project it is in, its answer and who gave it, ranked by meaning alone " + "and claiming nothing about whether they answer your question. The GET form of that " + "route, which the dashboard's new-issue dialog calls, lists none of them. " + "It searches by meaning and by the text's rarest words, and says how it searched; when " + "meaning search cannot run it searches by keywords only and says why. When it could not " + "search at all it says why and names the dispatch search to run instead. exclude_issues " + "leaves each named issue's own items out of the results, at most 50 of them, so a draft " + "under a parent can leave out that parent and its children without changing how rare the " + "text's words are; keywords_only skips meaning search.",
15759
15759
  arguments: (z) => ({
15760
15760
  project: z.string().describe("Project key to search within, such as CORE."),
15761
15761
  title: z.string({ max: ISSUE_TITLE_MAX }).describe("Optional title to check, as an issue title; at most 1,000 characters.").optional(),
@@ -20756,12 +20756,11 @@ function relatedCheckLines(suggestions, context) {
20756
20756
  ];
20757
20757
  }
20758
20758
  try {
20759
- const { decision } = suggestions;
20760
- if (decision !== undefined && decision !== null) {
20761
- const when = decision.answered_at === undefined ? "" : ` on ${decision.answered_at}`;
20762
- lines.push(`A past decision may already answer this: ${suggestionLabel(decision)}, answered by ${decision.answered_by}${when} \u2192 ${absoluteHref(decision.href, context.configUrl)}`);
20763
- lines.push(...askLines(decision.ask));
20764
- }
20759
+ lines.push(...otherProjectLines(suggestions, context.configUrl));
20760
+ } catch (error) {
20761
+ lines.push(`The answers of other projects could not be shown: ${messageFor(error)}`);
20762
+ }
20763
+ try {
20765
20764
  const likely = suggestions.likely_duplicate;
20766
20765
  if (likely !== undefined && likely !== null) {
20767
20766
  lines.push(`Likely duplicate: ${likely.key} [${likely.status}] ${likely.title} \u2192 ${absoluteHref(likely.href, context.configUrl)}`);
@@ -20774,7 +20773,7 @@ function relatedCheckLines(suggestions, context) {
20774
20773
  lines.push(`Near copy you forced past: ${match.key} [${match.status}] ${match.title} \u2192 ${absoluteHref(match.href, context.configUrl)}`);
20775
20774
  }
20776
20775
  } catch (error) {
20777
- lines.push(`The check's past decision or near copies could not be shown: ${messageFor(error)}`);
20776
+ lines.push(`The check's near copies could not be shown: ${messageFor(error)}`);
20778
20777
  }
20779
20778
  return lines;
20780
20779
  }
@@ -20833,9 +20832,21 @@ function relatedCheckForm(suggestions, context) {
20833
20832
  form.mode === undefined ? "Related-item check searched and found nothing." : `Related-item check searched (${form.mode}) and found nothing.`
20834
20833
  ];
20835
20834
  }
20836
- function relatedItemLines(item, configUrl) {
20835
+ function otherProjectLines(suggestions, configUrl) {
20836
+ const items = suggestions.other_projects ?? [];
20837
+ if (items.length === 0)
20838
+ return [];
20839
+ return [
20840
+ "Answered questions in other projects:",
20841
+ ...items.flatMap((item) => relatedItemLines(item, configUrl, true))
20842
+ ];
20843
+ }
20844
+ function relatedItemLines(item, configUrl, namesProject = false) {
20837
20845
  try {
20838
- const lines = [`- ${suggestionLabel(item)} \u2192 ${absoluteHref(item.href, configUrl)}`];
20846
+ const label = suggestionLabel(item);
20847
+ const project = item.owner.project;
20848
+ const named = namesProject && item.owner.kind === "issue" && project !== undefined && project !== "" ? `${project}: ${label}` : label;
20849
+ const lines = [`- ${named} \u2192 ${absoluteHref(item.href, configUrl)}`];
20839
20850
  if (item.kind === "ask") {
20840
20851
  lines.push(...askLines(item.ask));
20841
20852
  }
@@ -37395,7 +37395,7 @@ var dispatchToolSpecs = [
37395
37395
  {
37396
37396
  name: "dispatch_related",
37397
37397
  example: { project: "CORE", title: "Retry failed webhook deliveries" },
37398
- description: "Run the related-item check that dispatch issue, dispatch ask and a new decision block in " + "dispatch doc-edit run on their own write, and write nothing: it lists the three items of " + "one project most like a title and a text (at most one per issue or document, open ones " + "first), each ask with whether it is answered, and a past decision that already answers " + "the same question. Use it to check a draft before filing it. It searches by meaning and by " + "the text's rarest words, and says how it searched; when meaning search cannot run it " + "searches by keywords only and says why. When it could not search at all it says why and " + "names the dispatch search to run instead. exclude_issues leaves each named issue's own " + "items out of the results, at most 50 of them, so a draft under a parent can leave out " + "that parent and its children without changing how rare the text's words are; " + "keywords_only skips meaning search.",
37398
+ description: "Run the related-item check that dispatch issue, dispatch ask and a new decision block in " + "dispatch doc-edit run on their own write, and write nothing: it lists the three items of " + "one project most like a title and a text (at most one per issue or document, open ones " + "first), each ask with whether it is answered. Use it to check a draft before filing it. " + "It calls the POST form of the related route, which is the form that also lists the " + "answered asks of other projects: at most two answered questions of another project, " + "each naming the project it is in, its answer and who gave it, ranked by meaning alone " + "and claiming nothing about whether they answer your question. The GET form of that " + "route, which the dashboard's new-issue dialog calls, lists none of them. " + "It searches by meaning and by the text's rarest words, and says how it searched; when " + "meaning search cannot run it searches by keywords only and says why. When it could not " + "search at all it says why and names the dispatch search to run instead. exclude_issues " + "leaves each named issue's own items out of the results, at most 50 of them, so a draft " + "under a parent can leave out that parent and its children without changing how rare the " + "text's words are; keywords_only skips meaning search.",
37399
37399
  arguments: (z) => ({
37400
37400
  project: z.string().describe("Project key to search within, such as CORE."),
37401
37401
  title: z.string({ max: ISSUE_TITLE_MAX }).describe("Optional title to check, as an issue title; at most 1,000 characters.").optional(),
@@ -47578,12 +47578,11 @@ function relatedCheckLines(suggestions, context) {
47578
47578
  ];
47579
47579
  }
47580
47580
  try {
47581
- const { decision } = suggestions;
47582
- if (decision !== undefined && decision !== null) {
47583
- const when = decision.answered_at === undefined ? "" : ` on ${decision.answered_at}`;
47584
- lines.push(`A past decision may already answer this: ${suggestionLabel(decision)}, answered by ${decision.answered_by}${when} \u2192 ${absoluteHref(decision.href, context.configUrl)}`);
47585
- lines.push(...askLines(decision.ask));
47586
- }
47581
+ lines.push(...otherProjectLines(suggestions, context.configUrl));
47582
+ } catch (error) {
47583
+ lines.push(`The answers of other projects could not be shown: ${messageFor(error)}`);
47584
+ }
47585
+ try {
47587
47586
  const likely = suggestions.likely_duplicate;
47588
47587
  if (likely !== undefined && likely !== null) {
47589
47588
  lines.push(`Likely duplicate: ${likely.key} [${likely.status}] ${likely.title} \u2192 ${absoluteHref(likely.href, context.configUrl)}`);
@@ -47596,7 +47595,7 @@ function relatedCheckLines(suggestions, context) {
47596
47595
  lines.push(`Near copy you forced past: ${match.key} [${match.status}] ${match.title} \u2192 ${absoluteHref(match.href, context.configUrl)}`);
47597
47596
  }
47598
47597
  } catch (error) {
47599
- lines.push(`The check's past decision or near copies could not be shown: ${messageFor(error)}`);
47598
+ lines.push(`The check's near copies could not be shown: ${messageFor(error)}`);
47600
47599
  }
47601
47600
  return lines;
47602
47601
  }
@@ -47655,9 +47654,21 @@ function relatedCheckForm(suggestions, context) {
47655
47654
  form.mode === undefined ? "Related-item check searched and found nothing." : `Related-item check searched (${form.mode}) and found nothing.`
47656
47655
  ];
47657
47656
  }
47658
- function relatedItemLines(item, configUrl) {
47657
+ function otherProjectLines(suggestions, configUrl) {
47658
+ const items = suggestions.other_projects ?? [];
47659
+ if (items.length === 0)
47660
+ return [];
47661
+ return [
47662
+ "Answered questions in other projects:",
47663
+ ...items.flatMap((item) => relatedItemLines(item, configUrl, true))
47664
+ ];
47665
+ }
47666
+ function relatedItemLines(item, configUrl, namesProject = false) {
47659
47667
  try {
47660
- const lines = [`- ${suggestionLabel(item)} \u2192 ${absoluteHref(item.href, configUrl)}`];
47668
+ const label = suggestionLabel(item);
47669
+ const project = item.owner.project;
47670
+ const named = namesProject && item.owner.kind === "issue" && project !== undefined && project !== "" ? `${project}: ${label}` : label;
47671
+ const lines = [`- ${named} \u2192 ${absoluteHref(item.href, configUrl)}`];
47661
47672
  if (item.kind === "ask") {
47662
47673
  lines.push(...askLines(item.ask));
47663
47674
  }
@@ -55907,7 +55918,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
55907
55918
 
55908
55919
  // package.json
55909
55920
  var name = "@sjawhar/claude-envoy";
55910
- var version2 = "2.4.0";
55921
+ var version2 = "2.5.0";
55911
55922
  var legion = {
55912
55923
  daemonApiVersion: 75
55913
55924
  };
@@ -14745,7 +14745,7 @@ var dispatchToolSpecs = [
14745
14745
  {
14746
14746
  name: "dispatch_related",
14747
14747
  example: { project: "CORE", title: "Retry failed webhook deliveries" },
14748
- description: "Run the related-item check that dispatch issue, dispatch ask and a new decision block in " + "dispatch doc-edit run on their own write, and write nothing: it lists the three items of " + "one project most like a title and a text (at most one per issue or document, open ones " + "first), each ask with whether it is answered, and a past decision that already answers " + "the same question. Use it to check a draft before filing it. It searches by meaning and by " + "the text's rarest words, and says how it searched; when meaning search cannot run it " + "searches by keywords only and says why. When it could not search at all it says why and " + "names the dispatch search to run instead. exclude_issues leaves each named issue's own " + "items out of the results, at most 50 of them, so a draft under a parent can leave out " + "that parent and its children without changing how rare the text's words are; " + "keywords_only skips meaning search.",
14748
+ description: "Run the related-item check that dispatch issue, dispatch ask and a new decision block in " + "dispatch doc-edit run on their own write, and write nothing: it lists the three items of " + "one project most like a title and a text (at most one per issue or document, open ones " + "first), each ask with whether it is answered. Use it to check a draft before filing it. " + "It calls the POST form of the related route, which is the form that also lists the " + "answered asks of other projects: at most two answered questions of another project, " + "each naming the project it is in, its answer and who gave it, ranked by meaning alone " + "and claiming nothing about whether they answer your question. The GET form of that " + "route, which the dashboard's new-issue dialog calls, lists none of them. " + "It searches by meaning and by the text's rarest words, and says how it searched; when " + "meaning search cannot run it searches by keywords only and says why. When it could not " + "search at all it says why and names the dispatch search to run instead. exclude_issues " + "leaves each named issue's own items out of the results, at most 50 of them, so a draft " + "under a parent can leave out that parent and its children without changing how rare the " + "text's words are; keywords_only skips meaning search.",
14749
14749
  arguments: (z) => ({
14750
14750
  project: z.string().describe("Project key to search within, such as CORE."),
14751
14751
  title: z.string({ max: ISSUE_TITLE_MAX }).describe("Optional title to check, as an issue title; at most 1,000 characters.").optional(),
@@ -19760,12 +19760,11 @@ function relatedCheckLines(suggestions, context) {
19760
19760
  ];
19761
19761
  }
19762
19762
  try {
19763
- const { decision } = suggestions;
19764
- if (decision !== undefined && decision !== null) {
19765
- const when = decision.answered_at === undefined ? "" : ` on ${decision.answered_at}`;
19766
- lines.push(`A past decision may already answer this: ${suggestionLabel(decision)}, answered by ${decision.answered_by}${when} \u2192 ${absoluteHref(decision.href, context.configUrl)}`);
19767
- lines.push(...askLines(decision.ask));
19768
- }
19763
+ lines.push(...otherProjectLines(suggestions, context.configUrl));
19764
+ } catch (error) {
19765
+ lines.push(`The answers of other projects could not be shown: ${messageFor(error)}`);
19766
+ }
19767
+ try {
19769
19768
  const likely = suggestions.likely_duplicate;
19770
19769
  if (likely !== undefined && likely !== null) {
19771
19770
  lines.push(`Likely duplicate: ${likely.key} [${likely.status}] ${likely.title} \u2192 ${absoluteHref(likely.href, context.configUrl)}`);
@@ -19778,7 +19777,7 @@ function relatedCheckLines(suggestions, context) {
19778
19777
  lines.push(`Near copy you forced past: ${match.key} [${match.status}] ${match.title} \u2192 ${absoluteHref(match.href, context.configUrl)}`);
19779
19778
  }
19780
19779
  } catch (error) {
19781
- lines.push(`The check's past decision or near copies could not be shown: ${messageFor(error)}`);
19780
+ lines.push(`The check's near copies could not be shown: ${messageFor(error)}`);
19782
19781
  }
19783
19782
  return lines;
19784
19783
  }
@@ -19837,9 +19836,21 @@ function relatedCheckForm(suggestions, context) {
19837
19836
  form.mode === undefined ? "Related-item check searched and found nothing." : `Related-item check searched (${form.mode}) and found nothing.`
19838
19837
  ];
19839
19838
  }
19840
- function relatedItemLines(item, configUrl) {
19839
+ function otherProjectLines(suggestions, configUrl) {
19840
+ const items = suggestions.other_projects ?? [];
19841
+ if (items.length === 0)
19842
+ return [];
19843
+ return [
19844
+ "Answered questions in other projects:",
19845
+ ...items.flatMap((item) => relatedItemLines(item, configUrl, true))
19846
+ ];
19847
+ }
19848
+ function relatedItemLines(item, configUrl, namesProject = false) {
19841
19849
  try {
19842
- const lines = [`- ${suggestionLabel(item)} \u2192 ${absoluteHref(item.href, configUrl)}`];
19850
+ const label = suggestionLabel(item);
19851
+ const project = item.owner.project;
19852
+ const named = namesProject && item.owner.kind === "issue" && project !== undefined && project !== "" ? `${project}: ${label}` : label;
19853
+ const lines = [`- ${named} \u2192 ${absoluteHref(item.href, configUrl)}`];
19843
19854
  if (item.kind === "ask") {
19844
19855
  lines.push(...askLines(item.ask));
19845
19856
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/claude-envoy",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Claude Code plugin for Legion's Envoy bus",
6
6
  "type": "module",