memtrace-skills 1.2.0 → 1.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.
@@ -3,7 +3,7 @@ import fs from 'node:fs';
3
3
  import path from 'node:path';
4
4
  import { randomUUID } from 'node:crypto';
5
5
  import { installRailHooks, uninstallRailHooks } from './rail-install.js';
6
- import { runtimeDirectory, railDisabled, activeRailRuntimes, pidAlive } from './rail-runtime.js';
6
+ import { runtimeDirectory, railDisabled, activeRailRuntimes, pidAlive, LEASE_REFRESH_INTERVAL_MS } from './rail-runtime.js';
7
7
  import { writeJsonAtomic } from './fs-safe.js';
8
8
  const arg = (name) => {
9
9
  const index = process.argv.indexOf(name);
@@ -72,7 +72,7 @@ async function main() {
72
72
  catch {
73
73
  stop();
74
74
  }
75
- }, 500);
75
+ }, LEASE_REFRESH_INTERVAL_MS);
76
76
  if (!process.argv.includes('--watch-pid')) {
77
77
  process.stdin.on('end', stop);
78
78
  // Windows named pipes report a killed writer as ECONNRESET/close.
@@ -9,6 +9,7 @@ export interface RailRuntime {
9
9
  routeBinary?: string;
10
10
  }
11
11
  export declare const LEASE_MAX_AGE_MS = 3000;
12
+ export declare const LEASE_REFRESH_INTERVAL_MS = 1000;
12
13
  export declare const RAIL_GUARD_MARKER = "rail-hook.js";
13
14
  export declare function runtimeDirectory(): string;
14
15
  export declare function railDisabled(): boolean;
@@ -5,6 +5,9 @@ import path from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { writeJsonAtomic } from './fs-safe.js';
7
7
  export const LEASE_MAX_AGE_MS = 3000;
8
+ // Refresh at one third of the existing expiry interval. EOF still handles
9
+ // daemon death immediately; this timer covers PID-only owners and opt-out.
10
+ export const LEASE_REFRESH_INTERVAL_MS = 1000;
8
11
  export const RAIL_GUARD_MARKER = 'rail-hook.js';
9
12
  export function runtimeDirectory() {
10
13
  return process.env.MEMTRACE_RAIL_RUNTIME_DIR?.trim()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memtrace-skills",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Memtrace skills for AI coding agents — codebase exploration, temporal evolution, impact analysis, and more.",
5
5
  "type": "module",
6
6
  "bin": {