Compare commits

...

2 Commits

Author SHA1 Message Date
DrSmoothl
f8cb15c27b chore(release): v2.1.1 2026-10-22 01:02:02 +08:00
DrSmoothl
c5464e48d1 fix(security): update runtime baseline and vulnerable dependencies
Require patched Node.js releases and refresh affected application and build dependencies.

Align installation requirements, startup checks, and release workflows with the security baseline.
2026-10-22 01:00:13 +08:00
30 changed files with 435 additions and 357 deletions

View File

@@ -141,7 +141,7 @@ jobs:
# Naming convention:
# SnowLuma-dev-<arch>.zip|tar.gz – zero-install (node bundled)
# SnowLuma-dev-<arch>-lite.zip|tar.gz – user provides Node 24+
# SnowLuma-dev-<arch>-lite.zip|tar.gz – user provides Node ^24.22.1 or >=26.12.1
- name: Package (windows)
if: matrix.os == 'windows-latest'
shell: pwsh

View File

@@ -41,9 +41,8 @@ jobs:
uses: actions/setup-node@v6
with:
# Trusted Publishing requires Node >=22.14 and npm >=11.5.1.
# Node 24 ships a supported npm CLI; the application runtime stays
# pinned separately by .node-version.
node-version: '24'
# Use the same patched runtime as application builds.
node-version-file: '.node-version'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

View File

@@ -90,7 +90,7 @@ jobs:
# Naming convention:
# SnowLuma-<tag>-<arch>.zip|tar.gz – zero-install (node bundled)
# SnowLuma-<tag>-<arch>-lite.zip|tar.gz – user provides Node 24+
# SnowLuma-<tag>-<arch>-lite.zip|tar.gz – user provides Node ^24.22.1 or >=26.12.1
- name: Package (windows)
if: matrix.os == 'windows-latest'
shell: pwsh
@@ -157,7 +157,7 @@ jobs:
## 选择下载
| 平台 | 完整版(内置 Node.js,推荐) | Lite(Node.js 24+) |
| 平台 | 完整版(内置 Node.js,推荐) | Lite(Node.js 24.22.1 / 26.12.1 起) |
| --- | --- | --- |
| Windows x64 | \`SnowLuma-${tag}-win-x64.zip\` | \`SnowLuma-${tag}-win-x64-lite.zip\` |
| Linux x64 | \`SnowLuma-${tag}-linux-x64.tar.gz\` | \`SnowLuma-${tag}-linux-x64-lite.tar.gz\` |

View File

@@ -38,9 +38,8 @@ jobs:
uses: actions/setup-node@v6
with:
# Trusted Publishing requires Node >=22.14 and npm >=11.5.1.
# Node 24 ships a supported npm CLI; the application runtime stays
# pinned separately by .node-version.
node-version: '24'
# Use the same patched runtime as application builds.
node-version-file: '.node-version'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

View File

@@ -38,9 +38,8 @@ jobs:
uses: actions/setup-node@v6
with:
# Trusted Publishing requires Node >=22.14 and npm >=11.5.1.
# Node 24 ships a supported npm CLI; the application runtime stays
# pinned separately by .node-version.
node-version: '24'
# Use the same patched runtime as application builds.
node-version-file: '.node-version'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

View File

@@ -1 +1 @@
24.21.0
24.22.1

View File

@@ -54,6 +54,8 @@ Read the relevant owner before changing a path:
Use the Node version in [.node-version](.node-version) and the pnpm version in [package.json](package.json). Install with `pnpm install --frozen-lockfile`; keep the existing lockfile unless changing dependencies.
The Node security baseline is `^24.22.1 || >=26.12.1`; older 24.x releases, 25.x and unpatched 26.x releases are unsupported. Keep workspace `engines.node` declarations and [the launcher preflight](packages/runtime/check-node-version.cjs) aligned. CI and bundled releases use `.node-version`; raising that pin alone does not upgrade an existing installation's runtime.
Run commands from the repository root:
```sh

View File

@@ -58,7 +58,7 @@ SnowLuma 处于开发早期,迭代速度很快,**接口与目录结构随时
### 系统要求
- **Node.js 24+**
- **Node.js 24.22.1(24 系列),或 26.12.1 及更新版本**;开发和构建使用 [`.node-version`](.node-version) 固定的版本。
- **pnpm 11.25.0**(项目通过 `packageManager` 与 CI 统一版本)
- macOS / Linux / Windows 均可。如果要构建原生产物,需要对应平台的工具链。

