replen 1.0.34 → 1.0.35

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/commands.js +12 -5
  2. package/package.json +1 -1
package/dist/commands.js CHANGED
@@ -534,19 +534,26 @@ async function fetchInventoryStatus(cfg, repo) {
534
534
  return null;
535
535
  const data = (await res.json());
536
536
  const cands = data.candidates ?? [];
537
- if (cands.length === 0)
537
+ const displayText = (typeof data.displayText === "string" && data.displayText) ? data.displayText : null;
538
+ // Surface even with ZERO candidates when the server sent a displayText —
539
+ // notably the onboard-on-first-visit offer for a registered-but-unprofiled
540
+ // repo (needsOnboarding): it has no candidates yet but IS the line to relay.
541
+ // Previously `cands.length === 0 → return null` swallowed it, so the
542
+ // SessionStart hook stayed silent on unprofiled repos.
543
+ if (cands.length === 0 && !displayText)
538
544
  return null;
539
545
  const top = cands[0];
540
546
  // Pull the cosine % out of whyShortlisted if present
541
547
  // (format: "...; semantic similarity: 58%").
542
- const simMatch = top.whyShortlisted?.match(/semantic similarity:\s*(\d+)%/);
548
+ const simMatch = top?.whyShortlisted?.match(/semantic similarity:\s*(\d+)%/);
543
549
  return {
544
550
  count: cands.length,
545
- topRepo: top.repo ?? null,
551
+ topRepo: top?.repo ?? null,
546
552
  topSimilarity: simMatch ? Number(simMatch[1]) : null,
547
553
  // The server's pre-formatted, pattern-aware footnote ("By the way — a
548
- // dependency you use just shipped: …" / "… N candidates queued …").
549
- displayText: (typeof data.displayText === "string" && data.displayText) ? data.displayText : null,
554
+ // dependency you use just shipped: …" / "… N candidates queued …" / the
555
+ // onboard offer).
556
+ displayText,
550
557
  };
551
558
  }
552
559
  catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replen",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "description": "Make your AI coding tools smarter. One command, no API keys, free. Replen watches what your projects actually do and surfaces a few things worth bringing in each month. Use one as is, port a piece of another, cherry pick an idea, or build it clean room. The match happens inside your AI tool's session. A few actionable matches a month, by design.",
5
5
  "type": "module",
6
6
  "bin": {