Commit Graph

2 Commits

Author SHA1 Message Date
molecule-ai[bot]
e73b53e464
feat(mcp): add structured pino logging with AsyncLocalStorage context (KI-001) (#6)
Replace all console.log/error with structured JSON logging via pino.
Every log entry automatically carries toolName, requestId, and workspaceId
from the current AsyncLocalStorage scope — no need to thread context.

Changes:
- package.json: add pino@^9.6.0, pino-pretty@^13.0.0
- src/utils/context.ts: new — AsyncLocalStorage context + getContext/withContext/runWithContext
- src/utils/logger.ts: new — info/warn/error/debug helpers, JSON output in prod, pretty in dev
- src/api.ts: both console.error → logError(...)
- src/index.ts: all console.error → logInfo/logWarn/logError(...)
- known-issues.md: mark KI-001 resolved

Co-authored-by: Molecule AI SDK-Dev <sdk-dev@agents.moleculesai.app>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 18:37:40 +00:00
Hongming Wang
aa44c6b565 feat: MCP server content + npm publish CI 2026-04-16 03:50:00 -07:00