@sjawhar/pi-legion-envoy 5.17.5 → 5.17.7
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 +12 -7
- package/dist/legion.js +29 -19
- package/package.json +1 -1
package/dist/envoy.js
CHANGED
|
@@ -30381,8 +30381,8 @@ var dispatchToolSpecs = [
|
|
|
30381
30381
|
},
|
|
30382
30382
|
{
|
|
30383
30383
|
name: "dispatch_issues",
|
|
30384
|
-
example: { project: "AGENTC",
|
|
30385
|
-
description: "List a project's issues for a roadmap or backlog pass: every issue in one project, each carrying " + "its status, priority, parent, labels, open-ask count, and route with whether it reaches anyone, " + "so you can see backlog shape without opening every issue. Optionally filter by status, parent, " + "label, priority, route status, or how recently it changed; priority takes one or more of 0-3 " + "(P0-P3) and null for an issue with no priority, so an owner's P0/P1 audit is priority [0, 1]. " + 'route_status "no_holder" lists every open issue whose route names a role nobody holds or a ' + "session that is not running at the moment of the read, whatever its priority. A restarting " + "session is absent for minutes, so an issue is unowned only when a read ten minutes later agrees. " + "Do not use it to search by keyword or phrase; dispatch_search remains the keyword surface. " + "Rows are
|
|
30384
|
+
example: { project: "AGENTC", limit: 250, offset: 250 },
|
|
30385
|
+
description: "List a project's issues for a roadmap or backlog pass: every issue in one project, each carrying " + "its status, priority, parent, labels, open-ask count, and route with whether it reaches anyone, " + "so you can see backlog shape without opening every issue. Optionally filter by status, parent, " + "label, priority, route status, or how recently it changed; priority takes one or more of 0-3 " + "(P0-P3) and null for an issue with no priority, so an owner's P0/P1 audit is priority [0, 1]. " + 'route_status "no_holder" lists every open issue whose route names a role nobody holds or a ' + "session that is not running at the moment of the read, whatever its priority. A restarting " + "session is absent for minutes, so an issue is unowned only when a read ten minutes later agrees. " + "Do not use it to search by keyword or phrase; dispatch_search remains the keyword surface. " + "Rows are paged after the server returns the full response: limit sets the page size (default 50, " + "max 250) and offset selects where it starts (default 0), so repeat with the next offset to " + "enumerate every matching issue.",
|
|
30386
30386
|
arguments: (z2) => ({
|
|
30387
30387
|
project: z2.string().describe("Project key to list issues from."),
|
|
30388
30388
|
status: z2.enum(ISSUE_STATUSES).describe("Optional lifecycle status filter.").optional(),
|
|
@@ -30391,7 +30391,8 @@ var dispatchToolSpecs = [
|
|
|
30391
30391
|
priority: z2.array(z2.number({ int: true, min: 0, max: 3 }).nullable(), { min: 1, max: 5 }).describe("Optional priority filter: one or more of 0 (P0, highest) through 3 (P3, lowest), and null " + "for an issue with no priority; an issue matching any listed value is returned.").optional(),
|
|
30392
30392
|
updated_since: z2.string().describe("Optional RFC3339 timestamp; only issues updated at or after it.").optional(),
|
|
30393
30393
|
route_status: z2.enum(ISSUE_ROUTE_STATUSES).describe("Optional: only open issues whose route is in this state. live: a running session holds " + "the role or is the routed session. no_holder: nobody running holds the role, or the " + "session is not running, right now. unknown: the Envoy listener did not answer.").optional(),
|
|
30394
|
-
limit: z2.number({ int: true, min: 1, max: 250 }).describe("Maximum rows, 1-250; default 50.").optional()
|
|
30394
|
+
limit: z2.number({ int: true, min: 1, max: 250 }).describe("Maximum rows, 1-250; default 50.").optional(),
|
|
30395
|
+
offset: z2.number({ int: true, min: 0 }).describe("Rows to skip before the page; nonnegative integer; default 0.").optional()
|
|
30395
30396
|
})
|
|
30396
30397
|
},
|
|
30397
30398
|
{
|
|
@@ -33978,6 +33979,7 @@ async function executeDispatchTool(input) {
|
|
|
33978
33979
|
const updatedSince = optionalString(args, "updated_since");
|
|
33979
33980
|
const routeStatus = optionalString(args, "route_status");
|
|
33980
33981
|
const limit = Math.min(Math.max(optionalNumber(args, "limit") ?? 50, 1), 250);
|
|
33982
|
+
const offset = Math.max(optionalNumber(args, "offset") ?? 0, 0);
|
|
33981
33983
|
const issues = await client.listIssues({
|
|
33982
33984
|
project,
|
|
33983
33985
|
...status === undefined ? {} : { status },
|
|
@@ -33987,7 +33989,8 @@ async function executeDispatchTool(input) {
|
|
|
33987
33989
|
...updatedSince === undefined ? {} : { updated_since: updatedSince },
|
|
33988
33990
|
...routeStatus === undefined ? {} : { route_status: routeStatus }
|
|
33989
33991
|
});
|
|
33990
|
-
const
|
|
33992
|
+
const total = issues.length;
|
|
33993
|
+
const rows = issues.slice(offset, offset + limit).map((row) => ({
|
|
33991
33994
|
key: row.key,
|
|
33992
33995
|
title: row.title,
|
|
33993
33996
|
status: row.status,
|
|
@@ -34002,13 +34005,15 @@ async function executeDispatchTool(input) {
|
|
|
34002
34005
|
updated_at: row.updated_at
|
|
34003
34006
|
}));
|
|
34004
34007
|
const titles = await liveSessionTitles(client, rows.some((row) => holdsSession(row.claim)));
|
|
34008
|
+
const isPartial = offset !== 0 || rows.length !== total;
|
|
34009
|
+
const showing = !isPartial ? "" : rows.length === 0 ? `showing 0-0 of ${total}` : `showing ${offset + 1}-${offset + rows.length} of ${total}`;
|
|
34005
34010
|
return {
|
|
34006
|
-
text: rows.length === 0 ? `No issues in ${project}
|
|
34007
|
-
`${rows.length} ${rows.length === 1 ? "issue" : "issues"} in ${project}` + (
|
|
34011
|
+
text: rows.length === 0 ? `No issues in ${project}.${isPartial ? ` (${showing})` : ""}` : [
|
|
34012
|
+
`${rows.length} ${rows.length === 1 ? "issue" : "issues"} in ${project}` + (isPartial ? ` (${showing})` : ""),
|
|
34008
34013
|
...rows.map((row) => `${row.key} [${row.status}]${row.priority === null ? "" : ` P${row.priority}`} ${row.title}` + (row.open_asks === 0 ? "" : ` \xB7 ${row.open_asks} open ${row.open_asks === 1 ? "ask" : "asks"}`) + (row.claim === null ? "" : ` \xB7 claimed by ${claimText(row.claim, titles)}`) + (row.route === null || row.route_status === "live" || row.route_status === null ? "" : ` \xB7 route ${routeText(row)}`))
|
|
34009
34014
|
].join(`
|
|
34010
34015
|
`),
|
|
34011
|
-
details: { issues: rows }
|
|
34016
|
+
details: { issues: rows, total, offset, limit }
|
|
34012
34017
|
};
|
|
34013
34018
|
}
|
|
34014
34019
|
case "dispatch_architecture_sync": {
|
package/dist/legion.js
CHANGED
|
@@ -30550,8 +30550,8 @@ var dispatchToolSpecs = [
|
|
|
30550
30550
|
},
|
|
30551
30551
|
{
|
|
30552
30552
|
name: "dispatch_issues",
|
|
30553
|
-
example: { project: "AGENTC",
|
|
30554
|
-
description: "List a project's issues for a roadmap or backlog pass: every issue in one project, each carrying " + "its status, priority, parent, labels, open-ask count, and route with whether it reaches anyone, " + "so you can see backlog shape without opening every issue. Optionally filter by status, parent, " + "label, priority, route status, or how recently it changed; priority takes one or more of 0-3 " + "(P0-P3) and null for an issue with no priority, so an owner's P0/P1 audit is priority [0, 1]. " + 'route_status "no_holder" lists every open issue whose route names a role nobody holds or a ' + "session that is not running at the moment of the read, whatever its priority. A restarting " + "session is absent for minutes, so an issue is unowned only when a read ten minutes later agrees. " + "Do not use it to search by keyword or phrase; dispatch_search remains the keyword surface. " + "Rows are
|
|
30553
|
+
example: { project: "AGENTC", limit: 250, offset: 250 },
|
|
30554
|
+
description: "List a project's issues for a roadmap or backlog pass: every issue in one project, each carrying " + "its status, priority, parent, labels, open-ask count, and route with whether it reaches anyone, " + "so you can see backlog shape without opening every issue. Optionally filter by status, parent, " + "label, priority, route status, or how recently it changed; priority takes one or more of 0-3 " + "(P0-P3) and null for an issue with no priority, so an owner's P0/P1 audit is priority [0, 1]. " + 'route_status "no_holder" lists every open issue whose route names a role nobody holds or a ' + "session that is not running at the moment of the read, whatever its priority. A restarting " + "session is absent for minutes, so an issue is unowned only when a read ten minutes later agrees. " + "Do not use it to search by keyword or phrase; dispatch_search remains the keyword surface. " + "Rows are paged after the server returns the full response: limit sets the page size (default 50, " + "max 250) and offset selects where it starts (default 0), so repeat with the next offset to " + "enumerate every matching issue.",
|
|
30555
30555
|
arguments: (z2) => ({
|
|
30556
30556
|
project: z2.string().describe("Project key to list issues from."),
|
|
30557
30557
|
status: z2.enum(ISSUE_STATUSES).describe("Optional lifecycle status filter.").optional(),
|
|
@@ -30560,7 +30560,8 @@ var dispatchToolSpecs = [
|
|
|
30560
30560
|
priority: z2.array(z2.number({ int: true, min: 0, max: 3 }).nullable(), { min: 1, max: 5 }).describe("Optional priority filter: one or more of 0 (P0, highest) through 3 (P3, lowest), and null " + "for an issue with no priority; an issue matching any listed value is returned.").optional(),
|
|
30561
30561
|
updated_since: z2.string().describe("Optional RFC3339 timestamp; only issues updated at or after it.").optional(),
|
|
30562
30562
|
route_status: z2.enum(ISSUE_ROUTE_STATUSES).describe("Optional: only open issues whose route is in this state. live: a running session holds " + "the role or is the routed session. no_holder: nobody running holds the role, or the " + "session is not running, right now. unknown: the Envoy listener did not answer.").optional(),
|
|
30563
|
-
limit: z2.number({ int: true, min: 1, max: 250 }).describe("Maximum rows, 1-250; default 50.").optional()
|
|
30563
|
+
limit: z2.number({ int: true, min: 1, max: 250 }).describe("Maximum rows, 1-250; default 50.").optional(),
|
|
30564
|
+
offset: z2.number({ int: true, min: 0 }).describe("Rows to skip before the page; nonnegative integer; default 0.").optional()
|
|
30564
30565
|
})
|
|
30565
30566
|
},
|
|
30566
30567
|
{
|
|
@@ -32917,6 +32918,7 @@ async function executeDispatchTool(input) {
|
|
|
32917
32918
|
const updatedSince = optionalString(args, "updated_since");
|
|
32918
32919
|
const routeStatus = optionalString(args, "route_status");
|
|
32919
32920
|
const limit = Math.min(Math.max(optionalNumber(args, "limit") ?? 50, 1), 250);
|
|
32921
|
+
const offset = Math.max(optionalNumber(args, "offset") ?? 0, 0);
|
|
32920
32922
|
const issues = await client.listIssues({
|
|
32921
32923
|
project,
|
|
32922
32924
|
...status === undefined ? {} : { status },
|
|
@@ -32926,7 +32928,8 @@ async function executeDispatchTool(input) {
|
|
|
32926
32928
|
...updatedSince === undefined ? {} : { updated_since: updatedSince },
|
|
32927
32929
|
...routeStatus === undefined ? {} : { route_status: routeStatus }
|
|
32928
32930
|
});
|
|
32929
|
-
const
|
|
32931
|
+
const total = issues.length;
|
|
32932
|
+
const rows = issues.slice(offset, offset + limit).map((row) => ({
|
|
32930
32933
|
key: row.key,
|
|
32931
32934
|
title: row.title,
|
|
32932
32935
|
status: row.status,
|
|
@@ -32941,13 +32944,15 @@ async function executeDispatchTool(input) {
|
|
|
32941
32944
|
updated_at: row.updated_at
|
|
32942
32945
|
}));
|
|
32943
32946
|
const titles = await liveSessionTitles(client, rows.some((row) => holdsSession(row.claim)));
|
|
32947
|
+
const isPartial = offset !== 0 || rows.length !== total;
|
|
32948
|
+
const showing = !isPartial ? "" : rows.length === 0 ? `showing 0-0 of ${total}` : `showing ${offset + 1}-${offset + rows.length} of ${total}`;
|
|
32944
32949
|
return {
|
|
32945
|
-
text: rows.length === 0 ? `No issues in ${project}
|
|
32946
|
-
`${rows.length} ${rows.length === 1 ? "issue" : "issues"} in ${project}` + (
|
|
32950
|
+
text: rows.length === 0 ? `No issues in ${project}.${isPartial ? ` (${showing})` : ""}` : [
|
|
32951
|
+
`${rows.length} ${rows.length === 1 ? "issue" : "issues"} in ${project}` + (isPartial ? ` (${showing})` : ""),
|
|
32947
32952
|
...rows.map((row) => `${row.key} [${row.status}]${row.priority === null ? "" : ` P${row.priority}`} ${row.title}` + (row.open_asks === 0 ? "" : ` \xB7 ${row.open_asks} open ${row.open_asks === 1 ? "ask" : "asks"}`) + (row.claim === null ? "" : ` \xB7 claimed by ${claimText(row.claim, titles)}`) + (row.route === null || row.route_status === "live" || row.route_status === null ? "" : ` \xB7 route ${routeText(row)}`))
|
|
32948
32953
|
].join(`
|
|
32949
32954
|
`),
|
|
32950
|
-
details: { issues: rows }
|
|
32955
|
+
details: { issues: rows, total, offset, limit }
|
|
32951
32956
|
};
|
|
32952
32957
|
}
|
|
32953
32958
|
case "dispatch_architecture_sync": {
|
|
@@ -33473,7 +33478,7 @@ import { logger } from "@oh-my-pi/pi-utils";
|
|
|
33473
33478
|
// package.json
|
|
33474
33479
|
var package_default = {
|
|
33475
33480
|
name: "@sjawhar/pi-legion-envoy",
|
|
33476
|
-
version: "5.17.
|
|
33481
|
+
version: "5.17.7",
|
|
33477
33482
|
type: "module",
|
|
33478
33483
|
omp: {
|
|
33479
33484
|
extensions: [
|
|
@@ -42139,7 +42144,7 @@ function commandOutput(only, invocation, text, st, ctx) {
|
|
|
42139
42144
|
function substitutionInvocation(node, st, ctx) {
|
|
42140
42145
|
if (node?.type !== "Command" || node.name === undefined || node.prefix.length !== 0)
|
|
42141
42146
|
return;
|
|
42142
|
-
const argv =
|
|
42147
|
+
const argv = commandArgs([node.name, ...node.suffix], st, ctx);
|
|
42143
42148
|
const name = literalText(argv[0]?.exp);
|
|
42144
42149
|
if (name === undefined)
|
|
42145
42150
|
return;
|
|
@@ -42349,6 +42354,14 @@ function args(words, st, ctx) {
|
|
|
42349
42354
|
});
|
|
42350
42355
|
});
|
|
42351
42356
|
}
|
|
42357
|
+
function commandArgs(words, st, ctx) {
|
|
42358
|
+
const argv = args(words, st, ctx);
|
|
42359
|
+
for (let index = argv.length - 1;index >= 0; index -= 1) {
|
|
42360
|
+
if (argv[index]?.fields === "none")
|
|
42361
|
+
argv.splice(index, 1);
|
|
42362
|
+
}
|
|
42363
|
+
return argv;
|
|
42364
|
+
}
|
|
42352
42365
|
function positionalOf(list) {
|
|
42353
42366
|
if (list.some((arg) => arg.fields === "unknown"))
|
|
42354
42367
|
return;
|
|
@@ -43156,8 +43169,9 @@ function statementOutput(statement, st, ctx) {
|
|
|
43156
43169
|
}
|
|
43157
43170
|
if (command.name === undefined)
|
|
43158
43171
|
return command.redirects.length === 0 ? "" : undefined;
|
|
43159
|
-
const
|
|
43160
|
-
const
|
|
43172
|
+
const argv = commandArgs([command.name, ...command.suffix], st, ctx);
|
|
43173
|
+
const name = literalText(argv[0]?.exp);
|
|
43174
|
+
const rest = argv.slice(1);
|
|
43161
43175
|
if (name === "cat" && rest.length === 0) {
|
|
43162
43176
|
const [heredoc, ...others] = command.redirects;
|
|
43163
43177
|
if (heredoc === undefined || others.length > 0)
|
|
@@ -43300,7 +43314,7 @@ function handleCommand(command, st, ctx, pipeIn) {
|
|
|
43300
43314
|
checkRedirects(command.redirects, undefined, site, st, ctx);
|
|
43301
43315
|
return;
|
|
43302
43316
|
}
|
|
43303
|
-
const argv =
|
|
43317
|
+
const argv = commandArgs(words, st, ctx);
|
|
43304
43318
|
checkRedirects(command.redirects, { name: literalText(argv[0]?.exp), args: argv.slice(1) }, site, st, ctx);
|
|
43305
43319
|
dispatch({ args: argv, site, overlay, redirects: command.redirects, pipeIn }, st, ctx);
|
|
43306
43320
|
}
|
|
@@ -43906,7 +43920,7 @@ function dispatch(invocation, outer, ctx) {
|
|
|
43906
43920
|
"--remote-option",
|
|
43907
43921
|
"--rsync-path",
|
|
43908
43922
|
"--temp-dir"
|
|
43909
|
-
]).operands.
|
|
43923
|
+
]).operands.at(-1);
|
|
43910
43924
|
if (destination !== undefined) {
|
|
43911
43925
|
checkTargets("rsync", "synchronize and delete into", [destination], ACTS_THROUGH_LINK, st, ctx, site);
|
|
43912
43926
|
}
|
|
@@ -44416,9 +44430,6 @@ var LN_OPTIONS = {
|
|
|
44416
44430
|
"--verbose": false,
|
|
44417
44431
|
...GNU_INFORMATION
|
|
44418
44432
|
};
|
|
44419
|
-
function passesAnArgument(arg) {
|
|
44420
|
-
return arg.fields !== "none";
|
|
44421
|
-
}
|
|
44422
44433
|
function writeArguments(rest, valued, long) {
|
|
44423
44434
|
const names = Object.keys(long);
|
|
44424
44435
|
const operands2 = [];
|
|
@@ -44429,14 +44440,13 @@ function writeArguments(rest, valued, long) {
|
|
|
44429
44440
|
const arg = rest[i];
|
|
44430
44441
|
const { text, whole } = readableWord(arg);
|
|
44431
44442
|
if (whole && text === "--") {
|
|
44432
|
-
operands2.push(...rest.slice(i + 1)
|
|
44443
|
+
operands2.push(...rest.slice(i + 1));
|
|
44433
44444
|
break;
|
|
44434
44445
|
}
|
|
44435
44446
|
if (!whole || !text.startsWith("-") || text === "-") {
|
|
44436
44447
|
if (!whole && mayBeSomeOption(text))
|
|
44437
44448
|
uncertain = arg;
|
|
44438
|
-
|
|
44439
|
-
operands2.push(arg);
|
|
44449
|
+
operands2.push(arg);
|
|
44440
44450
|
continue;
|
|
44441
44451
|
}
|
|
44442
44452
|
let takesValue = false;
|