View File

@@ -1,7 +1,7 @@
{
"license": "SEE LICENSE IN LICENSE",
"name": "snowluma-monorepo",
"version": "2.1.0",
"version": "2.1.1",
"description": "SnowLuma monorepo workspace (pnpm)",
"private": true,
"type": "module",
@@ -35,8 +35,8 @@
"devDependencies": {
"@eslint/js": "^10.0.1",
"@stylistic/eslint-plugin": "5.10.0",
"@vitest/coverage-istanbul": "4.1.4",
"@vitest/coverage-v8": "^4.1.4",
"@vitest/coverage-istanbul": "4.1.11",
"@vitest/coverage-v8": "4.1.11",
"cross-env": "^10.1.0",
"eslint": "^10.2.0",
"eslint-config-prettier": "10.1.8",
@@ -50,7 +50,7 @@
},
"packageManager": "pnpm@11.25.0",
"engines": {
"node": ">=24",
"node": "^24.22.1 || >=26.12.1",
"pnpm": "11.25.0"
}
}

View File

@@ -1,7 +1,7 @@
{
"license": "SEE LICENSE IN LICENSE",
"name": "@snowluma/bridge",
"version": "2.1.0",
"version": "2.1.1",
"private": true,
"type": "module",
"description": "SnowLuma bridge — QQ NT desktop client lifecycle: hook injection (via native addon), per-PID HookSession orchestration, pipe-watcher for process discovery, and the BridgeManagerSink interface that lets the hook layer call back into a UIN-keyed session router without depending on @snowluma/core. Consumed by the top-level app entry (which constructs the BridgeManager from @snowluma/core and injects it as the sink) and by the WebUI server (read-only HookProcessInfo views).",
@@ -61,9 +61,9 @@
"@types/node": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "^4.1.4"
"vitest": "4.1.11"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
}
}

View File

@@ -1,7 +1,7 @@
{
"license": "SEE LICENSE IN LICENSE",
"name": "@snowluma/common",
"version": "2.1.0",
"version": "2.1.1",
"private": true,
"type": "module",
"description": "SnowLuma shared infrastructure — leaf-package utilities with zero business dependencies. Logger / hex codec / log file transport / log line summariser / packet sender wire-protocol types / runtime config loader. Consumed by @snowluma/protocol, @snowluma/core, and @snowluma/onebot. Per-file subpath exports keep import sites unambiguous and let the bundler tree-shake aggressively (importing `@snowluma/common/hex` doesn't pull in `node:fs` from the logger transport).",
@@ -109,7 +109,7 @@
"@types/node": "catalog:",
"@types/semver": "7.7.1",
"typescript": "catalog:",
"vitest": "^4.1.4"
"vitest": "4.1.11"
},
"dependencies": {
"@zxcvbn-ts/core": "^4.1.2",
@@ -118,6 +118,6 @@
"semver": "7.7.4"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
}
}

View File

@@ -1,7 +1,7 @@
{
"license": "SEE LICENSE IN LICENSE",
"name": "@snowluma/core",
"version": "2.1.0",
"version": "2.1.1",
"description": "SnowLuma core - NTQQ packet sniffer with Node.js native addon",
"private": true,
"type": "module",
@@ -57,15 +57,15 @@
"@rollup/plugin-node-resolve": "^16.0.3",
"@types/node": "catalog:",
"cross-env": "^10.1.0",
"hono": "^4.12.34",
"hono": "^4.13.11",
"tsx": "^4.21.0",
"typescript": "catalog:",
"vite": "catalog:",
"vite-plugin-cp": "^6.0.3",
"vitest": "^4.1.4",
"vitest": "4.1.11",
"@snowluma/sqlite": "workspace:*"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
}
}

View File

