agenteval-cli 0.7.11 → 0.8.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
@@ -5,6 +5,7 @@ Your CLAUDE.md is untested. So is your AGENTS.md, your copilot-instructions.md,
5
5
  agenteval is a linter, benchmarker, and CI gate for AI coding instructions. It finds dead references, token bloat, contradictions, and stale instructions before your agent does.
6
6
 
7
7
  [![npm](https://img.shields.io/npm/v/agenteval-cli)](https://www.npmjs.com/package/agenteval-cli)
8
+ [![npm downloads](https://img.shields.io/npm/dm/agenteval-cli)](https://www.npmjs.com/package/agenteval-cli)
8
9
  [![CI](https://github.com/lukasmetzler/agenteval/actions/workflows/ci.yml/badge.svg)](https://github.com/lukasmetzler/agenteval/actions/workflows/ci.yml)
9
10
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/lukasmetzler/agenteval/blob/main/LICENSE)
10
11
 
package/bin/agenteval CHANGED
@@ -1,4 +1,38 @@
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
1
+ #!/usr/bin/env node
2
+
3
+ const { execFileSync } = require("child_process");
4
+ const { join } = require("path");
5
+
6
+ const PLATFORMS = {
7
+ "linux-x64": "@agenteval/linux-x64",
8
+ "darwin-arm64": "@agenteval/darwin-arm64",
9
+ "darwin-x64": "@agenteval/darwin-x64",
10
+ };
11
+
12
+ const key = `${process.platform === "win32" ? "win32" : process.platform}-${process.arch}`;
13
+ const pkg = PLATFORMS[key];
14
+
15
+ if (!pkg) {
16
+ console.error(`agenteval: unsupported platform ${process.platform}-${process.arch}`);
17
+ console.error("Supported: linux-x64, darwin-arm64, darwin-x64");
18
+ console.error("Install manually: https://github.com/lukasmetzler/agenteval/releases");
19
+ process.exit(1);
20
+ }
21
+
22
+ let binPath;
23
+ try {
24
+ binPath = join(require.resolve(`${pkg}/package.json`), "..", "bin", "agenteval");
25
+ } catch {
26
+ console.error(`agenteval: platform package ${pkg} not installed.`);
27
+ console.error("Try reinstalling: npm install -g agenteval-cli");
28
+ process.exit(1);
29
+ }
30
+
31
+ try {
32
+ execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
33
+ } catch (err) {
34
+ if (err && typeof err === "object" && "status" in err) {
35
+ process.exit(err.status);
36
+ }
37
+ process.exit(1);
38
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agenteval-cli",
3
- "version": "0.7.11",
3
+ "version": "0.8.1",
4
4
  "description": "Lint, benchmark, and CI gate for AI coding instructions",
5
5
  "keywords": [
6
6
  "cli",
@@ -12,7 +12,9 @@
12
12
  "instructions",
13
13
  "agents",
14
14
  "lint",
15
- "benchmark"
15
+ "benchmark",
16
+ "cursor",
17
+ "agenteval"
16
18
  ],
17
19
  "repository": {
18
20
  "type": "git",
@@ -24,15 +26,19 @@
24
26
  "url": "https://github.com/lukasmetzler/agenteval/issues"
25
27
  },
26
28
  "license": "MIT",
29
+ "engines": {
30
+ "node": ">=18"
31
+ },
27
32
  "bin": {
28
33
  "agenteval": "bin/agenteval"
29
34
  },
30
- "scripts": {
31
- "postinstall": "node install.mjs"
32
- },
33
35
  "files": [
34
36
  "bin/",
35
- "install.mjs",
36
37
  "README.md"
37
- ]
38
+ ],
39
+ "optionalDependencies": {
40
+ "@agenteval/linux-x64": "0.8.1",
41
+ "@agenteval/darwin-arm64": "0.8.1",
42
+ "@agenteval/darwin-x64": "0.8.1"
43
+ }
38
44
  }
package/install.mjs DELETED
@@ -1,69 +0,0 @@
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
- });