@sjawhar/pi-legion-envoy 1.53.4 → 1.54.0
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 +13 -4
- package/dist/legion.js +14 -5
- package/dist/skills/dispatch/SKILL.md +27 -17
- package/package.json +1 -1
package/dist/envoy.js
CHANGED
|
@@ -29957,7 +29957,15 @@ var ISSUE_STATUSES = [
|
|
|
29957
29957
|
function isIssueStatus(value) {
|
|
29958
29958
|
return ISSUE_STATUSES.includes(value);
|
|
29959
29959
|
}
|
|
29960
|
-
var DOC_EDIT_OPS = [
|
|
29960
|
+
var DOC_EDIT_OPS = [
|
|
29961
|
+
"replace",
|
|
29962
|
+
"delete",
|
|
29963
|
+
"insert",
|
|
29964
|
+
"retype",
|
|
29965
|
+
"move",
|
|
29966
|
+
"delete_row",
|
|
29967
|
+
"delete_column"
|
|
29968
|
+
];
|
|
29961
29969
|
var dispatchToolSpecs = [
|
|
29962
29970
|
{
|
|
29963
29971
|
name: "dispatch_issue",
|
|
@@ -30135,9 +30143,9 @@ var dispatchToolSpecs = [
|
|
|
30135
30143
|
example: {
|
|
30136
30144
|
issue: "DSP-1",
|
|
30137
30145
|
artifact: "spec",
|
|
30138
|
-
ops: [{ op: "
|
|
30146
|
+
ops: [{ op: "delete_column", block: "table-123", index: 1 }]
|
|
30139
30147
|
},
|
|
30140
|
-
description: "Apply deterministic document edits: replace or delete quoted text, insert markdown at an anchor, retype an identified paragraph or typed block into a schema-declared typed block,
|
|
30148
|
+
description: "Apply deterministic document edits: replace or delete quoted text, insert markdown at an anchor, retype an identified paragraph or typed block into a schema-declared typed block, delete or move a whole block by its id, or delete a table row or column in place. " + "Do not use it for review feedback or for reading; use dispatch_comment, dispatch_suggest, or dispatch_doc_read instead. " + "For replace, delete, and quote anchors, find text as rendered: inline Markdown (**bold**, `code`) is tolerated; a leading '# ' matches a heading. replace is inline: with is the new text of the matched span, so a leading list or heading marker stays literal text. " + "A delete whose find is a block's entire text removes the block (a list emptied of its items goes too); delete with block removes any block by id, and move with block relocates one. delete_row and delete_column take a table block and a zero-based index, preserving the table block id and refusing to remove cells with open asks or unresolved comments. " + 'Insert and move anchors also accept "start", "end", "heading:<exact heading text>", and "block:<id>"; block ids are the #id of a typed block or come from GET /api/v1/artifacts/{artifact UUID}/blocks (the route takes the artifact UUID, not its slug). ' + `The spec (or any document) holds requirements, design, and decisions - never progress, status, or timestamps. ${OWNER_REFERENCE} ${SPEC_WRITING_GUIDANCE}`,
|
|
30141
30149
|
arguments: (z) => ({
|
|
30142
30150
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
30143
30151
|
project: z.string().describe("Project key owning the document.").optional(),
|
|
@@ -30151,7 +30159,8 @@ var dispatchToolSpecs = [
|
|
|
30151
30159
|
markdown: z.string().describe("Markdown to insert.").optional(),
|
|
30152
30160
|
after: z.string().describe(`Insert or move after this anchor: a quote of the neighbouring block's text, or one of "start", "end", "heading:<exact heading text>", "block:<id>".`).optional(),
|
|
30153
30161
|
before: z.string().describe(`Insert or move before this anchor: a quote of the neighbouring block's text, or one of "start", "end", "heading:<exact heading text>", "block:<id>".`).optional(),
|
|
30154
|
-
block: z.string().describe("Block id for retype, delete, or
|
|
30162
|
+
block: z.string().describe("Block id for retype, delete, move, delete_row, or delete_column: the #id of a typed block, or an id from GET /api/v1/artifacts/{id}/blocks.").optional(),
|
|
30163
|
+
index: z.number({ int: true, min: 0 }).describe("Zero-based row or column index for delete_row or delete_column.").optional(),
|
|
30155
30164
|
type: z.string().describe("Typed block name for retype.").optional(),
|
|
30156
30165
|
attributes: z.unknown().describe("Typed block attributes for retype.").optional()
|
|
30157
30166
|
})).describe("Flat tagged edits; the server validates fields required for each operation."),
|
package/dist/legion.js
CHANGED
|
@@ -16145,7 +16145,7 @@ import { logger } from "@oh-my-pi/pi-utils";
|
|
|
16145
16145
|
// package.json
|
|
16146
16146
|
var package_default = {
|
|
16147
16147
|
name: "@sjawhar/pi-legion-envoy",
|
|
16148
|
-
version: "1.
|
|
16148
|
+
version: "1.54.0",
|
|
16149
16149
|
type: "module",
|
|
16150
16150
|
omp: {
|
|
16151
16151
|
extensions: [
|
|
@@ -29276,7 +29276,15 @@ var ISSUE_STATUSES = [
|
|
|
29276
29276
|
function isIssueStatus(value) {
|
|
29277
29277
|
return ISSUE_STATUSES.includes(value);
|
|
29278
29278
|
}
|
|
29279
|
-
var DOC_EDIT_OPS = [
|
|
29279
|
+
var DOC_EDIT_OPS = [
|
|
29280
|
+
"replace",
|
|
29281
|
+
"delete",
|
|
29282
|
+
"insert",
|
|
29283
|
+
"retype",
|
|
29284
|
+
"move",
|
|
29285
|
+
"delete_row",
|
|
29286
|
+
"delete_column"
|
|
29287
|
+
];
|
|
29280
29288
|
var dispatchToolSpecs = [
|
|
29281
29289
|
{
|
|
29282
29290
|
name: "dispatch_issue",
|
|
@@ -29454,9 +29462,9 @@ var dispatchToolSpecs = [
|
|
|
29454
29462
|
example: {
|
|
29455
29463
|
issue: "DSP-1",
|
|
29456
29464
|
artifact: "spec",
|
|
29457
|
-
ops: [{ op: "
|
|
29465
|
+
ops: [{ op: "delete_column", block: "table-123", index: 1 }]
|
|
29458
29466
|
},
|
|
29459
|
-
description: "Apply deterministic document edits: replace or delete quoted text, insert markdown at an anchor, retype an identified paragraph or typed block into a schema-declared typed block,
|
|
29467
|
+
description: "Apply deterministic document edits: replace or delete quoted text, insert markdown at an anchor, retype an identified paragraph or typed block into a schema-declared typed block, delete or move a whole block by its id, or delete a table row or column in place. " + "Do not use it for review feedback or for reading; use dispatch_comment, dispatch_suggest, or dispatch_doc_read instead. " + "For replace, delete, and quote anchors, find text as rendered: inline Markdown (**bold**, `code`) is tolerated; a leading '# ' matches a heading. replace is inline: with is the new text of the matched span, so a leading list or heading marker stays literal text. " + "A delete whose find is a block's entire text removes the block (a list emptied of its items goes too); delete with block removes any block by id, and move with block relocates one. delete_row and delete_column take a table block and a zero-based index, preserving the table block id and refusing to remove cells with open asks or unresolved comments. " + 'Insert and move anchors also accept "start", "end", "heading:<exact heading text>", and "block:<id>"; block ids are the #id of a typed block or come from GET /api/v1/artifacts/{artifact UUID}/blocks (the route takes the artifact UUID, not its slug). ' + `The spec (or any document) holds requirements, design, and decisions - never progress, status, or timestamps. ${OWNER_REFERENCE} ${SPEC_WRITING_GUIDANCE}`,
|
|
29460
29468
|
arguments: (z) => ({
|
|
29461
29469
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
29462
29470
|
project: z.string().describe("Project key owning the document.").optional(),
|
|
@@ -29470,7 +29478,8 @@ var dispatchToolSpecs = [
|
|
|
29470
29478
|
markdown: z.string().describe("Markdown to insert.").optional(),
|
|
29471
29479
|
after: z.string().describe(`Insert or move after this anchor: a quote of the neighbouring block's text, or one of "start", "end", "heading:<exact heading text>", "block:<id>".`).optional(),
|
|
29472
29480
|
before: z.string().describe(`Insert or move before this anchor: a quote of the neighbouring block's text, or one of "start", "end", "heading:<exact heading text>", "block:<id>".`).optional(),
|
|
29473
|
-
block: z.string().describe("Block id for retype, delete, or
|
|
29481
|
+
block: z.string().describe("Block id for retype, delete, move, delete_row, or delete_column: the #id of a typed block, or an id from GET /api/v1/artifacts/{id}/blocks.").optional(),
|
|
29482
|
+
index: z.number({ int: true, min: 0 }).describe("Zero-based row or column index for delete_row or delete_column.").optional(),
|
|
29474
29483
|
type: z.string().describe("Typed block name for retype.").optional(),
|
|
29475
29484
|
attributes: z.unknown().describe("Typed block attributes for retype.").optional()
|
|
29476
29485
|
})).describe("Flat tagged edits; the server validates fields required for each operation."),
|
|
@@ -392,7 +392,7 @@ exact `EditOp` shape:
|
|
|
392
392
|
|
|
393
393
|
```ts
|
|
394
394
|
type EditOp = {
|
|
395
|
-
op: "replace" | "delete" | "insert" | "retype" | "move";
|
|
395
|
+
op: "replace" | "delete" | "insert" | "retype" | "move" | "delete_row" | "delete_column";
|
|
396
396
|
find?: string;
|
|
397
397
|
with?: string;
|
|
398
398
|
occurrence?: number;
|
|
@@ -400,6 +400,7 @@ type EditOp = {
|
|
|
400
400
|
after?: string;
|
|
401
401
|
before?: string;
|
|
402
402
|
block?: string;
|
|
403
|
+
index?: number;
|
|
403
404
|
type?: string;
|
|
404
405
|
attributes?: Record<string, unknown>;
|
|
405
406
|
};
|
|
@@ -411,18 +412,24 @@ anchor is its cell text. Quote code-block contents without their Markdown fences
|
|
|
411
412
|
within one textblock; split changes that span separate blocks into separate operations.
|
|
412
413
|
|
|
413
414
|
`replace` requires `find` and `with`; `delete` requires `find` or `block`; `insert` requires `markdown` and exactly one of `after` or
|
|
414
|
-
`before`; `move` requires `block` and exactly one of `after` or `before
|
|
415
|
-
`
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
`
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
415
|
+
`before`; `move` requires `block` and exactly one of `after` or `before`; and `delete_row` / `delete_column` each require a table
|
|
416
|
+
`block` plus a zero-based `index`. An insert or move anchor is a quote, `"start"`, `"end"`, `"heading:Title"`, or `"block:<id>"`.
|
|
417
|
+
Ordinary inserts create a sibling block before or after the quote, heading, or block's enclosing document block, and a move lands the
|
|
418
|
+
block at that same boundary; `"start"` and `"end"` select the document edges. At a table-cell quote, a body-row fragment (no header or
|
|
419
|
+
delimiter rows) extends that table before or after the matched row instead; short rows are padded, wider rows are rejected, and deleting
|
|
420
|
+
a cell's quoted text removes only that text. `delete_row` / `delete_column` instead mutate their named table in place, keeping the
|
|
421
|
+
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
|
|
422
|
+
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
|
|
423
|
+
`INVALID_OP` on `index`, naming the supplied value and the table's actual dimensions before making any change. Markdown parsing
|
|
424
|
+
canonicalizes short ragged rows by padding missing cells, so column deletion preserves every non-selected cell in the canonical table.
|
|
425
|
+
`GET /api/v1/artifacts/<artifact UUID>/blocks` reports a table's own references plus its descendant cell anchors. A row or column
|
|
426
|
+
deletion that would remove an open ask or unresolved comment anchor is `INVALID_OP` on `index`, naming the axis and anchor ids;
|
|
427
|
+
answered asks and resolved comments are history and do not block it. A `find` or quote anchor tolerates inline Markdown
|
|
428
|
+
(`**bold**`, `` `code` ``) and a leading `# ` selects a heading by its text; a miss names the three nearest blocks so the next quote
|
|
429
|
+
lands. `replace` is inline: `with` is the new text of the matched span inside its block, so a leading list or heading
|
|
430
|
+
marker (`4. Design`, `# Title`) stays literal text and never turns the block into a list or heading; `with` that forms more than one
|
|
431
|
+
paragraph is rejected (`INVALID_OP` on `with`) — delete the block and insert new blocks instead. Use zero-based `occurrence` for a
|
|
432
|
+
repeated target; re-read a missing or ambiguous target before retrying. Pass `summary` to name the version when recording a decision.
|
|
426
433
|
|
|
427
434
|
A `delete` whose `find` is a block's entire text removes the block itself — the bullet, paragraph, or heading, not just its words — and
|
|
428
435
|
a list emptied of every item disappears with it; a partial match keeps the block with its remaining text. Deleting the text of a bullet
|
|
@@ -430,10 +437,13 @@ that holds a nested list hoists that list's items into the bullet's place (as an
|
|
|
430
437
|
(paragraphs, code, tables) is refused with `INVALID_OP` naming `delete {block:"<item id>"}`, which removes the item with its content.
|
|
431
438
|
`delete` with `block` removes any block by id (paragraph, heading, list, list item, table, or typed block; deleting an open `ask` block
|
|
432
439
|
retracts its ask, while an answered one keeps its answer as the record), and `move` with `block` relocates one, keeping its id and
|
|
433
|
-
attributes — a moved `ask` keeps its ask and answer. Block ids are the `#id` a typed block renders
|
|
434
|
-
every block including untyped ones, the `id` rows
|
|
435
|
-
each with its `type` and byte range
|
|
436
|
-
|
|
440
|
+
attributes — a moved `ask` keeps its ask and answer. Block ids are the `#id` a typed block renders
|
|
441
|
+
(`:::ask{#5467e5ce-…}`) and, for every block including untyped ones, the `id` rows from
|
|
442
|
+
`GET /api/v1/artifacts/<artifact UUID>/blocks` (or `/api/v1/issues/{key}/artifacts/{slug}/blocks`), each with its `type` and byte range
|
|
443
|
+
in canonical markdown; the UUID route does not accept a slug. A later operation in the same atomic batch that names a block removed by
|
|
444
|
+
an earlier `delete {block}` fails as `INVALID_OP` naming the earlier operation and the parent block that cascaded the removal. A move
|
|
445
|
+
whose anchor lies inside the moved block, or a delete that would leave a typed block without the body its content rule requires, is
|
|
446
|
+
`INVALID_OP` naming the field and the rule.
|
|
437
447
|
|
|
438
448
|
`retype` turns the paragraph or typed block with `block` into the named typed `type` in place. It keeps the
|
|
439
449
|
block id, keeps a typed block's body, and uses `attributes` for client-owned typed attributes. Use it when
|