@sjawhar/pi-legion-envoy 3.0.2 → 3.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.
package/dist/envoy.js CHANGED
@@ -30250,7 +30250,7 @@ var dispatchToolSpecs = [
30250
30250
  index: z2.number({ int: true, min: 0 }).describe("Zero-based row or column index for delete_row or delete_column.").optional(),
30251
30251
  type: z2.string().describe("Typed block name for retype.").optional(),
30252
30252
  attributes: z2.unknown().describe("Typed block attributes for retype.").optional()
30253
- })).describe("Flat tagged edits; the server validates fields required for each operation."),
30253
+ }, { 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."),
30254
30254
  precondition: z2.object({
30255
30255
  document: z2.string({ min: 1 }).describe("Token for the exact canonical document returned by dispatch_doc_read.").optional(),
30256
30256
  blocks: z2.array(z2.object({
@@ -32657,8 +32657,11 @@ function formatZodIssues(issues, schema) {
32657
32657
  return issue2.input === undefined ? [`${path2} is required (${issue2.expected})`] : [
32658
32658
  `${path2} must be ${describeExpected(issue2.expected, schemaAt(schema, issue2.path))}, not ${describeInput(issue2.input)}`
32659
32659
  ];
32660
- case "unrecognized_keys":
32661
- return issue2.keys.map((key) => `unknown field "${key}"; allowed: ${allowed}`);
32660
+ case "unrecognized_keys": {
32661
+ const here = Object.keys(shapeOf(schemaAt(schema, issue2.path)) ?? {}).join(", ") || allowed;
32662
+ const where = path2 === "" ? "" : ` in ${path2}`;
32663
+ return issue2.keys.map((key) => `unknown field "${key}"${where}; allowed: ${here}`);
32664
+ }
32662
32665
  case "invalid_value":
32663
32666
  return [
32664
32667
  `${path2} must be one of ${issue2.values.map(String).join("|")}; got ${JSON.stringify(issue2.input)}`
package/dist/legion.js CHANGED
@@ -16142,7 +16142,7 @@ import { logger } from "@oh-my-pi/pi-utils";
16142
16142
  // package.json
16143
16143
  var package_default = {
16144
16144
  name: "@sjawhar/pi-legion-envoy",
16145
- version: "3.0.2",
16145
+ version: "3.1.0",
16146
16146
  type: "module",
16147
16147
  omp: {
16148
16148
  extensions: [
@@ -30323,7 +30323,7 @@ var dispatchToolSpecs = [
30323
30323
  index: z2.number({ int: true, min: 0 }).describe("Zero-based row or column index for delete_row or delete_column.").optional(),
30324
30324
  type: z2.string().describe("Typed block name for retype.").optional(),
30325
30325
  attributes: z2.unknown().describe("Typed block attributes for retype.").optional()
30326
- })).describe("Flat tagged edits; the server validates fields required for each operation."),
30326
+ }, { 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."),
30327
30327
  precondition: z2.object({
30328
30328
  document: z2.string({ min: 1 }).describe("Token for the exact canonical document returned by dispatch_doc_read.").optional(),
30329
30329
  blocks: z2.array(z2.object({
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-legion-envoy",
3
- "version": "3.0.2",
3
+ "version": "3.1.0",
4
4
  "type": "module",
5
5
  "omp": {
6
6
  "extensions": [