@sjawhar/pi-legion-envoy 1.42.2 → 1.42.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.
@@ -183,6 +183,10 @@ passage with `anchor`. Follow up on an ask or comment with `dispatch_comment`; c
183
183
  with a `dispatch://` reference (see [References](#references)). Never write "see above", "the
184
184
  message above", or "as attached".
185
185
 
186
+ **A decision about an uploaded artifact links it.** If the human must read an artifact to answer,
187
+ the question carries `dispatch://KEY/artifact/<slug>` (or `ref`), never just its filename. Text
188
+ they must read to decide belongs in the spec in the first place — see [Artifacts](#artifacts).
189
+
186
190
  Before saying you are waiting for human input, call `dispatch_open_asks`. It lists this session's active asks across open issues and project documents, including whether the human or agent owes the next reply.
187
191
 
188
192
  **Anything that needs the human is an ask, or it does not exist.** An approval, a credential,
@@ -431,6 +435,15 @@ with your text. Never do that: the spec is edited in place with `dispatch_doc_ed
431
435
  artifact by the slug shown in the upload result or by its filename, and a project document by its artifact id, slug, or filename; the
432
436
  slug also arrives on `artifact.created` events.
433
437
 
438
+ **Where a deliverable goes.** Text the human must read to decide — a draft message, a proposal,
439
+ a summary — goes in the spec as a section: the spec is the one document they open. A separate
440
+ artifact is for a real file: something sent as-is, a long report, a binary, a screenshot.
441
+
442
+ When you do upload one, the spec links it as `dispatch://KEY/artifact/<slug>` (the `slug` from the
443
+ upload result; it renders as a link) at the place the reader needs it, and the ask that needs the
444
+ decision carries the same reference. A heading or a sentence naming the filename is not a
445
+ reference.
446
+
434
447
  Documents are CommonMark. A bare `<https://example.com|text>` is a CommonMark autolink and is normalised: the angle brackets are
435
448
  dropped and the URL keeps `|text`. A backslash-escaped `\<https://example.com|text>` displays as `<https://example.com|text>` in the
436
449
  document but comes back re-escaped (`\<`) from `dispatch_doc_read`. A Slack mrkdwn draft, or any other payload that is not Markdown,
@@ -607,3 +620,38 @@ dispatch_message({
607
620
  body: "Release 1.4 is live on the devbox (dispatch://LEGION-815/artifact/release-notes). Nothing needed from you.",
608
621
  })
609
622
  ```
623
+
624
+ Before — a draft the human must read is uploaded as a separate file, the spec only names it, and
625
+ the ask does not point at it, so the reader has to go looking:
626
+
627
+ ```ts
628
+ dispatch_artifact({ issue: "OPS-52", name: "cu-update-2026-09-15.md", content: "Hi team, ..." })
629
+ dispatch_doc_edit({ issue: "OPS-52", artifact: "spec", ops: [
630
+ { op: "insert", after: "## Context", markdown: "## Draft (artifact cu-update-2026-09-15.md)" },
631
+ ]})
632
+ dispatch_ask({ issue: "OPS-52", question: "Send the customer update as drafted?", options: [...] })
633
+ ```
634
+
635
+ After — the draft is a section of the spec, and the ask anchors there. If it really must be a
636
+ file (something to send as-is), the spec and the ask both link the slug from the upload result:
637
+
638
+ ```ts
639
+ dispatch_doc_edit({ issue: "OPS-52", artifact: "spec", ops: [
640
+ { op: "insert", after: "## Context", markdown: "## Draft\n\nHi team, ..." },
641
+ ]})
642
+ dispatch_ask({
643
+ issue: "OPS-52",
644
+ question: "Send the customer update as drafted?",
645
+ options: [...],
646
+ anchor: { artifact: "spec", quote: "Hi team," },
647
+ })
648
+ // or, for a real file — the spec links it where the reader needs it, and so does the ask:
649
+ dispatch_doc_edit({ issue: "OPS-52", artifact: "spec", ops: [
650
+ { op: "insert", after: "## Context", markdown: "## Draft\n\nThe update to send as-is: dispatch://OPS-52/artifact/cu-update-2026-09-15-md" },
651
+ ]})
652
+ dispatch_ask({
653
+ issue: "OPS-52",
654
+ question: "Send this customer update as-is? dispatch://OPS-52/artifact/cu-update-2026-09-15-md",
655
+ options: [...],
656
+ })
657
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-legion-envoy",
3
- "version": "1.42.2",
3
+ "version": "1.42.3",
4
4
  "type": "module",
5
5
  "omp": {
6
6
  "extensions": [