instabox 0.8.179 → 0.8.180

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/bin/instabox.mjs CHANGED
@@ -23,6 +23,7 @@ import {
23
23
  cliVersion,
24
24
  findCli,
25
25
  installBundled,
26
+ installDir,
26
27
  isOnboarding,
27
28
  missingBundledCli,
28
29
  real,
@@ -269,24 +270,29 @@ async function ensureCli() {
269
270
  async function ensureBundledCli(bundled, found) {
270
271
  const want = await sha256File(bundled).catch(() => null);
271
272
  if (found) {
272
- const [version, have] = await Promise.all([cliVersion(found), sha256File(found).catch(() => null)]);
273
+ const target = real(found);
274
+ // A manager can dispatch by argv[0]: probe the file we would replace, not its instabox alias.
275
+ const [version, have] = await Promise.all([cliVersion(target), sha256File(target).catch(() => null)]);
273
276
  const v = version ? ` ${version}` : '';
274
277
  if (want && have === want) return { line: `instabox CLI${v} is up to date`, tryLs: true };
278
+ if (!version) {
279
+ const destination = join(installDir(), process.platform === 'win32' ? 'instabox.exe' : 'instabox');
280
+ if (real(destination) === target)
281
+ return `${target} is not recognized as an instabox binary, left as is; set INSTABOX_INSTALL_DIR to a different directory or run: npx instabox@latest <command>`;
282
+ return ensureBundledCli(bundled, existsSync(destination) ? destination : null);
283
+ }
275
284
  if (version === 'dev' || version?.endsWith('-dirty'))
276
285
  return `instabox CLI at ${found} is a development build (${version}), left as is`;
277
- // Replace it where it is, through a symlink the file it points to, so whatever manages the
278
- // link stays as it was. Installing anywhere else would leave the old copy first on PATH.
279
- const dir = dirname(real(found));
286
+ // Only a target that identifies itself as InstaBox can be upgraded through a symlink.
287
+ const dir = dirname(target);
280
288
  try {
281
289
  accessSync(dir, fsConstants.W_OK);
282
290
  } catch {
283
291
  const copy =
284
- process.platform === 'win32'
285
- ? `copy "${bundled}" "${found}"`
286
- : `sudo install -m 0755 "${bundled}" "${real(found)}"`;
292
+ process.platform === 'win32' ? `copy "${bundled}" "${found}"` : `sudo install -m 0755 "${bundled}" "${target}"`;
287
293
  return `instabox CLI${v} at ${found} is not this package's build and ${dir} is not writable ${dim('· to replace it:')} ${copy}`;
288
294
  }
289
- const r = await installBundled(bundled, { path: real(found) });
295
+ const r = await installBundled(bundled, { path: target });
290
296
  if (r.error) return `instabox CLI${v} at ${found} could not be updated ${dim(`(${r.error})`)}`;
291
297
  return { line: `instabox CLI updated${v ? ` from${v}` : ''} to ${r.version} at ${found}`, tryLs: true };
292
298
  }
package/cli/SHA256SUMS CHANGED
@@ -1,6 +1,6 @@
1
- f663ac7f0cffd1cf03d9770f2dd726b9b44cf0fe6778751c0e957fd5de89692a instabox-darwin-amd64
2
- 45d95c668b1dae2437e3ece8f8f9b4d54a6af186ff1456875c05d5afc661bad0 instabox-darwin-arm64
3
- 904fe6891df02c2581ff5924466b929a24ab776ae32a560aa0a3854d02b1dc7e instabox-linux-amd64
4
- 2c44e601e6c9fddd62db932df6731df10b741282e75d3588ce7c3df7800dfbae instabox-linux-arm64
5
- 1b8b9d5c6da75001dc44427e1b7d64128668f6afede7396f462d2c3f80f7f62f instabox-windows-amd64.exe
6
- 02e3eed7698a4fc6587b947be03edaa315bc012925504c414302764910f1f358 instabox-windows-arm64.exe
1
+ cd463e89b27537f380989744c2a65e63f4f4a10742be6818fb788de81e77af52 instabox-darwin-amd64
2
+ 2b0f77378032472baaad53cde8a995fc4a099bef8f5d9825c45eb24ba018fff7 instabox-darwin-arm64
3
+ 0ee5423deb803620c6c655c5aea3256c650bd04ada44b7172eceea0ec7d5b6dd instabox-linux-amd64
4
+ c562886042bfed50f9b78cbcbe1ea0f7cdc5e9b8ee4adc77067115f49299aaa8 instabox-linux-arm64
5
+ 712f63ed546cb20bb7ae33de30b59fcd3a66ac7cf953b1cbbb536748dc463db1 instabox-windows-amd64.exe
6
+ 7008bbc153c4bdf858a49efadd581ad08f2e6af935a176e2145ea5590e10ccc0 instabox-windows-arm64.exe
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instabox",
3
- "version": "0.8.179",
3
+ "version": "0.8.180",
4
4
  "description": "A cloud box for your coding agent, the instabox CLI and its agent skills in one command: npx instabox@latest",
5
5
  "type": "module",
6
6
  "bin": {