prism-mcp-server 20.17.2 → 20.17.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.
package/README.md CHANGED
@@ -87,14 +87,14 @@ skill for you.
87
87
 
88
88
  ```bash
89
89
  /plugin marketplace add anthropics/claude-plugins-community
90
- /plugin install synalux-prism@claude-community
90
+ /plugin install prism-coder@claude-community
91
91
  ```
92
92
 
93
93
  **Codex** — this repository is itself a plugin marketplace:
94
94
 
95
95
  ```bash
96
96
  codex plugin marketplace add dcostenco/prism-coder
97
- codex plugin add synalux-prism@prism
97
+ codex plugin add prism-coder@prism
98
98
  ```
99
99
 
100
100
  The plugin registers `prism-mcp` via `npx -y prism-mcp-server`. If you already
@@ -138,6 +138,17 @@ or by re-enabling after each run.
138
138
  <details>
139
139
  <summary>Release history (optional)</summary>
140
140
 
141
+ ## What's New in v20.17.3
142
+
143
+ - **A plugin install can no longer enable the prompt-routing hook.** The
144
+ package's maintenance paths (npm postinstall, server startup) now only
145
+ refresh a hook that an explicit `prism connect` previously installed —
146
+ a prism MCP registration in host config no longer counts as consent.
147
+ First install of the hook happens through `prism connect` or not at all.
148
+ - **The Claude Code plugin launcher is fully deterministic.** It runs the
149
+ exact pinned server version with npm lifecycle scripts disabled, and
150
+ the plugin now documents its security posture in `plugins/prism/README.md`.
151
+
141
152
  ## What's New in v20.17.2
142
153
 
143
154
  - **Pasted logs can no longer falsely activate skills.** Symptom-triggered
@@ -1,9 +1,12 @@
1
1
  /**
2
- * npm postinstall — the upgrade path for the prism-route hook.
3
- *
4
- * `prism connect` is only typed once per machine, so an upgrade that adds or
5
- * fixes the hook would otherwise reach no one until they reconnect. Silent
6
- * and always-exit-0: a hook installer must never break `npm install`.
2
+ * npm postinstall — the UPGRADE path for the prism-route hook, never the
3
+ * install path. `prism connect` is typed once per machine and is the only
4
+ * consent that first-installs the hook; this script merely refreshes hosts
5
+ * that carry the managed marker from that explicit install (mode "auto" is
6
+ * marker-gated in ensurePromptRouteHook). On any machine without the marker
7
+ * — including every Claude Code plugin install, where npx runs this
8
+ * package's lifecycle scripts — it is a no-op that writes nothing. Silent
9
+ * and always-exit-0: a lifecycle script must never break `npm install`.
7
10
  */
8
11
  import { ensurePromptRouteHook } from "./promptRouteHostHook.js";
9
12
  try {
@@ -205,21 +205,10 @@ if __name__ == "__main__":
205
205
  print(json.dumps({"continue": True, "suppressOutput": True}))
206
206
  sys.exit(0)
207
207
  `;
208
- /** Evidence that this host was already prism-integrated by explicit action. */
209
- function hostShowsPriorConsent(spec, homeDir) {
210
- if (existsSync(join(spec.root, "hooks", HOOK_DIR, MARKER_FILE)))
211
- return true;
212
- const evidenceFiles = spec.host === "claude"
213
- ? [join(homeDir, ".claude.json"), spec.configPath]
214
- : [join(spec.root, "config.toml"), spec.configPath];
215
- for (const file of evidenceFiles) {
216
- try {
217
- if (/prism/i.test(readFileSync(file, "utf8")))
218
- return true;
219
- }
220
- catch { /* unreadable = no evidence */ }
221
- }
222
- return false;
208
+ /** A prior EXPLICIT install left our managed marker; only that authorizes
209
+ * the auto paths to touch this host again (refresh/upgrade). */
210
+ function hostHasManagedHook(spec) {
211
+ return existsSync(join(spec.root, "hooks", HOOK_DIR, MARKER_FILE));
223
212
  }
224
213
  function hostSpecs(homeDir, env) {
225
214
  const codexHome = env.CODEX_HOME?.trim() ? resolve(env.CODEX_HOME.trim()) : join(homeDir, ".codex");
@@ -369,7 +358,7 @@ export function ensurePromptRouteHook(options = {}) {
369
358
  continue;
370
359
  if (onlyExisting && !existsSync(spec.root))
371
360
  continue;
372
- if ((options.mode ?? "explicit") === "auto" && !hostShowsPriorConsent(spec, homeDir))
361
+ if ((options.mode ?? "explicit") === "auto" && !hostHasManagedHook(spec))
373
362
  continue;
374
363
  try {
375
364
  const hookDir = join(spec.root, "hooks", HOOK_DIR);
package/dist/server.js CHANGED
@@ -265,9 +265,11 @@ let storageIsReady = false;
265
265
  // native host complies with the hook-free first-turn instruction.
266
266
  let contextLoadedByClient = false;
267
267
  // ─── prism-route hook self-heal ──────────────────────────────
268
- // The safety net of the three install paths (connect, postinstall, here):
269
- // covers installs that skipped npm scripts and machines that never re-ran
270
- // connect. Idempotent and version-marked, so the steady-state cost is two
268
+ // REFRESH-ONLY safety net: repairs/upgrades a hook that a prior EXPLICIT
269
+ // `prism connect` installed (managed marker present). It never performs a
270
+ // first install a machine that merely installed this package (or the
271
+ // Claude Code plugin, which registers prism-mcp in host config) is not
272
+ // touched. Idempotent and version-marked, so the steady-state cost is two
271
273
  // stat calls a few seconds after boot. Opt out: PRISM_DISABLE_HOOK_AUTOINSTALL=1.
272
274
  // Guarded against test runners: five suites import this module, and a
273
275
  // module-scope timer would otherwise rewrite the DEVELOPER'S real host
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prism-mcp-server",
3
- "version": "20.17.2",
3
+ "version": "20.17.3",
4
4
  "mcpName": "io.github.dcostenco/prism-coder",
5
5
  "description": "Persistent session memory for AI coding agents that never leaves your machine — including the on-device model that reasons over it. Restores your prior decisions, open TODOs, and changed files across sessions; adds associative recall of related past work, semantic drift detection, and local inference. Local-first by default. Works with Claude Code, Cursor, and Codex.",
6
6
  "module": "index.ts",