@sjawhar/pi-legion-envoy 5.18.0 → 5.19.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 +20 -3
- package/dist/legion.js +167 -10758
- package/dist/skills/AGENTS.md +1 -1
- package/dist/skills/dispatch/SKILL.md +7 -3
- package/dist/skills/legion-controller/SKILL.md +183 -34
- package/dist/skills/legion-worker/SKILL.md +0 -16
- package/package.json +1 -2
package/dist/envoy.js
CHANGED
|
@@ -29904,6 +29904,16 @@ function capAgentStreamText(text, limit) {
|
|
|
29904
29904
|
return text;
|
|
29905
29905
|
return text.slice(0, limit) + AGENT_STREAM_TRUNCATION_SUFFIX;
|
|
29906
29906
|
}
|
|
29907
|
+
// ../contracts/src/claim-holds.ts
|
|
29908
|
+
function claimHolds(claim, titles) {
|
|
29909
|
+
if (claim.actor.kind !== "session") {
|
|
29910
|
+
return "holds";
|
|
29911
|
+
}
|
|
29912
|
+
if (titles === undefined) {
|
|
29913
|
+
return "unknown";
|
|
29914
|
+
}
|
|
29915
|
+
return titles.has(claim.actor.id) ? "holds" : "lapsed";
|
|
29916
|
+
}
|
|
29907
29917
|
// ../contracts/src/dispatch-href.ts
|
|
29908
29918
|
function itemFromSearch(search) {
|
|
29909
29919
|
const params = new URLSearchParams(search);
|
|
@@ -33414,17 +33424,19 @@ function componentsLine(components) {
|
|
|
33414
33424
|
}
|
|
33415
33425
|
}
|
|
33416
33426
|
function claimText(claim, titles) {
|
|
33417
|
-
|
|
33427
|
+
const holding = claimHolds(claim, titles);
|
|
33428
|
+
const marker = holding === "unknown" ? " \xB7 liveness unknown" : holding === "lapsed" ? " \xB7 not running" : "";
|
|
33429
|
+
return `${actorLabel(claim.actor, titles)} since ${claim.at}${marker}`;
|
|
33418
33430
|
}
|
|
33419
33431
|
async function liveSessionTitles(client, needed) {
|
|
33420
33432
|
if (!needed) {
|
|
33421
|
-
return
|
|
33433
|
+
return;
|
|
33422
33434
|
}
|
|
33423
33435
|
try {
|
|
33424
33436
|
const agents = await client.listAgents();
|
|
33425
33437
|
return new Map(agents.map((agent) => [agent.session_id, agent.title]));
|
|
33426
33438
|
} catch {
|
|
33427
|
-
return
|
|
33439
|
+
return;
|
|
33428
33440
|
}
|
|
33429
33441
|
}
|
|
33430
33442
|
function holdsSession(claim) {
|
|
@@ -33456,6 +33468,9 @@ function issueSummary(issue2, events, references, graph, titles) {
|
|
|
33456
33468
|
throw new Error("Dispatch issue is missing components");
|
|
33457
33469
|
if (issue2.claim === undefined)
|
|
33458
33470
|
throw new Error("Dispatch issue is missing claim");
|
|
33471
|
+
if (issue2.external_links === undefined) {
|
|
33472
|
+
throw new Error("Dispatch issue is missing external_links");
|
|
33473
|
+
}
|
|
33459
33474
|
return [
|
|
33460
33475
|
`Title: ${issue2.title}`,
|
|
33461
33476
|
`Key: ${issue2.key}`,
|
|
@@ -33467,6 +33482,8 @@ function issueSummary(issue2, events, references, graph, titles) {
|
|
|
33467
33482
|
componentsLine(issue2.components),
|
|
33468
33483
|
`Route: ${routeText(issue2, titles)}`,
|
|
33469
33484
|
...specApproval === undefined ? [] : [`Spec ${specApproval.replace(/^Approval/, "approval")}`],
|
|
33485
|
+
"External links:",
|
|
33486
|
+
...issue2.external_links.length === 0 ? ["- none"] : issue2.external_links.map((link) => `- ${link.url}${link.kind === undefined ? "" : ` (${link.kind})`}`),
|
|
33470
33487
|
"Open asks:",
|
|
33471
33488
|
...asks.length === 0 ? ["- none"] : asks.map((ask) => `- ${ask.id}: ${ask.question}`),
|
|
33472
33489
|
"References:",
|