@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.
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/src/plugin.js +2 -2
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
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 (
|
|
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 =
|
|
354
|
+
const messages = event.messages || [];
|
|
355
355
|
const verdictContext = await runtime.onMessages(messages);
|
|
356
356
|
|
|
357
357
|
// Collect any context to append
|