openclaw-observability 1.0.0
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/dist/config.d.ts +60 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +140 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1114 -0
- package/dist/index.js.map +1 -0
- package/dist/redaction.d.ts +20 -0
- package/dist/redaction.d.ts.map +1 -0
- package/dist/redaction.js +93 -0
- package/dist/redaction.js.map +1 -0
- package/dist/security/chain-detector.d.ts +37 -0
- package/dist/security/chain-detector.d.ts.map +1 -0
- package/dist/security/chain-detector.js +187 -0
- package/dist/security/chain-detector.js.map +1 -0
- package/dist/security/rules.d.ts +22 -0
- package/dist/security/rules.d.ts.map +1 -0
- package/dist/security/rules.js +479 -0
- package/dist/security/rules.js.map +1 -0
- package/dist/security/scanner.d.ts +47 -0
- package/dist/security/scanner.d.ts.map +1 -0
- package/dist/security/scanner.js +150 -0
- package/dist/security/scanner.js.map +1 -0
- package/dist/security/types.d.ts +47 -0
- package/dist/security/types.d.ts.map +1 -0
- package/dist/security/types.js +23 -0
- package/dist/security/types.js.map +1 -0
- package/dist/storage/buffer.d.ts +64 -0
- package/dist/storage/buffer.d.ts.map +1 -0
- package/dist/storage/buffer.js +120 -0
- package/dist/storage/buffer.js.map +1 -0
- package/dist/storage/duckdb-local-writer.d.ts +26 -0
- package/dist/storage/duckdb-local-writer.d.ts.map +1 -0
- package/dist/storage/duckdb-local-writer.js +454 -0
- package/dist/storage/duckdb-local-writer.js.map +1 -0
- package/dist/storage/mysql-writer.d.ts +55 -0
- package/dist/storage/mysql-writer.d.ts.map +1 -0
- package/dist/storage/mysql-writer.js +287 -0
- package/dist/storage/mysql-writer.js.map +1 -0
- package/dist/storage/schema.d.ts +13 -0
- package/dist/storage/schema.d.ts.map +1 -0
- package/dist/storage/schema.js +94 -0
- package/dist/storage/schema.js.map +1 -0
- package/dist/storage/writer.d.ts +31 -0
- package/dist/storage/writer.d.ts.map +1 -0
- package/dist/storage/writer.js +7 -0
- package/dist/storage/writer.js.map +1 -0
- package/dist/types.d.ts +72 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +44 -0
- package/dist/types.js.map +1 -0
- package/dist/web/api.d.ts +115 -0
- package/dist/web/api.d.ts.map +1 -0
- package/dist/web/api.js +219 -0
- package/dist/web/api.js.map +1 -0
- package/dist/web/routes.d.ts +20 -0
- package/dist/web/routes.d.ts.map +1 -0
- package/dist/web/routes.js +175 -0
- package/dist/web/routes.js.map +1 -0
- package/dist/web/ui.d.ts +9 -0
- package/dist/web/ui.d.ts.map +1 -0
- package/dist/web/ui.js +1327 -0
- package/dist/web/ui.js.map +1 -0
- package/openclaw.plugin.json +231 -0
- package/package.json +41 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../src/web/ui.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,gCAmBC;AAnBD,SAAgB,UAAU;IACxB,OAAO,mBAAmB;QAC5B,oBAAoB;QACpB,UAAU;QACV,0BAA0B;QAC1B,0EAA0E;QAC1E,wCAAwC;QACxC,mDAAmD;QACnD,WAAW;QACX,GAAG;QACH,YAAY;QACZ,WAAW;QACX,UAAU;QACV,wBAAwB;QACxB,YAAY;QACZ,SAAS;QACT,aAAa;QACb,WAAW;QACX,SAAS,CAAC;AACV,CAAC;AAED,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AAExE,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAm/BjB,CAAC"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "audit-duckdb",
|
|
3
|
+
"name": "openclaw-plugin-audit",
|
|
4
|
+
"version": "1.0.5",
|
|
5
|
+
"description": "Conversation model action audit plugin — full-chain traceability with built-in visualization",
|
|
6
|
+
"entry": "dist/index.js",
|
|
7
|
+
"slots": [
|
|
8
|
+
"before_model_resolve",
|
|
9
|
+
"before_prompt_build",
|
|
10
|
+
"llm_input",
|
|
11
|
+
"llm_output",
|
|
12
|
+
"before_tool_call",
|
|
13
|
+
"after_tool_call",
|
|
14
|
+
"tool_result_persist",
|
|
15
|
+
"message_received",
|
|
16
|
+
"message_sending",
|
|
17
|
+
"message_sent",
|
|
18
|
+
"agent_end",
|
|
19
|
+
"before_compaction",
|
|
20
|
+
"after_compaction",
|
|
21
|
+
"before_reset",
|
|
22
|
+
"session_start",
|
|
23
|
+
"session_end",
|
|
24
|
+
"subagent_spawned",
|
|
25
|
+
"subagent_ended",
|
|
26
|
+
"gateway_start",
|
|
27
|
+
"gateway_stop"
|
|
28
|
+
],
|
|
29
|
+
"uiHints": {
|
|
30
|
+
"mode": {
|
|
31
|
+
"label": "Storage Mode",
|
|
32
|
+
"help": "local = embedded local DB (zero config) | remote = external MySQL database"
|
|
33
|
+
},
|
|
34
|
+
"duckdb.path": {
|
|
35
|
+
"label": "Local DB File Path",
|
|
36
|
+
"placeholder": "~/.openclaw/audit.duckdb",
|
|
37
|
+
"help": "Local database file path (only effective in local mode)"
|
|
38
|
+
},
|
|
39
|
+
"mysql.host": {
|
|
40
|
+
"label": "MySQL Host",
|
|
41
|
+
"placeholder": "rm-xxx.mysql.rds.aliyuncs.com",
|
|
42
|
+
"help": "MySQL host address (only effective in remote mode)"
|
|
43
|
+
},
|
|
44
|
+
"mysql.port": {
|
|
45
|
+
"label": "MySQL Port",
|
|
46
|
+
"placeholder": "3306"
|
|
47
|
+
},
|
|
48
|
+
"mysql.user": {
|
|
49
|
+
"label": "MySQL User",
|
|
50
|
+
"placeholder": "root"
|
|
51
|
+
},
|
|
52
|
+
"mysql.password": {
|
|
53
|
+
"label": "MySQL Password",
|
|
54
|
+
"sensitive": true,
|
|
55
|
+
"placeholder": "••••••••",
|
|
56
|
+
"help": "Database password (displayed as password field in Dashboard)"
|
|
57
|
+
},
|
|
58
|
+
"mysql.database": {
|
|
59
|
+
"label": "Database Name",
|
|
60
|
+
"placeholder": "openclaw_audit",
|
|
61
|
+
"help": "Audit database name (auto-created if not exists)"
|
|
62
|
+
},
|
|
63
|
+
"buffer.batchSize": {
|
|
64
|
+
"label": "Batch Size",
|
|
65
|
+
"placeholder": "50",
|
|
66
|
+
"help": "Number of records to accumulate before batch write",
|
|
67
|
+
"advanced": true
|
|
68
|
+
},
|
|
69
|
+
"buffer.flushIntervalMs": {
|
|
70
|
+
"label": "Flush Interval (ms)",
|
|
71
|
+
"placeholder": "30000",
|
|
72
|
+
"help": "Flush interval in milliseconds (default: 30s)",
|
|
73
|
+
"advanced": true
|
|
74
|
+
},
|
|
75
|
+
"redaction.enabled": {
|
|
76
|
+
"label": "Enable Redaction",
|
|
77
|
+
"help": "Automatically redact sensitive fields like API keys and passwords"
|
|
78
|
+
},
|
|
79
|
+
"redaction.patterns": {
|
|
80
|
+
"label": "Redaction Patterns",
|
|
81
|
+
"help": "Redaction regex patterns (case-insensitive)",
|
|
82
|
+
"advanced": true
|
|
83
|
+
},
|
|
84
|
+
"security.enabled": {
|
|
85
|
+
"label": "Enable Security Scanning",
|
|
86
|
+
"help": "Enable security audit scanning (secret leaks, dangerous commands, prompt injection, etc.)"
|
|
87
|
+
},
|
|
88
|
+
"security.rules.secretLeakage": {
|
|
89
|
+
"label": "Secret Leakage Detection",
|
|
90
|
+
"help": "Detect AK/SK, private keys, JWT and other secret leaks",
|
|
91
|
+
"advanced": true
|
|
92
|
+
},
|
|
93
|
+
"security.rules.highRiskOps": {
|
|
94
|
+
"label": "High-Risk Ops Detection",
|
|
95
|
+
"help": "Detect high-risk operations like rm -rf, sudo, sensitive file access",
|
|
96
|
+
"advanced": true
|
|
97
|
+
},
|
|
98
|
+
"security.rules.promptInjection": {
|
|
99
|
+
"label": "Prompt Injection Detection",
|
|
100
|
+
"help": "Detect prompt injection attacks in tool outputs",
|
|
101
|
+
"advanced": true
|
|
102
|
+
},
|
|
103
|
+
"security.rules.chainDetection": {
|
|
104
|
+
"label": "Attack Chain Detection",
|
|
105
|
+
"help": "Cross-action behavior chain detection (e.g. read sensitive file -> exfiltrate data)",
|
|
106
|
+
"advanced": true
|
|
107
|
+
},
|
|
108
|
+
"security.domainWhitelist": {
|
|
109
|
+
"label": "Domain Whitelist",
|
|
110
|
+
"help": "Domain whitelist for external request detection",
|
|
111
|
+
"advanced": true
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"configSchema": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"properties": {
|
|
118
|
+
"mode": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"enum": ["local", "remote"],
|
|
121
|
+
"default": "local"
|
|
122
|
+
},
|
|
123
|
+
"duckdb": {
|
|
124
|
+
"type": "object",
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"properties": {
|
|
127
|
+
"path": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"default": "~/.openclaw/audit.duckdb"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"mysql": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"additionalProperties": false,
|
|
136
|
+
"properties": {
|
|
137
|
+
"host": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"default": "localhost"
|
|
140
|
+
},
|
|
141
|
+
"port": {
|
|
142
|
+
"type": "number",
|
|
143
|
+
"default": 3306
|
|
144
|
+
},
|
|
145
|
+
"user": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"default": "root"
|
|
148
|
+
},
|
|
149
|
+
"password": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"default": ""
|
|
152
|
+
},
|
|
153
|
+
"database": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"default": "openclaw_audit"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"buffer": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"additionalProperties": false,
|
|
162
|
+
"properties": {
|
|
163
|
+
"batchSize": {
|
|
164
|
+
"type": "number",
|
|
165
|
+
"default": 50,
|
|
166
|
+
"minimum": 1,
|
|
167
|
+
"maximum": 1000
|
|
168
|
+
},
|
|
169
|
+
"flushIntervalMs": {
|
|
170
|
+
"type": "number",
|
|
171
|
+
"default": 30000,
|
|
172
|
+
"minimum": 1000,
|
|
173
|
+
"maximum": 300000
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"redaction": {
|
|
178
|
+
"type": "object",
|
|
179
|
+
"additionalProperties": false,
|
|
180
|
+
"properties": {
|
|
181
|
+
"enabled": {
|
|
182
|
+
"type": "boolean",
|
|
183
|
+
"default": true
|
|
184
|
+
},
|
|
185
|
+
"patterns": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"items": { "type": "string" },
|
|
188
|
+
"default": ["api_key", "api[-_]?secret", "password", "passwd", "access_token", "auth_token", "refresh_token", "bearer_token", "client_secret", "app_secret", "secret_key", "authorization", "private_key", "credential"]
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"security": {
|
|
193
|
+
"type": "object",
|
|
194
|
+
"additionalProperties": false,
|
|
195
|
+
"properties": {
|
|
196
|
+
"enabled": {
|
|
197
|
+
"type": "boolean",
|
|
198
|
+
"default": true
|
|
199
|
+
},
|
|
200
|
+
"rules": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"additionalProperties": false,
|
|
203
|
+
"properties": {
|
|
204
|
+
"secretLeakage": {
|
|
205
|
+
"type": "boolean",
|
|
206
|
+
"default": true
|
|
207
|
+
},
|
|
208
|
+
"highRiskOps": {
|
|
209
|
+
"type": "boolean",
|
|
210
|
+
"default": true
|
|
211
|
+
},
|
|
212
|
+
"promptInjection": {
|
|
213
|
+
"type": "boolean",
|
|
214
|
+
"default": true
|
|
215
|
+
},
|
|
216
|
+
"chainDetection": {
|
|
217
|
+
"type": "boolean",
|
|
218
|
+
"default": true
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"domainWhitelist": {
|
|
223
|
+
"type": "array",
|
|
224
|
+
"items": { "type": "string" },
|
|
225
|
+
"default": []
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "openclaw-observability",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "OpenClaw audit plugin — records all conversation model actions into DuckDB/MySQL for traceability, with built-in Langfuse-style visualization",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"openclaw": {
|
|
8
|
+
"extensions": [
|
|
9
|
+
"./dist/index.js"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist/",
|
|
14
|
+
"openclaw.plugin.json"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc",
|
|
18
|
+
"dev": "tsc --watch",
|
|
19
|
+
"clean": "rm -rf dist",
|
|
20
|
+
"prepublishOnly": "npm run build"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"openclaw",
|
|
24
|
+
"plugin",
|
|
25
|
+
"observability",
|
|
26
|
+
"audit",
|
|
27
|
+
"duckdb",
|
|
28
|
+
"mysql",
|
|
29
|
+
"trace",
|
|
30
|
+
"langfuse",
|
|
31
|
+
"security"
|
|
32
|
+
],
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@duckdb/node-api": "^1.5.0-r.1",
|
|
36
|
+
"mysql2": "^3.9.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"typescript": "^5.9.3"
|
|
40
|
+
}
|
|
41
|
+
}
|