synabun 2026.4.20-beta.0 → 2026.4.20-beta.1

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.
@@ -45,6 +45,13 @@ function runUpdate(key, badge) {
45
45
  if (btn?.dataset.tooltipOriginal) btn.dataset.tooltip = btn.dataset.tooltipOriginal;
46
46
  }
47
47
  }
48
+ // Poll for the new installed version after the install completes.
49
+ // npm-global installs typically take 5–45s; opencode upgrade similar.
50
+ // Re-check a few times, bail once the badge is cleared or retries run out.
51
+ const delays = [20000, 45000, 90000];
52
+ for (const ms of delays) {
53
+ setTimeout(() => { forceCheckToolUpdates(); }, ms);
54
+ }
48
55
  }
49
56
 
50
57
  function wireParentIntercept(parentId, badgeId, key) {
@@ -2224,10 +2224,36 @@ function resolveLocalCodexBin() {
2224
2224
  }
2225
2225
  }
2226
2226
 
2227
+ function ensureBundledCodexExecutable(bundledJsPath) {
2228
+ if (process.platform === 'win32') return;
2229
+ try {
2230
+ const st = statSync(bundledJsPath);
2231
+ if (!(st.mode & 0o111)) chmodSync(bundledJsPath, st.mode | 0o755);
2232
+ } catch {}
2233
+ const PLATFORM_PACKAGE = {
2234
+ 'darwin-arm64': { pkg: '@openai/codex-darwin-arm64', triple: 'aarch64-apple-darwin' },
2235
+ 'darwin-x64': { pkg: '@openai/codex-darwin-x64', triple: 'x86_64-apple-darwin' },
2236
+ 'linux-x64': { pkg: '@openai/codex-linux-x64', triple: 'x86_64-unknown-linux-musl' },
2237
+ 'linux-arm64': { pkg: '@openai/codex-linux-arm64', triple: 'aarch64-unknown-linux-musl' },
2238
+ };
2239
+ const info = PLATFORM_PACKAGE[`${process.platform}-${process.arch}`];
2240
+ if (!info) return;
2241
+ try {
2242
+ const requireFromHere = createRequire(import.meta.url);
2243
+ const pkgJson = requireFromHere.resolve(`${info.pkg}/package.json`);
2244
+ const nativeBin = join(dirname(pkgJson), 'vendor', info.triple, 'codex', 'codex');
2245
+ if (existsSync(nativeBin)) {
2246
+ const st = statSync(nativeBin);
2247
+ if (!(st.mode & 0o111)) chmodSync(nativeBin, st.mode | 0o755);
2248
+ }
2249
+ } catch {}
2250
+ }
2251
+
2227
2252
  function getCodexBin() {
2228
2253
  if (_codexBinPath) return _codexBinPath;
2229
2254
  const bundledBin = resolveLocalCodexBin();
2230
2255
  if (bundledBin && existsSync(bundledBin)) {
2256
+ ensureBundledCodexExecutable(bundledBin);
2231
2257
  _codexBinPath = bundledBin;
2232
2258
  _codexBinSource = 'bundled';
2233
2259
  return _codexBinPath;
@@ -2879,7 +2905,7 @@ CRITICAL — When you need clarification during planning:
2879
2905
  if (child) return child;
2880
2906
  let codexBin = getCodexBin();
2881
2907
  const args = ['app-server'];
2882
- if (process.platform === 'win32' && /\.js$/i.test(codexBin)) {
2908
+ if (/\.js$/i.test(codexBin)) {
2883
2909
  args.unshift(codexBin);
2884
2910
  codexBin = process.execPath;
2885
2911
  }
@@ -9744,7 +9770,7 @@ app.get('/api/system/tool-versions', async (req, res) => {
9744
9770
  try { await checkToolVersions(); } catch {}
9745
9771
  } else {
9746
9772
  const age = Date.now() - new Date(_toolVersionCache.checkedAt).getTime();
9747
- if (age > 3 * 60 * 60 * 1000) {
9773
+ if (age > 15 * 60 * 1000) {
9748
9774
  try { await checkToolVersions(); } catch {}
9749
9775
  }
9750
9776
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synabun",
3
- "version": "2026.4.20-beta.0",
3
+ "version": "2026.4.20-beta.01",
4
4
  "description": "Persistent vector memory for AI assistants",
5
5
  "license": "Apache-2.0",
6
6
  "author": "The SynaBun Authors",