@rely-ai/caliber 1.5.1 → 1.5.3

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 +25 -12
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -2543,7 +2543,8 @@ var PRECOMMIT_START = "# caliber:pre-commit:start";
2543
2543
  var PRECOMMIT_END = "# caliber:pre-commit:end";
2544
2544
  var PRECOMMIT_BLOCK = `${PRECOMMIT_START}
2545
2545
  if command -v caliber >/dev/null 2>&1; then
2546
- caliber refresh --quiet 2>/dev/null || true
2546
+ echo "\\033[2mcaliber: refreshing docs...\\033[0m"
2547
+ caliber refresh 2>/dev/null || true
2547
2548
  git diff --name-only -- CLAUDE.md .claude/ .cursor/ AGENTS.md 2>/dev/null | xargs git add 2>/dev/null || true
2548
2549
  fi
2549
2550
  ${PRECOMMIT_END}`;
@@ -5176,23 +5177,30 @@ async function interactiveSelect2(recs) {
5176
5177
  const hasScores = recs.some((r) => r.score > 0);
5177
5178
  function render() {
5178
5179
  const lines = [];
5180
+ const cols = process.stdout.columns || 80;
5181
+ const nameWidth = Math.max(...recs.map((r) => r.name.length), 4) + 2;
5182
+ const prefixWidth = 8;
5183
+ const scoreWidth = 6;
5179
5184
  lines.push(chalk6.bold(" Skills"));
5180
5185
  lines.push("");
5181
5186
  if (hasScores) {
5182
- lines.push(` ${chalk6.dim("Score".padEnd(7))} ${chalk6.dim("Name".padEnd(28))} ${chalk6.dim("Why")}`);
5187
+ const header = " ".repeat(prefixWidth) + chalk6.dim("Score".padEnd(scoreWidth)) + chalk6.dim("Name".padEnd(nameWidth)) + chalk6.dim("Why");
5188
+ lines.push(header);
5183
5189
  } else {
5184
- lines.push(` ${chalk6.dim("Name".padEnd(30))} ${chalk6.dim("Technology".padEnd(18))} ${chalk6.dim("Source")}`);
5190
+ const header = " ".repeat(prefixWidth) + chalk6.dim("Name".padEnd(nameWidth)) + chalk6.dim("Technology".padEnd(18)) + chalk6.dim("Source");
5191
+ lines.push(header);
5185
5192
  }
5186
- lines.push(chalk6.dim(" " + "\u2500".repeat(70)));
5193
+ lines.push(chalk6.dim(" " + "\u2500".repeat(Math.min(cols - 4, 90))));
5187
5194
  for (let i = 0; i < recs.length; i++) {
5188
5195
  const rec = recs[i];
5189
5196
  const check = selected.has(i) ? chalk6.green("[x]") : "[ ]";
5190
5197
  const ptr = i === cursor ? chalk6.cyan(">") : " ";
5191
5198
  if (hasScores) {
5192
5199
  const scoreColor = rec.score >= 90 ? chalk6.green : rec.score >= 70 ? chalk6.yellow : chalk6.dim;
5193
- lines.push(` ${ptr} ${check} ${scoreColor(String(rec.score).padStart(3))} ${rec.name.padEnd(26)} ${chalk6.dim(rec.reason.slice(0, 40))}`);
5200
+ const reasonMax = Math.max(cols - prefixWidth - scoreWidth - nameWidth - 2, 20);
5201
+ lines.push(` ${ptr} ${check} ${scoreColor(String(rec.score).padStart(3))} ${rec.name.padEnd(nameWidth)}${chalk6.dim(rec.reason.slice(0, reasonMax))}`);
5194
5202
  } else {
5195
- lines.push(` ${ptr} ${check} ${rec.name.padEnd(28)} ${rec.detected_technology.padEnd(16)} ${chalk6.dim(rec.source_url || "")}`);
5203
+ lines.push(` ${ptr} ${check} ${rec.name.padEnd(nameWidth)}${rec.detected_technology.padEnd(16)} ${chalk6.dim(rec.source_url || "")}`);
5196
5204
  }
5197
5205
  }
5198
5206
  lines.push("");
@@ -5327,18 +5335,23 @@ async function installSkills(recs, platforms, contentMap) {
5327
5335
  }
5328
5336
  function printSkills(recs) {
5329
5337
  const hasScores = recs.some((r) => r.score > 0);
5338
+ const cols = process.stdout.columns || 80;
5339
+ const nameWidth = Math.max(...recs.map((r) => r.name.length), 4) + 2;
5340
+ const scoreWidth = 6;
5341
+ const prefixWidth = 2;
5330
5342
  console.log(chalk6.bold("\n Skills\n"));
5331
5343
  if (hasScores) {
5332
- console.log(` ${chalk6.dim("Score".padEnd(7))} ${chalk6.dim("Name".padEnd(28))} ${chalk6.dim("Why")}`);
5344
+ console.log(" ".repeat(prefixWidth) + chalk6.dim("Score".padEnd(scoreWidth)) + chalk6.dim("Name".padEnd(nameWidth)) + chalk6.dim("Why"));
5333
5345
  } else {
5334
- console.log(` ${chalk6.dim("Name".padEnd(30))} ${chalk6.dim("Technology".padEnd(18))} ${chalk6.dim("Source")}`);
5346
+ console.log(" ".repeat(prefixWidth) + chalk6.dim("Name".padEnd(nameWidth)) + chalk6.dim("Technology".padEnd(18)) + chalk6.dim("Source"));
5335
5347
  }
5336
- console.log(chalk6.dim(" " + "\u2500".repeat(70)));
5348
+ console.log(chalk6.dim(" " + "\u2500".repeat(Math.min(cols - 4, 90))));
5337
5349
  for (const rec of recs) {
5338
5350
  if (hasScores) {
5339
- console.log(` ${String(rec.score).padStart(3)} ${rec.name.padEnd(26)} ${chalk6.dim(rec.reason.slice(0, 50))}`);
5351
+ const reasonMax = Math.max(cols - prefixWidth - scoreWidth - nameWidth - 2, 20);
5352
+ console.log(` ${String(rec.score).padStart(3)} ${rec.name.padEnd(nameWidth)}${chalk6.dim(rec.reason.slice(0, reasonMax))}`);
5340
5353
  } else {
5341
- console.log(` ${rec.name.padEnd(28)} ${rec.detected_technology.padEnd(16)} ${chalk6.dim(rec.source_url || "")}`);
5354
+ console.log(` ${rec.name.padEnd(nameWidth)}${rec.detected_technology.padEnd(16)} ${chalk6.dim(rec.source_url || "")}`);
5342
5355
  }
5343
5356
  }
5344
5357
  console.log("");
@@ -7073,7 +7086,7 @@ program.command("skills").description("Discover and install community skills for
7073
7086
  program.command("score").description("Score your current agent config setup (deterministic, no network)").option("--json", "Output as JSON").option("--quiet", "One-line output for scripts/hooks").option("--agent <type>", "Target agents (comma-separated): claude, cursor, codex", parseAgentOption).action(scoreCommand);
7074
7087
  program.command("refresh").description("Update docs based on recent code changes").option("--quiet", "Suppress output (for use in hooks)").option("--dry-run", "Preview changes without writing files").action(refreshCommand);
7075
7088
  program.command("hooks").description("Manage auto-refresh hooks (toggle interactively)").option("--install", "Enable all hooks non-interactively").option("--remove", "Disable all hooks non-interactively").action(hooksCommand);
7076
- var learn = program.command("learn").description("Session learning \u2014 observe tool usage and extract reusable instructions");
7089
+ var learn = program.command("learn", { hidden: true }).description("[dev] Session learning \u2014 observe tool usage and extract reusable instructions");
7077
7090
  learn.command("observe").description("Record a tool event from stdin (called by hooks)").option("--failure", "Mark event as a tool failure").action(learnObserveCommand);
7078
7091
  learn.command("finalize").description("Analyze session events and update CLAUDE.md (called on SessionEnd)").action(learnFinalizeCommand);
7079
7092
  learn.command("install").description("Install learning hooks into .claude/settings.json").action(learnInstallCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rely-ai/caliber",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
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": {