mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-12-04 06:21:59 +09:00
* fix(security): enforce transport and WebSocket limits (#4752) - x-gateway ws-proxy: release a connection slot once per connection; close/error on both sockets decremented `active` up to four times, which defeated the 500-connection cap. - mcp http transport: /ws now has maxPayload (maxMessageSize, default 10 MiB) and checks the bearer token in verifyClient, before the upgrade, using the same Authorization header as the HTTP routes (no ?token=). Unset token entries are skipped instead of throwing. - mcp http transport: cap legacy SSE streams on GET /mcp (maxSseClients, default 100); extra streams get 503 + Retry-After. - agent-federation fallback WebSocket listener: maxPayload (default 4 MiB, configurable) instead of the ws 100 MiB default. - agentbbs sync: redirect "error", reject an oversized Content-Length up front, and stream the body with a running byte cap instead of buffering it whole. Each limit has a test. * fix(mcp): keep ?token= on /ws, checked before the upgrade (#4752) Browsers cannot set Authorization on a WebSocket, so dropping ?token= would cut browser clients off /ws and make the HTTP transport behave differently from the standalone WebSocket transport. verifyClient now takes the token from the Authorization header or, failing that, from ?token=, still before the upgrade and still failing closed on an empty token list. ADR-479 describes the new check. Also: - maxMessageSize and maxSseClients fall back to their defaults unless they are positive numbers. - shared/src/mcp/transport/http.ts: /ws gets maxPayload (maxMessageSize, default 10 MiB) instead of the ws 100 MiB default. * chore(ruflo-x-gateway): bump to 0.10.5 for the ws-proxy slot fix Co-Authored-By: RuFlo <ruv@ruv.net> * chore(leaves): shared 3.0.9 for the /ws payload cap (#4752) The /ws maxPayload change in shared/src/mcp/transport/http.ts only reaches users through a standalone shared publish. shared 3.0.9 is published; the CLI and root manifests pin it and both lockfiles follow. Co-Authored-By: RuFlo <ruv@ruv.net> * test(ci): list the x-gateway ws-proxy node:test file with its siblings Root vitest cannot run plugins/ruflo-x-gateway node:test files (they run via the plugin's npm test), so each one is listed in ci-test-baseline.txt. The new ws-proxy test was missing, which failed the ratchet with 'No test suite found'. Co-Authored-By: RuFlo <ruv@ruv.net> --------- Co-authored-by: Rutvij97 <218486544+Rutvij97@users.noreply.github.com> Co-authored-by: rUv <ruv@ruv.net> Co-authored-by: r <r@x>
71 lines
1.7 KiB
JSON
71 lines
1.7 KiB
JSON
{
|
|
"name": "@claude-flow/shared",
|
|
"version": "3.0.9",
|
|
"type": "module",
|
|
"description": "Shared types, event bus, config schemas and validators, MCP transport helpers and resilience utilities used by the Ruflo (claude-flow) V3 packages.",
|
|
"main": "dist/index.js",
|
|
"types": "dist/index.d.ts",
|
|
"exports": {
|
|
".": "./dist/index.js",
|
|
"./types": "./dist/types/index.js",
|
|
"./core": "./dist/core/index.js",
|
|
"./events": "./dist/events/index.js",
|
|
"./hooks": "./dist/hooks/index.js",
|
|
"./mcp": "./dist/mcp/index.js",
|
|
"./security": "./dist/security/index.js",
|
|
"./resilience": "./dist/resilience/index.js",
|
|
"./src/plugin-interface.js": "./dist/plugin-interface.js"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"!dist/**/*.test.*",
|
|
"!dist/**/*.spec.*",
|
|
"!dist/**/__tests__",
|
|
"README.md"
|
|
],
|
|
"scripts": {
|
|
"test": "vitest run",
|
|
"build": "tsc"
|
|
},
|
|
"dependencies": {
|
|
"@types/ws": "^8.5.10",
|
|
"cors": "^2.8.5",
|
|
"express": "^4.22.3 || ^5.1.0",
|
|
"helmet": "^7.2.0",
|
|
"sql.js": "^1.10.3",
|
|
"ws": "^8.21.0",
|
|
"zod": "^4.6.7"
|
|
},
|
|
"devDependencies": {
|
|
"@types/cors": "^2.8.17",
|
|
"@types/express": "^4.17.21",
|
|
"@types/node": "^20.0.0",
|
|
"@types/sql.js": "^1.4.9",
|
|
"vitest": "^4.1.0"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"keywords": [
|
|
"ruflo",
|
|
"claude-flow",
|
|
"shared",
|
|
"types",
|
|
"event-bus",
|
|
"config-validation",
|
|
"zod",
|
|
"mcp",
|
|
"resilience",
|
|
"typescript"
|
|
],
|
|
"homepage": "https://ruv.io",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/ruvnet/ruflo.git",
|
|
"directory": "v3/@claude-flow/shared"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/ruvnet/ruflo/issues"
|
|
}
|
|
}
|