@coderule/mcp 2.2.0 → 2.2.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/cli.cjs +69 -17
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +68 -16
- package/dist/cli.js.map +1 -1
- package/dist/mcp-cli.cjs +42 -25
- package/dist/mcp-cli.cjs.map +1 -1
- package/dist/mcp-cli.js +42 -25
- package/dist/mcp-cli.js.map +1 -1
- package/package.json +1 -1
package/dist/mcp-cli.js
CHANGED
|
@@ -2455,34 +2455,51 @@ ${statusText2}`
|
|
|
2455
2455
|
);
|
|
2456
2456
|
lastStatus = status.status;
|
|
2457
2457
|
if (status.status === "READY") {
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
filePath,
|
|
2467
|
-
snapshotHash: currentHash,
|
|
2468
|
-
bytes: bushBuffer.byteLength
|
|
2469
|
-
},
|
|
2470
|
-
"HDF5 bush file saved"
|
|
2471
|
-
);
|
|
2472
|
-
const skill = await withDeadline2(
|
|
2473
|
-
runtime.clients.sync.getHdf5BushReaderSkill(),
|
|
2474
|
-
deadline
|
|
2475
|
-
);
|
|
2476
|
-
return {
|
|
2477
|
-
content: [
|
|
2458
|
+
try {
|
|
2459
|
+
const bushBuffer = await withDeadline2(
|
|
2460
|
+
runtime.clients.sync.downloadSnapshotBush(currentHash),
|
|
2461
|
+
deadline
|
|
2462
|
+
);
|
|
2463
|
+
await mkdir(dirname(filePath), { recursive: true });
|
|
2464
|
+
await writeFile(filePath, Buffer.from(bushBuffer));
|
|
2465
|
+
runtime.logger.info(
|
|
2478
2466
|
{
|
|
2479
|
-
|
|
2480
|
-
|
|
2467
|
+
filePath,
|
|
2468
|
+
snapshotHash: currentHash,
|
|
2469
|
+
bytes: bushBuffer.byteLength
|
|
2470
|
+
},
|
|
2471
|
+
"HDF5 bush file saved"
|
|
2472
|
+
);
|
|
2473
|
+
const skill = await withDeadline2(
|
|
2474
|
+
runtime.clients.sync.getHdf5BushReaderSkill(),
|
|
2475
|
+
deadline
|
|
2476
|
+
);
|
|
2477
|
+
return {
|
|
2478
|
+
content: [
|
|
2479
|
+
{
|
|
2480
|
+
type: "text",
|
|
2481
|
+
text: `HDF5 bush saved to ${filePath} (${bushBuffer.byteLength} bytes, snapshot ${currentHash}).
|
|
2481
2482
|
|
|
2482
2483
|
${skill}`
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2484
|
+
}
|
|
2485
|
+
]
|
|
2486
|
+
};
|
|
2487
|
+
} catch (error) {
|
|
2488
|
+
const message = error instanceof Error ? error.message : "Unknown error";
|
|
2489
|
+
runtime.logger.error(
|
|
2490
|
+
{ err: error, snapshotHash: currentHash },
|
|
2491
|
+
"Bush download failed"
|
|
2492
|
+
);
|
|
2493
|
+
return {
|
|
2494
|
+
content: [
|
|
2495
|
+
{
|
|
2496
|
+
type: "text",
|
|
2497
|
+
text: `Failed to download bush for snapshot ${currentHash}: ${message}`
|
|
2498
|
+
}
|
|
2499
|
+
],
|
|
2500
|
+
isError: true
|
|
2501
|
+
};
|
|
2502
|
+
}
|
|
2486
2503
|
}
|
|
2487
2504
|
if (status.status === "FAILED") {
|
|
2488
2505
|
while (Date.now() < deadline) {
|