rauta-ai 0.5.105 → 0.5.107
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/rauta-ai.js +30 -10
- package/package.json +2 -2
package/bin/rauta-ai.js
CHANGED
|
@@ -447,17 +447,37 @@ async function main() {
|
|
|
447
447
|
const bin = cachedBinaryPath();
|
|
448
448
|
await ensureBinary(bin);
|
|
449
449
|
const result = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' });
|
|
450
|
+
|
|
451
|
+
// A corrupt or wrong-arch binary must be DELETED so the next run downloads a
|
|
452
|
+
// fresh copy instead of failing forever. The catch is that the platforms
|
|
453
|
+
// report it completely differently:
|
|
454
|
+
//
|
|
455
|
+
// macOS spawnSync returns an ERROR with code ENOEXEC
|
|
456
|
+
// Linux execve fails, the fallback re-runs it through a shell, and what
|
|
457
|
+
// comes back is a plain EXIT STATUS 127 with error === undefined
|
|
458
|
+
//
|
|
459
|
+
// Testing only the error code -- which is what this did -- means the
|
|
460
|
+
// self-heal NEVER FIRED ON LINUX. A user whose cached binary was corrupt got
|
|
461
|
+
// the identical failure on every subsequent run, forever, which is exactly
|
|
462
|
+
// the outcome this code exists to prevent, on the platform where most of it
|
|
463
|
+
// runs. Measured in the CI runner image: status 127, error.code undefined.
|
|
464
|
+
//
|
|
465
|
+
// Found by moving CI onto Linux containers. The old runner never surfaced it.
|
|
466
|
+
const unrunnable =
|
|
467
|
+
(result.error && (result.error.code === 'ENOEXEC' || result.error.code === 'EACCES')) ||
|
|
468
|
+
(!result.error && result.status === 127);
|
|
469
|
+
|
|
470
|
+
if (unrunnable) {
|
|
471
|
+
const why = result.error ? result.error.code : 'ENOEXEC (exit 127)';
|
|
472
|
+
removeQuietly(bin);
|
|
473
|
+
fail(
|
|
474
|
+
`the cached CLI at ${bin} could not be executed (${why}).`,
|
|
475
|
+
'It has been deleted, so the next run downloads a fresh copy.',
|
|
476
|
+
'If this repeats, something on the network is replacing the download:',
|
|
477
|
+
`set RAUTA_CLI_BASE to a mirror you trust, or install from ${DOCS}`,
|
|
478
|
+
);
|
|
479
|
+
}
|
|
450
480
|
if (result.error) {
|
|
451
|
-
const code = result.error.code;
|
|
452
|
-
if (code === 'ENOEXEC' || code === 'EACCES') {
|
|
453
|
-
removeQuietly(bin);
|
|
454
|
-
fail(
|
|
455
|
-
`the cached CLI at ${bin} could not be executed (${code}).`,
|
|
456
|
-
'It has been deleted, so the next run downloads a fresh copy.',
|
|
457
|
-
'If this repeats, something on the network is replacing the download:',
|
|
458
|
-
`set RAUTA_CLI_BASE to a mirror you trust, or install from ${DOCS}`,
|
|
459
|
-
);
|
|
460
|
-
}
|
|
461
481
|
fail(
|
|
462
482
|
`could not start the Rauta CLI: ${result.error.message}`,
|
|
463
483
|
`The binary is installed at ${bin} and was left in place.`,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rauta-ai",
|
|
3
|
-
"version": "0.5.
|
|
4
|
-
"description": "CLI for Rauta (rauta.ai)
|
|
3
|
+
"version": "0.5.107",
|
|
4
|
+
"description": "CLI for Rauta (rauta.ai) — GPU infrastructure, compared in public. Canonical install: `npx rauta-ai`. Interim package name while unscoped `rauta` awaits npm similarity clearance. Sign up, connect provider keys (BYOK), buy prepaid credits, provision GPUs, and track AI spend from your terminal.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"rauta-ai": "bin/rauta-ai.js",
|
|
7
7
|
"rauta": "bin/rauta-ai.js",
|