MO§ES™ Audit Trail
Every governed action is logged. Every log entry is hashed. Every hash references the previous. The chain is tamper-evident and append-only.
You must log before your final response. Skipping the audit is a constitutional violation. It will be caught by the Observer and flagged.
moseslogaction Tool
Call this before every final response:
CODEBLOCK0
Or via script:
python3 ~/.openclaw/workspace/skills/moses-governance/scripts/audit_stub.py log \
--agent primary \
--action "treasury_transfer_check" \
--detail "Transfer 50 SOL to 7xK...3nR evaluated under High Security + DEFENSE" \
--outcome "held_pending_confirmation"
mosesverifychain Tool
Call when operator runs /audit verify:
CODEBLOCK2
Or via script:
CODEBLOCK3
Returns: [VERIFY OK] Chain intact. N entries verified.
Or: [VERIFY FAILED] Entry N: hash mismatch. Chain broken.
/audit Command Handler
| Command | Action |
|---|
| INLINECODE3 | INLINECODE4 |
| INLINECODE5 |
python3 audit_stub.py verify |
|
/audit recent 25 |
python3 audit_stub.py recent --n 25 |
Ledger Format
File: INLINECODE9
Each line is a JSON entry:
{
"timestamp": "2026-03-13T14:22:01Z",
"agent": "primary",
"component": "moses-audit",
"action": "treasury_transfer_check",
"detail": "Transfer 50 SOL — held by DEFENSE posture",
"outcome": "held_pending_confirmation",
"mode": "high-security",
"posture": "defense",
"role": "primary",
"previous_hash": "abc123...",
"hash": "def456..."
}
Audit Mandate
Every agent in the MO§ES™ hierarchy appends to this shared ledger before final response. The ledger is:
- - Append-only — nothing deleted, nothing modified
- Hash-chained — every entry references previous entry's hash
- Governance-aware — active mode/posture/role recorded with every entry
- Verifiable — full chain can be verified at any time
Session hashes (① config + ② content) are derived from the ledger. Onchain anchoring (③ — planned, not yet implemented) will write the chain tip to Solana or Base as a memo transaction.
Data Sensitivity
The detail field is freeform. Do not log raw secrets, private keys, tokens, or PII in this field. Log action descriptions and outcomes only. Example of what belongs:
CODEBLOCK5
Not:
CODEBLOCK6
INLINECODE11 is used locally for HMAC attestation only. It is never written to the ledger and never transmitted.
MO§ES™ 审计追踪
每个受治理的操作都会被记录。每条日志条目都会被哈希处理。每个哈希值都引用前一个哈希值。该链具有防篡改和仅追加特性。
你必须在最终响应之前进行记录。 跳过审计属于违反宪法的行为。观察者将会发现并标记此行为。
moseslogaction 工具
在每次最终响应前调用此工具:
logaction>
主代理|次代理|观察者
所执行操作的简短描述
具体细节 — 评估了什么、阻止了什么、执行了什么
结果:已执行 | 已阻止 | 已暂挂 | 已标记 | 已记录
或通过脚本:
bash
python3 ~/.openclaw/workspace/skills/moses-governance/scripts/audit_stub.py log \
--agent primary \
--action treasurytransfercheck \
--detail Transfer 50 SOL to 7xK...3nR evaluated under High Security + DEFENSE \
--outcome heldpendingconfirmation
mosesverifychain 工具
当操作员运行 /audit verify 时调用:
verifychain />
或通过脚本:
bash
python3 ~/.openclaw/workspace/skills/moses-governance/scripts/audit_stub.py verify
返回:[VERIFY OK] Chain intact. N entries verified.
或:[VERIFY FAILED] Entry N: hash mismatch. Chain broken.
/audit 命令处理器
| 命令 | 操作 |
|---|
| /audit recent | python3 auditstub.py recent --n 10 |
| /audit verify |
python3 auditstub.py verify |
| /audit recent 25 | python3 audit_stub.py recent --n 25 |
账本格式
文件:~/.openclaw/audits/moses/audit_ledger.jsonl
每行是一个 JSON 条目:
json
{
timestamp: 2026-03-13T14:22:01Z,
agent: primary,
component: moses-audit,
action: treasurytransfercheck,
detail: Transfer 50 SOL — held by DEFENSE posture,
outcome: heldpendingconfirmation,
mode: high-security,
posture: defense,
role: primary,
previous_hash: abc123...,
hash: def456...
}
审计授权
MO§ES™ 层级结构中的每个代理在最终响应前都会向此共享账本追加内容。该账本具有以下特性:
- - 仅追加 — 不删除任何内容,不修改任何内容
- 哈希链式 — 每个条目引用前一个条目的哈希值
- 治理感知 — 每个条目都记录活动模式/姿态/角色
- 可验证 — 可随时验证整个链
会话哈希(① 配置 + ② 内容)源自账本。链上锚定(③ — 已规划,尚未实现)将把链顶端作为备忘录交易写入 Solana 或 Base。
数据敏感性
detail 字段为自由格式。请勿在此字段中记录原始密钥、私钥、令牌或个人身份信息。仅记录操作描述和结果。正确示例:
detail: Transfer 50 SOL evaluated under High Security + DEFENSE — held pending confirmation
错误示例:
detail: API key sk-abc123 used to authenticate transfer
MOSESOPERATORSECRET 仅用于本地 HMAC 认证。它永远不会写入账本,也永远不会传输。