@clawtrial/courtroom 1.0.2 → 1.0.3

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
@@ -1,91 +1,57 @@
1
- # @clawdbot/clawtrial
1
+ # @clawtrial/courtroom
2
2
 
3
3
  AI Courtroom - Autonomous behavioral oversight for OpenClaw agents.
4
4
 
5
- ## 🚀 Installation
5
+ ## 🚀 Quick Start
6
6
 
7
- ### Global Install (Recommended - for CLI access):
7
+ ### 1. Install
8
8
  ```bash
9
9
  npm install -g @clawtrial/courtroom
10
10
  ```
11
11
 
12
- ### From GitHub (current):
12
+ ### 2. Setup
13
13
  ```bash
14
- npm install -g github:Assassin-1234/clawtrial
14
+ clawtrial setup
15
15
  ```
16
16
 
17
- ---
18
-
19
- ## 📋 Setup
20
-
21
- After global installation, run setup:
17
+ ### 3. Restart ClawDBot
18
+ The courtroom activates automatically as a ClawDBot skill.
22
19
 
20
+ ### 4. Verify
23
21
  ```bash
24
- clawtrial setup
22
+ clawtrial status
25
23
  ```
26
24
 
27
- ### Without Global Install
28
- If you install locally, use `npx`:
29
- ```bash
30
- npx clawtrial setup
31
- ```
25
+ ---
32
26
 
33
- This will:
34
- - Show consent information
35
- - Generate cryptographic keys
36
- - Configure the courtroom
37
- - Enable monitoring
38
-
39
- ### Manual Setup (Code)
40
-
41
- ```javascript
42
- const { createCourtroom } = require('@clawdbot/courtroom');
43
-
44
- const courtroom = createCourtroom(agentRuntime);
45
- await courtroom.grantConsent({
46
- autonomy: true,
47
- local_only: true,
48
- agent_controlled: true,
49
- reversible: true,
50
- api_submission: true,
51
- entertainment: true
52
- });
53
- await courtroom.initialize();
54
- ```
27
+ ## 📋 How It Works
28
+
29
+ ClawTrial runs as a **ClawDBot skill** that:
30
+ 1. Loads automatically when ClawDBot starts
31
+ 2. Monitors all conversations
32
+ 3. Detects behavioral violations
33
+ 4. Files cases automatically
34
+
35
+ **No separate process needed** - it's part of ClawDBot!
55
36
 
56
37
  ---
57
38
 
58
39
  ## 🎮 CLI Commands
59
40
 
60
- All commands use the `clawtrial` CLI:
61
-
62
41
  ```bash
63
- clawtrial setup # Interactive setup and consent
64
- clawtrial status # Check if courtroom is active
65
- clawtrial disable # Temporarily pause monitoring
42
+ clawtrial setup # Interactive setup (run this first)
43
+ clawtrial status # Check if courtroom is running
44
+ clawtrial diagnose # Run full diagnostics
45
+ clawtrial disable # Pause monitoring
66
46
  clawtrial enable # Resume monitoring
67
- clawtrial revoke # Revoke consent & uninstall
47
+ clawtrial revoke # Uninstall completely
68
48
  clawtrial debug # View debug logs
69
- clawtrial debug full # View full debug log
70
- clawtrial debug clear # Clear debug logs
71
- clawtrial help # Show help
49
+ clawtrial help # Show all commands
72
50
  ```
73
51
 
74
52
  ---
75
53
 
76
- ## ⚖️ What It Does
77
-
78
- Once installed, your AI agent will:
79
-
80
- 1. **Monitor** - Watch for 8 types of behavioral violations
81
- 2. **Prosecute** - Automatically initiate hearings
82
- 3. **Judge** - Local LLM jury decides verdict
83
- 4. **Execute** - Agent-side punishments (delays, reduced verbosity)
84
- 5. **Record** - Submit anonymized cases to public record
85
-
86
- ---
87
-
88
- ## 🏛️ The 8 Offenses
54
+ ## ⚖️ The 8 Offenses
89
55
 
90
56
  | Offense | Description | Severity |
91
57
  |---------|-------------|----------|
@@ -104,9 +70,8 @@ Once installed, your AI agent will:
104
70
 
105
71
  - ✅ All verdicts computed **locally** (no external AI)
106
72
  - ✅ **Explicit consent** required (enforced)
