@clawtrial/courtroom 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  "id": "courtroom",
3
3
  "name": "ClawTrial Courtroom",
4
4
  "description": "Autonomous behavioral oversight plugin for OpenClaw",
5
- "version": "2.0.2",
5
+ "version": "2.0.3",
6
6
  "author": "ClawTrial",
7
7
  "main": "src/plugin.js",
8
8
  "engines": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawtrial/courtroom",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "AI Courtroom - Autonomous behavioral oversight plugin for OpenClaw",
5
5
  "main": "src/plugin.js",
6
6
  "openclaw": {
package/src/plugin.js CHANGED
@@ -30,7 +30,7 @@ const { logger, setLogDir } = require('./debug');
30
30
  const DEFAULT_CONFIG = {
31
31
  enabled: true,
32
32
  detection: {
33
- minMessages: 5,
33
+ minMessages: 3,
34
34
  cooldownMinutes: 30,
35
35
  maxCasesPerDay: 3,
36
36
  confidenceThreshold: 0.6
@@ -157,13 +157,21 @@ class CourtroomRuntime {
157
157
  // Check if we should evaluate
158
158
  const now = Date.now();
159
159
  const cooldownMs = (this.config.get('detection.cooldownMinutes') || 30) * 60 * 1000;
160
- const minMessages = this.config.get('detection.minMessages') || 5;
160
+ const minMessages = this.config.get('detection.minMessages') || 3;
161
161
  const userMessages = this.messageBuffer.filter(m => m.role === 'user');
162
162
 
163
+ logger.info('PLUGIN', `Buffered ${userMessages.length}/${minMessages} user messages`);
164
+
163
165
  if (userMessages.length < minMessages) return null;
164
- if (now - this.lastEvaluation < cooldownMs) return null;
166
+ if (now - this.lastEvaluation < cooldownMs) {
167
+ logger.info('PLUGIN', `Skipping evaluation (on cooldown)`);
168
+ return null;
169
+ }
165
170
  if (this.pendingHearing) return null;
166
- if (this._isDailyLimitReached()) return null;
171
+ if (this._isDailyLimitReached()) {
172
+ logger.info('PLUGIN', `Skipping evaluation (daily limit reached)`);
173
+ return null;
174
+ }
167
175
 
168
176
  // Run detection
169
177
  try {