@sjawhar/opencode-legion-envoy 3.19.4 → 3.19.5
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
|
@@ -14252,7 +14252,7 @@ var dispatchToolSpecs = [
|
|
|
14252
14252
|
{
|
|
14253
14253
|
name: "dispatch_read",
|
|
14254
14254
|
example: { issue: "DSP-1" },
|
|
14255
|
-
description: "Read an issue or project-document summary, targeted ask, or targeted comment reply chain, or the conversation " + "a message belongs to. Do not use it for document contents; use dispatch_doc_read instead. Supply ref, issue, " + "or project plus artifact; or message alone, which reads a human's direct message to this session and every " + "reply to it (they belong to no issue). " + "Every read ends with `Referenced by:` (what cites or hangs off this node, each with its dispatch:// address, " + "an excerpt, and when) and `Links:` (what it cites), so tracing provenance is one call. " + OWNER_REFERENCE,
|
|
14255
|
+
description: "Read an issue or project-document summary, targeted ask, or targeted comment reply chain, or the conversation " + "a message belongs to. Do not use it for document contents; use dispatch_doc_read instead. Supply ref, issue, " + "or project plus artifact; or message alone, which reads a human's direct message to this session and every " + "reply to it (they belong to no issue). " + "An anchored comment or ask also says where its quote sits, as `Position:`: the block's path from the top, " + "and in a table the row (0 is the header), the cells before the anchored one, and the column's header; " + "`Position: unavailable (<code>)` when Dispatch could not read the document: `DOC_SERVICE_UNAVAILABLE` " + "(try again shortly), `DOC_SCHEMA` (the document needs repair) or `INTERNAL`. " + "Every read ends with `Referenced by:` (what cites or hangs off this node, each with its dispatch:// address, " + "an excerpt, and when) and `Links:` (what it cites), so tracing provenance is one call. " + OWNER_REFERENCE,
|
|
14256
14256
|
arguments: (z2) => ({
|
|
14257
14257
|
issue: z2.string().describe(ISSUE_REFERENCE).optional(),
|
|
14258
14258
|
project: z2.string().describe("Project key owning the document.").optional(),
|
|
@@ -16569,6 +16569,7 @@ function askSummary({ ask, replies }, graph) {
|
|
|
16569
16569
|
]);
|
|
16570
16570
|
return [
|
|
16571
16571
|
`Question: ${ask.question}`,
|
|
16572
|
+
...anchorLines(ask),
|
|
16572
16573
|
"Options:",
|
|
16573
16574
|
...ask.options.length === 0 ? ["- none"] : ask.options.map((option) => `- ${option.label}${option.description ? ` \u2014 ${option.description}` : ""}`),
|
|
16574
16575
|
`State: ${ask.state}`,
|
|
@@ -16632,12 +16633,12 @@ function formatOpenAsksSummary(response, baseUrl) {
|
|
|
16632
16633
|
function commentSummary({ comment, replies }, graph) {
|
|
16633
16634
|
const root = [
|
|
16634
16635
|
`${comment.id} \xB7 ${actorText(comment.author)}`,
|
|
16635
|
-
...comment
|
|
16636
|
+
...anchorLines(comment),
|
|
16636
16637
|
`Body: ${comment.body}`
|
|
16637
16638
|
];
|
|
16638
16639
|
const chain = replies.flatMap((reply) => [
|
|
16639
16640
|
`${reply.id} \xB7 ${actorText(reply.author)}`,
|
|
16640
|
-
...reply
|
|
16641
|
+
...anchorLines(reply),
|
|
16641
16642
|
`Body: ${reply.body}`
|
|
16642
16643
|
]);
|
|
16643
16644
|
return [
|
|
@@ -16649,6 +16650,28 @@ function commentSummary({ comment, replies }, graph) {
|
|
|
16649
16650
|
].join(`
|
|
16650
16651
|
`);
|
|
16651
16652
|
}
|
|
16653
|
+
function anchorLines(record2) {
|
|
16654
|
+
return [
|
|
16655
|
+
...record2.anchor?.quote === undefined ? [] : [`> ${record2.anchor.quote}`],
|
|
16656
|
+
...record2.anchor_block === undefined ? [] : [`Position: ${positionText(record2.anchor_block)}`],
|
|
16657
|
+
...record2.anchor_block_error === undefined ? [] : [`Position: unavailable (${record2.anchor_block_error})`]
|
|
16658
|
+
];
|
|
16659
|
+
}
|
|
16660
|
+
function positionText(block) {
|
|
16661
|
+
const { table, path: path2 } = block;
|
|
16662
|
+
const segments = path2.map((entry) => `${entry.type}[${entry.index}]`);
|
|
16663
|
+
if (table === undefined || table.row === null)
|
|
16664
|
+
return segments.join(" \u203A ");
|
|
16665
|
+
const tableAt = path2.findIndex((entry) => entry.type === "table");
|
|
16666
|
+
const cells = table.cells ?? [];
|
|
16667
|
+
const label = (table.column === null ? cells : cells.slice(0, table.column)).map((cell) => cell.trim()).filter((cell) => cell !== "" && !/^\d+$/.test(cell)).join(" \xB7 ");
|
|
16668
|
+
const row = label === "" ? `row ${table.row}` : `row ${table.row} (${label})`;
|
|
16669
|
+
const header = table.header === null || table.header === "" ? String(table.column) : table.header;
|
|
16670
|
+
return [
|
|
16671
|
+
...segments.slice(0, tableAt + 1),
|
|
16672
|
+
table.column === null ? row : `${row}, column ${header}`
|
|
16673
|
+
].join(" \u203A ");
|
|
16674
|
+
}
|
|
16652
16675
|
function messageSummary({ message, replies }, graph) {
|
|
16653
16676
|
const root = [`${message.id} \xB7 ${actorText(message.author)}`, `Body: ${message.body}`];
|
|
16654
16677
|
const chain = replies.flatMap((reply) => [
|
package/package.json
CHANGED
|
@@ -57,7 +57,10 @@ table's block id. A row index includes the header: row `0` is the header and its
|
|
|
57
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
|
|
58
58
|
`INVALID_OP` on `index`, naming the supplied value and the table's actual dimensions before making any change. Markdown parsing
|
|
59
59
|
canonicalizes short ragged rows by padding missing cells, so column deletion preserves every non-selected cell in the canonical table.
|
|
60
|
-
`GET /api/v1/artifacts/<artifact UUID>/blocks` reports a table's own references plus its descendant cell anchors.
|
|
60
|
+
`GET /api/v1/artifacts/<artifact UUID>/blocks` reports a table's own references plus its descendant cell anchors.
|
|
61
|
+
`GET /api/v1/artifacts/<artifact UUID>/blocks/<block id>` places one block: its path from the top-level block down, and for a cell
|
|
62
|
+
the row index (0 is the header, what `delete_row` takes), the column index (what `delete_column` takes), the text of the header cell
|
|
63
|
+
drawn above it (with colspans or rowspans, the column the cell is drawn in) and the row's cells. A row or column
|
|
61
64
|
deletion that would remove an open ask or unresolved comment anchor is `INVALID_OP` on `index`, naming the axis and anchor ids;
|
|
62
65
|
answered asks and resolved comments are history and do not block it. A `find` or quote anchor tolerates inline Markdown
|
|
63
66
|
(`**bold**`, `` `code` ``) and a leading `# ` selects a heading by its text; a miss names the quote and the three nearest blocks so
|
|
@@ -16,6 +16,15 @@ document owner or ref, it returns a document summary with `details` `{ project,
|
|
|
16
16
|
question, options, state, answer, and its reply thread. With a comment ref, it returns that comment and its quoted reply chain. With a
|
|
17
17
|
message ref, it returns that message and its reply chain. Reads do not subscribe; use `dispatch_doc_read` for document contents.
|
|
18
18
|
|
|
19
|
+
An anchored comment or ask also prints `Position:`, where its quote's block stands — `table[3] › row 5 (Red-teamer loop), column Due`
|
|
20
|
+
is the fourth top-level block, a table, its row 5 (row 0 is the header; the index `delete_row` takes), labelled by the row's cells
|
|
21
|
+
before the anchored one, in the column headed Due; outside a table it is the path of types and child indexes down to the block. The
|
|
22
|
+
same facts are `anchor_block` on `GET /api/v1/comments/{id}` and `GET /api/v1/asks/{id}`, and
|
|
23
|
+
`GET /api/v1/artifacts/{id}/blocks/{block_id}` answers them for any block id a document holds. When Dispatch could not read the
|
|
24
|
+
document, the read still answers and prints `Position: unavailable (DOC_SERVICE_UNAVAILABLE)` (try again shortly),
|
|
25
|
+
`Position: unavailable (DOC_SCHEMA)` (the document needs repair) or `Position: unavailable (INTERNAL)`; the API carries that
|
|
26
|
+
code as `anchor_block_error`.
|
|
27
|
+
|
|
19
28
|
Every read ends with two sections from the reference graph. `Referenced by:` lists what points at the node — every document, ask,
|
|
20
29
|
comment, or message that cites it, plus its structure: child issues, attached documents, anchored and owned asks and comments, replies,
|
|
21
30
|
followers — and `Links:` lists what it cites. Each row is `- <edge kind> <node kind> dispatch://… (<excerpt> · <when>)`; for a
|