shieldcortex 3.4.33 → 3.4.36
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/README.md
CHANGED
|
@@ -84,6 +84,7 @@ Your agent does not just store text. It gives you operator-grade visibility into
|
|
|
84
84
|
- 🎞️ **Incident replay** — reconstruct memory and defence timelines from audit, quarantine, and retained event history
|
|
85
85
|
- 🔔 **Webhooks** — POST notifications on memory events, HMAC-SHA256 signed
|
|
86
86
|
- 📅 **Expiry rules** — auto-delete TODOs after 30 days, keep architecture decisions forever
|
|
87
|
+
- 🧠 **Mistake learning** — capture mistakes, run pre-flight checks, graduate mastered rules (Pro)
|
|
87
88
|
|
|
88
89
|
### Security that shows up exactly when it matters
|
|
89
90
|
|
|
@@ -317,6 +318,37 @@ deletes are no longer advisory-only.
|
|
|
317
318
|
|
|
318
319
|
<br>
|
|
319
320
|
|
|
321
|
+
## 🧠 Cortex — Systematic Mistake Learning
|
|
322
|
+
|
|
323
|
+
Your agent makes mistakes. Cortex makes sure it doesn't make the same one twice.
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
shieldcortex cortex capture --category code --what "Guessed API endpoints" --why "Didn't check docs" --rule "Always verify endpoints in API docs before calling"
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Cortex is a mistake-capture and pre-flight check system built into ShieldCortex:
|
|
330
|
+
|
|
331
|
+
- **Capture** — Log what went wrong, why, and the rule to prevent it
|
|
332
|
+
- **Pre-flight** — Before any task, check against your mistake database for relevant warnings
|
|
333
|
+
- **Review** — Pattern analysis across categories (code, config, process, design, security, etc.)
|
|
334
|
+
- **Graduate** — Archive rules you've mastered (30+ days, no recurrence)
|
|
335
|
+
- **Search** — Full-text search across all captured mistakes
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
# Before deploying, check for relevant past mistakes
|
|
339
|
+
shieldcortex cortex preflight --task "deploy to production"
|
|
340
|
+
|
|
341
|
+
# Weekly review — see patterns and repeat offenders
|
|
342
|
+
shieldcortex cortex review
|
|
343
|
+
|
|
344
|
+
# Graduate mastered rules
|
|
345
|
+
shieldcortex cortex graduate
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
Cortex data is stored locally in `~/.shieldcortex/cortex/`. Pro licence required.
|
|
349
|
+
|
|
350
|
+
<br>
|
|
351
|
+
|
|
320
352
|
## 🐾 OpenClaw Integration
|
|
321
353
|
|
|
322
354
|
ShieldCortex is a first-class citizen in [OpenClaw](https://github.com/openclaw) — the open-source AI agent framework. One command connects them:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shieldcortex",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.36",
|
|
4
4
|
"description": "Trustworthy memory and security for AI agents. Recall debugging, review queue, OpenClaw session capture, and memory poisoning defence for Claude Code, Codex, OpenClaw, LangChain, and MCP agents.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ShieldCortex Real-time Scanning Plugin for OpenClaw v2026.
|
|
2
|
+
* ShieldCortex Real-time Scanning Plugin for OpenClaw v2026.3.22+
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* and optional memory extraction.
|
|
4
|
+
* Uses explicit capability registration (registerHook + registerCommand)
|
|
5
|
+
* for llm_input/llm_output scanning and optional memory extraction.
|
|
6
|
+
* All scanning operations are fire-and-forget.
|
|
6
7
|
*/
|
|
7
8
|
import { execFileSync } from "node:child_process";
|
|
8
9
|
import { createHash } from "node:crypto";
|
|
@@ -582,8 +583,31 @@ export default {
|
|
|
582
583
|
},
|
|
583
584
|
register(api) {
|
|
584
585
|
applyPluginConfigOverride(api);
|
|
585
|
-
api.on
|
|
586
|
-
api.
|
|
587
|
-
|
|
586
|
+
// Explicit capability registration (replaces legacy api.on)
|
|
587
|
+
api.registerHook("llm_input", handleLlmInput, {
|
|
588
|
+
name: "shieldcortex-scan-input",
|
|
589
|
+
description: "Real-time threat scanning on LLM input",
|
|
590
|
+
});
|
|
591
|
+
api.registerHook("llm_output", handleLlmOutput, {
|
|
592
|
+
name: "shieldcortex-scan-output",
|
|
593
|
+
description: "Memory extraction from LLM output",
|
|
594
|
+
});
|
|
595
|
+
// Register a lightweight status command so the plugin is not hook-only
|
|
596
|
+
api.registerCommand({
|
|
597
|
+
name: "shieldcortex-status",
|
|
598
|
+
aliases: ["sc-status"],
|
|
599
|
+
description: "Show ShieldCortex real-time scanner status",
|
|
600
|
+
async execute({ reply }) {
|
|
601
|
+
const cfg = await loadConfig();
|
|
602
|
+
const autoMemory = isAutoMemoryEnabled(cfg) ? "on" : "off";
|
|
603
|
+
const dedupe = isAutoMemoryDedupeEnabled(cfg) ? "on" : "off";
|
|
604
|
+
const cloud = cfg.cloudApiKey ? "configured" : "not configured";
|
|
605
|
+
reply(`ShieldCortex v${_version}\n` +
|
|
606
|
+
` Hooks: llm_input (scan), llm_output (memory)\n` +
|
|
607
|
+
` Auto memory: ${autoMemory} | Dedupe: ${dedupe}\n` +
|
|
608
|
+
` Cloud sync: ${cloud}`);
|
|
609
|
+
},
|
|
610
|
+
});
|
|
611
|
+
api.logger.info(`[shieldcortex] v${_version} registered (llm_input + llm_output + /shieldcortex-status)`);
|
|
588
612
|
},
|
|
589
613
|
};
|