prism-mcp-server 20.2.2 → 20.2.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
@@ -18,6 +18,45 @@ A paid subscription adds cloud sync, higher model tiers, and team features throu
18
18
 
19
19
  ---
20
20
 
21
+ ## What Prism gives you
22
+
23
+ - **Session memory that survives restarts** — resume projects with handoff notes,
24
+ recent work, open TODOs, and configurable quick, standard, or deep context.
25
+ - **Local-first inference** — bounded work is routed through local Ollama models
26
+ first, with automatic 2B/4B/9B/27B selection based on installed models,
27
+ available RAM, context fit, and subscription entitlements.
28
+ - **One setup for every agent** — `prism connect` configures Claude Code,
29
+ Claude Desktop, Cursor, Gemini CLI, and Codex while preserving unrelated
30
+ settings.
31
+ - **Subscription-aware skills** — entitled skills are synchronized before the
32
+ host launches, with safe upgrades, downgrades, conflict preservation, and
33
+ offline last-good recovery.
34
+ - **Hook-free startup** — MCP metadata and native instructions request Prism's
35
+ startup context without requiring lifecycle hooks or a Prism-owned launcher.
36
+ - **Safe escalation and observability** — inference outcomes are explicit,
37
+ reserved content remains fail-closed, and local/cloud usage is recorded for
38
+ review.
39
+
40
+ ## Get started
41
+
42
+ ```bash
43
+ npm install -g prism-mcp-server
44
+ prism connect
45
+ ```
46
+
47
+ Use `prism connect --dry-run` to preview changes, `prism connect --all` to
48
+ configure every detected host, or `prism connect --refresh` to reconcile
49
+ Prism-managed entries after an upgrade. Restart the host after connecting.
50
+
51
+ Prism works locally without an account, API key, or cloud subscription. Add a
52
+ Synalux subscription when you want cloud memory, paid-tier skills, or team
53
+ features.
54
+
55
+ ---
56
+
57
+ <details>
58
+ <summary>Release history (optional)</summary>
59
+
21
60
  ## What's New in v20.2.2
22
61
 
23
62
  ### One Local-First Workflow Across Every Agent
@@ -186,6 +225,8 @@ External contributions now require signing the [Individual CLA](./CLA.md). The C
186
225
 
187
226
  ---
188
227
 
228
+ </details>
229
+
189
230
  ## Quickstart
190
231
 
191
232
  The free tier needs no account, no API key, and no cloud. Install Prism, then
