@tiwater/office-mcp 0.15.4 → 0.15.5
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/office/index.mjs
CHANGED
|
@@ -460,6 +460,10 @@ async function fixedEdit(tool, args) {
|
|
|
460
460
|
: pptxCandidates;
|
|
461
461
|
return withTempJsonFile(args, async requestPath => {
|
|
462
462
|
const result = await runJsonCandidateChain(candidates, [tool, requestPath], { allowedExitCodes: [0, 1] });
|
|
463
|
+
if (result.code !== 0) {
|
|
464
|
+
const detail = result.stderr.trim() || result.stdout.trim() || `${tool} failed with exit code ${result.code}`;
|
|
465
|
+
throw new Error(detail);
|
|
466
|
+
}
|
|
463
467
|
if (result.json?.tool !== tool) throw new Error(`${tool} returned a mismatched tool identity`);
|
|
464
468
|
await requireReturnedArtifact(result.json.receipt, receiptOutput, 'receipt');
|
|
465
469
|
if (result.json.output === null) {
|