crabot 0.1.2 → 0.1.3
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 -5
- package/bin/crabot.mjs +2 -2
- package/package.json +1 -4
- package/scripts/install.mjs +3 -11
package/README.md
CHANGED
|
@@ -5,11 +5,10 @@ Local-first AI agent runtime with a gateway, operator console, and CLI.
|
|
|
5
5
|
## Requirements
|
|
6
6
|
|
|
7
7
|
`crabot` runs as a self-contained standalone binary with the runtime embedded —
|
|
8
|
-
the program itself needs no Bun or Node install.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
the
|
|
12
|
-
it happens automatically on first run.
|
|
8
|
+
the program itself needs no Bun or Node install. The package ships no install
|
|
9
|
+
script; on the first `crabot` run a small launcher (running under the Node that
|
|
10
|
+
npm already provides) downloads the prebuilt binary matching your platform from
|
|
11
|
+
the matching GitHub release, verifies its checksum, and caches it for later runs.
|
|
13
12
|
|
|
14
13
|
Supported platforms: Linux (x64, arm64), macOS (x64, arm64), Windows (x64).
|
|
15
14
|
|
package/bin/crabot.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Launcher for the `crabot` distribution. The real program is a standalone executable (the Bun
|
|
3
|
-
// runtime is embedded) downloaded from the matching GitHub release
|
|
4
|
-
//
|
|
3
|
+
// runtime is embedded) downloaded from the matching GitHub release lazily here on first run (the
|
|
4
|
+
// package ships no install script). No Bun or Node runtime is required to run crabot.
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import { ensureBinary } from "../scripts/install.mjs";
|
package/package.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crabot",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Local-first AI agent runtime with a gateway, operator console, and CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"crabot": "bin/crabot.mjs"
|
|
8
8
|
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"postinstall": "node scripts/install.mjs"
|
|
11
|
-
},
|
|
12
9
|
"files": [
|
|
13
10
|
"bin",
|
|
14
11
|
"scripts",
|
package/scripts/install.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Downloads the crabot standalone binary for the host platform from the GitHub release that matches
|
|
3
|
-
// this package's version, verifies its SHA-256, and caches it.
|
|
4
|
-
//
|
|
5
|
-
// The binary embeds the Bun runtime, so running crabot needs no Bun or Node install.
|
|
3
|
+
// this package's version, verifies its SHA-256, and caches it. Invoked by the launcher on first run
|
|
4
|
+
// when the binary is not cached yet; the package ships no install script, so nothing runs at install
|
|
5
|
+
// time. The binary embeds the Bun runtime, so running crabot needs no Bun or Node install.
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { homedir } from "node:os";
|
|
@@ -74,11 +74,3 @@ export async function ensureBinary() {
|
|
|
74
74
|
renameSync(temporary, target);
|
|
75
75
|
return target;
|
|
76
76
|
}
|
|
77
|
-
|
|
78
|
-
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
79
|
-
// postinstall: pre-warm the cache but never fail the install; the launcher retries on first run.
|
|
80
|
-
ensureBinary().then(
|
|
81
|
-
(path) => process.stdout.write(`crabot: ready at ${path}\n`),
|
|
82
|
-
(error) => process.stderr.write(`crabot: will download on first run (${error.message})\n`)
|
|
83
|
-
);
|
|
84
|
-
}
|