@swarmvaultai/engine 0.1.31 → 0.1.32
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/index.js +9 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13913,7 +13913,7 @@ async function bootstrapDemo(rootDir, input) {
|
|
|
13913
13913
|
}
|
|
13914
13914
|
|
|
13915
13915
|
// src/mcp.ts
|
|
13916
|
-
var SERVER_VERSION = "0.1.
|
|
13916
|
+
var SERVER_VERSION = "0.1.32";
|
|
13917
13917
|
async function createMcpServer(rootDir) {
|
|
13918
13918
|
const server = new McpServer({
|
|
13919
13919
|
name: "swarmvault",
|
|
@@ -14743,6 +14743,7 @@ async function watchVault(rootDir, options = {}) {
|
|
|
14743
14743
|
let consecutiveFailures = 0;
|
|
14744
14744
|
let currentDebounceMs = baseDebounceMs;
|
|
14745
14745
|
const reasons = /* @__PURE__ */ new Set();
|
|
14746
|
+
let activeCycle = null;
|
|
14746
14747
|
const watcher = chokidar.watch(watchTargets, {
|
|
14747
14748
|
ignoreInitial: true,
|
|
14748
14749
|
usePolling: true,
|
|
@@ -14787,7 +14788,12 @@ async function watchVault(rootDir, options = {}) {
|
|
|
14787
14788
|
clearTimeout(timer);
|
|
14788
14789
|
}
|
|
14789
14790
|
timer = setTimeout(() => {
|
|
14790
|
-
|
|
14791
|
+
const cycle = runCycle();
|
|
14792
|
+
activeCycle = cycle.finally(() => {
|
|
14793
|
+
if (activeCycle === cycle) {
|
|
14794
|
+
activeCycle = null;
|
|
14795
|
+
}
|
|
14796
|
+
});
|
|
14791
14797
|
}, currentDebounceMs);
|
|
14792
14798
|
};
|
|
14793
14799
|
const runCycle = async () => {
|
|
@@ -14955,6 +14961,7 @@ async function watchVault(rootDir, options = {}) {
|
|
|
14955
14961
|
clearTimeout(timer);
|
|
14956
14962
|
}
|
|
14957
14963
|
await watcher.close();
|
|
14964
|
+
await activeCycle;
|
|
14958
14965
|
}
|
|
14959
14966
|
};
|
|
14960
14967
|
}
|