Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .cursor/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"mcpServers": {
"hive": {
"type": "stdio",
"command": "hive-mcp",
"args": []
}
}
}
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
groups:
dev-dependencies:
patterns:
- "pytest*"
- "ruff"
- "mypy"
- "pre-commit"
- "pip-audit"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 3
- package-ecosystem: cargo
directory: "/hive-cpp"
schedule:
interval: weekly
open-pull-requests-limit: 3
91 changes: 62 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [main]
pull_request:
branches: [main]
schedule:
# Nightly GPU smoke (self-hosted runner when available)
- cron: "0 6 * * *"

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
Expand All @@ -17,15 +20,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.11", "3.12"]
python: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install
run: |
python -m pip install --upgrade pip
# Install hive only — sibling packages (busyBee-cpu, honey-comb) are
# NOT present in the checkout. Tests gracefully skip when absent.
pip install -e .[dev,monitor,observability]
pip install -e .[dev,monitor,observability,server,mcp,http]
- name: Test
env:
HIVE_NO_NVML: "1"
Expand All @@ -38,6 +42,10 @@ jobs:
--transcript-turns 50 --brain-writes 500 \
--honey-comb-mode auto --inference-backend echo \
--quiet
- name: Long-context compression (smoke)
env:
HIVE_NO_NVML: "1"
run: python scripts/hive_long_context_eval.py --smoke
- name: Lint
run: |
python -m ruff check hive/ tests/
Expand All @@ -55,6 +63,44 @@ jobs:
pip install bandit
python -m bandit -r hive/ -ll -q
python scripts/hive_pentest.py --module hive
- name: Supply chain audit
run: |
pip install --upgrade 'setuptools>=83'
pip-audit --skip-editable

# MCP server import smoke
mcp-smoke:
name: MCP / server smoke
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install agents extra
run: pip install -e ".[dev,agents]"
- name: MCP integration tests
run: pytest tests/test_mcp_smoke.py tests/test_mcp_integration.py -v

# SBOM generation on main
sbom:
name: SBOM
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install
run: pip install -e .
- name: Generate SBOM
run: python scripts/generate_sbom.py --output sbom.json
- name: Upload SBOM
uses: actions/upload-artifact@v4
with:
name: sbom
path: sbom.json

# Full-stack pentest: hive + busybee-cpu + honey-comb
pentest:
Expand All @@ -77,38 +123,32 @@ jobs:
python scripts/hive_pentest.py --fail-on-skip

# x86_64 + CUDA. Requires self-hosted runner with GPU label.
# Disabled until self-hosted runner is registered.
gpu:
name: x86_64 / Python 3.12 / CUDA
if: false # Re-enable when self-hosted GPU runner is available
name: x86_64 / Python 3.12 / CUDA (nightly smoke)
if: github.event_name == 'schedule' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
runs-on: [self-hosted, gpu, cuda]
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install
run: |
python -m pip install --upgrade pip
pip install -e .[dev,monitor,observability]
- name: Test
run: pytest -v
run: pytest -v -k "not integration"
- name: Benchmark
run: |
python scripts/hive_benchmark.py \
--transcript-turns 200 --brain-writes 5000 \
--transcript-turns 50 --brain-writes 500 \
--honey-comb-mode auto --inference-backend echo \
--runs 3 --output bench-gpu.json --quiet
- name: Upload
if: always()
uses: actions/upload-artifact@v4
with:
name: bench-gpu
path: bench-gpu.json
--quiet

# aarch64 + CUDA. Jetson / Grace.
# Disabled until self-hosted runner is registered.
jetson:
name: aarch64 / Python 3.12 / Jetson
if: false # Re-enable when self-hosted Jetson runner is available
name: aarch64 / Python 3.12 / Jetson (nightly smoke)
if: github.event_name == 'schedule'
runs-on: [self-hosted, jetson]
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install
Expand All @@ -118,22 +158,15 @@ jobs:
- name: Test
env:
HIVE_NO_NVML: "0"
run: pytest -v
run: pytest -v -k "not integration"
- name: Benchmark
run: |
python scripts/hive_benchmark.py \
--transcript-turns 100 --brain-writes 1000 \
--transcript-turns 50 --brain-writes 500 \
--honey-comb-mode fast --inference-backend echo \
--output bench-jetson.json --quiet
- name: Upload
if: always()
uses: actions/upload-artifact@v4
with:
name: bench-jetson
path: bench-jetson.json
--quiet

# Build Rust wheels for major platforms.
# Only runs on tags or manual dispatch to avoid burning minutes on every PR.
rust-wheels:
name: Build hive-cpp wheels
runs-on: ${{ matrix.os }}
Expand Down
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.4
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies: []
args: [--ignore-missing-imports]
files: ^hive/
27 changes: 25 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@ All notable changes to Hive are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- `uv.lock`, `.pre-commit-config.yaml`, and Dependabot for reproducible dev tooling.
- Optional extras: `server`, `mcp`, `agents`, `http` (FastAPI, MCP, httpx).
- `hive/backend.py` with `HIVE_BACKEND=python|native|auto` wiring in `HiveStack`.
- LinUCB contextual bandit policy in `hive/policy_updater.py`.
- Async LLM client via `httpx` (`_OpenAICompatBackend.achat`).
- Long-context compression eval: `scripts/hive_long_context_eval.py`.
- HLC preservation tests for snapshot restore and gossip replay.

### Changed
- CI: Python 3.13 matrix, pip-audit, SBOM job, MCP smoke, long-context smoke, nightly GPU/Jetson.
- `restore_from_file` and gossip `receive` preserve HLC timestamps.
- Docker aarch64 base image bumped to L4T r36.4.0; numpy 2.x allowed.
- Enterprise roadmap and improvement plan refreshed to reflect shipped features.

### Fixed
- `rust_brain`: snapshot restore now restores `hlc` fields and updates high-water mark.
- `gossip.receive`: replays remote `hlc`/`ts_ns` instead of generating new timestamps.

### Docs
- README: August 2026 "What's new" section with outcome table (HLC fix, MCP, long-context eval, `HIVE_BACKEND`, LinUCB).
- New `docs/WHATS_NEW.md` with tier summary and Twitter-ready copy.

## [0.6.1] - 2026-06-29

### Security
Expand All @@ -29,8 +54,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
tamper → checksum `ValueError`, restore atomicity (existing data survives a
failed restore), and truncated-file framing failure.

## [Unreleased]

## [0.6.0] - 2026-06-11

### Added
Expand Down
Loading
Loading