@sjawhar/pi-legion-envoy 2.0.2 → 2.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
@@ -30120,7 +30120,7 @@ var dispatchToolSpecs = [
30120
30120
  ask: "01234567-0000-4000-8000-000000000001",
30121
30121
  question: "Ship the revised plan?"
30122
30122
  },
30123
- description: "Edit an open question in place. Use it to correct or refine the same decision; retract the " + "old ask and open a new one when the decision itself changes. Previous text remains in the " + "event log. Only the asking session can edit it; answered or resolved asks cannot be edited.",
30123
+ description: "Edit an open question in place. Use it to correct or refine the same decision; retract the " + "old ask and open a new one when the decision itself changes. Previous text remains in the " + "event log. Only the asking session can edit it; answered or resolved asks cannot be edited. " + "An ask that lives as an `ask` block in a document is written in the document too, changing " + "only the fields you name - pass urgency alone and the question's wording, formatting, links " + "and comment anchors are untouched - so the edit writes a document version and closes a " + "spec's design gate until that version is " + 'approved; an option label containing ": " and a question with a line beginning ":::" are ' + "refused, naming the field, because the block cannot carry them unchanged.",
30124
30124
  arguments: (z2) => ({
30125
30125
  ask: z2.string().describe("Ask id (uuid); an 8+ hex prefix unique among this session's own open asks works too."),
30126
30126
  question: z2.string({ max: ASK_QUESTION_MAX }).describe(`Replacement decision question, at most ${ASK_QUESTION_MAX} characters.`).optional(),
@@ -30146,7 +30146,7 @@ var dispatchToolSpecs = [
30146
30146
  kind: "retracted",
30147
30147
  reason: "A newer question supersedes this one."
30148
30148
  },
30149
- description: "Retract an open question that is moot or resolve one after finding the answer. This closes the question without answering it.",
30149
+ description: "Retract an open question that is moot or resolve one after finding the answer. This closes " + "the question without answering it. An ask that lives as an `ask` block in a document is " + 'closed in the document too. A reason beginning "removed from the document in version" is ' + "refused: that marks a retraction the document's own settlement wrote.",
30150
30150
  arguments: (z2) => ({
30151
30151
  ask: z2.string().describe("Ask id (uuid) to close; an 8+ hex prefix unique among this session's own open asks " + "works too."),
30152
30152
  kind: z2.enum(["retracted", "resolved"]).describe("Whether the ask is retracted or self-resolved."),
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: "2.0.2",
16145
+ version: "2.0.3",
16146
16146
  type: "module",
16147
16147
  omp: {
16148
16148
  extensions: [
@@ -30192,7 +30192,7 @@ var dispatchToolSpecs = [
30192
30192
  ask: "01234567-0000-4000-8000-000000000001",
30193
30193
  question: "Ship the revised plan?"
30194
30194
  },
30195
- description: "Edit an open question in place. Use it to correct or refine the same decision; retract the " + "old ask and open a new one when the decision itself changes. Previous text remains in the " + "event log. Only the asking session can edit it; answered or resolved asks cannot be edited.",
30195
+ description: "Edit an open question in place. Use it to correct or refine the same decision; retract the " + "old ask and open a new one when the decision itself changes. Previous text remains in the " + "event log. Only the asking session can edit it; answered or resolved asks cannot be edited. " + "An ask that lives as an `ask` block in a document is written in the document too, changing " + "only the fields you name - pass urgency alone and the question's wording, formatting, links " + "and comment anchors are untouched - so the edit writes a document version and closes a " + "spec's design gate until that version is " + 'approved; an option label containing ": " and a question with a line beginning ":::" are ' + "refused, naming the field, because the block cannot carry them unchanged.",
30196
30196
  arguments: (z2) => ({
30197
30197
  ask: z2.string().describe("Ask id (uuid); an 8+ hex prefix unique among this session's own open asks works too."),
30198
30198
  question: z2.string({ max: ASK_QUESTION_MAX }).describe(`Replacement decision question, at most ${ASK_QUESTION_MAX} characters.`).optional(),
@@ -30218,7 +30218,7 @@ var dispatchToolSpecs = [
30218
30218
  kind: "retracted",
30219
30219
  reason: "A newer question supersedes this one."
30220
30220
  },
30221
- description: "Retract an open question that is moot or resolve one after finding the answer. This closes the question without answering it.",
30221
+ description: "Retract an open question that is moot or resolve one after finding the answer. This closes " + "the question without answering it. An ask that lives as an `ask` block in a document is " + 'closed in the document too. A reason beginning "removed from the document in version" is ' + "refused: that marks a retraction the document's own settlement wrote.",
30222
30222
  arguments: (z2) => ({
30223
30223
  ask: z2.string().describe("Ask id (uuid) to close; an 8+ hex prefix unique among this session's own open asks " + "works too."),
30224
30224
  kind: z2.enum(["retracted", "resolved"]).describe("Whether the ask is retracted or self-resolved."),
@@ -417,10 +417,16 @@ At least one field besides `ask` is required. Use this only while the same decis
417
417
  log and invalidates any answer draft against the prior `edited_at` revision, so the human sees the new wording and explicitly reconfirms.
418
418
  An answered or resolved ask cannot be edited. If the decision is moot or superseded, retract the old ask and open a new one.
419
419
 
420
- An ask that lives as an `ask` block in a document takes its question and options from the document, so edit those with
421
- `dispatch_doc_edit` (`replace` on the block's text, or `delete`/`insert` on its option items), never with `dispatch_edit_ask`: the
422
- next document save reasserts the block's text over whatever `dispatch_edit_ask` wrote, and that reversal is logged as an edit by
423
- the document's saver. `dispatch_edit_ask` is for asks opened with `dispatch_ask` that have no block.
420
+ An ask that lives as an `ask` block in a document keeps its question and options in the block, and `dispatch_edit_ask` writes the
421
+ block along with the row, so the edit stands and the document reads the same. It changes only the fields you name: pass `urgency`
422
+ alone and the question's own wording, formatting, links and comment anchors are untouched. Pass `question` or `options` and that part
423
+ is rewritten, so anchors inside the text you replaced move as they would for any document edit. Either way it is a document edit: it
424
+ writes a new version, which on a spec awaiting approval closes the design gate until the new version is approved. Editing the block
425
+ with `dispatch_doc_edit` works too and is the way to change anything else about it, including adding formatting to a question.
426
+ Re-sending a field unchanged rewrites nothing, so retrying the whole ask is safe.
427
+ Two shapes the block cannot carry are refused outright, naming the field and writing nothing: an option label containing `": "`,
428
+ which is what separates a label from its description, and a question with a line beginning `:::`. Blank lines separate paragraphs;
429
+ a single newline is kept as a line break.
424
430
 
425
431
  An ask stays open until a human answers, unless its question no longer needs that answer. Retract a moot or superseded question, or
426
432
  self-resolve one after finding the answer:
@@ -432,7 +438,10 @@ dispatch_resolve_ask({
432
438
  })
433
439
  ```
434
440
  Use `retracted` when the question is obsolete and `resolved` when you found the answer. Include the reason because the question remains
435
- in its Conversation card and reply thread. Resolution is not an answer: it never records a human decision, and an answered ask cannot be
441
+ in its Conversation card and reply thread; a reason beginning `removed from the document in version` is refused, because that is how a
442
+ retraction the document's own settlement wrote is recognised. Resolving a block ask records it in the block too, so it stays resolved
443
+ however the document moves afterwards — while deleting the block from the document is the other way to close one, and putting the block
444
+ back reopens it. Resolution is not an answer: it never records a human decision, and an answered ask cannot be
436
445
  resolved. A human may reply to an open or answered ask; so may you, e.g. after finding the answer — use `reply_to_ask` on
437
446
  `dispatch_comment` (mutually exclusive with `reply_to`).
438
447
  A review comment you opened has its own closer, `dispatch_resolve_comment` — see
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-legion-envoy",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "type": "module",
5
5
  "omp": {
6
6
  "extensions": [