@@ -1,4 +1,5 @@
import { createRequire } from 'node:module';
import { readFileSync, readdirSync } from 'node:fs';
import { describe, expect, it } from 'vitest';
const require = createRequire(import.meta.url);
@@ -9,17 +10,48 @@ const { SUPPORTED_NODE_RANGE, isSupportedNodeVersion } =
};
describe('runtime Node.js preflight', () => {
it('accepts the documented minimum and newer versions', () => {
expect(SUPPORTED_NODE_RANGE).toBe('>=24');
expect(isSupportedNodeVersion('24.0.0')).toBe(true);
expect(isSupportedNodeVersion('24.21.0')).toBe(true);
expect(isSupportedNodeVersion('26.0.0')).toBe(true);
it.each(['24.22.1', '24.22.2', '24.23.0', '24.22.1+vendor.1', '26.12.1', '26.13.0', '27.0.0'])(
'accepts patched stable Node.js %s',
(version) => {
expect(isSupportedNodeVersion(version)).toBe(true);
},
);
it.each([
'22.23.4',
'23.99.99',
'24.0.0',
'24.21.0',
'24.22.0',
'25.99.99',
'26.0.0',
'26.11.99',
'26.12.0',
'24.22.1-rc.1',
'26.12.1-rc.1',
'not-a-version',
])('rejects unpatched, unsupported or malformed Node.js %s', (version) => {
expect(isSupportedNodeVersion(version)).toBe(false);
});
it('rejects older and malformed versions', () => {
expect(isSupportedNodeVersion('22.99.99')).toBe(false);
expect(isSupportedNodeVersion('23.99.99')).toBe(false);
expect(isSupportedNodeVersion('21.99.99')).toBe(false);
expect(isSupportedNodeVersion('not-a-version')).toBe(false);
it('keeps workspace requirements and the bundled runtime baseline aligned', () => {
expect(SUPPORTED_NODE_RANGE).toBe('^24.22.1 || >=26.12.1');
const root = new URL('../../../', import.meta.url);
const packages = readdirSync(new URL('packages/', root), { withFileTypes: true });
const manifests = [
new URL('package.json', root),
...packages
.filter((entry) => entry.isDirectory())
.map((entry) => new URL(`packages/${entry.name}/package.json`, root)),
];
for (const manifest of manifests) {
const pkg = JSON.parse(readFileSync(manifest, 'utf8'));
expect(pkg.engines.node, manifest.pathname).toBe(SUPPORTED_NODE_RANGE);
}
const baseline = readFileSync(new URL('.node-version', root), 'utf8').trim();
expect(baseline).toBe('24.22.1');
expect(isSupportedNodeVersion(baseline)).toBe(true);
});
});

View File

@@ -1,7 +1,7 @@
{
"license": "SEE LICENSE IN LICENSE",
"name": "@snowluma/mcp",
"version": "2.1.0",
"version": "2.1.1",
"description": "MCP server exposing the SnowLuma OneBot action catalog (docs + JSON Schemas) and optional execution to LLM clients.",
"repository": {
"type": "git",
@@ -40,7 +40,7 @@
"qq"
],
"dependencies": {
"@modelcontextprotocol/sdk": "^1.0.0"
"@modelcontextprotocol/sdk": "^1.32.0"
},
"devDependencies": {
"@snowluma/onebot": "workspace:*",
@@ -48,10 +48,10 @@
"@types/node": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "^4.1.4"
"vitest": "4.1.11"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
},
"publishConfig": {
"access": "public"

View File

@@ -1,7 +1,7 @@
{
"license": "SEE LICENSE IN LICENSE",
"name": "@snowluma/onebot",
"version": "2.1.0",
"version": "2.1.1",
"private": true,
"type": "module",
"description": "SnowLuma OneBot v11 adapter — the protocol translation layer that maps the public OneBot vocabulary (HTTP / WebSocket actions, message segments, post events) onto @snowluma/core's typed Api hub (`bridge.apis.<area>.method()`). Owns network adapters (HTTP server / HTTP client / WS server / WS client), the registered action handlers, the receive-side event→OneBot converter, message-id hashing, message store (SQLite-backed event history), media store, and the OneBot instance + manager that ties one OneBotConfig to one Bridge. Per-file subpath exports mirror the legacy `core/src/onebot/*` layout 1:1 so the previous `import { … } from '../onebot/<x>'` collapses to `import { … } from '@snowluma/onebot/<x>'`.",
@@ -119,9 +119,9 @@
"@types/node": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "^4.1.4"
"vitest": "4.1.11"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
}
}

View File

@@ -1,7 +1,7 @@
{
"license": "SEE LICENSE IN LICENSE",
"name": "@snowluma/proto-defs",
"version": "2.1.0",
"version": "2.1.1",
"private": true,
"type": "module",
"description": "SnowLuma QQ/Lagrange wire-protobuf type definitions. Pure TypeScript interfaces with proton's `pb<N, T>` marker types — `@snowluma/proton`'s vite plugin compiles them into zero-runtime encoder/decoder functions at the call sites in `@snowluma/core` (and any downstream consumer). Exposed as per-file subpaths (`@snowluma/proto-defs/oidb`, `@snowluma/proto-defs/message`, …) so the import-site shape mirrors the legacy `bridge/proto/proton/*` layout and avoids name collisions across files (notably `highway.ts` and `oidb-actions/media.ts` share NTV2-prefixed names).",
@@ -84,6 +84,6 @@
"typescript": "catalog:"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
}
}

View File

@@ -1,7 +1,7 @@
{
"license": "SEE LICENSE IN LICENSE",
"name": "@snowluma/protocol",
"version": "2.1.0",
"version": "2.1.1",
"private": true,
"type": "module",
"description": "SnowLuma protocol — the protocol-layer between QQ wire bytes and typed events. Owns: identity service (uid↔uin cache with SQLite persistence), event bus, packet pipeline (incoming SSO packet → QQEventVariant), msg-push decoders, element-builder (MessageElement → wire elems[]), highway upload protocol (file/image/video/ptt), OIDB envelope helper, and the event/notice/request type vocabulary. Consumers (@snowluma/core, @snowluma/onebot) talk to this package through `BridgeContext` for runtime calls and the standalone classes (IdentityService, BridgeEventBus, IncomingPacketPipeline) for composition. Per-file subpath exports mirror the legacy `core/src/bridge/*` layout 1:1 so the previous `import { …} from '../bridge/<x>'` collapses to `import { … } from '@snowluma/protocol/<x>'`.",
@@ -121,9 +121,9 @@
"@types/node": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "^4.1.4"
"vitest": "4.1.11"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
}
}

View File

@@ -1,7 +1,7 @@
{
"license": "SEE LICENSE IN LICENSE",
"name": "@snowluma/proton",
"version": "2.1.0",
"version": "2.1.1",
"private": true,
"type": "module",
"description": "Compile-time protobuf encoder/decoder generator for SnowLuma. TypeScript interfaces → fully-inlined, zero-runtime protobuf codec functions. Vendored from SnowLuma/protobuf-dsl with edge-case fixes applied.",
@@ -39,9 +39,9 @@
"@types/node": "catalog:",
"tsup": "^8.5.0",
"vite": "catalog:",
"vitest": "^4.1.4"
"vitest": "4.1.11"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
}
}

View File

@@ -1,9 +1,9 @@
'use strict';
const SUPPORTED_NODE_RANGE = '>=24';
const SUPPORTED_NODE_RANGE = '^24.22.1 || >=26.12.1';
function parseNodeVersion(version) {
const match = /^(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(version);
const match = /^(\d+)\.(\d+)\.(\d+)(?:\+[0-9A-Za-z.-]+)?$/.exec(version);
return match ? match.slice(1, 4).map(Number) : null;
}
@@ -11,8 +11,10 @@ function isSupportedNodeVersion(version) {
const actual = parseNodeVersion(version);
if (!actual) return false;
const [major] = actual;
return major >= 24;
const [major, minor, patch] = actual;
if (major === 24) return minor > 22 || (minor === 22 && patch >= 1);
if (major === 26) return minor > 12 || (minor === 12 && patch >= 1);
return major > 26;
}
if (require.main === module && !isSupportedNodeVersion(process.versions.node)) {

View File

@@ -8,7 +8,7 @@ if [[ -x "./node" ]]; then
else
NODE_BIN="$(command -v node || true)"
if [[ -z "$NODE_BIN" ]]; then
echo "error: 'node' not found on PATH and no bundled ./node; install Node.js 24+." >&2
echo "error: 'node' not found on PATH and no bundled ./node; install Node.js 24.22.1 (24.x) or >=26.12.1." >&2
exit 127
fi
fi

View File

@@ -1,12 +1,12 @@
{
"license": "SEE LICENSE IN LICENSE",
"name": "@snowluma/runtime",
"version": "2.1.0",
"version": "2.1.1",
"private": true,
"type": "module",
"main": "index.mjs",
"description": "SnowLuma runtime distribution manifest: ships into dist/ (launcher.bat, package.json, native/*.dll, native/*.node). All native bindings ship as standalone `.node` files in `dist/native/` — loaded via `process.dlopen()` / `createRequire().require()` from inside the bundle. There are intentionally NO runtime npm dependencies; production artifacts are self-contained.",
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
}
}

View File

@@ -1,5 +1,9 @@
# Changelog
## Unreleased
- Require patched Node.js releases: 24.22.1 or newer in the 24.x line, or 26.12.1 and newer.
## 2.0.0
Upgrade to Node.js 24 or newer before updating the SDK. SDK and application versions are released together.

View File

@@ -11,6 +11,8 @@ The SDK follows SemVer for its public package surface:
SDK and application versions are synchronized by `pnpm bump <version>` from the repository root.
The current Node.js requirement is `^24.22.1 || >=26.12.1`. Use the repository's `.node-version` for development and builds.
- Major: removes or changes a public export, changes runtime behavior incompatibly, changes supported Node version, or changes package subpaths.
- Minor: adds new public API, supports new SnowLuma actions, adds optional parameters, or adds error subclasses.
- Patch: fixes bugs, improves docs, narrows implementation details without breaking public types, or updates action metadata without changing call signatures.

View File

@@ -4,7 +4,7 @@
"name": "MotricSeven",
"email": "motricseven@gmail.com"
},
"version": "2.1.0",
"version": "2.1.1",
"description": "TypeScript SDK for SnowLuma OneBot HTTP and WebSocket transports",
"keywords": [
"snowluma",
@@ -85,11 +85,11 @@
"access": "public"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
},
"devDependencies": {
"@types/node": "catalog:",
"typescript": "catalog:",
"vitest": "^4.1.4"
"vitest": "4.1.11"
}
}

View File

@@ -1,7 +1,7 @@
{
"license": "SEE LICENSE IN LICENSE",
"name": "@snowluma/sqlite",
"version": "2.1.0",
"version": "2.1.1",
"private": true,
"type": "module",
"description": "SnowLuma asynchronous SQLite facade, native loader and release assets.",
@@ -28,9 +28,9 @@
"@types/node": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "^4.1.4"
"vitest": "4.1.11"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
}
}

