gm-skill 2.0.2563 → 2.0.2565

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/AGENTS.md CHANGED
@@ -47,9 +47,9 @@ Wasm host-import link-module rule (`#[link(wasm_import_module="env")]` on every
47
47
  Dispatch = Write `.gm/exec-spool/in/<verb>/<N>.txt`, Read `.gm/exec-spool/out/<verb>-<N>.json` (nested) or `out/<N>.json` (root). `<N>` is session-id-prefixed (`<session_id>-<local-counter>`), never a bare small integer -- the shared daemon claims and answers in-files by the literal `(verb, N)` pair with no per-session partition, so unprefixed sequential ids collide across concurrent sessions on the same project (recall: `gm spool dispatch id collision cross-session crosstalk`). Wasm orchestrator services every verb; harness never executes side effects directly.
48
48
 
49
49
  - **Orchestrator verbs**: `instruction`, `transition`, `phase-status`, `mutable-resolve`, `mutable-add`, `mutable-list`, `memorize-fire`, `memorize-continue`, `discipline-note`, `residual-scan`, `auto-recall`, `prd-add`, `prd-resolve`, `prd-list`, `task-spawn`, `task-list`, `task-stop`, `task-output`, `fsm-vendor`, `fsm-validate`, `claim-audit`, `submodule-check`.
50
- - **Wasm-direct verbs**: fs/kv/exec/fetch/env, recall, codesearch, memorize(+prune), health, filter, full git verb family. Enumeration in the recall store (`recall: wasm-direct plugkit verbs full list`).
50
+ - **Wasm-direct verbs**: fs/kv/exec/fetch/env, recall, codesearch, memorize, memorize-prune, memorize-vacuum, memorize-retention, health, filter, full git verb family. Enumeration in the recall store (`recall: wasm-direct plugkit verbs full list`).
51
51
  - **Host-native verb**: `background-convert` (`{verb, task}`) detaches an already-in-flight dispatch so the daemon worker stops waiting on it -- agent-initiated only, never routed to gm.wasm. Detail: `.gm/daemon-config-reference.md`.
52
- - **memorize-prune**: prune bad/superseded memories; two-mode spec (key-remove vs query-review) in the recall store (`recall: memorize-prune verb two-mode spec`).
52
+ - **memorize-prune**: prune bad/superseded memories; two-mode spec (key-remove vs query-review) in the recall store (`recall: memorize-prune verb two-mode spec`). **memorize-vacuum**/**memorize-retention**: compaction and retention-policy enforcement over the same memory store; both also accept underscore-form aliases (`memorize_vacuum`/`memorize_retention`), matching every `memorize-*` verb's hyphen/underscore dual registration.
53
53
  - **git verbs**: git is a first-class spool surface, never a shell command; `git_finalize {message}` is the bundled COMPLETE-phase push surface, `git_push` the only admissible raw push (porcelain-gated, rebase-retry). A git-dominant `bash`/`powershell` body is gated (`deviation.bash-git-bypass`). Per-verb shapes + host_git `.exe` resolution in the recall store (`recall: git verbs rs-plugkit spool surface`). `git_finalize` also runs `ci-status` inline right after push and auto-writes `.gm/exec-spool/.ci-validated` on a green result -- no separate poll-then-marker dispatch needed. The `ci-validated-fresh` COMPLETE gate compares that marker's `head_sha` against current HEAD and names `ci-status` as its `next_dispatch` on denial. An async git host (one that answers host_git with `{pending,token}` and parks the terminal result in kv ns `outbox`) is served by the `git_poll {token}` verb: `git_status`/`git_add`/`git_commit`/`git_log`/`git_diff` return pending envelopes there, and the caller repeats `git_poll` until a non-pending envelope comes back -- that envelope is the verb's terminal result, plan-resumed across dispatches for compound verbs.
54
54
  - **filter**: pure stdout -> compact-stdout transform, in-wasm. Spec + usage (pipe raw command output through it before context) in the recall store (`recall: filter verb rs-plugkit spool spec`).
55
55
 
package/bin/bootstrap.js CHANGED
@@ -25,6 +25,7 @@ const {
25
25
  const {
26
26
  readVersionFile,
27
27
  readShaManifest,
28
+ failClosedMissingSha,
28
29
  resolveCacheWasmPath,
29
30
  extractNpmPackageWithRetry: extractNpmPackageWithRetryCore,
30
31
  writeBootstrapError,
@@ -215,7 +216,8 @@ async function bootstrap(opts) {
215
216
  throw extractErr;
216
217
  }
217
218
 
218
- if (wasmExpectedSha) {
219
+ if (!wasmExpectedSha) throw failClosedMissingSha(version, wasmName, wasmPartialPath);
220
+ {
219
221
  const got = await require('../gm-plugkit/gm-process').sha256OfFile(wasmPartialPath);
220
222
  if (got !== wasmExpectedSha) {
221
223
  try { fs.unlinkSync(wasmPartialPath); } catch (_) {}
@@ -228,8 +230,6 @@ async function bootstrap(opts) {
228
230
  throw new Error(`sha256 mismatch for ${wasmName}: expected ${wasmExpectedSha}, got ${got}`);
229
231
  }
230
232
  log('sha256 verified');
231
- } else {
232
- log('no sha256 manifest -- skipping verify');
233
233
  }
234
234
 
235
235
  try { fs.renameSync(wasmPartialPath, wasmFinalPath); }
@@ -52,6 +52,18 @@ function clearBootstrapError() {
52
52
  } catch (_) {}
53
53
  }
54
54
 
55
+ function failClosedMissingSha(version, artifactName, partialPath) {
56
+ try { fs.unlinkSync(partialPath); } catch (_) {}
57
+ const message = `no sha256 manifest entry for ${artifactName}: refusing to trust unverified download`;
58
+ writeBootstrapError({
59
+ expected_version: version,
60
+ cached_version: null,
61
+ error_phase: 'sha256-manifest-missing',
62
+ error_message: message,
63
+ });
64
+ return new Error(message);
65
+ }
66
+
55
67
  function readVersionFile(wrapperDir) {
56
68
  const p = path.join(wrapperDir, 'plugkit.version');
57
69
  if (!fs.existsSync(p)) throw new Error(`plugkit.version not found at ${p}`);
@@ -226,6 +238,7 @@ module.exports = {
226
238
  resolveProjectRoot,
227
239
  writeBootstrapError,
228
240
  clearBootstrapError,
241
+ failClosedMissingSha,
229
242
  readVersionFile,
230
243
  readShaManifest,
231
244
  copyWasmToGmTools,
@@ -31,6 +31,7 @@ const {
31
31
  writeBootstrapError,
32
32
  clearBootstrapError,
33
33
  resolveInstalledWasmPath,
34
+ failClosedMissingSha,
34
35
  } = core;
35
36
 
36
37
  const LOCK_STALE_MS = 30 * 60 * 1000;
@@ -416,7 +417,8 @@ async function bootstrap(opts) {
416
417
  }
417
418
  }
418
419
 
419
- if (expectedSha) {
420
+ if (!expectedSha) throw failClosedMissingSha(version, wasmName, partialPath);
421
+ {
420
422
  const got = await sha256OfFile(partialPath);
421
423
  if (got !== expectedSha) {
422
424
  try { fs.unlinkSync(partialPath); } catch (_) {}
@@ -428,8 +430,6 @@ async function bootstrap(opts) {
428
430
  throw new Error(`sha256 mismatch for ${wasmName}: expected ${expectedSha}, got ${got}`);
429
431
  }
430
432
  log('sha256 verified');
431
- } else {
432
- log('no sha256 manifest -- skipping verify');
433
433
  }
434
434
 
435
435
  try { fs.renameSync(partialPath, finalPath); }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.2563",
3
+ "version": "2.0.2565",
4
4
  "description": "Bootstrap and daemon-spawn tool for gm plugkit binary. Downloads the correct platform wasm, verifies SHA256, and launches agentplug-runner (the native wasm host) as the spool watcher daemon.",
5
5
  "main": "index.js",
6
6
  "bin": {
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.2563",
3
+ "version": "2.0.2565",
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.2563",
3
+ "version": "2.0.2565",
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",