@sjawhar/opencode-legion-envoy 3.16.1 → 3.16.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/src/server.js
CHANGED
|
@@ -13962,6 +13962,7 @@ var ASK_URGENCIES = ["low", "med", "high", "blocking"];
|
|
|
13962
13962
|
var ASK_QUESTION_MAX = 800;
|
|
13963
13963
|
var SEARCH_QUERY_MAX = 1000;
|
|
13964
13964
|
var SEARCH_QUERY_HINT = "search with a short phrase of a few words, not a passage";
|
|
13965
|
+
var PROJECT_KEY_PATTERN = /^[A-Z][A-Z0-9]{1,9}$/;
|
|
13965
13966
|
var ISSUE_STATUSES = [
|
|
13966
13967
|
"triage",
|
|
13967
13968
|
"icebox",
|
|
@@ -14281,7 +14282,14 @@ var dispatchToolSpecs = [
|
|
|
14281
14282
|
}).describe(`Keyword, phrase, or websearch expression; 2 to ${SEARCH_QUERY_MAX} characters.`),
|
|
14282
14283
|
project: z2.string().describe("Optional project key to search within.").optional(),
|
|
14283
14284
|
limit: z2.number({ int: true, min: 1, max: 50 }).describe("Maximum results, 1-50; default 20.").optional()
|
|
14284
|
-
})
|
|
14285
|
+
}),
|
|
14286
|
+
validation: {
|
|
14287
|
+
check: (value) => {
|
|
14288
|
+
const { project } = value;
|
|
14289
|
+
return typeof project !== "string" || project === "" || PROJECT_KEY_PATTERN.test(project);
|
|
14290
|
+
},
|
|
14291
|
+
message: "project must be a project key such as CORE"
|
|
14292
|
+
}
|
|
14285
14293
|
},
|
|
14286
14294
|
{
|
|
14287
14295
|
name: "dispatch_issues",
|
|
@@ -16047,7 +16055,7 @@ async function resolveOwnerArguments(tool, input, cwd, env, exec, serverUrl, pro
|
|
|
16047
16055
|
problems.push("exactly one of issue and project is required");
|
|
16048
16056
|
}
|
|
16049
16057
|
if (typeof projectArgument === "string") {
|
|
16050
|
-
if (
|
|
16058
|
+
if (!PROJECT_KEY_PATTERN.test(projectArgument)) {
|
|
16051
16059
|
problems.push("project must be a project key such as CORE");
|
|
16052
16060
|
}
|
|
16053
16061
|
const refDocument = ref?.owner.kind === "project" ? ref.artifact ?? ref.id : undefined;
|
package/package.json
CHANGED
|
@@ -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
|
|
@@ -24,8 +24,10 @@ In-flight issues with no owner at all go
|
|
|
24
24
|
back to `backlog` as well: no claim or route held by a live session, no Dispatch activity in the
|
|
25
25
|
last day, and no pull request moving on GitHub (an owner working there leaves no Dispatch trace).
|
|
26
26
|
The order keeper sweeps those. Never write the status of an issue that carries the `legion`
|
|
27
|
-
label, or of any issue under one: the Legion daemon writes those statuses
|
|
28
|
-
|
|
27
|
+
label, or of any issue under one: the Legion daemon writes those statuses. A status your session
|
|
28
|
+
writes on the root of a tree Legion is running is set back and the tree's architect told who wrote
|
|
29
|
+
it; only a person in the dashboard, or `legion status`, stops that tree. On an issue under one, a
|
|
30
|
+
status that takes it out of the flow parks that issue and stops its workers.
|
|
29
31
|
|
|
30
32
|
One agent keeps the backlog's order against those priorities, with Sami
|
|
31
33
|
(dispatch://AGENTC-34/ask/f6780f9e-8b96-49eb-9be7-7c7f2036d5cc). Setting an issue's priority
|
|
@@ -59,7 +59,7 @@ only on this phase's artifact.
|
|
|
59
59
|
|
|
60
60
|
You never spawn another Legion role: spawning a worker
|
|
61
61
|
(`legion({op: "spawn_worker", ... })`) is architect-only. You may still use ordinary `task`
|
|
62
|
-
|
|
62
|
+
subagents for your own phase work; none of them is a Legion role.
|
|
63
63
|
Escalate a product, scope, cross-phase, or lifecycle decision to the owning architect with
|
|
64
64
|
`envoy_publish` to its role topic (`notifications.role.` followed by its encoded token, see
|
|
65
65
|
above), carrying the verified facts and the decision needed. `hub` only reaches subagents
|