@sjawhar/opencode-legion-envoy 6.0.0 → 6.2.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/src/server.js
CHANGED
|
@@ -13605,6 +13605,12 @@ var askEventPayloadFields = {
|
|
|
13605
13605
|
question: exports_external.string().optional(),
|
|
13606
13606
|
options: exports_external.array(exports_external.object({ label: exports_external.string().optional() })).optional(),
|
|
13607
13607
|
answer: exports_external.object({ selected: exports_external.array(exports_external.string()).nullish(), text: exports_external.string().nullish() }).nullish(),
|
|
13608
|
+
previous_answer: exports_external.object({
|
|
13609
|
+
user: exports_external.string().optional(),
|
|
13610
|
+
selected: exports_external.array(exports_external.string()).nullish(),
|
|
13611
|
+
text: exports_external.string().nullish(),
|
|
13612
|
+
at: exports_external.string().optional()
|
|
13613
|
+
}).nullish(),
|
|
13608
13614
|
anchor: exports_external.object({
|
|
13609
13615
|
quote: exports_external.string().optional(),
|
|
13610
13616
|
mark_id: exports_external.string().optional(),
|
|
@@ -16595,8 +16601,10 @@ function eventHead(event) {
|
|
|
16595
16601
|
case "ask.handed_back":
|
|
16596
16602
|
case "ask.resolved":
|
|
16597
16603
|
return textHead(event.payload.question);
|
|
16598
|
-
case "ask.answered":
|
|
16599
|
-
|
|
16604
|
+
case "ask.answered": {
|
|
16605
|
+
const previousAnswer = event.payload.previous_answer;
|
|
16606
|
+
return `${textHead(event.payload.question)} -> ${textHead(askAnswerText(event.payload.answer))}${previousAnswer === undefined ? "" : ` (was: ${textHead(askAnswerText(previousAnswer))})`}`;
|
|
16607
|
+
}
|
|
16600
16608
|
case "comment.created":
|
|
16601
16609
|
case "comment.answered":
|
|
16602
16610
|
case "comment.anchor_refreshed":
|
|
@@ -16637,8 +16645,9 @@ function childrenSummary(issue2) {
|
|
|
16637
16645
|
].join(`
|
|
16638
16646
|
`);
|
|
16639
16647
|
}
|
|
16640
|
-
function askSummary({ ask, replies }, graph) {
|
|
16648
|
+
function askSummary({ ask, replies, answers }, graph) {
|
|
16641
16649
|
const answer = ask.answer;
|
|
16650
|
+
const earlierAnswers = answers.slice(0, -1);
|
|
16642
16651
|
const chain = replies.flatMap((reply) => [
|
|
16643
16652
|
`${reply.id} \xB7 ${actorText(reply.author)}`,
|
|
16644
16653
|
`Body: ${reply.body}`
|
|
@@ -16655,6 +16664,10 @@ function askSummary({ ask, replies }, graph) {
|
|
|
16655
16664
|
`- Selected: ${answer.selected.length === 0 ? "none" : answer.selected.join(", ")}`,
|
|
16656
16665
|
...answer.text === null ? [] : [`- Text: ${answer.text}`]
|
|
16657
16666
|
],
|
|
16667
|
+
...earlierAnswers.length === 0 ? [] : [
|
|
16668
|
+
"Earlier answers:",
|
|
16669
|
+
...earlierAnswers.map((earlier) => `- ${earlier.at} \xB7 ${earlier.user} \xB7 ${askAnswerText(earlier)}`)
|
|
16670
|
+
],
|
|
16658
16671
|
...ask.resolution === undefined ? [] : [
|
|
16659
16672
|
"Resolution:",
|
|
16660
16673
|
`- By: ${ask.resolution.actor.id}`,
|
package/package.json
CHANGED
package/skills/dispatch/SKILL.md
CHANGED
|
@@ -338,7 +338,7 @@ permission you already hold, an API that replaces the click. One ask per item, `
|
|
|
338
338
|
when work is stopped on it; while it is open, keep working on everything that is not.
|
|
339
339
|
|
|
340
340
|
Once an ask is open (who answers it, handing a human a to-do, editing, retracting or resolving it,
|
|
341
|
-
answering a clarification, whose turn a reply gives), see
|
|
341
|
+
answering a clarification, whose turn a reply gives, an answer the human changes), see
|
|
342
342
|
[Asks after they open](skill://dispatch/references/asks.md).
|
|
343
343
|
|
|
344
344
|
## Architecture components
|
|
@@ -45,6 +45,9 @@ dispatch_edit_ask({
|
|
|
45
45
|
At least one field besides `ask` is required. Use this only while the same decision remains open: it keeps the prior text in the event
|
|
46
46
|
log and invalidates any answer draft against the prior `edited_at` revision, so the human sees the new wording and explicitly reconfirms.
|
|
47
47
|
An answered or resolved ask cannot be edited. If the decision is moot or superseded, retract the old ask and open a new one.
|
|
48
|
+
A human can change an answer they gave. The change arrives as another `ask.answered` frame whose
|
|
49
|
+
`previous_answer` names the answer it replaced, through the same route the first answer took, and
|
|
50
|
+
`dispatch_read` of the ask lists every earlier answer. Act on the newest answer.
|
|
48
51
|
|
|
49
52
|
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
|
|
50
53
|
block along with the row, so the edit stands and the document reads the same. It changes only the fields you name: pass `urgency`
|
|
@@ -197,6 +197,6 @@ an existing paragraph is the question that should become a decision.
|
|
|
197
197
|
|
|
198
198
|
An ask block has two ids: the block id, shown as `:::ask{#<id> …}` in the rendered document and
|
|
199
199
|
taken bare by `move`/`delete` in `block` (the `block:<id>` form is only for `before`/`after`
|
|
200
|
-
anchors), and the ask id, which `dispatch_open_asks`, the dashboard's
|
|
201
|
-
and `dispatch_comment({ reply_to_ask })` use. They differ;
|
|
202
|
-
`not found`.
|
|
200
|
+
anchors), and the ask id, which `dispatch_open_asks`, the dashboard's ask links (`/asks/<id>`,
|
|
201
|
+
`?ask=`), `dispatch_read` and `dispatch_comment({ reply_to_ask })` use. They differ;
|
|
202
|
+
`dispatch://KEY/ask/<block-id>` answers `not found`.
|