@@ -521,42 +562,44 @@ The quality gate detected repeated sentences (≥3 of the same sentence in ≥6
521
562
 
522
563
  ### vs AI coding assistants
523
564
 
524
- These tables are the maintainer's assessment as of June 2026. Verify claims that matter to you — products change fast.
525
-
526
- | Feature | Prism Coder | GitHub Copilot | Cursor | Windsurf | Amazon Q | Devin |
527
- |---|:---:|:---:|:---:|:---:|:---:|:---:|
528
- | Local inference (open-weight) | | | | | | ❌ |
529
- | Works fully offline | ✅ (free tier) | ❌ | ❌ | ❌ | ❌ | ❌ |
530
- | Persistent cross-session memory | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
531
- | Session drift detection | | | | | | |
532
- | L3 grounding verifier | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
533
- | Behavioral verification (pre-edit) | ✅ | | | | ❌ | ❌ |
534
- | MCP server (tools + memory) | ✅ | | | | ❌ | ❌ |
535
- | Web IDE | ✅ | | | | | ✅ |
536
- | VS Code extension | ✅ | ✅ | | | | |
537
- | Flat-rate team pricing | ✅ | (per-seat) | (per-seat) | | ❌ | ❌ |
538
- | HIPAA BAA available | (Enterprise) | | | | | ❌ |
565
+ Product capabilities and plans change frequently. The comparison below is
566
+ intentionally limited to publicly documented differences; it is not a claim
567
+ that another product lacks an unlisted feature.
568
+
569
+ Legend:documented, conditional or plan-dependent, not compared, ? verify
570
+ with the provider.
571
+
572
+ | Capability | Prism Coder | GitHub Copilot | Cursor | Amazon Q Developer |
573
+ |---|:---:|:---:|:---:|:---:|
574
+ | Local/open-weight inference | ✅ | | | |
575
+ | Offline workflow | ✅ | | ? | ? |
576
+ | Cross-session memory | ✅ | ([docs](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference)) | | |
577
+ | MCP integration | ✅ | ✅ ([docs](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference)) | ([pricing](https://cursor.com/en-US/pricing)) | |
578
+ | Local-first model routing | ✅ | | | |
579
+ | Session drift and grounding checks | | | | |
580
+ | Setup surface | ✅ five hosts | ✅ CLI/IDE | ✅ editor/agents | ✅ IDE/CLI ([overview](https://aws.amazon.com/q/developer/build/)) |
581
+ | Pricing model | ✅ Synalux tiers | ◐ | ◐ ([pricing](https://cursor.com/en-US/pricing)) | ✅ free + $19 Pro ([pricing](https://aws.amazon.com/q/developer/pricing/)) |
582
+
583
+ Prism-specific compliance, contractual, and pricing terms are documented in
584
+ the Synalux service agreement. Do not infer a competitor's HIPAA, BAA, or data
585
+ handling status from this table.
539
586
 
540
587
  ### vs local AI / memory tools
541
588
 
542
589
  | Feature | Prism Coder | Ollama | LM Studio | Mem0 | Zep |
543
590
  |---|:---:|:---:|:---:|:---:|:---:|
544
- | Local inference cascade | ✅ | ✅ | ✅ | | |
545
- | Cloud fallback | ✅ | | | | |
546
- | Persistent cross-session memory | ✅ | | | ✅ | ✅ |
547
- | Knowledge ingestion (MCP + webhook) | | | | | |
548
- | Cognitive routing (3-store) | ✅ | | | | |
549
- | Session drift detection | ✅ | ❌ | ❌ | ❌ | ❌ |
550
- | Native MCP server | ✅ | ❌ | ❌ | ❌ | ❌ |
551
- | Web IDE + VS Code extension | ✅ | ❌ | ❌ | ❌ | ❌ |
552
-
553
- ### Pricing — flat-rate, not per-seat
554
-
555
- | | **Prism Coder** | GitHub Copilot | Cursor | Amazon Q |
556
- |---|:---:|:---:|:---:|:---:|
557
- | **Individual** | **$19/mo** | $10/mo | $20/mo | $19/mo |
558
- | **Team (5 devs)** | **$49/mo flat** | $95/mo | $200/mo | $95/mo |
559
- | **Enterprise (25 devs)** | **$99/mo flat** | $195/mo | $1,000/mo | Custom |
591
+ | Local inference cascade | ✅ | ✅ runtime | ✅ app | | |
592
+ | Cloud fallback | ✅ optional | | provider-dependent | | |
593
+ | Persistent memory | ✅ | | project context | ✅ | ✅ |
594
+ | Knowledge/tool integration | ✅ MCP + ingestion | APIs | integrations | SDK/API | SDK/API |
595
+ | MCP server | ✅ native | | client integration | client integration | client integration |
596
+
597
+ ### Pricing
598
+
599
+ Prism's current published tiers are listed below. Competitor pricing is
600
+ usage- and plan-dependent, so consult the provider directly: [GitHub
601
+ Copilot](https://github.com/features/copilot/plans), [Cursor](https://cursor.com/en-US/pricing),
602
+ and [Amazon Q Developer](https://aws.amazon.com/q/developer/pricing/).
560
603
 
561
604
  ---
562
605
 
@@ -686,10 +729,37 @@ prism save # save ledger + handoff
686
729
  prism search <query> # search code across repos (exact / regex / symbol / semantic)
687
730
  prism review <files...> # AI code review — security, performance, style
688
731
  prism scan <files...> # security scan — secrets, licenses, Dockerfile
732
+ prism browser ... # persistent local browser testing and structured automation
689
733
  prism push # push local SQLite to the cloud backend
690
734
  prism register-models # alias dcostenco/prism-coder:* -> prism-coder:*
691
735
  ```
692
736
 
737
+ ### `prism browser` — local browser testing
738
+
739
+ The npm package includes Prism's Python/Playwright browser runner; no separate
740
+ Prism Browser app or DMG is required. It adds a stable agent-facing CLI around
741
+ Playwright with reusable named profiles, multi-action pipe/REPL sessions,
742
+ redacted local audit logs, and guarded preload scripts for local apps. Use pipe
743
+ or REPL mode when several actions must share one page session:
744
+
745
+ ```bash
746
+ printf 'open http://127.0.0.1:3000\nwait-for #app\nread-dom #app\n' | \
747
+ prism browser --headless --local-only pipe
748
+ ```
749
+
750
+ Local apps can load repeatable pre-navigation test helpers with
751
+ `--inject ./tests/browser-init.js`. Custom injection requires `--local-only`;
752
+ public navigation and non-loopback requests are rejected in that mode. Install
753
+ the local runtime once with `pip3 install playwright playwright-stealth` and
754
+ `python3 -m playwright install chromium`.
755
+
756
+ Use raw Playwright for authored suites that need its full assertion, tracing,
757
+ fixture, and parallel-worker APIs. Use `prism browser` when an AI agent needs a
758
+ small, persistent, auditable local browser session through one consistent CLI.
759
+ The compatibility patches are best effort; they are not a CAPTCHA-bypass
760
+ guarantee. See [Prism Browser local testing](docs/prism-browser.md) for the
761
+ command surface, safety model, and verified acceptance cases.
762
+
693
763
  ### `prism search` — semantic code search
694
764
 
695
765
  <p align="center">
@@ -0,0 +1,56 @@
1
+ import { spawn, spawnSync } from 'node:child_process';
2
+ import { existsSync } from 'node:fs';
3
+ import { fileURLToPath } from 'node:url';
4
+ export function resolveBundledBrowserScript() {
5
+ return fileURLToPath(new URL('../scripts/dev/browse.py', import.meta.url));
6
+ }
7
+ export function pythonCandidates(env = process.env, platform = process.platform) {
8
+ if (env.PRISM_PYTHON) {
9
+ return [{ executable: env.PRISM_PYTHON, prefixArgs: [] }];
10
+ }
11
+ return platform === 'win32'
12
+ ? [
13
+ { executable: 'py', prefixArgs: ['-3'] },
14
+ { executable: 'python', prefixArgs: [] },
15
+ ]
16
+ : [
17
+ { executable: 'python3', prefixArgs: [] },
18
+ { executable: 'python', prefixArgs: [] },
19
+ ];
20
+ }
21
+ export function resolvePythonCommand(env = process.env, platform = process.platform) {
22
+ for (const candidate of pythonCandidates(env, platform)) {
23
+ const result = spawnSync(candidate.executable, [...candidate.prefixArgs, '--version'], { env, encoding: 'utf8', shell: false });
24
+ if (!result.error && result.status === 0)
25
+ return candidate;
26
+ }
27
+ return null;
28
+ }
29
+ export function hasPlaywrightRuntime(python, env = process.env) {
30
+ const result = spawnSync(python.executable, [...python.prefixArgs, '-c', 'import playwright.sync_api'], { env, encoding: 'utf8', shell: false });
31
+ return !result.error && result.status === 0;
32
+ }
33
+ export async function runBrowserCli(args, env = process.env) {
34
+ const scriptPath = resolveBundledBrowserScript();
35
+ if (!existsSync(scriptPath)) {
36
+ throw new Error(`Bundled Prism Browser script is missing: ${scriptPath}`);
37
+ }
38
+ const python = resolvePythonCommand(env);
39
+ if (!python) {
40
+ throw new Error('Python 3 is required for Prism Browser. Set PRISM_PYTHON to a Python 3 executable.');
41
+ }
42
+ if (!args.includes('--help') && !args.includes('-h') && !hasPlaywrightRuntime(python, env)) {
43
+ throw new Error('Python Playwright is required. Run: pip3 install playwright playwright-stealth && python3 -m playwright install chromium');
44
+ }
45
+ return await new Promise((resolve, reject) => {
46
+ const child = spawn(python.executable, [...python.prefixArgs, scriptPath, ...args], { env, shell: false, stdio: 'inherit' });
47
+ child.once('error', reject);
48
+ child.once('exit', (code, signal) => {
49
+ if (signal) {
50
+ reject(new Error(`Prism Browser terminated by signal ${signal}`));
51
+ return;
52
+ }
53
+ resolve(code ?? 1);
54
+ });
55
+ });
56
+ }
package/dist/cli.js CHANGED
@@ -9,6 +9,7 @@ import { PRISM_USER_ID, SERVER_CONFIG } from './config.js';
9
9
  import { getCurrentGitState } from './utils/git.js';
10
10
  import { sessionBootstrapHandler, sessionLoadContextHandler, sessionSaveLedgerHandler, sessionSaveHandoffHandler, } from './tools/ledgerHandlers.js';
11
11
  import { configureClaudeAgentPolicy, configureClaudeNativeStartup, configureCodexAgentPolicy, configureCodexNativeStartup, configureGeminiAgentPolicy, configureGeminiNativeStartup, connectHosts, migrateLegacyClaudeHooks, migrateLegacyClaudeInstructions, migrateLegacyClaudeManagedStartup, migrateLegacyClaudeProjectMcp, normalizeHostName, } from './connect.js';
12
+ import { runBrowserCli } from './browserCli.js';
12
13
  const program = new Command();
13
14
  /** Build the stable `prism load --json` envelope from depth-specific context. */
14
15
  export function buildLoadJsonOutput(project, data, level, metadata) {
@@ -82,6 +83,11 @@ program
82
83
  .command('bootstrap')
83
84
  .description('Print the canonical dashboard-configured first-turn Prism greeting')
84
85
  .action(runBootstrapCommand);
86
+ // Parsed by the direct dispatch at the bottom so all Python CLI flags pass
87
+ // through unchanged. Registering it here keeps the command visible in help.
88
+ program
89
+ .command('browser')
90
+ .description('Run the packaged local Prism Browser automation CLI');
85
91
  // ─── prism connect ────────────────────────────────────────────
86
92
  // Registers this installed package with supported MCP hosts. The
87
93
  // merge is additive: an existing `prism` or `prism-mcp` entry is
@@ -834,4 +840,17 @@ program
834
840
  if (fail > 0)
835
841
  process.exit(1);
836
842
  });
837
- await program.parseAsync(process.argv);
843
+ if (process.argv[2] === 'browser') {
844
+ try {
845
+ const exitCode = await runBrowserCli(process.argv.slice(3));
846
+ if (exitCode !== 0)
847
+ process.exitCode = exitCode;
848
+ }
849
+ catch (err) {
850
+ console.error(`Prism Browser failed: ${err instanceof Error ? err.message : String(err)}`);
851
+ process.exitCode = 1;
852
+ }
853
+ }
854
+ else {
855
+ await program.parseAsync(process.argv);
856
+ }
@@ -0,0 +1,89 @@
1
+ # Prism Browser local testing
2
+
3
+ `prism browser` is a packaged, agent-facing local browser runner powered by
4
+ Python Playwright. It is intended for repeatable development and acceptance
5
+ checks against applications you control. The npm package contains the runner,
6
+ so a separate app or DMG is not required.
7
+
8
+ ## What it adds to Playwright
9
+
10
+ - **One CLI across agents.** Codex, Claude, Gemini, Cursor, and shell workflows
11
+ can invoke the same structured commands when Prism is connected.
12
+ - **Persistent named profiles.** `--profile NAME` reuses Chromium state across
13
+ launches instead of requiring every agent to build profile management.
14
+ - **Low-overhead multi-step sessions.** Pipe and REPL modes keep one browser
15
+ session alive while several navigation, DOM, input, wait, and evaluation
16
+ commands run.
17
+ - **Local preload helpers.** Repeatable `--inject` scripts run before page
18
+ scripts, allowing deterministic feature flags, fixtures, capability shims,
19
+ or instrumentation for localhost tests.
20
+ - **A constrained injection boundary.** Injection requires `--local-only`,
21
+ which rejects public navigation and non-loopback subrequests.
22
+ - **Private audit records.** The runner stores a local audit trail with private
23
+ filesystem permissions and removes URL credentials, query strings,
24
+ fragments, common email/phone patterns, and injected source text.
25
+
26
+ These are orchestration and safety benefits. Prism Browser does not replace
27
+ Playwright Test: use raw Playwright when you need its complete fixture,
28
+ assertion, trace, project, or parallel-worker APIs. Compatibility patches are
29
+ best effort and are not a CAPTCHA-bypass guarantee.
30
+
31
+ ## Install the local runtime
32
+
33
+ ```bash
34
+ pip3 install playwright playwright-stealth
35
+ python3 -m playwright install chromium
36
+ ```
37
+
38
+ The npm package supplies `scripts/dev/browse.py`; the Python runtime supplies
39
+ the browser engine. To use a specific Python installation, set
40
+ `PRISM_PYTHON=/absolute/path/to/python3`.
41
+
42
+ ## Local acceptance flow
43
+
44
+ ```bash
45
+ printf 'open http://127.0.0.1:3000\nwait-for #app\nread-dom #app\n' | \
46
+ prism browser --headless --local-only --profile acceptance pipe
47
+ ```
48
+
49
+ To install a helper before the application's own scripts:
50
+
51
+ ```bash
52
+ prism browser \
53
+ --headless \
54
+ --local-only \
55
+ --profile acceptance \
56
+ --inject ./tests/browser-init.js \
57
+ open http://127.0.0.1:3000
58
+ ```
59
+
60
+ An injected file must be a regular, non-symlinked UTF-8 `.js` or `.mjs` file
61
+ no larger than 256 KiB. The audit log records its SHA-256 digest, not its path
62
+ or contents.
63
+
64
+ ## Verified acceptance cases
65
+
66
+ The public test suite verifies that:
67
+
68
+ 1. The npm allowlist contains the runner and the compiled CLI resolves it.
69
+ 2. A named profile retains state across two separate Chromium launches.
70
+ 3. Pipe commands share one live page session.
71
+ 4. A preload helper is visible to the application's first page script.
72
+ 5. A public subrequest and direct public navigation are blocked in
73
+ `--local-only` mode.
74
+ 6. Audit files use private permissions and omit tested URL secrets, PHI-like
75
+ values, and injected source.
76
+ 7. Missing Python/Playwright dependencies fail with an actionable error.
77
+
78
+ Run the focused contract with the repository watchdog:
79
+
80
+ ```bash
81
+ MIN_FREE_GB=2 \
82
+ /path/to/playwright-watchdog.sh \
83
+ --exec npx vitest run tests/browser-cli.test.ts
84
+ ```
85
+
86
+ The Synalux skill-routing tests separately verify that an authenticated paid
87
+ skill request can receive `local-browser`, while a free request does not. The
88
+ subscription controls skill delivery; the browser runtime still executes on
89
+ the user's machine.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prism-mcp-server",
3
- "version": "20.2.2",
3
+ "version": "20.2.3",
4
4
  "mcpName": "io.github.dcostenco/prism-coder",
5
5
  "description": "Prism Coder — Cognitive memory + tool-calling intelligence for AI agents. Mind Palace persistent memory (BFCL Gold Certified, 100% Tool-Call Accuracy, 114 Agent Skills, PHI Guard, Tier Enforcement, Prompt-Based Skill Routing, Zero-Search HDC/HRR retrieval, HRR Semantic Drift Detection across BCBA/Coding/AAC domains, HIPAA-hardened local or subscription-gated Synalux storage, SLERP-optimized GRPO alignment) plus the prism-coder 1.7B–32B open-weights LLM fleet.",
6
6
  "module": "index.ts",
@@ -13,7 +13,9 @@
13
13
  "prism-import": "dist/utils/universalImporter.js"
14
14
  },
15
15
  "files": [
16
- "dist"
16
+ "dist",
17
+ "scripts/dev/browse.py",
18
+ "docs/prism-browser.md"
17
19
  ],
18
20
  "scripts": {
19
21
  "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",