@mrrlin-dev/mcp 0.4.16 → 0.4.17

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 +45 -32
  2. package/package.json +4 -4
package/dist/bin.cjs CHANGED
@@ -41623,7 +41623,7 @@ Do NOT derail the current task - if the operator has an in-flight question, answ
41623
41623
  }
41624
41624
 
41625
41625
  // src/_generated/version.ts
41626
- var PKG_VERSION = "0.4.16";
41626
+ var PKG_VERSION = "0.4.17";
41627
41627
 
41628
41628
  // src/api-base-url-migrate.ts
41629
41629
  var import_node_fs3 = __toESM(require("node:fs"), 1);
@@ -55495,6 +55495,7 @@ function checkTelemetryDefaultProject(env, warn) {
55495
55495
  }
55496
55496
  async function startDirectorBridge() {
55497
55497
  const config2 = parseConfig();
55498
+ let telemetryPipelineRunning = false;
55498
55499
  checkTelemetryDefaultProject(process.env, (m) => console.error(m));
55499
55500
  const turnLock = createTurnLock();
55500
55501
  let lastTurnEndedAt = Date.now();
@@ -56174,42 +56175,54 @@ async function startDirectorBridge() {
56174
56175
  });
56175
56176
  }
56176
56177
  }
56177
- void (async () => {
56178
- try {
56179
- const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
56180
- await foldClosedDays(config2.stateDir, today);
56181
- await uploadPendingDays(config2.stateDir, client, bridgeHealth, {
56182
- cwd: config2.codexCwd ?? process.cwd(),
56183
- codexExecutable: config2.codexExecutable,
56184
- timeoutMs: readEnvInt("MRRLIN_TELEMETRY_GATE_TIMEOUT_SECONDS", 60) * 1e3
56185
- });
56186
- const pruneResult = await prune(config2.stateDir, {
56187
- ageDays: readEnvInt("MRRLIN_LOG_RETENTION_AGE_DAYS", 30),
56188
- budgetMb: readEnvInt("MRRLIN_LOG_RETENTION_BUDGET_MB", 1024),
56189
- // The reconstruction window's day-files are off limits. Derived from the thread
56190
- // TTL so the two numbers cannot drift apart.
56191
- protectedSinceMs: Date.now() - config2.idleThreadTtlMs
56192
- });
56193
- if (pruneResult.budgetOvershootBytes > 0) {
56178
+ if (telemetryPipelineRunning) {
56179
+ bridgeLogger.logOut({
56180
+ spanId: "gc",
56181
+ sessionId: null,
56182
+ type: "<telemetry-pipeline-skipped>",
56183
+ payload: { reason: "previous run still in flight" }
56184
+ });
56185
+ } else {
56186
+ telemetryPipelineRunning = true;
56187
+ void (async () => {
56188
+ try {
56189
+ const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
56190
+ await foldClosedDays(config2.stateDir, today);
56191
+ await uploadPendingDays(config2.stateDir, client, bridgeHealth, {
56192
+ cwd: config2.codexCwd ?? process.cwd(),
56193
+ codexExecutable: config2.codexExecutable,
56194
+ timeoutMs: readEnvInt("MRRLIN_TELEMETRY_GATE_TIMEOUT_SECONDS", 60) * 1e3
56195
+ });
56196
+ const pruneResult = await prune(config2.stateDir, {
56197
+ ageDays: readEnvInt("MRRLIN_LOG_RETENTION_AGE_DAYS", 30),
56198
+ budgetMb: readEnvInt("MRRLIN_LOG_RETENTION_BUDGET_MB", 1024),
56199
+ // The reconstruction window's day-files are off limits. Derived from the thread
56200
+ // TTL so the two numbers cannot drift apart.
56201
+ protectedSinceMs: Date.now() - config2.idleThreadTtlMs
56202
+ });
56203
+ if (pruneResult.budgetOvershootBytes > 0) {
56204
+ bridgeLogger.logOut({
56205
+ spanId: "gc",
56206
+ sessionId: null,
56207
+ type: "<log-budget-overshoot>",
56208
+ payload: {
56209
+ overshootBytes: pruneResult.budgetOvershootBytes,
56210
+ reason: "protected re-seed window not pruned"
56211
+ }
56212
+ });
56213
+ }
56214
+ } catch (error51) {
56194
56215
  bridgeLogger.logOut({
56195
56216
  spanId: "gc",
56196
56217
  sessionId: null,
56197
- type: "<log-budget-overshoot>",
56198
- payload: {
56199
- overshootBytes: pruneResult.budgetOvershootBytes,
56200
- reason: "protected re-seed window not pruned"
56201
- }
56218
+ type: "<telemetry-pipeline-error>",
56219
+ payload: { error: error51 instanceof Error ? error51.message : String(error51) }
56202
56220
  });
56221
+ } finally {
56222
+ telemetryPipelineRunning = false;
56203
56223
  }
56204
- } catch (error51) {
56205
- bridgeLogger.logOut({
56206
- spanId: "gc",
56207
- sessionId: null,
56208
- type: "<telemetry-pipeline-error>",
56209
- payload: { error: error51 instanceof Error ? error51.message : String(error51) }
56210
- });
56211
- }
56212
- })();
56224
+ })();
56225
+ }
56213
56226
  scheduleClaimLoop();
56214
56227
  }, claimIntervalMs());
56215
56228
  claimTimer.unref?.();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrrlin-dev/mcp",
3
- "version": "0.4.16",
3
+ "version": "0.4.17",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mrrlin-mcp": "dist/bin.cjs"
@@ -21,12 +21,12 @@
21
21
  "@types/ws": "^8.18.1",
22
22
  "esbuild": "^0.24.0",
23
23
  "tsx": "^4.22.3",
24
+ "@mrrlin/client": "0.0.0",
24
25
  "@mrrlin/agent-client": "0.0.0",
26
+ "@mrrlin/director-e2e": "0.0.0",
25
27
  "@mrrlin/schemas": "0.0.0",
26
- "@mrrlin/client": "0.0.0",
27
28
  "@mrrlin/tsconfig": "0.0.0",
28
- "@mrrlin/wiki": "0.0.0",
29
- "@mrrlin/director-e2e": "0.0.0"
29
+ "@mrrlin/wiki": "0.0.0"
30
30
  },
31
31
  "dependencies": {
32
32
  "@iarna/toml": "^2.2.5",