@sjawhar/pi-legion-envoy 3.0.1 → 3.0.3

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.1",
16145
+ version: "3.0.3",
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({
@@ -92,8 +92,9 @@ A spec has two readers: the human who decides reads the **Summary** and **New si
92
92
 
93
93
  - The spec is the issue's one primary document. Extend it in place — a new version that keeps the
94
94
  human's own text — never a second "spec" artifact beside it.
95
- - No hedging ("might", "could consider"). No TBD, TODO, or placeholders: an open item is either
96
- an ask block or a question for the platform PO whose ruling becomes a Requirement (see
95
+ - No hedging ("might", "could consider"). No TBD, TODO, or placeholders: an open item is an ask
96
+ block, a technical decision your lane makes and records as a Requirement, or, for a contract
97
+ between two lanes or a halt condition, a question for the platform PO (see
97
98
  [Before you ask](#before-you-ask) under Asking).
98
99
  - Keep each section to one screen; work that exceeds one screen per section is two specs.
99
100
  - Update the spec as decisions land: the spec is the record, comments are the discussion.
@@ -281,9 +282,13 @@ eval_id? What's an R4 model header? What exactly is the question or uncertainty
281
282
  production import). Every `dispatch_ask` passes three gates first:
282
283
 
283
284
  1. **Does it need his authority, taste, or risk appetite?** This is the bar for a decision
284
- written as an `:::ask` block in context ([Decision blocks](#decision-blocks)). Schema shapes,
285
- table layouts, field names, migration internals, and contracts between lanes do not: they go to
286
- the platform PO over Envoy, who rules.
285
+ written as an `:::ask` block in context ([Decision blocks](#decision-blocks)). Technical
286
+ decisions inside your outcome do not: schema shapes, table layouts, field names, and migration
287
+ internals are your lane's to decide and record in the spec. Two things still go to the
288
+ platform PO over Envoy: a contract between two lanes, and a halt condition (a change to IAM,
289
+ deletion or exposure of production data, anything that reaches a customer). The PO takes those
290
+ to Sami as a Dispatch ask; you do not open one yourself, even as a permission ask under gate 2
291
+ (Sami, 2026-09-25, AGENTC-34 §12).
287
292
  2. **Is there genuine uncertainty?** If not, it is a plan you execute. The one legitimate ask
288
293
  without uncertainty is permission for an action only a human can authorise — a production
289
294
  write, an external send, a console action — and then the question is that action in one
@@ -381,11 +386,13 @@ It returns the imported commit, or the recorded error when the model was rejecte
381
386
 
382
387
  Before saying you are waiting for human input, call `dispatch_open_asks`. With no arguments it lists this session's active asks across open issues and project documents, including whether the human or agent owes the next reply. With `dispatch_open_asks({ project })` it lists every open ask in that project — on its issues and on its documents, whoever authored them — which is how you audit what a whole project is waiting on rather than just your own asks.
383
388
 
384
- **Unsettled product shape needs a decision before implementation.** When a page, navigation entry, table key, customer-scoping rule, or persisted sidecar would set product shape that Sami has not already settled, send a one-line ask before the first implementation commit. A platform-PO schema or contract ruling does not settle product shape. This does not turn a user-specified decision or routine implementation into an approval request; it is inferred from AGENTC-186's 2026-09-16 retro (platform PO, 2026-09-17).
389
+ **Unsettled product shape needs a decision before implementation.** When a page, navigation entry, table key, customer-scoping rule, or persisted sidecar would set product shape that Sami has not already settled, send a one-line ask before the first implementation commit. A lane's schema decision or a platform-PO contract ruling does not settle product shape. This does not turn a user-specified decision or routine implementation into an approval request; it is inferred from AGENTC-186's 2026-09-16 retro (platform PO, 2026-09-17).
385
390
 
386
391
  **Anything that needs the human is an ask, or it does not exist.** An approval, a credential,
387
392
  a setting only they can change, a review click, a conflict between two of their own rules - if
388
- your work waits on it, open a `dispatch_ask` the moment you know, the action as the question.
393
+ your work waits on it, open a `dispatch_ask` the moment you know, the action as the question. The
394
+ exception is a halt condition from [Before you ask](#before-you-ask) gate 1, which goes to the
395
+ platform PO over Envoy instead.
389
396
  Never write it into a spec, a comment reply, a message, or a
390
397
  pull-request body: nothing in those paths reaches the human's Inbox, and a human who is not
391
398
  reading your document does not know they are the blocker. Before asking, try to remove the
@@ -535,6 +542,11 @@ type EditOp = {
535
542
  };
536
543
  ```
537
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
+
538
550
  Target `replace`, `delete`, and quote insert anchors by a block's text as rendered: write inline
539
551
  code without backticks, bold without asterisks, and link text without link syntax. A table-cell
540
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.1",
3
+ "version": "3.0.3",
4
4
  "type": "module",
5
5
  "omp": {
6
6
  "extensions": [