@sjawhar/pi-legion-envoy 5.30.5 → 5.30.6
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
|
@@ -30366,7 +30366,7 @@ var dispatchToolSpecs = [
|
|
|
30366
30366
|
{
|
|
30367
30367
|
name: "dispatch_read",
|
|
30368
30368
|
example: { issue: "DSP-1" },
|
|
30369
|
-
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,
|
|
30369
|
+
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,
|
|
30370
30370
|
arguments: (z2) => ({
|
|
30371
30371
|
issue: z2.string().describe(ISSUE_REFERENCE).optional(),
|
|
30372
30372
|
project: z2.string().describe("Project key owning the document.").optional(),
|
|
@@ -33868,6 +33868,7 @@ function askSummary({ ask, replies }, graph) {
|
|
|
33868
33868
|
]);
|
|
33869
33869
|
return [
|
|
33870
33870
|
`Question: ${ask.question}`,
|
|
33871
|
+
...anchorLines(ask),
|
|
33871
33872
|
"Options:",
|
|
33872
33873
|
...ask.options.length === 0 ? ["- none"] : ask.options.map((option) => `- ${option.label}${option.description ? ` \u2014 ${option.description}` : ""}`),
|
|
33873
33874
|
`State: ${ask.state}`,
|
|
@@ -33931,12 +33932,12 @@ function formatOpenAsksSummary(response, baseUrl) {
|
|
|
33931
33932
|
function commentSummary({ comment, replies }, graph) {
|
|
33932
33933
|
const root = [
|
|
33933
33934
|
`${comment.id} \xB7 ${actorText(comment.author)}`,
|
|
33934
|
-
...comment
|
|
33935
|
+
...anchorLines(comment),
|
|
33935
33936
|
`Body: ${comment.body}`
|
|
33936
33937
|
];
|
|
33937
33938
|
const chain = replies.flatMap((reply) => [
|
|
33938
33939
|
`${reply.id} \xB7 ${actorText(reply.author)}`,
|
|
33939
|
-
...reply
|
|
33940
|
+
...anchorLines(reply),
|
|
33940
33941
|
`Body: ${reply.body}`
|
|
33941
33942
|
]);
|
|
33942
33943
|
return [
|
|
@@ -33948,6 +33949,28 @@ function commentSummary({ comment, replies }, graph) {
|
|
|
33948
33949
|
].join(`
|
|
33949
33950
|
`);
|
|
33950
33951
|
}
|
|
33952
|
+
function anchorLines(record2) {
|
|
33953
|
+
return [
|
|
33954
|
+
...record2.anchor?.quote === undefined ? [] : [`> ${record2.anchor.quote}`],
|
|
33955
|
+
...record2.anchor_block === undefined ? [] : [`Position: ${positionText(record2.anchor_block)}`],
|
|
33956
|
+
...record2.anchor_block_error === undefined ? [] : [`Position: unavailable (${record2.anchor_block_error})`]
|
|
33957
|
+
];
|
|
33958
|
+
}
|
|
33959
|
+
function positionText(block) {
|
|
33960
|
+
const { table, path: path2 } = block;
|
|
33961
|
+
const segments = path2.map((entry) => `${entry.type}[${entry.index}]`);
|
|
33962
|
+
if (table === undefined || table.row === null)
|
|
33963
|
+
return segments.join(" \u203A ");
|
|
33964
|
+
const tableAt = path2.findIndex((entry) => entry.type === "table");
|
|
33965
|
+
const cells = table.cells ?? [];
|
|
33966
|
+
const label = (table.column === null ? cells : cells.slice(0, table.column)).map((cell) => cell.trim()).filter((cell) => cell !== "" && !/^\d+$/.test(cell)).join(" \xB7 ");
|
|
33967
|
+
const row = label === "" ? `row ${table.row}` : `row ${table.row} (${label})`;
|
|
33968
|
+
const header = table.header === null || table.header === "" ? String(table.column) : table.header;
|
|
33969
|
+
return [
|
|
33970
|
+
...segments.slice(0, tableAt + 1),
|
|
33971
|
+
table.column === null ? row : `${row}, column ${header}`
|
|
33972
|
+
].join(" \u203A ");
|
|
33973
|
+
}
|
|
33951
33974
|
function messageSummary({ message, replies }, graph) {
|
|
33952
33975
|
const root = [`${message.id} \xB7 ${actorText(message.author)}`, `Body: ${message.body}`];
|
|
33953
33976
|
const chain = replies.flatMap((reply) => [
|
package/dist/legion.js
CHANGED
|
@@ -30535,7 +30535,7 @@ var dispatchToolSpecs = [
|
|
|
30535
30535
|
{
|
|
30536
30536
|
name: "dispatch_read",
|
|
30537
30537
|
example: { issue: "DSP-1" },
|
|
30538
|
-
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,
|
|
30538
|
+
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,
|
|
30539
30539
|
arguments: (z2) => ({
|
|
30540
30540
|
issue: z2.string().describe(ISSUE_REFERENCE).optional(),
|
|
30541
30541
|
project: z2.string().describe("Project key owning the document.").optional(),
|
|
@@ -32736,6 +32736,7 @@ function askSummary({ ask, replies }, graph) {
|
|
|
32736
32736
|
]);
|
|
32737
32737
|
return [
|
|
32738
32738
|
`Question: ${ask.question}`,
|
|
32739
|
+
...anchorLines(ask),
|
|
32739
32740
|
"Options:",
|
|
32740
32741
|
...ask.options.length === 0 ? ["- none"] : ask.options.map((option) => `- ${option.label}${option.description ? ` \u2014 ${option.description}` : ""}`),
|
|
32741
32742
|
`State: ${ask.state}`,
|
|
@@ -32799,12 +32800,12 @@ function formatOpenAsksSummary(response, baseUrl) {
|
|
|
32799
32800
|
function commentSummary({ comment, replies }, graph) {
|
|
32800
32801
|
const root = [
|
|
32801
32802
|
`${comment.id} \xB7 ${actorText(comment.author)}`,
|
|
32802
|
-
...comment
|
|
32803
|
+
...anchorLines(comment),
|
|
32803
32804
|
`Body: ${comment.body}`
|
|
32804
32805
|
];
|
|
32805
32806
|
const chain = replies.flatMap((reply) => [
|
|
32806
32807
|
`${reply.id} \xB7 ${actorText(reply.author)}`,
|
|
32807
|
-
...reply
|
|
32808
|
+
...anchorLines(reply),
|
|
32808
32809
|
`Body: ${reply.body}`
|
|
32809
32810
|
]);
|
|
32810
32811
|
return [
|
|
@@ -32816,6 +32817,28 @@ function commentSummary({ comment, replies }, graph) {
|
|
|
32816
32817
|
].join(`
|
|
32817
32818
|
`);
|
|
32818
32819
|
}
|
|
32820
|
+
function anchorLines(record2) {
|
|
32821
|
+
return [
|
|
32822
|
+
...record2.anchor?.quote === undefined ? [] : [`> ${record2.anchor.quote}`],
|
|
32823
|
+
...record2.anchor_block === undefined ? [] : [`Position: ${positionText(record2.anchor_block)}`],
|
|
32824
|
+
...record2.anchor_block_error === undefined ? [] : [`Position: unavailable (${record2.anchor_block_error})`]
|
|
32825
|
+
];
|
|
32826
|
+
}
|
|
32827
|
+
function positionText(block) {
|
|
32828
|
+
const { table, path: path2 } = block;
|
|
32829
|
+
const segments = path2.map((entry) => `${entry.type}[${entry.index}]`);
|
|
32830
|
+
if (table === undefined || table.row === null)
|
|
32831
|
+
return segments.join(" \u203A ");
|
|
32832
|
+
const tableAt = path2.findIndex((entry) => entry.type === "table");
|
|
32833
|
+
const cells = table.cells ?? [];
|
|
32834
|
+
const label = (table.column === null ? cells : cells.slice(0, table.column)).map((cell) => cell.trim()).filter((cell) => cell !== "" && !/^\d+$/.test(cell)).join(" \xB7 ");
|
|
32835
|
+
const row = label === "" ? `row ${table.row}` : `row ${table.row} (${label})`;
|
|
32836
|
+
const header = table.header === null || table.header === "" ? String(table.column) : table.header;
|
|
32837
|
+
return [
|
|
32838
|
+
...segments.slice(0, tableAt + 1),
|
|
32839
|
+
table.column === null ? row : `${row}, column ${header}`
|
|
32840
|
+
].join(" \u203A ");
|
|
32841
|
+
}
|
|
32819
32842
|
function messageSummary({ message, replies }, graph) {
|
|
32820
32843
|
const root = [`${message.id} \xB7 ${actorText(message.author)}`, `Body: ${message.body}`];
|
|
32821
32844
|
const chain = replies.flatMap((reply) => [
|
|
@@ -33803,7 +33826,7 @@ import { logger } from "@oh-my-pi/pi-utils";
|
|
|
33803
33826
|
// package.json
|
|
33804
33827
|
var package_default = {
|
|
33805
33828
|
name: "@sjawhar/pi-legion-envoy",
|
|
33806
|
-
version: "5.30.
|
|
33829
|
+
version: "5.30.6",
|
|
33807
33830
|
type: "module",
|
|
33808
33831
|
omp: {
|
|
33809
33832
|
extensions: [
|
|
@@ -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
|