gm-skill 2.0.1912 → 2.0.1913
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/gm-plugkit/package.json +1 -1
- package/gm-plugkit/plugkit-wasm-wrapper.js +36 -1
- package/gm.json +1 -1
- package/package.json +1 -1
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.1913",
|
|
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": {
|
|
@@ -758,6 +758,29 @@ function findCachedBunRunnerBin() {
|
|
|
758
758
|
return null;
|
|
759
759
|
}
|
|
760
760
|
|
|
761
|
+
// Cache dir entries are named `<pkg>@<version>[@@@N]` (the `@@@N` suffix is bun's own
|
|
762
|
+
// disambiguator for multiple cache slots of the same resolved version, not part of the semver).
|
|
763
|
+
// Picks the highest semver-looking version present so a stale older cache entry left over from
|
|
764
|
+
// a prior gm-plugkit run doesn't win over a newer one that's also cached.
|
|
765
|
+
function findCachedBunRunnerVersion() {
|
|
766
|
+
try {
|
|
767
|
+
const cacheDir = path.join(os.homedir(), '.bun', 'install', 'cache');
|
|
768
|
+
const entries = fs.readdirSync(cacheDir).filter(n => n.startsWith(`${BROWSER_RUNNER_BIN}@`));
|
|
769
|
+
const versions = entries
|
|
770
|
+
.map(n => n.slice(BROWSER_RUNNER_BIN.length + 1).split('@@@')[0])
|
|
771
|
+
.filter(v => /^\d+\.\d+\.\d+/.test(v));
|
|
772
|
+
if (!versions.length) return null;
|
|
773
|
+
versions.sort((a, b) => {
|
|
774
|
+
const pa = a.split('.').map(Number), pb = b.split('.').map(Number);
|
|
775
|
+
for (let i = 0; i < 3; i++) { if (pa[i] !== pb[i]) return pb[i] - pa[i]; }
|
|
776
|
+
return 0;
|
|
777
|
+
});
|
|
778
|
+
return versions[0];
|
|
779
|
+
} catch (_) {
|
|
780
|
+
return null;
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
|
|
761
784
|
// playwriter's CLI `--timeout` option is parsed as a raw string (its own arg parser does not
|
|
762
785
|
// coerce it despite the zod schema declaring z.number()), and that string is forwarded verbatim
|
|
763
786
|
// into `vm.runInContext(..., { timeout })`, which throws
|
|
@@ -826,7 +849,19 @@ function findBrowserRunner() {
|
|
|
826
849
|
const whichCmd = process.platform === 'win32' ? 'where' : 'which';
|
|
827
850
|
const bunR = spawnSync(whichCmd, ['bun'], { encoding: 'utf-8', shell: true });
|
|
828
851
|
if (bunR.status === 0 && bunR.stdout.trim()) {
|
|
829
|
-
|
|
852
|
+
// `bun x <pkg>@latest` re-resolves the `@latest` tag against the npm registry on every
|
|
853
|
+
// single invocation, even when a resolved copy already sits in bun's own content-addressed
|
|
854
|
+
// cache (~/.bun/install/cache/<pkg>@<version>) from a prior run -- a redundant network
|
|
855
|
+
// round-trip per browser-verb dispatch. Observed on Windows to occasionally never return
|
|
856
|
+
// (hangs past "Resolved, downloaded and extracted" with no further output or error), which
|
|
857
|
+
// wedges every subsequent browser dispatch behind a 30s+ spawnSync timeout for no benefit,
|
|
858
|
+
// since the pinned exact version was already available locally. Prefer `bun x <pkg>@<exact
|
|
859
|
+
// cached version>` when a cached copy exists -- this still goes through `bun x`'s real
|
|
860
|
+
// dependency-tree resolution (the reason `bun x` is preferred over the raw cached bin.js
|
|
861
|
+
// above), it just skips the registry round-trip for the tag lookup itself.
|
|
862
|
+
const cachedVersion = findCachedBunRunnerVersion();
|
|
863
|
+
const pkgSpec = cachedVersion ? `${BROWSER_RUNNER_BIN}@${cachedVersion}` : `${BROWSER_RUNNER_BIN}@latest`;
|
|
864
|
+
return { cmd: 'bun', baseArgs: ['x', pkgSpec], shell: true };
|
|
830
865
|
}
|
|
831
866
|
const cachedBin = findCachedBunRunnerBin();
|
|
832
867
|
if (cachedBin) return { cmd: process.execPath, baseArgs: [cachedBin], shell: false };
|
package/gm.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gm-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1913",
|
|
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",
|