@martinloop/mcp 0.6.8 → 0.7.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/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/vendor/core/index.js +16 -27
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const MARTIN_MCP_PACKAGE_VERSION = "0.
|
|
1
|
+
export declare const MARTIN_MCP_PACKAGE_VERSION = "0.7.0";
|
package/dist/package-version.js
CHANGED
|
@@ -438,6 +438,13 @@ export async function runMartin(input) {
|
|
|
438
438
|
activeAttemptController?.abort(err);
|
|
439
439
|
}
|
|
440
440
|
});
|
|
441
|
+
async function stopSignalMonitorAndDrainDiagnostics() {
|
|
442
|
+
// Fence future polls and in-flight callbacks before taking the final ledger
|
|
443
|
+
// snapshot. Draining alone leaves a window for new writes during signing.
|
|
444
|
+
disposeSignalMonitor();
|
|
445
|
+
runController.abort();
|
|
446
|
+
await Promise.all(pendingControlWrites.splice(0));
|
|
447
|
+
}
|
|
441
448
|
// Snapshot of the current run state for eight-exit evaluation
|
|
442
449
|
function currentExitSnapshot(phase, result) {
|
|
443
450
|
return {
|
|
@@ -533,9 +540,7 @@ export async function runMartin(input) {
|
|
|
533
540
|
// Drain all pending diagnostic ledger writes BEFORE signing the receipt.
|
|
534
541
|
// persistLoopRecordIfSupported reads ledger.jsonl to compute the integrity hash;
|
|
535
542
|
// any write that lands after that read produces a false ledger_hash_mismatch on verify.
|
|
536
|
-
|
|
537
|
-
await Promise.all(pendingControlWrites.splice(0));
|
|
538
|
-
}
|
|
543
|
+
await stopSignalMonitorAndDrainDiagnostics();
|
|
539
544
|
const finalizedLoop = finalizeLoop(loop, exitDecision, now(), idFactory, routingInput);
|
|
540
545
|
const finalizedWithEnvelope = { ...finalizedLoop, terminationEnvelope: envelope };
|
|
541
546
|
await persistLoopRecordIfSupported(input.store, finalizedWithEnvelope);
|
|
@@ -587,9 +592,7 @@ export async function runMartin(input) {
|
|
|
587
592
|
payload: createRunExitPayload(preflightExitDecision)
|
|
588
593
|
}));
|
|
589
594
|
}
|
|
590
|
-
|
|
591
|
-
await Promise.all(pendingControlWrites.splice(0));
|
|
592
|
-
}
|
|
595
|
+
await stopSignalMonitorAndDrainDiagnostics();
|
|
593
596
|
const finalizedLoop = finalizeLoop(loop, preflightExitDecision, now(), idFactory);
|
|
594
597
|
await persistLoopRecordIfSupported(input.store, finalizedLoop);
|
|
595
598
|
return {
|
|
@@ -638,9 +641,7 @@ export async function runMartin(input) {
|
|
|
638
641
|
}
|
|
639
642
|
}));
|
|
640
643
|
}
|
|
641
|
-
|
|
642
|
-
await Promise.all(pendingControlWrites.splice(0));
|
|
643
|
-
}
|
|
644
|
+
await stopSignalMonitorAndDrainDiagnostics();
|
|
644
645
|
const finalizedLoop = finalizeLoop(loop, poisoningExitDecision, now(), idFactory);
|
|
645
646
|
await persistLoopRecordIfSupported(input.store, finalizedLoop);
|
|
646
647
|
return {
|
|
@@ -704,9 +705,7 @@ export async function runMartin(input) {
|
|
|
704
705
|
payload: createRunExitPayload(exitDecision)
|
|
705
706
|
}));
|
|
706
707
|
}
|
|
707
|
-
|
|
708
|
-
await Promise.all(pendingControlWrites.splice(0));
|
|
709
|
-
}
|
|
708
|
+
await stopSignalMonitorAndDrainDiagnostics();
|
|
710
709
|
const finalizedLoop = finalizeLoop(loop, exitDecision, now(), idFactory);
|
|
711
710
|
await persistLoopRecordIfSupported(input.store, finalizedLoop);
|
|
712
711
|
return {
|
|
@@ -1061,9 +1060,7 @@ export async function runMartin(input) {
|
|
|
1061
1060
|
payload: createRunExitPayload(filesystemExitDecision)
|
|
1062
1061
|
}));
|
|
1063
1062
|
}
|
|
1064
|
-
|
|
1065
|
-
await Promise.all(pendingControlWrites.splice(0));
|
|
1066
|
-
}
|
|
1063
|
+
await stopSignalMonitorAndDrainDiagnostics();
|
|
1067
1064
|
const finalizedLoop = finalizeLoop(loop, filesystemExitDecision, now(), idFactory);
|
|
1068
1065
|
await persistLoopRecordIfSupported(input.store, finalizedLoop);
|
|
1069
1066
|
return {
|
|
@@ -1141,9 +1138,7 @@ export async function runMartin(input) {
|
|
|
1141
1138
|
payload: createRunExitPayload(approvalExitDecision)
|
|
1142
1139
|
}));
|
|
1143
1140
|
}
|
|
1144
|
-
|
|
1145
|
-
await Promise.all(pendingControlWrites.splice(0));
|
|
1146
|
-
}
|
|
1141
|
+
await stopSignalMonitorAndDrainDiagnostics();
|
|
1147
1142
|
const finalizedLoop = finalizeLoop(loop, approvalExitDecision, now(), idFactory);
|
|
1148
1143
|
await persistLoopRecordIfSupported(input.store, finalizedLoop);
|
|
1149
1144
|
return {
|
|
@@ -1286,9 +1281,7 @@ export async function runMartin(input) {
|
|
|
1286
1281
|
payload: createRunExitPayload(patchExitDecision)
|
|
1287
1282
|
}));
|
|
1288
1283
|
}
|
|
1289
|
-
|
|
1290
|
-
await Promise.all(pendingControlWrites.splice(0));
|
|
1291
|
-
}
|
|
1284
|
+
await stopSignalMonitorAndDrainDiagnostics();
|
|
1292
1285
|
const finalizedLoop = finalizeLoop(loop, patchExitDecision, now(), idFactory);
|
|
1293
1286
|
await persistLoopRecordIfSupported(input.store, finalizedLoop);
|
|
1294
1287
|
return {
|
|
@@ -1381,9 +1374,7 @@ export async function runMartin(input) {
|
|
|
1381
1374
|
}));
|
|
1382
1375
|
}
|
|
1383
1376
|
// Drain pending diagnostic ledger writes before receipt signing.
|
|
1384
|
-
|
|
1385
|
-
await Promise.all(pendingControlWrites.splice(0));
|
|
1386
|
-
}
|
|
1377
|
+
await stopSignalMonitorAndDrainDiagnostics();
|
|
1387
1378
|
const routingInput = { runStartMs, firstDeltaDetected, firstDeltaTimestampMs, firstDeltaFilePath, firstDeltaChangeType, preDeltaCostUsd };
|
|
1388
1379
|
const finalizedLoop = finalizeLoop(loop, decision, now(), idFactory, routingInput);
|
|
1389
1380
|
await persistLoopRecordIfSupported(input.store, finalizedLoop);
|
|
@@ -1407,9 +1398,7 @@ export async function runMartin(input) {
|
|
|
1407
1398
|
}));
|
|
1408
1399
|
}
|
|
1409
1400
|
// Drain pending diagnostic ledger writes before receipt signing.
|
|
1410
|
-
|
|
1411
|
-
await Promise.all(pendingControlWrites.splice(0));
|
|
1412
|
-
}
|
|
1401
|
+
await stopSignalMonitorAndDrainDiagnostics();
|
|
1413
1402
|
const routingInput = { runStartMs, firstDeltaDetected, firstDeltaTimestampMs, firstDeltaFilePath, firstDeltaChangeType, preDeltaCostUsd };
|
|
1414
1403
|
const finalizedLoop = finalizeLoop(loop, decision, now(), idFactory, routingInput);
|
|
1415
1404
|
await persistLoopRecordIfSupported(input.store, finalizedLoop);
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"url": "https://github.com/Keesan12/martin-loop",
|
|
8
8
|
"source": "github"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.
|
|
10
|
+
"version": "0.7.0",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "@martinloop/mcp",
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "0.7.0",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
}
|