gm-skill 2.0.1603 → 2.0.1605
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 +1 -1
- package/gm-plugkit/package.json +1 -1
- package/gm-plugkit/plugkit-wasm-wrapper.js +21 -1
- package/gm-plugkit/plugkit.version +1 -1
- package/gm.json +1 -1
- package/lib/spool-dispatch.js +13 -10
- package/package.json +1 -1
- package/skills/gm-skill/index.js +0 -10
package/AGENTS.md
CHANGED
|
@@ -52,7 +52,7 @@ Record only non-obvious technical caveats that cost multiple runs to discover; r
|
|
|
52
52
|
|
|
53
53
|
**Detail-heavy caveats live in rs-learn (`.gm/rs-learn.db`), not here.** Per-crate runtime quirks, Windows process-spawn mechanics, hook details, ocw/site/workflow specifics, and similar fact-base material are exfiltrated to rs-learn (`exec:recall`); AGENTS.md keeps only top-level rules governing gm-the-repo. In doubt: cross-cutting policy stays here, single-crate/single-platform mechanism goes to rs-learn.
|
|
54
54
|
|
|
55
|
-
**Every memorize run also drains AGENTS.md -- migration is bidirectional, deflation is the back-pressure.** AGENTS.md bloats past the budget it protects if flow is only inward, so every session firing `memorize-fire` for new facts ALSO exfiltrates a few existing detail-heavy/single-crate/single-platform entries: fire the substance to the default namespace, then delete or compress the paragraph to a one-line pointer in the same commit. Witnessed by the store gaining the fact AND the byte-count dropping. A few entries per run, never a wholesale rewrite; top-level rules stay, everything recall-reachable drains.
|
|
55
|
+
**Every memorize run also drains AGENTS.md -- migration is bidirectional, deflation is the back-pressure.** AGENTS.md bloats past the budget it protects if flow is only inward, so every session firing `memorize-fire` for new facts ALSO exfiltrates a few existing detail-heavy/single-crate/single-platform entries: fire the substance to the default namespace, then delete or compress the paragraph to a one-line pointer in the same commit. Witnessed by the store gaining the fact AND the byte-count dropping. A few entries per run, never a wholesale rewrite; top-level rules stay, everything recall-reachable drains. `test.js checkAgentsMdBudget()` is the structural byte-ceiling backstop so the drain cannot silently lapse (`recall: AGENTS.md byte-ceiling guard looper bloat`).
|
|
56
56
|
|
|
57
57
|
## Coding Style
|
|
58
58
|
|
package/gm-plugkit/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-plugkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1605",
|
|
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": {
|
|
@@ -308,6 +308,18 @@ function capInstructionPacks(parsed) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
+
function injectUpdateWarning(parsed) {
|
|
312
|
+
if (!parsed || typeof parsed !== 'object') return;
|
|
313
|
+
let upd;
|
|
314
|
+
try {
|
|
315
|
+
upd = JSON.parse(fs.readFileSync(path.join(spoolDir, '.update-available.json'), 'utf-8'));
|
|
316
|
+
} catch (_) { return; }
|
|
317
|
+
if (!upd || !upd.installed || !upd.latest || upd.installed === upd.latest) return;
|
|
318
|
+
const target = (parsed.data && typeof parsed.data === 'object') ? parsed.data : parsed;
|
|
319
|
+
target.update_available = { installed: upd.installed, latest: upd.latest, update_url: upd.update_url || null };
|
|
320
|
+
target.update_warning = `STALE RUNTIME: running plugkit ${upd.installed} but ${upd.latest} is published and not yet running. Restart onto the new version now: bun x gm-plugkit@latest --kill-stale-watchers; bun x gm-plugkit@latest spool. This warning repeats every turn until the running version catches up.`;
|
|
321
|
+
}
|
|
322
|
+
|
|
311
323
|
function mergeAutoRecallIntoInstructionResponse(resultStr, autoRecall) {
|
|
312
324
|
if (!autoRecall) return resultStr;
|
|
313
325
|
let parsed;
|
|
@@ -3089,11 +3101,19 @@ async function runSpoolWatcher(instance, spoolDir) {
|
|
|
3089
3101
|
|
|
3090
3102
|
if (autoRecallPayload) {
|
|
3091
3103
|
resultStr = mergeAutoRecallIntoInstructionResponse(resultStr, autoRecallPayload);
|
|
3092
|
-
|
|
3104
|
+
try {
|
|
3105
|
+
const parsed = JSON.parse(resultStr);
|
|
3106
|
+
if (parsed && typeof parsed === 'object') {
|
|
3107
|
+
injectUpdateWarning(parsed);
|
|
3108
|
+
resultStr = JSON.stringify(parsed);
|
|
3109
|
+
}
|
|
3110
|
+
} catch (_) {}
|
|
3111
|
+
} else if (verb === 'instruction' || verb === 'transition' || verb === 'phase-status') {
|
|
3093
3112
|
try {
|
|
3094
3113
|
const parsed = JSON.parse(resultStr);
|
|
3095
3114
|
if (parsed && typeof parsed === 'object') {
|
|
3096
3115
|
capInstructionPacks(parsed);
|
|
3116
|
+
injectUpdateWarning(parsed);
|
|
3097
3117
|
resultStr = JSON.stringify(parsed);
|
|
3098
3118
|
}
|
|
3099
3119
|
} catch (_) {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.682
|
package/gm.json
CHANGED
package/lib/spool-dispatch.js
CHANGED
|
@@ -59,14 +59,15 @@ function hasUnpushedCommits(cwd) {
|
|
|
59
59
|
|
|
60
60
|
const TOPLEVEL_DOC_ALLOWLIST = new Set(['AGENTS.md', 'CLAUDE.md', 'README.md', 'SKILLS.md', 'CHANGELOG.md', 'LICENSE', 'LICENSE.md']);
|
|
61
61
|
|
|
62
|
-
const
|
|
62
|
+
const BROWSER_FILE_ALWAYS_RE = /\.(html?|tsx|jsx|vue|svelte)$/i;
|
|
63
|
+
const BROWSER_FILE_DIRGATED_RE = /\.(mjs|cjs|js|ts|css|scss|sass)$/i;
|
|
63
64
|
const BROWSER_FILE_DIR_RE = /^(src|public|site|app|pages|components|client|web)[\\/]/i;
|
|
64
65
|
|
|
65
66
|
function isBrowserRunningFile(rel) {
|
|
66
67
|
if (!rel) return false;
|
|
67
68
|
const norm = String(rel).replace(/\\/g, '/');
|
|
68
|
-
if (
|
|
69
|
-
if (
|
|
69
|
+
if (BROWSER_FILE_ALWAYS_RE.test(norm)) return true;
|
|
70
|
+
if (BROWSER_FILE_DIRGATED_RE.test(norm) && BROWSER_FILE_DIR_RE.test(norm)) return true;
|
|
70
71
|
return false;
|
|
71
72
|
}
|
|
72
73
|
|
|
@@ -160,11 +161,9 @@ function unsolicitedDocs(cwd) {
|
|
|
160
161
|
const rel = line.slice(3).trim();
|
|
161
162
|
if (!rel) continue;
|
|
162
163
|
if (!/\.(md|txt)$/i.test(rel)) continue;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
if (TOPLEVEL_DOC_ALLOWLIST.has(rel)) continue;
|
|
167
|
-
}
|
|
164
|
+
const base = rel.includes('/') ? rel.slice(rel.lastIndexOf('/') + 1) : rel;
|
|
165
|
+
if (TOPLEVEL_DOC_ALLOWLIST.has(base)) continue;
|
|
166
|
+
if (rel.startsWith('node_modules/') || rel.startsWith('target/') || rel.startsWith('.gm/') || rel.startsWith('dist/') || rel.startsWith('build/')) continue;
|
|
168
167
|
flagged.push(rel);
|
|
169
168
|
}
|
|
170
169
|
return { count: flagged.length, files: flagged, available: true };
|
|
@@ -340,11 +339,15 @@ function checkDispatchGates(sessionId, operation, extra) {
|
|
|
340
339
|
}
|
|
341
340
|
}
|
|
342
341
|
const dirty = isWorktreeDirty(cwd);
|
|
343
|
-
if (dirty.available
|
|
342
|
+
if (!dirty.available) {
|
|
343
|
+
residuals.push('worktree git state UNKNOWN (git status failed or timed out) -- cannot confirm a clean tree; re-run git status and commit/push any residual before declaring done');
|
|
344
|
+
} else if (dirty.dirty) {
|
|
344
345
|
residuals.push(`worktree dirty (${dirty.files.length} file${dirty.files.length === 1 ? '' : 's'}) -- commit and push before declaring done`);
|
|
345
346
|
}
|
|
346
347
|
const unpushed = hasUnpushedCommits(cwd);
|
|
347
|
-
if (unpushed.available
|
|
348
|
+
if (!unpushed.available) {
|
|
349
|
+
residuals.push('unpushed-commit state UNKNOWN (git log @{u}..HEAD failed or timed out) -- cannot confirm origin reflects HEAD; verify and push before declaring done');
|
|
350
|
+
} else if (unpushed.unpushed) {
|
|
348
351
|
residuals.push(`${unpushed.count} unpushed commit${unpushed.count === 1 ? '' : 's'} -- push to remote before declaring done`);
|
|
349
352
|
}
|
|
350
353
|
const docs = unsolicitedDocs(cwd);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1605",
|
|
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",
|
package/skills/gm-skill/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const SKILL_MD_PATH = path.join(__dirname, 'SKILL.md');
|
|
5
|
-
|
|
6
|
-
function loadCanonicalSkill() {
|
|
7
|
-
return fs.readFileSync(SKILL_MD_PATH, 'utf-8');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
module.exports = { loadCanonicalSkill, SKILL_MD_PATH };
|