fastpilot 0.0.0-stage → 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 CHANGED
@@ -1,3 +1,13 @@
1
- # Temporary Holding Version
1
+ # fastpilot
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ AI-driven QA for web, Android and iOS: an MCP server for Claude Code and other MCP clients,
4
+ plus a shell CLI. This package downloads the prebuilt binary for your platform (macOS arm64/x64,
5
+ Linux x64) from the project's GitHub releases and checks its SHA-256.
6
+
7
+ ```bash
8
+ npm install -g fastpilot
9
+ claude mcp add fastpilot -- fastpilot mcp
10
+ fastpilot open https://example.com && fastpilot snapshot -i
11
+ ```
12
+
13
+ Documentation: https://github.com/autobot-lab/fastpilot
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ // Runs the prebuilt binary that install.js unpacked, with this process's arguments and stdio
3
+ // (the MCP server talks over stdin/stdout, so they are passed through untouched).
4
+ "use strict";
5
+ const path = require("path");
6
+ const { spawnSync } = require("child_process");
7
+
8
+ const bin = path.join(__dirname, "..", "vendor", "fastpilot");
9
+ const r = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
10
+ if (r.error) {
11
+ console.error(`fastpilot: ${r.error.message} (reinstall the package, or set FASTPILOT_SKIP_DOWNLOAD=1 and put your own build on PATH)`);
12
+ process.exit(1);
13
+ }
14
+ process.exit(r.status === null ? 1 : r.status);
package/install.js ADDED
@@ -0,0 +1,54 @@
1
+ // postinstall: download this version's prebuilt fastpilot for the platform from the GitHub
2
+ // release, check its SHA-256, and unpack it into ./vendor.
3
+ // FASTPILOT_DOWNLOAD_BASE: a mirror; FASTPILOT_SKIP_DOWNLOAD=1: skip (use your own binary).
4
+ "use strict";
5
+ const crypto = require("crypto");
6
+ const fs = require("fs");
7
+ const os = require("os");
8
+ const path = require("path");
9
+ const { execFileSync } = require("child_process");
10
+
11
+ const { version } = require("./package.json");
12
+ const base = process.env.FASTPILOT_DOWNLOAD_BASE || "https://github.com/autobot-lab/fastpilot/releases/download";
13
+ const targets = {
14
+ "darwin-arm64": "aarch64-apple-darwin",
15
+ "darwin-x64": "x86_64-apple-darwin",
16
+ "linux-x64": "x86_64-unknown-linux-gnu",
17
+ };
18
+
19
+ async function get(url) {
20
+ const res = await fetch(url, { redirect: "follow" });
21
+ if (!res.ok) throw new Error(`${url}: HTTP ${res.status}`);
22
+ return Buffer.from(await res.arrayBuffer());
23
+ }
24
+
25
+ async function main() {
26
+ if (process.env.FASTPILOT_SKIP_DOWNLOAD === "1") return;
27
+ const target = targets[`${process.platform}-${process.arch}`];
28
+ if (!target) {
29
+ throw new Error(`no prebuilt fastpilot for ${process.platform}-${process.arch}; build it from source: https://github.com/autobot-lab/fastpilot#build`);
30
+ }
31
+ const name = `fastpilot-${version}-${target}`;
32
+ const archive = await get(`${base}/v${version}/${name}.tar.gz`);
33
+ const want = (await get(`${base}/v${version}/${name}.tar.gz.sha256`)).toString().split(/\s+/)[0];
34
+ const got = crypto.createHash("sha256").update(archive).digest("hex");
35
+ if (want !== got) throw new Error(`checksum mismatch for ${name}.tar.gz (expected ${want}, got ${got})`);
36
+ const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "fastpilot-"));
37
+ try {
38
+ const file = path.join(tmp, `${name}.tar.gz`);
39
+ fs.writeFileSync(file, archive);
40
+ execFileSync("tar", ["-xzf", file, "-C", tmp]);
41
+ const vendor = path.join(__dirname, "vendor");
42
+ fs.mkdirSync(vendor, { recursive: true });
43
+ fs.copyFileSync(path.join(tmp, name, "fastpilot"), path.join(vendor, "fastpilot"));
44
+ fs.chmodSync(path.join(vendor, "fastpilot"), 0o755);
45
+ } finally {
46
+ fs.rmSync(tmp, { recursive: true, force: true });
47
+ }
48
+ console.log(`fastpilot ${version} (${target}) installed`);
49
+ }
50
+
51
+ main().catch((e) => {
52
+ console.error(`fastpilot: ${e.message}`);
53
+ process.exit(1);
54
+ });
package/package.json CHANGED
@@ -1,6 +1,14 @@
1
1
  {
2
2
  "name": "fastpilot",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "AI-driven QA for web, Android and iOS: an MCP server and shell CLI (prebuilt binary).",
5
+ "license": "Apache-2.0",
6
+ "homepage": "https://github.com/autobot-lab/fastpilot",
7
+ "repository": { "type": "git", "url": "git+https://github.com/autobot-lab/fastpilot.git" },
8
+ "bin": { "fastpilot": "bin/fastpilot.js" },
9
+ "scripts": { "postinstall": "node install.js" },
10
+ "files": ["bin/fastpilot.js", "install.js", "README.md"],
11
+ "os": ["darwin", "linux"],
12
+ "cpu": ["arm64", "x64"],
13
+ "engines": { "node": ">=18" }
14
+ }