@sjawhar/pi-legion-envoy 1.18.0 → 1.19.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/envoy.js +8 -1
- package/dist/legion.js +8 -1
- package/dist/skills/dispatch/SKILL.md +3 -3
- package/package.json +1 -1
package/dist/envoy.js
CHANGED
|
@@ -29664,6 +29664,7 @@ var IssueEventPayloadSchema = object({
|
|
|
29664
29664
|
title: string2().optional(),
|
|
29665
29665
|
labels: array(string2()).optional(),
|
|
29666
29666
|
status: string2().optional(),
|
|
29667
|
+
priority: number2().int().min(0).max(3).nullable().optional(),
|
|
29667
29668
|
rank: string2().optional(),
|
|
29668
29669
|
route: string2().nullish()
|
|
29669
29670
|
});
|
|
@@ -29859,7 +29860,8 @@ var dispatchToolSpecs = [
|
|
|
29859
29860
|
external: z.string().describe("Optional external issue reference.").optional(),
|
|
29860
29861
|
force: z.boolean().describe("Create even though POSSIBLE_DUPLICATE listed similar issues; pass it only after reading them.").optional(),
|
|
29861
29862
|
spec: z.string().describe(`Optional initial primary-document markdown. ${SPEC_WRITING_GUIDANCE}`).optional(),
|
|
29862
|
-
labels: z.array(z.string({ min: 1, max: 40 }), { max: 20 }).describe("Optional initial labels, at most 20 labels of up to 40 characters.").optional()
|
|
29863
|
+
labels: z.array(z.string({ min: 1, max: 40 }), { max: 20 }).describe("Optional initial labels, at most 20 labels of up to 40 characters.").optional(),
|
|
29864
|
+
priority: z.number({ int: true, min: 0, max: 3 }).describe("Optional coarse priority: P0 is highest and P3 is lowest.").optional()
|
|
29863
29865
|
})
|
|
29864
29866
|
},
|
|
29865
29867
|
{
|
|
@@ -32195,10 +32197,13 @@ function issueSummary(issue, events, references) {
|
|
|
32195
32197
|
const asks = issue.open_asks;
|
|
32196
32198
|
const spec = issue.artifacts?.find((artifact) => artifact.primary);
|
|
32197
32199
|
const specApproval = spec === undefined ? undefined : approvalLine(spec);
|
|
32200
|
+
if (issue.priority === undefined)
|
|
32201
|
+
throw new Error("Dispatch issue is missing priority");
|
|
32198
32202
|
return [
|
|
32199
32203
|
`Title: ${issue.title}`,
|
|
32200
32204
|
`Key: ${issue.key}`,
|
|
32201
32205
|
`Status: ${issue.status}`,
|
|
32206
|
+
...issue.priority === null ? [] : [`Priority: P${issue.priority}`],
|
|
32202
32207
|
`Labels: ${issue.labels.length === 0 ? "none" : issue.labels.join(", ")}`,
|
|
32203
32208
|
`Route: ${issue.route ?? "none"}`,
|
|
32204
32209
|
...specApproval === undefined ? [] : [`Spec ${specApproval.replace(/^Approval/, "approval")}`],
|
|
@@ -32332,6 +32337,7 @@ async function executeDispatchTool(input) {
|
|
|
32332
32337
|
const external = optionalString(args, "external");
|
|
32333
32338
|
const force = optionalBoolean(args, "force");
|
|
32334
32339
|
const spec = optionalString(args, "spec");
|
|
32340
|
+
const priority = optionalNumber(args, "priority");
|
|
32335
32341
|
const labels = args.labels;
|
|
32336
32342
|
try {
|
|
32337
32343
|
const created = await client.issue({
|
|
@@ -32341,6 +32347,7 @@ async function executeDispatchTool(input) {
|
|
|
32341
32347
|
...external === undefined ? {} : { external },
|
|
32342
32348
|
...force === undefined ? {} : { force },
|
|
32343
32349
|
...spec === undefined ? {} : { spec },
|
|
32350
|
+
...priority === undefined ? {} : { priority },
|
|
32344
32351
|
...Array.isArray(labels) ? { labels } : {},
|
|
32345
32352
|
actor
|
|
32346
32353
|
});
|
package/dist/legion.js
CHANGED
|
@@ -29664,6 +29664,7 @@ var IssueEventPayloadSchema = object({
|
|
|
29664
29664
|
title: string2().optional(),
|
|
29665
29665
|
labels: array(string2()).optional(),
|
|
29666
29666
|
status: string2().optional(),
|
|
29667
|
+
priority: number2().int().min(0).max(3).nullable().optional(),
|
|
29667
29668
|
rank: string2().optional(),
|
|
29668
29669
|
route: string2().nullish()
|
|
29669
29670
|
});
|
|
@@ -29859,7 +29860,8 @@ var dispatchToolSpecs = [
|
|
|
29859
29860
|
external: z.string().describe("Optional external issue reference.").optional(),
|
|
29860
29861
|
force: z.boolean().describe("Create even though POSSIBLE_DUPLICATE listed similar issues; pass it only after reading them.").optional(),
|
|
29861
29862
|
spec: z.string().describe(`Optional initial primary-document markdown. ${SPEC_WRITING_GUIDANCE}`).optional(),
|
|
29862
|
-
labels: z.array(z.string({ min: 1, max: 40 }), { max: 20 }).describe("Optional initial labels, at most 20 labels of up to 40 characters.").optional()
|
|
29863
|
+
labels: z.array(z.string({ min: 1, max: 40 }), { max: 20 }).describe("Optional initial labels, at most 20 labels of up to 40 characters.").optional(),
|
|
29864
|
+
priority: z.number({ int: true, min: 0, max: 3 }).describe("Optional coarse priority: P0 is highest and P3 is lowest.").optional()
|
|
29863
29865
|
})
|
|
29864
29866
|
},
|
|
29865
29867
|
{
|
|
@@ -32621,10 +32623,13 @@ function issueSummary(issue, events, references) {
|
|
|
32621
32623
|
const asks = issue.open_asks;
|
|
32622
32624
|
const spec = issue.artifacts?.find((artifact) => artifact.primary);
|
|
32623
32625
|
const specApproval = spec === undefined ? undefined : approvalLine(spec);
|
|
32626
|
+
if (issue.priority === undefined)
|
|
32627
|
+
throw new Error("Dispatch issue is missing priority");
|
|
32624
32628
|
return [
|
|
32625
32629
|
`Title: ${issue.title}`,
|
|
32626
32630
|
`Key: ${issue.key}`,
|
|
32627
32631
|
`Status: ${issue.status}`,
|
|
32632
|
+
...issue.priority === null ? [] : [`Priority: P${issue.priority}`],
|
|
32628
32633
|
`Labels: ${issue.labels.length === 0 ? "none" : issue.labels.join(", ")}`,
|
|
32629
32634
|
`Route: ${issue.route ?? "none"}`,
|
|
32630
32635
|
...specApproval === undefined ? [] : [`Spec ${specApproval.replace(/^Approval/, "approval")}`],
|
|
@@ -32758,6 +32763,7 @@ async function executeDispatchTool(input) {
|
|
|
32758
32763
|
const external = optionalString(args, "external");
|
|
32759
32764
|
const force = optionalBoolean(args, "force");
|
|
32760
32765
|
const spec = optionalString(args, "spec");
|
|
32766
|
+
const priority = optionalNumber(args, "priority");
|
|
32761
32767
|
const labels = args.labels;
|
|
32762
32768
|
try {
|
|
32763
32769
|
const created = await client.issue({
|
|
@@ -32767,6 +32773,7 @@ async function executeDispatchTool(input) {
|
|
|
32767
32773
|
...external === undefined ? {} : { external },
|
|
32768
32774
|
...force === undefined ? {} : { force },
|
|
32769
32775
|
...spec === undefined ? {} : { spec },
|
|
32776
|
+
...priority === undefined ? {} : { priority },
|
|
32770
32777
|
...Array.isArray(labels) ? { labels } : {},
|
|
32771
32778
|
actor
|
|
32772
32779
|
});
|
|
@@ -78,13 +78,13 @@ exactly one owner to every owner-scoped tool: `issue` for an issue, or `project`
|
|
|
78
78
|
[References](#references) for the resulting ref shape). On first use, an external issue reference creates its native issue in the
|
|
79
79
|
project configured for that repository in Dispatch Settings, then falls back to `DISPATCH_DEFAULT_PROJECT`.
|
|
80
80
|
|
|
81
|
-
Issue reads include `rank`, the server-owned ordering key used by project boards; reorder through `PATCH /api/v1/issues/{key}` with neighboring issue keys
|
|
81
|
+
Issue reads include `rank`, the server-owned ordering key used by project boards; reorder through `PATCH /api/v1/issues/{key}` with neighboring issue keys. They also include nullable coarse priority (`P0` highest through `P3` lowest).
|
|
82
82
|
|
|
83
83
|
Architects create newly tracked child work with:
|
|
84
84
|
```ts
|
|
85
|
-
dispatch_issue({ project, title, parent?, external?, spec?, force?, labels?: string[] })
|
|
85
|
+
dispatch_issue({ project, title, parent?, external?, spec?, force?, labels?: string[], priority?: 0 | 1 | 2 | 3 })
|
|
86
86
|
```
|
|
87
|
-
`labels` are optional initial labels: Dispatch trims them, preserves their case, and removes case-insensitive duplicates. It returns
|
|
87
|
+
`labels` are optional initial labels: Dispatch trims them, preserves their case, and removes case-insensitive duplicates. Set `priority` on creation only when the human's intent makes the bucket clear; otherwise priority remains the human's decision. It returns
|
|
88
88
|
`details` `{ issue, topic }`. Use `dispatch_issue` only to create an issue; never use it to park a question. When `spec` is supplied,
|
|
89
89
|
follow [Writing a spec](#writing-a-spec).
|
|
90
90
|
|