@sjawhar/pi-envoy 10.9.2 → 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;
|
|
@@ -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
|