@rely-ai/caliber 1.20.0-dev.1773694290 → 1.20.0-dev.1773695140

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 +74 -34
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -5816,6 +5816,9 @@ function trackSkillsInstalled(count) {
5816
5816
  function trackUndoExecuted() {
5817
5817
  trackEvent("undo_executed");
5818
5818
  }
5819
+ function trackInitLearnEnabled(enabled) {
5820
+ trackEvent("init_learn_enabled", { enabled });
5821
+ }
5819
5822
  function trackLearnSessionAnalyzed(props) {
5820
5823
  trackEvent("learn_session_analyzed", {
5821
5824
  event_count: props.eventCount,
@@ -6710,58 +6713,58 @@ import chalk9 from "chalk";
6710
6713
  // src/utils/waiting-cards.json
6711
6714
  var waiting_cards_default = [
6712
6715
  {
6713
- title: "What is Caliber?",
6716
+ title: "Welcome to Caliber!",
6714
6717
  icon: "?",
6715
6718
  lines: [
6716
- "Caliber scans your project and generates tailored configs",
6717
- "for Claude Code, Cursor, and Codex \u2014 so your AI agent",
6718
- "understands your codebase from the start."
6719
+ "Caliber is your agentic development companion.",
6720
+ "It analyzes your repository, understands how you work,",
6721
+ "and adapts your AI agent to fit you and your project."
6719
6722
  ]
6720
6723
  },
6721
6724
  {
6722
- title: "Generated Configs",
6725
+ title: "Understanding Your Project",
6726
+ icon: "\u25CE",
6727
+ lines: [
6728
+ "Right now, Caliber is reading your repo \u2014 file structure,",
6729
+ "languages, tools, and conventions. This fingerprint is the",
6730
+ "foundation everything else builds on."
6731
+ ]
6732
+ },
6733
+ {
6734
+ title: "Tailored Configs",
6723
6735
  icon: "\u2699",
6724
6736
  lines: [
6725
- "CLAUDE.md and .cursor/rules/ tell your AI agent about",
6726
- "your build commands, conventions, architecture, and tools.",
6727
- "Think of them as onboarding docs \u2014 but for your copilot."
6737
+ "That understanding becomes CLAUDE.md and .cursor/rules/ \u2014",
6738
+ "personalized instructions your agent reads before every task.",
6739
+ "Not generic templates. Configs shaped to your codebase."
6728
6740
  ]
6729
6741
  },
6730
6742
  {
6731
- title: "Skills",
6743
+ title: "Skills for Your Workflow",
6732
6744
  icon: "\u26A1",
6733
6745
  lines: [
6734
- "Skills are reusable task-specific instructions your agent",
6735
- "loads on demand \u2014 deploy scripts, migration patterns, etc.",
6736
- "Run `caliber skills` to search the community registry."
6746
+ "Beyond configs, Caliber generates skills \u2014 focused",
6747
+ "instructions for deploying, migrating, or reviewing code,",
6748
+ "shaped to your project. Browse more with `caliber skills`."
6737
6749
  ]
6738
6750
  },
6739
6751
  {
6740
- title: "Keep Configs Fresh",
6752
+ title: "Stays in Sync",
6741
6753
  icon: "\u21BB",
6742
6754
  lines: [
6743
- "As your code evolves, configs drift. `caliber refresh`",
6744
- "reads your recent git diffs and updates configs to match.",
6745
- "Add it as a post-commit hook for hands-free updates."
6755
+ "Your code evolves, so your configs should too.",
6756
+ "`caliber refresh` reads recent changes and updates configs",
6757
+ "to match. Set it as a hook and forget about it."
6746
6758
  ]
6747
6759
  },
6748
6760
  {
6749
- title: "Score Your Setup",
6761
+ title: "Measures Itself",
6750
6762
  icon: "\u2605",
6751
6763
  lines: [
6752
- "`caliber score` runs 20+ checks against your config \u2014",
6764
+ "`caliber score` checks how well your setup serves the agent \u2014",
6753
6765
  "grounding, accuracy, freshness \u2014 and gives a letter grade.",
6754
6766
  "Aim for an A to get the most out of your AI agent."
6755
6767
  ]
6756
- },
6757
- {
6758
- title: "Quick Health Check",
6759
- icon: "\u2764",
6760
- lines: [
6761
- "`caliber status` shows what you have configured,",
6762
- "which hooks are active, and if anything needs attention.",
6763
- "It runs in under a second \u2014 great for CI checks too."
6764
- ]
6765
6768
  }
6766
6769
  ];
6767
6770
 
@@ -7441,13 +7444,6 @@ ${agentRefs.join(" ")}
7441
7444
  } else if (hookResult.alreadyInstalled) {
7442
7445
  console.log(chalk11.dim(" Claude Code hook already installed"));
7443
7446
  }
7444
- const learnResult = installLearningHooks();
7445
- if (learnResult.installed) {
7446
- console.log(` ${chalk11.green("\u2713")} Learning hooks installed \u2014 session insights captured automatically`);
7447
- console.log(chalk11.dim(" Run ") + chalk11.hex("#83D1EB")("caliber learn remove") + chalk11.dim(" to disable"));
7448
- } else if (learnResult.alreadyInstalled) {
7449
- console.log(chalk11.dim(" Learning hooks already installed"));
7450
- }
7451
7447
  }
7452
7448
  if (hookChoice === "precommit" || hookChoice === "both") {
7453
7449
  const precommitResult = installPreCommitHook();
@@ -7463,6 +7459,31 @@ ${agentRefs.join(" ")}
7463
7459
  if (hookChoice === "skip") {
7464
7460
  console.log(chalk11.dim(" Skipped auto-sync hooks. Run ") + chalk11.hex("#83D1EB")("caliber hooks --install") + chalk11.dim(" later to enable."));
7465
7461
  }
7462
+ const hasLearnableAgent = targetAgent.includes("claude") || targetAgent.includes("cursor");
7463
+ if (hasLearnableAgent) {
7464
+ if (!options.autoApprove) {
7465
+ const enableLearn = await promptLearnInstall(targetAgent);
7466
+ trackInitLearnEnabled(enableLearn);
7467
+ if (enableLearn) {
7468
+ if (targetAgent.includes("claude")) {
7469
+ const r = installLearningHooks();
7470
+ if (r.installed) console.log(` ${chalk11.green("\u2713")} Learning hooks installed for Claude Code`);
7471
+ else if (r.alreadyInstalled) console.log(chalk11.dim(" Claude Code learning hooks already installed"));
7472
+ }
7473
+ if (targetAgent.includes("cursor")) {
7474
+ const r = installCursorLearningHooks();
7475
+ if (r.installed) console.log(` ${chalk11.green("\u2713")} Learning hooks installed for Cursor`);
7476
+ else if (r.alreadyInstalled) console.log(chalk11.dim(" Cursor learning hooks already installed"));
7477
+ }
7478
+ console.log(chalk11.dim(" Run ") + chalk11.hex("#83D1EB")("caliber learn status") + chalk11.dim(" to see insights"));
7479
+ } else {
7480
+ console.log(chalk11.dim(" Skipped. Run ") + chalk11.hex("#83D1EB")("caliber learn install") + chalk11.dim(" later to enable."));
7481
+ }
7482
+ } else {
7483
+ if (targetAgent.includes("claude")) installLearningHooks();
7484
+ if (targetAgent.includes("cursor")) installCursorLearningHooks();
7485
+ }
7486
+ }
7466
7487
  console.log(chalk11.bold.green("\n Setup complete!"));
7467
7488
  console.log(chalk11.dim(" Your AI agents now understand your project's architecture, build commands,"));
7468
7489
  console.log(chalk11.dim(" testing patterns, and conventions. All changes are backed up automatically.\n"));
@@ -7619,6 +7640,25 @@ async function promptHookType(targetAgent) {
7619
7640
  choices
7620
7641
  });
7621
7642
  }
7643
+ async function promptLearnInstall(targetAgent) {
7644
+ const hasClaude = targetAgent.includes("claude");
7645
+ const hasCursor = targetAgent.includes("cursor");
7646
+ const agentName = hasClaude && hasCursor ? "Claude and Cursor" : hasClaude ? "Claude" : "Cursor";
7647
+ console.log(chalk11.bold(`
7648
+ Session Learning
7649
+ `));
7650
+ console.log(chalk11.dim(` Caliber can learn from your ${agentName} sessions \u2014 when a tool fails`));
7651
+ console.log(chalk11.dim(` or you correct a mistake, it captures the lesson so it won't`));
7652
+ console.log(chalk11.dim(` happen again. Runs once at session end using the fast model.
7653
+ `));
7654
+ return select5({
7655
+ message: "Enable session learning?",
7656
+ choices: [
7657
+ { name: "Enable session learning (recommended)", value: true },
7658
+ { name: "Skip for now", value: false }
7659
+ ]
7660
+ });
7661
+ }
7622
7662
  async function promptReviewAction(hasSkillResults = false) {
7623
7663
  const acceptLabel = hasSkillResults ? "Accept and continue to community skills" : "Accept and apply";
7624
7664
  return select5({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rely-ai/caliber",
3
- "version": "1.20.0-dev.1773694290",
3
+ "version": "1.20.0-dev.1773695140",
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": {