gm-qwen 2.0.801 → 2.0.803
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
|
+
4a4201ed31f9338e23b81e78f9da97f8eaa568ac1fe88329f258680d95f102cf plugkit-win32-x64.exe
|
|
2
|
+
10dbe0668558e1a0b98c40f6649f317d97d3b99a180d180b65337d299a519b98 plugkit-win32-arm64.exe
|
|
3
|
+
7919aa48a1b35a57ffb989ddc90a727e1f5ae94dc10db8f402cbf7d4eb5e3bf7 plugkit-darwin-x64
|
|
4
|
+
fd3db4ada0edf9896049cf7abf4f810aa83255ec24916a390d487940b7bedfea plugkit-darwin-arm64
|
|
5
|
+
fac22aac7d0465aa7fd7bfb3902d895637882cc5f688fbdb167a57dc78582ec0 plugkit-linux-x64
|
|
6
|
+
6e0d405b7c9e0a127351f27fd36ca8215022b23bc88a1d50e6575e2547eadda6 plugkit-linux-arm64
|
package/bin/plugkit.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.261
|
package/bin/rtk.sha256
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
1fb115244b456a937fcd0b7888766c6ddeb27b073321faf620612a75d29dcba0 rtk-win32-x64.exe
|
|
2
|
+
b9666cd5aba12f71e1aea4994dd139d75f6e4b2068630bdfcda097c211592171 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.803",
|
|
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.261"
|
|
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.
|