fix: update storage paths to moltbot conventions

- Change default storage from ~/.web4/ to ~/.moltbot/extensions/web4-governance/
- Update documentation (README.md, ARCHITECTURE.md)
- Aligns with moltbot extension directory structure
This commit is contained in:
dp-web4 2026-01-28 13:33:19 -08:00
parent 93bab62444
commit b1b80bde19
3 changed files with 5 additions and 5 deletions

View File

@ -112,7 +112,7 @@ The plugin interface stays the same — just the policy evaluation gets richer.
## Storage Layout
```
~/.web4/
~/.moltbot/extensions/web4-governance/
├── audit/
│ └── <sessionId>.jsonl # Hash-linked audit records (append-only)
└── sessions/

View File

@ -33,7 +33,7 @@ All fields are optional. Defaults shown below.
"web4-governance": {
"auditLevel": "standard",
"showR6Status": true,
"storagePath": "~/.web4/",
"storagePath": "~/.moltbot/extensions/web4-governance/",
"policy": {
"defaultPolicy": "allow",
"enforce": true,
@ -48,7 +48,7 @@ All fields are optional. Defaults shown below.
|-------|------|---------|-------------|
| `auditLevel` | `"minimal" \| "standard" \| "verbose"` | `"standard"` | Controls audit detail level. `verbose` logs every R6 to the console. |
| `showR6Status` | `boolean` | `true` | Show R6 chain status in session output. |
| `storagePath` | `string` | `~/.web4/` | Directory for audit logs and session state. |
| `storagePath` | `string` | `~/.moltbot/extensions/web4-governance/` | Directory for audit logs and session state. |
| `policy` | `object` | see below | Policy engine configuration. |
## Policy Engine
@ -286,7 +286,7 @@ Constraints: policy:allow, rule:default
## Storage Layout
```
~/.web4/
~/.moltbot/extensions/web4-governance/
audit/
<sessionId>.jsonl # Hash-linked audit records (append-only)
sessions/

View File

@ -44,7 +44,7 @@ const plugin = {
register(api: MoltbotPluginApi) {
const config = (api.pluginConfig ?? {}) as PluginConfig;
const storagePath = config.storagePath ?? join(homedir(), ".web4");
const storagePath = config.storagePath ?? join(homedir(), ".moltbot", "extensions", "web4-governance");
const auditLevel = config.auditLevel ?? "standard";
const logger = api.logger;