@sporhq/spor 0.18.2 → 0.18.4

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.
@@ -2,7 +2,7 @@
2
2
  "name": "spor",
3
3
  "displayName": "Spor Context Compiler",
4
4
  "description": "Maintains a typed, versioned knowledge graph and compiles compact briefings from it: session-start injection, per-prompt relevance digests, capture at discovery, end-of-session distillation, decision queue.",
5
- "version": "0.18.2",
5
+ "version": "0.18.4",
6
6
  "author": {
7
7
  "name": "losthammer"
8
8
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spor",
3
- "version": "0.18.2",
3
+ "version": "0.18.4",
4
4
  "description": "Maintains a typed, versioned knowledge graph and compiles compact briefings from it: session-start injection, per-prompt relevance digests, capture at discovery, end-of-session distillation, decision queue.",
5
5
  "author": {
6
6
  "name": "Spor",
package/bin/spor.js CHANGED
@@ -5276,10 +5276,13 @@ function installClaude(scope, dryRun) {
5276
5276
  // that field), so both halves matter.
5277
5277
  function installCodex(scope, dryRun) {
5278
5278
  const cmd = codexCmd();
5279
- const mpArgs = ["plugin", "marketplace", "add", ROOT];
5279
+ // Use "." from ROOT instead of ROOT itself: Codex's source parser treats npm
5280
+ // scoped absolute paths containing /@scope/name as git owner/repo@ref-ish
5281
+ // input, which fails for local marketplaces (issue-spor-codex-install-npm-scope).
5282
+ const mpArgs = ["plugin", "marketplace", "add", "."];
5280
5283
  const pluginArgs = ["plugin", "add", "spor@spor"];
5281
5284
  if (dryRun) {
5282
- out(`would run: ${cmd} ${mpArgs.join(" ")}`);
5285
+ out(`would run: (cd ${ROOT} && ${cmd} ${mpArgs.join(" ")})`);
5283
5286
  out(`would run: ${cmd} ${pluginArgs.join(" ")}`);
5284
5287
  return installHookHost(HOSTS.codex, scope, true);
5285
5288
  }
@@ -5287,7 +5290,7 @@ function installCodex(scope, dryRun) {
5287
5290
  err("codex CLI not on PATH — install Codex, then re-run 'spor install codex'.");
5288
5291
  return 1;
5289
5292
  }
5290
- const mp = spawnPortableSync(cmd, mpArgs, { encoding: "utf8" });
5293
+ const mp = spawnPortableSync(cmd, mpArgs, { encoding: "utf8", cwd: ROOT });
5291
5294
  if (mp.status !== 0 && !/already|exists|known/i.test((mp.stderr || "") + (mp.stdout || ""))) {
5292
5295
  err(`codex plugin marketplace add failed: ${(mp.stderr || mp.stdout || "").trim() || "unknown error"}`);
5293
5296
  return 1;
@@ -5409,7 +5412,7 @@ async function cmdInstall(cfg, { values, positionals: pos }) {
5409
5412
  if (r !== 0) rc = r;
5410
5413
  }
5411
5414
 
5412
- if (!dryRun && hosts.some((h) => HOSTS[h].kind !== "claude")) {
5415
+ if (!dryRun && rc === 0 && hosts.some((h) => HOSTS[h].kind !== "claude")) {
5413
5416
  out("");
5414
5417
  out("next:");
5415
5418
  if (cfg.mode() === "remote") out(` remote mode is configured (${remote.base(cfg)}).`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sporhq/spor",
3
- "version": "0.18.2",
3
+ "version": "0.18.4",
4
4
  "description": "Spor — a shared memory substrate for teams and agents. Decisions, their reasons, and the traces they leave. Knowledge-graph context compiler: session-start briefings, per-prompt digests, capture at discovery, end-of-session distillation, decision queue.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Anthony Allen",
@@ -210,9 +210,20 @@ function repeatedFollowup(graph, input, prompt, digest) {
210
210
  return prev && prev.sig === sig && !hasHighSignalToken(prompt) && u.wordCount(prompt) <= 12;
211
211
  }
212
212
 
213
+ // Claude Code appends `<system-reminder>…</system-reminder>` blocks
214
+ // (scheduled-message timestamps, deferred-tool notices, injected context) to the
215
+ // user's text, and they arrive in the hook's `prompt`. Their words must not feed
216
+ // the trivial-prompt gates or the retrieval query — otherwise a bare "Continue"
217
+ // arrives as 8 words, clears the continuation + word-floor gates, and fires a
218
+ // noise digest (issue-spor-digest-continuation-gate-system-reminder-defeat).
219
+ // Strip them before anything else looks at the prompt.
220
+ function stripSystemReminders(prompt) {
221
+ return String(prompt).replace(/\n*<system-reminder>[\s\S]*?<\/system-reminder>\s*/g, "").trim();
222
+ }
223
+
213
224
  async function promptContext(input) {
214
225
  const graph = u.graphHome();
215
- const prompt = input.prompt ?? "";
226
+ const prompt = stripSystemReminders(input.prompt ?? "");
216
227
  const slug = u.projectSlug(input.cwd ?? "");
217
228
 
218
229
  // Skip trivial / continuation prompts BEFORE any network call. The second