rauta-ai 0.1.0 → 0.1.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.
- package/README.md +4 -3
- package/bin/rauta-ai.js +29 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,9 +14,10 @@ Sign up from your terminal, connect provider keys (BYOK), buy prepaid credits,
|
|
|
14
14
|
provision GPUs, and track AI spend. Same gateway as the Rauta MCP tools.
|
|
15
15
|
|
|
16
16
|
This package is a thin launcher: it downloads the static Go binary for your
|
|
17
|
-
platform (darwin/linux, arm64/amd64) once per version
|
|
18
|
-
[rauta.ai/cli](https://rauta.ai/cli/install.sh)
|
|
19
|
-
caches it, and passes
|
|
17
|
+
platform (darwin/linux, arm64/amd64) once per version. It prefers
|
|
18
|
+
`rauta-<os>-<arch>` on [rauta.ai/cli](https://rauta.ai/cli/install.sh), then
|
|
19
|
+
falls back to `infra-arena-*` and/or infra-arena.ai, caches it, and passes
|
|
20
|
+
through.
|
|
20
21
|
|
|
21
22
|
```
|
|
22
23
|
curl -fsSL https://rauta.ai/cli/install.sh | sh
|
package/bin/rauta-ai.js
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
// npx wrapper for the Rauta CLI (https://rauta.ai/docs).
|
|
3
3
|
//
|
|
4
4
|
// Package name is `rauta-ai` until npm clears unscoped `rauta` (similarity
|
|
5
|
-
// filter vs ramda/auto/oauth).
|
|
6
|
-
// infra-arena-* on
|
|
7
|
-
//
|
|
5
|
+
// filter vs ramda/auto/oauth). Prefer CDN artifacts named rauta-*; fall back
|
|
6
|
+
// to infra-arena-* on both rauta.ai and infra-arena.ai during the interim
|
|
7
|
+
// rename window. This shim downloads once, caches it, and execs with stdio
|
|
8
|
+
// passed through.
|
|
8
9
|
'use strict';
|
|
9
10
|
|
|
10
11
|
const { spawnSync } = require('node:child_process');
|
|
@@ -22,7 +23,7 @@ function fail(msg) {
|
|
|
22
23
|
process.exit(1);
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
function
|
|
26
|
+
function platformArch() {
|
|
26
27
|
const platforms = { darwin: 'darwin', linux: 'linux' };
|
|
27
28
|
const arches = { arm64: 'arm64', x64: 'amd64' };
|
|
28
29
|
const platform = platforms[process.platform];
|
|
@@ -33,8 +34,13 @@ function target() {
|
|
|
33
34
|
'darwin/linux on arm64/amd64 are published. See https://rauta.ai/docs',
|
|
34
35
|
);
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
return { platform, arch };
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function artifactNames() {
|
|
41
|
+
const { platform, arch } = platformArch();
|
|
42
|
+
// Preferred brand name first; legacy CDN name second.
|
|
43
|
+
return [`rauta-${platform}-${arch}`, `infra-arena-${platform}-${arch}`];
|
|
38
44
|
}
|
|
39
45
|
|
|
40
46
|
function cachedBinaryPath() {
|
|
@@ -76,24 +82,30 @@ function download(url, dest, redirects = 0) {
|
|
|
76
82
|
});
|
|
77
83
|
}
|
|
78
84
|
|
|
85
|
+
function candidateUrls() {
|
|
86
|
+
const bases = [PRIMARY_BASE, FALLBACK_BASE];
|
|
87
|
+
const artifacts = artifactNames();
|
|
88
|
+
const urls = [];
|
|
89
|
+
for (const artifact of artifacts) {
|
|
90
|
+
for (const base of bases) {
|
|
91
|
+
urls.push(`${base}/v${pkg.version}/${artifact}`);
|
|
92
|
+
urls.push(`${base}/${artifact}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// Deduplicate if PRIMARY === FALLBACK via env override.
|
|
96
|
+
const seen = new Set();
|
|
97
|
+
return urls.filter((u) => (seen.has(u) ? false : (seen.add(u), true)));
|
|
98
|
+
}
|
|
99
|
+
|
|
79
100
|
async function ensureBinary(bin) {
|
|
80
101
|
if (fs.existsSync(bin)) return;
|
|
81
102
|
fs.mkdirSync(path.dirname(bin), { recursive: true });
|
|
82
|
-
const
|
|
83
|
-
const urls = [
|
|
84
|
-
`${PRIMARY_BASE}/v${pkg.version}/${artifact}`,
|
|
85
|
-
`${FALLBACK_BASE}/v${pkg.version}/${artifact}`,
|
|
86
|
-
`${PRIMARY_BASE}/${artifact}`,
|
|
87
|
-
`${FALLBACK_BASE}/${artifact}`,
|
|
88
|
-
];
|
|
89
|
-
// Deduplicate if PRIMARY === FALLBACK via env override.
|
|
90
|
-
const seen = new Set();
|
|
91
|
-
const unique = urls.filter((u) => (seen.has(u) ? false : (seen.add(u), true)));
|
|
103
|
+
const urls = candidateUrls();
|
|
92
104
|
process.stderr.write(
|
|
93
105
|
`Fetching rauta-ai v${pkg.version} for ${process.platform}/${process.arch}…\n`,
|
|
94
106
|
);
|
|
95
107
|
let lastErr;
|
|
96
|
-
for (const url of
|
|
108
|
+
for (const url of urls) {
|
|
97
109
|
try {
|
|
98
110
|
await download(url, bin);
|
|
99
111
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rauta-ai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "CLI for Rauta (rauta.ai) — GPU infrastructure, compared in public. 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",
|