Skip to content

Commit 9afc01d

Browse files
committed
docs: document legacy SDK sub-path option and consolidate README
1 parent 28e4d55 commit 9afc01d

3 files changed

Lines changed: 41 additions & 141 deletions

File tree

README.md

Lines changed: 21 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -87,75 +87,23 @@ DashClaw v2 is optimized for first-time adoption with only **5 core methods**:
8787
* `recordAssumption(assumption)` — Integrity tracking ("I believe Z while doing X")
8888
* `waitForApproval(id)` — Polling helper for human-in-the-loop
8989

90-
Legacy features (Calendar, Messages, Workflows) have been moved to **Extensions**.
91-
4. **Verifiable Evidence** — Cryptographically signed decision replays are recorded for audit.
92-
93-
---
94-
95-
## What DashClaw Solves
96-
97-
AI agents can execute actions with real-world consequences.
98-
99-
DashClaw sits between agents and external systems, enforcing guard policies before actions execute and recording verifiable decision evidence afterward.
100-
101-
---
102-
103-
## Project Structure
104-
105-
DashClaw is organized into a lean governance runtime with modular extensions.
106-
107-
- **`/app/(core)`****The Governance Runtime UI**. Mission Control, Decisions, Policies, and Approvals.
108-
- **`/app/(extensions)`****Labs & Experimental Infrastructure**. Behavioral drift, learning loops, and task routing.
109-
- **`/app/(archive)`****Legacy Artifacts**. Preserved historical features (Goals, Messages, etc.).
110-
- **`/app/api`****The Stable Runtime API**. Small, idempotent primitives for agent integration.
111-
- **`/sdk`****Lightweight SDKs**. Node and Python clients for the governance lifecycle.
90+
### Legacy SDK (v1)
91+
The original 178-method SDK remains available via the legacy sub-path for users who require experimental platform features:
92+
```javascript
93+
import { DashClaw } from 'dashclaw/legacy';
94+
```
11295

11396
---
11497

11598
## Minimal Runtime API
11699

117100
DashClaw provides a small, stable API surface for governing any agent:
118101

119-
1. **`POST /api/guard`** — "Can I do X?" (Policy check)
120-
2. **`POST /api/actions`** — "I am attempting X." (Action registration)
121-
3. **`PATCH /api/actions/:id`** — "X finished with result Y." (Outcome recording)
122-
4. **`POST /api/assumptions`** — "I believe Z is true while doing X." (Reasoning ledger)
123-
5. **`POST /api/approvals/:id`** — "Operator says Allow/Deny for X." (Human-in-the-loop)
124-
125-
Everything else (UI, Analytics, Extensions) maps back to these five primitives.
126-
127-
---
128-
129-
## SDK v2 (Alpha)
130-
131-
The new **DashClaw SDK v2** focuses on the minimal runtime API for better stability and lower latency.
132-
133-
```javascript
134-
import { DashClaw } from './sdk/dashclaw-v2.js';
135-
136-
const claw = new DashClaw({
137-
baseUrl: 'https://your-dashclaw.com',
138-
apiKey: 'key_...',
139-
agentId: 'my-agent'
140-
});
141-
142-
// 1. Guard
143-
const decision = await claw.guard({
144-
action: 'deploy',
145-
intent: 'deploy latest commit to production'
146-
});
147-
148-
if (decision.decision === 'block') throw new Error('Policy blocked action');
149-
150-
// 2. Act
151-
const { action_id } = await claw.createAction({
152-
action_type: 'deploy',
153-
declared_goal: 'deploy latest commit to production'
154-
});
155-
156-
// 3. Result
157-
await claw.updateOutcome(action_id, { status: 'completed' });
158-
```
102+
1. **`POST /api/guard`** — Policy check.
103+
2. **`POST /api/actions`** — Action registration.
104+
3. **`PATCH /api/actions/:id`** — Outcome recording.
105+
4. **`POST /api/assumptions`** — Reasoning ledger.
106+
5. **`POST /api/approvals/:id`** — Human-in-the-loop.
159107

