@sjawhar/pi-legion-envoy 5.24.1 → 5.24.3
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
|
@@ -30073,6 +30073,7 @@ var ASK_URGENCIES = ["low", "med", "high", "blocking"];
|
|
|
30073
30073
|
var ASK_QUESTION_MAX = 800;
|
|
30074
30074
|
var SEARCH_QUERY_MAX = 1000;
|
|
30075
30075
|
var SEARCH_QUERY_HINT = "search with a short phrase of a few words, not a passage";
|
|
30076
|
+
var PROJECT_KEY_PATTERN = /^[A-Z][A-Z0-9]{1,9}$/;
|
|
30076
30077
|
var ISSUE_STATUSES = [
|
|
30077
30078
|
"triage",
|
|
30078
30079
|
"icebox",
|
|
@@ -30395,7 +30396,14 @@ var dispatchToolSpecs = [
|
|
|
30395
30396
|
}).describe(`Keyword, phrase, or websearch expression; 2 to ${SEARCH_QUERY_MAX} characters.`),
|
|
30396
30397
|
project: z2.string().describe("Optional project key to search within.").optional(),
|
|
30397
30398
|
limit: z2.number({ int: true, min: 1, max: 50 }).describe("Maximum results, 1-50; default 20.").optional()
|
|
30398
|
-
})
|
|
30399
|
+
}),
|
|
30400
|
+
validation: {
|
|
30401
|
+
check: (value) => {
|
|
30402
|
+
const { project } = value;
|
|
30403
|
+
return typeof project !== "string" || project === "" || PROJECT_KEY_PATTERN.test(project);
|
|
30404
|
+
},
|
|
30405
|
+
message: "project must be a project key such as CORE"
|
|
30406
|
+
}
|
|
30399
30407
|
},
|
|
30400
30408
|
{
|
|
30401
30409
|
name: "dispatch_issues",
|
|
@@ -33257,7 +33265,7 @@ async function resolveOwnerArguments(tool, input, cwd, env, exec, serverUrl, pro
|
|
|
33257
33265
|
problems.push("exactly one of issue and project is required");
|
|
33258
33266
|
}
|
|
33259
33267
|
if (typeof projectArgument === "string") {
|
|
33260
|
-
if (
|
|
33268
|
+
if (!PROJECT_KEY_PATTERN.test(projectArgument)) {
|
|
33261
33269
|
problems.push("project must be a project key such as CORE");
|
|
33262
33270
|
}
|
|
33263
33271
|
const refDocument = ref?.owner.kind === "project" ? ref.artifact ?? ref.id : undefined;
|
package/dist/legion.js
CHANGED
|
@@ -30242,6 +30242,7 @@ var ASK_URGENCIES = ["low", "med", "high", "blocking"];
|
|
|
30242
30242
|
var ASK_QUESTION_MAX = 800;
|
|
30243
30243
|
var SEARCH_QUERY_MAX = 1000;
|
|
30244
30244
|
var SEARCH_QUERY_HINT = "search with a short phrase of a few words, not a passage";
|
|
30245
|
+
var PROJECT_KEY_PATTERN = /^[A-Z][A-Z0-9]{1,9}$/;
|
|
30245
30246
|
var ISSUE_STATUSES = [
|
|
30246
30247
|
"triage",
|
|
30247
30248
|
"icebox",
|
|
@@ -30564,7 +30565,14 @@ var dispatchToolSpecs = [
|
|
|
30564
30565
|
}).describe(`Keyword, phrase, or websearch expression; 2 to ${SEARCH_QUERY_MAX} characters.`),
|
|
30565
30566
|
project: z2.string().describe("Optional project key to search within.").optional(),
|
|
30566
30567
|
limit: z2.number({ int: true, min: 1, max: 50 }).describe("Maximum results, 1-50; default 20.").optional()
|
|
30567
|
-
})
|
|
30568
|
+
}),
|
|
30569
|
+
validation: {
|
|
30570
|
+
check: (value) => {
|
|
30571
|
+
const { project } = value;
|
|
30572
|
+
return typeof project !== "string" || project === "" || PROJECT_KEY_PATTERN.test(project);
|
|
30573
|
+
},
|
|
30574
|
+
message: "project must be a project key such as CORE"
|
|
30575
|
+
}
|
|
30568
30576
|
},
|
|
30569
30577
|
{
|
|
30570
30578
|
name: "dispatch_issues",
|
|
@@ -32196,7 +32204,7 @@ async function resolveOwnerArguments(tool, input, cwd, env, exec, serverUrl, pro
|
|
|
32196
32204
|
problems.push("exactly one of issue and project is required");
|
|
32197
32205
|
}
|
|
32198
32206
|
if (typeof projectArgument === "string") {
|
|
32199
|
-
if (
|
|
32207
|
+
if (!PROJECT_KEY_PATTERN.test(projectArgument)) {
|
|
32200
32208
|
problems.push("project must be a project key such as CORE");
|
|
32201
32209
|
}
|
|
32202
32210
|
const refDocument = ref?.owner.kind === "project" ? ref.artifact ?? ref.id : undefined;
|
|
@@ -33523,7 +33531,7 @@ import { logger } from "@oh-my-pi/pi-utils";
|
|
|
33523
33531
|
// package.json
|
|
33524
33532
|
var package_default = {
|
|
33525
33533
|
name: "@sjawhar/pi-legion-envoy",
|
|
33526
|
-
version: "5.24.
|
|
33534
|
+
version: "5.24.3",
|
|
33527
33535
|
type: "module",
|
|
33528
33536
|
omp: {
|
|
33529
33537
|
extensions: [
|
|
@@ -43,7 +43,15 @@ within one textblock; split changes that span separate blocks into separate oper
|
|
|
43
43
|
`block` plus a zero-based `index`. An insert or move anchor is a quote, `"start"`, `"end"`, `"heading:Title"`, or `"block:<id>"`.
|
|
44
44
|
Ordinary inserts create a sibling block before or after the quote, heading, or block's enclosing document block, and a move lands the
|
|
45
45
|
block at that same boundary; `"start"` and `"end"` select the document edges. At a table-cell quote, a body-row fragment (no header or
|
|
46
|
-
delimiter rows) extends that table before or after the matched row instead
|
|
46
|
+
delimiter rows) extends that table before or after the matched row instead, decided in three steps. A fragment whose every line yields
|
|
47
|
+
a cell and an unescaped `|` (a lone `|` yields no cell, and a line whose only pipe is `\|` has no separator), with no line a delimiter
|
|
48
|
+
row of three hyphens or more a cell, is parsed as rows of that table. What that parse refuses is refused: a row holding text past the
|
|
49
|
+
table's width as `TABLE_WIDTH` (blank cells there are dropped), a line the table cannot hold as a row (indented code, `2. | a | b |`)
|
|
50
|
+
as `INVALID_OP`. When it refuses nothing and reads every line as a row, the rows are inserted, short ones padded. Any other fragment is
|
|
51
|
+
read on its own as blocks, which are inserted after the table or refused as such blocks would be: a whole table you paste there, its
|
|
52
|
+
delimiter row three hyphens or more a cell, becomes a second table, while one with any delimiter cell of one or two hyphens (`| - |`,
|
|
53
|
+
`| --- | - |`) passes the first step, so its header and delimiter rows are inserted as rows of the table, or refused as `TABLE_WIDTH`
|
|
54
|
+
where it is wider than the table. Deleting
|
|
47
55
|
a cell's quoted text removes only that text. `delete_row` / `delete_column` instead mutate their named table in place, keeping the
|
|
48
56
|
table's block id. A row index includes the header: row `0` is the header and its deletion promotes the first body row. The last body
|
|
49
57
|
row and any row's last column cannot be deleted. An index is required. A missing, non-integer, negative, or out-of-range index is
|
|
@@ -128,6 +128,14 @@ dropped and the URL keeps `|text`. A backslash-escaped `\<https://example.com|te
|
|
|
128
128
|
document but comes back re-escaped (`\<`) from `dispatch_doc_read`. A Slack mrkdwn draft, or any other payload that is not Markdown,
|
|
129
129
|
still belongs inside a fenced code block, where it survives verbatim both ways.
|
|
130
130
|
|
|
131
|
+
A table cell ends at every `|` not written `\|`, inside inline code and links too, so write
|
|
132
|
+
`` `x: Promise<void> \| undefined` ``, never `` `x: Promise<void> | undefined` ``, in a cell. A row
|
|
133
|
+
holding text in a cell past its table's width is refused rather than stored without it, naming the
|
|
134
|
+
row: write a `|` inside a cell as `\|`, or, where the row really has more cells, give the header and
|
|
135
|
+
delimiter rows as many. Blank cells past the width are dropped, on every path. A spec, an upload or
|
|
136
|
+
a version answers `INVALID_MARKDOWN`, an insert of blocks `INVALID_OP` on `markdown`, and an insert
|
|
137
|
+
of bare table rows `TABLE_WIDTH`, which names the cell counts only.
|
|
138
|
+
|
|
131
139
|
## A document that is reloading
|
|
132
140
|
|
|
133
141
|
These calls can answer `DOC_SERVICE_UNAVAILABLE` (HTTP 503), because each writes a document inside its
|