@sjawhar/pi-envoy 11.6.0 → 11.8.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 CHANGED
@@ -38,7 +38,9 @@ A message published while the session's NATS connection or one of its subscripti
38
38
  recovered from Envoy's notification stream, which keeps messages for 72 hours: the session asks
39
39
  its listener (`POST /v1/replay`) for what the stream stored on its own agent subject and on each
40
40
  topic it follows, after the place it last read to, and shows each missed message once, as a card
41
- saying it was published while the connection was down. It asks after it reconnects, after a
41
+ saying it was published while the connection was down. The session pings NATS every 10 seconds
42
+ and drops a connection that leaves two pings unanswered, so a connection that stops answering
43
+ without closing is left within 30 seconds and redialed. It asks after it reconnects, after a
42
44
  subscription is reopened, when it starts or resumes, and on every heartbeat. A targeted Dispatch
43
45
  delivery recovered this way (BTW, Aside, Steer, a person's Send) is shown as that card only and
44
46
  runs nothing. Role messages and team or other ad-hoc topics are live only and are not recovered,
@@ -115,8 +117,8 @@ for `omp.extensions` (only `omp.skills` ships as committed, since `dist/skills`
115
117
  a repo checkout after the prepack and the published tarball), while the committed manifest keeps
116
118
  the TypeScript entry for repo checkouts. In `.github/workflows/release.yaml`, the `pi_envoy_build`
117
119
  job rewrites the manifest before `bun pm pack` and uploads the tarball (its tree is discarded,
118
- nothing is restored); the `pi_envoy_publish` job publishes that tarball and commits the version bump
119
- to the committed manifest, touching `.version` alone.
120
+ nothing is restored); the `publish` job publishes that tarball and commits the version bump to the
121
+ committed manifest, touching `.version` alone.
120
122
  Packing with the committed source manifest is refused by the prepack, because such a tarball would
121
123
  point OMP at an extension file it does not contain.