160108
---
161109

@@ -164,127 +112,63 @@ await claw.updateOutcome(action_id, { status: 'completed' });
164112
- **Mission Control** — High-level control tower for fleet posture and active interventions.
165113
- **Guard Engine** — Zero-latency policy enforcement before agents reach external systems.
166114
- **Decision Replay** — Visual, shareable causal chains of every governed action.
167-
- **Agent Dossiers** — Dedicated governance profiles tracking posture, policies, and history.
168115
- **Risk Signals** — Automated detection of autonomy spikes and failure loops.
169116
- **Compliance Evidence** — Generate audit-ready reports for SOC 2, GDPR, and EU AI Act.
170117

171118
---
172119

173-
## 🚀 1-Minute Path to Governance
120+
## 🚀 8-Minute Path to Governance
174121

175-
Experience the magic of autonomous governance in under 60 seconds.
122+
Experience the magic of autonomous governance in minutes.
176123

177124
```bash
178125
# 1. Clone the repo
179126
git clone https://github.com/ucsandman/DashClaw
180-
cd DashClaw/examples
127+
cd DashClaw
181128

182-
# 2. Install dependencies
129+
# 2. Run the example
130+
cd examples/dashclaw-example-openai-agent
183131
npm install
184-
185-
# 3. Run the first governed action
186-
node first-governed-action.js
132+
node index.js
187133
```
188134

