@sjawhar/pi-envoy 10.9.1 → 10.9.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/dispatch.js CHANGED
@@ -16574,6 +16574,18 @@ function dispatchRefFromUrl(value, serverUrl) {
16574
16574
  }
16575
16575
  var refGrammarProblem = "ref must be a valid dispatch:// reference such as dispatch://KEY-1, " + "dispatch://KEY-1/ask/<uuid>, dispatch://KEY-1/comment/<uuid>, " + "dispatch://KEY-1/message/<uuid>, dispatch://KEY-1/artifact/<slug>, " + "dispatch://PROJECT/artifact/<document-ref> (an artifact id, slug, or filename), or " + "dispatch://agent/<session id>/artifact/<slug> (a picture in a conversation on the Agents page, " + "for dispatch doc-read); a dashboard URL on this Dispatch server is accepted too";
16576
16576
  var ownerRequiredProblem = "issue is required; supply issue or set LEGION_ISSUE";
16577
+ function innerRefProblem(tool, ref, refText) {
16578
+ if (ref.kind !== "ask" && ref.kind !== "comment" && ref.kind !== "message")
16579
+ return;
16580
+ if (tool === "dispatch_read" || tool === "dispatch_ask")
16581
+ return;
16582
+ const owner = refOwnerName(ref);
16583
+ const documentTool = tool === "dispatch_suggest" || tool === "dispatch_doc_edit";
16584
+ const ownerArguments = ref.owner.kind === "issue" ? `issue ${ref.owner.issue}${documentTool ? " and artifact <the document's slug>" : ""}` : `project ${ref.owner.project} and artifact ${ref.artifact}`;
16585
+ const fix = tool === "dispatch_comment" && ref.kind === "ask" ? `reply under it with reply_to_ask ${ref.id} and ${ownerArguments}` : tool === "dispatch_comment" && ref.kind === "comment" ? `reply in its thread with reply_to ${ref.id} and ${ownerArguments}` : `read it with dispatch read, or name ${owner} with ${ownerArguments}`;
16586
+ const item = ref.kind === "ask" ? "an ask" : `a ${ref.kind}`;
16587
+ return `ref ${refText} names ${item} on ${owner}; dispatch ${commandName(tool)} would act on ${owner} and drop the ${ref.kind}: ${fix}`;
16588
+ }
16577
16589
  var toolSchemas = new Map;
16578
16590
  function toolSchema(tool) {
16579
16591
  const cached2 = toolSchemas.get(tool);
@@ -16609,6 +16621,10 @@ async function resolveOwnerArguments(tool, input, cwd, env, exec, dashboardUrls,
16609
16621
  ref = parseDispatchRef(refText);
16610
16622
  if (ref === null) {
16611
16623
  problems.push(tool === "dispatch_ask" && !refText.startsWith("dispatch://") ? "ref must be a dispatch:// reference" : refGrammarProblem);
16624
+ } else {
16625
+ const inner = innerRefProblem(tool, ref, refText);
16626
+ if (inner !== undefined)
16627
+ problems.push(inner);
16612
16628
  }
16613
16629
  }
16614
16630
  const issueArgument = args.issue;
@@ -71,7 +71,7 @@ not share this session's vocabulary, and is often on a phone. Write for that per
71
71
  - Before posting, test it: could the human, reading only this text on their phone, know what they are being
72
72
  told or asked? If not, rewrite it. Length is not the problem; density is.
73
73
  - When an ask or message communicates a judgment, lead with that judgment in one sentence and put the mechanism underneath it. Do not make the reader ask a second time whether the result is a win. This shapes communication only when a judgment exists; it does not pre-decide an open question or remove its genuine options.
74
- - When a Dispatch message states a root cause, include the reproducing command or test in that same message. Without it, label the diagnosis a hypothesis; a diagnosis still in progress may say so plainly. This boundary applies to causal claims, not to reporting that an investigation has started.
74
+ - When an ask, comment or message states a root cause or a blocker, include the command, error output or record that shows it, with its time, in that same text. Without it, label the diagnosis a hypothesis; a diagnosis still in progress may say so plainly. This boundary applies to causal claims, not to reporting that an investigation has started.
75
75
 
76
76
  ## Writing a spec
77
77
 
@@ -157,7 +157,7 @@ Labels are optional: Dispatch trims them, preserves their case, and removes case
157
157
  the new key; creating an issue does not subscribe you to it (see [Following](#following)). Use `dispatch issue` only to create an issue; never use it to park a question. When you pass a spec,
158
158
  follow [Writing a spec](#writing-a-spec).
159
159
 
160
- When the work needs a project that does not exist yet, create it yourself with `dispatch project --key <KEY> --name '<name>'`; nobody has to make it by hand. Projects cannot be renamed or deleted, so a mistyped key stays for good: check the keys that exist first with `dispatch projects`. A key that already exists is refused with `PROJECT_EXISTS`.
160
+ Work goes in a project that exists: `dispatch projects` lists them, and work that spans projects goes in the one that owns most of it. Create a project only when the human asks for one, with `dispatch project --key <KEY> --name '<name>'`. Projects cannot be renamed or deleted, so a mistyped key stays for good. A key that already exists is refused with `PROJECT_EXISTS`.
161
161
 
162
162
  ## Search first
163
163
 
@@ -272,7 +272,7 @@ instead of pointing at another message in prose (below), is the asking session's
272
272
  Open a standalone ask with `dispatch ask` (`dispatch ask --help` lists its flags), one `--option` per choice:
273
273
  ```bash
274
274
  dispatch ask --issue <KEY> --question-file - --option 'Label: what it costs' --option 'Other: what it costs' <<'EOF'
275
- <the problem, what constrains the answer, and your recommendation with its reason>
275
+ <the problem, what constrains the answer (each answer of his you rely on, linked), and your recommendation with its reason>
276
276
  EOF
277
277
  ```
278
278
  It prints the ask's id; you follow the ask you opened (see [Following](#following)).
@@ -79,6 +79,9 @@ dispatch comment --issue <KEY> --artifact spec --quote '<the passage>' --body '<
79
79
  It prints the comment's id; a `--reply-to-ask` reply also makes you one of the ask's followers
80
80
  (see [Following](skill://dispatch/references/asks.md)).
81
81
  `--ref` names the owner (an issue or project-document reference) in place of `--issue`/`--project`.
82
+ An ask, comment or message link there is refused, since the comment would land outside it: reply
83
+ under an ask with `--reply-to-ask`, in a comment's thread with `--reply-to`, and read a message
84
+ with `dispatch read`.
82
85
  `--quote` requires `--artifact`; its anchor is pinned to the containing block while retaining the quote
83
86
  for display. Omit both for a floating issue comment. A reply (`--reply-to`/`--reply-to-ask`) takes no
84
87
  `--quote`; it belongs to its parent's anchor. Reply to any comment in a thread; the server keeps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-envoy",
3
- "version": "10.9.1",
3
+ "version": "10.9.3",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "omp": {