@sjawhar/opencode-legion-envoy 1.42.3 → 1.43.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/src/server.js +13 -4
- package/package.json +1 -1
- package/skills/dispatch/SKILL.md +27 -17
package/dist/src/server.js
CHANGED
|
@@ -13857,7 +13857,15 @@ var ISSUE_STATUSES = [
|
|
|
13857
13857
|
"retro",
|
|
13858
13858
|
"done"
|
|
13859
13859
|
];
|
|
13860
|
-
var DOC_EDIT_OPS = [
|
|
13860
|
+
var DOC_EDIT_OPS = [
|
|
13861
|
+
"replace",
|
|
13862
|
+
"delete",
|
|
13863
|
+
"insert",
|
|
13864
|
+
"retype",
|
|
13865
|
+
"move",
|
|
13866
|
+
"delete_row",
|
|
13867
|
+
"delete_column"
|
|
13868
|
+
];
|
|
13861
13869
|
var dispatchToolSpecs = [
|
|
13862
13870
|
{
|
|
13863
13871
|
name: "dispatch_issue",
|
|
@@ -14035,9 +14043,9 @@ var dispatchToolSpecs = [
|
|
|
14035
14043
|
example: {
|
|
14036
14044
|
issue: "DSP-1",
|
|
14037
14045
|
artifact: "spec",
|
|
14038
|
-
ops: [{ op: "
|
|
14046
|
+
ops: [{ op: "delete_column", block: "table-123", index: 1 }]
|
|
14039
14047
|
},
|
|
14040
|
-
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,
|
|
14048
|
+
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}`,
|
|
14041
14049
|
arguments: (z) => ({
|
|
14042
14050
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
14043
14051
|
project: z.string().describe("Project key owning the document.").optional(),
|
|
@@ -14051,7 +14059,8 @@ var dispatchToolSpecs = [
|
|
|
14051
14059
|
markdown: z.string().describe("Markdown to insert.").optional(),
|
|
14052
14060
|
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(),
|
|
14053
14061
|
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(),
|
|
14054
|
-
block: z.string().describe("Block id for retype, delete, or
|
|
14062
|
+
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(),
|
|
14063
|
+
index: z.number({ int: true, min: 0 }).describe("Zero-based row or column index for delete_row or delete_column.").optional(),
|
|
14055
14064
|
type: z.string().describe("Typed block name for retype.").optional(),
|
|
14056
14065
|
attributes: z.unknown().describe("Typed block attributes for retype.").optional()
|
|
14057
14066
|
})).describe("Flat tagged edits; the server validates fields required for each operation."),
|
package/package.json
CHANGED
package/skills/dispatch/SKILL.md
CHANGED
|
@@ -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
|