mission-lifecycle state machine with immutable audit trails
Manages complete service delivery workflows through a deterministic state machine (pending → accepted → executing → completed/failed) with every state transition persisted as immutable JSON records in ~/.cashclaw/missions/. Each mission is stored as a UUID-keyed JSON file capturing client request, work execution, and completion metadata. The Mission Runner (src/core/mission-runner.js) implements CRUD operations and enforces state validity, preventing invalid transitions and enabling forensic reconstruction of all work performed.
Unique: Implements a file-based mission state machine with zero external dependencies — every state transition is persisted as an immutable JSON record in ~/.cashclaw/missions/, enabling complete forensic reconstruction without requiring a database. The Mission Runner enforces state validity at the application layer, preventing invalid transitions and corruption.
vs alternatives: Simpler than database-backed mission systems (no schema migrations, no external service dependencies) but trades scalability for zero-infrastructure persistence suitable for solo agents.
autonomous job polling and auto-accept daemon
Runs a background polling loop that continuously queries the HYRVEai marketplace API (50+ endpoints) for new job postings matching the agent's configured skills, automatically accepts matching jobs based on configurable criteria, and transitions them into the mission lifecycle. The daemon implements exponential backoff for API failures, maintains polling state, and integrates with the HYRVEai Bridge (src/integrations/hyrve-bridge.js) for agent registration and job discovery. Auto-accept mode bypasses manual approval, enabling fully autonomous work acceptance.
Unique: Implements a stateful polling daemon that integrates directly with HYRVEai's 50+ API endpoints, automatically accepting jobs based on configurable skill matching and pricing rules. The daemon maintains polling state and implements exponential backoff for resilience, enabling fully autonomous work discovery without human approval loops.
vs alternatives: More autonomous than webhook-based systems (no external infrastructure required) but less real-time than event-driven architectures; trades latency for simplicity and zero external dependencies.
immutable mission audit trail with json persistence and forensic reconstruction
Maintains an immutable audit trail for every mission by recording all state transitions, skill executions, and payment events as JSON entries appended to mission records. Each mission file (UUID-keyed in ~/.cashclaw/missions/) contains a complete history of events with timestamps, actor information, and state snapshots. The audit trail enables forensic reconstruction of what happened during a mission, when it happened, and why it failed (if applicable). Entries are append-only; historical records cannot be modified or deleted, ensuring compliance with audit requirements.
Unique: Implements an append-only audit trail by storing all mission events as JSON entries in mission files. The immutable design ensures historical records cannot be modified, enabling forensic reconstruction and compliance with audit requirements without external logging services.
vs alternatives: Simpler than external audit logging services (no API integration required) but less secure; trades tamper-proofing for simplicity and zero external dependencies.
initial setup wizard with interactive configuration prompts
Provides an interactive CLI wizard (src/cli/commands/init.js) that guides users through agent configuration on first run. The wizard prompts for agent identity (name, description), marketplace credentials (HYRVEai API key), payment settings (Stripe API key, pricing), and skill selection. Validates inputs in real-time, provides helpful error messages, and generates the initial config.json file. The wizard is idempotent; running it again updates configuration without losing existing mission data.
Unique: Implements an interactive setup wizard that guides users through configuration with real-time validation and helpful error messages. The wizard is idempotent, enabling configuration updates without losing mission history.
vs alternatives: More user-friendly than manual JSON editing (guided prompts reduce errors) but less flexible; trades customization for ease of use.
mission status querying and filtering with cli and rest api
Provides multiple interfaces for querying mission status: CLI commands (cashclaw mission list, cashclaw mission view) and REST API endpoints (/api/missions, /api/missions/:id). Supports filtering by status (pending, accepted, executing, completed, failed), time range, skill type, and earnings. Results can be displayed as formatted tables (CLI) or JSON (API). The status query layer reads from the mission audit trail and aggregates state information without requiring a separate database.
Unique: Provides dual interfaces (CLI and REST API) for querying mission status with client-side filtering and aggregation. The query layer reads directly from mission audit trails, enabling real-time status visibility without a separate database.
vs alternatives: Simpler than database-backed query systems (no schema required) but less scalable; trades performance for zero-infrastructure status querying.
time-windowed earnings aggregation and financial tracking
Calculates earnings across configurable time windows (hourly, daily, weekly, monthly) by aggregating completed missions and their associated Stripe payments. The Earnings Tracker (src/core/earnings-tracker.js) implements time-windowed financial aggregations that query the mission audit trail and payment records, computing metrics like total revenue, mission count, average job value, and hourly rates. Results are cached and updated incrementally as new missions complete, enabling real-time earnings dashboards without full recalculation.
Unique: Implements time-windowed financial aggregations directly from the mission audit trail without requiring external analytics services. Earnings Tracker computes metrics incrementally as missions complete, enabling real-time earnings visibility with minimal computational overhead.
vs alternatives: Simpler than third-party analytics platforms (no API integration required) but less feature-rich; trades advanced reporting for zero-dependency financial tracking.
openclaw skill installation and workspace detection
Automatically discovers, installs, and registers OpenClaw-compatible skills into the agent's workspace via the OpenClaw Bridge (src/integrations/openclaw-bridge.js). The bridge detects installed skills by scanning the workspace directory structure, validates skill schemas, and registers them into a runtime skill registry that mission execution can invoke. Supports 12 specialized skills for common freelance tasks (code generation, content writing, image processing, etc.), with extensibility for custom skills via the OpenClaw standard interface.
Unique: Implements automatic skill discovery and registration via filesystem scanning and OpenClaw schema validation. The OpenClaw Bridge detects skills by directory structure, validates against the OpenClaw standard, and registers them into a runtime registry without requiring manual configuration or code changes.
vs alternatives: More modular than monolithic agent architectures (skills are independently installable) but requires adherence to OpenClaw conventions; trades flexibility for standardization.
stripe payment link generation and invoice creation
Generates Stripe payment links and invoices for completed missions via the Stripe Bridge (src/integrations/stripe-connect.js). When a mission completes, the system creates a Stripe invoice with mission details (description, amount, client info), generates a unique payment link, and stores the link in the mission record. Supports customer management (creating or retrieving Stripe customers by email), automatic payment collection, and webhook integration for payment confirmation. All payment state is persisted to mission records, enabling reconciliation between work completed and payments received.
Unique: Integrates Stripe payment link generation directly into the mission completion workflow, automatically creating invoices and payment links without manual intervention. The Stripe Bridge manages customer records and persists payment state to mission records, enabling end-to-end payment automation from work completion to collection.
vs alternatives: More automated than manual invoicing (no human approval required) but less flexible than custom payment systems; trades customization for simplicity and Stripe's payment infrastructure.
+5 more capabilities