@sjawhar/opencode-legion-envoy 1.10.0 → 1.11.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.
@@ -13740,7 +13740,7 @@ var SPEC_SECTIONS = [
13740
13740
  ];
13741
13741
  var SPEC_WRITING_GUIDANCE = `When writing a spec, use these sections in order: ${SPEC_SECTIONS.join(", ")}. ` + "Write for a reader who has not seen the code: plain sentences, every identifier expanded on " + "first use, no coined shorthand; see skills/dispatch Writing for the human and Writing a spec.";
13742
13742
  var ASK_URGENCIES = ["low", "med", "high", "blocking"];
13743
- var DOC_EDIT_OPS = ["replace", "delete", "insert"];
13743
+ var DOC_EDIT_OPS = ["replace", "delete", "insert", "retype"];
13744
13744
  var dispatchToolSpecs = [
13745
13745
  {
13746
13746
  name: "dispatch_issue",
@@ -13850,7 +13850,7 @@ var dispatchToolSpecs = [
13850
13850
  },
13851
13851
  {
13852
13852
  name: "dispatch_doc_edit",
13853
- description: "Apply deterministic text edits to an issue or project document. Do not use it for review feedback or for reading; use " + "dispatch_comment, dispatch_suggest, or dispatch_doc_read instead. The spec (or any document) holds requirements, " + `design, and decisions - never progress, status, or timestamps. ${OWNER_REFERENCE} ${SPEC_WRITING_GUIDANCE}`,
13853
+ description: "Apply deterministic document edits, including retyping an identified paragraph into a schema-declared typed block. " + "Do not use it for review feedback or for reading; use dispatch_comment, dispatch_suggest, or dispatch_doc_read instead. " + `The spec (or any document) holds requirements, design, and decisions - never progress, status, or timestamps. ${OWNER_REFERENCE} ${SPEC_WRITING_GUIDANCE}`,
13854
13854
  arguments: (z) => ({
13855
13855
  issue: z.string().describe(ISSUE_REFERENCE).optional(),
13856
13856
  project: z.string().describe("Project key owning the document.").optional(),
@@ -13863,7 +13863,10 @@ var dispatchToolSpecs = [
13863
13863
  occurrence: z.number({ int: true, min: 0 }).describe("Optional zero-based match occurrence.").optional(),
13864
13864
  markdown: z.string().describe("Markdown to insert.").optional(),
13865
13865
  after: z.string().describe("Anchor after which to insert.").optional(),
13866
- before: z.string().describe("Anchor before which to insert.").optional()
13866
+ before: z.string().describe("Anchor before which to insert.").optional(),
13867
+ block: z.string().describe("Block id to retype.").optional(),
13868
+ type: z.string().describe("Typed block name for retype.").optional(),
13869
+ attributes: z.unknown().describe("Typed block attributes for retype.").optional()
13867
13870
  })).describe("Flat tagged edits; the server validates fields required for each operation."),
13868
13871
  summary: z.string().describe("Optional named-version summary.").optional()
13869
13872
  }),
@@ -14307,6 +14310,7 @@ function zodSchemaApi(zod) {
14307
14310
  },
14308
14311
  boolean: () => api.boolean(),
14309
14312
  enum: (values) => api.enum(values),
14313
+ unknown: () => api.unknown(),
14310
14314
  array: (item, opts = {}) => {
14311
14315
  let schema = api.array(item);
14312
14316
  if (opts.min !== undefined)
@@ -15487,8 +15491,10 @@ async function executeDispatchTool(input) {
15487
15491
  ...summary === undefined ? {} : { summary },
15488
15492
  actor
15489
15493
  });
15494
+ const retyped = ops.filter((operation) => operation.op === "retype").length;
15495
+ const versionText = edited.version === null ? "no new version" : `version ${edited.version.number}`;
15490
15496
  return {
15491
- text: edited.version === null ? `Applied ${edited.applied} ops (no new version)` : `Applied ${edited.applied} ops (version ${edited.version.number})`,
15497
+ text: retyped === 0 ? `Applied ${edited.applied} ops (${versionText})` : `Applied ${edited.applied} ops; retyped ${retyped} block${retyped === 1 ? "" : "s"} (${versionText})`,
15492
15498
  details: writeResultDetails(resolved, {
15493
15499
  applied: edited.applied,
15494
15500
  ...edited.version === null ? {} : { version: edited.version.number }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/opencode-legion-envoy",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "type": "module",
5
5
  "main": "dist/src/server.js",
6
6
  "exports": {
@@ -199,13 +199,16 @@ exact `EditOp` shape:
199
199
 
200
200
  ```ts
201
201
  type EditOp = {
202
- op: "replace" | "delete" | "insert";
202
+ op: "replace" | "delete" | "insert" | "retype";
203
203
  find?: string;
204
204
  with?: string;
205
205
  occurrence?: number;
206
206
  markdown?: string;
207
207
  after?: string;
208
208
  before?: string;
209
+ block?: string;
210
+ type?: string;
211
+ attributes?: Record<string, unknown>;
209
212
  };
210
213
  ```
211
214
 
@@ -221,6 +224,9 @@ and deleting a cell's quoted text removes only that text.
221
224
 
222
225
  Use `replace` for inline continuation. Use zero-based `occurrence` for a repeated target; re-read a missing or ambiguous target before
223
226
  retrying. Pass `summary` to name the version when recording a decision.
227
+ `retype` turns the paragraph with `block` into the named typed `type` in place. It keeps the
228
+ block id and uses `attributes` for client-owned typed attributes. Use it when an existing
229
+ paragraph is the question that should become a decision.
224
230
 
225
231
  ## Typed blocks
226
232
 
@@ -236,6 +242,19 @@ quoted: `:::callout{kind="warning" title="Risk"}`. Do not write Pandoc-style `::
236
242
  block. Do not set attributes the schema marks `server: true`; the server ignores them and reasserts
237
243
  its authoritative value at settlement.
238
244
 
245
+ Questions about a document must be `ask` blocks, never an `Open questions` prose section. An ask
246
+ body is one or more question paragraphs followed by an optional bullet list of options, where each
247
+ item is `Label: description`. For example:
248
+
249
+ ```md
250
+ :::ask{urgency="high" multiple="false"}
251
+ Should we ship the migration?
252
+
253
+ - Ship: Release the verified change.
254
+ - Hold: Wait for another review.
255
+ :::
256
+ ```
257
+
239
258
  ## Comments and suggestions
240
259
 
241
260
  Add feedback with: