@sjawhar/pi-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.
- package/README.md +12 -6
- package/dist/envoy.js +57 -16
- package/dist/legion.js +57 -16
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -65,12 +65,18 @@ what the installed package already ships.
|
|
|
65
65
|
Released installs come from npm as `@sjawhar/pi-legion-envoy`. The tarball is
|
|
66
66
|
self-contained: it ships `dist/envoy.js` and `dist/legion.js` — bundling every
|
|
67
67
|
dependency except the OMP host package — and the repo `skills/` tree staged beside it
|
|
68
|
-
at `dist/skills
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
at `dist/skills`. The manifest declares `omp.skills: ["dist/skills"]` alongside
|
|
69
|
+
`omp.extensions`: OMP's own plugin discovery only reads `skill://`-resolvable skills from
|
|
70
|
+
`<plugin root>/skills` or from directories a manifest's `omp.skills` array names, and this
|
|
71
|
+
package ships skills at `dist/skills` (not the plugin root itself), so the field is required
|
|
72
|
+
for every session — including a headless Legion controller — to see the Legion skills at all.
|
|
73
|
+
`resources_discover` additionally serves the same directory as a secondary, extension-owned
|
|
74
|
+
discovery path. The published manifest exposes `dist/envoy.js` and `dist/legion.js` for
|
|
75
|
+
`omp.extensions` (only `omp.skills` ships as committed, since `dist/skills` is its path in both
|
|
76
|
+
a repo checkout post-`prepack.sh` and the published tarball), while the committed manifest keeps
|
|
77
|
+
the TypeScript entries for repo checkouts. The Legion daemon spawns every session against this
|
|
78
|
+
one installed package instead of also loading a repo checkout with OMP's `--extension` flag, so
|
|
79
|
+
a daemon session ends up with exactly one instance of each extension.
|
|
74
80
|
|
|
75
81
|
`.github/workflows/release.yaml` performs that manifest rewrite around `bun pm pack`
|
|
76
82
|
and restores the committed file before tagging. Packing with the committed source
|
package/dist/envoy.js
CHANGED
|
@@ -30077,9 +30077,59 @@ var controllerIssue = strictObject({
|
|
|
30077
30077
|
secret: nonEmptyString,
|
|
30078
30078
|
issue: nonEmptyString
|
|
30079
30079
|
});
|
|
30080
|
+
var TREE_STATUSES = ["queued", "active", "lingering", "dead", "launch-failed", "closed"];
|
|
30081
|
+
var stateWindowLocator = strictObject({
|
|
30082
|
+
tmuxSession: nonEmptyString,
|
|
30083
|
+
tmuxWindowId: nonEmptyString,
|
|
30084
|
+
tmuxPaneId: nonEmptyString.optional()
|
|
30085
|
+
});
|
|
30086
|
+
var stateTreeLocator = stateWindowLocator.extend({ ompSessionFile: nonEmptyString.optional() });
|
|
30087
|
+
var stateIssue = strictObject({
|
|
30088
|
+
key: nonEmptyString,
|
|
30089
|
+
title: string2(),
|
|
30090
|
+
status: _enum2(LIFECYCLE_STATUSES).optional(),
|
|
30091
|
+
children: array(nonEmptyString),
|
|
30092
|
+
parent: nonEmptyString.optional(),
|
|
30093
|
+
lastAppliedSeq: number2().int().nonnegative().optional()
|
|
30094
|
+
});
|
|
30095
|
+
var stateTree = strictObject({
|
|
30096
|
+
status: _enum2(TREE_STATUSES),
|
|
30097
|
+
generation: number2().int().nonnegative(),
|
|
30098
|
+
launchFailures: number2().int().nonnegative(),
|
|
30099
|
+
readyConfirmedAt: number2().optional(),
|
|
30100
|
+
locator: stateTreeLocator.optional()
|
|
30101
|
+
});
|
|
30102
|
+
var stateGate = strictObject({
|
|
30103
|
+
designAskId: nonEmptyString.optional(),
|
|
30104
|
+
designApproved: nonEmptyString.optional()
|
|
30105
|
+
});
|
|
30106
|
+
var stateRole = strictObject({
|
|
30107
|
+
role: nonEmptyString,
|
|
30108
|
+
issue: nonEmptyString.optional(),
|
|
30109
|
+
generation: number2().int().nonnegative().optional(),
|
|
30110
|
+
sessionId: nonEmptyString.optional(),
|
|
30111
|
+
readyConfirmedAt: number2().optional(),
|
|
30112
|
+
launchFailures: number2().int().nonnegative().optional(),
|
|
30113
|
+
locator: stateWindowLocator.optional()
|
|
30114
|
+
});
|
|
30080
30115
|
var LegionDaemonApi = {
|
|
30081
30116
|
State: {
|
|
30082
|
-
response:
|
|
30117
|
+
response: strictObject({
|
|
30118
|
+
project: nonEmptyString,
|
|
30119
|
+
version: number2().int(),
|
|
30120
|
+
issues: record(string2(), stateIssue),
|
|
30121
|
+
trees: record(string2(), stateTree),
|
|
30122
|
+
admission: strictObject({
|
|
30123
|
+
cap: number2().int().nonnegative(),
|
|
30124
|
+
active: array(nonEmptyString),
|
|
30125
|
+
queue: array(nonEmptyString)
|
|
30126
|
+
}),
|
|
30127
|
+
gates: record(string2(), stateGate),
|
|
30128
|
+
controllerLocator: stateWindowLocator.optional(),
|
|
30129
|
+
roles: record(string2(), stateRole),
|
|
30130
|
+
controllerPendingNotices: number2().int().nonnegative(),
|
|
30131
|
+
pendingStatusWrites: array(nonEmptyString)
|
|
30132
|
+
})
|
|
30083
30133
|
},
|
|
30084
30134
|
ControllerReady: {
|
|
30085
30135
|
request: strictObject({ secret: nonEmptyString, sessionId: nonEmptyString }),
|
|
@@ -31842,10 +31892,7 @@ async function executeDispatchTool(input) {
|
|
|
31842
31892
|
text: marks.length === 0 ? document.markdown : `${document.markdown}
|
|
31843
31893
|
|
|
31844
31894
|
Open anchored asks/comments: ${marks.join(", ")}`,
|
|
31845
|
-
details: {
|
|
31846
|
-
issue: resolved.issue.key,
|
|
31847
|
-
topic: dispatchIssueSubject(resolved.issue.key, ">")
|
|
31848
|
-
}
|
|
31895
|
+
details: { issue: resolved.issue.key }
|
|
31849
31896
|
};
|
|
31850
31897
|
}
|
|
31851
31898
|
case "dispatch_artifact": {
|
|
@@ -31878,38 +31925,32 @@ Open anchored asks/comments: ${marks.join(", ")}`,
|
|
|
31878
31925
|
const askRead = await client.getAsk(issueArguments.ref.id);
|
|
31879
31926
|
return {
|
|
31880
31927
|
text: askSummary(askRead),
|
|
31881
|
-
details: {
|
|
31882
|
-
issue: askRead.ask.issue_key,
|
|
31883
|
-
topic: dispatchIssueSubject(askRead.ask.issue_key, ">")
|
|
31884
|
-
}
|
|
31928
|
+
details: { issue: askRead.ask.issue_key }
|
|
31885
31929
|
};
|
|
31886
31930
|
}
|
|
31887
31931
|
if (issueArguments.ref?.kind === "comment") {
|
|
31888
31932
|
const comment = await client.getComment(issueArguments.ref.id);
|
|
31889
31933
|
return {
|
|
31890
31934
|
text: commentSummary(comment),
|
|
31891
|
-
details: {
|
|
31892
|
-
issue: comment.comment.issue_key,
|
|
31893
|
-
topic: dispatchIssueSubject(comment.comment.issue_key, ">")
|
|
31894
|
-
}
|
|
31935
|
+
details: { issue: comment.comment.issue_key }
|
|
31895
31936
|
};
|
|
31896
31937
|
}
|
|
31897
31938
|
const read = await client.read(issue());
|
|
31898
31939
|
if (issueArguments.ref?.kind === "log") {
|
|
31899
31940
|
return {
|
|
31900
31941
|
text: logSummary(read.issue, read.events),
|
|
31901
|
-
details: { issue: read.issue.key
|
|
31942
|
+
details: { issue: read.issue.key }
|
|
31902
31943
|
};
|
|
31903
31944
|
}
|
|
31904
31945
|
if (issueArguments.ref?.kind === "children") {
|
|
31905
31946
|
return {
|
|
31906
31947
|
text: childrenSummary(read.issue),
|
|
31907
|
-
details: { issue: read.issue.key
|
|
31948
|
+
details: { issue: read.issue.key }
|
|
31908
31949
|
};
|
|
31909
31950
|
}
|
|
31910
31951
|
return {
|
|
31911
31952
|
text: issueSummary(read.issue, read.events),
|
|
31912
|
-
details: { issue: read.issue.key
|
|
31953
|
+
details: { issue: read.issue.key }
|
|
31913
31954
|
};
|
|
31914
31955
|
}
|
|
31915
31956
|
default:
|
package/dist/legion.js
CHANGED
|
@@ -30075,9 +30075,59 @@ var controllerIssue = strictObject({
|
|
|
30075
30075
|
secret: nonEmptyString,
|
|
30076
30076
|
issue: nonEmptyString
|
|
30077
30077
|
});
|
|
30078
|
+
var TREE_STATUSES = ["queued", "active", "lingering", "dead", "launch-failed", "closed"];
|
|
30079
|
+
var stateWindowLocator = strictObject({
|
|
30080
|
+
tmuxSession: nonEmptyString,
|
|
30081
|
+
tmuxWindowId: nonEmptyString,
|
|
30082
|
+
tmuxPaneId: nonEmptyString.optional()
|
|
30083
|
+
});
|
|
30084
|
+
var stateTreeLocator = stateWindowLocator.extend({ ompSessionFile: nonEmptyString.optional() });
|
|
30085
|
+
var stateIssue = strictObject({
|
|
30086
|
+
key: nonEmptyString,
|
|
30087
|
+
title: string2(),
|
|
30088
|
+
status: _enum2(LIFECYCLE_STATUSES).optional(),
|
|
30089
|
+
children: array(nonEmptyString),
|
|
30090
|
+
parent: nonEmptyString.optional(),
|
|
30091
|
+
lastAppliedSeq: number2().int().nonnegative().optional()
|
|
30092
|
+
});
|
|
30093
|
+
var stateTree = strictObject({
|
|
30094
|
+
status: _enum2(TREE_STATUSES),
|
|
30095
|
+
generation: number2().int().nonnegative(),
|
|
30096
|
+
launchFailures: number2().int().nonnegative(),
|
|
30097
|
+
readyConfirmedAt: number2().optional(),
|
|
30098
|
+
locator: stateTreeLocator.optional()
|
|
30099
|
+
});
|
|
30100
|
+
var stateGate = strictObject({
|
|
30101
|
+
designAskId: nonEmptyString.optional(),
|
|
30102
|
+
designApproved: nonEmptyString.optional()
|
|
30103
|
+
});
|
|
30104
|
+
var stateRole = strictObject({
|
|
30105
|
+
role: nonEmptyString,
|
|
30106
|
+
issue: nonEmptyString.optional(),
|
|
30107
|
+
generation: number2().int().nonnegative().optional(),
|
|
30108
|
+
sessionId: nonEmptyString.optional(),
|
|
30109
|
+
readyConfirmedAt: number2().optional(),
|
|
30110
|
+
launchFailures: number2().int().nonnegative().optional(),
|
|
30111
|
+
locator: stateWindowLocator.optional()
|
|
30112
|
+
});
|
|
30078
30113
|
var LegionDaemonApi = {
|
|
30079
30114
|
State: {
|
|
30080
|
-
response:
|
|
30115
|
+
response: strictObject({
|
|
30116
|
+
project: nonEmptyString,
|
|
30117
|
+
version: number2().int(),
|
|
30118
|
+
issues: record(string2(), stateIssue),
|
|
30119
|
+
trees: record(string2(), stateTree),
|
|
30120
|
+
admission: strictObject({
|
|
30121
|
+
cap: number2().int().nonnegative(),
|
|
30122
|
+
active: array(nonEmptyString),
|
|
30123
|
+
queue: array(nonEmptyString)
|
|
30124
|
+
}),
|
|
30125
|
+
gates: record(string2(), stateGate),
|
|
30126
|
+
controllerLocator: stateWindowLocator.optional(),
|
|
30127
|
+
roles: record(string2(), stateRole),
|
|
30128
|
+
controllerPendingNotices: number2().int().nonnegative(),
|
|
30129
|
+
pendingStatusWrites: array(nonEmptyString)
|
|
30130
|
+
})
|
|
30081
30131
|
},
|
|
30082
30132
|
ControllerReady: {
|
|
30083
30133
|
request: strictObject({ secret: nonEmptyString, sessionId: nonEmptyString }),
|
|
@@ -32281,10 +32331,7 @@ async function executeDispatchTool(input) {
|
|
|
32281
32331
|
text: marks.length === 0 ? document.markdown : `${document.markdown}
|
|
32282
32332
|
|
|
32283
32333
|
Open anchored asks/comments: ${marks.join(", ")}`,
|
|
32284
|
-
details: {
|
|
32285
|
-
issue: resolved.issue.key,
|
|
32286
|
-
topic: dispatchIssueSubject(resolved.issue.key, ">")
|
|
32287
|
-
}
|
|
32334
|
+
details: { issue: resolved.issue.key }
|
|
32288
32335
|
};
|
|
32289
32336
|
}
|
|
32290
32337
|
case "dispatch_artifact": {
|
|
@@ -32317,38 +32364,32 @@ Open anchored asks/comments: ${marks.join(", ")}`,
|
|
|
32317
32364
|
const askRead = await client.getAsk(issueArguments.ref.id);
|
|
32318
32365
|
return {
|
|
32319
32366
|
text: askSummary(askRead),
|
|
32320
|
-
details: {
|
|
32321
|
-
issue: askRead.ask.issue_key,
|
|
32322
|
-
topic: dispatchIssueSubject(askRead.ask.issue_key, ">")
|
|
32323
|
-
}
|
|
32367
|
+
details: { issue: askRead.ask.issue_key }
|
|
32324
32368
|
};
|
|
32325
32369
|
}
|
|
32326
32370
|
if (issueArguments.ref?.kind === "comment") {
|
|
32327
32371
|
const comment = await client.getComment(issueArguments.ref.id);
|
|
32328
32372
|
return {
|
|
32329
32373
|
text: commentSummary(comment),
|
|
32330
|
-
details: {
|
|
32331
|
-
issue: comment.comment.issue_key,
|
|
32332
|
-
topic: dispatchIssueSubject(comment.comment.issue_key, ">")
|
|
32333
|
-
}
|
|
32374
|
+
details: { issue: comment.comment.issue_key }
|
|
32334
32375
|
};
|
|
32335
32376
|
}
|
|
32336
32377
|
const read = await client.read(issue());
|
|
32337
32378
|
if (issueArguments.ref?.kind === "log") {
|
|
32338
32379
|
return {
|
|
32339
32380
|
text: logSummary(read.issue, read.events),
|
|
32340
|
-
details: { issue: read.issue.key
|
|
32381
|
+
details: { issue: read.issue.key }
|
|
32341
32382
|
};
|
|
32342
32383
|
}
|
|
32343
32384
|
if (issueArguments.ref?.kind === "children") {
|
|
32344
32385
|
return {
|
|
32345
32386
|
text: childrenSummary(read.issue),
|
|
32346
|
-
details: { issue: read.issue.key
|
|
32387
|
+
details: { issue: read.issue.key }
|
|
32347
32388
|
};
|
|
32348
32389
|
}
|
|
32349
32390
|
return {
|
|
32350
32391
|
text: issueSummary(read.issue, read.events),
|
|
32351
|
-
details: { issue: read.issue.key
|
|
32392
|
+
details: { issue: read.issue.key }
|
|
32352
32393
|
};
|
|
32353
32394
|
}
|
|
32354
32395
|
default:
|
package/package.json
CHANGED