@rely-ai/caliber 1.14.2 → 1.15.0

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.
Files changed (2) hide show
  1. package/dist/bin.js +21 -59
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -3595,6 +3595,7 @@ init_config();
3595
3595
  import chalk4 from "chalk";
3596
3596
  import readline2 from "readline";
3597
3597
  import select3 from "@inquirer/select";
3598
+ import confirm from "@inquirer/confirm";
3598
3599
  function promptInput(question) {
3599
3600
  const rl = readline2.createInterface({ input: process.stdin, output: process.stdout });
3600
3601
  return new Promise((resolve2) => {
@@ -3621,12 +3622,28 @@ async function runInteractiveProviderSetup(options) {
3621
3622
  switch (provider) {
3622
3623
  case "claude-cli": {
3623
3624
  config.model = "default";
3624
- console.log(chalk4.dim(" Run `claude` once and log in with your Pro/Max/Team account if you haven't."));
3625
+ if (!isClaudeCliAvailable()) {
3626
+ console.log(chalk4.yellow("\n Claude Code CLI not found."));
3627
+ console.log(chalk4.dim(" Install it: ") + chalk4.hex("#83D1EB")("npm install -g @anthropic-ai/claude-code"));
3628
+ console.log(chalk4.dim(" Then run ") + chalk4.hex("#83D1EB")("claude") + chalk4.dim(" once to log in.\n"));
3629
+ const proceed = await confirm({ message: "Continue anyway?" });
3630
+ if (!proceed) throw new Error("__exit__");
3631
+ } else {
3632
+ console.log(chalk4.dim(" Run `claude` once and log in with your Pro/Max/Team account if you haven't."));
3633
+ }
3625
3634
  break;
3626
3635
  }
3627
3636
  case "cursor": {
3628
3637
  config.model = "default";
3629
- console.log(chalk4.dim(" Run `agent login` if you haven't, or set CURSOR_API_KEY."));
3638
+ if (!isCursorAgentAvailable()) {
3639
+ console.log(chalk4.yellow("\n Cursor Agent CLI not found."));
3640
+ console.log(chalk4.dim(" Install it: ") + chalk4.hex("#83D1EB")("curl https://cursor.com/install -fsS | bash"));
3641
+ console.log(chalk4.dim(" Then run ") + chalk4.hex("#83D1EB")("agent login") + chalk4.dim(" to authenticate.\n"));
3642
+ const proceed = await confirm({ message: "Continue anyway?" });
3643
+ if (!proceed) throw new Error("__exit__");
3644
+ } else {
3645
+ console.log(chalk4.dim(" Run `agent login` if you haven't, or set CURSOR_API_KEY."));
3646
+ }
3630
3647
  break;
3631
3648
  }
3632
3649
  case "anthropic": {
@@ -6195,61 +6212,6 @@ async function initCommand(options) {
6195
6212
  if (rawOutput) report.addCodeBlock("Generation: Raw LLM Response", rawOutput);
6196
6213
  report.addJson("Generation: Parsed Setup", generatedSetup);
6197
6214
  }
6198
- {
6199
- const preWriteResult = writeSetup(generatedSetup);
6200
- const inlineScore = computeLocalScore(process.cwd(), targetAgent);
6201
- if (inlineScore.score < 100) {
6202
- const inlineFailingChecks = inlineScore.checks.filter((c) => !c.passed && c.maxPoints > 0).filter((c) => !NON_LLM_CHECKS.has(c.id));
6203
- if (inlineFailingChecks.length > 0) {
6204
- genSpinner.text = "Polishing generated setup...";
6205
- log(options.verbose, `Inline polish: score ${inlineScore.score}/100, fixing ${inlineFailingChecks.length} checks`);
6206
- try {
6207
- const polishResult = await generateSetup(
6208
- fingerprint,
6209
- targetAgent,
6210
- void 0,
6211
- { onStatus: () => {
6212
- }, onComplete: () => {
6213
- }, onError: () => {
6214
- } },
6215
- inlineFailingChecks.map((c) => ({ name: c.name, suggestion: c.suggestion, fix: c.fix })),
6216
- inlineScore.score,
6217
- inlineScore.checks.filter((c) => c.passed).map((c) => ({ name: c.name })),
6218
- { skipSkills: true, forceTargetedFix: true }
6219
- );
6220
- if (polishResult.setup) {
6221
- const origClaude = generatedSetup.claude;
6222
- const origCodex = generatedSetup.codex;
6223
- const origCursor = generatedSetup.cursor;
6224
- generatedSetup = polishResult.setup;
6225
- const polishedClaude = generatedSetup.claude ?? {};
6226
- const polishedCodex = generatedSetup.codex ?? {};
6227
- const polishedCursor = generatedSetup.cursor ?? {};
6228
- if (origClaude?.skills && !polishedClaude.skills) {
6229
- polishedClaude.skills = origClaude.skills;
6230
- generatedSetup.claude = polishedClaude;
6231
- }
6232
- if (origCodex?.skills && !polishedCodex.skills) {
6233
- polishedCodex.skills = origCodex.skills;
6234
- generatedSetup.codex = polishedCodex;
6235
- }
6236
- if (origCursor?.skills && !polishedCursor.skills) {
6237
- polishedCursor.skills = origCursor.skills;
6238
- generatedSetup.cursor = polishedCursor;
6239
- }
6240
- writeSetup(generatedSetup);
6241
- log(options.verbose, "Inline polish applied");
6242
- }
6243
- } catch {
6244
- log(options.verbose, "Inline polish failed, continuing with original");
6245
- }
6246
- }
6247
- }
6248
- try {
6249
- undoSetup();
6250
- } catch {
6251
- }
6252
- }
6253
6215
  const elapsedMs = Date.now() - genStartTime;
6254
6216
  trackInitGenerationCompleted(elapsedMs, 0);
6255
6217
  const mins = Math.floor(elapsedMs / 6e4);
@@ -7997,7 +7959,7 @@ import { fileURLToPath as fileURLToPath2 } from "url";
7997
7959
  import { execSync as execSync13 } from "child_process";
7998
7960
  import chalk17 from "chalk";
7999
7961
  import ora6 from "ora";
8000
- import confirm from "@inquirer/confirm";
7962
+ import confirm2 from "@inquirer/confirm";
8001
7963
  var __dirname_vc = path26.dirname(fileURLToPath2(import.meta.url));
8002
7964
  var pkg2 = JSON.parse(
8003
7965
  fs32.readFileSync(path26.resolve(__dirname_vc, "..", "package.json"), "utf-8")
@@ -8042,7 +8004,7 @@ Run ${chalk17.bold("npm install -g @rely-ai/caliber")} to upgrade.
8042
8004
  chalk17.yellow(`
8043
8005
  Update available: ${current} -> ${latest}`)
8044
8006
  );
8045
- const shouldUpdate = await confirm({ message: "Would you like to update now? (Y/n)", default: true });
8007
+ const shouldUpdate = await confirm2({ message: "Would you like to update now? (Y/n)", default: true });
8046
8008
  if (!shouldUpdate) {
8047
8009
  console.log();
8048
8010
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rely-ai/caliber",
3
- "version": "1.14.2",
3
+ "version": "1.15.0",
4
4
  "description": "Analyze your codebase and generate optimized AI agent configs (CLAUDE.md, .cursorrules, skills) — no API key needed",
5
5
  "type": "module",
6
6
  "bin": {