@clawtrial/courtroom 2.0.3 → 2.0.5

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.3",
5
+ "version": "2.0.5",
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.3",
3
+ "version": "2.0.5",
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
@@ -344,14 +344,14 @@ function register(api) {
344
344
  // -------------------------------------------------------------------------
345
345
  // Hook: before_prompt_build — analyse messages + inject context
346
346
  // -------------------------------------------------------------------------
347
- api.on('before_prompt_build', async (_event, ctx) => {
347
+ api.on('before_prompt_build', async (event, _ctx) => {
348
348
  if (!runtime.initialized || !runtime.enabled) return {};
349
349
 
350
350
  const result = {};
351
351
 
352
352
  try {
353
353
  // Run offense detection against current messages
354
- const messages = ctx.messages || [];
354
+ const messages = event.messages || [];
355
355
  const verdictContext = await runtime.onMessages(messages);
356
356
 
357
357
  // Collect any context to append