@securityreviewai/vibereview-cli 0.1.0 → 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.
@@ -68,8 +68,9 @@ export async function initCommand(options) {
68
68
  generationError = error instanceof Error ? error.message : String(error);
69
69
  if (!options.json) {
70
70
  ui.warning("Code-specific generation failed; baseline guardrails will still be installed.");
71
- if (options.verbose)
72
- ui.detail(` ${generationError}`);
71
+ ui.detail(` ${friendlyGenerationError(provider, generationError)}`);
72
+ if (options.verbose && friendlyGenerationError(provider, generationError) !== generationError)
73
+ ui.detail(` Detail: ${generationError}`);
73
74
  ui.detail(" Retry later with: vibereview guardrails generate");
74
75
  }
75
76
  }
@@ -139,4 +140,16 @@ function formatList(items) {
139
140
  return `${items[0]} and ${items[1]}`;
140
141
  return `${items.slice(0, -1).join(", ")} and ${items.at(-1)}`;
141
142
  }
143
+ function friendlyGenerationError(provider, message) {
144
+ if (/authentication required|not authenticated|logged out|unauthenticated/i.test(message)) {
145
+ if (provider === "cursor")
146
+ return 'Cursor authentication is not usable by the headless agent. Run `cursor-agent login`, verify with `cursor-agent -p "Return only OK"`, then retry.';
147
+ return `${PROVIDER_NAMES[provider]} authentication is not usable by its headless agent. Re-authenticate the provider CLI, then retry.`;
148
+ }
149
+ if (/timed out|timeout/i.test(message))
150
+ return "The provider agent timed out. Retry, or increase VIBEREVIEW_AGENT_TIMEOUT_MS.";
151
+ if (/rate.?limit|too many requests|quota/i.test(message))
152
+ return "The provider rejected the request because of a rate limit or quota.";
153
+ return message;
154
+ }
142
155
  //# sourceMappingURL=init.js.map
@@ -9,8 +9,16 @@ export async function checkCursorPreflight(run = runProviderCommand) {
9
9
  }
10
10
  try {
11
11
  const output = await run("cursor-agent", ["status"]);
12
- if (/not authenticated|logged out|unauthenticated|\berror:/i.test(output))
13
- throw new Error("authentication check failed");
12
+ if (/not authenticated|authentication required|logged out|unauthenticated|unable to fetch user details|SecItemCopyMatching|\berror:/i.test(output)) {
13
+ return {
14
+ provider: "cursor",
15
+ displayName: "Cursor",
16
+ executable: "cursor-agent",
17
+ version,
18
+ authentication: "deferred",
19
+ authenticationMessage: "Cursor login could not be fully verified; generation will confirm it. Run `cursor-agent login` if generation reports authentication required",
20
+ };
21
+ }
14
22
  }
15
23
  catch {
16
24
  throw new Error("Cursor CLI authentication could not be verified. Run `cursor-agent status` or `cursor-agent login`, then retry `vibereview init`.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@securityreviewai/vibereview-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Local-first security guardrails for AI coding agents.",
5
5
  "type": "module",
6
6
  "bin": {