agenteval-cli 0.7.10

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/agenteval ADDED
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ # Placeholder — replaced by the actual binary during postinstall
3
+ echo "agenteval binary not installed. Run: npm rebuild agenteval" >&2
4
+ exit 1
package/install.mjs ADDED
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { chmodSync, createWriteStream, existsSync, mkdirSync, readFileSync } from "node:fs";
4
+ import https from "node:https";
5
+ import { dirname, join } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+ const REPO = "lukasmetzler/agenteval";
10
+ const binDir = join(__dirname, "bin");
11
+ const binPath = join(binDir, "agenteval");
12
+
13
+ function detectBinary() {
14
+ const platform = process.platform === "darwin" ? "darwin" : "linux";
15
+ const arch = process.arch === "arm64" ? "arm64" : "x64";
16
+
17
+ if (platform === "linux" && arch !== "x64") {
18
+ throw new Error(`Unsupported platform: ${platform}-${arch}`);
19
+ }
20
+
21
+ return `agenteval-${platform}-${arch}`;
22
+ }
23
+
24
+ function download(url, dest) {
25
+ return new Promise((resolve, reject) => {
26
+ https
27
+ .get(url, { headers: { "User-Agent": "agenteval-npm" } }, (res) => {
28
+ if (res.statusCode === 301 || res.statusCode === 302) {
29
+ return download(res.headers.location, dest).then(resolve, reject);
30
+ }
31
+ if (res.statusCode !== 200) {
32
+ reject(new Error(`Download failed: HTTP ${res.statusCode}`));
33
+ return;
34
+ }
35
+ const file = createWriteStream(dest);
36
+ res.pipe(file);
37
+ file.on("finish", () => {
38
+ file.close();
39
+ resolve();
40
+ });
41
+ file.on("error", reject);
42
+ })
43
+ .on("error", reject);
44
+ });
45
+ }
46
+
47
+ async function main() {
48
+ const binary = detectBinary();
49
+
50
+ // Read version from package.json
51
+ const pkg = JSON.parse(readFileSync(join(__dirname, "package.json"), "utf8"));
52
+ const version = `v${pkg.version}`;
53
+ const url = `https://github.com/${REPO}/releases/download/${version}/${binary}`;
54
+
55
+ if (!existsSync(binDir)) {
56
+ mkdirSync(binDir, { recursive: true });
57
+ }
58
+
59
+ console.log(`Downloading agenteval ${version} (${binary})...`);
60
+ await download(url, binPath);
61
+ chmodSync(binPath, 0o755);
62
+ console.log("agenteval installed successfully.");
63
+ }
64
+
65
+ main().catch((err) => {
66
+ console.error(`Failed to install agenteval: ${err.message}`);
67
+ console.error("Install manually: https://github.com/lukasmetzler/agenteval/releases");
68
+ process.exit(1);
69
+ });
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "agenteval-cli",
3
+ "version": "0.7.10",
4
+ "description": "Lint, benchmark, and CI gate for AI coding instructions",
5
+ "keywords": [
6
+ "cli",
7
+ "ai",
8
+ "testing",
9
+ "evaluation",
10
+ "claude",
11
+ "copilot",
12
+ "instructions",
13
+ "agents",
14
+ "lint",
15
+ "benchmark"
16
+ ],
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "https://github.com/lukasmetzler/agenteval.git"
20
+ },
21
+ "author": "Lukas Metzler",
22
+ "homepage": "https://github.com/lukasmetzler/agenteval",
23
+ "bugs": {
24
+ "url": "https://github.com/lukasmetzler/agenteval/issues"
25
+ },
26
+ "license": "MIT",
27
+ "bin": {
28
+ "agenteval": "bin/agenteval"
29
+ },
30
+ "scripts": {
31
+ "postinstall": "node install.mjs"
32
+ },
33
+ "files": [
34
+ "bin/",
35
+ "install.mjs",
36
+ "README.md"
37
+ ]
38
+ }