View File

@@ -4,7 +4,7 @@
"name": "MotricSeven",
"email": "motricseven@gmail.com"
},
"version": "2.1.0",
"version": "2.1.1",
"description": "Shared SnowLuma UI primitives — Tailwind 4 theme tokens + shadcn-style atomic components",
"keywords": [
"snowluma",
@@ -53,7 +53,7 @@
"access": "public"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
},
"peerDependencies": {
"react": "^19.0.0",

View File

@@ -1,7 +1,7 @@
{
"license": "SEE LICENSE IN LICENSE",
"name": "@snowluma/websocket",
"version": "2.1.0",
"version": "2.1.1",
"private": true,
"type": "module",
"main": "./src/index.ts",
@@ -20,9 +20,9 @@
"devDependencies": {
"@types/node": "catalog:",
"typescript": "catalog:",
"vitest": "^4.1.4"
"vitest": "4.1.11"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
}
}

View File

@@ -2,7 +2,7 @@
"license": "SEE LICENSE IN LICENSE",
"name": "webui",
"private": true,
"version": "2.1.0",
"version": "2.1.1",
"type": "module",
"scripts": {
"dev": "vite",
@@ -50,9 +50,9 @@
"typescript": "catalog:",
"typescript-eslint": "^8.58.2",
"vite": "catalog:",
"vitest": "^4.1.4"
"vitest": "4.1.11"
},
"engines": {
"node": ">=24"
"node": "^24.22.1 || >=26.12.1"
}
}

