Files
MATTERMOST_OPENCLAW_LIVESTATUS/package.json
sol 43cfebee96 feat: Phase 0+1 — repo sync, pino, lint fixes, core components
Phase 0:
- Synced latest live-status.js from workspace (9928 bytes)
- Fixed 43 lint issues: empty catch blocks, console statements
- Added pino dependency
- Created src/tool-labels.json with all known tool mappings
- make check passes

Phase 1 (Core Components):
- src/config.js: env-var config with validation, throws on missing required vars
- src/logger.js: pino singleton with child loggers, level validation
- src/circuit-breaker.js: CLOSED/OPEN/HALF_OPEN state machine with callbacks
- src/tool-labels.js: exact/prefix/regex tool->label resolver with external override
- src/status-box.js: Mattermost post manager (keepAlive, throttle, retry, circuit breaker)
- src/status-formatter.js: pure SessionState->text formatter (nested, compact)
- src/health.js: HTTP health endpoint + metrics
- src/status-watcher.js: JSONL file watcher (inotify, compaction detection, idle detection)

Tests:
- test/unit/config.test.js: 7 tests
- test/unit/circuit-breaker.test.js: 12 tests
- test/unit/logger.test.js: 5 tests
- test/unit/status-formatter.test.js: 20 tests
- test/unit/tool-labels.test.js: 15 tests

All 59 unit tests pass. make check clean.
2026-03-07 17:26:53 +00:00

23 lines
632 B
JSON

{
"name": "mattermost-openclaw-livestatus",
"version": "4.0.0",
"private": true,
"description": "OpenClaw Live Status Tool for Mattermost",
"main": "src/watcher-manager.js",
"scripts": {
"start": "node src/watcher-manager.js start",
"stop": "node src/watcher-manager.js stop",
"status": "node src/watcher-manager.js status",
"test": "node --test test/unit/*.test.js",
"test:integration": "node --test test/integration/*.test.js"
},
"dependencies": {
"pino": "^9.14.0"
},
"devDependencies": {
"eslint": "^8.57.1",
"eslint-plugin-security": "^2.1.1",
"prettier": "^3.2.0"
}
}