mirror of
https://github.com/aaronjmars/opendia.git
synced 2026-10-15 17:34:10 +00:00
Runtime tests. CI was structural only - it greps built files and never executes
a tool call - so the connection-layer and protocol work merged in #63 had no
automated coverage. Two suites now run in the MCP job:
test-protocol.js drives the real server over stdio and SSE: cold tools/list
returns fallback schemas, a fake extension registers over
WebSocket, exactly one well-formed tools/list_changed
arrives on both transports, re-list returns the extension's
schemas, an unchanged re-register stays silent, and a
disconnect notifies again.
test-connection.js loads the real background.js under stubbed extension
globals (simulating Firefox MV2, the heartbeat path) and
drives it against the real server: a replaced socket's
close event must not clear the live connection's heartbeat,
inflate the attempt counter, or arm a reconnect; a failed
connect must increment attempts once, not twice; and the
reconnect must be one-shot rather than fixed-rate.
Both were validated against the pre-fix code at aefab6a, where the connection
suite fails 5 of its assertions - so these detect the regressions they describe
rather than passing vacuously.
They live in opendia-mcp because they need the server and the ws client, which
are that package's dependencies; test-connection.js reads the extension source
by path and does not import from that package. Neither ships to npm - the
package's files list is server.js and README.md. npm test is now these suites
plus the syntax check, replacing a stub that always exited 1.
Dependency overrides. Two high-severity Dependabot alerts, both development
scope and both reached only through web-ext:
brace-expansion 1.1.15 -> 1.1.17 (via multimatch -> minimatch), GHSA-3jxr-9vmj-r5cp
shell-quote 1.8.4 -> 1.10.0 (via fx-runner), GHSA-395f-4hp3-45gv
Both are denial-of-service by input complexity in build tooling. Nothing reaches
a user: web-ext is a devDependency and node_modules is not part of the extension
bundle. Overrides because web-ext pins the vulnerable ranges transitively.
web-ext lint still reports 0 errors and the same 3 pre-existing warnings.
51 lines
No EOL
1.2 KiB
JSON
51 lines
No EOL
1.2 KiB
JSON
{
|
|
"name": "opendia",
|
|
"version": "1.1.1",
|
|
"description": "🎯 OpenDia - The open alternative to Dia. Connect your browser to AI models with anti-detection bypass for Twitter/X, LinkedIn, Facebook",
|
|
"main": "server.js",
|
|
"bin": {
|
|
"opendia": "./server.js"
|
|
},
|
|
"scripts": {
|
|
"start": "node server.js",
|
|
"tunnel": "node server.js --tunnel",
|
|
"sse-only": "node server.js --sse-only",
|
|
"tunnel-sse": "node server.js --tunnel --sse-only",
|
|
"test": "node --check server.js && node test-protocol.js && node test-connection.js"
|
|
},
|
|
"keywords": [
|
|
"mcp",
|
|
"browser",
|
|
"automation",
|
|
"ai",
|
|
"claude",
|
|
"chrome",
|
|
"extension",
|
|
"twitter",
|
|
"linkedin",
|
|
"facebook",
|
|
"anti-detection"
|
|
],
|
|
"author": "Aeon Inc",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/aeonfun/opendia.git"
|
|
},
|
|
"homepage": "https://github.com/aeonfun/opendia",
|
|
"bugs": {
|
|
"url": "https://github.com/aeonfun/opendia/issues"
|
|
},
|
|
"dependencies": {
|
|
"cors": "^2.8.5",
|
|
"express": "^5.2.1",
|
|
"ws": "^8.18.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=16.0.0"
|
|
},
|
|
"files": [
|
|
"server.js",
|
|
"README.md"
|
|
]
|
|
} |