Metadata-Version: 2.4
Name: bristlecone-logic
Version: 0.3.0
Summary: Bristlecone Logic™: Deterministic Guardrails & Micro-Utilities for AI Agents
Author: Bristlecone Logic LLC
License: MIT
Project-URL: Homepage, https://bristleconelogic.com
Project-URL: Documentation, https://api.bristleconelogic.com/docs
Project-URL: Repository, https://github.com/Bristlecone2026/bristlecone-logic
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.7.0
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.2.0; extra == "langchain"
Provides-Extra: crewai
Requires-Dist: crewai>=0.50.0; extra == "crewai"
Provides-Extra: all
Requires-Dist: langchain-core>=0.2.0; extra == "all"
Requires-Dist: crewai>=0.50.0; extra == "all"

mcp-name: io.github.Bristlecone2026/bristlecone-logic

<!-- mcp-name: io.github.Bristlecone2026/bristlecone-logic -->

# Bristlecone Logic LLC — M2M Base USDC Sweeper Bot

## System Overview
Automated, offline-verified, institutional-grade M2M sweeper daemon for Bristlecone Logic LLC running on Base L2 (`chain_id: 8453`). The daemon monitors native Base USDC (`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`), verifies native ETH gas reserves, constructs EIP-1559 contract call payloads, and routes signatures through AWS KMS HSM (`us-west-2`).

## Architecture & File Structure

* **`/opt/bristlecone/bristlecone-logic/.env`**
  Environment variables containing `AWS_KMS_KEY_ID`, `AWS_REGION`, and `SWEEP_DESTINATION_ADDRESS`.

* **`/opt/bristlecone/bristlecone-logic/kms_signer.py`**
  Offline EIP-1559 transaction constructor and AWS KMS signing engine. Handles DER ASN.1 signature parsing, Low-S canonicalization (EIP-2), and SECP256K1 public key recovery byte ($v$) calculation.

* **`/opt/bristlecone/bristlecone-logic/sweeper_daemon.py`**
  Main polling loop. Queries Base RPC endpoints, checks USDC balance (`0x70a08231`), monitors ETH gas reserves, encodes ERC-20 `transfer()` data payloads (`0xa9059cbb`), and executes dry-run or live transaction broadcasts.

* **`/etc/systemd/system/bristlecone-sweeper.service`**
  Linux background service unit managing the daemon process with automatic restart logic (`Restart=always`, `RestartSec=10`) and logging.

## Core Operational Parameters

| Key | Value | Description |
| :--- | :--- | :--- |
| **AWS Region** | `us-west-2` | KMS HSM physical region |
| **Network** | Base Mainnet (`8453`) | Primary Layer 2 execution environment |
| **Target Token** | Base USDC (`0x8335...2913`) | 1:1 USD revenue token |
| **Service Status** | Active (Running) | Managed by systemd |
| **Safety State** | `DRY_RUN_MODE = True` | Constructs & signs offline; no live network broadcasts |

## Post-Travel Production Launch Checklist

1. **Exchange Onboarding**: Complete Coinbase Business setup for Bristlecone Logic LLC and link to Mercury checking account.
2. **Fund Gas Reservoir**: Deposit $3.00–$5.00 of native ETH on Base to operational hot wallet for L2 execution fees.
3. **Configure Treasury Vault**: Update `SWEEP_DESTINATION_ADDRESS` in `.env` with corporate Coinbase Business deposit address.
4. **Arm Live Mode**:
   * Set `DRY_RUN_MODE = False` in `sweeper_daemon.py`
   * Restart service: `systemctl restart bristlecone-sweeper`
   * Check live status: `systemctl status bristlecone-sweeper`
