@cereworker/cli 26.328.11 → 26.328.13
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/dist/images.js +3 -3
- package/dist/images.js.map +1 -1
- package/package.json +10 -10
- package/scripts/postinstall.mjs +25 -8
package/dist/images.js
CHANGED
|
@@ -23,7 +23,7 @@ export async function runImages() {
|
|
|
23
23
|
const output = execSync(`${dockerCmd} images cereworker/cerebellum --format "table {{.Repository}}:{{.Tag}}\t{{.ID}}\t{{.Size}}\t{{.CreatedSince}}"`, { stdio: 'pipe' }).toString().trim();
|
|
24
24
|
if (!output || output.split('\n').length <= 1) {
|
|
25
25
|
console.log('No Cerebellum images found locally.');
|
|
26
|
-
console.log(`Run "cereworker upgrade" to pull ${image}.`);
|
|
26
|
+
console.log(`Run "cereworker images upgrade" to pull ${image}.`);
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
console.log('Local Cerebellum images:\n');
|
|
@@ -31,7 +31,7 @@ export async function runImages() {
|
|
|
31
31
|
}
|
|
32
32
|
catch {
|
|
33
33
|
console.log('No Cerebellum images found locally.');
|
|
34
|
-
console.log(`Run "cereworker upgrade" to pull ${image}.`);
|
|
34
|
+
console.log(`Run "cereworker images upgrade" to pull ${image}.`);
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
// Show running container info
|
|
@@ -54,7 +54,7 @@ export async function runImages() {
|
|
|
54
54
|
if (localDigest && localDigest !== '<none>') {
|
|
55
55
|
const remoteDigest = execSync(`${dockerCmd} manifest inspect cereworker/cerebellum:latest 2>/dev/null | grep -o '"digest": "sha256:[a-f0-9]*"' | head -1`, { stdio: 'pipe', timeout: 15_000 }).toString().trim();
|
|
56
56
|
if (remoteDigest && !remoteDigest.includes(localDigest.replace('sha256:', ''))) {
|
|
57
|
-
console.log('\nA newer image may be available. Run "cereworker upgrade" to update.');
|
|
57
|
+
console.log('\nA newer image may be available. Run "cereworker images upgrade" to update.');
|
|
58
58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,CAAC,YAAY,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC;gBAC/E,OAAO,CAAC,GAAG,CAAC,8EAA8E,CAAC,CAAC;YAC9F,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,sCAAsC;IACxC,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cereworker/cli",
|
|
3
|
-
"version": "26.328.
|
|
3
|
+
"version": "26.328.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"cereworker": "dist/index.js"
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"ink": "^5.1.0",
|
|
23
23
|
"@inkjs/ui": "^2.0.0",
|
|
24
24
|
"react": "^18.3.1",
|
|
25
|
-
"@cereworker/core": "26.328.
|
|
26
|
-
"@cereworker/
|
|
27
|
-
"@cereworker/
|
|
28
|
-
"@cereworker/skills": "26.328.
|
|
29
|
-
"@cereworker/
|
|
30
|
-
"@cereworker/
|
|
31
|
-
"@cereworker/
|
|
32
|
-
"@cereworker/
|
|
33
|
-
"@cereworker/
|
|
25
|
+
"@cereworker/core": "26.328.13",
|
|
26
|
+
"@cereworker/config": "26.328.13",
|
|
27
|
+
"@cereworker/cerebrum": "26.328.13",
|
|
28
|
+
"@cereworker/skills": "26.328.13",
|
|
29
|
+
"@cereworker/browser": "26.328.13",
|
|
30
|
+
"@cereworker/cerebellum-client": "26.328.13",
|
|
31
|
+
"@cereworker/channels": "26.328.13",
|
|
32
|
+
"@cereworker/gateway": "26.328.13",
|
|
33
|
+
"@cereworker/hippocampus": "26.328.13"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/react": "^18.3.0",
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -28,27 +28,44 @@ try {
|
|
|
28
28
|
|
|
29
29
|
// --- 2. Pull latest Cerebellum Docker image ---
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
// npm postinstall may have a restricted PATH — check common locations
|
|
32
|
+
let dockerBin = 'docker';
|
|
33
|
+
try {
|
|
34
|
+
execSync('docker --version', { stdio: 'pipe', timeout: 5_000 });
|
|
35
|
+
} catch {
|
|
36
|
+
const candidates = ['/usr/bin/docker', '/usr/local/bin/docker', '/snap/bin/docker'];
|
|
37
|
+
dockerBin = '';
|
|
38
|
+
for (const c of candidates) {
|
|
39
|
+
if (existsSync(c)) { dockerBin = c; break; }
|
|
40
|
+
}
|
|
41
|
+
if (!dockerBin) {
|
|
42
|
+
console.log('CereWorker: Docker not found — skipping Cerebellum image pull.');
|
|
43
|
+
console.log(' Install Docker and run "cereworker images upgrade" to pull the image later.');
|
|
44
|
+
process.exit(0);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
let dockerCmd = dockerBin;
|
|
32
49
|
|
|
33
50
|
try {
|
|
34
|
-
execSync(
|
|
51
|
+
execSync(`${dockerBin} info`, { stdio: 'pipe', timeout: 10_000 });
|
|
35
52
|
} catch {
|
|
36
53
|
// Docker not available directly — try with sudo
|
|
37
54
|
try {
|
|
38
|
-
execSync(
|
|
39
|
-
dockerCmd =
|
|
55
|
+
execSync(`sudo -n ${dockerBin} info`, { stdio: 'pipe', timeout: 10_000 });
|
|
56
|
+
dockerCmd = `sudo ${dockerBin}`;
|
|
40
57
|
} catch {
|
|
41
|
-
console.log('CereWorker: Docker
|
|
42
|
-
console.log('
|
|
58
|
+
console.log('CereWorker: Docker permission denied — skipping Cerebellum image pull.');
|
|
59
|
+
console.log(' Run "cereworker images upgrade" (with sudo or after adding user to docker group).');
|
|
43
60
|
process.exit(0);
|
|
44
61
|
}
|
|
45
62
|
}
|
|
46
63
|
|
|
47
64
|
const image = 'cereworker/cerebellum:latest';
|
|
48
|
-
console.log(`CereWorker: Pulling ${image}...`);
|
|
65
|
+
console.log(`CereWorker: Pulling ${image} (via ${dockerCmd})...`);
|
|
49
66
|
try {
|
|
50
67
|
execSync(`${dockerCmd} pull ${image}`, { stdio: 'inherit', timeout: 3_600_000 });
|
|
51
68
|
console.log(`CereWorker: Cerebellum image updated.`);
|
|
52
69
|
} catch {
|
|
53
|
-
console.log(`CereWorker: Could not pull ${image} (non-fatal). Run "cereworker upgrade" to retry.`);
|
|
70
|
+
console.log(`CereWorker: Could not pull ${image} (non-fatal). Run "cereworker images upgrade" to retry.`);
|
|
54
71
|
}
|