instabox 0.8.178 → 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
- f59bbf2501891240f802169f0866c9a2c1ac09718d34b622c1b6a4002785c069 instabox-darwin-amd64
2
- 3d95f8bef3dce76c3063f740d3db6132fe58829f7735844e62bd6926afa3b9f0 instabox-darwin-arm64
3
- 10b037ad2ce1eab8dd215fb3f6cfeb0bc1ba1641c7a050b52f7899893a46fb1f instabox-linux-amd64
4
- 139e19327184809ee1fc4c01c556f6a112b578e79d22c76642210227a2bf8d74 instabox-linux-arm64
5
- 0b78b1acc6f4d60b70274fee7cc9e0b222b586f105bdf1dee0ec1f13929373f5 instabox-windows-amd64.exe
6
- 8a830a93eb9194f536a6dd6d2d2be0b83820e0e080e15e76b4ffc1232c0604d8 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.178",
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": {