@sjawhar/claude-envoy 5.19.3 → 5.20.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/.claude-plugin/plugin.json +1 -1
- package/.omp-plugin/plugin.json +1 -1
- package/dist/codex-hook.js +77 -27
- package/dist/dispatch.js +77 -27
- package/dist/envoy-channel.js +78 -28
- package/dist/session-hook.js +77 -27
- package/package.json +1 -1
package/dist/envoy-channel.js
CHANGED
|
@@ -36632,6 +36632,9 @@ var PriorityUpdatedEventPayloadSchema = strictObject({ id: string2(), change: _e
|
|
|
36632
36632
|
// ../contracts/src/dispatch-api-limits.ts
|
|
36633
36633
|
var MAX_ISSUE_BLOCKERS = 20;
|
|
36634
36634
|
var MAX_ISSUE_ADVANCES = 20;
|
|
36635
|
+
var MAX_ISSUE_LABELS = 20;
|
|
36636
|
+
var ISSUE_LABEL_MAX = 40;
|
|
36637
|
+
var MAX_ISSUE_COMPONENTS = 50;
|
|
36635
36638
|
var ISSUE_TITLE_MAX = 1000;
|
|
36636
36639
|
var PROJECT_NAME_MAX = 80;
|
|
36637
36640
|
var MAX_ISSUE_PAGE_LIMIT = 250;
|
|
@@ -36850,6 +36853,9 @@ var DecisionKeptEventPayloadSchema = strictObject({
|
|
|
36850
36853
|
changed_version: number2().int()
|
|
36851
36854
|
}).readonly();
|
|
36852
36855
|
|
|
36856
|
+
// ../contracts/src/go-blank.ts
|
|
36857
|
+
var goBlankPattern = /^[\t\n\v\f\r \u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]*$/u;
|
|
36858
|
+
|
|
36853
36859
|
// ../contracts/src/dispatch-tools.ts
|
|
36854
36860
|
function dispatchToolSchema(spec, z, opts) {
|
|
36855
36861
|
const shape = spec.arguments(z);
|
|
@@ -37015,10 +37021,11 @@ var commentValidation = {
|
|
|
37015
37021
|
message: COMMENT_RULE,
|
|
37016
37022
|
refusal: (value) => commentProblem(value) ?? COMMENT_RULE
|
|
37017
37023
|
};
|
|
37018
|
-
var ISSUE_UPDATE_FIELDS_RULE = "Issue update requires at least one field besides issue: status, title, labels, priority, assignee, external_links, route, parent, blocked_by, advances, components, repo, before, or after.";
|
|
37024
|
+
var ISSUE_UPDATE_FIELDS_RULE = "Issue update requires at least one field besides issue: status, title, labels, labels_add, priority, assignee, external_links, route, parent, blocked_by, advances, components, repo, before, or after.";
|
|
37019
37025
|
var ISSUE_UPDATE_DONE_RULE = "status done requires reason, a non-empty note saying why the issue is closing, posted on the issue before it closes so the close carries its note";
|
|
37020
37026
|
var ISSUE_UPDATE_REASON_RULE = "reason goes only with status done";
|
|
37021
|
-
var
|
|
37027
|
+
var ISSUE_UPDATE_LABELS_RULE = "labels_add goes without labels";
|
|
37028
|
+
var ISSUE_UPDATE_RULE = `${ISSUE_UPDATE_FIELDS_RULE} ${ISSUE_UPDATE_DONE_RULE}; ${ISSUE_UPDATE_REASON_RULE}; ${ISSUE_UPDATE_LABELS_RULE}.`;
|
|
37022
37029
|
function issueUpdateProblem(value) {
|
|
37023
37030
|
const input = value;
|
|
37024
37031
|
if (input.status === "done") {
|
|
@@ -37029,7 +37036,10 @@ function issueUpdateProblem(value) {
|
|
|
37029
37036
|
const status = typeof input.status === "string" ? `status ${input.status}` : "an update without status done";
|
|
37030
37037
|
return `${ISSUE_UPDATE_REASON_RULE}: it is the note posted on the issue as it closes, and ${status} closes nothing. Drop reason, or set status done to close the issue.`;
|
|
37031
37038
|
}
|
|
37032
|
-
|
|
37039
|
+
if (input.labels !== undefined && input.labels_add !== undefined) {
|
|
37040
|
+
return `${ISSUE_UPDATE_LABELS_RULE}: labels replaces every label the issue holds and labels_add adds to them, so name the labels to add in labels_add alone, or the whole set in labels alone.`;
|
|
37041
|
+
}
|
|
37042
|
+
const changesAField = typeof input.status === "string" || typeof input.title === "string" || Array.isArray(input.labels) || Array.isArray(input.labels_add) || typeof input.priority === "number" || input.priority === null || typeof input.assignee === "string" || input.assignee === null || Array.isArray(input.external_links) || typeof input.route === "string" || typeof input.parent === "string" || Array.isArray(input.blocked_by) || Array.isArray(input.advances) || typeof input.components === "object" && input.components !== null || typeof input.repo === "string" || typeof input.before === "string" || typeof input.after === "string";
|
|
37033
37043
|
return changesAField ? undefined : ISSUE_UPDATE_FIELDS_RULE;
|
|
37034
37044
|
}
|
|
37035
37045
|
var messageValidation = {
|
|
@@ -37064,12 +37074,20 @@ var readValidation = {
|
|
|
37064
37074
|
refusal: (value) => readProblem(value) ?? `${READ_OWNER_RULE} ${READ_MESSAGE_RULE} ${READ_HISTORY_RULE}`
|
|
37065
37075
|
};
|
|
37066
37076
|
var ISSUE_COMPONENTS_MODES = ["inherit", "explicit", "none"];
|
|
37077
|
+
var COMPONENTS_RULE = "components mode explicit names ids, and mode none names a reason.";
|
|
37067
37078
|
function componentsArgument(z) {
|
|
37068
|
-
return z.
|
|
37069
|
-
mode: z.enum(ISSUE_COMPONENTS_MODES).describe("inherit: take the parent chain's attachment within the issue's own project (the default; deletes this issue's own). explicit: attach to ids. none: not architectural work, with reason."),
|
|
37070
|
-
ids: z.array(z.string({ min: 1 }), { min: 1, max:
|
|
37071
|
-
reason: z.string({ min: 1 }).describe("
|
|
37072
|
-
})
|
|
37079
|
+
return z.refineObject({
|
|
37080
|
+
mode: z.enum(ISSUE_COMPONENTS_MODES).describe("inherit: take the parent chain's attachment within the issue's own project (the default; deletes this issue's own). explicit: attach to ids, which it requires. none: not architectural work, with the reason it requires."),
|
|
37081
|
+
ids: z.array(z.string({ min: 1 }), { min: 1, max: MAX_ISSUE_COMPONENTS }).describe("Required for mode explicit: bare component ids from the project's architecture model (web, dispatch-server), not external ones.").optional(),
|
|
37082
|
+
reason: z.string({ min: 1 }).describe("Required for mode none: why this issue is not architectural (process, hiring, ops).").optional()
|
|
37083
|
+
}, (value) => {
|
|
37084
|
+
const input = value;
|
|
37085
|
+
if (input.mode === "explicit")
|
|
37086
|
+
return Array.isArray(input.ids) && input.ids.length > 0;
|
|
37087
|
+
if (input.mode === "none")
|
|
37088
|
+
return typeof input.reason === "string" && !goBlankPattern.test(input.reason);
|
|
37089
|
+
return true;
|
|
37090
|
+
}, COMPONENTS_RULE).describe(`Attach the issue to architecture components. Attach the root before decomposing it; children inherit unless they choose. ${COMPONENTS_RULE}`);
|
|
37073
37091
|
}
|
|
37074
37092
|
var SPEC_WRITING_POINTER = "Write a spec as skill://dispatch-writing-specs says.";
|
|
37075
37093
|
var CI_CHECK_RULE = "A check block whose ci_check names the CI check run that proves it carries no run, keeps when " + "before_merge, names its negative_control, and holds no recorded result. A write that adds a " + "check block, or changes a check's ci_check, run, when or negative_control, so that it breaks " + "one of those rules is refused with 400 INVALID_CI_CHECK, which names the block and the rule. " + "A check that already holds a result never becomes CI's: write a new check block under a new id.";
|
|
@@ -37117,7 +37135,7 @@ var REVIEW_REASON_RULE = "verdict changes_requested requires reason, a non-empty
|
|
|
37117
37135
|
var reviewValidation = {
|
|
37118
37136
|
check: (value) => {
|
|
37119
37137
|
const input = value;
|
|
37120
|
-
return input.verdict !== "changes_requested" || typeof input.reason === "string" && input.reason
|
|
37138
|
+
return input.verdict !== "changes_requested" || typeof input.reason === "string" && !goBlankPattern.test(input.reason);
|
|
37121
37139
|
},
|
|
37122
37140
|
message: REVIEW_REASON_RULE
|
|
37123
37141
|
};
|
|
@@ -37208,10 +37226,10 @@ var dispatchToolSpecs = [
|
|
|
37208
37226
|
parent: z.string().describe("Optional parent issue, in any project.").optional(),
|
|
37209
37227
|
blocked_by: z.array(z.string({ min: 1 }), { max: MAX_ISSUE_BLOCKERS }).describe("Issue keys this issue waits on; a key of any project, so work tracked elsewhere can be named. Dispatch refuses a dependency cycle.").optional(),
|
|
37210
37228
|
advances: z.array(z.string({ min: 1 }), { max: MAX_ISSUE_ADVANCES }).describe("Ids of the deployment's priorities this issue advances, which dispatch priorities lists. A child inherits every priority the issues above it advance, so name here only what this issue adds.").optional(),
|
|
37211
|
-
external: z.string().describe("Optional external issue reference.").optional(),
|
|
37229
|
+
external: z.string().describe("Optional external issue reference, owner/repo#n: the GitHub issue to import into the project this call names. A reference already imported into that project answers its issue and creates nothing; one already imported into another project is refused with 400 EXTERNAL_PROJECT_MISMATCH.").optional(),
|
|
37212
37230
|
force: z.boolean().describe("Create even though POSSIBLE_DUPLICATE listed similar issues; pass it only after reading them.").optional(),
|
|
37213
37231
|
spec: z.string().describe(`Optional initial primary-document markdown. ${SPEC_WRITING_POINTER}`).optional(),
|
|
37214
|
-
labels: z.array(z.string({ min: 1, max:
|
|
37232
|
+
labels: z.array(z.string({ min: 1, max: ISSUE_LABEL_MAX }), { max: MAX_ISSUE_LABELS }).describe(`Optional initial labels, at most ${MAX_ISSUE_LABELS} labels of up to ${ISSUE_LABEL_MAX} characters.`).optional(),
|
|
37215
37233
|
priority: z.number({ int: true, min: 0, max: 3 }).describe("Optional coarse priority, a number from 0 to 3: 0 is highest and 3 is lowest.").optional(),
|
|
37216
37234
|
assignee: z.string().describe("Email of the person who answers this issue's asks (someone who has signed in to Dispatch); defaults to your owner when you act for a person, else the parent's assignee, else the project's default assignee. Every project names a default assignee, so a new issue always has one. A parent in another project passes on no assignee. A question on it reaches the person it was handed to, else the issue's assignee, else the project's default assignee. Set it only when a person said who owns the issue.").optional(),
|
|
37217
37235
|
components: componentsArgument(z).optional(),
|
|
@@ -37225,13 +37243,14 @@ var dispatchToolSpecs = [
|
|
|
37225
37243
|
priority: 1,
|
|
37226
37244
|
before: "DSP-2"
|
|
37227
37245
|
},
|
|
37228
|
-
description: "Update an existing issue: move its lifecycle status, retitle it, replace its labels, set " + "its priority, set or clear its assignee, 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, replace the " + "priorities it advances, 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, so the close carries its note; closing an issue that is " + "already closed is refused (ISSUE_CLOSED) before anything is posted. 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 still takes messages and comments, though not asks or artifacts; of this " + "tool's fields it 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. assignee is the person who answers " + "this issue's asks, and every ask on it waits on them until a person hands that ask on. " + "Passing null unassigns the issue, and every ask on it then waits on the project's default " + "assignee: a question reaches the person it was handed to, else the issue's assignee, else " + "the project's default assignee, so every question reaches a person. " + "Set the assignee when a person said who owns the work, as you " + "file the issue or hand it over. 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}`,
|
|
37246
|
+
description: "Update an existing issue: move its lifecycle status, retitle it, add labels to it or " + "replace its labels, set " + "its priority, set or clear its assignee, 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, replace the " + "priorities it advances, 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. labels_add adds labels and keeps every label the issue holds; " + "labels replaces the whole set, so a label it does not name is removed, and the two never " + "go together. 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, so the close carries its note; closing an issue that is " + "already closed is refused (ISSUE_CLOSED) before anything is posted. 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 still takes messages and comments, though not asks or artifacts; of this " + "tool's fields it 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. assignee is the person who answers " + "this issue's asks, and every ask on it waits on them until a person hands that ask on. " + "Passing null unassigns the issue, and every ask on it then waits on the project's default " + "assignee: a question reaches the person it was handed to, else the issue's assignee, else " + "the project's default assignee, so every question reaches a person. " + "Set the assignee when a person said who owns the work, as you " + "file the issue or hand it over. 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}`,
|
|
37229
37247
|
arguments: (z) => ({
|
|
37230
37248
|
issue: z.string().describe(ISSUE_REFERENCE),
|
|
37231
37249
|
status: z.enum(ISSUE_STATUSES).describe("New lifecycle status.").optional(),
|
|
37232
37250
|
reason: z.string().describe(`Required with status done, and only with it: why the issue is closing. Posted on the issue as a message before it closes. ${BODY_BLOCK_RULE}`).optional(),
|
|
37233
37251
|
title: z.string({ min: 1, max: ISSUE_TITLE_MAX }).describe("Replacement title, at most 1,000 characters.").optional(),
|
|
37234
|
-
labels: z.array(z.string({ min: 1, max:
|
|
37252
|
+
labels: z.array(z.string({ min: 1, max: ISSUE_LABEL_MAX }), { max: MAX_ISSUE_LABELS }).describe(`Replacement label set, at most ${MAX_ISSUE_LABELS} labels of up to ${ISSUE_LABEL_MAX} characters; replaces every existing label, so a label it does not name is removed. To add labels and keep the others, use labels_add. Not with labels_add.`).optional(),
|
|
37253
|
+
labels_add: z.array(z.string({ min: 1, max: ISSUE_LABEL_MAX }), { max: MAX_ISSUE_LABELS }).describe(`Labels to add, at most ${MAX_ISSUE_LABELS} of up to ${ISSUE_LABEL_MAX} characters: each is added to the labels the issue holds when the write lands, and every label it holds stays; the issue holds at most ${MAX_ISSUE_LABELS} in all. Not with labels.`).optional(),
|
|
37235
37254
|
priority: z.number({ int: true, min: 0, max: 3 }).nullable().optional().describe("Coarse priority: 0 is P0 (highest) through 3 is P3 (lowest); null clears it."),
|
|
37236
37255
|
assignee: z.string().nullable().optional().describe("Email of the person who answers this issue's asks (someone who has signed in to Dispatch); null unassigns the issue, and every ask on it then waits on the project's default assignee. Set it only when a person said who owns the issue, never to move a question off the person holding it."),
|
|
37237
37256
|
external_links: z.array(z.string({ min: 1 })).describe("URLs to link; a non-empty list merges into the issue's existing external links by URL, an empty list removes every link instead.").optional(),
|
|
@@ -37403,7 +37422,7 @@ var dispatchToolSpecs = [
|
|
|
37403
37422
|
artifact: z.string().describe("Project document artifact id, slug, or filename containing the quoted text; optional when ref names it.").optional(),
|
|
37404
37423
|
ref: z.string().describe("Optional dispatch:// issue or document reference.").optional(),
|
|
37405
37424
|
quote: z.string().describe("Exact document text to replace."),
|
|
37406
|
-
replace_with: z.string().describe("Replacement text; a CR LF or a lone carriage return in it is written as a line feed."),
|
|
37425
|
+
replace_with: z.string().describe("Replacement markdown for the quoted text. Text alone stays in the quoted text's block; whole blocks " + "(paragraphs, lists, headings written with their #s) stand where the quoted text stood, and over a " + "heading's whole text they take the heading's place, so a heading that stays is written with its #s. " + "A table cell takes text alone. To move a section, write its blocks beside the whole text of the block " + "where it goes, and suggest each moved block's text replaced with nothing where it stood (an emptied " + "heading stays as its #s alone). A CR LF or a lone carriage return in it is written as a line feed."),
|
|
37407
37426
|
body: z.string().describe(`Optional rationale. ${BODY_BLOCK_RULE}`).optional(),
|
|
37408
37427
|
occurrence: z.number({ int: true, min: 0 }).describe("Optional zero-based occurrence of quote.").optional()
|
|
37409
37428
|
}),
|
|
@@ -37489,7 +37508,7 @@ var dispatchToolSpecs = [
|
|
|
37489
37508
|
ops: [{ op: "delete_column", block: "table-123", index: 1 }],
|
|
37490
37509
|
precondition: { blocks: [{ id: "table-123", token: "sha256:current-table-token" }] }
|
|
37491
37510
|
},
|
|
37492
|
-
description: "Apply deterministic document edits: replace or delete quoted text, insert markdown at an anchor, retype an identified paragraph or typed block into a schema-declared typed block, delete or move a whole block by its id, or delete a table row or column in place. " + "Do not use it for review feedback or for reading; use dispatch comment, dispatch suggest, or dispatch doc-read instead. " + "For replace, delete, and quote anchors, find text as rendered: inline Markdown (**bold**, `code`) is tolerated and must be balanced; a leading '# ' matches a heading at any level. A find that opens with a list marker ('- ', '5. ', with an optional '[ ] ' or '[x] ' after it) and matches no text as written selects an item of that kind of list whose text starts with the rest, its number not matched and a box matching only a task item in that state. A find or quote anchor stays inside one block, and in a table inside one cell: ' | ' is the boundary markdown writes between two cells, not text a cell holds, so a quote that runs across cells is refused, naming the cells; change several cells with one operation per cell in the same batch, and anchor on one cell's text. replace parses with as markdown, as insert parses its markdown: a with that parses to one paragraph is the new text of the matched span, and one that parses to blocks ('---' over a paragraph, a list, a table, two paragraphs) writes those blocks where the match sits, so a marker of a different kind from the block's own opens the block it names ('4. Design' is an ordered list, which a heading cannot hold) unless you escape it ('4\\. Design'). A with that opens with a marker of the same kind as the matched block's own would write it twice and is INVALID_OP - including prose that merely looks like one ('1999. was a year' into an ordered item), which you write as text by escaping it ('1999\\. was a year'). The exceptions are an item a find's list marker selected (it matched no text as written): replace(find=\"5. Old\", with=\"5. New\") gives the item the text 'New' under its own number, and a with that is the marker alone is INVALID_OP; and a heading rename whose find carried a heading marker: replace(find=\"## Old\", with=\"## New\") gives '## New', where a different level applies only when find named the heading's actual level (find \"## Old\" with \"### New\" makes it an h3), since '# ' selects a heading without naming its level. A task item (`- [ ]` / `- [x]`) is ticked the same way: when find matches from the start of the item's text and with opens with '[x] ' or '[ ] ', the opening sets the item's box and the rest is its new text (replace(find=\"Write it\", with=\"[x] Write it\") ticks it); the same opening over a plain list item or a paragraph stays literal text. Any non-empty with that renders to no text - whitespace alone - is INVALID_OP rather than a silent deletion; pass an empty with to delete the matched text on purpose - a list item, quote, typed block or footnote definition left holding only the emptied paragraph keeps it. " + "The blocks a with writes are refused, with the document unchanged, where the block holding the match cannot hold them: a heading and any cell of a table, which hold one line of text, and a typed block whose content rule they break - write that block's new text alone, and insert the blocks beside it. A hard break in with is INVALID_OP when the matched text is in a heading or a table cell, which are written on one line. In a table cell, with is the cell's text: write a | in it bare, in code too, since code whose text has an odd run of backslashes right before a | cannot be stored in a cell and is INVALID_OP, naming the cell. " + "A delete whose find is a block's entire text removes the block (a list emptied of its items goes too); delete with block removes any block by id, and move with block relocates one. A delete or retype that would take an ask block out of the document while its ask is open is refused, with nothing sent. delete_row and delete_column take a table block and a zero-based index, preserving the table block id and refusing to remove cells with open asks or unresolved comments. " + `Insert and move anchors also accept "start", "end", "heading:<exact heading text>", and "block:<id>"; dispatch doc-read --blocks lists every block's id, type, opening words and token, and each table's rows and cells with the indexes delete_row and delete_column take (GET /api/v1/artifacts/{artifact UUID}/blocks serves the same list). ` + "Optionally require the state just read: precondition selects exactly one of a document token from dispatch doc-read, or block {id, token} values from dispatch doc-read --blocks. A block guard must include every block the batch changes; Dispatch resolves quote targets and rejects an uncovered batch rather than applying it. Use a document token for insert or move, which depend on document order. Prefer block tokens when the covered content blocks are independent sections. Tokens include inline marks, so a fresh human comment also makes a stale edit fail. PRECONDITION_FAILED means re-read; EDIT_QUEUE_FULL means back off before retrying. " + `${CI_CHECK_RULE} ` + "The result carries the document token this edit produced, so a chain of guarded edits passes each result's token as the next edit's precondition with no dispatch doc-read between them. " + "A batch that leaves the document exactly as it was mints no version, named or not, and the result says nothing changed and names each operation that did nothing. " + "A change a browser removes while the edit is in flight is never reported as applied: EDIT_LOST_TO_CONCURRENT_CHANGE means the write was refused and nothing was written, so re-read the document and decide again, as with PRECONDITION_FAILED; lost_ops on a successful result names operations whose text the live document no longer has, because the deletion landed after the version was written. " + "Several paragraphs, or a list, go in one replace, since with writes the blocks its markdown names; blocks beside a block go in one insert, since two inserts at one anchor come out reversed. The result prints the markdown of each block the edit wrote, so read that rather than the document again. " + "Each decision block the edit adds gets the related-item check dispatch ask gets, waiting at most five seconds for all of them together: the result prints, after its first line, `Decision block <id>:` and what that check found, that it found nothing, or that it was not made and why. " + "A block id written as {#id} longer than 256 bytes is stored, but its block is no graph node, so no reference reaches it. " + `The spec holds requirements, design, and decisions - never progress, status, or timestamps. Work still to do is a task in the issue's plan, an issue, or an ask, never a separate document that lists it. ${OWNER_REFERENCE} ${SPEC_WRITING_POINTER}`,
|
|
37511
|
+
description: "Apply deterministic document edits: replace or delete quoted text, insert markdown at an anchor, retype an identified paragraph or typed block into a schema-declared typed block, delete or move a whole block by its id, or delete a table row or column in place. " + "Do not use it for review feedback or for reading; use dispatch comment, dispatch suggest, or dispatch doc-read instead. " + "For replace, delete, and quote anchors, find text as rendered: inline Markdown (**bold**, `code`) is tolerated and must be balanced; a leading '# ' matches a heading at any level whose whole text is the rest. A find that opens with a list marker ('- ', '5. ', with an optional '[ ] ' or '[x] ' after it) and matches no text as written selects an item of that kind of list whose text starts with the rest, its number not matched and a box matching only a task item in that state. A find or quote anchor stays inside one block, and in a table inside one cell: ' | ' is the boundary markdown writes between two cells, not text a cell holds, so a quote that runs across cells is refused, naming the cells; change several cells with one operation per cell in the same batch, and anchor on one cell's text. replace parses with as markdown, as insert parses its markdown: a with that parses to one paragraph is the new text of the matched span, and one that parses to blocks ('---' over a paragraph, a list, a table, two paragraphs) writes those blocks where the match sits, so a marker of a different kind from the block's own opens the block it names ('4. Design' is an ordered list, which a heading cannot hold) unless you escape it ('4\\. Design'). A with that opens with a marker of the same kind as the matched block's own would write it twice and is INVALID_OP - including prose that merely looks like one ('1999. was a year' into an ordered item), which you write as text by escaping it ('1999\\. was a year'). The exceptions are an item a find's list marker selected (it matched no text as written): replace(find=\"5. Old\", with=\"5. New\") gives the item the text 'New' under its own number, and a with that is the marker alone is INVALID_OP; and a heading rename whose find carried a heading marker: replace(find=\"## Old\", with=\"## New\") gives '## New', where a different level applies only when find named the heading's actual level (find \"## Old\" with \"### New\" makes it an h3), since '# ' selects a heading without naming its level. A task item (`- [ ]` / `- [x]`) is ticked the same way: when find matches from the start of the item's text and with opens with '[x] ' or '[ ] ', the opening sets the item's box and the rest is its new text (replace(find=\"Write it\", with=\"[x] Write it\") ticks it); the same opening over a plain list item or a paragraph stays literal text. Any non-empty with that renders to no text - whitespace alone - is INVALID_OP rather than a silent deletion; pass an empty with to delete the matched text on purpose - a list item, quote, typed block or footnote definition left holding only the emptied paragraph keeps it. " + "The blocks a with writes are refused, with the document unchanged, where the block holding the match cannot hold them: a heading and any cell of a table, which hold one line of text, and a typed block whose content rule they break - write that block's new text alone, and insert the blocks beside it. A hard break in with is INVALID_OP when the matched text is in a heading or a table cell, which are written on one line. In a table cell, with is the cell's text: write a | in it bare, in code too, since code whose text has an odd run of backslashes right before a | cannot be stored in a cell and is INVALID_OP, naming the cell. " + "A delete whose find is a block's entire text removes the block (a list emptied of its items goes too); delete with block removes any block by id, and move with block relocates one. A delete or retype that would take an ask block out of the document while its ask is open is refused, with nothing sent. delete_row and delete_column take a table block and a zero-based index, preserving the table block id and refusing to remove cells with open asks or unresolved comments. " + `Insert and move anchors also accept "start", "end", "heading:<exact heading text>", and "block:<id>"; dispatch doc-read --blocks lists every block's id, type, opening words and token, and each table's rows and cells with the indexes delete_row and delete_column take (GET /api/v1/artifacts/{artifact UUID}/blocks serves the same list). ` + "Optionally require the state just read: precondition selects exactly one of a document token from dispatch doc-read, or block {id, token} values from dispatch doc-read --blocks. A block guard must include every block the batch changes; Dispatch resolves quote targets and rejects an uncovered batch rather than applying it. Use a document token for insert or move, which depend on document order. Prefer block tokens when the covered content blocks are independent sections. Tokens include inline marks, so a fresh human comment also makes a stale edit fail. PRECONDITION_FAILED means re-read; EDIT_QUEUE_FULL means back off before retrying. " + `${CI_CHECK_RULE} ` + "The result carries the document token this edit produced, so a chain of guarded edits passes each result's token as the next edit's precondition with no dispatch doc-read between them. " + "A batch that leaves the document exactly as it was mints no version, named or not, and the result says nothing changed and names each operation that did nothing. " + "A change a browser removes while the edit is in flight is never reported as applied: EDIT_LOST_TO_CONCURRENT_CHANGE means the write was refused and nothing was written, so re-read the document and decide again, as with PRECONDITION_FAILED; lost_ops on a successful result names operations whose text the live document no longer has, because the deletion landed after the version was written. " + "Several paragraphs, or a list, go in one replace, since with writes the blocks its markdown names; blocks beside a block go in one insert, since two inserts at one anchor come out reversed. The result prints the markdown of each block the edit wrote, so read that rather than the document again. " + "Each decision block the edit adds gets the related-item check dispatch ask gets, waiting at most five seconds for all of them together: the result prints, after its first line, `Decision block <id>:` and what that check found, that it found nothing, or that it was not made and why. " + "A block id written as {#id} longer than 256 bytes is stored, but its block is no graph node, so no reference reaches it. " + `The spec holds requirements, design, and decisions - never progress, status, or timestamps. Work still to do is a task in the issue's plan, an issue, or an ask, never a separate document that lists it. ${OWNER_REFERENCE} ${SPEC_WRITING_POINTER}`,
|
|
37493
37512
|
arguments: (z) => ({
|
|
37494
37513
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
37495
37514
|
project: z.string().describe("Project key owning the document.").optional(),
|
|
@@ -37497,7 +37516,7 @@ var dispatchToolSpecs = [
|
|
|
37497
37516
|
ref: z.string().describe("Optional dispatch:// issue or document reference.").optional(),
|
|
37498
37517
|
ops: z.array(z.object({
|
|
37499
37518
|
op: z.enum(DOC_EDIT_OPS).describe("Edit operation."),
|
|
37500
|
-
find: z.string().describe("Text of the target as rendered, for replace or delete; inline markdown (**bold**, `code`) is tolerated and must be balanced; a leading '# ' matches a heading. A delete of a block's entire text removes the block.").optional(),
|
|
37519
|
+
find: z.string().describe("Text of the target as rendered, for replace or delete; inline markdown (**bold**, `code`) is tolerated and must be balanced; a leading '# ' matches a heading at any level whose whole text is the rest. A delete of a block's entire text removes the block.").optional(),
|
|
37501
37520
|
with: z.string().describe("Replacement text for replace, which every replace names: an empty value deletes the match on purpose. A replace takes op, find, with and occurrence alone, and one without with, or carrying any other key whatever it holds, is refused before it is sent, and by the server with 400 REPLACE_FIELDS, the document unchanged. Inside a code block, with is the code's literal text as sent (line breaks at its end do not survive a read); elsewhere parsed as markdown, as insert's markdown is. Text that parses to one paragraph is written inside the matched block, where a backslash escape keeps prose that merely looks like a marker, a leading '[x] ' or '[ ] ' over a task item's text matched from its start sets the item's checkbox, and any non-empty value that renders to no text is refused - only an empty value deletes the match. Text that parses to blocks ('---' over a paragraph, a list, a table, two paragraphs) writes those blocks where the match sits, fitted as the editor fits them, and is refused, with the document unchanged, where the block holding the match cannot hold them: a heading, any cell of a table, and a typed block whose content rule they break. A leading marker of the same kind as the matched block's own is refused either way, since the block renders it already, unless it is a heading rename (where a level named by find is what lets with change it) or an item find's own marker selected. A CR LF or a lone carriage return in it is written as a line feed.").optional(),
|
|
37502
37521
|
occurrence: z.number({ int: true, min: 0 }).describe("Optional zero-based match occurrence.").optional(),
|
|
37503
37522
|
markdown: z.string().describe("Markdown to insert; a CR LF or a lone carriage return in it is written as a line feed.").optional(),
|
|
@@ -37631,12 +37650,12 @@ var dispatchToolSpecs = [
|
|
|
37631
37650
|
{
|
|
37632
37651
|
name: "dispatch_read",
|
|
37633
37652
|
example: { issue: "DSP-1" },
|
|
37634
|
-
description: "Read an issue or document summary, targeted ask, or targeted comment reply chain, or the conversation " + "a message belongs to. Do not use it for document contents; use dispatch doc-read instead. Supply ref, issue, " + "issue plus artifact (one of its documents), project plus artifact, or project alone, which lists the project's documents on no issue and nothing more; or message alone, which reads a human's direct message to this session and every " + "reply to it (they belong to no issue). A document summary names its issue, reference, versions and approval. " + "An issue read lists every document, picture and file the issue holds under `Documents:`, each by slug, filename and kind. " + "An anchored comment or ask also says where its quote sits, as `Position:`: the block's path from the top, " + "and in a table the row (0 is the header), the cells before the anchored one, and the column's header; " + "`Position: unavailable (<code>)` when Dispatch could not read the document: `DOC_SERVICE_UNAVAILABLE` " + "(try again shortly), `DOC_SCHEMA` (the document needs repair), `DOC_NEWER_CONTENT` (this Dispatch " + "build cannot read an element of the document; try again in one minute), `DOCUMENT_UNLOADABLE` (the " + "document's stored history cannot load; a person decides whether to rebuild it) or `INTERNAL`. " + "An issue read carries a `Progress:` line, `tasks 3/7, children 2/5`: its spec's task-list items " + "(`- [ ]` / `- [x]`, nested lists included) and its direct children, each done of total and each only " + "when it has any (`Progress: none` otherwise). " + "An issue whose spec marks requirements carries one `Coverage:` line per gap, `Coverage: R3 has no check` or " + "`Coverage: R3 has no plan task` (the second only once the issue has a plan document), counting the `check` and " + "`plan_task` blocks of every document of the issue and of its descendants; a spec that marks none reads " + "`Coverage: the spec marks no requirements`. Nothing is refused for a gap. " + `An issue read, and its dispatch://KEY/log, lists the issue's last ${DEFAULT_ISSUE_READ_EVENTS} events, oldest first; ` + "--events N lists the last N, and --all-events every one. " + "A comment reply chain names the comment each nested reply answers as `Answers: <comment id>`. " + "An edited post reads with the time of its edit, and a deleted one with who deleted it and when, in place of its body; " + "--history, with a ref naming that comment or message, lists the post's history newest first: each body an edit or the delete replaced, with the actor and the time, and of a deleted post each entry's actor and time with no body. " + "Every read ends with `Referenced by:` (what cites or hangs off this node, each with its dispatch:// address, " + "an excerpt, and when) and `Links:` (what it cites), so tracing provenance is one call. " + "A block read prints `Block:`, `Type:` for a block of a document, `Document:`, every attribute a typed block carries " + "(a `check`'s serves, surface, run, when, negative_control and ci_check; a `plan_task`'s serves and needs), `Changed in version:` " + "and `Text:`, then those two sections; a pinned one adds " + "the block's text at that version and whether it is unchanged, changed or removed since, and an absent block, unpinned, " + "reads `No block <id> in <document>.` " + "The pictures the shown messages, asks and comments embed come back as images you see, newest first, at most 8 " + "and 10 MiB of them per read, each a PNG, JPEG, GIF or WebP of at most 3,750,000 bytes (5 MB of base64); a `Pictures:` section names each " + "one shown, in order, and the rest by reference, for dispatch doc-read. A picture this session was already shown is named, not sent again " + "(every request carries the session's history, and the provider refuses one over 32 MB); dispatch doc-read shows it again. " + OWNER_REFERENCE,
|
|
37653
|
+
description: "Read an issue or document summary, targeted ask, or targeted comment reply chain, or the conversation " + "a message belongs to. Do not use it for document contents; use dispatch doc-read instead. Supply ref, issue, " + "issue plus artifact (one of its documents), project plus artifact, or project alone, which lists the project's documents on no issue and nothing more; or message alone, which reads a human's direct message to this session and every " + "reply to it (they belong to no issue). A document summary names its issue, reference, versions and approval. " + "An issue read lists every document, picture and file the issue holds under `Documents:`, each by slug, filename and kind. " + "An anchored comment or ask also says where its quote sits, as `Position:`: the block's path from the top, " + "and in a table the row (0 is the header), the cells before the anchored one, and the column's header; " + "`Position: unavailable (<code>)` when Dispatch could not read the document: `DOC_SERVICE_UNAVAILABLE` " + "(try again shortly), `DOC_SCHEMA` (the document needs repair), `DOC_NEWER_CONTENT` (this Dispatch " + "build cannot read an element of the document; try again in one minute), `DOCUMENT_UNLOADABLE` (the " + "document's stored history cannot load; a person decides whether to rebuild it) or `INTERNAL`. " + "An issue read carries a `Progress:` line, `tasks 3/7, children 2/5`: its spec's task-list items " + "(`- [ ]` / `- [x]`, nested lists included) and its direct children, each done of total and each only " + "when it has any (`Progress: none` otherwise). " + "An issue whose spec marks requirements carries one `Coverage:` line per gap, `Coverage: R3 has no check` or " + "`Coverage: R3 has no plan task` (the second only once the issue has a plan document), counting the `check` and " + "`plan_task` blocks of every document of the issue and of its descendants; a spec that marks none reads " + "`Coverage: the spec marks no requirements`. Nothing is refused for a gap. " + `An issue read, and its dispatch://KEY/log, lists the issue's last ${DEFAULT_ISSUE_READ_EVENTS} events, oldest first; ` + "--events N lists the last N, and --all-events every one. " + "An issue's dispatch://KEY/comments lists every comment on the issue. " + "A comment reply chain names the comment each nested reply answers as `Answers: <comment id>`. " + "An edited post reads with the time of its edit, and a deleted one with who deleted it and when, in place of its body; " + "--history, with a ref naming that comment or message, lists the post's history newest first: each body an edit or the delete replaced, with the actor and the time, and of a deleted post each entry's actor and time with no body. " + "Every read ends with `Referenced by:` (what cites or hangs off this node, each with its dispatch:// address, " + "an excerpt, and when) and `Links:` (what it cites), so tracing provenance is one call. " + "A block read prints `Block:`, `Type:` for a block of a document, `Document:`, every attribute a typed block carries " + "(a `check`'s serves, surface, run, when, negative_control and ci_check; a `plan_task`'s serves and needs), `Changed in version:` " + "and `Text:`, then those two sections; a pinned one adds " + "the block's text at that version and whether it is unchanged, changed or removed since, and an absent block, unpinned, " + "reads `No block <id> in <document>.` " + "The pictures the shown messages, asks and comments embed come back as images you see, newest first, at most 8 " + "and 10 MiB of them per read, each a PNG, JPEG, GIF or WebP of at most 3,750,000 bytes (5 MB of base64); a `Pictures:` section names each " + "one shown, in order, and the rest by reference, for dispatch doc-read. A picture this session was already shown is named, not sent again " + "(every request carries the session's history, and the provider refuses one over 32 MB); dispatch doc-read shows it again. " + OWNER_REFERENCE,
|
|
37635
37654
|
arguments: (z) => ({
|
|
37636
37655
|
issue: z.string().describe(ISSUE_REFERENCE).optional(),
|
|
37637
37656
|
project: z.string().describe("Project key owning the document.").optional(),
|
|
37638
37657
|
artifact: z.string().describe("Document artifact id, slug, or filename: one of the issue's, or a project document.").optional(),
|
|
37639
|
-
ref: z.string().describe("Optional dispatch:// reference: dispatch://KEY, dispatch://KEY/spec, " + "dispatch://KEY/artifact/<slug>[@vN], dispatch://KEY/ask/<id>, dispatch://KEY/comment/<id>, " + "dispatch://KEY/message/<id>, dispatch://PROJECT/artifact/<slug>[@vN], and its " + "/ask/<id> and /comment/<id>; or the dashboard URL of one. A block: " + "dispatch://KEY/spec#b-<block id>[@vN], dispatch://KEY/artifact/<slug>#b-<block id>[@vN] or " + "dispatch://PROJECT/artifact/<slug>#b-<block id>[@vN], the id percent-encoded except ASCII " + "letters, digits and -.").optional(),
|
|
37658
|
+
ref: z.string().describe("Optional dispatch:// reference: dispatch://KEY, dispatch://KEY/spec, dispatch://KEY/comments, " + "dispatch://KEY/artifact/<slug>[@vN], dispatch://KEY/ask/<id>, dispatch://KEY/comment/<id>, " + "dispatch://KEY/message/<id>, dispatch://PROJECT/artifact/<slug>[@vN], and its " + "/ask/<id> and /comment/<id>; or the dashboard URL of one. A block: " + "dispatch://KEY/spec#b-<block id>[@vN], dispatch://KEY/artifact/<slug>#b-<block id>[@vN] or " + "dispatch://PROJECT/artifact/<slug>#b-<block id>[@vN], the id percent-encoded except ASCII " + "letters, digits and -.").optional(),
|
|
37640
37659
|
message: z.string().describe("A message id (uuid): reads the conversation it belongs to, the root message and every " + "reply. Name nothing else with it.").optional(),
|
|
37641
37660
|
events: z.number({ int: true, min: 1 }).describe(`How many of the issue's newest events an issue read or its dispatch://KEY/log lists, oldest first; default ${DEFAULT_ISSUE_READ_EVENTS}. Name no --all-events with it.`).optional(),
|
|
37642
37661
|
all_events: z.boolean().describe(`List every one of the issue's events, oldest first, on an issue read or its dispatch://KEY/log, in place of the last ${DEFAULT_ISSUE_READ_EVENTS}. Name no --events with it.`).optional(),
|
|
@@ -47775,10 +47794,10 @@ function parseDispatchRef(ref) {
|
|
|
47775
47794
|
artifact
|
|
47776
47795
|
};
|
|
47777
47796
|
}
|
|
47778
|
-
const issueReference = ref.match(/^dispatch:\/\/([A-Z][A-Z0-9]{1,9}-[1-9][0-9]*)(?:\/(spec)|\/(log|activity)|\/(children)|\/artifact\/([^/@]+)(?:@v(\d+))?|\/ask\/([^/]+)|\/comment\/([^/]+)|\/message\/([^/]+))?$/);
|
|
47797
|
+
const issueReference = ref.match(/^dispatch:\/\/([A-Z][A-Z0-9]{1,9}-[1-9][0-9]*)(?:\/(spec)|\/(log|activity)|\/(children)|\/(comments)|\/artifact\/([^/@]+)(?:@v(\d+))?|\/ask\/([^/]+)|\/comment\/([^/]+)|\/message\/([^/]+))?$/);
|
|
47779
47798
|
if (!issueReference)
|
|
47780
47799
|
return null;
|
|
47781
|
-
const [, issue, spec, log, children, artifact, version, ask, comment, message] = issueReference;
|
|
47800
|
+
const [, issue, spec, log, children, comments, artifact, version, ask, comment, message] = issueReference;
|
|
47782
47801
|
if (!issue || version !== undefined && Number(version) < 1)
|
|
47783
47802
|
return null;
|
|
47784
47803
|
const owner = { kind: "issue", issue };
|
|
@@ -47788,6 +47807,8 @@ function parseDispatchRef(ref) {
|
|
|
47788
47807
|
return { owner, kind: "log", id: log };
|
|
47789
47808
|
if (children)
|
|
47790
47809
|
return { owner, kind: "children", id: children };
|
|
47810
|
+
if (comments)
|
|
47811
|
+
return { owner, kind: "comments", id: comments };
|
|
47791
47812
|
if (artifact) {
|
|
47792
47813
|
return {
|
|
47793
47814
|
owner,
|
|
@@ -51274,7 +51295,7 @@ function itemReplyTo(args, field) {
|
|
|
51274
51295
|
return block === undefined ? { id: replyTo } : { id: block.item.id, block: block.block };
|
|
51275
51296
|
}
|
|
51276
51297
|
function innerRefProblem(tool, ref, refText) {
|
|
51277
|
-
if (ref.kind !== "ask" && ref.kind !== "comment" && ref.kind !== "message" && ref.kind !== "log" && ref.kind !== "children" && ref.kind !== "block") {
|
|
51298
|
+
if (ref.kind !== "ask" && ref.kind !== "comment" && ref.kind !== "message" && ref.kind !== "log" && ref.kind !== "children" && ref.kind !== "comments" && ref.kind !== "block") {
|
|
51278
51299
|
return;
|
|
51279
51300
|
}
|
|
51280
51301
|
if (tool === "dispatch_read" || tool === "dispatch_ask")
|
|
@@ -51285,7 +51306,7 @@ function innerRefProblem(tool, ref, refText) {
|
|
|
51285
51306
|
const ownerArguments = ref.owner.kind === "issue" ? `issue ${ref.owner.issue}${documentArgument}` : `project ${ref.owner.project} and artifact ${ref.artifact}`;
|
|
51286
51307
|
const partRef = ref.pin === undefined ? refText : refText.slice(0, -`@v${ref.pin}`.length);
|
|
51287
51308
|
const fix = tool === "dispatch_comment" && itemKind === "ask" ? `reply under it with reply_to_ask ${ref.item === undefined ? ref.id : partRef} and ${ownerArguments}` : tool === "dispatch_comment" && itemKind === "comment" ? `reply in its thread with reply_to ${ref.id} and ${ownerArguments}` : `read it with dispatch read, or name ${owner} with ${ownerArguments}`;
|
|
51288
|
-
const item = ref.kind === "ask" ? "an ask" : ref.kind === "log" ? "the event log" : ref.kind === "children" ? "the children" : ref.kind === "block" ? `block ${ref.block}${ref.item === undefined ? "" : ` of ${article(ref.item.kind)}`}` : `a ${ref.kind}`;
|
|
51309
|
+
const item = ref.kind === "ask" ? "an ask" : ref.kind === "log" ? "the event log" : ref.kind === "children" ? "the children" : ref.kind === "comments" ? "the comments" : ref.kind === "block" ? `block ${ref.block}${ref.item === undefined ? "" : ` of ${article(ref.item.kind)}`}` : `a ${ref.kind}`;
|
|
51289
51310
|
return `ref ${refText} names ${item} on ${owner}; dispatch ${commandName(tool)} would act on ${owner} and drop the ${ref.kind}: ${fix}`;
|
|
51290
51311
|
}
|
|
51291
51312
|
var documentItemPattern = /^dispatch:\/\/([A-Z][A-Z0-9]{1,9}-[1-9][0-9]*)\/artifact\/[^/@]+(?:@v\d+)?\/(ask|comment)\/([^/]+)$/;
|
|
@@ -51466,6 +51487,8 @@ function readWithoutEvents(args) {
|
|
|
51466
51487
|
return "a message's conversation";
|
|
51467
51488
|
case "children":
|
|
51468
51489
|
return "the issue's children";
|
|
51490
|
+
case "comments":
|
|
51491
|
+
return "the issue's comments";
|
|
51469
51492
|
case "log":
|
|
51470
51493
|
return;
|
|
51471
51494
|
}
|
|
@@ -53219,6 +53242,7 @@ async function issueUpdateCommand(context) {
|
|
|
53219
53242
|
const priority = optionalPriority(args, "priority");
|
|
53220
53243
|
const assignee = optionalNullableString(args, "assignee");
|
|
53221
53244
|
const labels = Array.isArray(args.labels) ? args.labels : undefined;
|
|
53245
|
+
const labelsAdd = optionalStringArray(args, "labels_add");
|
|
53222
53246
|
const blockedBy = Array.isArray(args.blocked_by) ? args.blocked_by : undefined;
|
|
53223
53247
|
const advances = optionalStringArray(args, "advances");
|
|
53224
53248
|
const advancesRevision = optionalNumber(args, "advances_revision");
|
|
@@ -53265,6 +53289,7 @@ async function issueUpdateCommand(context) {
|
|
|
53265
53289
|
...status === undefined ? {} : { status },
|
|
53266
53290
|
...title === undefined ? {} : { title },
|
|
53267
53291
|
...labels === undefined ? {} : { labels },
|
|
53292
|
+
...labelsAdd === undefined ? {} : { labels_add: labelsAdd },
|
|
53268
53293
|
...priority === undefined ? {} : { priority },
|
|
53269
53294
|
...assignee === undefined ? {} : { assignee },
|
|
53270
53295
|
...route === undefined ? {} : { route },
|
|
@@ -53303,8 +53328,8 @@ async function issueUpdateCommand(context) {
|
|
|
53303
53328
|
...closingNote === undefined ? [] : [`reason posted as message ${closingNote.id} (${closingNote.ref})`],
|
|
53304
53329
|
...status === undefined ? [] : [`status ${before.status} -> ${after.status}`],
|
|
53305
53330
|
...title === undefined ? [] : [`title "${after.title}"`],
|
|
53306
|
-
...labels === undefined ? [] : [
|
|
53307
|
-
(after.labels ?? []).length
|
|
53331
|
+
...labels === undefined && labelsAdd === undefined ? [] : [
|
|
53332
|
+
(after.labels ?? []).length > 0 ? `labels ${(after.labels ?? []).join(", ")}` : labels === undefined ? "labels none" : "labels cleared"
|
|
53308
53333
|
],
|
|
53309
53334
|
...priority === undefined ? [] : [after.priority === null ? "priority cleared" : `priority -> P${after.priority}`],
|
|
53310
53335
|
...assignee === undefined ? [] : [after.assignee === null ? "assignee cleared" : `assignee -> ${after.assignee}`],
|
|
@@ -53724,6 +53749,21 @@ function commentSummary({ comment, replies }, graph) {
|
|
|
53724
53749
|
].join(`
|
|
53725
53750
|
`);
|
|
53726
53751
|
}
|
|
53752
|
+
function commentsSummary(issueKey, comments) {
|
|
53753
|
+
return [
|
|
53754
|
+
`Comments: ${issueKey}`,
|
|
53755
|
+
...comments.length === 0 ? ["- none"] : comments.flatMap((comment) => [
|
|
53756
|
+
`${comment.id} \xB7 ${actorText(comment.author)} \xB7 ${comment.created_at}`,
|
|
53757
|
+
...anchorLines(comment),
|
|
53758
|
+
...replyBlockLines(comment),
|
|
53759
|
+
...comment.reply_to === null ? [] : [`Reply to: ${comment.reply_to}`],
|
|
53760
|
+
...comment.answers != null && comment.answers !== comment.reply_to ? [`Answers: ${comment.answers}`] : [],
|
|
53761
|
+
...comment.ask_id == null ? [] : [`Ask: ${comment.ask_id}`],
|
|
53762
|
+
...postBodyLines(comment)
|
|
53763
|
+
])
|
|
53764
|
+
].join(`
|
|
53765
|
+
`);
|
|
53766
|
+
}
|
|
53727
53767
|
function replyBlockLines(record) {
|
|
53728
53768
|
const block = record.reply_block;
|
|
53729
53769
|
if (block === undefined || block === null)
|
|
@@ -54394,9 +54434,6 @@ async function sendToAgentCommand(context) {
|
|
|
54394
54434
|
// ../envoy-client/src/dispatch-commands/documents.ts
|
|
54395
54435
|
import { resolve as resolvePath2 } from "path";
|
|
54396
54436
|
|
|
54397
|
-
// ../contracts/src/go-blank.ts
|
|
54398
|
-
var goBlankPattern = /^[\t\n\v\f\r \u0085\u00A0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]*$/u;
|
|
54399
|
-
|
|
54400
54437
|
// ../envoy-client/src/typed-block-opener.ts
|
|
54401
54438
|
function runOf(text, index, char) {
|
|
54402
54439
|
let end = index;
|
|
@@ -55714,6 +55751,19 @@ async function readCommand(context) {
|
|
|
55714
55751
|
details: { issue: parent.key }
|
|
55715
55752
|
};
|
|
55716
55753
|
}
|
|
55754
|
+
if (ownerArguments.ref?.kind === "comments") {
|
|
55755
|
+
const [owner, comments] = await Promise.all([
|
|
55756
|
+
client.getIssue(issueKey),
|
|
55757
|
+
client.getComments(issueKey)
|
|
55758
|
+
]);
|
|
55759
|
+
const pictures = await picturesOf(datedBodies(comments));
|
|
55760
|
+
return {
|
|
55761
|
+
text: [commentsSummary(owner.key, comments), ...pictures.lines].join(`
|
|
55762
|
+
`),
|
|
55763
|
+
details: { issue: owner.key },
|
|
55764
|
+
...showImages(pictures)
|
|
55765
|
+
};
|
|
55766
|
+
}
|
|
55717
55767
|
const readPromise = client.read(issueKey, readEvents);
|
|
55718
55768
|
const referencesPromise = issueReferencesOrUnavailable(client, issueKey);
|
|
55719
55769
|
const read = await readPromise;
|
|
@@ -62733,7 +62783,7 @@ var import_nats5 = __toESM(require_mod4(), 1);
|
|
|
62733
62783
|
|
|
62734
62784
|
// package.json
|
|
62735
62785
|
var name2 = "@sjawhar/claude-envoy";
|
|
62736
|
-
var version2 = "5.
|
|
62786
|
+
var version2 = "5.20.0";
|
|
62737
62787
|
var legion = {
|
|
62738
62788
|
daemonApiVersion: 232
|
|
62739
62789
|
};
|