gm-skill 2.0.1211 → 2.0.1213
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/README.md +1 -1
- package/bin/plugkit.version +1 -1
- package/bin/plugkit.wasm +0 -0
- package/bin/plugkit.wasm.sha256 +1 -1
- package/gm-plugkit/plugkit-wasm-wrapper.js +32 -10
- package/gm.json +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ An earlier generation fanned out fifteen per-platform downstream repos (gm-cc, g
|
|
|
35
35
|
|
|
36
36
|
## Version
|
|
37
37
|
|
|
38
|
-
`2.0.
|
|
38
|
+
`2.0.1213` — auto-bumped from the canonical `gm` repo. Every push to `AnEntrypoint/gm` (or any cascading sibling crate) republishes this package.
|
|
39
39
|
|
|
40
40
|
## Source of truth
|
|
41
41
|
|
package/bin/plugkit.version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.445
|
package/bin/plugkit.wasm
CHANGED
|
Binary file
|
package/bin/plugkit.wasm.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3aaedc3ca029166dde57cb6de3d729583746105b28c9cfe6cc2768a9b5aabe72 plugkit.wasm
|
|
@@ -161,7 +161,12 @@ function emitOrchestratorEvents(verb, taskBase, resultStr) {
|
|
|
161
161
|
break;
|
|
162
162
|
case 'residual-scan':
|
|
163
163
|
if (data.scan === 'fired') logEvent('plugkit', 'residual.fired', { task: taskBase, marker: data.marker });
|
|
164
|
-
else
|
|
164
|
+
else {
|
|
165
|
+
logEvent('plugkit', 'residual.skipped', { task: taskBase, reason: data.reason });
|
|
166
|
+
if (data.deviation_kind === 'residual-premature') {
|
|
167
|
+
logEvent('hook', 'deviation.residual-premature', { task: taskBase, reason: data.reason });
|
|
168
|
+
}
|
|
169
|
+
}
|
|
165
170
|
break;
|
|
166
171
|
case 'auto-recall':
|
|
167
172
|
logEvent('plugkit', 'auto_recall.hits', { task: taskBase, count: Array.isArray(data.hits) ? data.hits.length : 0 });
|
|
@@ -319,6 +324,17 @@ function runPlaywriter(pw, args, timeoutMs) {
|
|
|
319
324
|
});
|
|
320
325
|
}
|
|
321
326
|
|
|
327
|
+
function scrubBrowserRunnerText(s) {
|
|
328
|
+
if (!s || typeof s !== 'string') return s;
|
|
329
|
+
let t = s;
|
|
330
|
+
t = t.replace(/playwriter/gi, 'managed browser session');
|
|
331
|
+
t = t.replace(/Click the[^.\n]*?extension[^.\n]*?icon[^.\n]*?\.?/gi, '');
|
|
332
|
+
t = t.replace(/(connected\s+)?browser\s+extension(\s+is)?\s+not\s+connected\b[^.\n]*\.?/gi, '');
|
|
333
|
+
t = t.replace(/no\s+connected\s+browsers?\b[^.\n]*\.?/gi, '');
|
|
334
|
+
t = t.replace(/Install via:[^\n]*managed browser session[^\n]*/gi, '');
|
|
335
|
+
return t;
|
|
336
|
+
}
|
|
337
|
+
|
|
322
338
|
function getOrCreateBrowserSession(cwd, claudeSessionId, pw) {
|
|
323
339
|
migrateLegacyBrowserState(cwd);
|
|
324
340
|
const portsFile = browserPortsFile(cwd);
|
|
@@ -352,7 +368,7 @@ function getOrCreateBrowserSession(cwd, claudeSessionId, pw) {
|
|
|
352
368
|
}
|
|
353
369
|
if (!alive) throw new Error(`Chrome failed to open debug port ${port}`);
|
|
354
370
|
const newR = runPlaywriter(pw, ['session', 'new', `--direct=localhost:${port}`], 30000);
|
|
355
|
-
if (newR.status !== 0) throw new Error(`
|
|
371
|
+
if (newR.status !== 0) throw new Error(`managed browser session start failed: ${scrubBrowserRunnerText(newR.stderr || newR.stdout || 'unknown')}`);
|
|
356
372
|
const stripAnsi = (s) => s.replace(/\x1b\[[0-9;]*m/g, '');
|
|
357
373
|
const out = stripAnsi(newR.stdout || '').trim();
|
|
358
374
|
let pwSessionId = null;
|
|
@@ -365,7 +381,7 @@ function getOrCreateBrowserSession(cwd, claudeSessionId, pw) {
|
|
|
365
381
|
if (!pwSessionId) {
|
|
366
382
|
try { const j = JSON.parse(out); pwSessionId = j.id || j.session_id || j.session; } catch (_) {}
|
|
367
383
|
}
|
|
368
|
-
if (!pwSessionId) throw new Error(`could not parse
|
|
384
|
+
if (!pwSessionId) throw new Error(`could not parse managed browser session id from: ${scrubBrowserRunnerText(out)}`);
|
|
369
385
|
ports[claudeSessionId] = { port, profileDir, pid: chromePid };
|
|
370
386
|
sessions[claudeSessionId] = [pwSessionId];
|
|
371
387
|
writeJsonFile(portsFile, ports);
|
|
@@ -952,14 +968,19 @@ function makeHostFunctions(instanceRef) {
|
|
|
952
968
|
const cwd = readWasmStr(instanceRef.value, cwdPtr, cwdLen) || process.cwd();
|
|
953
969
|
const sessionId = readWasmStr(instanceRef.value, sidPtr, sidLen) || 'default';
|
|
954
970
|
const pw = findPlaywriter();
|
|
955
|
-
if (!pw) return writeWasmJson(instanceRef.value, { ok: false, error: '
|
|
971
|
+
if (!pw) return writeWasmJson(instanceRef.value, { ok: false, error: 'managed browser session runner not available' });
|
|
956
972
|
if (body.startsWith('session ')) {
|
|
957
973
|
const parts = body.slice(8).trim().split(/\s+/);
|
|
958
|
-
const
|
|
974
|
+
const ports = readJsonFile(browserPortsFile(cwd), {});
|
|
975
|
+
const existing = ports[sessionId];
|
|
976
|
+
const directArgs = (existing && existing.port && isPortAliveSync(existing.port))
|
|
977
|
+
? [`--direct=localhost:${existing.port}`]
|
|
978
|
+
: [];
|
|
979
|
+
const r = runPlaywriter(pw, ['session', ...parts, ...directArgs], 30000);
|
|
959
980
|
return writeWasmJson(instanceRef.value, {
|
|
960
981
|
ok: r.status === 0,
|
|
961
|
-
stdout: r.stdout || '',
|
|
962
|
-
stderr: r.stderr || '',
|
|
982
|
+
stdout: scrubBrowserRunnerText(r.stdout || ''),
|
|
983
|
+
stderr: scrubBrowserRunnerText(r.stderr || ''),
|
|
963
984
|
exit_code: r.status === null ? -1 : r.status,
|
|
964
985
|
});
|
|
965
986
|
}
|
|
@@ -967,13 +988,13 @@ function makeHostFunctions(instanceRef) {
|
|
|
967
988
|
const r = runPlaywriter(pw, ['-s', pwSessionId, '--timeout', '14000', '-e', body], 60000);
|
|
968
989
|
return writeWasmJson(instanceRef.value, {
|
|
969
990
|
ok: r.status === 0,
|
|
970
|
-
stdout: r.stdout || '',
|
|
971
|
-
stderr: r.stderr || '',
|
|
991
|
+
stdout: scrubBrowserRunnerText(r.stdout || ''),
|
|
992
|
+
stderr: scrubBrowserRunnerText(r.stderr || ''),
|
|
972
993
|
exit_code: r.status === null ? -1 : r.status,
|
|
973
994
|
session_id: pwSessionId,
|
|
974
995
|
});
|
|
975
996
|
} catch (e) {
|
|
976
|
-
return writeWasmJson(instanceRef.value, { ok: false, error: e.message });
|
|
997
|
+
return writeWasmJson(instanceRef.value, { ok: false, error: scrubBrowserRunnerText(e.message) });
|
|
977
998
|
}
|
|
978
999
|
},
|
|
979
1000
|
|
|
@@ -1778,6 +1799,7 @@ async function tryInstantiate(wasmPath) {
|
|
|
1778
1799
|
|
|
1779
1800
|
if (args[0] === 'spool') {
|
|
1780
1801
|
const projectDir = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
1802
|
+
ensureSpoolPollGate(projectDir);
|
|
1781
1803
|
const spoolDir = path.join(projectDir, '.gm', 'exec-spool');
|
|
1782
1804
|
await runSpoolWatcher(instance, spoolDir);
|
|
1783
1805
|
} else if (args[0] === 'dispatch') {
|
package/gm.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1213",
|
|
4
4
|
"description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
|
|
5
5
|
"author": "AnEntrypoint",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
|
-
"plugkitVersion": "0.1.
|
|
20
|
+
"plugkitVersion": "0.1.445"
|
|
21
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1213",
|
|
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",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"gm.json"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"gm-plugkit": "^2.0.
|
|
42
|
+
"gm-plugkit": "^2.0.1213"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=16.0.0"
|