@sjawhar/opencode-legion-envoy 0.36.0 → 0.36.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 +57 -16
  2. package/package.json +1 -1
@@ -13963,9 +13963,59 @@ var controllerIssue = strictObject({
13963
13963
  secret: nonEmptyString,
13964
13964
  issue: nonEmptyString
13965
13965
  });
13966
+ var TREE_STATUSES = ["queued", "active", "lingering", "dead", "launch-failed", "closed"];
13967
+ var stateWindowLocator = strictObject({
13968
+ tmuxSession: nonEmptyString,
13969
+ tmuxWindowId: nonEmptyString,
13970
+ tmuxPaneId: nonEmptyString.optional()
13971
+ });
13972
+ var stateTreeLocator = stateWindowLocator.extend({ ompSessionFile: nonEmptyString.optional() });
13973
+ var stateIssue = strictObject({
13974
+ key: nonEmptyString,
13975
+ title: string2(),
13976
+ status: _enum2(LIFECYCLE_STATUSES).optional(),
13977
+ children: array(nonEmptyString),
13978
+ parent: nonEmptyString.optional(),
13979
+ lastAppliedSeq: number2().int().nonnegative().optional()
13980
+ });
13981
+ var stateTree = strictObject({
13982
+ status: _enum2(TREE_STATUSES),
13983
+ generation: number2().int().nonnegative(),
13984
+ launchFailures: number2().int().nonnegative(),
13985
+ readyConfirmedAt: number2().optional(),
13986
+ locator: stateTreeLocator.optional()
13987
+ });
13988
+ var stateGate = strictObject({
13989
+ designAskId: nonEmptyString.optional(),
13990
+ designApproved: nonEmptyString.optional()
13991
+ });
13992
+ var stateRole = strictObject({
13993
+ role: nonEmptyString,
13994
+ issue: nonEmptyString.optional(),
13995
+ generation: number2().int().nonnegative().optional(),
13996
+ sessionId: nonEmptyString.optional(),
13997
+ readyConfirmedAt: number2().optional(),
13998
+ launchFailures: number2().int().nonnegative().optional(),
13999
+ locator: stateWindowLocator.optional()
14000
+ });
13966
14001
  var LegionDaemonApi = {
13967
14002
  State: {
13968
- response: object({ project: nonEmptyString })
14003
+ response: strictObject({
14004
+ project: nonEmptyString,
14005
+ version: number2().int(),
14006
+ issues: record(string2(), stateIssue),
14007
+ trees: record(string2(), stateTree),
14008
+ admission: strictObject({
14009
+ cap: number2().int().nonnegative(),
14010
+ active: array(nonEmptyString),
14011
+ queue: array(nonEmptyString)
14012
+ }),
14013
+ gates: record(string2(), stateGate),
14014
+ controllerLocator: stateWindowLocator.optional(),
14015
+ roles: record(string2(), stateRole),
14016
+ controllerPendingNotices: number2().int().nonnegative(),
14017
+ pendingStatusWrites: array(nonEmptyString)
14018
+ })
13969
14019
  },
13970
14020
  ControllerReady: {
13971
14021
  request: strictObject({ secret: nonEmptyString, sessionId: nonEmptyString }),
@@ -15004,10 +15054,7 @@ async function executeDispatchTool(input) {
15004
15054
  text: marks.length === 0 ? document.markdown : `${document.markdown}
15005
15055
 
15006
15056
  Open anchored asks/comments: ${marks.join(", ")}`,
15007
- details: {
15008
- issue: resolved.issue.key,
15009
- topic: dispatchIssueSubject(resolved.issue.key, ">")
15010
- }
15057
+ details: { issue: resolved.issue.key }
15011
15058
  };
15012
15059
  }
15013
15060
  case "dispatch_artifact": {
@@ -15040,38 +15087,32 @@ Open anchored asks/comments: ${marks.join(", ")}`,
15040
15087
  const askRead = await client.getAsk(issueArguments.ref.id);
15041
15088
  return {
15042
15089
  text: askSummary(askRead),
15043
- details: {
15044
- issue: askRead.ask.issue_key,
15045
- topic: dispatchIssueSubject(askRead.ask.issue_key, ">")
15046
- }
15090
+ details: { issue: askRead.ask.issue_key }
15047
15091
  };
15048
15092
  }
15049
15093
  if (issueArguments.ref?.kind === "comment") {
15050
15094
  const comment = await client.getComment(issueArguments.ref.id);
15051
15095
  return {
15052
15096
  text: commentSummary(comment),
15053
- details: {
15054
- issue: comment.comment.issue_key,
15055
- topic: dispatchIssueSubject(comment.comment.issue_key, ">")
15056
- }
15097
+ details: { issue: comment.comment.issue_key }
15057
15098
  };
15058
15099
  }
15059
15100
  const read = await client.read(issue());
15060
15101
  if (issueArguments.ref?.kind === "log") {
15061
15102
  return {
15062
15103
  text: logSummary(read.issue, read.events),
15063
- details: { issue: read.issue.key, topic: dispatchIssueSubject(read.issue.key, ">") }
15104
+ details: { issue: read.issue.key }
15064
15105
  };
15065
15106
  }
15066
15107
  if (issueArguments.ref?.kind === "children") {
15067
15108
  return {
15068
15109
  text: childrenSummary(read.issue),
15069
- details: { issue: read.issue.key, topic: dispatchIssueSubject(read.issue.key, ">") }
15110
+ details: { issue: read.issue.key }
15070
15111
  };
15071
15112
  }
15072
15113
  return {
15073
15114
  text: issueSummary(read.issue, read.events),
15074
- details: { issue: read.issue.key, topic: dispatchIssueSubject(read.issue.key, ">") }
15115
+ details: { issue: read.issue.key }
15075
15116
  };
15076
15117
  }
15077
15118
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/opencode-legion-envoy",
3
- "version": "0.36.0",
3
+ "version": "0.36.2",
4
4
  "type": "module",
5
5
  "main": "dist/src/server.js",
6
6
  "exports": {