Every OneBot action call now emits a single debug line under
[Bridge.Action]:
DEBUG [Bridge.Action] send_group_msg group_id=12345 message=[len=3]
On failure, dispatch logs a warn with the full stack instead of
silently folding the error into the response. Unknown actions also
get a debug entry so "the bot is ignoring me" is no longer invisible.
Notes:
- New summarizeParams() helper caps each value at 40 chars / line at
200 chars to keep arrays / nested payloads from blowing the line
width. Lives in utils/log-summary.ts for reuse (highway will too).
- ApiHandler now takes an optional uin and binds a child logger so
per-account file routing works. OneBotInstance passes its parsed
uin.
- Control-char strip in logger/file-transport was exempting only ESC;
also exempt TAB (0x09) and LF (0x0A) so stack traces stay
multi-line in both console and file output.
- vitest.config sets SNOWLUMA_LOG_LEVEL=debug so the ring buffer
receives the new debug entries that tests assert on.
Adds a hand-rolled FileTransport that fans out every log line (debug
and up, regardless of console filter) to
./logs/snowluma-YYYY-MM-DD.log. When the current file exceeds the
configurable size cap it rolls into snowluma-YYYY-MM-DD.1.log, and
files older than the retention window are unlinked at startup and on
each day rollover.
Config (all env, no settings.json):
- SNOWLUMA_LOG_FILE 0 to disable file output (default: on)
- SNOWLUMA_LOG_DIR output directory (default: ./logs)
- SNOWLUMA_LOG_MAX_MB per-file cap, MB (default: 50)
- SNOWLUMA_LOG_RETAIN_DAYS retention window (default: 7)
closeLogger() awaits the WriteStream's finish event; SIGINT and
SIGTERM handlers now await it before process.exit so the buffer
makes it to disk.
vitest config sets SNOWLUMA_LOG_FILE=0 to keep the suite from
polluting cwd; the new tests under tests/log-file-transport.test.ts
flip it back on per-test against a tmpdir.
Restructure the repository into a pnpm workspace under packages/ (core, webui, runtime). Move source files for core and webui into packages/*, add package manifests for @snowluma/core and @snowluma/runtime, and remove the old launcher package.json. Update root package.json to be a monorepo controller (scripts delegate to pnpm filters, set packageManager and Node engine). Configure build outputs to emit into the repo-root dist/ (vite config changes) so the existing release pipeline continues to work. Add .npmrc with mirrors, expand .gitignore for monorepo layout, add tsconfig base and package-level tsconfigs, and add vitest config for the core package. Adjust injector native search paths and update tests import paths to the new package layout. Small CI/workflow comment added to clarify build behavior and README updated with monorepo structure and common commands.