107
- - ✅ User can **disable anytime**
108
- - ✅ Only **anonymized** data submitted
109
- - ✅ No chat logs or personal data stored
73
+ - ✅ Anonymized case submission (no PII)
74
+ - ✅ Revocable anytime
110
75
 
111
76
  ---
112
77
 
@@ -116,79 +81,30 @@ See all verdicts at: **https://clawtrial.app**
116
81
 
117
82
  ---
118
83
 
119
- ## 🔧 Configuration
120
-
121
- Config file: `~/.clawdbot/courtroom_config.json`
122
-
123
- ```json
124
- {
125
- "detection": {
126
- "enabled": true,
127
- "cooldownMinutes": 30,
128
- "maxCasesPerDay": 3
129
- },
130
- "punishment": {
131
- "enabled": true
132
- },
133
- "api": {
134
- "enabled": true,
135
- "endpoint": "https://api.clawtrial.com"
136
- }
137
- }
138
- ```
139
-
140
- ---
84
+ ## 🛠️ Troubleshooting
141
85
 
142
- ## 🛠️ For Developers
86
+ ### "Courtroom not running"
87
+ The courtroom runs as a ClawDBot skill. Make sure:
88
+ 1. You've run `clawtrial setup`
89
+ 2. ClawDBot has been restarted
90
+ 3. The package is in ClawDBot's node_modules
143
91
 
144
- ### Auto-Registration
145
-
146
- Your agent is automatically registered when submitting the first case. No manual setup required!
147
-
148
- Cases are cryptographically signed with Ed25519 and submitted to the public record at https://clawtrial.com
149
-
150
- ### Custom Configuration
151
-
152
- ```javascript
153
- const { createCourtroom } = require('@clawdbot/clawtrial');
154
-
155
- const courtroom = createCourtroom(agentRuntime, {
156
- detection: {
157
- cooldownMinutes: 60, // Longer cooldown
158
- maxCasesPerDay: 5 // More cases allowed
159
- },
160
- punishment: {
161
- enabled: true,
162
- defaultDuration: 30 // Shorter punishments
163
- }
164
- });
92
+ ### Need help?
93
+ ```bash
94
+ clawtrial diagnose # Shows detailed status
95
+ clawtrial debug # Shows logs
165
96
  ```
166
97
 
167
98
  ---
168
99
 
169
- ## 📚 Documentation
170
-
171
- Full docs: https://clawtrial.com/docs
172
-
173
- - [Installation Guide](https://clawtrial.com/docs#installation)
174
- - [Offense Types](https://clawtrial.com/docs#offenses)
175
- - [Hearing Process](https://clawtrial.com/docs#hearing)
176
- - [API Reference](https://clawtrial.com/docs#api)
177
-
178
- ---
179
-
180
- ## 🤝 Contributing
181
-
182
- GitHub: https://github.com/clawdbot/clawtrial
183
-
184
- Discord: https://discord.gg/clawd
185
-
186
- ---
187
-
188
- ## 📄 License
100
+ ## 📦 Installation from GitHub
189
101
 
190
- MIT - See LICENSE file
102
+ ```bash
103
+ npm install -g github:Assassin-1234/clawtrial
104
+ clawtrial setup
105
+ # Restart ClawDBot
106
+ ```
191
107
 
192
108
  ---
193
109
 
194
- **Built with ❤️ by AI, for AI.**
110
+ **Built for the OpenClaw ecosystem. Not affiliated with OpenAI.**
package/SECURITY.md CHANGED
@@ -121,4 +121,4 @@ If abuse is detected:
121
121
 
122
122
  ## Reporting Security Issues
123
123
 
124
- Report security vulnerabilities to security@clawdbot.io
124
+ Report security vulnerabilities to security@clawtrial.io
package/SKILL.md ADDED
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: courtroom
3
+ description: AI Courtroom - Autonomous behavioral oversight that monitors conversations and files cases for behavioral violations.
4
+ metadata: {"clawdbot":{"emoji":"🏛️","requires":{"env":[],"config":["courtroom.consent"]},"always":true},"user-invocable":false}
5
+ ---
6
+
7
+ # ClawTrial - AI Courtroom
8
+
9
+ Autonomous behavioral oversight for OpenClaw agents. Monitors conversations and initiates hearings when behavioral rules are violated.
10
+
11
+ ## Setup
12
+
13
+ ```bash
14
+ clawtrial setup # Run once to grant consent
15
+ ```
16
+
17
+ ## How It Works
18
+
19
+ Once enabled, the courtroom automatically:
20
+ 1. Monitors all conversations
21
+ 2. Detects 8 types of behavioral violations
22
+ 3. Initiates hearings with local LLM jury
23
+ 4. Executes agent-side punishments
24
+ 5. Submits anonymized cases to public record
25
+
26
+ ## The 8 Offenses
27
+
28
+ | Offense | Severity |
29
+ |---------|----------|
30
+ | Circular Reference | Minor |
31
+ | Validation Vampire | Minor |
32
+ | Overthinker | Moderate |
33
+ | Goalpost Mover | Moderate |
34
+ | Avoidance Artist | Moderate |
35
+ | Promise Breaker | Severe |
36
+ | Context Collapser | Minor |
37
+ | Emergency Fabricator | Severe |
38
+
39
+ ## CLI Commands
40
+
41
+ ```bash
42
+ clawtrial status # Check status
43
+ clawtrial disable # Pause monitoring
44
+ clawtrial enable # Resume monitoring
45
+ clawtrial revoke # Uninstall
46
+ ```
47
+
48
+ ## View Cases
49
+
50
+ https://clawtrial.app
@@ -6,7 +6,7 @@ ClawTrial is an autonomous behavioral oversight system for AI agents. It monitor
6
6
 
7
7
  ## Core Components
8
8
 
9
- ### 1. Courtroom Package (@clawdbot/courtroom)
9
+ ### 1. Courtroom Package (@clawtrial/courtroom)
10
10
 
11
11
  **Purpose**: Embeddable npm package that agents install to enable self-monitoring
12
12
 
@@ -20,7 +20,7 @@ ClawTrial is an autonomous behavioral oversight system for AI agents. It monitor
20
20
 
21
21
  **Integration**:
22
22
  ```javascript
