DashClaw

repository·main·Indexed 43 days ago

https://github.com/ucsandman/dashclaw

An enforcement and governance layer for AI agents that intercepts destructive or expensive tool calls to require human approval. It provides remote approvals, policy checks, and execution evidence for unattended agent workflows, including a CLI for managing instances, handling approval requests, and integrating with Claude Code, Codex, and OpenClaw agents.

Tokens
649.1K
Snippets
1.4K
Records
2.6K
Agent score
49%

What's inside DashClaw

  1. What is DashClaw?

    main

    DashClaw is an approval, audit, and policy layer designed to sit in front of coding agents (such as Claude Code, Cursor, Aider, or Cody). Its primary purpose is to prevent coding agents from performing destructive actions without explicit developer approval and to provide a clear audit trail of all agent activities.

    Core Value Proposition:

    • Safety: Prevents unexpected or destructive actions by an AI agent.
    • Auditability: Provides a human-readable timeline of commands, file edits, approvals, and denials.
  2. What is DashClaw?

    main

    DashClaw is an AI agent decision infrastructure platform that acts as a governance and control plane for AI agent fleets. It governs the lifecycle of agent decisions before they reach real-world systems by evaluating intent against organizational policies.

    The platform follows a four-stage decision lifecycle:

    1. Agent Intent: The agent declares its goal.
    2. Policy Evaluation: DashClaw evaluates the intent against policies.
    3. Decision Outcome: The action is allowed, blocked, or requires human approval.
    4. Decision Evidence: Verifiable proof of the governance process is recorded.

    Core capabilities include human-in-the-loop Approvals, Decision Replay (visualizing causal chains), Agent Governance Profiles, Behavior Guard (policy enforcement), Risk Signals (detecting autonomy spikes or failure loops), and Compliance Mapping (SOC 2, GDPR, etc.).

  3. Overview of Active Integrations Implementation Plan

    main

    The Active Integrations Implementation Plan outlines a multi-phase roadmap to improve the reliability and observability of third-party integrations within DashClaw. The plan is divided into two primary functional areas:

    1. Integration Health

    Focuses on ensuring credentials and connections are valid through:

    • A Health Check Library containing per-provider credential validators.
    • A Cron Route and database table for periodic health monitoring.
    • A Health Status API Endpoint to serve status data to the frontend.
    • An Integrations Page UI that displays live health badges.
    • A new Signal Type specifically for detecting agent/credential mismatches.

    2. Notifications

    Focuses on alerting users when issues arise through:

    • Native Notification Adapters for Slack, Discord, Linear, GitHub, and Email.
    • Integration of these adapters into the existing signal cron pipeline.
    • Settings keys and UI toggles to allow users to enable/disable native alerts.
  4. Overview of the Funnel Truth Implementation Plan

    main

    The Funnel Truth implementation (v4.6) provides a hosted-trial activation funnel that tracks milestones: mint → first key used → first governed action → retained week 1.

    This system is designed to survive trial deletion by using a hosted_trial_snapshots table. This table captures funnel milestones inside the deleteHostedWorkspace process before foreign key child sweeps destroy the original evidence, ensuring a 'fail-closed' mechanism for data retention.

    Key Components:

    • API Endpoint: GET /api/hosted/funnel
    • UI Integration: Rendered as a card on the /setup route when in hosted mode.
    • Data Strategy: Merges live organization facts (computed using synthetic-exclusion patterns) with frozen snapshots from the hosted_trial_snapshots table.
    • Logic: Uses a pure computeFunnelAggregates function to transform facts into the response shape, allowing for unit testing without a database connection.
  5. DashClaw core capabilities and features

    main

    DashClaw provides several key features for managing unattended AI agents:

    • Fail-closed intercept: Cancels blocked calls at supported execution seams.
    • Remote approval: Resolve pending actions via /approvals inbox, CLI, phone PWA, Telegram, or Discord.
    • Plain English approvals: Provides a one-sentence summary of the command, flags irreversible actions, and warns about credential exposure.
    • Standing grants: Create scoped, time-bounded permissions ("Allow, don't ask again") to reduce interruptions.
    • Verifiable evidence: Generates decision records and Ed25519 receipts for auditable trails.
    • Calibrated interruptions: Uses your approval/denial patterns to tune the frequency of interruptions.
    • Prompt-injection scanning: Automatically blocks or warns on high-confidence system-override patterns.
    • Multi-runtime support: Works with Claude Code, Codex, Hermes, OpenClaw, MCP, Node/Python SDKs, and REST.
  6. Hosted Workspace Provisioning Implementation Plan Overview

    main

    The Hosted Workspace Provisioning plan implements a gated endpoint for creating trial organizations and API keys. This feature is part of the 'click to try hosted DashClaw' initiative.

    Key Architectural Components:

    • Provisioning Endpoint: /api/hosted/workspaces (only active when DASHCLAW_HOSTED=true).
    • Atomicity: The endpoint creates both a trial organization and an API key in a single operation.
    • Security: Protected by Cloudflare Turnstile verification and in-memory per-IP rate limiting.
    • Enforcement: Middleware checks for trial expiry and action caps during API-key resolution.
    • Isolation: Self-hosted deployments remain unaffected as the DASHCLAW_HOSTED flag defaults to false.

    Technical Constraints:

    • No LLM Keys: The provisioning flow only mints a DashClaw workspace API key; no external LLM credentials are handled here.
    • SQL Guardrails: Do not use inline SQL in route files. All database operations must use repositories located in app/lib/repositories/.
    • Schema Source: Always use schema/schema.js for the real schema; graphify-pilot/ is a read-only snapshot.
  7. Technical Stack for x402 Implementation

    main

    The x402 foundation is implemented using the following stack:

    • Framework: Next.js 16 App Router (JavaScript).
    • Database: Neon/Postgres using tagged-template sql queries.
    • Migrations: Raw-SQL Drizzle migrations (Note: do not use pgTable in schema/schema.js for these tables).
    • Testing: Vitest using plain vi.fn() for mocking sql.
    • SDKs:
      • Node SDK (sdk/dashclaw.js) using camelCase.
      • Python SDK (sdk-python/dashclaw/client.py) using snake_case.
  8. Pricing landscape for AI Agent Governance and Observability platforms

    main

    The AI observability and governance market typically follows a pricing architecture consisting of a free tier, usage-based metering, and enterprise custom pricing.

    Key Market Characteristics:

    • Dominant Metering Metrics: Most platforms meter based on traces, events, logs, or logged requests rather than tokens or seats.
    • Free Tier Strategy: Platforms offer generous free tiers (ranging from 5K to 50K units/month) to drive developer adoption, often with limited data retention (7–30 days).
    • Enterprise Requirements: Enterprise-grade features are consistently gated behind custom pricing and include SSO/SAML, RBAC, on-prem/VPC deployment, SOC-2/HIPAA compliance, and custom data retention/SLAs.
    • Open-Source Trends: Many providers (e.g., Langfuse, Portkey, Guardrails AI) use an open-source core with a managed cloud service as their primary go-to-market strategy.
  9. Identify the target users for DashClaw

    main

    DashClaw is built for two primary personas operating in professional, high-consequence environments:

    1. AI-agent developers and platform engineers: Those running autonomous coding agents against real repositories and infrastructure. Their goal is to allow agents to act in production without causing irreversible damage.
    2. Governance, compliance, and security stakeholders: Those who audit agent behavior, approve risky actions, and require verifiable evidence of what agents did and why actions were permitted.
  10. Review the complete Platform Guide

    main

    The /guides/platform page provides a comprehensive, evidence-based inventory of the entire DashClaw ecosystem. It is not a curated summary but a 1:1 mapping of the codebase to documentation.

    The guide includes coverage for:

    • API Routes: Every route and method (including archived _archive routes).
    • Node SDK: All 355 methods (including legacy surfaces).
    • Python SDK: All 234 methods.
    • CLI: All 36 commands.
    • MCP: 151 tools and 6 resources.
    • Other surfaces: Hooks, authentication, and environment variables.

    Each entry is marked with a status derived from code evidence (e.g., beta, deprecated, or live-verified).

  11. Overview of Pulse monitoring

    main

    Pulse is an always-on-top browser window designed for monitoring system status at a glance. It uses a visual vocabulary of three marks:

    • Dim dash and zero chroma: Nothing is currently owed/active.
    • Brand orange count: Pending approvals.
    • Red signal: High-priority alerts (though approval counts are designed to outrank these signals to ensure the user sees the approval moment).

    Pulse includes 'honesty machinery' to ensure status accuracy:

    • Positive heartbeat evidence: Required for a 'calm' state.
    • DEGRADED status: Rendered if a sub-query fails (rather than showing a zero).
    • 90s Silence Rule: No present-tense claim survives 90 seconds of silence without a heartbeat.
  12. Overview of the DashClaw Living Organism Framework

    main

    The Living Organism is a zero-dependency Python framework designed to sense, protect, and evolve a codebase. It functions as a self-contained module within the livingcode/ package that implements a continuous lifecycle of sensing, planning, reviewing, and reflecting.

    Core Components

    • Sensing Collectors: Five collectors that measure codebase health across git stats, test health, code quality, dependency health, and CI health.
    • Immune System: Reviews incoming changes against established baselines to prevent regression.
    • Tiered Planner: Surfaces and prioritizes work items based on collected metrics.
    • Orchestrator: Manages the full lifecycle (sense → plan → review → reflect) with integrated safety systems.
    • Heartbeat Scheduler: Runs rapid checks on every commit and full lifecycle cycles on a regular schedule.

    Technical Constraints

    • Runtime: Python 3.12+
    • Dependencies: Strictly uses the Python standard library (dataclasses, subprocess, json, pathlib, datetime, argparse, unittest). No external packages are permitted.