122
124
 
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."),
@@ -14657,7 +14663,7 @@ var dispatchToolSpecs = [
14657
14663
  {
14658
14664
  name: "dispatch_doc_read",
14659
14665
  example: { issue: "DSP-1" },
14660
- description: "Read a live document or a named document version, or the text of an uploaded file at its latest or named version. " + "Do not use it for issue status, asks, or events; " + "use dispatch read instead. Supply ref, issue, or project plus artifact; issue plus an omitted artifact reads the primary document. " + "A live read returns its document token for an optional dispatch doc-edit precondition. With blocks it lists the live document's blocks instead of its markdown, in document order: each block's id, type, token, anchored comments and asks, and opening words, and under a table each row by the index delete_row takes and each cell by its row and the column delete_column takes; block ids, block tokens and those indexes are what dispatch doc-edit takes. " + "A picture (an uploaded PNG, JPEG, GIF or WebP of at most 3,750,000 bytes, 5 MB once base64-encoded) comes back as an image you see, with its name, type, size and version, every time you ask, including one a read already showed this session; " + "any other file that is not UTF-8 text is described, with the route that serves its bytes. " + OWNER_REFERENCE,
14666
+ description: "Read a live document or a named document version, or the text of an uploaded file at its latest or named version. " + "Do not use it for issue status, asks, or events; " + "use dispatch read instead. Supply ref, issue, or project plus artifact; issue plus an omitted artifact reads the primary document. " + "A live read returns its document token for an optional dispatch doc-edit precondition. With blocks it lists the live document's blocks instead of its markdown, in document order: each block's id, type, token, anchored comments and asks, and opening words, and under a table each row by the index delete_row takes and each cell by its row and the column delete_column takes; block ids, block tokens and those indexes are what dispatch doc-edit takes. " + "After the markdown it prints every open thread anchored on the document in full: an open ask with its id and question and each reply's author, time and text, and a comment thread with its root's id, author, quote and text and each reply's author, time and text, in order; a resolved thread, and an ask that is answered or resolved, is not printed. " + "A picture (an uploaded PNG, JPEG, GIF or WebP of at most 3,750,000 bytes, 5 MB once base64-encoded) comes back as an image you see, with its name, type, size and version, every time you ask, including one a read already showed this session; " + "any other file that is not UTF-8 text is described, with the route that serves its bytes. " + OWNER_REFERENCE,
14661
14667
  arguments: (z) => ({
14662
14668
  issue: z.string().describe(ISSUE_REFERENCE).optional(),
14663
14669
  project: z.string().describe("Project key owning the document.").optional(),
@@ -15927,8 +15933,8 @@ class DispatchClient {
15927
15933
  async resolveComment(id, actor) {
15928
15934
  return this.#json("POST", ["api", "v1", "comments", id, "resolve"], { actor });
15929
15935
  }
15930
- async getComments(issue, artifact) {
15931
- return this.#json("GET", ["api", "v1", "issues", await this.#resolveIssue(issue), "comments"], undefined, artifact ? { artifact } : undefined);
15936
+ async getComments(issue) {
15937
+ return this.#json("GET", ["api", "v1", "issues", await this.#resolveIssue(issue), "comments"]);
15932
15938
  }
15933
15939
  async getIssueReferences(issue) {
15934
15940
  return this.#json("GET", [
@@ -18034,22 +18040,64 @@ function messageSummary({ message, replies }, graph) {
18034
18040
  ].join(`
18035
18041
  `);
18036
18042
  }
18037
- async function openArtifactMarks(client, resolved) {
18043
+ async function openAnchoredThreads(client, resolved) {
18038
18044
  const asksPromise = resolved.owner.kind === "project" ? client.getArtifactAsks(resolved.artifact.id) : Promise.resolve(resolved.issue?.open_asks ?? []);
18039
- const commentsPromise = resolved.owner.kind === "project" ? client.getArtifactComments(resolved.artifact.id) : client.getComments(resolved.issue?.key ?? "", resolved.artifact.id);
18045
+ const commentsPromise = resolved.owner.kind === "project" ? client.getArtifactComments(resolved.artifact.id) : client.getComments(resolved.issue?.key ?? "");
18040
18046
  const commentsResultPromise = commentsPromise.then((value) => ({ status: "fulfilled", value }), (reason) => ({ status: "rejected", reason }));
18041
- const asks = await asksPromise;
18042
- const marks = asks.filter((ask) => ask.state === "open" && ask.anchor?.artifact_id === resolved.artifact.id).map((ask) => `ask ${ask.id}`);
18047
+ const asks = (await asksPromise).filter((ask) => ask.state === "open" && ask.anchor?.artifact_id === resolved.artifact.id);
18043
18048
  const commentsResult = await commentsResultPromise;
18044
- if (commentsResult.status === "rejected") {
18045
- if (dispatchAnswered(commentsResult.reason, 404))
18046
- return marks;
18049
+ if (commentsResult.status === "rejected" && !dispatchAnswered(commentsResult.reason, 404)) {
18047
18050
  throw commentsResult.reason;
18048
18051
  }
18049
- return [
18050
- ...marks,
18051
- ...commentsResult.value.filter((comment) => !comment.resolved && comment.anchor?.artifact_id === resolved.artifact.id).map((comment) => `comment ${comment.id}`)
18052
- ];
18052
+ const comments = commentsResult.status === "fulfilled" ? commentsResult.value : [];
18053
+ const askReplies = new Map(asks.map((ask) => [ask.id, []]));
18054
+ for (const comment of comments) {
18055
+ if (comment.ask_id)
18056
+ askReplies.get(comment.ask_id)?.push(comment);
18057
+ }
18058
+ const askThreads = asks.map((ask) => [
18059
+ `ask ${ask.id} \xB7 ${actorText(ask.author)} \xB7 ${ask.created_at}`,
18060
+ ...anchorLines(ask),
18061
+ `Question: ${ask.question}`,
18062
+ ...threadReplyLines(askReplies.get(ask.id) ?? [])
18063
+ ].join(`
18064
+ `));
18065
+ const byId = new Map(comments.map((comment) => [comment.id, comment]));
18066
+ const roots = comments.filter((comment) => comment.reply_to === null && !comment.ask_id && !comment.resolved && comment.anchor?.artifact_id === resolved.artifact.id);
18067
+ const replies = new Map(roots.map((root) => [root.id, []]));
18068
+ for (const comment of comments) {
18069
+ const root = comment.reply_to === null ? undefined : threadRootId(comment, byId);
18070
+ if (root !== undefined)
18071
+ replies.get(root)?.push(comment);
18072
+ }
18073
+ const commentThreads = roots.map((root) => [
18074
+ `comment ${root.id} \xB7 ${actorText(root.author)} \xB7 ${root.created_at}`,
18075
+ ...anchorLines(root),
18076
+ `Body: ${root.body}`,
18077
+ ...threadReplyLines(replies.get(root.id) ?? [])
18078
+ ].join(`
18079
+ `));
18080
+ return [...askThreads, ...commentThreads];
18081
+ }
18082
+ function threadReplyLines(replies) {
18083
+ return replies.flatMap((reply) => [
18084
+ `reply ${reply.id} \xB7 ${actorText(reply.author)} \xB7 ${reply.created_at}`,
18085
+ `Body: ${reply.body}`
18086
+ ]);
18087
+ }
18088
+ function threadRootId(comment, byId) {
18089
+ const seen = new Set;
18090
+ let current = comment;
18091
+ while (current.reply_to !== null) {
18092
+ if (seen.has(current.id))
18093
+ return;
18094
+ seen.add(current.id);
18095
+ const parent = byId.get(current.reply_to);
18096
+ if (parent === undefined)
18097
+ return;
18098
+ current = parent;
18099
+ }
18100
+ return current.id;
18053
18101
  }
18054
18102
  async function blockAsks(client, resolved, state) {
18055
18103
  const asks = await (resolved.issue === undefined ? client.getArtifactAsks(resolved.artifact.id, state) : client.listIssueAsks(resolved.issue.key, state));
@@ -18574,7 +18622,8 @@ async function executeDispatchTool(input) {
18574
18622
  throw new Error(`Dispatch claimed ${issueKey} but answered with no claim`);
18575
18623
  }
18576
18624
  const claimed = `${issueKey}: claimed by you since ${held.at}. Its status is ${after.status}`;
18577
- text = legionManaged ? `${claimed}; ${LEGION_OWNS_STATUS} Release the claim when you stop.` : `${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.`;
18625
+ const reaches = `A person's answers, comments and messages on ${issueKey} now reach you directly.`;
18626
+ 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}`;
18578
18627
  }
18579
18628
  return {
18580
18629
  text: `${text}${await notSubscribed(issueTopic(issueKey), input.subscriptions)}`,
@@ -19013,24 +19062,27 @@ Document token: ${listed.token}`,
19013
19062
  } : { issue: resolved.issue?.key }, version, resolved.owner.kind === "project" ? resolved.owner.project : resolved.owner.issue, shown);
19014
19063
  }
19015
19064
  const documentPromise = client.docRead(resolved.artifact.id, version);
19016
- const marksPromise = openArtifactMarks(client, resolved);
19017
- const marksResultPromise = marksPromise.then((value) => ({ status: "fulfilled", value }), (reason) => ({ status: "rejected", reason }));
19065
+ const threadsPromise = openAnchoredThreads(client, resolved);
19066
+ const threadsResultPromise = threadsPromise.then((value) => ({ status: "fulfilled", value }), (reason) => ({ status: "rejected", reason }));
19018
19067
  const document = await documentPromise;
19019
- const marksResult = await marksResultPromise;
19020
- if (marksResult.status === "rejected")
19021
- throw marksResult.reason;
19022
- const marks = marksResult.value;
19068
+ const threadsResult = await threadsResultPromise;
19069
+ if (threadsResult.status === "rejected")
19070
+ throw threadsResult.reason;
19071
+ const threads = threadsResult.value;
19023
19072
  const approval = approvalLine(resolved.artifact);
19024
19073
  const trailer = [
19025
19074
  ..."token" in document && document.token !== undefined ? [`Document token: ${document.token}`] : [],
19026
- ...marks.length === 0 ? [] : [`Open anchored asks/comments: ${marks.join(", ")}`],
19027
19075
  ...approval === undefined ? [] : [approval]
19028
19076
  ];
19029
19077
  return {
19030
- text: trailer.length === 0 ? document.markdown : `${document.markdown}
19078
+ text: [
19079
+ document.markdown,
19080
+ ...trailer.length === 0 ? [] : [trailer.join(`
19081
+ `)],
19082
+ ...threads.length === 0 ? [] : ["Open anchored threads:", ...threads]
19083
+ ].join(`
19031
19084
 
19032
- ${trailer.join(`
19033
- `)}`,
19085
+ `),
19034
19086
  details: resolved.owner.kind === "project" ? {
19035
19087
  project: resolved.artifact.project,
19036
19088
  document: `${resolved.artifact.project}/${resolved.artifact.slug}`
@@ -20184,7 +20236,9 @@ var SessionWireSchema = object({
20184
20236
  roles: array(string2()).optional(),
20185
20237
  capabilities: array(string2()).optional(),
20186
20238
  self_subscribed: boolean2(),
20187
- last_seen: number2().int().optional()
20239
+ last_seen: number2().int().optional(),
20240
+ plugin: string2().optional(),
20241
+ plugin_version: string2().optional()
20188
20242
  });
20189
20243
  var RoleWireSchema = object({
20190
20244
  role: string2(),
@@ -20320,7 +20374,9 @@ function createEnvoyClient(config) {
20320
20374
  ...input.capabilities === undefined ? {} : { capabilities: input.capabilities },
20321
20375
  driving: input.driving,
20322
20376
  ...input.selfSubscribed === undefined ? {} : { self_subscribed: input.selfSubscribed },
20323
- host: machineID()
20377
+ host: machineID(),
20378
+ plugin: input.plugin.name,
20379
+ plugin_version: input.plugin.version
20324
20380
  }))),
20325
20381
  unsubscribe: async (input) => {
20326
20382
  await post("/v1/interests/unsubscribe", {
package/dist/envoy.js CHANGED
@@ -6792,7 +6792,7 @@ var require_protocol = __commonJS(function(exports) {
6792
6792
  }
6793
6793
  disconnect() {
6794
6794
  this.dispatchStatus({ type: core_1.DebugEvents.StaleConnection, data: "" });
6795
- this.transport.disconnect();
6795
+ this.transport.close();
6796
6796
  }
6797
6797
  reconnect() {
6798
6798
  if (this.connected) {
@@ -15633,6 +15633,7 @@ var require_node_transport = __commonJS(function(exports) {
15633
15633
  d.resolve(socket);
15634
15634
  socket.removeAllListeners();
15635
15635
  });
15636
+ this.socket = socket;
15636
15637
  socket.on("error", (err) => {
15637
15638
  dialError = err;
15638
15639
  });
@@ -15915,8 +15916,11 @@ var require_node_transport = __commonJS(function(exports) {
15915
15916
  }
15916
15917
  _closed(err_1) {
15917
15918
  return __awaiter(this, arguments, undefined, function* (err, internal = true) {
15918
- if (!this.connected)
15919
+ if (!this.connected) {
15920
+ if (this.socket)
15921
+ this.socket.destroy();
15919
15922
  return;
15923
+ }
15920
15924
  if (this.done)
15921
15925
  return;
15922
15926
  this.closeError = err;
@@ -29691,7 +29695,10 @@ var IssueEventPayloadSchema = object({
29691
29695
  status: string2().optional(),
29692
29696
  priority: number2().int().min(0).max(3).nullable().optional(),
29693
29697
  rank: string2().optional(),
29694
- route: string2().nullish()
29698
+ route: string2().nullish(),
29699
+ changed: array(string2()).optional(),
29700
+ ancestors: array(string2()).optional(),
29701
+ thread_logins: array(string2()).optional()
29695
29702
  });
29696
29703
  var ArtifactCreatedEventPayloadSchema = object({
29697
29704
  artifact: object({ id: string2().optional(), slug: string2().optional(), name: string2().optional() }).optional()
@@ -29745,11 +29752,12 @@ var askEventPayloadFields = {
29745
29752
  primary: boolean2().optional()
29746
29753
  }).optional(),
29747
29754
  resolution: object({
29748
- kind: _enum2(["retracted", "resolved"]).optional(),
29755
+ kind: _enum2(["retracted", "resolved", "withdrawn"]).optional(),
29749
29756
  reason: string2().optional(),
29750
29757
  actor: object({ kind: string2().optional(), id: string2().optional() }).passthrough().optional(),
29751
29758
  at: string2().optional()
29752
- }).nullish()
29759
+ }).nullish(),
29760
+ thread_logins: array(string2()).optional()
29753
29761
  };
29754
29762
  var AskEventPayloadSchema = intersection(object(askEventPayloadFields), object({
29755
29763
  previous: never().optional(),
@@ -29811,7 +29819,8 @@ var CommentEventPayloadSchema = object({
29811
29819
  author: object({ kind: string2(), id: string2() }).optional(),
29812
29820
  created_at: string2().optional(),
29813
29821
  mentions: array(CommentMentionSchema).optional(),
29814
- deliveries: array(CommentDeliverySchema).optional()
29822
+ deliveries: array(CommentDeliverySchema).optional(),
29823
+ thread_logins: array(string2()).optional()
29815
29824
  }).passthrough();
29816
29825
  var MessageEventPayloadSchema = object({
29817
29826
  id: string2().optional(),
@@ -29820,7 +29829,8 @@ var MessageEventPayloadSchema = object({
29820
29829
  in_reply_to: string2().nullish(),
29821
29830
  reply_body: string2().optional(),
29822
29831
  thread_target: string2().optional(),
29823
- author: object({ kind: string2(), id: string2() }).optional()
29832
+ author: object({ kind: string2(), id: string2() }).optional(),
29833
+ thread_logins: array(string2()).optional()
29824
29834
  });
29825
29835
  var DispatchTargetedResourceIDSchema = uuid2();
29826
29836
  var DispatchTargetedMessagePayloadSchema = MessageEventPayloadSchema.extend({
@@ -30115,7 +30125,7 @@ var dispatchToolSpecs = [
30115
30125
  priority: 1,
30116
30126
  before: "DSP-2"
30117
30127
  },
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}`,
30128
+ 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
30129
  arguments: (z) => ({
30120
30130
  issue: z.string().describe(ISSUE_REFERENCE),
30121
30131
  status: z.enum(ISSUE_STATUSES).describe("New lifecycle status.").optional(),
@@ -30142,7 +30152,7 @@ var dispatchToolSpecs = [
30142
30152
  {
30143
30153
  name: "dispatch_claim",
30144
30154
  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,
30155
+ 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
30156
  arguments: (z) => ({
30147
30157
  issue: z.string().describe(ISSUE_REFERENCE),
30148
30158
  release: z.boolean().describe("Give up your claim instead of taking it; the issue's status does not change.").optional()
@@ -30229,7 +30239,7 @@ var dispatchToolSpecs = [
30229
30239
  kind: "retracted",
30230
30240
  reason: "A newer question supersedes this one."
30231
30241
  },
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.",
30242
+ 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
30243
  arguments: (z) => ({
30234
30244
  ask: z.string().describe("Ask id (uuid) to close; an 8+ hex prefix unique among this session's own open asks " + "works too."),
30235
30245
  kind: z.enum(["retracted", "resolved"]).describe("Whether the ask is retracted or self-resolved."),
@@ -30348,7 +30358,7 @@ var dispatchToolSpecs = [
30348
30358
  {
30349
30359
  name: "dispatch_doc_read",
30350
30360
  example: { issue: "DSP-1" },
30351
- description: "Read a live document or a named document version, or the text of an uploaded file at its latest or named version. " + "Do not use it for issue status, asks, or events; " + "use dispatch read instead. Supply ref, issue, or project plus artifact; issue plus an omitted artifact reads the primary document. " + "A live read returns its document token for an optional dispatch doc-edit precondition. With blocks it lists the live document's blocks instead of its markdown, in document order: each block's id, type, token, anchored comments and asks, and opening words, and under a table each row by the index delete_row takes and each cell by its row and the column delete_column takes; block ids, block tokens and those indexes are what dispatch doc-edit takes. " + "A picture (an uploaded PNG, JPEG, GIF or WebP of at most 3,750,000 bytes, 5 MB once base64-encoded) comes back as an image you see, with its name, type, size and version, every time you ask, including one a read already showed this session; " + "any other file that is not UTF-8 text is described, with the route that serves its bytes. " + OWNER_REFERENCE,
30361
+ description: "Read a live document or a named document version, or the text of an uploaded file at its latest or named version. " + "Do not use it for issue status, asks, or events; " + "use dispatch read instead. Supply ref, issue, or project plus artifact; issue plus an omitted artifact reads the primary document. " + "A live read returns its document token for an optional dispatch doc-edit precondition. With blocks it lists the live document's blocks instead of its markdown, in document order: each block's id, type, token, anchored comments and asks, and opening words, and under a table each row by the index delete_row takes and each cell by its row and the column delete_column takes; block ids, block tokens and those indexes are what dispatch doc-edit takes. " + "After the markdown it prints every open thread anchored on the document in full: an open ask with its id and question and each reply's author, time and text, and a comment thread with its root's id, author, quote and text and each reply's author, time and text, in order; a resolved thread, and an ask that is answered or resolved, is not printed. " + "A picture (an uploaded PNG, JPEG, GIF or WebP of at most 3,750,000 bytes, 5 MB once base64-encoded) comes back as an image you see, with its name, type, size and version, every time you ask, including one a read already showed this session; " + "any other file that is not UTF-8 text is described, with the route that serves its bytes. " + OWNER_REFERENCE,
30352
30362
  arguments: (z) => ({
30353
30363
  issue: z.string().describe(ISSUE_REFERENCE).optional(),
30354
30364
  project: z.string().describe("Project key owning the document.").optional(),
@@ -33555,8 +33565,8 @@ class DispatchClient {
33555
33565
  async resolveComment(id, actor) {
33556
33566
  return this.#json("POST", ["api", "v1", "comments", id, "resolve"], { actor });
33557
33567
  }
33558
- async getComments(issue, artifact) {
33559
- return this.#json("GET", ["api", "v1", "issues", await this.#resolveIssue(issue), "comments"], undefined, artifact ? { artifact } : undefined);
33568
+ async getComments(issue) {
33569
+ return this.#json("GET", ["api", "v1", "issues", await this.#resolveIssue(issue), "comments"]);
33560
33570
  }
33561
33571
  async getIssueReferences(issue) {
33562
33572
  return this.#json("GET", [
@@ -34245,6 +34255,22 @@ function natsAuthOptions(seed) {
34245
34255
  return { authenticator: import_nats.nkeyAuthenticator(bytes) };
34246
34256
  }
34247
34257
 
34258
+ // ../envoy-client/src/nats-connection.ts
34259
+ var NATS_PING_INTERVAL_MS = 1e4;
34260
+ var NATS_MAX_PINGS_OUT = 2;
34261
+ function natsConnectionOptions(input) {
34262
+ return {
34263
+ servers: [...input.servers],
34264
+ name: input.name,
34265
+ ...natsAuthOptions(input.seed),
34266
+ reconnect: true,
34267
+ maxReconnectAttempts: -1,
34268
+ reconnectTimeWait: 2000,
34269
+ pingInterval: NATS_PING_INTERVAL_MS,
34270
+ maxPingOut: NATS_MAX_PINGS_OUT
34271
+ };
34272
+ }
34273
+
34248
34274
  // ../envoy-client/src/transport.ts
34249
34275
  var DEFAULT_TIMEOUT_MS = 5000;
34250
34276
  var RETRY_DELAY_MS = 250;
@@ -34269,7 +34295,9 @@ var SessionWireSchema = object({
34269
34295
  roles: array(string2()).optional(),
34270
34296
  capabilities: array(string2()).optional(),
34271
34297
  self_subscribed: boolean2(),
34272
- last_seen: number2().int().optional()
34298
+ last_seen: number2().int().optional(),
34299
+ plugin: string2().optional(),
34300
+ plugin_version: string2().optional()
34273
34301
  });
34274
34302
  var RoleWireSchema = object({
34275
34303
  role: string2(),
@@ -34416,7 +34444,9 @@ function createEnvoyClient(config) {
34416
34444
  ...input.capabilities === undefined ? {} : { capabilities: input.capabilities },
34417
34445
  driving: input.driving,
34418
34446
  ...input.selfSubscribed === undefined ? {} : { self_subscribed: input.selfSubscribed },
34419
- host: machineID()
34447
+ host: machineID(),
34448
+ plugin: input.plugin.name,
34449
+ plugin_version: input.plugin.version
34420
34450
  }))),
34421
34451
  unsubscribe: async (input) => {
34422
34452
  await post("/v1/interests/unsubscribe", {
@@ -35097,9 +35127,10 @@ function createReplayEngine(options) {
35097
35127
  function replaySuppressed(rendered) {
35098
35128
  return rendered.skip || rendered.malformedDelivery === true;
35099
35129
  }
35130
+ var REPLAYED_SUFFIX = "while this session's connection was down.";
35100
35131
  function replayedText(content, publishedAt) {
35101
35132
  return `${content}
35102
- Published at ${publishedAt} while this session's connection was down.`;
35133
+ Published at ${publishedAt} ${REPLAYED_SUFFIX}`;
35103
35134
  }
35104
35135
  function failureNoticeFields(notice) {
35105
35136
  const readWith = notice.readWith === "dispatch read" ? "Read it with the `dispatch read` command on the issue or ask it concerns." : "Read it with the envoy_inbox tool.";
@@ -35762,7 +35793,7 @@ function parseEnvoyToolArguments(operation, parameters) {
35762
35793
 
35763
35794
  // ../pi-shared/src/interface.ts
35764
35795
  import { logger } from "@oh-my-pi/pi-utils";
35765
- var ENVOY_PLUGIN_INTERFACE_VERSION = 3;
35796
+ var ENVOY_PLUGIN_INTERFACE_VERSION = 4;
35766
35797
  var ENVOY_PLUGIN_INTERFACE_KEY = Symbol.for("legion.pi-shared.envoy-plugin-interface");
35767
35798
  var LEGION_PLUGIN_LOADED_KEY = Symbol.for("legion.pi-legion.loaded");
35768
35799
  var LEGACY_LEGION_LOADED_KEY = Symbol.for("legion.pi-envoy.legion-loaded");
@@ -35783,7 +35814,8 @@ function envoyPluginInterface() {
35783
35814
  slackRoleOwned: false
35784
35815
  },
35785
35816
  injectedUserTurns: new Map,
35786
- bootstrappedSession: { file: undefined }
35817
+ bootstrappedSession: { file: undefined },
35818
+ startupTurn: undefined
35787
35819
  };
35788
35820
  store[ENVOY_PLUGIN_INTERFACE_KEY] = created;
35789
35821
  return created;
@@ -36023,6 +36055,10 @@ import * as host2 from "@oh-my-pi/pi-coding-agent";
36023
36055
  import { logger as logger3, procmgr, VERSION } from "@oh-my-pi/pi-utils";
36024
36056
  var import_nats2 = __toESM(require_mod4(), 1);
36025
36057
 
36058
+ // package.json
36059
+ var name = "@sjawhar/pi-envoy";
36060
+ var version2 = "11.8.0";
36061
+
36026
36062
  // src/agent-stream.ts
36027
36063
  var encoder2 = new TextEncoder;
36028
36064
  var REPLAY_ARRAY_BYTES = 2;
@@ -39421,14 +39457,11 @@ function envoyExtension(pi) {
39421
39457
  if (connection?.isClosed() === false)
39422
39458
  return connection;
39423
39459
  const { natsUrls, natsSeed } = requireInbound();
39424
- const dialled = await import_nats2.connect({
39425
- servers: [...natsUrls],
39460
+ const dialled = await import_nats2.connect(natsConnectionOptions({
39461
+ servers: natsUrls,
39426
39462
  name: `omp-${sessionID || "unknown"}`,
39427
- ...natsAuthOptions(natsSeed),
39428
- reconnect: true,
39429
- maxReconnectAttempts: -1,
39430
- reconnectTimeWait: 2000
39431
- });
39463
+ seed: natsSeed
39464
+ }));
39432
39465
  if (!live() || shuttingDown || connection?.isClosed() === false) {
39433
39466
  await dialled.close().catch(() => {});
39434
39467
  if (!shuttingDown && connection?.isClosed() === false)
@@ -40103,7 +40136,8 @@ ${REPLAYED_BTW_NOTE}`, frame.envelope, "inert");
40103
40136
  title: activeSessionContext?.sessionManager.getSessionName?.() ?? "",
40104
40137
  capabilities: sideTurn(activeSessionContext) === undefined ? CAPABILITIES_WITHOUT_BTW : DELIVERY_CAPABILITIES,
40105
40138
  driving: false,
40106
- selfSubscribed: true
40139
+ selfSubscribed: true,
40140
+ plugin: { name, version: version2 }
40107
40141
  }).then((result) => {
40108
40142
  registeredFor = registeringFor;
40109
40143
  registeredAt = Date.now();
@@ -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 takes the tree out of the workflow.
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 delivers no comments: that turn, `dispatch issue-update --route session:<your id>` (`--route ''` on release) or `envoy_subscribe notifications.dispatch.issue.<KEY>.>`. Never route such an issue.
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
- - State the current design, never how people reached it.
34
- - Link each source where the person wrote it: `dispatch://KEY/comment/<id>`, `/ask/<id>`, `/message/<id>`, or a Slack URL. With no link, state the design.
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
- - A person's decision is their answered ask block. Each part it shapes links it.
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 approved spec's plan with `writing-plans` as the issue's `plan.md`, not a repository file.
75
+ Write the plan with `writing-plans` as the issue's `plan.md`, not a repository file.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-envoy",
3
- "version": "11.6.0",
3
+ "version": "11.8.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "omp": {