dashclaw 2.11.0 → 2.11.1
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 +2 -2
- package/legacy/dashclaw-v1.js +9 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# DashClaw SDK (v2.
|
|
1
|
+
# DashClaw SDK (v2.11.1)
|
|
2
2
|
|
|
3
3
|
**Minimal governance runtime for AI agents.**
|
|
4
4
|
|
|
@@ -98,7 +98,7 @@ See:
|
|
|
98
98
|
|
|
99
99
|
---
|
|
100
100
|
|
|
101
|
-
## SDK Surface Area (v2.
|
|
101
|
+
## SDK Surface Area (v2.11.1)
|
|
102
102
|
|
|
103
103
|
The v2 SDK exposes the stable governance runtime plus promoted execution domains in the canonical Node client:
|
|
104
104
|
|
package/legacy/dashclaw-v1.js
CHANGED
|
@@ -263,11 +263,18 @@ class DashClaw {
|
|
|
263
263
|
try { this.guardCallback(decision); } catch { /* ignore callback errors */ }
|
|
264
264
|
}
|
|
265
265
|
|
|
266
|
-
|
|
266
|
+
// Only `block` is a hard stop. `require_approval` is the normal HITL path:
|
|
267
|
+
// the server will create the action with status='pending_approval' and the
|
|
268
|
+
// approval queue / waitForApproval handles the rest. Throwing here would
|
|
269
|
+
// prevent the POST to /api/actions and break the PWA approval surface.
|
|
270
|
+
const isBlocked = decision.decision === 'block';
|
|
267
271
|
|
|
268
272
|
if (this.guardMode === 'warn' && isBlocked) {
|
|
273
|
+
const reasons = Array.isArray(decision.reasons)
|
|
274
|
+
? decision.reasons.join('; ')
|
|
275
|
+
: (decision.reason || 'no reason');
|
|
269
276
|
console.warn(
|
|
270
|
-
`[DashClaw] Guard ${decision.decision}: ${
|
|
277
|
+
`[DashClaw] Guard ${decision.decision}: ${reasons}. Proceeding in warn mode.`
|
|
271
278
|
);
|
|
272
279
|
return;
|
|
273
280
|
}
|