gm-skill 2.0.1295 → 2.0.1296

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/README.md CHANGED
@@ -35,7 +35,7 @@ An earlier generation fanned out fifteen per-platform downstream repos (gm-cc, g
35
35
 
36
36
  ## Version
37
37
 
38
- `2.0.1295` — auto-bumped from the canonical `gm` repo. Every push to `AnEntrypoint/gm` (or any cascading sibling crate) republishes this package.
38
+ `2.0.1296` — auto-bumped from the canonical `gm` repo. Every push to `AnEntrypoint/gm` (or any cascading sibling crate) republishes this package.
39
39
 
40
40
  ## Source of truth
41
41
 
package/bin/bootstrap.js CHANGED
@@ -170,7 +170,7 @@ function obsEvent(subsystem, event, fields) {
170
170
  if (process.env.GM_LOG_DISABLE) return;
171
171
  try {
172
172
  const root = process.env.GM_LOG_DIR
173
- || path.join(os.homedir(), '.claude', 'gm-log');
173
+ || path.join(os.homedir(), '.gm-log');
174
174
  const day = new Date().toISOString().slice(0, 10);
175
175
  const dir = path.join(root, day);
176
176
  fs.mkdirSync(dir, { recursive: true });
@@ -210,12 +210,17 @@ function fallbackCacheRoot() {
210
210
 
211
211
  function gmToolsDir() {
212
212
  const home = process.env.USERPROFILE || process.env.HOME || os.homedir();
213
- return path.join(home, '.claude', 'gm-tools');
213
+ const primary = path.join(home, '.gm-tools');
214
+ const fallback = path.join(home, '.claude', 'gm-tools');
215
+ if (fs.existsSync(primary)) return primary;
216
+ if (fs.existsSync(fallback)) return fallback;
217
+ return primary;
214
218
  }
215
219
 
216
220
  // Copy the freshly-resolved plugkit binary + its version+sha manifests to
217
- // ~/.claude/gm-tools so hooks.json can invoke plugkit directly without going
218
- // through node. Self-update inside the Rust binary keeps gm-tools fresh from
221
+ // ~/.gm-tools (or ~/.claude/gm-tools for legacy installs) so hooks.json can
222
+ // invoke plugkit directly without going through node. Self-update inside the
223
+ // Rust binary keeps gm-tools fresh from
219
224
  // here on. Skipped silently on any error — the next session-start hook will
220
225
  // retry via ensure_tools_current.
221
226
 
package/bin/ccsniff.js CHANGED
@@ -102,22 +102,27 @@ function gitDisciplineScan(transcripts, cutoff) {
102
102
  }
103
103
 
104
104
  function collectPlugkitEvents(cutoff) {
105
- const root = path.join(os.homedir(), '.claude', 'gm-log');
105
+ const roots = [
106
+ path.join(os.homedir(), '.gm-log'),
107
+ path.join(os.homedir(), '.claude', 'gm-log'),
108
+ ].filter(r => fs.existsSync(r));
106
109
  const events = [];
107
- if (!fs.existsSync(root)) { console.log(col('d', `no log at ${root}`)); return events; }
108
- for (const date of fs.readdirSync(root)) {
109
- const pj = path.join(root, date, 'plugkit.jsonl');
110
- if (!fs.existsSync(pj)) continue;
111
- let lines; try { lines = fs.readFileSync(pj, 'utf8').split(/\r?\n/); } catch { continue; }
112
- for (const line of lines) {
113
- if (!line) continue;
114
- try {
115
- const ev = JSON.parse(line);
116
- const ts = Date.parse(ev.ts || '') || 0;
117
- if (cutoff && ts && ts < cutoff) continue;
118
- ev._ts = ts;
119
- events.push(ev);
120
- } catch {}
110
+ if (roots.length === 0) { console.log(col('d', `no gm-log at ~/.gm-log or ~/.claude/gm-log`)); return events; }
111
+ for (const root of roots) {
112
+ for (const date of fs.readdirSync(root)) {
113
+ const pj = path.join(root, date, 'plugkit.jsonl');
114
+ if (!fs.existsSync(pj)) continue;
115
+ let lines; try { lines = fs.readFileSync(pj, 'utf8').split(/\r?\n/); } catch { continue; }
116
+ for (const line of lines) {
117
+ if (!line) continue;
118
+ try {
119
+ const ev = JSON.parse(line);
120
+ const ts = Date.parse(ev.ts || '') || 0;
121
+ if (cutoff && ts && ts < cutoff) continue;
122
+ ev._ts = ts;
123
+ events.push(ev);
124
+ } catch {}
125
+ }
121
126
  }
122
127
  }
123
128
  return events;
package/bin/gmsniff.js CHANGED
@@ -49,8 +49,12 @@ function collectEvents(sinceMs) {
49
49
  events.push(ev);
50
50
  } catch {}
51
51
  }
52
- const gmLogRoot = path.join(os.homedir(), '.claude', 'gm-log');
53
- if (fs.existsSync(gmLogRoot)) {
52
+ const gmLogRoots = [
53
+ path.join(os.homedir(), '.gm-log'),
54
+ path.join(os.homedir(), '.claude', 'gm-log'),
55
+ ];
56
+ for (const gmLogRoot of gmLogRoots) {
57
+ if (!fs.existsSync(gmLogRoot)) continue;
54
58
  for (const date of fs.readdirSync(gmLogRoot)) {
55
59
  const pj = path.join(gmLogRoot, date, 'plugkit.jsonl');
56
60
  if (!fs.existsSync(pj)) continue;
@@ -15,7 +15,7 @@ const SHUTDOWN_REASON_PATH = path.join(spoolDir, '.shutdown-reason.json');
15
15
  const SUPERVISOR_STATUS_PATH = path.join(spoolDir, '.supervisor-status.json');
16
16
  const SUPERVISOR_PID_PATH = path.join(spoolDir, '.supervisor.pid');
17
17
  const LOG_PATH = path.join(spoolDir, '.watcher.log');
18
- const GM_LOG_ROOT = process.env.GM_LOG_DIR || path.join(os.homedir(), '.claude', 'gm-log');
18
+ const GM_LOG_ROOT = process.env.GM_LOG_DIR || path.join(os.homedir(), '.gm-log');
19
19
 
20
20
  const HEARTBEAT_STALE_MS = 60_000;
21
21
  const HEALTH_POLL_MS = 5_000;
@@ -123,7 +123,11 @@ function nextBackoffMs() {
123
123
  }
124
124
 
125
125
  function resolveWrapper() {
126
- return path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit-wasm-wrapper.js');
126
+ const primary = path.join(os.homedir(), '.gm-tools', 'plugkit-wasm-wrapper.js');
127
+ const fallback = path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit-wasm-wrapper.js');
128
+ if (fs.existsSync(primary)) return primary;
129
+ if (fs.existsSync(fallback)) return fallback;
130
+ return primary;
127
131
  }
128
132
 
129
133
  function resolveRuntime() {
package/bin/plugkit.js CHANGED
@@ -40,7 +40,10 @@ function readExpectedSha() {
40
40
 
41
41
  // Returns true if gm-tools WASM matches pinned version by sha. Fast: no network.
42
42
  function isReady() {
43
- const wasmBin = path.join(process.env.USERPROFILE || process.env.HOME || os.homedir(), '.claude', 'gm-tools', 'plugkit.wasm');
43
+ const home = process.env.USERPROFILE || process.env.HOME || os.homedir();
44
+ const primaryWasm = path.join(home, '.gm-tools', 'plugkit.wasm');
45
+ const fallbackWasm = path.join(home, '.claude', 'gm-tools', 'plugkit.wasm');
46
+ const wasmBin = fs.existsSync(primaryWasm) ? primaryWasm : fallbackWasm;
44
47
  if (!fs.existsSync(wasmBin)) return false;
45
48
  const expected = readExpectedSha();
46
49
  if (!expected) return true;
@@ -105,7 +108,10 @@ function main() {
105
108
  return runWasm(args);
106
109
  }
107
110
 
108
- const wasmBin = path.join(process.env.USERPROFILE || process.env.HOME || os.homedir(), '.claude', 'gm-tools', 'plugkit.wasm');
111
+ const home = process.env.USERPROFILE || process.env.HOME || os.homedir();
112
+ const primaryWasm = path.join(home, '.gm-tools', 'plugkit.wasm');
113
+ const fallbackWasm = path.join(home, '.claude', 'gm-tools', 'plugkit.wasm');
114
+ const wasmBin = fs.existsSync(primaryWasm) ? primaryWasm : fallbackWasm;
109
115
  if (!fs.existsSync(wasmBin)) {
110
116
  if (isHook) process.exit(0);
111
117
  process.exit(1);
@@ -45,7 +45,7 @@ function log(msg) {
45
45
  function obsEvent(subsystem, event, fields) {
46
46
  if (process.env.GM_LOG_DISABLE) return;
47
47
  try {
48
- const root = process.env.GM_LOG_DIR || path.join(os.homedir(), '.claude', 'gm-log');
48
+ const root = process.env.GM_LOG_DIR || path.join(os.homedir(), '.gm-log');
49
49
  const day = new Date().toISOString().slice(0, 10);
50
50
  const dir = path.join(root, day);
51
51
  fs.mkdirSync(dir, { recursive: true });
@@ -93,7 +93,11 @@ function fallbackCacheRoot() {
93
93
 
94
94
  function gmToolsDir() {
95
95
  const home = process.env.USERPROFILE || process.env.HOME || os.homedir();
96
- return path.join(home, '.claude', 'gm-tools');
96
+ const primary = path.join(home, '.gm-tools');
97
+ const fallback = path.join(home, '.claude', 'gm-tools');
98
+ if (fs.existsSync(primary)) return primary;
99
+ if (fs.existsSync(fallback)) return fallback;
100
+ return primary;
97
101
  }
98
102
 
99
103
  function readVersionFile() {
@@ -623,7 +627,11 @@ function copyWasmToGmTools(wasmPath, version) {
623
627
 
624
628
  function getWasmPath() {
625
629
  const home = process.env.USERPROFILE || process.env.HOME || os.homedir();
626
- return path.join(home, '.claude', 'gm-tools', 'plugkit.wasm');
630
+ const primary = path.join(home, '.gm-tools', 'plugkit.wasm');
631
+ const fallback = path.join(home, '.claude', 'gm-tools', 'plugkit.wasm');
632
+ if (fs.existsSync(primary)) return primary;
633
+ if (fs.existsSync(fallback)) return fallback;
634
+ return primary;
627
635
  }
628
636
 
629
637
  function isReady() {
@@ -18,10 +18,18 @@ function spawn(cmd, args, opts) {
18
18
  const __filename = fileURLToPath(import.meta.url);
19
19
  const __dirname = path.dirname(__filename);
20
20
 
21
- const KV_DIR = path.join(os.homedir(), '.claude', 'gm-tools', 'kv');
21
+ function resolveGmToolsRoot() {
22
+ const primary = path.join(os.homedir(), '.gm-tools');
23
+ const fallback = path.join(os.homedir(), '.claude', 'gm-tools');
24
+ if (fs.existsSync(primary)) return primary;
25
+ if (fs.existsSync(fallback)) return fallback;
26
+ return primary;
27
+ }
28
+ const GM_TOOLS_ROOT = resolveGmToolsRoot();
29
+ const KV_DIR = path.join(GM_TOOLS_ROOT, 'kv');
22
30
  fs.mkdirSync(KV_DIR, { recursive: true });
23
31
 
24
- const GM_LOG_ROOT = process.env.GM_LOG_DIR || path.join(os.homedir(), '.claude', 'gm-log');
32
+ const GM_LOG_ROOT = process.env.GM_LOG_DIR || path.join(os.homedir(), '.gm-log');
25
33
  const ORCHESTRATOR_VERBS = new Set(['instruction', 'transition', 'phase-status', 'prd-add', 'prd-resolve', 'prd-list', 'mutable-add', 'mutable-resolve', 'mutable-list', 'memorize-fire', 'residual-scan', 'auto-recall']);
26
34
 
27
35
  const TURN_IDLE_MS = 30_000;
@@ -437,19 +445,25 @@ function browserStateDir(cwd) {
437
445
  function browserPortsFile(cwd) { return path.join(browserStateDir(cwd), 'browser-ports.json'); }
438
446
  function browserSessionsFile(cwd) { return path.join(browserStateDir(cwd), 'browser-sessions.json'); }
439
447
 
448
+ function atomicWriteJson(filePath, obj) {
449
+ const tmp = filePath + '.tmp.' + process.pid + '.' + Date.now() + '.' + Math.random().toString(36).slice(2, 8);
450
+ fs.writeFileSync(tmp, JSON.stringify(obj, null, 2));
451
+ fs.renameSync(tmp, filePath);
452
+ }
453
+
440
454
  function migrateLegacyBrowserState(cwd) {
441
455
  const dst1 = browserPortsFile(cwd);
442
456
  const dst2 = browserSessionsFile(cwd);
443
457
  try {
444
458
  if (!fs.existsSync(dst1) && fs.existsSync(LEGACY_BROWSER_PORTS_FILE)) {
445
459
  const legacy = JSON.parse(fs.readFileSync(LEGACY_BROWSER_PORTS_FILE, 'utf-8'));
446
- if (legacy && typeof legacy === 'object') fs.writeFileSync(dst1, JSON.stringify(legacy, null, 2));
460
+ if (legacy && typeof legacy === 'object') atomicWriteJson(dst1, legacy);
447
461
  }
448
462
  } catch (_) {}
449
463
  try {
450
464
  if (!fs.existsSync(dst2) && fs.existsSync(LEGACY_BROWSER_SESSIONS_FILE)) {
451
465
  const legacy = JSON.parse(fs.readFileSync(LEGACY_BROWSER_SESSIONS_FILE, 'utf-8'));
452
- if (legacy && typeof legacy === 'object') fs.writeFileSync(dst2, JSON.stringify(legacy, null, 2));
466
+ if (legacy && typeof legacy === 'object') atomicWriteJson(dst2, legacy);
453
467
  }
454
468
  } catch (_) {}
455
469
  }
@@ -458,7 +472,7 @@ function readJsonFile(fp, fallback) {
458
472
  try { return JSON.parse(fs.readFileSync(fp, 'utf-8')); } catch (_) { return fallback; }
459
473
  }
460
474
  function writeJsonFile(fp, value) {
461
- try { fs.writeFileSync(fp, JSON.stringify(value, null, 2)); } catch (_) {}
475
+ try { atomicWriteJson(fp, value); } catch (_) {}
462
476
  }
463
477
 
464
478
  const BROWSER_RUNNER_BIN = process.env.GM_BROWSER_RUNNER_BIN || 'playwriter';
@@ -1538,7 +1552,7 @@ function makeHostFunctions(instanceRef) {
1538
1552
 
1539
1553
  function resolveVersion(instance) {
1540
1554
  try {
1541
- return fs.readFileSync(path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit.version'), 'utf8').trim();
1555
+ return fs.readFileSync(path.join(GM_TOOLS_ROOT, 'plugkit.version'), 'utf8').trim();
1542
1556
  } catch (_) {}
1543
1557
  try {
1544
1558
  const fn = instance && instance.exports && instance.exports.plugkit_version;
@@ -1554,7 +1568,7 @@ function resolveVersion(instance) {
1554
1568
  }
1555
1569
 
1556
1570
  function readFileVersionOnly() {
1557
- try { return fs.readFileSync(path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit.version'), 'utf8').trim(); } catch (_) { return null; }
1571
+ try { return fs.readFileSync(path.join(GM_TOOLS_ROOT, 'plugkit.version'), 'utf8').trim(); } catch (_) { return null; }
1558
1572
  }
1559
1573
 
1560
1574
  function readInstanceVersion(instance) {
@@ -1580,7 +1594,7 @@ async function runSpoolWatcher(instance, spoolDir) {
1580
1594
  let _ownWrapperSha12 = '';
1581
1595
  try {
1582
1596
  const _crypto = require('crypto');
1583
- const _wp = path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit-wasm-wrapper.js');
1597
+ const _wp = path.join(GM_TOOLS_ROOT, 'plugkit-wasm-wrapper.js');
1584
1598
  _ownWrapperSha12 = _crypto.createHash('sha256').update(fs.readFileSync(_wp)).digest('hex').slice(0, 12);
1585
1599
  } catch (_) {}
1586
1600
  function lockBody() { return `${process.pid}|${Date.now()}|${_ownWrapperSha12}`; }
@@ -1724,7 +1738,7 @@ async function runSpoolWatcher(instance, spoolDir) {
1724
1738
  }
1725
1739
  writeBootActive();
1726
1740
 
1727
- const PEER_REGISTRY_PATH = path.join(os.homedir(), '.claude', 'gm-tools', 'peer-registry.json');
1741
+ const PEER_REGISTRY_PATH = path.join(GM_TOOLS_ROOT, 'peer-registry.json');
1728
1742
  function registerSelfAsPeer() {
1729
1743
  try {
1730
1744
  let reg = {};
@@ -1860,7 +1874,7 @@ async function runSpoolWatcher(instance, spoolDir) {
1860
1874
  }
1861
1875
  }, 60_000);
1862
1876
 
1863
- const _wrapperPathInstalled = path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit-wasm-wrapper.js');
1877
+ const _wrapperPathInstalled = path.join(GM_TOOLS_ROOT, 'plugkit-wasm-wrapper.js');
1864
1878
  let _wrapperShaAtBoot = '';
1865
1879
  try {
1866
1880
  const _crypto = require('crypto');
@@ -1938,7 +1952,7 @@ async function runSpoolWatcher(instance, spoolDir) {
1938
1952
  process.on('exit', () => { try { clearBootActive(); } catch (_) {} releaseLock(); });
1939
1953
 
1940
1954
  try {
1941
- const wrapperDst = path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit-wasm-wrapper.js');
1955
+ const wrapperDst = path.join(GM_TOOLS_ROOT, 'plugkit-wasm-wrapper.js');
1942
1956
  if (path.resolve(__filename) !== path.resolve(wrapperDst)) {
1943
1957
  let same = false;
1944
1958
  if (fs.existsSync(wrapperDst)) {
@@ -2236,7 +2250,7 @@ async function runSpoolWatcher(instance, spoolDir) {
2236
2250
  installed,
2237
2251
  latest,
2238
2252
  checked_at_ms: Date.now(),
2239
- instruction: 'plugkit is out of date. To update, close the running watcher and re-bootstrap with the @latest flag, e.g. node ~/.claude/gm-tools/plugkit-wasm-wrapper.js spool & after running bootstrap with {latest: true}.',
2253
+ instruction: 'plugkit is out of date. To update, close the running watcher and re-bootstrap with the @latest flag, e.g. node ~/.gm-tools/plugkit-wasm-wrapper.js spool & after running bootstrap with {latest: true}.',
2240
2254
  update_url,
2241
2255
  }, null, 2));
2242
2256
  console.log(`[update] available: installed=${installed} latest=${latest} → wrote ${UPDATE_AVAILABLE_PATH}`);
@@ -2391,7 +2405,7 @@ async function selfHealFromGithubReleases() {
2391
2405
  const got = crypto.createHash('sha256').update(wasm).digest('hex');
2392
2406
  if (got !== sha) throw new Error(`sha mismatch: got ${got}, expected ${sha}`);
2393
2407
  }
2394
- const toolsDir = path.join(os.homedir(), '.claude', 'gm-tools');
2408
+ const toolsDir = GM_TOOLS_ROOT;
2395
2409
  fs.mkdirSync(toolsDir, { recursive: true });
2396
2410
  fs.writeFileSync(path.join(toolsDir, 'plugkit.wasm'), wasm);
2397
2411
  fs.writeFileSync(path.join(toolsDir, 'plugkit.version'), version);
@@ -2435,7 +2449,7 @@ async function tryInstantiate(wasmPath) {
2435
2449
 
2436
2450
  (async () => {
2437
2451
  try {
2438
- const wasmPath = path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit.wasm');
2452
+ const wasmPath = path.join(GM_TOOLS_ROOT, 'plugkit.wasm');
2439
2453
 
2440
2454
  let instance, instanceRef;
2441
2455
  if (!fs.existsSync(wasmPath)) {
@@ -14,7 +14,7 @@ const STATUS_PATH = path.join(spoolDir, '.status.json');
14
14
  const SHUTDOWN_REASON_PATH = path.join(spoolDir, '.shutdown-reason.json');
15
15
  const SUPERVISOR_PATH = path.join(spoolDir, '.supervisor.json');
16
16
  const LOG_PATH = path.join(spoolDir, '.watcher.log');
17
- const GM_LOG_ROOT = process.env.GM_LOG_DIR || path.join(os.homedir(), '.claude', 'gm-log');
17
+ const GM_LOG_ROOT = process.env.GM_LOG_DIR || path.join(os.homedir(), '.gm-log');
18
18
 
19
19
  const POLL_INTERVAL_MS = 10_000;
20
20
  const STATUS_STALE_MS = 30_000;
@@ -85,7 +85,9 @@ function spawnWatcher(bootReason) {
85
85
  process.exit(2);
86
86
  }
87
87
 
88
- const wrapper = path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit-wasm-wrapper.js');
88
+ const primaryWrapper = path.join(os.homedir(), '.gm-tools', 'plugkit-wasm-wrapper.js');
89
+ const fallbackWrapper = path.join(os.homedir(), '.claude', 'gm-tools', 'plugkit-wasm-wrapper.js');
90
+ const wrapper = fs.existsSync(primaryWrapper) ? primaryWrapper : fallbackWrapper;
89
91
  if (!fs.existsSync(wrapper)) {
90
92
  logEvent('supervisor.wrapper-missing', { wrapper, severity: 'critical' });
91
93
  writeSupervisorStatus('error', { error: 'wrapper-missing' });
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1295",
3
+ "version": "2.0.1296",
4
4
  "description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -9,7 +9,7 @@ const {
9
9
  isBrowserAvailable,
10
10
  } = require('./browser');
11
11
 
12
- const LOG_DIR = path.join(os.homedir(), '.claude', 'gm-log');
12
+ const LOG_DIR = path.join(os.homedir(), '.gm-log');
13
13
 
14
14
  function emitHandlerEvent(severity, message, details) {
15
15
  try {
package/lib/browser.js CHANGED
@@ -3,7 +3,7 @@ const path = require('path');
3
3
  const os = require('os');
4
4
  const spool = require('./spool.js');
5
5
 
6
- const LOG_DIR = path.join(os.homedir(), '.claude', 'gm-log');
6
+ const LOG_DIR = path.join(os.homedir(), '.gm-log');
7
7
  const SESSION_STATE_DIR = path.join(os.homedir(), '.gm', 'browser-sessions');
8
8
 
9
9
  function emitBrowserEvent(severity, message, details) {
@@ -10,7 +10,7 @@ const REQUEST_TIMEOUT_MS = 30000;
10
10
  function emitEvent(severity, message, details = {}) {
11
11
  try {
12
12
  const date = new Date().toISOString().split('T')[0];
13
- const logDir = path.join(os.homedir(), '.claude', 'gm-log', date);
13
+ const logDir = path.join(os.homedir(), '.gm-log', date);
14
14
  if (!fs.existsSync(logDir)) fs.mkdirSync(logDir, { recursive: true });
15
15
  const entry = { ts: new Date().toISOString(), severity, message, ...details };
16
16
  fs.appendFileSync(path.join(logDir, 'codeinsight.jsonl'), JSON.stringify(entry) + '\n');
@@ -37,7 +37,7 @@ function shellQuoteWin(cmdOrArg) {
37
37
  return `"${s.replace(/"/g, '\\"')}"`;
38
38
  }
39
39
 
40
- const LOG_DIR = path.join(os.homedir(), '.claude', 'gm-log');
40
+ const LOG_DIR = path.join(os.homedir(), '.gm-log');
41
41
  const GM_STATE_DIR = path.join(os.homedir(), '.gm');
42
42
 
43
43
  function emitDaemonEvent(daemon, severity, message, details) {
package/lib/git.js CHANGED
@@ -6,7 +6,7 @@ const GIT_USER = 'lanmower';
6
6
  const GIT_EMAIL = 'almagestfraternite@gmail.com';
7
7
 
8
8
  function emitGitEvent(severity, message, data = {}) {
9
- const logDir = path.join(os.homedir(), '.claude', 'gm-log', new Date().toISOString().split('T')[0]);
9
+ const logDir = path.join(os.homedir(), '.gm-log', new Date().toISOString().split('T')[0]);
10
10
  if (!fs.existsSync(logDir)) {
11
11
  try { fs.mkdirSync(logDir, { recursive: true }); } catch (e) {}
12
12
  }
package/lib/learning.js CHANGED
@@ -5,7 +5,7 @@ const spool = require('./spool.js');
5
5
 
6
6
  const RS_LEARN_HOST = '127.0.0.1';
7
7
  const RS_LEARN_PORT = 4801;
8
- const LOG_DIR = path.join(os.homedir(), '.claude', 'gm-log');
8
+ const LOG_DIR = path.join(os.homedir(), '.gm-log');
9
9
 
10
10
  let daemonBootstrap = null;
11
11
  function getDaemonBootstrap() {
@@ -6,14 +6,21 @@ const crypto = require('crypto');
6
6
  const os = require('os');
7
7
  const spool = require('./spool.js');
8
8
 
9
- const PLUGKIT_TOOLS_DIR = path.join(os.homedir(), '.claude', 'gm-tools');
9
+ function resolveToolsDir() {
10
+ const primary = path.join(os.homedir(), '.gm-tools');
11
+ const fallback = path.join(os.homedir(), '.claude', 'gm-tools');
12
+ if (fs.existsSync(primary)) return primary;
13
+ if (fs.existsSync(fallback)) return fallback;
14
+ return primary;
15
+ }
16
+ const PLUGKIT_TOOLS_DIR = resolveToolsDir();
10
17
  const PLUGKIT_VERSION_FILE = path.join(PLUGKIT_TOOLS_DIR, 'plugkit.version');
11
18
  const PLUGKIT_WASM_PATH = path.join(PLUGKIT_TOOLS_DIR, 'plugkit.wasm');
12
19
  const PLUGKIT_WASM_WRAPPER = path.join(PLUGKIT_TOOLS_DIR, 'plugkit-wasm-wrapper.js');
13
20
  const PLUGKIT_SUPERVISOR = path.join(PLUGKIT_TOOLS_DIR, 'plugkit-supervisor.js');
14
21
  const BOOTSTRAP_STATUS_FILE = path.join(os.homedir(), '.gm', 'bootstrap-status.json');
15
22
  const BOOTSTRAP_ERROR_FILE = path.join(os.homedir(), '.gm', 'bootstrap-error.json');
16
- const LOG_DIR = path.join(os.homedir(), '.claude', 'gm-log');
23
+ const LOG_DIR = path.join(os.homedir(), '.gm-log');
17
24
 
18
25
  function getPlugkitPath() {
19
26
  return PLUGKIT_WASM_PATH;
@@ -3,7 +3,7 @@ const path = require('path');
3
3
  const os = require('os');
4
4
  const { spawnSync } = require('child_process');
5
5
 
6
- const GM_LOG_ROOT = process.env.GM_LOG_DIR || path.join(os.homedir(), '.claude', 'gm-log');
6
+ const GM_LOG_ROOT = process.env.GM_LOG_DIR || path.join(os.homedir(), '.gm-log');
7
7
 
8
8
  function logDeviation(event, fields) {
9
9
  if (process.env.GM_LOG_DISABLE) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1295",
3
+ "version": "2.0.1296",
4
4
  "description": "Canonical universal harness — AI-native software engineering via skill-driven orchestration; bootstraps plugkit for task execution and session isolation. Install in any AI coding agent host.",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "gm.json"
42
42
  ],
43
43
  "dependencies": {
44
- "gm-plugkit": "^2.0.1295"
44
+ "gm-plugkit": "^2.0.1296"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=16.0.0"