@sjawhar/opencode-legion-envoy 1.21.1 → 1.22.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/src/server.js
CHANGED
|
@@ -16031,10 +16031,16 @@ class EnvoyApiError extends Error {
|
|
|
16031
16031
|
this.expected = parsed?.expected;
|
|
16032
16032
|
}
|
|
16033
16033
|
}
|
|
16034
|
+
function resolveEnvoyToken(env) {
|
|
16035
|
+
const { ENVOY_TOKEN_FILE: file, ENVOY_TOKEN: plain } = env;
|
|
16036
|
+
if (file !== undefined && file !== "")
|
|
16037
|
+
return readSecretFile("ENVOY_TOKEN_FILE", file);
|
|
16038
|
+
return plain || undefined;
|
|
16039
|
+
}
|
|
16034
16040
|
function createEnvoyClient(config) {
|
|
16035
16041
|
const baseUrl = normalizeEnvoyUrl(config.baseUrl);
|
|
16036
16042
|
const timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
16037
|
-
const
|
|
16043
|
+
const apiToken = resolveEnvoyToken(process.env);
|
|
16038
16044
|
const request = async (path, init) => {
|
|
16039
16045
|
const url = `${baseUrl}${path}`;
|
|
16040
16046
|
for (let attempt = 0;attempt < 2; attempt += 1) {
|
package/package.json
CHANGED
|
@@ -62,7 +62,8 @@ override a Sami ruling quoted here.
|
|
|
62
62
|
| New issue created in the Dispatch project (`issue.created`, status `triage`; resync heals misses) | issue key + triage context (incl. pre-existing children) | Triage: `legion({ op: "set_status", issue, status: "todo" })` to admit, or set `backlog`/`icebox` to park |
|
|
63
63
|
| Backlog eligibility | slot freed / priority change | Reconsider parked items and move the eligible root to `todo` |
|
|
64
64
|
| Architect escalation (controller-actionable only: re-file a child as a root issue, capacity, cross-tree conflicts) | request + context | Judge and act; issue-scoped human Q&A goes through `dispatch_ask` from the owning architect, not here |
|
|
65
|
-
| Resync report | artifact-driven anomaly list (zero-owner trees, untriaged-open, launch-failed) | Verify against fresh state, then heal |
|
|
65
|
+
| Resync report | artifact-driven anomaly list (zero-owner trees, untriaged-open, launch-failed, admission-drift) | Verify against fresh state, then heal |
|
|
66
|
+
| Resync report: `admission-drift` entry | issue key + whether the daemon added it to, or removed it from, its admission list (the detail says which) | No action: the daemon already repaired it in the same run. An issue that reappears in consecutive reports is a live leak — file a LEGION issue on Dispatch with both reports pasted as evidence (never a GitHub issue) |
|
|
66
67
|
| `child-status` | child key + status transition | Not controller-actionable by default; if the daemon could not route it to the parent's architect role, verify the transition and forward it with `envoy_publish` |
|
|
67
68
|
| Mention | Slack/GitHub PR @mention text | Answer, or route to the owning issue's architect role |
|
|
68
69
|
| Closed-tree activity (comment, review, CI on a closed tree) | issue, root, event summary | Read the artifact; if work should resume, `legion({ op: "set_status", issue: root, status: "todo" })`; otherwise no action — the event is not held or redelivered |
|
|
@@ -124,7 +125,10 @@ Treat a resync report as an anomaly list, not an instruction. For every zero-own
|
|
|
124
125
|
untriaged-open, or launch-failed issue it names, verify `legion state --json` and the
|
|
125
126
|
current Dispatch issue first. Then heal the verified condition: admit an eligible root, move
|
|
126
127
|
an issue back to its intended status, or use the applicable daemon control path. Do not act
|
|
127
|
-
on stale entries until their source artifact explains the anomaly.
|
|
128
|
+
on stale entries until their source artifact explains the anomaly. An `admission-drift` entry
|
|
129
|
+
needs no healing — the daemon added the tree back to (or removed it from) its admission list in
|
|
130
|
+
the same run; verify only that the same issue does not recur in the next report, and file a
|
|
131
|
+
LEGION issue with both reports if it does.
|
|
128
132
|
|
|
129
133
|
## Mentions
|
|
130
134
|
|