587
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@ packages:
catalog:
'@types/node': 24.19.2
vite: ^8.0.16
vite: ~8.1.6
typescript: ~6.0.2
overrides:
@@ -11,13 +11,21 @@ overrides:
'esbuild@<0.28.1': ^0.28.1
'@babel/core@<7.29.6': ^7.29.6
'qs@<=6.15.3': ^6.16.0
'fast-uri@<3.1.6': ^3.1.6
'fast-uri@<3.1.8': ^3.1.8
'@hono/node-server@<1.19.15': ^1.19.15
'hono': ~4.12.34
'hono': ~4.13.11
'postcss@<=8.5.22': ^8.5.23
'ip-address@<=10.3.0': ^10.3.1
'ip-address@<10.7.1': ^10.7.1
'body-parser@<2.3.0': ^2.3.0
'brace-expansion@<5.0.7': ^5.0.7
'brace-expansion@<5.0.12': ^5.0.12
'undici@>=8.0.0 <8.12.2': 8.12.2
'browserslist@<4.28.7': 4.28.7
'@humanfs/node@<0.16.8': 0.16.8
'baseline-browser-mapping@<2.11.0': 2.11.0
'figlet@<1.11.3': 1.11.3
'seroval@<1.6.3': 1.6.3
'source-map-js@<1.2.2': 1.2.2
'proxy-addr@<2.0.8': 2.0.8
peerDependencyRules:
allowedVersions: