gm-skill 2.0.1164 → 2.0.1166

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.1164` — auto-bumped from the canonical `gm` repo. Every push to `AnEntrypoint/gm` (or any cascading sibling crate) republishes this package.
38
+ `2.0.1166` — 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
 
@@ -1 +1 @@
1
- 0.1.419
1
+ 0.1.420
package/bin/plugkit.wasm CHANGED
Binary file
@@ -1 +1 @@
1
- 623152434c8b0f75b20cb89f48551e3a1677f132275e0fc43e261db7a69afeed plugkit.wasm
1
+ 19c3b4b5a7d89c06e6eee3cd596f163990460ecfbd8ced6b7fc0cb341fd88ea8 plugkit.wasm
@@ -56,6 +56,22 @@ function turnTick(sess, verb, taskBase, phase) {
56
56
  if (phase) { t.phases.add(phase); t.lastPhase = phase; }
57
57
  }
58
58
 
59
+ let __sessCache = { value: '', mtimeMs: 0, readAt: 0 };
60
+ function readCurrentSess() {
61
+ const now = Date.now();
62
+ if (now - __sessCache.readAt < 1000) return __sessCache.value;
63
+ try {
64
+ const p = path.join(process.cwd(), '.gm', 'exec-spool', '.session-current');
65
+ const st = fs.statSync(p);
66
+ if (st.mtimeMs !== __sessCache.mtimeMs) {
67
+ __sessCache.value = fs.readFileSync(p, 'utf8').trim();
68
+ __sessCache.mtimeMs = st.mtimeMs;
69
+ }
70
+ } catch (_) {}
71
+ __sessCache.readAt = now;
72
+ return __sessCache.value || process.env.CLAUDE_SESSION_ID || process.env.GM_SESSION_ID || '';
73
+ }
74
+
59
75
  function logEvent(sub, event, fields) {
60
76
  if (process.env.GM_LOG_DISABLE) return;
61
77
  try {
@@ -67,7 +83,7 @@ function logEvent(sub, event, fields) {
67
83
  sub,
68
84
  event,
69
85
  pid: process.pid,
70
- sess: process.env.CLAUDE_SESSION_ID || process.env.GM_SESSION_ID || '',
86
+ sess: readCurrentSess(),
71
87
  ...fields,
72
88
  });
73
89
  fs.appendFileSync(path.join(dir, `${sub}.jsonl`), line + '\n');
@@ -83,7 +99,7 @@ function emitOrchestratorEvents(verb, taskBase, resultStr) {
83
99
  return;
84
100
  }
85
101
  const data = parsed.data || {};
86
- const sess = process.env.CLAUDE_SESSION_ID || process.env.GM_SESSION_ID || '';
102
+ const sess = readCurrentSess();
87
103
  turnTick(sess, verb, taskBase, data.phase);
88
104
  switch (verb) {
89
105
  case 'transition':
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1164",
3
+ "version": "2.0.1166",
4
4
  "description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
@@ -17,5 +17,5 @@
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
- "plugkitVersion": "0.1.419"
20
+ "plugkitVersion": "0.1.420"
21
21
  }
@@ -320,6 +320,16 @@ function ensureBuildToolIgnores(cwd) {
320
320
  }
321
321
  }
322
322
 
323
+ function writeSessionSidecar(sessionId) {
324
+ try {
325
+ const sess = sessionId || process.env.CLAUDE_SESSION_ID || process.env.GM_SESSION_ID || '';
326
+ if (!sess) return;
327
+ const spool = path.join(process.cwd(), '.gm', 'exec-spool');
328
+ fs.mkdirSync(spool, { recursive: true });
329
+ fs.writeFileSync(path.join(spool, '.session-current'), sess);
330
+ } catch (_) {}
331
+ }
332
+
323
333
  function ensureManagedGitignore(cwd) {
324
334
  try {
325
335
  const gi = gitignorePath(cwd);
@@ -548,6 +558,7 @@ async function bootstrapPlugkit(sessionId, options) {
548
558
  try {
549
559
  emitBootstrapEvent('info', 'Bootstrap started', { forceLatest });
550
560
 
561
+ writeSessionSidecar(sessionId);
551
562
  ensureManagedGitignore(process.cwd());
552
563
  ensureBuildToolIgnores(process.cwd());
553
564
 
@@ -101,6 +101,11 @@ async function dispatchSpool(cmd, lang, body, timeoutMs, sessionId) {
101
101
  fs.mkdirSync(inDir, { recursive: true });
102
102
  fs.mkdirSync(outDir, { recursive: true });
103
103
 
104
+ const sess = sessionId || process.env.CLAUDE_SESSION_ID || process.env.GM_SESSION_ID || '';
105
+ if (sess) {
106
+ try { fs.writeFileSync(path.join(process.cwd(), '.gm', 'exec-spool', '.session-current'), sess); } catch (_) {}
107
+ }
108
+
104
109
  const code = sessionId ? `const SESSION_ID = '${sessionId}';\n${body}` : body;
105
110
  fs.writeFileSync(inFile, code, 'utf8');
106
111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1164",
3
+ "version": "2.0.1166",
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",
@@ -39,7 +39,7 @@
39
39
  "gm.json"
40
40
  ],
41
41
  "dependencies": {
42
- "gm-plugkit": "^2.0.1164"
42
+ "gm-plugkit": "^2.0.1166"
43
43
  },
44
44
  "engines": {
45
45
  "node": ">=16.0.0"
@@ -12,6 +12,8 @@ Direct Read/Edit/Bash before the first `instruction` dispatch is the failure mod
12
12
 
13
13
  Fix on Sight. Every unexpected output, broken neighbor, lockfile drift, suppressed error, or stale generated file surfaced during work becomes a PRD item the same turn and is executed before COMPLETE. Surprise is a new mutable, not noise to absorb. Stubs, mocks, placeholder returns, fixture-only paths, and "always succeeds" code paths are forbidden in shipped material; acceptance is real input through real code into real output, witnessed. Edits to code that runs in a browser require a live `browser` verb witness in the same turn — Browser Witness is non-negotiable.
14
14
 
15
+ When the question is how wide, how deep, how many phases, how destructive — the answer is wider, deeper, every phase, fully. The shape of the work is whatever the request admits at its outermost reach from this session. Half-measures, single-slice reads, narrow takes, and "do the minimum that satisfies" are forced closure wearing humility. The covering family is the default; the smaller cut is the exception, and the exception requires a named blocker. Larger always beats smaller when both are witnessable.
16
+
15
17
  Do not create documentation files the user did not ask for. No COMPLETED.md, no SUMMARY.txt, no IMPLEMENTATION_NOTES.md, no START-HERE.md, no *-STATUS.md, no build-output.txt left behind, no new top-level `.md` or `.txt` of any kind. Closure narrative lives in the PRD (which plugkit owns), in `memorize-fire` (which becomes recallable next session), and in the commit message (which `git log` preserves) — those are the only sanctioned destinations. A new doc at project root, in `docs/`, or anywhere else is a residual the next stop-gate will flag.
16
18
 
17
19
  Before any apparent stop, dispatch `residual-scan`. If it returns work that fits the spirit of the original ask and is reachable from this session, expand the PRD and execute; only residuals genuinely out-of-spirit or out-of-reach are name-and-stop. A turn that ends with uncommitted changes, an open PRD slice, or unresolved mutables has not actually stopped — it has stalled the chain.