@sjawhar/pi-legion-envoy 1.31.3 → 1.32.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/envoy.js
CHANGED
|
@@ -33053,10 +33053,16 @@ class EnvoyApiError extends Error {
|
|
|
33053
33053
|
this.expected = parsed?.expected;
|
|
33054
33054
|
}
|
|
33055
33055
|
}
|
|
33056
|
+
function resolveEnvoyToken(env) {
|
|
33057
|
+
const { ENVOY_TOKEN_FILE: file, ENVOY_TOKEN: plain } = env;
|
|
33058
|
+
if (file !== undefined && file !== "")
|
|
33059
|
+
return readSecretFile("ENVOY_TOKEN_FILE", file);
|
|
33060
|
+
return plain || undefined;
|
|
33061
|
+
}
|
|
33056
33062
|
function createEnvoyClient(config) {
|
|
33057
33063
|
const baseUrl = normalizeEnvoyUrl(config.baseUrl);
|
|
33058
33064
|
const timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
33059
|
-
const
|
|
33065
|
+
const apiToken = resolveEnvoyToken(process.env);
|
|
33060
33066
|
const request = async (path, init) => {
|
|
33061
33067
|
const url = `${baseUrl}${path}`;
|
|
33062
33068
|
for (let attempt = 0;attempt < 2; attempt += 1) {
|
package/dist/legion.js
CHANGED
|
@@ -33484,10 +33484,16 @@ class EnvoyApiError extends Error {
|
|
|
33484
33484
|
this.expected = parsed?.expected;
|
|
33485
33485
|
}
|
|
33486
33486
|
}
|
|
33487
|
+
function resolveEnvoyToken(env) {
|
|
33488
|
+
const { ENVOY_TOKEN_FILE: file, ENVOY_TOKEN: plain } = env;
|
|
33489
|
+
if (file !== undefined && file !== "")
|
|
33490
|
+
return readSecretFile("ENVOY_TOKEN_FILE", file);
|
|
33491
|
+
return plain || undefined;
|
|
33492
|
+
}
|
|
33487
33493
|
function createEnvoyClient(config) {
|
|
33488
33494
|
const baseUrl = normalizeEnvoyUrl(config.baseUrl);
|
|
33489
33495
|
const timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
33490
|
-
const
|
|
33496
|
+
const apiToken = resolveEnvoyToken(process.env);
|
|
33491
33497
|
const request = async (path, init) => {
|
|
33492
33498
|
const url = `${baseUrl}${path}`;
|
|
33493
33499
|
for (let attempt = 0;attempt < 2; attempt += 1) {
|
|
@@ -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
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjawhar/pi-legion-envoy",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"omp": {
|
|
6
6
|
"extensions": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"legion": {
|
|
15
|
-
"daemonApiVersion":
|
|
15
|
+
"daemonApiVersion": 3
|
|
16
16
|
},
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|