@sjawhar/pi-envoy 11.5.3 → 11.7.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/README.md +6 -6
- package/dist/dispatch.js +64 -19
- package/dist/envoy.js +18 -11
- package/dist/skills/dispatch/SKILL.md +2 -2
- package/dist/skills/dispatch-writing-specs/SKILL.md +5 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -89,10 +89,10 @@ omp plugin install @sjawhar/pi-envoy
|
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
A session that had the pre-split package installed (the one package that carried both entries
|
|
92
|
-
until 7.x) uninstalls it and installs this one once; the
|
|
93
|
-
the two commands. A Legion deployment installs
|
|
94
|
-
(`packages/pi-legion/README.md`); the daemon's boot gate refuses a
|
|
95
|
-
pre-split package beside the new ones.
|
|
92
|
+
until 7.x) uninstalls it and installs this one once; the `CHANGELOG.md` entry that renames the
|
|
93
|
+
package `@sjawhar/pi-envoy` gives the two commands. A Legion deployment installs
|
|
94
|
+
`@sjawhar/pi-legion` as well (`packages/pi-legion/README.md`); the daemon's boot gate refuses a
|
|
95
|
+
pane that still loads the pre-split package beside the new ones.
|
|
96
96
|
|
|
97
97
|
The tarball is self-contained: it ships `dist/envoy.js` — bundling every dependency except the OMP
|
|
98
98
|
host packages (`@legion/pi-shared`, `@legion/contracts` and `@legion/envoy-client` are inlined) —
|
|
@@ -115,8 +115,8 @@ for `omp.extensions` (only `omp.skills` ships as committed, since `dist/skills`
|
|
|
115
115
|
a repo checkout after the prepack and the published tarball), while the committed manifest keeps
|
|
116
116
|
the TypeScript entry for repo checkouts. In `.github/workflows/release.yaml`, the `pi_envoy_build`
|
|
117
117
|
job rewrites the manifest before `bun pm pack` and uploads the tarball (its tree is discarded,
|
|
118
|
-
nothing is restored); the `
|
|
119
|
-
|
|
118
|
+
nothing is restored); the `publish` job publishes that tarball and commits the version bump to the
|
|
119
|
+
committed manifest, touching `.version` alone.
|
|
120
120
|
Packing with the committed source manifest is refused by the prepack, because such a tarball would
|
|
121
121
|
point OMP at an extension file it does not contain.
|
|
122
122
|
|
package/dist/dispatch.js
CHANGED
|
@@ -13894,7 +13894,10 @@ var IssueEventPayloadSchema = object({
|
|
|
13894
13894
|
status: string2().optional(),
|
|
13895
13895
|
priority: number2().int().min(0).max(3).nullable().optional(),
|
|
13896
13896
|
rank: string2().optional(),
|
|
13897
|
-
route: string2().nullish()
|
|
13897
|
+
route: string2().nullish(),
|
|
13898
|
+
changed: array(string2()).optional(),
|
|
13899
|
+
ancestors: array(string2()).optional(),
|
|
13900
|
+
thread_logins: array(string2()).optional()
|
|
13898
13901
|
});
|
|
13899
13902
|
var ArtifactCreatedEventPayloadSchema = object({
|
|
13900
13903
|
artifact: object({ id: string2().optional(), slug: string2().optional(), name: string2().optional() }).optional()
|
|
@@ -13948,11 +13951,12 @@ var askEventPayloadFields = {
|
|
|
13948
13951
|
primary: boolean2().optional()
|
|
13949
13952
|
}).optional(),
|
|
13950
13953
|
resolution: object({
|
|
13951
|
-
kind: _enum2(["retracted", "resolved"]).optional(),
|
|
13954
|
+
kind: _enum2(["retracted", "resolved", "withdrawn"]).optional(),
|
|
13952
13955
|
reason: string2().optional(),
|
|
13953
13956
|
actor: object({ kind: string2().optional(), id: string2().optional() }).passthrough().optional(),
|
|
13954
13957
|
at: string2().optional()
|
|
13955
|
-
}).nullish()
|
|
13958
|
+
}).nullish(),
|
|
13959
|
+
thread_logins: array(string2()).optional()
|
|
13956
13960
|
};
|
|
13957
13961
|
var AskEventPayloadSchema = intersection(object(askEventPayloadFields), object({
|
|
13958
13962
|
previous: never().optional(),
|
|
@@ -14014,7 +14018,8 @@ var CommentEventPayloadSchema = object({
|
|
|
14014
14018
|
author: object({ kind: string2(), id: string2() }).optional(),
|
|
14015
14019
|
created_at: string2().optional(),
|
|
14016
14020
|
mentions: array(CommentMentionSchema).optional(),
|
|
14017
|
-
deliveries: array(CommentDeliverySchema).optional()
|
|
14021
|
+
deliveries: array(CommentDeliverySchema).optional(),
|
|
14022
|
+
thread_logins: array(string2()).optional()
|
|
14018
14023
|
}).passthrough();
|
|
14019
14024
|
var MessageEventPayloadSchema = object({
|
|
14020
14025
|
id: string2().optional(),
|
|
@@ -14023,7 +14028,8 @@ var MessageEventPayloadSchema = object({
|
|
|
14023
14028
|
in_reply_to: string2().nullish(),
|
|
14024
14029
|
reply_body: string2().optional(),
|
|
14025
14030
|
thread_target: string2().optional(),
|
|
14026
|
-
author: object({ kind: string2(), id: string2() }).optional()
|
|
14031
|
+
author: object({ kind: string2(), id: string2() }).optional(),
|
|
14032
|
+
thread_logins: array(string2()).optional()
|
|
14027
14033
|
});
|
|
14028
14034
|
var DispatchTargetedResourceIDSchema = uuid2();
|
|
14029
14035
|
var DispatchTargetedMessagePayloadSchema = MessageEventPayloadSchema.extend({
|
|
@@ -14093,7 +14099,7 @@ var AskFollowerEventPayloadSchema = object({
|
|
|
14093
14099
|
|
|
14094
14100
|
// ../contracts/src/actor-label.ts
|
|
14095
14101
|
function shortSessionId(id) {
|
|
14096
|
-
return `session:${id.slice(0, 8)}\u2026`;
|
|
14102
|
+
return id.startsWith("legion-daemon:") ? id : `session:${id.slice(0, 8)}\u2026`;
|
|
14097
14103
|
}
|
|
14098
14104
|
function sessionLabel(sessionId, title) {
|
|
14099
14105
|
const trimmed = title?.trim() ?? "";
|
|
@@ -14424,7 +14430,7 @@ var dispatchToolSpecs = [
|
|
|
14424
14430
|
priority: 1,
|
|
14425
14431
|
before: "DSP-2"
|
|
14426
14432
|
},
|
|
14427
|
-
description: "Update an existing issue: move its lifecycle status, retitle it, replace its labels, set " + "its priority, link a URL (the pull request that delivers it, a run, a document), set its " + "route, set or clear its parent, replace the issues it is blocked by, attach it to " + "architecture components, set the repository it targets, or move it on its project's " + "board. Status is one of " + `${ISSUE_STATUSES.join(", ")}; outside Legion, move it yourself as the work advances; inside ` + "Legion the daemon moves it. A non-empty external_links is " + "merged into the issue's existing links by URL, so linking the pull request you just opened " + "keeps every earlier link; an empty external_links removes every link instead. components " + "replaces the issue's own attachment. Closing an issue " + "(status done) requires reason, the note that says why: it is posted on the issue as a " + "message, then the issue closes, because a closed issue refuses messages, comments, and " + "artifacts; reason goes only with status done. A closed issue takes only a board move " + "(before, after), components, " + "a reopening status (any status but done), and an external_links write that adds no new " + "link (so a link can move to the issue that replaced it); everything else, priority " + "included, waits for the reopen. " + "priority is yours to set and a human overrides it. before and after move the issue on " + "its project's board: before puts it above that issue, after below, and both together " + "land it between them. A project's board order is one agent's to keep; in a Legion " + "deployment that is the controller. Never reassign an issue a person holds to get a " + "faster answer: who holds it is their call. At least one " + `field besides issue is required. ${ISSUE_REFERENCE}`,
|
|
14433
|
+
description: "Update an existing issue: move its lifecycle status, retitle it, replace its labels, set " + "its priority, link a URL (the pull request that delivers it, a run, a document), set its " + "route, set or clear its parent, replace the issues it is blocked by, attach it to " + "architecture components, set the repository it targets, or move it on its project's " + "board. Status is one of " + `${ISSUE_STATUSES.join(", ")}; outside Legion, move it yourself as the work advances; inside ` + "Legion the daemon moves it. A non-empty external_links is " + "merged into the issue's existing links by URL, so linking the pull request you just opened " + "keeps every earlier link; an empty external_links removes every link instead. components " + "replaces the issue's own attachment. Closing an issue " + "(status done) requires reason, the note that says why: it is posted on the issue as a " + "message, then the issue closes, because a closed issue refuses messages, comments, and " + "artifacts; reason goes only with status done. Closing an issue withdraws every open ask " + "it holds (resolution kind withdrawn, naming the closer), and reopening it brings exactly " + "those asks back. A closed issue takes only a board move " + "(before, after), components, " + "a reopening status (any status but done), and an external_links write that adds no new " + "link (so a link can move to the issue that replaced it); everything else, priority " + "included, waits for the reopen. " + "priority is yours to set and a human overrides it. before and after move the issue on " + "its project's board: before puts it above that issue, after below, and both together " + "land it between them. A project's board order is one agent's to keep; in a Legion " + "deployment that is the controller. Never reassign an issue a person holds to get a " + "faster answer: who holds it is their call. At least one " + `field besides issue is required. ${ISSUE_REFERENCE}`,
|
|
14428
14434
|
arguments: (z) => ({
|
|
14429
14435
|
issue: z.string().describe(ISSUE_REFERENCE),
|
|
14430
14436
|
status: z.enum(ISSUE_STATUSES).describe("New lifecycle status.").optional(),
|
|
@@ -14451,7 +14457,7 @@ var dispatchToolSpecs = [
|
|
|
14451
14457
|
{
|
|
14452
14458
|
name: "dispatch_claim",
|
|
14453
14459
|
example: { issue: "DSP-1" },
|
|
14454
|
-
description: "Claim a Dispatch issue before you start implementing it, so no other session takes the same work, " + "and release it when you stop. Pass the issue alone to claim it, or --release to give it up. " + "Your claim records your own session and shows on every read of the issue: the dashboard header, the " + "issue list and board, dispatch read, and dispatch issues. Claiming is refused with 409 ISSUE_CLAIMED " + "when another session holds the issue and is still running; the refusal names that session, so talk to " + "it instead of working the same issue in parallel. When a human holds the claim the refusal names the " + "person, not a session: there is nothing running to message, so ask them on the issue rather than " + "taking it. 409 CLAIM_CONTENDED means the issue changed " + "hands twice while your call ran, so nothing was applied and nobody's liveness was checked: read " + "the issue and decide again. A claim whose session is no longer running may be " + "taken: the takeover is recorded on the issue and the session that lost it is told. A claim is not the " + "issue's status \u2014 claiming moves nothing, and the result names who moves the status: you, with " + "dispatch issue-update, or Legion's daemon on an issue it runs, where a status written by anyone " + "else is undone. A claim is released by its holder or any human, and by " + "any agent once the holder's session is no longer running. " + ISSUE_REFERENCE,
|
|
14460
|
+
description: "Claim a Dispatch issue before you start implementing it, so no other session takes the same work, " + "and release it when you stop. Pass the issue alone to claim it, or --release to give it up. " + "Your claim records your own session and shows on every read of the issue: the dashboard header, the " + "issue list and board, dispatch read, and dispatch issues. While you hold it, a person's answers, " + "comments and messages on the issue reach your session directly (a new comment that mentions you " + "arrives once, as the mention, when the mention reached you; when the mention's send fails, the " + "comment still reaches you directly; a mention whose receipt timed out can arrive twice, and the " + "second copy is the same comment); an agent's events and every other change on the issue still " + "need a subscription to it, except in an ask you follow: anyone else's answer, hand-back, " + "resolution or edit of it (other than a quiet edit), and every reply there (new, edited, resolved " + "or reopened), reach you " + "as its follower. Claiming is refused with 409 ISSUE_CLAIMED " + "when another session holds the issue and is still running; the refusal names that session, so talk to " + "it instead of working the same issue in parallel. When a human holds the claim the refusal names the " + "person, not a session: there is nothing running to message, so ask them on the issue rather than " + "taking it. 409 CLAIM_CONTENDED means the issue changed " + "hands twice while your call ran, so nothing was applied and nobody's liveness was checked: read " + "the issue and decide again. A claim whose session is no longer running may be " + "taken: the takeover is recorded on the issue and the session that lost it is told. A claim is not the " + "issue's status \u2014 claiming moves nothing, and the result names who moves the status: you, with " + "dispatch issue-update, or Legion's daemon on an issue it runs, where a status written by anyone " + "else is undone. A claim is released by its holder or any human, and by " + "any agent once the holder's session is no longer running. " + ISSUE_REFERENCE,
|
|
14455
14461
|
arguments: (z) => ({
|
|
14456
14462
|
issue: z.string().describe(ISSUE_REFERENCE),
|
|
14457
14463
|
release: z.boolean().describe("Give up your claim instead of taking it; the issue's status does not change.").optional()
|
|
@@ -14538,7 +14544,7 @@ var dispatchToolSpecs = [
|
|
|
14538
14544
|
kind: "retracted",
|
|
14539
14545
|
reason: "A newer question supersedes this one."
|
|
14540
14546
|
},
|
|
14541
|
-
description: "Retract an open question that is moot or resolve one after finding the answer. This closes " + "the question without answering it. An ask that lives as an `ask` block in a document is " + 'closed in the document too. A reason beginning "removed from the document in version" is ' + "refused: that marks a retraction the document's own settlement wrote. Use retracted for an ask " + "a newer one replaces or the design made moot, resolved for one whose answer you found; an " + "answered ask cannot be resolved, and resolving records no decision by a person.",
|
|
14547
|
+
description: "Retract an open question that is moot or resolve one after finding the answer. This closes " + "the question without answering it. An ask that lives as an `ask` block in a document is " + 'closed in the document too. A reason beginning "removed from the document in version" is ' + "refused: that marks a retraction the document's own settlement wrote. Use retracted for an ask " + "a newer one replaces or the design made moot, resolved for one whose answer you found; an " + "answered ask cannot be resolved, and resolving records no decision by a person. An issue's " + "close withdrew its open asks (kind withdrawn, which only Dispatch writes, never this tool); " + "an ask on a closed issue is refused (409 ISSUE_CLOSED): reopen the issue first.",
|
|
14542
14548
|
arguments: (z) => ({
|
|
14543
14549
|
ask: z.string().describe("Ask id (uuid) to close; an 8+ hex prefix unique among this session's own open asks " + "works too."),
|
|
14544
14550
|
kind: z.enum(["retracted", "resolved"]).describe("Whether the ask is retracted or self-resolved."),
|
|
@@ -14719,7 +14725,7 @@ var dispatchToolSpecs = [
|
|
|
14719
14725
|
{
|
|
14720
14726
|
name: "dispatch_search",
|
|
14721
14727
|
example: { query: "astrolabe" },
|
|
14722
|
-
description: "Search every issue, document, comment, ask, and message for a keyword or phrase and get deep links. " + "Use it before creating an issue or a design document, and to find where a word was written. " + 'Websearch syntax: "quoted phrase", -excluded, OR. ' + "Each kind of content is ranked on its own and the lists are merged, so the top holds the best " + "issue, document, ask, comment and message; an issue key searched alone lists that issue first. " + `The answer names how many results match; offset pages through them, and each kind lists at most its best ${SEARCH_KIND_DEPTH}, ` + "so narrow the query or name a project to reach the rest. Paging is exact only while the " + "corpus holds still: content added, changed, or removed between two offsets can shift rows " + "across a page boundary, so one hit can come back twice and another never.",
|
|
14728
|
+
description: "Search every issue, document, comment, ask, and message for a keyword or phrase and get deep links. " + "Use it before creating an issue or a design document, and to find where a word was written. " + 'Websearch syntax: "quoted phrase", -excluded, OR. ' + "Each kind of content is ranked on its own and the lists are merged, so the top holds the best " + "issue, document, ask, comment and message; an issue key searched alone lists that issue first. " + "An ask hit says whether it is answered: an answered one shows the latest answer, who gave it, " + "when, the options chosen and its text; a closed one says it was closed with no answer, or " + "shows the last answer it had. " + `The answer names how many results match; offset pages through them, and each kind lists at most its best ${SEARCH_KIND_DEPTH}, ` + "so narrow the query or name a project to reach the rest. Paging is exact only while the " + "corpus holds still: content added, changed, or removed between two offsets can shift rows " + "across a page boundary, so one hit can come back twice and another never.",
|
|
14723
14729
|
arguments: (z) => ({
|
|
14724
14730
|
query: z.string({
|
|
14725
14731
|
min: 2,
|
|
@@ -15365,6 +15371,15 @@ function commandsHelp() {
|
|
|
15365
15371
|
// ../envoy-client/src/dispatch-execute.ts
|
|
15366
15372
|
import { resolve as resolvePath2 } from "path";
|
|
15367
15373
|
|
|
15374
|
+
// ../envoy-client/src/actor-text.ts
|
|
15375
|
+
function actorText(actor) {
|
|
15376
|
+
const service = actor.kind === "session" ? actor.service : undefined;
|
|
15377
|
+
if (service === undefined) {
|
|
15378
|
+
return `${actor.kind} ${actor.id}`;
|
|
15379
|
+
}
|
|
15380
|
+
return `${actor.kind} ${actor.id} (as ${serviceSubjectLabel(service)})`;
|
|
15381
|
+
}
|
|
15382
|
+
|
|
15368
15383
|
// ../envoy-client/src/ask-answer.ts
|
|
15369
15384
|
var HEAD_LENGTH = 120;
|
|
15370
15385
|
function textHead(text) {
|
|
@@ -16633,7 +16648,7 @@ function humanEditHead(edit) {
|
|
|
16633
16648
|
function pageSummaryText(offset, count, total) {
|
|
16634
16649
|
return `showing ${offset + 1}-${offset + count} of ${total}`;
|
|
16635
16650
|
}
|
|
16636
|
-
function
|
|
16651
|
+
function searchHitLine(result, baseUrl) {
|
|
16637
16652
|
const href = new URL(result.href, baseUrl).toString();
|
|
16638
16653
|
const { owner } = result;
|
|
16639
16654
|
if (owner.kind === "document") {
|
|
@@ -16644,6 +16659,42 @@ function searchResultLine(result, baseUrl) {
|
|
|
16644
16659
|
const label = `${owner.key} [${owner.status}] ${owner.title} - ${result.kind}${artifactName}`;
|
|
16645
16660
|
return `${label}: ${snippetText(result.snippet)} -> ${href}`;
|
|
16646
16661
|
}
|
|
16662
|
+
function indentedText(text) {
|
|
16663
|
+
return text.split(/\r?\n/u).join(`
|
|
16664
|
+
`);
|
|
16665
|
+
}
|
|
16666
|
+
function answerLines(lead, answer) {
|
|
16667
|
+
const selected = answer.selected.length === 0 ? "none" : answer.selected.join(", ");
|
|
16668
|
+
const text = answer.text === null || answer.text === "" ? "none" : indentedText(answer.text);
|
|
16669
|
+
return [
|
|
16670
|
+
` ${lead} by ${answer.user} at ${answer.at} \xB7 options chosen: ${selected}`,
|
|
16671
|
+
` Answer text: ${text}`
|
|
16672
|
+
];
|
|
16673
|
+
}
|
|
16674
|
+
function resolutionText(resolution) {
|
|
16675
|
+
return `${resolution.kind} by ${actorText(resolution.actor)} at ${resolution.at}: ${indentedText(resolution.reason)}`;
|
|
16676
|
+
}
|
|
16677
|
+
function askStateLines(ask) {
|
|
16678
|
+
if (ask === undefined) {
|
|
16679
|
+
return [" Answer state not reported by this Dispatch; open the link to read the ask."];
|
|
16680
|
+
}
|
|
16681
|
+
switch (ask.state) {
|
|
16682
|
+
case "open":
|
|
16683
|
+
return [" Open: no answer yet."];
|
|
16684
|
+
case "answered":
|
|
16685
|
+
return answerLines("Answered", ask.answer);
|
|
16686
|
+
case "resolved":
|
|
16687
|
+
return ask.answer === undefined ? [` Closed with no answer: ${resolutionText(ask.resolution)}`] : [
|
|
16688
|
+
` Closed after an answer: ${resolutionText(ask.resolution)}`,
|
|
16689
|
+
...answerLines("Last answer", ask.answer)
|
|
16690
|
+
];
|
|
16691
|
+
}
|
|
16692
|
+
}
|
|
16693
|
+
function searchResultLine(result, baseUrl) {
|
|
16694
|
+
const line = searchHitLine(result, baseUrl);
|
|
16695
|
+
return result.kind === "ask" ? [line, ...askStateLines(result.ask)].join(`
|
|
16696
|
+
`) : line;
|
|
16697
|
+
}
|
|
16647
16698
|
function searchAnswer(search, query, offset, configUrl) {
|
|
16648
16699
|
const results = search.results;
|
|
16649
16700
|
const count = results.length;
|
|
@@ -17836,13 +17887,6 @@ function eventHead(event) {
|
|
|
17836
17887
|
return;
|
|
17837
17888
|
}
|
|
17838
17889
|
}
|
|
17839
|
-
function actorText(actor) {
|
|
17840
|
-
const service = actor.kind === "session" ? actor.service : undefined;
|
|
17841
|
-
if (service === undefined) {
|
|
17842
|
-
return `${actor.kind} ${actor.id}`;
|
|
17843
|
-
}
|
|
17844
|
-
return `${actor.kind} ${actor.id} (as ${serviceSubjectLabel(service)})`;
|
|
17845
|
-
}
|
|
17846
17890
|
function eventRef(event) {
|
|
17847
17891
|
const payload = event.payload;
|
|
17848
17892
|
const id = typeof payload === "object" && payload !== null && "id" in payload ? payload.id : undefined;
|
|
@@ -18536,7 +18580,8 @@ async function executeDispatchTool(input) {
|
|
|
18536
18580
|
throw new Error(`Dispatch claimed ${issueKey} but answered with no claim`);
|
|
18537
18581
|
}
|
|
18538
18582
|
const claimed = `${issueKey}: claimed by you since ${held.at}. Its status is ${after.status}`;
|
|
18539
|
-
|
|
18583
|
+
const reaches = `A person's answers, comments and messages on ${issueKey} now reach you directly.`;
|
|
18584
|
+
text = legionManaged ? `${claimed}; ${LEGION_OWNS_STATUS} Release the claim when you stop. ${reaches}` : `${claimed}; a claim moves nothing, so move it to in_progress with dispatch issue-update when you start, and release the claim when you stop. ${reaches}`;
|
|
18540
18585
|
}
|
|
18541
18586
|
return {
|
|
18542
18587
|
text: `${text}${await notSubscribed(issueTopic(issueKey), input.subscriptions)}`,
|
package/dist/envoy.js
CHANGED
|
@@ -29691,7 +29691,10 @@ var IssueEventPayloadSchema = object({
|
|
|
29691
29691
|
status: string2().optional(),
|
|
29692
29692
|
priority: number2().int().min(0).max(3).nullable().optional(),
|
|
29693
29693
|
rank: string2().optional(),
|
|
29694
|
-
route: string2().nullish()
|
|
29694
|
+
route: string2().nullish(),
|
|
29695
|
+
changed: array(string2()).optional(),
|
|
29696
|
+
ancestors: array(string2()).optional(),
|
|
29697
|
+
thread_logins: array(string2()).optional()
|
|
29695
29698
|
});
|
|
29696
29699
|
var ArtifactCreatedEventPayloadSchema = object({
|
|
29697
29700
|
artifact: object({ id: string2().optional(), slug: string2().optional(), name: string2().optional() }).optional()
|
|
@@ -29745,11 +29748,12 @@ var askEventPayloadFields = {
|
|
|
29745
29748
|
primary: boolean2().optional()
|
|
29746
29749
|
}).optional(),
|
|
29747
29750
|
resolution: object({
|
|
29748
|
-
kind: _enum2(["retracted", "resolved"]).optional(),
|
|
29751
|
+
kind: _enum2(["retracted", "resolved", "withdrawn"]).optional(),
|
|
29749
29752
|
reason: string2().optional(),
|
|
29750
29753
|
actor: object({ kind: string2().optional(), id: string2().optional() }).passthrough().optional(),
|
|
29751
29754
|
at: string2().optional()
|
|
29752
|
-
}).nullish()
|
|
29755
|
+
}).nullish(),
|
|
29756
|
+
thread_logins: array(string2()).optional()
|
|
29753
29757
|
};
|
|
29754
29758
|
var AskEventPayloadSchema = intersection(object(askEventPayloadFields), object({
|
|
29755
29759
|
previous: never().optional(),
|
|
@@ -29811,7 +29815,8 @@ var CommentEventPayloadSchema = object({
|
|
|
29811
29815
|
author: object({ kind: string2(), id: string2() }).optional(),
|
|
29812
29816
|
created_at: string2().optional(),
|
|
29813
29817
|
mentions: array(CommentMentionSchema).optional(),
|
|
29814
|
-
deliveries: array(CommentDeliverySchema).optional()
|
|
29818
|
+
deliveries: array(CommentDeliverySchema).optional(),
|
|
29819
|
+
thread_logins: array(string2()).optional()
|
|
29815
29820
|
}).passthrough();
|
|
29816
29821
|
var MessageEventPayloadSchema = object({
|
|
29817
29822
|
id: string2().optional(),
|
|
@@ -29820,7 +29825,8 @@ var MessageEventPayloadSchema = object({
|
|
|
29820
29825
|
in_reply_to: string2().nullish(),
|
|
29821
29826
|
reply_body: string2().optional(),
|
|
29822
29827
|
thread_target: string2().optional(),
|
|
29823
|
-
author: object({ kind: string2(), id: string2() }).optional()
|
|
29828
|
+
author: object({ kind: string2(), id: string2() }).optional(),
|
|
29829
|
+
thread_logins: array(string2()).optional()
|
|
29824
29830
|
});
|
|
29825
29831
|
var DispatchTargetedResourceIDSchema = uuid2();
|
|
29826
29832
|
var DispatchTargetedMessagePayloadSchema = MessageEventPayloadSchema.extend({
|
|
@@ -30115,7 +30121,7 @@ var dispatchToolSpecs = [
|
|
|
30115
30121
|
priority: 1,
|
|
30116
30122
|
before: "DSP-2"
|
|
30117
30123
|
},
|
|
30118
|
-
description: "Update an existing issue: move its lifecycle status, retitle it, replace its labels, set " + "its priority, link a URL (the pull request that delivers it, a run, a document), set its " + "route, set or clear its parent, replace the issues it is blocked by, attach it to " + "architecture components, set the repository it targets, or move it on its project's " + "board. Status is one of " + `${ISSUE_STATUSES.join(", ")}; outside Legion, move it yourself as the work advances; inside ` + "Legion the daemon moves it. A non-empty external_links is " + "merged into the issue's existing links by URL, so linking the pull request you just opened " + "keeps every earlier link; an empty external_links removes every link instead. components " + "replaces the issue's own attachment. Closing an issue " + "(status done) requires reason, the note that says why: it is posted on the issue as a " + "message, then the issue closes, because a closed issue refuses messages, comments, and " + "artifacts; reason goes only with status done. A closed issue takes only a board move " + "(before, after), components, " + "a reopening status (any status but done), and an external_links write that adds no new " + "link (so a link can move to the issue that replaced it); everything else, priority " + "included, waits for the reopen. " + "priority is yours to set and a human overrides it. before and after move the issue on " + "its project's board: before puts it above that issue, after below, and both together " + "land it between them. A project's board order is one agent's to keep; in a Legion " + "deployment that is the controller. Never reassign an issue a person holds to get a " + "faster answer: who holds it is their call. At least one " + `field besides issue is required. ${ISSUE_REFERENCE}`,
|
|
30124
|
+
description: "Update an existing issue: move its lifecycle status, retitle it, replace its labels, set " + "its priority, link a URL (the pull request that delivers it, a run, a document), set its " + "route, set or clear its parent, replace the issues it is blocked by, attach it to " + "architecture components, set the repository it targets, or move it on its project's " + "board. Status is one of " + `${ISSUE_STATUSES.join(", ")}; outside Legion, move it yourself as the work advances; inside ` + "Legion the daemon moves it. A non-empty external_links is " + "merged into the issue's existing links by URL, so linking the pull request you just opened " + "keeps every earlier link; an empty external_links removes every link instead. components " + "replaces the issue's own attachment. Closing an issue " + "(status done) requires reason, the note that says why: it is posted on the issue as a " + "message, then the issue closes, because a closed issue refuses messages, comments, and " + "artifacts; reason goes only with status done. Closing an issue withdraws every open ask " + "it holds (resolution kind withdrawn, naming the closer), and reopening it brings exactly " + "those asks back. A closed issue takes only a board move " + "(before, after), components, " + "a reopening status (any status but done), and an external_links write that adds no new " + "link (so a link can move to the issue that replaced it); everything else, priority " + "included, waits for the reopen. " + "priority is yours to set and a human overrides it. before and after move the issue on " + "its project's board: before puts it above that issue, after below, and both together " + "land it between them. A project's board order is one agent's to keep; in a Legion " + "deployment that is the controller. Never reassign an issue a person holds to get a " + "faster answer: who holds it is their call. At least one " + `field besides issue is required. ${ISSUE_REFERENCE}`,
|
|
30119
30125
|
arguments: (z) => ({
|
|
30120
30126
|
issue: z.string().describe(ISSUE_REFERENCE),
|
|
30121
30127
|
status: z.enum(ISSUE_STATUSES).describe("New lifecycle status.").optional(),
|
|
@@ -30142,7 +30148,7 @@ var dispatchToolSpecs = [
|
|
|
30142
30148
|
{
|
|
30143
30149
|
name: "dispatch_claim",
|
|
30144
30150
|
example: { issue: "DSP-1" },
|
|
30145
|
-
description: "Claim a Dispatch issue before you start implementing it, so no other session takes the same work, " + "and release it when you stop. Pass the issue alone to claim it, or --release to give it up. " + "Your claim records your own session and shows on every read of the issue: the dashboard header, the " + "issue list and board, dispatch read, and dispatch issues. Claiming is refused with 409 ISSUE_CLAIMED " + "when another session holds the issue and is still running; the refusal names that session, so talk to " + "it instead of working the same issue in parallel. When a human holds the claim the refusal names the " + "person, not a session: there is nothing running to message, so ask them on the issue rather than " + "taking it. 409 CLAIM_CONTENDED means the issue changed " + "hands twice while your call ran, so nothing was applied and nobody's liveness was checked: read " + "the issue and decide again. A claim whose session is no longer running may be " + "taken: the takeover is recorded on the issue and the session that lost it is told. A claim is not the " + "issue's status \u2014 claiming moves nothing, and the result names who moves the status: you, with " + "dispatch issue-update, or Legion's daemon on an issue it runs, where a status written by anyone " + "else is undone. A claim is released by its holder or any human, and by " + "any agent once the holder's session is no longer running. " + ISSUE_REFERENCE,
|
|
30151
|
+
description: "Claim a Dispatch issue before you start implementing it, so no other session takes the same work, " + "and release it when you stop. Pass the issue alone to claim it, or --release to give it up. " + "Your claim records your own session and shows on every read of the issue: the dashboard header, the " + "issue list and board, dispatch read, and dispatch issues. While you hold it, a person's answers, " + "comments and messages on the issue reach your session directly (a new comment that mentions you " + "arrives once, as the mention, when the mention reached you; when the mention's send fails, the " + "comment still reaches you directly; a mention whose receipt timed out can arrive twice, and the " + "second copy is the same comment); an agent's events and every other change on the issue still " + "need a subscription to it, except in an ask you follow: anyone else's answer, hand-back, " + "resolution or edit of it (other than a quiet edit), and every reply there (new, edited, resolved " + "or reopened), reach you " + "as its follower. Claiming is refused with 409 ISSUE_CLAIMED " + "when another session holds the issue and is still running; the refusal names that session, so talk to " + "it instead of working the same issue in parallel. When a human holds the claim the refusal names the " + "person, not a session: there is nothing running to message, so ask them on the issue rather than " + "taking it. 409 CLAIM_CONTENDED means the issue changed " + "hands twice while your call ran, so nothing was applied and nobody's liveness was checked: read " + "the issue and decide again. A claim whose session is no longer running may be " + "taken: the takeover is recorded on the issue and the session that lost it is told. A claim is not the " + "issue's status \u2014 claiming moves nothing, and the result names who moves the status: you, with " + "dispatch issue-update, or Legion's daemon on an issue it runs, where a status written by anyone " + "else is undone. A claim is released by its holder or any human, and by " + "any agent once the holder's session is no longer running. " + ISSUE_REFERENCE,
|
|
30146
30152
|
arguments: (z) => ({
|
|
30147
30153
|
issue: z.string().describe(ISSUE_REFERENCE),
|
|
30148
30154
|
release: z.boolean().describe("Give up your claim instead of taking it; the issue's status does not change.").optional()
|
|
@@ -30229,7 +30235,7 @@ var dispatchToolSpecs = [
|
|
|
30229
30235
|
kind: "retracted",
|
|
30230
30236
|
reason: "A newer question supersedes this one."
|
|
30231
30237
|
},
|
|
30232
|
-
description: "Retract an open question that is moot or resolve one after finding the answer. This closes " + "the question without answering it. An ask that lives as an `ask` block in a document is " + 'closed in the document too. A reason beginning "removed from the document in version" is ' + "refused: that marks a retraction the document's own settlement wrote. Use retracted for an ask " + "a newer one replaces or the design made moot, resolved for one whose answer you found; an " + "answered ask cannot be resolved, and resolving records no decision by a person.",
|
|
30238
|
+
description: "Retract an open question that is moot or resolve one after finding the answer. This closes " + "the question without answering it. An ask that lives as an `ask` block in a document is " + 'closed in the document too. A reason beginning "removed from the document in version" is ' + "refused: that marks a retraction the document's own settlement wrote. Use retracted for an ask " + "a newer one replaces or the design made moot, resolved for one whose answer you found; an " + "answered ask cannot be resolved, and resolving records no decision by a person. An issue's " + "close withdrew its open asks (kind withdrawn, which only Dispatch writes, never this tool); " + "an ask on a closed issue is refused (409 ISSUE_CLOSED): reopen the issue first.",
|
|
30233
30239
|
arguments: (z) => ({
|
|
30234
30240
|
ask: z.string().describe("Ask id (uuid) to close; an 8+ hex prefix unique among this session's own open asks " + "works too."),
|
|
30235
30241
|
kind: z.enum(["retracted", "resolved"]).describe("Whether the ask is retracted or self-resolved."),
|
|
@@ -30410,7 +30416,7 @@ var dispatchToolSpecs = [
|
|
|
30410
30416
|
{
|
|
30411
30417
|
name: "dispatch_search",
|
|
30412
30418
|
example: { query: "astrolabe" },
|
|
30413
|
-
description: "Search every issue, document, comment, ask, and message for a keyword or phrase and get deep links. " + "Use it before creating an issue or a design document, and to find where a word was written. " + 'Websearch syntax: "quoted phrase", -excluded, OR. ' + "Each kind of content is ranked on its own and the lists are merged, so the top holds the best " + "issue, document, ask, comment and message; an issue key searched alone lists that issue first. " + `The answer names how many results match; offset pages through them, and each kind lists at most its best ${SEARCH_KIND_DEPTH}, ` + "so narrow the query or name a project to reach the rest. Paging is exact only while the " + "corpus holds still: content added, changed, or removed between two offsets can shift rows " + "across a page boundary, so one hit can come back twice and another never.",
|
|
30419
|
+
description: "Search every issue, document, comment, ask, and message for a keyword or phrase and get deep links. " + "Use it before creating an issue or a design document, and to find where a word was written. " + 'Websearch syntax: "quoted phrase", -excluded, OR. ' + "Each kind of content is ranked on its own and the lists are merged, so the top holds the best " + "issue, document, ask, comment and message; an issue key searched alone lists that issue first. " + "An ask hit says whether it is answered: an answered one shows the latest answer, who gave it, " + "when, the options chosen and its text; a closed one says it was closed with no answer, or " + "shows the last answer it had. " + `The answer names how many results match; offset pages through them, and each kind lists at most its best ${SEARCH_KIND_DEPTH}, ` + "so narrow the query or name a project to reach the rest. Paging is exact only while the " + "corpus holds still: content added, changed, or removed between two offsets can shift rows " + "across a page boundary, so one hit can come back twice and another never.",
|
|
30414
30420
|
arguments: (z) => ({
|
|
30415
30421
|
query: z.string({
|
|
30416
30422
|
min: 2,
|
|
@@ -35762,7 +35768,7 @@ function parseEnvoyToolArguments(operation, parameters) {
|
|
|
35762
35768
|
|
|
35763
35769
|
// ../pi-shared/src/interface.ts
|
|
35764
35770
|
import { logger } from "@oh-my-pi/pi-utils";
|
|
35765
|
-
var ENVOY_PLUGIN_INTERFACE_VERSION =
|
|
35771
|
+
var ENVOY_PLUGIN_INTERFACE_VERSION = 4;
|
|
35766
35772
|
var ENVOY_PLUGIN_INTERFACE_KEY = Symbol.for("legion.pi-shared.envoy-plugin-interface");
|
|
35767
35773
|
var LEGION_PLUGIN_LOADED_KEY = Symbol.for("legion.pi-legion.loaded");
|
|
35768
35774
|
var LEGACY_LEGION_LOADED_KEY = Symbol.for("legion.pi-envoy.legion-loaded");
|
|
@@ -35783,7 +35789,8 @@ function envoyPluginInterface() {
|
|
|
35783
35789
|
slackRoleOwned: false
|
|
35784
35790
|
},
|
|
35785
35791
|
injectedUserTurns: new Map,
|
|
35786
|
-
bootstrappedSession: { file: undefined }
|
|
35792
|
+
bootstrappedSession: { file: undefined },
|
|
35793
|
+
startupTurn: undefined
|
|
35787
35794
|
};
|
|
35788
35795
|
store[ENVOY_PLUGIN_INTERFACE_KEY] = created;
|
|
35789
35796
|
return created;
|
|
@@ -43,9 +43,9 @@ Which machines, files or people, the numbers, then "A happens to X, or B to Y?"
|
|
|
43
43
|
|
|
44
44
|
## Issue status is yours to move
|
|
45
45
|
|
|
46
|
-
Outside Legion, claim your issue (`dispatch claim`) and move it and your children: `in_progress` at implementation, `testing` on a production-like surface, `needs_review` while its PR waits, `done` with `--reason` once driven in production. An issue with the `legion` label, or under one: never write its status, and claim it only as a Legion role of its tree, even when its claim reads `· not running`, as a suspended architect's does: taking it
|
|
46
|
+
Outside Legion, claim your issue (`dispatch claim`) and move it and your children: `in_progress` at implementation, `testing` on a production-like surface, `needs_review` while its PR waits, `done` with `--reason` once driven in production. An issue with the `legion` label, or under one: never write its status or route it, and claim it only as a Legion role of its tree, even when its claim reads `· not running`, as a suspended architect's does: taking it removes the tree from the workflow.
|
|
47
47
|
|
|
48
|
-
A claim
|
|
48
|
+
A claim, or `dispatch issue-update --route session:<your id>` (`--route ''` on release), brings a person's answers, comments and messages; for agents' activity, `envoy_subscribe notifications.dispatch.issue.<KEY>.>`.
|
|
49
49
|
|
|
50
50
|
## Close what you opened
|
|
51
51
|
|
|
@@ -30,11 +30,10 @@ Another agent can build and check the work from the spec alone. A small change g
|
|
|
30
30
|
For each spec, ask, comment and message:
|
|
31
31
|
|
|
32
32
|
- Write in `skill://asd-ste100`'s strict mode.
|
|
33
|
-
-
|
|
34
|
-
- Link each source where the person wrote it
|
|
33
|
+
- Write about the current design, never the person or how people reached it. Never quote people or upload their words.
|
|
34
|
+
- Link each source where the person wrote it. With no link, state the design.
|
|
35
35
|
- In a spec, cite code by file and symbol, never a line number: it goes stale at the next edit.
|
|
36
36
|
- A sentence that cites a gate passing (a test, review, check or proof) also says, in that sentence, what the pass does not show: "The tests pass; they catch a wrong verdict, not a proof of a contradiction."
|
|
37
|
-
- Write about the design, never the person. Never quote people or upload their words.
|
|
38
37
|
- Name your session only if a reader must reach it.
|
|
39
38
|
- Keep only text that helps a reader understand, decide, build, check.
|
|
40
39
|
- Explain each name or term a new reader may not know. Say in a clause what each issue you name does for this reader.
|
|
@@ -60,11 +59,11 @@ For each spec, ask, comment and message:
|
|
|
60
59
|
- Each design choice no source states is a `###` entry: choice, reason, options weighed, parts shaped.
|
|
61
60
|
- An unsure entry adds an `Unsure:` paragraph: what would change your mind.
|
|
62
61
|
- A replaced entry moves under a final `### Replaced`.
|
|
63
|
-
-
|
|
62
|
+
- Link a person's answered ask block from each part it shapes.
|
|
64
63
|
|
|
65
64
|
## Old specs
|
|
66
65
|
|
|
67
|
-
At your next edit, rewrite a spec outside the outline whole, in one version. Move its ask blocks with `doc-edit`'s `move`.
|
|
66
|
+
At your next edit, rewrite a spec outside the outline whole, in one version. Move its ask blocks with `doc-edit`'s `move`. Kept text follows the text rules: restate each retelling, quotation or unlinked attribution as design, or cut it.
|
|
68
67
|
|
|
69
68
|
## Approval
|
|
70
69
|
|
|
@@ -73,4 +72,4 @@ At your next edit, rewrite a spec outside the outline whole, in one version. Mov
|
|
|
73
72
|
|
|
74
73
|
## The plan
|
|
75
74
|
|
|
76
|
-
Write the
|
|
75
|
+
Write the plan with `writing-plans` as the issue's `plan.md`, not a repository file.
|