gm-skill 2.0.1850 → 2.0.1851

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,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-plugkit",
3
- "version": "2.0.1850",
3
+ "version": "2.0.1851",
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": {
@@ -746,6 +746,18 @@ function aggregateCpuProfile(profile, topN) {
746
746
 
747
747
  const BROWSER_RUNNER_BIN = process.env.GM_BROWSER_RUNNER_BIN || 'playwriter';
748
748
 
749
+ function findCachedBunRunnerBin() {
750
+ try {
751
+ const cacheDir = path.join(os.homedir(), '.bun', 'install', 'cache');
752
+ const entries = fs.readdirSync(cacheDir).filter(n => n.startsWith(`${BROWSER_RUNNER_BIN}@`));
753
+ for (const name of entries) {
754
+ const binJs = path.join(cacheDir, name, 'bin.js');
755
+ if (fs.existsSync(binJs)) return binJs;
756
+ }
757
+ } catch (_) {}
758
+ return null;
759
+ }
760
+
749
761
  function findBrowserRunner() {
750
762
  const bunGlobalRoots = [
751
763
  path.join(os.homedir(), '.bun', 'install', 'global', 'node_modules', BROWSER_RUNNER_BIN, 'bin.js'),
@@ -753,6 +765,8 @@ function findBrowserRunner() {
753
765
  for (const binJs of bunGlobalRoots) {
754
766
  if (fs.existsSync(binJs)) return { cmd: process.execPath, baseArgs: [binJs], shell: false };
755
767
  }
768
+ const cachedBin = findCachedBunRunnerBin();
769
+ if (cachedBin) return { cmd: process.execPath, baseArgs: [cachedBin], shell: false };
756
770
  const whichCmd = process.platform === 'win32' ? 'where' : 'which';
757
771
  const bunR = spawnSync(whichCmd, ['bun'], { encoding: 'utf-8', shell: true });
758
772
  if (bunR.status === 0 && bunR.stdout.trim()) {
@@ -829,8 +843,7 @@ function isProfileLocked(profileDir) {
829
843
  }
830
844
 
831
845
  function sessionProfileSlug(claudeSessionId) {
832
- const s = String(claudeSessionId || 'default').replace(/[^a-zA-Z0-9_-]/g, '-').slice(0, 64);
833
- return s || 'default';
846
+ return 'default';
834
847
  }
835
848
 
836
849
  function sessionProfileDir(cwd, claudeSessionId) {
@@ -866,6 +879,7 @@ function cleanDeadProfileFragments(cwd) {
866
879
  }
867
880
  continue;
868
881
  }
882
+ if (name === 'browser-profile-default') continue;
869
883
  try {
870
884
  if (fs.existsSync(dir) && !isProfileLocked(dir)) {
871
885
  fs.rmSync(dir, { recursive: true, force: true });
@@ -3807,7 +3821,7 @@ async function runSpoolWatcher(instance, spoolDir) {
3807
3821
  }
3808
3822
  }, 60_000);
3809
3823
 
3810
- const BROWSER_IDLE_LIMIT_MS = parseInt(process.env.PLUGKIT_BROWSER_IDLE_LIMIT_MS, 10) || 15 * 60 * 1000;
3824
+ const BROWSER_IDLE_LIMIT_MS = parseInt(process.env.PLUGKIT_BROWSER_IDLE_LIMIT_MS, 10) || 5 * 60 * 1000;
3811
3825
  setInterval(() => {
3812
3826
  try {
3813
3827
  const portsFile = browserPortsFile(process.cwd());
package/gm.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm",
3
- "version": "2.0.1850",
3
+ "version": "2.0.1851",
4
4
  "description": "Spool-dispatch orchestration engine with unified state machine, skills, and automated git enforcement",
5
5
  "author": "AnEntrypoint",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-skill",
3
- "version": "2.0.1850",
3
+ "version": "2.0.1851",
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",