189-
The example sends a governed decision to the DashClaw demo instance.
190-
Open **[Mission Control](https://www.dashclaw.io/mission-control)** to watch the intercepted decision appear in real time.
191-
192-
> **Running your own instance?**
193-
> If you're running DashClaw locally or on Vercel, set `DASHCLAW_BASE_URL` to your deployment URL first.
194-
>
195-
> Examples:
196-
> `DASHCLAW_BASE_URL=http://localhost:3000 node first-governed-action.js`
197-
> `DASHCLAW_BASE_URL=https://your-app.vercel.app node first-governed-action.js`
198-
199135
---
200136

201137
## Works With Your Agent Stack
202138

203-
DashClaw can govern decisions from any agent runtime.
204-
205-
Common integrations include:
206-
207-
• LangChain agents
208-
• CrewAI agents
209-
• OpenAI tool agents
210-
• Anthropic tool agents
211-
• OpenClaw agents
212-
• Custom agent frameworks
213-
214-
---
215-
216-
## Platform Expansion
217-
218-
Once decisions are governed, DashClaw provides operational visibility for agent fleets.
219-
220-
- **Mission Control dashboard** — operational visibility for agent fleets.
221-
- **Decision Replay** — causal chain visualization for every governed action.
222-
- **Agent Fleet Management** — health, permissions, and health overview.
223-
- **Compliance evidence** — generate audit-ready reports.
224-
225-
<img src="screenshots/decision4.png" alt="DashClaw Decisions" width="2500" />
139+
DashClaw can govern decisions from any agent runtime:
140+
• LangChain • CrewAI • OpenAI Tools • Anthropic Tools • Custom Frameworks
226141

227142
---
228143

229144
## How It Works
230145

231-
DashClaw is a single Next.js codebase that serves two roles:
146+
DashClaw is a single Next.js codebase that serves as both a marketing site and a self-hosted governance control plane.
232147

233-
| | **dashclaw.io** (marketing) | **Your deployment** (self-hosted) |
148+
| Feature | **dashclaw.io** (demo) | **Your deployment** (self-host) |
234149
|---|---|---|
235-
| **Landing page** | Marketing site with demo | Same page, "Mission Control" goes to your real dashboard |
236-
| **Mission Control** | Demo with fixture data, no login | Real dashboard with Password or GitHub/Google/OIDC OAuth |
237150
| **Data** | Hardcoded fixtures | Your Postgres database |
238151
| **`DASHCLAW_MODE`** | `demo` | `self_host` (default) |
239152

240153
---
241154

242-
## Product Surfaces
243-
244-
| Route | Description | Tier |
245-
|-------|-------------|------|
246-
| `/mission-control` | Control tower for agent fleet posture | Core |
247-
| `/decisions` | Decisions Ledger: global stream of governed actions | Core |
248-
| `/decisions/[id]` | Decision Replay: visual causal chain of a decision | Core |
249-
| `/policies` | Guardrail and policy management | Core |
250-
| `/agents` | Fleet overview and agent dossiers | Supporting |
251-
| `/activity` | Real-time operational telemetry feed | Supporting |
252-
| `/labs` | Experimental safety research (Swarm, Learning, Prompts) | Experimental |
253-
| `/audit-log` | Immutable record of system/admin changes | Core |
254-
255-
---
256-
257155
## Deploy to Cloud
258156

259157
The fastest path: **Vercel free tier + Neon free tier**.
260158

261159
1. Create a free database at [neon.tech](https://neon.tech)
262160
2. Fork this repo to your GitHub
263161
3. Import at [vercel.com/new](https://vercel.com/new)
264-
4. Generate secrets and set environment variables (see [docs/client-setup-guide.md](docs/client-setup-guide.md)).
265-
5. Deploy. Tables are created automatically on first request.
162+
4. Set environment variables (see [docs/client-setup-guide.md](docs/client-setup-guide.md)).
266163

267164
---
268165

269166
## Security
270167

271168
- API surface fails closed with `503` if `DASHCLAW_API_KEY` is not set.
272-
- Rate limiting enforced on all `/api/*` routes.
273169
- AES-256 encryption for sensitive settings.
274170
- Multi-tenant isolation by default.
275171

276-
See [docs/SECURITY.md](docs/SECURITY.md).
277-
278-
---
279-
280-
## Community
281-
282-
<div align="center">
283-
<a href="https://dashclaw.io">Website</a> &bull;
284-
<a href="https://dashclaw.io/docs">Documentation</a> &bull;
285-
<a href="https://github.com/ucsandman/DashClaw/issues">Issues</a>
286-
</div>
287-
288172
---
289173

290174
## License

docs/client-setup-guide.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,19 @@ decision = claw.guard(action_type='deploy', risk_score=85)
7070

7171
---
7272

73-
## 4. Core Concepts
73+
## 4. Legacy Compatibility (v1)
74+
75+
For developers migrating from DashClaw v1 or those who require experimental platform features (Messaging, Calendar, Workflows), the full original SDK is available via the `legacy` sub-path:
76+
77+
```javascript
78+
import { DashClaw } from 'dashclaw/legacy';
79+
```
80+
81+
*Warning: Legacy methods will return 404 errors if the corresponding API routes have not been restored from the `_archive` directory on the server.*
82+
83+
---
84+
85+
## 5. Core Concepts
7486

7587
### Guard Policies
7688
Defined in the **Policies** page. Policies can **Allow**, **Block**, or **Require Approval** based on risk scores, action types, or frequency.

sdk/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,17 @@ DashClaw uses standard HTTP status codes and custom error classes:
8383

8484
## Legacy SDK (v1)
8585

86-
If you require legacy features (Calendar, Messages, Workflows, etc.), the v1 SDK is still available in the `legacy/` directory:
86+
If you require legacy features (Calendar, Messages, Workflows, etc.), the v1 SDK is available via the `legacy` sub-path:
8787

8888
```javascript
89-
import { DashClaw } from 'dashclaw/legacy/dashclaw-v1.js';
89+
// ESM
90+
import { DashClaw } from 'dashclaw/legacy';
91+
92+
// CommonJS
93+
const { DashClaw } = require('dashclaw/legacy');
9094
```
9195

92-
*Note: Legacy features are now considered "Extensions" and may require additional server configuration.*
96+
*Note: Legacy features are now considered "Extensions" and require these routes to be enabled on your DashClaw server.*
9397

9498
---
9599

0 commit comments

Comments
 (0)