@sjawhar/pi-legion-envoy 2.0.2 → 2.0.4
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 +5 -2
- package/dist/legion.js +6 -3
- package/dist/skills/dispatch/SKILL.md +14 -5
- package/package.json +1 -1
package/dist/envoy.js
CHANGED
|
@@ -29656,6 +29656,7 @@ function serviceSubjectLabel(subject) {
|
|
|
29656
29656
|
}
|
|
29657
29657
|
var ASK_TURNS = ["human", "agent"];
|
|
29658
29658
|
var DELIVERY_CAPABILITIES = ["aside", "btw", "steer"];
|
|
29659
|
+
var DELIVERY_DUPLICATE_WINDOW_MS = 72 * 60 * 60 * 1000;
|
|
29659
29660
|
var DispatchEventSchema = exports_external.object({
|
|
29660
29661
|
issue_key: exports_external.string().nullable(),
|
|
29661
29662
|
artifact_id: exports_external.string().nullish(),
|
|
@@ -29743,6 +29744,7 @@ var CommentDeliverySchema = exports_external.object({
|
|
|
29743
29744
|
delivery: exports_external.enum(DELIVERY_CAPABILITIES),
|
|
29744
29745
|
session_id: exports_external.string().nullable(),
|
|
29745
29746
|
envelope_id: exports_external.string().nullable(),
|
|
29747
|
+
duplicate: exports_external.boolean().optional(),
|
|
29746
29748
|
state: exports_external.enum(["pending", "sent", "failed"]),
|
|
29747
29749
|
error: exports_external.string().nullable(),
|
|
29748
29750
|
resolve_error: exports_external.string().nullable(),
|
|
@@ -29828,6 +29830,7 @@ var MessageDeliveryEventPayloadSchema = exports_external.object({
|
|
|
29828
29830
|
target: exports_external.string().optional(),
|
|
29829
29831
|
title: exports_external.string().optional(),
|
|
29830
29832
|
state: exports_external.enum(["sent", "failed"]).optional(),
|
|
29833
|
+
duplicate: exports_external.boolean().optional(),
|
|
29831
29834
|
error: exports_external.string().optional()
|
|
29832
29835
|
});
|
|
29833
29836
|
var ChildStatusEventPayloadSchema = exports_external.object({
|
|
@@ -30120,7 +30123,7 @@ var dispatchToolSpecs = [
|
|
|
30120
30123
|
ask: "01234567-0000-4000-8000-000000000001",
|
|
30121
30124
|
question: "Ship the revised plan?"
|
|
30122
30125
|
},
|
|
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.",
|
|
30126
|
+
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
30127
|
arguments: (z2) => ({
|
|
30125
30128
|
ask: z2.string().describe("Ask id (uuid); an 8+ hex prefix unique among this session's own open asks works too."),
|
|
30126
30129
|
question: z2.string({ max: ASK_QUESTION_MAX }).describe(`Replacement decision question, at most ${ASK_QUESTION_MAX} characters.`).optional(),
|
|
@@ -30146,7 +30149,7 @@ var dispatchToolSpecs = [
|
|
|
30146
30149
|
kind: "retracted",
|
|
30147
30150
|
reason: "A newer question supersedes this one."
|
|
30148
30151
|
},
|
|
30149
|
-
description: "Retract an open question that is moot or resolve one after finding the answer. This closes the question without answering it.",
|
|
30152
|
+
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
30153
|
arguments: (z2) => ({
|
|
30151
30154
|
ask: z2.string().describe("Ask id (uuid) to close; an 8+ hex prefix unique among this session's own open asks " + "works too."),
|
|
30152
30155
|
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.
|
|
16145
|
+
version: "2.0.4",
|
|
16146
16146
|
type: "module",
|
|
16147
16147
|
omp: {
|
|
16148
16148
|
extensions: [
|
|
@@ -29728,6 +29728,7 @@ function serviceSubjectLabel(subject) {
|
|
|
29728
29728
|
}
|
|
29729
29729
|
var ASK_TURNS = ["human", "agent"];
|
|
29730
29730
|
var DELIVERY_CAPABILITIES = ["aside", "btw", "steer"];
|
|
29731
|
+
var DELIVERY_DUPLICATE_WINDOW_MS = 72 * 60 * 60 * 1000;
|
|
29731
29732
|
var DispatchEventSchema = exports_external.object({
|
|
29732
29733
|
issue_key: exports_external.string().nullable(),
|
|
29733
29734
|
artifact_id: exports_external.string().nullish(),
|
|
@@ -29815,6 +29816,7 @@ var CommentDeliverySchema = exports_external.object({
|
|
|
29815
29816
|
delivery: exports_external.enum(DELIVERY_CAPABILITIES),
|
|
29816
29817
|
session_id: exports_external.string().nullable(),
|
|
29817
29818
|
envelope_id: exports_external.string().nullable(),
|
|
29819
|
+
duplicate: exports_external.boolean().optional(),
|
|
29818
29820
|
state: exports_external.enum(["pending", "sent", "failed"]),
|
|
29819
29821
|
error: exports_external.string().nullable(),
|
|
29820
29822
|
resolve_error: exports_external.string().nullable(),
|
|
@@ -29900,6 +29902,7 @@ var MessageDeliveryEventPayloadSchema = exports_external.object({
|
|
|
29900
29902
|
target: exports_external.string().optional(),
|
|
29901
29903
|
title: exports_external.string().optional(),
|
|
29902
29904
|
state: exports_external.enum(["sent", "failed"]).optional(),
|
|
29905
|
+
duplicate: exports_external.boolean().optional(),
|
|
29903
29906
|
error: exports_external.string().optional()
|
|
29904
29907
|
});
|
|
29905
29908
|
var ChildStatusEventPayloadSchema = exports_external.object({
|
|
@@ -30192,7 +30195,7 @@ var dispatchToolSpecs = [
|
|
|
30192
30195
|
ask: "01234567-0000-4000-8000-000000000001",
|
|
30193
30196
|
question: "Ship the revised plan?"
|
|
30194
30197
|
},
|
|
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.",
|
|
30198
|
+
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
30199
|
arguments: (z2) => ({
|
|
30197
30200
|
ask: z2.string().describe("Ask id (uuid); an 8+ hex prefix unique among this session's own open asks works too."),
|
|
30198
30201
|
question: z2.string({ max: ASK_QUESTION_MAX }).describe(`Replacement decision question, at most ${ASK_QUESTION_MAX} characters.`).optional(),
|
|
@@ -30218,7 +30221,7 @@ var dispatchToolSpecs = [
|
|
|
30218
30221
|
kind: "retracted",
|
|
30219
30222
|
reason: "A newer question supersedes this one."
|
|
30220
30223
|
},
|
|
30221
|
-
description: "Retract an open question that is moot or resolve one after finding the answer. This closes the question without answering it.",
|
|
30224
|
+
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
30225
|
arguments: (z2) => ({
|
|
30223
30226
|
ask: z2.string().describe("Ask id (uuid) to close; an 8+ hex prefix unique among this session's own open asks " + "works too."),
|
|
30224
30227
|
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
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
the
|
|
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
|
|
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
|