prism-mcp-server 20.3.0 → 20.3.1
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 +41 -6
- package/docs/prism-browser.md +86 -2
- package/package.json +1 -1
- package/scripts/dev/browse.py +1729 -622
package/README.md
CHANGED
|
@@ -61,6 +61,41 @@ features.
|
|
|
61
61
|
<details>
|
|
62
62
|
<summary>Release history (optional)</summary>
|
|
63
63
|
|
|
64
|
+
## What's New in v20.3.1
|
|
65
|
+
|
|
66
|
+
### Prism Browser Reports Real Failures
|
|
67
|
+
|
|
68
|
+
`prism browser` could not fail a test. `eval 1 === 2` returned `status: ok`
|
|
69
|
+
with exit code 0, a page serving HTTP 500 reported `status: ok`, and console
|
|
70
|
+
errors and uncaught page exceptions were discarded entirely. This release adds
|
|
71
|
+
assertions — `assert-text`, `assert-visible`, `assert-count`, `assert-url`,
|
|
72
|
+
`assert-title`, `assert-eval`, `assert-no-page-errors` — that return
|
|
73
|
+
`status: failed` and a non-zero exit. `open` now reports `http_status` and
|
|
74
|
+
fails on 400 or higher, screenshots are validated rather than assumed, and
|
|
75
|
+
`eval` returns native JSON with its type instead of a Python `repr`.
|
|
76
|
+
|
|
77
|
+
The fingerprint layer had never been applied: a wrong keyword argument made
|
|
78
|
+
the stealth library throw on every launch — 1,139 failures and 0 successes
|
|
79
|
+
since April — while the runner reported it as active. It is fixed, and a layer
|
|
80
|
+
that cannot be applied now fails loudly. The headless build no longer
|
|
81
|
+
advertises itself through `navigator.userAgentData` or the `Sec-CH-UA` header,
|
|
82
|
+
and a patch that corrupted `Object.getOwnPropertyDescriptor` on every page
|
|
83
|
+
under test has been removed. These remain best-effort test aids, not a
|
|
84
|
+
guarantee against bot detection.
|
|
85
|
+
|
|
86
|
+
`--local-only` now actually isolates: WebSocket, EventSource, WebRTC and
|
|
87
|
+
`sendBeacon` egress bypass request routing and were never blocked, and service
|
|
88
|
+
workers were allowed through. `--cleanup` was a no-op in the two modes agents
|
|
89
|
+
use. Site isolation, phishing detection and popup blocking are no longer
|
|
90
|
+
disabled by default, since these profiles hold live authenticated cookies.
|
|
91
|
+
|
|
92
|
+
New for test runs: `--ephemeral-profile` and `--storage-state` for hermetic
|
|
93
|
+
authenticated flows, `pages`/`switch-page` so OAuth popups are reachable,
|
|
94
|
+
`--fail-fast`, `--fast`, `--trace`/`--video`/`--har`, and
|
|
95
|
+
`profiles --prune-older-than` for profile maintenance.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
64
99
|
## What's New in v20.2.7
|
|
65
100
|
|
|
66
101
|
### Session Saves Survive Agent Restarts
|
|
@@ -81,12 +116,12 @@ to the patched 8.5.23 release.
|
|
|
81
116
|
|
|
82
117
|
### Hybrid Memory Search (Portal Tier)
|
|
83
118
|
|
|
84
|
-
`session_search_memory` on Synalux-backed installs now
|
|
85
|
-
similarity with exact-term lexical matching
|
|
86
|
-
fusion
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
119
|
+
`session_search_memory` on the portal tier (Synalux-backed installs) now
|
|
120
|
+
fuses semantic similarity with exact-term lexical matching via weighted
|
|
121
|
+
reciprocal-rank fusion. Measured on blind probes against a real
|
|
122
|
+
8.5k-entry corpus: fused retrieval was **never worse** than semantic
|
|
123
|
+
alone at top-5, and exact identifiers — TPNs, function names, error
|
|
124
|
+
strings — now rescue queries that embedding similarity blurs. Results say how they were found — `hybrid retrieval`
|
|
90
125
|
headers, per-hit `sem#/lex#` arms — and a lexical-only rescue is labelled
|
|
91
126
|
`exact-term match` instead of pretending to a similarity score. Local
|
|
92
127
|
SQLite installs keep pure vector search; hybrid needs the portal's
|
package/docs/prism-browser.md
CHANGED
|
@@ -18,16 +18,100 @@ so a separate app or DMG is not required.
|
|
|
18
18
|
scripts, allowing deterministic feature flags, fixtures, capability shims,
|
|
19
19
|
or instrumentation for localhost tests.
|
|
20
20
|
- **A constrained injection boundary.** Injection requires `--local-only`,
|
|
21
|
-
which rejects public navigation
|
|
21
|
+
which rejects public navigation, non-loopback subrequests, service workers,
|
|
22
|
+
and WebSocket/EventSource/WebRTC egress.
|
|
22
23
|
- **Private audit records.** The runner stores a local audit trail with private
|
|
23
24
|
filesystem permissions and removes URL credentials, query strings,
|
|
24
|
-
fragments, common email/phone patterns,
|
|
25
|
+
fragments, common email/phone patterns, record identifiers in URL paths, and
|
|
26
|
+
injected source text.
|
|
27
|
+
- **Failure signals instead of silence.** Console errors, uncaught page
|
|
28
|
+
exceptions, and failed requests are captured and attached to command output.
|
|
29
|
+
An HTTP status of 400 or higher, an empty screenshot frame, and a failed
|
|
30
|
+
assertion each produce a non-zero exit.
|
|
25
31
|
|
|
26
32
|
These are orchestration and safety benefits. Prism Browser does not replace
|
|
27
33
|
Playwright Test: use raw Playwright when you need its complete fixture,
|
|
28
34
|
assertion, trace, project, or parallel-worker APIs. Compatibility patches are
|
|
29
35
|
best effort and are not a CAPTCHA-bypass guarantee.
|
|
30
36
|
|
|
37
|
+
## Assertions and exit codes
|
|
38
|
+
|
|
39
|
+
A command reports `status: "ok"` only when it actually succeeded. Anything else
|
|
40
|
+
(`failed`, `error`, `timeout`) marks the run, and `pipe` exits non-zero.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
printf '%s\n' \
|
|
44
|
+
'open http://127.0.0.1:3000' \
|
|
45
|
+
'assert-title Dashboard' \
|
|
46
|
+
'assert-text #status Ready' \
|
|
47
|
+
'assert-count [data-row] 12' \
|
|
48
|
+
'assert-no-page-errors' \
|
|
49
|
+
| prism browser --headless --fast --fail-fast pipe
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`eval` returns the native JSON value with its type, so results are machine
|
|
53
|
+
readable:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{"status": "ok", "result": {"a": 1}, "type": "dict", "serializable": true}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`assert-eval` is the assertion form — `eval` alone never fails a run, because a
|
|
60
|
+
falsy expression is a legitimate result. Use `--fail-fast` for test runs so a
|
|
61
|
+
failed navigation cannot be followed by commands that silently target the
|
|
62
|
+
previous page.
|
|
63
|
+
|
|
64
|
+
A trailing backslash continues a command onto the next line, which makes
|
|
65
|
+
multi-line JavaScript and multi-line input text expressible. Quoted arguments
|
|
66
|
+
are parsed with shell-style quoting, so `type "div > .cell" "two words"` works.
|
|
67
|
+
|
|
68
|
+
## Hermetic runs
|
|
69
|
+
|
|
70
|
+
Persistent profiles are convenient for interactive work and wrong for tests:
|
|
71
|
+
state carries between runs and makes them order dependent. For test runs use
|
|
72
|
+
|
|
73
|
+
- `--ephemeral-profile` — a throwaway profile directory, removed on exit.
|
|
74
|
+
- `--storage-state PATH` — seed cookies and localStorage from a Playwright
|
|
75
|
+
storage-state file, so authenticated flows skip the login UI.
|
|
76
|
+
- `save-storage PATH` — write the current state back out.
|
|
77
|
+
- `--fast` — skip the human-latency emulation (per-character typing and
|
|
78
|
+
inter-action pauses), which otherwise dominates a test's wall clock.
|
|
79
|
+
|
|
80
|
+
`--trace PATH`, `--video DIR`, and `--har PATH` record Playwright artifacts for
|
|
81
|
+
a failing run.
|
|
82
|
+
|
|
83
|
+
## Multiple pages
|
|
84
|
+
|
|
85
|
+
A popup (OAuth, payment, print preview) opens a new page. `pages` lists them,
|
|
86
|
+
`switch-page N` makes one active, and `close-page` disposes of it. Without
|
|
87
|
+
switching, commands continue to target the original page.
|
|
88
|
+
|
|
89
|
+
## Fingerprint patches
|
|
90
|
+
|
|
91
|
+
`--stealth full` applies playwright-stealth, a CDP
|
|
92
|
+
`Emulation.setUserAgentOverride` carrying full `userAgentMetadata`, and a
|
|
93
|
+
supplementary init script. The CDP override is what keeps `navigator.userAgent`,
|
|
94
|
+
`navigator.userAgentData`, and the `Sec-CH-UA` request headers consistent;
|
|
95
|
+
rewriting headers through request interception does not work, because Chromium
|
|
96
|
+
re-adds client hints after interception.
|
|
97
|
+
|
|
98
|
+
Applied layers are verified rather than assumed. The runner probes the page for
|
|
99
|
+
UA/brand/platform/webdriver agreement at startup and again after the first real
|
|
100
|
+
navigation, and `--stealth full` fails with an actionable error when a requested
|
|
101
|
+
layer cannot be applied. Pass `--allow-degraded-stealth` to proceed anyway, or
|
|
102
|
+
`--stealth light` to skip the library layer deliberately. The `fingerprint`
|
|
103
|
+
command reports the current state.
|
|
104
|
+
|
|
105
|
+
These patches do not disable site isolation, client-side phishing detection, or
|
|
106
|
+
popup blocking. Profiles hold live authenticated cookies, and trading away those
|
|
107
|
+
mitigations for a fingerprint delta is the wrong exchange.
|
|
108
|
+
|
|
109
|
+
## Profile maintenance
|
|
110
|
+
|
|
111
|
+
Persistent profiles accumulate. `prism browser profiles` lists them by size and
|
|
112
|
+
age; `--prune-older-than DAYS` reports what is stale and deletes it only when
|
|
113
|
+
`--yes` is also passed.
|
|
114
|
+
|
|
31
115
|
## Install the local runtime
|
|
32
116
|
|
|
33
117
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prism-mcp-server",
|
|
3
|
-
"version": "20.3.
|
|
3
|
+
"version": "20.3.1",
|
|
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",
|