@sjawhar/opencode-legion-envoy 2.0.4 → 2.1.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.
@@ -14152,7 +14152,7 @@ var dispatchToolSpecs = [
14152
14152
  index: z2.number({ int: true, min: 0 }).describe("Zero-based row or column index for delete_row or delete_column.").optional(),
14153
14153
  type: z2.string().describe("Typed block name for retype.").optional(),
14154
14154
  attributes: z2.unknown().describe("Typed block attributes for retype.").optional()
14155
- })).describe("Flat tagged edits; the server validates fields required for each operation."),
14155
+ }, { strict: true })).describe("Flat tagged edits; an operation takes only the keys below, a misspelled one is refused rather than ignored, and the server validates the fields its op requires."),
14156
14156
  precondition: z2.object({
14157
14157
  document: z2.string({ min: 1 }).describe("Token for the exact canonical document returned by dispatch_doc_read.").optional(),
14158
14158
  blocks: z2.array(z2.object({
@@ -15480,8 +15480,11 @@ function formatZodIssues(issues, schema) {
15480
15480
  return issue2.input === undefined ? [`${path2} is required (${issue2.expected})`] : [
15481
15481
  `${path2} must be ${describeExpected(issue2.expected, schemaAt(schema, issue2.path))}, not ${describeInput(issue2.input)}`
15482
15482
  ];
15483
- case "unrecognized_keys":
15484
- return issue2.keys.map((key) => `unknown field "${key}"; allowed: ${allowed}`);
15483
+ case "unrecognized_keys": {
15484
+ const here = Object.keys(shapeOf(schemaAt(schema, issue2.path)) ?? {}).join(", ") || allowed;
15485
+ const where = path2 === "" ? "" : ` in ${path2}`;
15486
+ return issue2.keys.map((key) => `unknown field "${key}"${where}; allowed: ${here}`);
15487
+ }
15485
15488
  case "invalid_value":
15486
15489
  return [
15487
15490
  `${path2} must be one of ${issue2.values.map(String).join("|")}; got ${JSON.stringify(issue2.input)}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/opencode-legion-envoy",
3
- "version": "2.0.4",
3
+ "version": "2.1.0",
4
4
  "type": "module",
5
5
  "main": "dist/src/server.js",
6
6
  "exports": {
@@ -542,6 +542,11 @@ type EditOp = {
542
542
  };
543
543
  ```
544
544
 
545
+ An operation takes only these keys. A key it does not declare is refused before the call leaves
546
+ your process, naming the operation and its keys, because every key but `op` is optional: a
547
+ misspelled `with` would otherwise be dropped and the `replace` would delete the text you meant to
548
+ rewrite.
549
+
545
550
  Target `replace`, `delete`, and quote insert anchors by a block's text as rendered: write inline
546
551
  code without backticks, bold without asterisks, and link text without link syntax. A table-cell
547
552
  anchor is its cell text. Quote code-block contents without their Markdown fences. A quote must stay