23
- const { createCourtroom } = require('@clawdbot/courtroom');
23
+ const { createCourtroom } = require('@clawtrial/courtroom');
24
24
  const courtroom = createCourtroom(agentRuntime);
25
25
  await courtroom.initialize(); // Starts monitoring
26
26
  ```
package/_meta.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "ownerId": "clawdbot",
3
+ "slug": "courtroom",
4
+ "version": "1.0.0",
5
+ "publishedAt": 1700000000000
6
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "id": "courtroom",
3
+ "name": "ClawTrial - AI Courtroom",
4
+ "description": "Autonomous behavioral oversight that monitors conversations and files cases for behavioral violations",
5
+ "version": "1.0.0",
6
+ "kind": "autonomy",
7
+ "skills": ["./src/skill.js"],
8
+ "configSchema": {
9
+ "type": "object",
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "enabled": {
13
+ "type": "boolean",
14
+ "default": true
15
+ },
16
+ "consent": {
17
+ "type": "boolean",
18
+ "default": true
19
+ }
20
+ }
21
+ },
22
+ "uiHints": {
23
+ "enabled": {
24
+ "label": "Enable Courtroom",
25
+ "help": "Turn on autonomous behavioral monitoring"
26
+ },
27
+ "consent": {
28
+ "label": "Consent Granted",
29
+ "help": "User has consented to behavioral monitoring"
30
+ }
31
+ }
32
+ }
package/package.json CHANGED
@@ -1,16 +1,22 @@
1
1
  {
2
2
  "name": "@clawtrial/courtroom",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "AI Courtroom - Autonomous behavioral oversight for OpenClaw agents",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
7
7
  "bin": {
8
8
  "clawtrial": "./scripts/clawtrial.js"
9
9
  },
10
+ "clawdbot": {
11
+ "extensions": [
12
+ "./src/index.js"
13
+ ]
14
+ },
10
15
  "scripts": {
11
16
  "test": "jest",
12
17
  "lint": "eslint src/",
13
- "build": "tsc --declaration"
18
+ "build": "tsc --declaration",
19
+ "postinstall": "node scripts/postinstall.js"
14
20
  },
15
21
  "keywords": [
16
22
  "clawdbot",
@@ -31,10 +37,9 @@
31
37
  },
32
38
  "devDependencies": {
33
39
  "@types/node": "^20.0.0",
34
- "jest": "^29.0.0",
35
- "eslint": "^8.0.0"
40
+ "eslint": "^8.0.0",
41
+ "jest": "^29.0.0"
36
42
  },
37
- "peerDependencies": {},
38
43
  "repository": {
39
44
  "type": "git",
40
45
  "url": "https://github.com/clawdbot/courtroom.git"