@securityreviewai/vibereview-cli 0.1.5 → 0.1.6

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.
@@ -1,17 +1,24 @@
1
1
  import { execFile } from "node:child_process";
2
- import { promisify } from "node:util";
3
- const execFileAsync = promisify(execFile);
4
2
  const DEFAULT_TIMEOUT_MS = 5 * 60_000;
5
3
  export async function executeAgent(executable, args, cwd) {
6
4
  try {
7
- const result = await execFileAsync(executable, args, {
8
- cwd,
9
- timeout: agentTimeout(),
10
- maxBuffer: 8 * 1024 * 1024,
11
- encoding: "utf8",
12
- env: { ...process.env, VIBEREVIEW_INTERNAL: "1" },
5
+ return await new Promise((resolve, reject) => {
6
+ const child = execFile(executable, args, {
7
+ cwd,
8
+ timeout: agentTimeout(),
9
+ maxBuffer: 8 * 1024 * 1024,
10
+ encoding: "utf8",
11
+ env: { ...process.env, VIBEREVIEW_INTERNAL: "1" },
12
+ }, (error, stdout, stderr) => {
13
+ if (error) {
14
+ Object.assign(error, { stderr });
15
+ reject(error);
16
+ return;
17
+ }
18
+ resolve({ stdout, stderr });
19
+ });
20
+ child.stdin?.end();
13
21
  });
14
- return { stdout: result.stdout, stderr: result.stderr };
15
22
  }
16
23
  catch (error) {
17
24
  const details = commandErrorDetails(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@securityreviewai/vibereview-cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Local-first security guardrails for AI coding agents.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -3,7 +3,7 @@
3
3
  "additionalProperties": false,
4
4
  "required": ["schema_version", "summary", "guardrails"],
5
5
  "properties": {
6
- "schema_version": { "const": "1" },
6
+ "schema_version": { "type": "string", "const": "1" },
7
7
  "summary": { "type": "string" },
8
8
  "guardrails": {
9
9
  "type": "array",
@@ -13,11 +13,11 @@
13
13
  "required": ["title", "type", "category", "instruction", "rationale", "confidence", "evidence", "cwe_ids", "owasp_top10"],
14
14
  "properties": {
15
15
  "title": { "type": "string" },
16
- "type": { "enum": ["must", "must_not"] },
16
+ "type": { "type": "string", "enum": ["must", "must_not"] },
17
17
  "category": { "type": "string" },
18
18
  "instruction": { "type": "string" },
19
19
  "rationale": { "type": "string" },
20
- "confidence": { "enum": ["high", "medium"] },
20
+ "confidence": { "type": "string", "enum": ["high", "medium"] },
21
21
  "evidence": {
22
22
  "type": "array",
23
23
  "items": {