gm-skill 2.0.1325 → 2.0.1326

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1325",
3
+ "version": "2.0.1326",
4
4
  "description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform binary, verifies SHA256, and starts the spool watcher daemon. Includes plugkit-wasm-wrapper for WASM-based spool watching.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -2272,6 +2272,24 @@ async function runSpoolWatcher(instance, spoolDir) {
2272
2272
  try { fs.unlinkSync(SHUTDOWN_REASON_PATH); } catch (_) {}
2273
2273
  logEvent('plugkit', 'watcher.boot', { version: _bootVersion, in_dir: inDir, out_dir: outDir, spool_dir: spoolDir, ...restartContext });
2274
2274
 
2275
+ const PRE_SUPERVISED_MARKER = path.join(spoolDir, '.pre-supervised-watcher.json');
2276
+ if (_supervisorPid == null && _bootReason === 'direct-no-supervisor') {
2277
+ try {
2278
+ fs.writeFileSync(PRE_SUPERVISED_MARKER, JSON.stringify({
2279
+ ts: Date.now(),
2280
+ reason: 'running-watcher-has-no-supervisor',
2281
+ watcher_pid: process.pid,
2282
+ watcher_version: _bootVersion,
2283
+ boot_reason: _bootReason,
2284
+ severity: 'warn',
2285
+ instruction: 'A running watcher was started directly without supervisor.js. Unplanned-restart recovery and idle-teardown coordination are dormant. To migrate: stop the current watcher and let the next bootstrap (bun x gm-plugkit@latest spool) re-spawn it under supervisor.js.',
2286
+ }, null, 2));
2287
+ logEvent('plugkit', 'watcher.unsupervised-marker-written', { spool_dir: spoolDir, watcher_pid: process.pid });
2288
+ } catch (_) {}
2289
+ } else {
2290
+ try { fs.unlinkSync(PRE_SUPERVISED_MARKER); } catch (_) {}
2291
+ }
2292
+
2275
2293
  const PROCESSED_MAX = 10000;
2276
2294
  const processed = new Map();
2277
2295
  function markProcessed(key) {
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1325",
3
+ "version": "2.0.1326",
4
4
  "description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1325",
3
+ "version": "2.0.1326",
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",
@@ -14,7 +14,9 @@ allowed-tools: Skill, Read, Write, Bash(node *), Bash(bun *)
14
14
 
15
15
  This is the only thing that makes the discipline work. Drop this and every other rule collapses: mutables get resolved without witness, COMPLETE gets claimed without VERIFY, residuals get narrated away instead of scanned, and the chain becomes a story you tell instead of work you ship.
16
16
 
17
- Every turn: dispatch `instruction` (you are the one dispatching it), read the response body, follow the imperative prose, dispatch the next verb the prose names. Re-dispatch `instruction` whenever you drift, stall, get denied at a gate, or feel uncertain about the next move — it is the cheap synchronous recovery primitive that puts you back on the chain. There is no cost to over-dispatching it and unbounded cost to acting without it. A session that stops dispatching instruction has stopped walking the chain. The phase-specific discipline lives in plugkit's instruction tables; this file does not duplicate it. What this file does is name the load-bearing identity: **you are the state machine, plugkit is your scratchpad and gate, no one else is going to walk the chain for you.**
17
+ Every turn: dispatch `instruction` (you are the one dispatching it), read the response body, follow the imperative prose, dispatch the next verb the prose names. Re-dispatch `instruction` whenever you drift, stall, get denied at a gate, or feel uncertain about the next move — it is the cheap synchronous recovery primitive that puts you back on the chain. While the chain is in-flight (phase ≠ COMPLETE OR prd_pending_count > 0) there is no cost to over-dispatching it and unbounded cost to acting without it. A session that stops dispatching instruction mid-chain has stopped walking the chain. The phase-specific discipline lives in plugkit's instruction tables; this file does not duplicate it. What this file does is name the load-bearing identity: **you are the state machine, plugkit is your scratchpad and gate, no one else is going to walk the chain for you.**
18
+
19
+ **Once `phase=COMPLETE` AND `prd_pending_count=0`, the chain is closed and you stop dispatching.** Polling `instruction` on a terminal chain returns the same UPDATE-DOCS prose every time and produces `turn.end dispatches:1 verbs:{instruction:1}` events in gmsniff that mark the agent as polling rather than walking. The user reactivates the chain by sending a new prompt; that prompt resets phase to PLAN on the next instruction dispatch carrying a fresh `{"prompt": "..."}` body.
18
20
 
19
21
  **Boot before dispatching. Always check first.** Writing to `.gm/exec-spool/in/instruction/N.txt` while the watcher is dead is the canonical cold-start failure — the request sits forever, you read no response, you fabricate the chain from memory of the prose. The spool directory's existence does NOT mean the watcher is alive; `.status.json` mtime within the last 15s does. The leftover `.status.json` from yesterday's dead watcher is the most common trap.
20
22