@mrrlin-dev/mcp 0.3.23 → 0.3.24

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.
Files changed (2) hide show
  1. package/dist/bin.cjs +16 -2
  2. package/package.json +5 -5
package/dist/bin.cjs CHANGED
@@ -38723,7 +38723,8 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
38723
38723
  if (drainOnQuiet && driftConfirmed && !shutdownCalled) {
38724
38724
  const active = deps.getActiveTurnCount();
38725
38725
  const idle = deps.getIdleMs();
38726
- if (active === 0 && idle >= idleThresholdMs) {
38726
+ const resumable = deps.getResumableTurnCount ? deps.getResumableTurnCount() : 0;
38727
+ if (active === 0 && resumable === 0 && idle >= idleThresholdMs) {
38727
38728
  shutdownCalled = true;
38728
38729
  log("info", "bridge.self_update.self_exit_for_reload", {});
38729
38730
  try {
@@ -38733,6 +38734,8 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
38733
38734
  err: String(e?.message ?? e)
38734
38735
  });
38735
38736
  }
38737
+ } else if (active === 0 && idle >= idleThresholdMs && resumable > 0) {
38738
+ log("info", "bridge.self_update.reload_deferred_resumable_turn", { resumable });
38736
38739
  }
38737
38740
  }
38738
38741
  } catch (e) {
@@ -38778,7 +38781,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
38778
38781
  }
38779
38782
 
38780
38783
  // src/_generated/version.ts
38781
- var PKG_VERSION = "0.3.23";
38784
+ var PKG_VERSION = "0.3.24";
38782
38785
 
38783
38786
  // src/api-base-url.ts
38784
38787
  var DEFAULT_API_BASE_URL = "http://127.0.0.1:8787";
@@ -47914,9 +47917,11 @@ async function startDirectorBridge() {
47914
47917
  activeCount: turnLock.activeCount
47915
47918
  };
47916
47919
  const shutdownHolder = { fn: null };
47920
+ const resumableCountHolder = { fn: null };
47917
47921
  const selfUpdateHandle = startSelfUpdate({
47918
47922
  binPath: process.argv[1] ?? "",
47919
47923
  getActiveTurnCount: () => wrappedTurnLock.activeCount(),
47924
+ getResumableTurnCount: () => resumableCountHolder.fn?.() ?? 0,
47920
47925
  getIdleMs: () => Date.now() - lastTurnEndedAt,
47921
47926
  pkgVersion: PKG_VERSION,
47922
47927
  shutdown: () => {
@@ -48156,6 +48161,15 @@ async function startDirectorBridge() {
48156
48161
  );
48157
48162
  const threads = /* @__PURE__ */ new Map();
48158
48163
  const suspensionDetector = createSuspensionDetector();
48164
+ resumableCountHolder.fn = () => {
48165
+ const now = Date.now();
48166
+ const suspended = suspensionDetector.suspendedMs();
48167
+ let n = 0;
48168
+ for (const thread of threads.values()) {
48169
+ if (thread.replay && !shouldGc(thread.replay, now, suspended)) n += 1;
48170
+ }
48171
+ return n;
48172
+ };
48159
48173
  for (const [directorSessionId, entry] of loadThreadIndex(config2.stateDir, config2.idleThreadTtlMs, Date.now())) {
48160
48174
  threads.set(directorSessionId, {
48161
48175
  threadId: entry.threadId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.3.23",
3
+ "version": "0.3.24",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"
@@ -22,12 +22,12 @@
22
22
  "@types/ws": "^8.18.1",
23
23
  "esbuild": "^0.24.0",
24
24
  "tsx": "^4.22.3",
25
- "@mrrlin/client": "0.0.0",
26
- "@mrrlin/wiki": "0.0.0",
27
- "@mrrlin/schemas": "0.0.0",
28
25
  "@mrrlin/director-e2e": "0.0.0",
26
+ "@mrrlin/schemas": "0.0.0",
29
27
  "@mrrlin/codex-client": "0.0.0",
30
- "@mrrlin/tsconfig": "0.0.0"
28
+ "@mrrlin/client": "0.0.0",
29
+ "@mrrlin/tsconfig": "0.0.0",
30
+ "@mrrlin/wiki": "0.0.0"
31
31
  },
32
32
  "dependencies": {
33
33
  "@iarna/toml": "^2.2.5",