instabox 0.8.179 → 0.8.181

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
+ 9f2f33dbb600938090c523faff918ed6d45b74f0beff56c4738a7757d5cd744c instabox-darwin-amd64
2
+ ab2033af4d3029c32008b596b41ba788d38e1290133c771e15f5019a10f7204f instabox-darwin-arm64
3
+ a1efe806c154ef1d793637c2707511d40e2a1e98275c1fec0f9845a4253b49eb instabox-linux-amd64
4
+ 4629e12280504fdeaf8519539dbd35bf75b9ee528ce615520ea11fef2197df29 instabox-linux-arm64
5
+ be336e332b2c6d8b415801e98e5fc15549d7298d494c1eb470121fcdf7429f94 instabox-windows-amd64.exe
6
+ 6adea6b4ec93022f8f40c56ddd0d45661b81ea133d2910b9262e6639c39d016e 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.181",
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": {