gm-skill 2.0.1380 → 2.0.1382

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.
@@ -1 +1 @@
1
- 0.1.519
1
+ 0.1.520
@@ -1 +1 @@
1
- 59c02530d68b474755242ecec333cb2d154b963f39bc47685abc842f146bf247 plugkit.wasm
1
+ 990a52c4043512fb5cf7e6a95030015b6897ba4d5af5a659c8e7e3a697a03476 plugkit.wasm
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ async function main() {
7
+ const [, , projectDir, command, codeB64] = process.argv;
8
+ if (!projectDir || !command || codeB64 === undefined) {
9
+ console.log(JSON.stringify({ ok: false, error: 'usage: lang-host-runner <projectDir> <command> <code-base64>' }));
10
+ process.exit(2);
11
+ }
12
+ const code = Buffer.from(codeB64, 'base64').toString('utf8');
13
+ const langDir = path.join(projectDir, 'lang');
14
+ if (!fs.existsSync(langDir)) {
15
+ console.log(JSON.stringify({ ok: false, error: 'no-lang-dir', langDir }));
16
+ return;
17
+ }
18
+ const files = fs.readdirSync(langDir).filter(f => f.endsWith('.js') && f !== 'loader.js');
19
+ const plugins = files.reduce((acc, f) => {
20
+ try {
21
+ const p = require(path.join(langDir, f));
22
+ if (p && typeof p.id === 'string' && p.exec && p.exec.match instanceof RegExp && typeof p.exec.run === 'function') {
23
+ acc.push(p);
24
+ }
25
+ } catch (_) {}
26
+ return acc;
27
+ }, []);
28
+ const plugin = plugins.find(p => p.exec.match.test(command));
29
+ if (!plugin) {
30
+ console.log(JSON.stringify({ ok: false, error: 'no-plugin-matched', command, available: plugins.map(p => p.id) }));
31
+ return;
32
+ }
33
+ const t0 = Date.now();
34
+ const timer = setTimeout(() => {
35
+ console.log(JSON.stringify({ ok: false, error: 'timeout', plugin_id: plugin.id, ms: Date.now() - t0 }));
36
+ process.exit(0);
37
+ }, 30000);
38
+ try {
39
+ const out = await plugin.exec.run(code, projectDir);
40
+ clearTimeout(timer);
41
+ console.log(JSON.stringify({ ok: true, plugin_id: plugin.id, output: String(out), ms: Date.now() - t0 }));
42
+ } catch (e) {
43
+ clearTimeout(timer);
44
+ console.log(JSON.stringify({ ok: false, error: String(e && e.message || e), plugin_id: plugin.id, ms: Date.now() - t0 }));
45
+ }
46
+ }
47
+
48
+ main();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1380",
3
+ "version": "2.0.1382",
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": {
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1380",
3
+ "version": "2.0.1382",
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.519"
20
+ "plugkitVersion": "0.1.520"
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1380",
3
+ "version": "2.0.1382",
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",