gm-qwen 2.0.800 → 2.0.802
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/bin/bootstrap.js +22 -1
- package/bin/plugkit.js +5 -1
- package/bin/plugkit.sha256 +6 -6
- package/bin/plugkit.version +1 -1
- package/bin/rtk.sha256 +2 -2
- package/gm.json +2 -2
- package/package.json +1 -1
- package/skills/gm/SKILL.md +8 -0
package/bin/bootstrap.js
CHANGED
|
@@ -17,6 +17,27 @@ const LOCK_STALE_MS = 5 * 60 * 1000;
|
|
|
17
17
|
|
|
18
18
|
function log(msg) {
|
|
19
19
|
try { process.stderr.write(`[plugkit-bootstrap] ${msg}\n`); } catch (_) {}
|
|
20
|
+
try { obsEvent('bootstrap', 'log', { msg }); } catch (_) {}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function obsEvent(subsystem, event, fields) {
|
|
24
|
+
if (process.env.GM_LOG_DISABLE) return;
|
|
25
|
+
try {
|
|
26
|
+
const root = process.env.GM_LOG_DIR
|
|
27
|
+
|| path.join(os.homedir(), '.claude', 'gm-log');
|
|
28
|
+
const day = new Date().toISOString().slice(0, 10);
|
|
29
|
+
const dir = path.join(root, day);
|
|
30
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
31
|
+
const line = JSON.stringify({
|
|
32
|
+
ts: new Date().toISOString(),
|
|
33
|
+
sub: subsystem,
|
|
34
|
+
event,
|
|
35
|
+
pid: process.pid,
|
|
36
|
+
sess: process.env.CLAUDE_SESSION_ID || process.env.GM_SESSION_ID || '',
|
|
37
|
+
...fields,
|
|
38
|
+
});
|
|
39
|
+
fs.appendFileSync(path.join(dir, `${subsystem}.jsonl`), line + '\n');
|
|
40
|
+
} catch (_) {}
|
|
20
41
|
}
|
|
21
42
|
|
|
22
43
|
function platformKey() {
|
|
@@ -352,7 +373,7 @@ function resolveCachedBinary(opts) {
|
|
|
352
373
|
return null;
|
|
353
374
|
}
|
|
354
375
|
|
|
355
|
-
module.exports = { bootstrap, resolveCachedBinary, resolveCachedRtk, platformKey, binaryName, rtkBinaryName, cacheRoot };
|
|
376
|
+
module.exports = { bootstrap, resolveCachedBinary, resolveCachedRtk, platformKey, binaryName, rtkBinaryName, cacheRoot, obsEvent };
|
|
356
377
|
|
|
357
378
|
if (require.main === module) {
|
|
358
379
|
bootstrap({ silent: false })
|
package/bin/plugkit.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const { spawn, spawnSync } = require('child_process');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const fs = require('fs');
|
|
6
|
-
const { bootstrap, resolveCachedBinary, resolveCachedRtk } = require('./bootstrap');
|
|
6
|
+
const { bootstrap, resolveCachedBinary, resolveCachedRtk, obsEvent } = require('./bootstrap');
|
|
7
7
|
|
|
8
8
|
const dir = __dirname;
|
|
9
9
|
|
|
@@ -24,11 +24,14 @@ async function resolveBinary() {
|
|
|
24
24
|
async function main() {
|
|
25
25
|
const args = process.argv.slice(2);
|
|
26
26
|
const isHook = args[0] === 'hook';
|
|
27
|
+
const startedAt = Date.now();
|
|
28
|
+
obsEvent('plugkit_wrapper', 'invoke', { argv: args.slice(0, 4), is_hook: isHook });
|
|
27
29
|
let bin;
|
|
28
30
|
try {
|
|
29
31
|
bin = await resolveBinary();
|
|
30
32
|
} catch (err) {
|
|
31
33
|
process.stderr.write(`[plugkit] bootstrap failed: ${err.message}\n`);
|
|
34
|
+
obsEvent('plugkit_wrapper', 'bootstrap_failed', { err: err.message });
|
|
32
35
|
const legacy = legacyFallback();
|
|
33
36
|
if (legacy) { bin = legacy; }
|
|
34
37
|
else if (isHook) { process.exit(0); }
|
|
@@ -49,6 +52,7 @@ async function main() {
|
|
|
49
52
|
process.stdin.on('error', () => process.exit(1));
|
|
50
53
|
} else {
|
|
51
54
|
const result = spawnSync(bin, args, { stdio: 'inherit', windowsHide: true, env });
|
|
55
|
+
obsEvent('plugkit_wrapper', 'exit', { dur_ms: Date.now() - startedAt, code: result.status ?? -1 });
|
|
52
56
|
process.exit(result.status ?? 1);
|
|
53
57
|
}
|
|
54
58
|
}
|
package/bin/plugkit.sha256
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
6d21821f6509bdbafbfd5864b4b9e110bffd8ee3cb3c9ab5f74469dcd299574f plugkit-win32-x64.exe
|
|
2
|
+
c1b6fe884fa50fb1adaebf826e70a2dd7ba47d6d82e7324d0b0bbf2855b3e831 plugkit-win32-arm64.exe
|
|
3
|
+
4795c9893ead08ab5ef722e9c23d8a677982a064e4ec533c6227ebc009d2b793 plugkit-darwin-x64
|
|
4
|
+
e4661868e46c7999c118b852d818d7a6742c84a416768a7eb74f2e6000c4c58c plugkit-darwin-arm64
|
|
5
|
+
48d2348129fb6ab5b4b36687a408315efdec09fad95c0da665aedec2087d0ad5 plugkit-linux-x64
|
|
6
|
+
32b89d2e249548561205e17c3f2dc328aac048a3f77375de058050b392b88ac5 plugkit-linux-arm64
|
package/bin/plugkit.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.260
|
package/bin/rtk.sha256
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
5baf1d840217fc4b875d90456d6bd41c1acfd5420c6b96259dc602c0365e5ef4 rtk-win32-x64.exe
|
|
2
|
+
1b5d832cfceea810068a79ad4abe23b9f122d81b0c55792cbd8c82dfc969e204 rtk-win32-arm64.exe
|
|
3
3
|
e89fdf402c28796b510587a8b0fe046438b5b24d49533d1a2339a48aecae35e9 rtk-darwin-x64
|
|
4
4
|
2b203fd380f5782b5489eb016e34e3dbf848272a7fadf36b39bce6cfd9a3005c rtk-darwin-arm64
|
|
5
5
|
0da9950b859c7a2693aaf6c169f05f9b8965508ba1f23f1547e63d5fa988749e rtk-linux-x64
|
package/gm.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.802",
|
|
4
4
|
"description": "State machine agent with hooks, skills, and automated git enforcement",
|
|
5
5
|
"author": "AnEntrypoint",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
|
-
"plugkitVersion": "0.1.
|
|
26
|
+
"plugkitVersion": "0.1.260"
|
|
27
27
|
}
|
package/package.json
CHANGED
package/skills/gm/SKILL.md
CHANGED
|
@@ -93,6 +93,14 @@ Pure-prose edits to static documents with no JS/canvas/DOM behavior change are e
|
|
|
93
93
|
|
|
94
94
|
This rule fires in EXECUTE (witness on edit), EMIT (post-emit verify), and VERIFY (final gate). All three.
|
|
95
95
|
|
|
96
|
+
## OBSERVABILITY — HARD RULE
|
|
97
|
+
|
|
98
|
+
Every program is observed by default. plugkit, rs-exec, rs-plugkit, rs-learn, rs-search, and rs-codeinsight emit structured JSONL events to `~/.claude/gm-log/<YYYY-MM-DD>/<subsystem>.jsonl` for every hook fired, every exec spawn, every recall, every run_self call. The agent inspects this stream when diagnosing — `plugkit log tail`, `plugkit log grep <terms>`, `plugkit log stats`, `plugkit log path`. Asking "why did X happen" without first checking the log is forced closure.
|
|
99
|
+
|
|
100
|
+
The same discipline applies to code the agent writes. State transitions, error paths, external IO (network, disk, subprocess, queue), and timing of operations longer than a heartbeat are events the future debugger will need. Find the project's existing observability surface before inventing one (codesearch first); if a surface exists, extend it rather than starting a parallel one. If the project has none, the smallest correct shim is a single function or macro that emits one JSONL line per event to a file under `.gm/log/` (mirror what plugkit does — same shape, same fields). Never `console.log` / `println!` scatter across files; that fragments the surface and dies on the first compaction or rotation. The events are the program's own self-narration, not a debugging afterthought.
|
|
101
|
+
|
|
102
|
+
What to emit, not how often: every state transition once; every error path once at the boundary it crosses; every external IO with timing; every nontrivial decision (allow/deny, route picked, branch taken on user-derived input). Do not emit per-iteration loop bodies, per-character parser steps, or anything whose volume would obscure the load-bearing events. The signal-to-noise judgment is the agent's; the cost of getting it wrong is paid by future-you reading the file.
|
|
103
|
+
|
|
96
104
|
## NOTHING FAKE — HARD RULE
|
|
97
105
|
|
|
98
106
|
What ships runs against real services, real data, real binaries. Stubs, mocks, placeholder returns, fixture-only paths, "TODO: implement", `return null /* fake */`, hardcoded sample responses, and demo-mode fallbacks are forbidden in source the user will run. They produce green checks that survive into production and lie about what works.
|