@sjawhar/opencode-legion-envoy 3.19.5 → 3.19.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/server.js +9 -7
- package/package.json +1 -1
- package/skills/dispatch/SKILL.md +10 -10
package/dist/src/server.js
CHANGED
|
@@ -16782,17 +16782,19 @@ async function refuseRemovingOpenDecisionBlocks(client, tool, resolved, ops) {
|
|
|
16782
16782
|
].join(`
|
|
16783
16783
|
`));
|
|
16784
16784
|
}
|
|
16785
|
-
function refusalWithCode(error48,
|
|
16785
|
+
function refusalWithCode(error48, ...clauses) {
|
|
16786
|
+
const suffix = clauses.filter((clause) => clause !== "").join("; ");
|
|
16787
|
+
const joined = suffix === "" ? "" : `; ${suffix}`;
|
|
16786
16788
|
if (error48 instanceof DispatchGatewayError) {
|
|
16787
16789
|
let told = error48.message;
|
|
16788
|
-
if (
|
|
16789
|
-
told = error48.mayHaveReachedDispatch ? `${error48.answer}${
|
|
16790
|
+
if (joined !== "") {
|
|
16791
|
+
told = error48.mayHaveReachedDispatch ? `${error48.answer}${joined}` : `${error48.answer}, so ${error48.advice}${joined}`;
|
|
16790
16792
|
}
|
|
16791
16793
|
return new DispatchGatewayError(error48.status, error48.answer, error48.advice, `${error48.code}: ${told}`);
|
|
16792
16794
|
}
|
|
16793
16795
|
if (!(error48 instanceof DispatchServiceError))
|
|
16794
16796
|
return error48;
|
|
16795
|
-
return new DispatchServiceError(error48.code, error48.status, `${error48.code}: ${error48.message}${
|
|
16797
|
+
return new DispatchServiceError(error48.code, error48.status, `${error48.code}: ${error48.message}${joined}`, error48.candidates, error48.current, error48.mismatches);
|
|
16796
16798
|
}
|
|
16797
16799
|
function dispatchAnswered(error48, status) {
|
|
16798
16800
|
return error48 instanceof DispatchServiceError && error48.fromDispatch && error48.status === status;
|
|
@@ -16978,7 +16980,7 @@ async function executeDispatchTool(input) {
|
|
|
16978
16980
|
} catch (error48) {
|
|
16979
16981
|
const told = writeMayHaveLanded(error48) ? "the reason may or may not have been posted, and the close was not sent: read the issue's messages before retrying, since retrying this call posts its reason again" : "the reason was not posted, so the close was not sent";
|
|
16980
16982
|
if (error48 instanceof DispatchServiceError)
|
|
16981
|
-
throw refusalWithCode(error48,
|
|
16983
|
+
throw refusalWithCode(error48, told);
|
|
16982
16984
|
throw withAccount(error48, told);
|
|
16983
16985
|
}
|
|
16984
16986
|
}
|
|
@@ -16998,14 +17000,14 @@ async function executeDispatchTool(input) {
|
|
|
16998
17000
|
actor
|
|
16999
17001
|
});
|
|
17000
17002
|
} catch (error48) {
|
|
17001
|
-
const taken = dispatchAnswered(error48, 500) && newLinks.length > 0 ?
|
|
17003
|
+
const taken = dispatchAnswered(error48, 500) && newLinks.length > 0 ? `one of ${newLinks.join(", ")} may already be linked from another issue (a URL links exactly one issue)` : "";
|
|
17002
17004
|
if (closingNote === undefined)
|
|
17003
17005
|
throw refusalWithCode(error48, taken);
|
|
17004
17006
|
const posted = `the reason already landed as message ${closingNote.id} (${closingNote.ref})`;
|
|
17005
17007
|
const fix = error48 instanceof DispatchGatewayError && error48.transient ? "" : "fix what refused the close, then ";
|
|
17006
17008
|
const landed = writeMayHaveLanded(error48) ? `${posted}, and the close may or may not have taken effect. Read the issue's status before retrying: done means it closed; otherwise retry with a reason that points at message ${closingNote.id}, since retrying this call posts its reason again` : `${posted} but the issue did not close. Retrying this call posts its reason again, so ${fix}retry with a reason that points at message ${closingNote.id}`;
|
|
17007
17009
|
if (error48 instanceof DispatchServiceError)
|
|
17008
|
-
throw refusalWithCode(error48,
|
|
17010
|
+
throw refusalWithCode(error48, taken, landed);
|
|
17009
17011
|
throw withAccount(error48, landed);
|
|
17010
17012
|
}
|
|
17011
17013
|
const linkCount = `(${after.external_links.length} ${after.external_links.length === 1 ? "link" : "links"})`;
|
package/package.json
CHANGED
package/skills/dispatch/SKILL.md
CHANGED
|
@@ -84,7 +84,7 @@ a new version that keeps the human's own text, never a second "spec" artifact be
|
|
|
84
84
|
versions keep the history.
|
|
85
85
|
- **No placeholders.** No TBD, TODO, or hedging ("might", "could consider"): an open item is a
|
|
86
86
|
decision block, a technical decision your lane makes and records in the text, or, for a
|
|
87
|
-
contract between two lanes
|
|
87
|
+
contract between two lanes, a question for the platform PO (see
|
|
88
88
|
[Before you ask](#before-you-ask) under Asking).
|
|
89
89
|
- **No progress.** The spec records the design and its decisions, never status, timestamps, an
|
|
90
90
|
"Update HH:MMZ" section, a pull-request list, or handoff notes. Progress is not a Dispatch
|
|
@@ -208,10 +208,11 @@ Every `dispatch_ask` passes four gates first:
|
|
|
208
208
|
1. **Does it need his authority, taste, or risk appetite?** This is the bar for a decision
|
|
209
209
|
written as an `:::ask` block in context ([Decision blocks](#decision-blocks)). Technical
|
|
210
210
|
decisions inside your outcome do not: schema shapes, table layouts, field names, and migration
|
|
211
|
-
internals are your lane's to decide and record in the spec.
|
|
212
|
-
platform PO over Envoy
|
|
213
|
-
deletion or exposure of production data, anything that reaches a customer)
|
|
214
|
-
|
|
211
|
+
internals are your lane's to decide and record in the spec. A contract between two lanes still
|
|
212
|
+
goes to the platform PO over Envoy, and you open no ask for it. A halt condition (a change to
|
|
213
|
+
IAM, deletion or exposure of production data, anything that reaches a customer) passes this
|
|
214
|
+
gate: it is your own `dispatch_ask` to Sami on your own issue, never routed through the
|
|
215
|
+
platform PO.
|
|
215
216
|
2. **Is there genuine uncertainty, and have you measured what you can?** If there is none, it is
|
|
216
217
|
a plan you execute. The one legitimate ask without uncertainty is permission for an action
|
|
217
218
|
only a human can authorise — a production write, an external send, a console action — and then
|
|
@@ -242,9 +243,9 @@ Every `dispatch_ask` passes four gates first:
|
|
|
242
243
|
is not what this forbids; changing something else is. An ask that turns his complaint about
|
|
243
244
|
one control into a choice about another does not address what he asked, and changing that
|
|
244
245
|
other control is a change he never asked for. What is still an ask the moment you know it,
|
|
245
|
-
even before delivery, is anything "Anything
|
|
246
|
-
lists that the delivery waits on — including a conflict between what he asked
|
|
247
|
-
of his rules, which this gate would otherwise bury as settled.
|
|
246
|
+
even before delivery, is anything "Anything you are blocked on a human for is an open ask"
|
|
247
|
+
(further down) lists that the delivery waits on — including a conflict between what he asked
|
|
248
|
+
for and another of his rules, which this gate would otherwise bury as settled.
|
|
248
249
|
|
|
249
250
|
The platform PO audits open asks. One that fails a gate — or that points at another message in
|
|
250
251
|
prose instead of carrying its content (below) — is retracted, with the PO's answer as the record.
|
|
@@ -314,8 +315,7 @@ Before saying you are waiting for human input, call `dispatch_open_asks`. With n
|
|
|
314
315
|
**Anything you are blocked on a human for is an open ask.** An agent waits on a human only through
|
|
315
316
|
an open ask. An approval, a credential or grant to renew, a setting only they can change, a review
|
|
316
317
|
click, a decision, or a conflict between two of their own rules: open a `dispatch_ask` the moment
|
|
317
|
-
you know, the action as the question.
|
|
318
|
-
ask](#before-you-ask) gate 1, which goes to the platform PO over Envoy instead. Never write it
|
|
318
|
+
you know, the action as the question. Never write it
|
|
319
319
|
into a spec, a comment reply, a message, or a pull-request body: nothing in those paths reaches
|
|
320
320
|
the human's Inbox, and a human who is not reading your document does not know they are the
|
|
321
321
|
blocker. Before asking, try to remove the step: a value already on the machine, a permission you
|