@sjawhar/opencode-legion-envoy 0.42.0 → 0.43.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 +13 -7
- package/package.json +1 -1
- package/skills/dispatch/SKILL.md +16 -8
package/dist/src/server.js
CHANGED
|
@@ -13685,15 +13685,17 @@ function dispatchToolSchema(spec, z, opts) {
|
|
|
13685
13685
|
}
|
|
13686
13686
|
var ISSUE_REFERENCE = "An issue is a native KEY or external owner/repo#n reference; an external reference creates its native issue in the repository's dashboard-configured project or, failing that, the default project (DISPATCH_DEFAULT_PROJECT).";
|
|
13687
13687
|
var OWNER_REFERENCE = "Exactly one of issue and project is required. An issue is a native KEY or external owner/repo#n reference; a project is a project key such as CORE and addresses an unlinked project document named by artifact.";
|
|
13688
|
-
function documentOwnerValidation(requireArtifact) {
|
|
13688
|
+
function documentOwnerValidation(requireArtifact, alwaysRequireArtifact = false) {
|
|
13689
13689
|
return {
|
|
13690
13690
|
check: (value) => {
|
|
13691
13691
|
const input = value;
|
|
13692
13692
|
const hasIssue = typeof input.issue === "string";
|
|
13693
13693
|
const hasProject = typeof input.project === "string";
|
|
13694
|
-
|
|
13694
|
+
const hasArtifact = typeof input.artifact === "string";
|
|
13695
|
+
const hasRef = typeof input.ref === "string";
|
|
13696
|
+
return (hasIssue !== hasProject || !hasIssue && !hasProject && hasRef) && (!hasProject || !requireArtifact || hasArtifact) && (!alwaysRequireArtifact || hasArtifact || hasRef);
|
|
13695
13697
|
},
|
|
13696
|
-
message: "Exactly one of issue and project is required; with project, artifact names the document."
|
|
13698
|
+
message: alwaysRequireArtifact ? "Exactly one of issue and project is required; artifact or ref must name the document." : "Exactly one of issue and project is required; with project, artifact names the document."
|
|
13697
13699
|
};
|
|
13698
13700
|
}
|
|
13699
13701
|
var SPEC_SECTIONS = [
|
|
@@ -13728,6 +13730,7 @@ var dispatchToolSpecs = [
|
|
|
13728
13730
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
13729
13731
|
project: z.string().describe("Project key owning the document.").optional(),
|
|
13730
13732
|
artifact: z.string().describe("Project document slug or id.").optional(),
|
|
13733
|
+
ref: z.string().describe("Optional dispatch:// issue or document reference.").optional(),
|
|
13731
13734
|
question: z.string({ max: 800 }).describe("Decision question, at most 800 characters."),
|
|
13732
13735
|
options: z.array(z.object({
|
|
13733
13736
|
label: z.string().describe("Selectable option label."),
|
|
@@ -13780,6 +13783,7 @@ var dispatchToolSpecs = [
|
|
|
13780
13783
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
13781
13784
|
project: z.string().describe("Project key owning the document.").optional(),
|
|
13782
13785
|
artifact: z.string().describe("Artifact slug or id required when quote is given.").optional(),
|
|
13786
|
+
ref: z.string().describe("Optional dispatch:// issue or document reference.").optional(),
|
|
13783
13787
|
quote: z.string().describe("Optional exact quoted document text.").optional(),
|
|
13784
13788
|
occurrence: z.number({ int: true, min: 0 }).describe("Optional zero-based occurrence of quote.").optional(),
|
|
13785
13789
|
body: z.string({ max: 2000 }).describe("Review comment, at most 2,000 characters."),
|
|
@@ -13794,13 +13798,14 @@ var dispatchToolSpecs = [
|
|
|
13794
13798
|
arguments: (z) => ({
|
|
13795
13799
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
13796
13800
|
project: z.string().describe("Project key owning the document.").optional(),
|
|
13797
|
-
artifact: z.string().describe("Artifact slug or id containing the quoted text."),
|
|
13801
|
+
artifact: z.string().describe("Artifact slug or id containing the quoted text; optional when ref names it.").optional(),
|
|
13802
|
+
ref: z.string().describe("Optional dispatch:// issue or document reference.").optional(),
|
|
13798
13803
|
quote: z.string().describe("Exact document text to replace."),
|
|
13799
13804
|
replace_with: z.string().describe("Replacement text."),
|
|
13800
13805
|
body: z.string({ max: 2000 }).describe("Optional rationale, at most 2,000 characters.").optional(),
|
|
13801
13806
|
occurrence: z.number({ int: true, min: 0 }).describe("Optional zero-based occurrence of quote.").optional()
|
|
13802
13807
|
}),
|
|
13803
|
-
validation: documentOwnerValidation(true)
|
|
13808
|
+
validation: documentOwnerValidation(true, true)
|
|
13804
13809
|
},
|
|
13805
13810
|
{
|
|
13806
13811
|
name: "dispatch_message",
|
|
@@ -13817,7 +13822,8 @@ var dispatchToolSpecs = [
|
|
|
13817
13822
|
arguments: (z) => ({
|
|
13818
13823
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
13819
13824
|
project: z.string().describe("Project key owning the document.").optional(),
|
|
13820
|
-
artifact: z.string().describe("Artifact slug or id for the document."),
|
|
13825
|
+
artifact: z.string().describe("Artifact slug or id for the document; optional when ref names it.").optional(),
|
|
13826
|
+
ref: z.string().describe("Optional dispatch:// issue or document reference.").optional(),
|
|
13821
13827
|
ops: z.array(z.object({
|
|
13822
13828
|
op: z.enum(DOC_EDIT_OPS).describe("Edit operation."),
|
|
13823
13829
|
find: z.string().describe("Text to find for replace or delete.").optional(),
|
|
@@ -13829,7 +13835,7 @@ var dispatchToolSpecs = [
|
|
|
13829
13835
|
})).describe("Flat tagged edits; the server validates fields required for each operation."),
|
|
13830
13836
|
summary: z.string().describe("Optional named-version summary.").optional()
|
|
13831
13837
|
}),
|
|
13832
|
-
validation: documentOwnerValidation(true)
|
|
13838
|
+
validation: documentOwnerValidation(true, true)
|
|
13833
13839
|
},
|
|
13834
13840
|
{
|
|
13835
13841
|
name: "dispatch_doc_read",
|
package/package.json
CHANGED
package/skills/dispatch/SKILL.md
CHANGED
|
@@ -169,19 +169,22 @@ retrying. Pass `summary` to name the version when recording a decision.
|
|
|
169
169
|
Add feedback with:
|
|
170
170
|
|
|
171
171
|
```ts
|
|
172
|
-
dispatch_comment({ issue?, project?, artifact?, quote?, occurrence?, body, reply_to?, reply_to_ask? })
|
|
172
|
+
dispatch_comment({ issue?, project?, artifact?, ref?, quote?, occurrence?, body, reply_to?, reply_to_ask? })
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
-
It returns issue or project-document owner details plus `comment` and, for writes, `topic`.
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
175
|
+
It returns issue or project-document owner details plus `comment` and, for writes, `topic`.
|
|
176
|
+
`ref` names the owner (an issue or project-document reference) in place of `issue`/`project`.
|
|
177
|
+
`quote` requires `artifact`; omit both for a floating issue comment. A reply (`reply_to`/`reply_to_ask`)
|
|
178
|
+
takes no `quote`; it belongs to its parent's anchor. Use `reply_to` to continue a comment thread at
|
|
179
|
+
its root; a reply to a resolved thread reopens it. Use `reply_to_ask` to reply directly under a
|
|
180
|
+
question asked with `dispatch_ask`. Comments are edited only by their author from the dashboard. A
|
|
181
|
+
delivered `comment.created` event carries the comment `id`; reply to it with
|
|
182
|
+
`dispatch_comment({ reply_to: <id> })`.
|
|
180
183
|
|
|
181
184
|
Propose an exact replacement instead of describing it:
|
|
182
185
|
|
|
183
186
|
```ts
|
|
184
|
-
dispatch_suggest({ issue?, project?, artifact, quote, replace_with, body?, occurrence? })
|
|
187
|
+
dispatch_suggest({ issue?, project?, artifact, ref?, quote, replace_with, body?, occurrence? })
|
|
185
188
|
```
|
|
186
189
|
|
|
187
190
|
It returns issue or project-document owner details plus `comment` and its write `topic`. A human accepts or rejects a suggestion.
|
|
@@ -238,7 +241,12 @@ message ref, it returns that message and its reply chain. Reads do not subscribe
|
|
|
238
241
|
|
|
239
242
|
## References
|
|
240
243
|
|
|
241
|
-
Use these in document, ask, comment, and message bodies
|
|
244
|
+
Use these in document, ask, comment, and message bodies. In the dashboard, a reference renders
|
|
245
|
+
as an inline link whose text is the target's title (an issue's title, an ask's question, a
|
|
246
|
+
comment's first line, a document's name) once it resolves; a body that is only a bare reference
|
|
247
|
+
still gets an unfurl card instead. Every `ref` argument below (and `issue`/`project`) accepts
|
|
248
|
+
either form — an issue key or a project key is never ambiguous, since a project key never
|
|
249
|
+
contains a dash:
|
|
242
250
|
|
|
243
251
|
```text
|
|
244
252
|
dispatch://KEY
|