Plugin Manager
Extend WasmClaw with WASM-native plugins for audit, memory, and scanning.
Initialising WASM registry…
Plugin Types
Audit HookRuns in the
JsAuditLog write path. Can inspect, mutate, or redact log records before they are persisted.Memory RankerRe-ranks swarm memory retrieval results before context injection. Receives the raw candidate list, returns a re-ordered slice.
Scanner ExtensionContributes extra rules to
SoulScan. Each rule returns a list of findings appended to the Scan audit event.Plugin Manifest Spec
JSON shape expected by JsPluginRegistry.add() (alpha.5+)
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "PluginCallbacks",
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Unique plugin identifier."
},
"onInit": {
"type": "function",
"description": "Called during Engine.init()."
},
"onReady": {
"type": "function",
"description": "Called before first run()."
},
"onRun": {
"type": "function",
"description": "Called at start of each run()."
},
"onRunComplete": {
"type": "function",
"description": "Called after each run() completes."
},
"onDestroy": {
"type": "function",
"description": "Called on Engine.dispose()."
}
}
}Demo Plugin Manifests
audit-redact-piiAudit HookUnloaded
Post-process every JsAuditLog record and redact PII tokens (email, phone, SSN) before persistence. Runs synchronously in the audit write path.
v0.1.0schema v1audit_redact_pii_bg.wasm
Config schema (JSON Schema)
{
"type": "object",
"properties": {
"patterns": {
"type": "array",
"items": {
"type": "string"
},
"description": "Extra regex patterns to redact in addition to built-ins.",
"default": []
},
"replacement": {
"type": "string",
"description": "Replacement token inserted in place of redacted text.",
"default": "[REDACTED]"
}
},
"required": []
}memory-rerank-bm25Memory RankerUnloaded
Re-rank swarm memory retrieval results using BM25 scoring before they are injected into the persona context window. Improves relevance for keyword-heavy queries.
v0.1.0schema v1memory_rerank_bm25_bg.wasm
Config schema (JSON Schema)
{
"type": "object",
"properties": {
"k1": {
"type": "number",
"description": "BM25 term frequency saturation parameter.",
"default": 1.5
},
"b": {
"type": "number",
"description": "BM25 document length normalization parameter.",
"default": 0.75
},
"top_k": {
"type": "integer",
"description": "Maximum number of results to return after re-ranking.",
"default": 10
}
},
"required": []
}scanner-pii-extensionScanner ExtensionUnloaded
Extend the built-in SoulScan ruleset with additional PII detection checks: Korean RRN (주민번호), passport numbers, and credit card PANs. Contributes rules to the Scan audit event.
v0.1.0schema v1scanner_pii_extension_bg.wasm
Config schema (JSON Schema)
{
"type": "object",
"properties": {
"enable_rrn": {
"type": "boolean",
"description": "Detect Korean Resident Registration Numbers.",
"default": true
},
"enable_passport": {
"type": "boolean",
"description": "Detect passport number patterns.",
"default": true
},
"enable_pan": {
"type": "boolean",
"description": "Detect credit card Primary Account Numbers (PAN).",
"default": true
},
"severity": {
"type": "string",
"enum": [
"info",
"warn",
"error"
],
"description": "Severity level assigned to findings.",
"default": "warn"
}
},
"required": []
}@wasmclaw/core@1.0.0-alpha.5 — PluginRegistry live (EPIC-7)