@sjawhar/opencode-legion-envoy 1.53.0 → 1.53.2
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 +8 -7
- package/package.json +1 -1
package/dist/src/server.js
CHANGED
|
@@ -16413,6 +16413,11 @@ async function openArtifactMarks(client, resolved) {
|
|
|
16413
16413
|
...commentsResult.value.filter((comment) => !comment.resolved && comment.anchor?.artifact_id === resolved.artifact.id).map((comment) => `comment ${comment.id}`)
|
|
16414
16414
|
];
|
|
16415
16415
|
}
|
|
16416
|
+
function refusalWithCode(error48, suffix = "") {
|
|
16417
|
+
if (!(error48 instanceof DispatchServiceError))
|
|
16418
|
+
return error48;
|
|
16419
|
+
return new DispatchServiceError(error48.code, error48.status, `${error48.code}: ${error48.message}${suffix}`, error48.candidates, error48.current, error48.mismatches);
|
|
16420
|
+
}
|
|
16416
16421
|
async function executeDispatchTool(input) {
|
|
16417
16422
|
const configUrl = input.config.url;
|
|
16418
16423
|
const configToken = input.config.token;
|
|
@@ -16608,10 +16613,8 @@ async function executeDispatchTool(input) {
|
|
|
16608
16613
|
}
|
|
16609
16614
|
};
|
|
16610
16615
|
} catch (error48) {
|
|
16611
|
-
|
|
16612
|
-
|
|
16613
|
-
const taken = error48.status === 500 && newLinks.length > 0 ? `; one of ${newLinks.join(", ")} may already be linked from another issue (a URL links exactly one issue)` : "";
|
|
16614
|
-
throw new DispatchServiceError(error48.code, error48.status, `${error48.code}: ${error48.message}${taken}`, error48.candidates);
|
|
16616
|
+
const taken = error48 instanceof DispatchServiceError && error48.status === 500 && newLinks.length > 0 ? `; one of ${newLinks.join(", ")} may already be linked from another issue (a URL links exactly one issue)` : "";
|
|
16617
|
+
throw refusalWithCode(error48, taken);
|
|
16615
16618
|
}
|
|
16616
16619
|
}
|
|
16617
16620
|
case "dispatch_claim": {
|
|
@@ -16621,9 +16624,7 @@ async function executeDispatchTool(input) {
|
|
|
16621
16624
|
try {
|
|
16622
16625
|
after = release ? await client.releaseIssueClaim(issueKey, { actor }) : await client.claimIssue(issueKey, { actor });
|
|
16623
16626
|
} catch (error48) {
|
|
16624
|
-
|
|
16625
|
-
throw error48;
|
|
16626
|
-
throw new DispatchServiceError(error48.code, error48.status, `${error48.code}: ${error48.message}`, error48.candidates);
|
|
16627
|
+
throw refusalWithCode(error48);
|
|
16627
16628
|
}
|
|
16628
16629
|
const held = after.claim;
|
|
16629
16630
|
let text;
|