@sjawhar/opencode-legion-envoy 0.20.1 → 0.20.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.
Files changed (2) hide show
  1. package/dist/src/server.js +34 -2
  2. package/package.json +1 -1
@@ -14515,14 +14515,18 @@ function askUrgency(args) {
14515
14515
  return ASK_URGENCIES.find((urgency) => urgency === value);
14516
14516
  }
14517
14517
  function parseDispatchRef(ref) {
14518
- const match = ref.match(/^dispatch:\/\/([A-Z][A-Z0-9]{1,9}-[1-9][0-9]*)(?:\/(spec)|\/artifact\/([^/@]+)(?:@v(\d+))?|\/ask\/([^/]+)|\/comment\/([^/]+))?$/);
14518
+ const match = ref.match(/^dispatch:\/\/([A-Z][A-Z0-9]{1,9}-[1-9][0-9]*)(?:\/(spec)|\/(log)|\/(children)|\/artifact\/([^/@]+)(?:@v(\d+))?|\/ask\/([^/]+)|\/comment\/([^/]+))?$/);
14519
14519
  if (!match)
14520
14520
  return null;
14521
- const [, issue, spec, artifact, version, ask, comment] = match;
14521
+ const [, issue, spec, log, children, artifact, version, ask, comment] = match;
14522
14522
  if (!issue || version !== undefined && Number(version) < 1)
14523
14523
  return null;
14524
14524
  if (spec)
14525
14525
  return { issue, kind: "spec", id: spec };
14526
+ if (log)
14527
+ return { issue, kind: "log", id: log };
14528
+ if (children)
14529
+ return { issue, kind: "children", id: children };
14526
14530
  if (artifact) {
14527
14531
  return {
14528
14532
  issue,
@@ -14618,6 +14622,22 @@ function issueSummary(issue, events) {
14618
14622
  ].join(`
14619
14623
  `);
14620
14624
  }
14625
+ function logSummary(issue, events) {
14626
+ return [
14627
+ `Key: ${issue.key}`,
14628
+ "Events:",
14629
+ ...events.length === 0 ? ["- none"] : events.map((event) => `- #${event.seq} ${event.type} \xB7 ${event.actor.kind} ${event.actor.id} \xB7 ${event.created_at}`)
14630
+ ].join(`
14631
+ `);
14632
+ }
14633
+ function childrenSummary(issue) {
14634
+ return [
14635
+ `Key: ${issue.key}`,
14636
+ "Children:",
14637
+ ...issue.children.length === 0 ? ["- none"] : issue.children.map((child) => `- ${child.key}: ${child.title} (${child.status})`)
14638
+ ].join(`
14639
+ `);
14640
+ }
14621
14641
  function askSummary(ask) {
14622
14642
  const answer = ask.answer;
14623
14643
  return [
@@ -14845,6 +14865,18 @@ Open anchored asks/comments: ${marks.join(", ")}`,
14845
14865
  };
14846
14866
  }
14847
14867
  const read = await client.read(issue());
14868
+ if (issueArguments.ref?.kind === "log") {
14869
+ return {
14870
+ text: logSummary(read.issue, read.events),
14871
+ details: { issue: read.issue.key, topic: dispatchTopic(read.issue.key) }
14872
+ };
14873
+ }
14874
+ if (issueArguments.ref?.kind === "children") {
14875
+ return {
14876
+ text: childrenSummary(read.issue),
14877
+ details: { issue: read.issue.key, topic: dispatchTopic(read.issue.key) }
14878
+ };
14879
+ }
14848
14880
  return {
14849
14881
  text: issueSummary(read.issue, read.events),
14850
14882
  details: { issue: read.issue.key, topic: dispatchTopic(read.issue.key) }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/opencode-legion-envoy",
3
- "version": "0.20.1",
3
+ "version": "0.20.2",
4
4
  "type": "module",
5
5
  "main": "dist/src/server.js",
6
6
  "exports": {