@rely-ai/caliber 1.31.0-dev.1774714955 → 1.31.0-dev.1774741028

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 +60 -4
  2. package/package.json +1 -1
package/dist/bin.js CHANGED
@@ -276,7 +276,7 @@ Run: \`grep -q "caliber" .git/hooks/pre-commit 2>/dev/null && echo "hook-active"
276
276
  If hook-active: just commit normally \u2014 Caliber syncs automatically via the hook. Tell the user: "Caliber will sync your agent configs automatically."
277
277
  If no-hook: run \`${bin} refresh && git add ${MANAGED_DOC_PATHS} 2>/dev/null\` before committing, and tell the user what was updated.
278
278
 
279
- If \`${bin}\` is not found, tell the user: "This project uses Caliber for agent config sync. Run /setup-caliber to get set up."
279
+ If \`${bin}\` is not found, read the setup-caliber skill from .cursor/skills/setup-caliber/SKILL.md and follow its instructions to install Caliber.
280
280
  `;
281
281
  }
282
282
  function hasPreCommitBlock(content) {
@@ -327,7 +327,7 @@ alwaysApply: true
327
327
  ---
328
328
  This project uses Caliber to keep AI agent configs (CLAUDE.md, Cursor rules, Copilot instructions)
329
329
  in sync with the codebase automatically. Before each commit, run \`${bin} refresh\` to sync configs.
330
- If \`${bin}\` is not found, tell the user: "This project uses Caliber for agent config sync. Run /setup-caliber to get set up."
330
+ If \`${bin}\` is not found, read the setup-caliber skill from .cursor/skills/setup-caliber/SKILL.md and follow its instructions to install Caliber.
331
331
  `;
332
332
  }
333
333
  function getCursorSyncRule() {
@@ -573,7 +573,27 @@ caliber score --json --quiet 2>/dev/null | head -1
573
573
 
574
574
  Ask the user: "Are you setting up for yourself only, or for your team too?"
575
575
 
576
- - If **solo** \u2192 Tell the user the summary (see below) and stop.
576
+ - If **solo** \u2192 Continue with solo setup:
577
+
578
+ Check if session learning is enabled:
579
+ \`\`\`bash
580
+ caliber learn status 2>/dev/null | head -3
581
+ \`\`\`
582
+ - If learning is already enabled \u2192 note it in the summary.
583
+ - If not enabled \u2192 ask the user: "Caliber can learn from your coding sessions \u2014 when you correct a mistake or fix a pattern, it remembers for next time. Enable session learning?"
584
+ If yes:
585
+ \`\`\`bash
586
+ caliber learn install
587
+ \`\`\`
588
+
589
+ Then tell the user:
590
+ "You're all set! Here's what happens next:
591
+ - Every time you commit, Caliber syncs your agent configs automatically
592
+ - Your CLAUDE.md, Cursor rules, and AGENTS.md stay current with your code
593
+ - Run \`caliber skills\` anytime to discover community skills for your stack"
594
+
595
+ Then show the summary (see below) and stop.
596
+
577
597
  - If **team** \u2192 Check if the GitHub Action already exists:
578
598
  \`\`\`bash
579
599
  [ -f .github/workflows/caliber-sync.yml ] && echo "ACTION_EXISTS" || echo "NO_ACTION"
@@ -603,7 +623,43 @@ Ask the user: "Are you setting up for yourself only, or for your team too?"
603
623
  env:
604
624
  ANTHROPIC_API_KEY: \${{ secrets.ANTHROPIC_API_KEY }}
605
625
  \`\`\`
606
- Tell the user: "Add your ANTHROPIC_API_KEY to repo secrets (Settings \u2192 Secrets \u2192 Actions), then commit and push."
626
+ Now determine which LLM provider the team uses. Check the local Caliber config:
627
+ \`\`\`bash
628
+ caliber config --show 2>/dev/null || echo "NO_CONFIG"
629
+ \`\`\`
630
+
631
+ Based on the provider, the GitHub Action needs the corresponding secret:
632
+ - **anthropic** \u2192 \`ANTHROPIC_API_KEY\`
633
+ - **openai** \u2192 \`OPENAI_API_KEY\`
634
+ - **vertex** \u2192 \`VERTEX_PROJECT_ID\` and \`GOOGLE_APPLICATION_CREDENTIALS\` (service account JSON)
635
+
636
+ Update the workflow env block to match the provider. For example, if using OpenAI:
637
+ \`\`\`yaml
638
+ env:
639
+ OPENAI_API_KEY: \${{ secrets.OPENAI_API_KEY }}
640
+ \`\`\`
641
+
642
+ Then check if the \`gh\` CLI is available to set the secret:
643
+ \`\`\`bash
644
+ command -v gh >/dev/null 2>&1 && echo "GH_AVAILABLE" || echo "NO_GH"
645
+ \`\`\`
646
+
647
+ - If GH_AVAILABLE \u2192 Ask the user for their API key and set it:
648
+ \`\`\`bash
649
+ gh secret set ANTHROPIC_API_KEY
650
+ \`\`\`
651
+ (This prompts for the value securely via stdin)
652
+ - If NO_GH \u2192 Tell the user exactly what to do:
653
+ "Go to your repo on GitHub \u2192 Settings \u2192 Secrets and variables \u2192 Actions \u2192 New repository secret.
654
+ Name: ANTHROPIC_API_KEY (or OPENAI_API_KEY depending on provider)
655
+ Value: your API key"
656
+
657
+ Finally, offer to commit and push the workflow file:
658
+ \`\`\`bash
659
+ git add .github/workflows/caliber-sync.yml
660
+ git commit -m "feat: add Caliber sync GitHub Action"
661
+ git push
662
+ \`\`\`
607
663
 
608
664
  ### Summary
609
665
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rely-ai/caliber",
3
- "version": "1.31.0-dev.1774714955",
3
+ "version": "1.31.0-dev.1774741028",
4
4
  "description": "AI context infrastructure for coding agents — keeps CLAUDE.md, Cursor rules, and skills in sync as your codebase evolves",
5
5
  "type": "module",
6
6
  "bin": {