replen 1.0.36 → 1.0.38

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.
package/dist/mcp-setup.js CHANGED
@@ -26,14 +26,29 @@ import { fileURLToPath } from "node:url";
26
26
  import { parse as parseToml, stringify as stringifyToml } from "smol-toml";
27
27
  import { installSkills } from "./skill-install.js";
28
28
  const SERVER_NAME = "replen";
29
- // Launch the MCP via a SEMVER RANGE, not a tag-less spec. Bare `npx @replen/mcp`
30
- // resolves once and reuses the cached build forever, so users silently run stale
31
- // builds and miss new tools (the paths/mode regression came from exactly this).
32
- // `@^1` makes npx re-resolve the newest 1.x on every session spawn — auto-updates
33
- // minors/patches, never jumps a breaking major so a fresh agent session = latest
34
- // features with no manual `@latest` step to remember. Each setup run REWRITES this
35
- // entry, so returning users are migrated off the old tag-less spec automatically.
36
- const MCP_PKG = "@replen/mcp@^1";
29
+ // Launch the MCP via an EXACT pinned version, resolved from the npm registry at
30
+ // setup time mirrors how the SessionStart hook pins replen@<version>. We used
31
+ // `@^1` for "auto-update each session", but npx caches per-spec and happily
32
+ // reuses a stale `@^1` resolution even after `npx @latest` so the auto-update
33
+ // was illusory AND users got spurious "newer Replen available" nudges right after
34
+ // updating (the server sees the still-stale client version). Pinning the exact
35
+ // version makes each release a distinct, correctly-cached npx entry; re-running
36
+ // `npx replen mcp setup` re-resolves + re-pins to ship an update. Falls back to
37
+ // the `@^1` range only if the registry is unreachable at setup time.
38
+ let MCP_PKG = "@replen/mcp@^1";
39
+ // Resolve the exact latest @replen/mcp version to pin (fail-open to the range).
40
+ async function resolveMcpPkg() {
41
+ try {
42
+ const res = await fetch("https://registry.npmjs.org/@replen/mcp/latest", { signal: AbortSignal.timeout(3000) });
43
+ if (res.ok) {
44
+ const j = (await res.json());
45
+ if (typeof j.version === "string" && j.version)
46
+ return `@replen/mcp@${j.version}`;
47
+ }
48
+ }
49
+ catch { /* registry unreachable — keep the range fallback */ }
50
+ return "@replen/mcp@^1";
51
+ }
37
52
  const CLAUDE_CONFIG = join(homedir(), ".claude.json");
38
53
  const CLAUDE_SETTINGS = join(homedir(), ".claude", "settings.json");
39
54
  const CODEX_CONFIG = join(homedir(), ".codex", "config.toml");
@@ -60,6 +75,10 @@ const REPLEN_AUTO_ALLOW = [
60
75
  // ============================================================================
61
76
  export async function setupMcp(token, base) {
62
77
  console.log(` Wiring replen MCP into agent configs…`);
78
+ // Pin the exact latest MCP version (deterministic; avoids npx serving a stale
79
+ // `@^1` build and the spurious upgrade nudge that follows).
80
+ MCP_PKG = await resolveMcpPkg();
81
+ console.log(` MCP version pinned to ${MCP_PKG}`);
63
82
  const results = [];
64
83
  results.push(setupClaude(token, base));
65
84
  results.push(setupCodex(token, base));
@@ -187,23 +187,39 @@ mcp__replen__replen_capture_insight(
187
187
  )
188
188
  ```
189
189
 
190
- ### Step 4 — Present + capture actions
190
+ ### Step 4 — Present ONLY the wins (record everything, surface what works)
191
191
 
192
- After all writeups, summarise:
192
+ You already RECORDED every verdict in Step 3d, including skips — those are
193
+ load-bearing (relevance-floor calibration, repo_quality, modality suppression,
194
+ the Activity feed). But **do NOT narrate the skips to the user.** A wall of
195
+ "skip, skip, skip, but…" makes Replen look like it's grasping. Present like an
196
+ Apple keynote: lead with what's good, stay quiet about the rest.
197
+
198
+ **Surface ONLY the wins** — `adopt` / `port` / `cherry-pick` / `clean-room` /
199
+ `upgrade` + any `lesson` / `boundary`. Skips and defers are recorded silently and
200
+ never listed. Lead with the strongest (an `upgrade` to something they already
201
+ have usually beats a new `adopt`).
202
+
203
+ If there are wins:
193
204
 
194
205
  ```
195
- 4 candidates triaged for tech-news-site:
196
- adopt: kribblo/node-ffmpeg-installer (high · quick) ffmpeg-static swap
197
- port: tj/n (medium · moderate) version-manager pattern
198
- upgrade: someorg/fast-og (high · moderate) beats our og-image render (streams + caches vs our sync redraw)
199
- ✗ skip: vercel/turbo (deep) — wrong runtime, already on Vite
206
+ For tech-news-site:
207
+ upgrade: someorg/fast-og — beats your og-image render (streams + caches vs your sync redraw) · moderate
208
+ adopt: kribblo/node-ffmpeg-installer drop-in ffmpeg-static swap · quick
209
+ 💡 lesson: borrow graph-as-memory premise, link repos not files ( Atlas) [via graphify/graphify]
200
210
 
201
- 💡 lesson (via graphify/graphify): borrow graph-as-memory premise, link repos not files (→ Atlas)
202
- — captured to Atlas; shown only when a Pass-3/4 insight actually fired
211
+ (Triaged 9 candidates; surfacing the 2 worth acting on + 1 idea worth keeping.)
203
212
 
204
- For each verdict, what would you like to do? (star / hide / handoff / skip)
213
+ What would you like to do with each? (star / hide / handoff)
205
214
  ```
206
215
 
216
+ The one-line "(Triaged N…)" footer is the *only* acknowledgement that skips
217
+ happened — honest, but it doesn't parade them.
218
+
219
+ **If there are NO wins, say nothing** — or at most one calm line ("Nothing
220
+ actionable for `<repo>` today — N triaged."). Never list the skips. Silence on a
221
+ quiet day IS the calm-cadence contract, not a failure.
222
+
207
223
  Then, for each candidate, capture the user's choice. For each action,
208
224
  POST to `/api/state`:
209
225
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replen",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
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": {