hobees 0.1.0a1__tar.gz
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.
- hobees-0.1.0a1/.dockerignore +15 -0
- hobees-0.1.0a1/.github/workflows/ci.yml +27 -0
- hobees-0.1.0a1/.github/workflows/release.yml +67 -0
- hobees-0.1.0a1/.gitignore +17 -0
- hobees-0.1.0a1/AGENT.md +102 -0
- hobees-0.1.0a1/CHANGELOG.md +6 -0
- hobees-0.1.0a1/CODE_DESIGN.md +776 -0
- hobees-0.1.0a1/CONTRIBUTING.md +54 -0
- hobees-0.1.0a1/Dockerfile +31 -0
- hobees-0.1.0a1/LICENSE +202 -0
- hobees-0.1.0a1/PKG-INFO +651 -0
- hobees-0.1.0a1/README.md +610 -0
- hobees-0.1.0a1/compose.yaml +42 -0
- hobees-0.1.0a1/config-template.json +176 -0
- hobees-0.1.0a1/config-template.yaml +197 -0
- hobees-0.1.0a1/pyproject.toml +61 -0
- hobees-0.1.0a1/src/hobees/__init__.py +0 -0
- hobees-0.1.0a1/src/hobees/api/__init__.py +5 -0
- hobees-0.1.0a1/src/hobees/api/app.py +408 -0
- hobees-0.1.0a1/src/hobees/cli/__init__.py +0 -0
- hobees-0.1.0a1/src/hobees/cli/bee_cmd.py +281 -0
- hobees-0.1.0a1/src/hobees/cli/commands.py +64 -0
- hobees-0.1.0a1/src/hobees/cli/completion.py +178 -0
- hobees-0.1.0a1/src/hobees/cli/hive_cmd.py +710 -0
- hobees-0.1.0a1/src/hobees/cli/icons.py +101 -0
- hobees-0.1.0a1/src/hobees/cli/import_cmd.py +554 -0
- hobees-0.1.0a1/src/hobees/cli/main.py +631 -0
- hobees-0.1.0a1/src/hobees/cli/memory_cmd.py +129 -0
- hobees-0.1.0a1/src/hobees/cli/provider_cmd.py +591 -0
- hobees-0.1.0a1/src/hobees/cli/shell.py +2148 -0
- hobees-0.1.0a1/src/hobees/cli/skill_cmd.py +274 -0
- hobees-0.1.0a1/src/hobees/cli/tui.py +1888 -0
- hobees-0.1.0a1/src/hobees/config.py +60 -0
- hobees-0.1.0a1/src/hobees/core/__init__.py +0 -0
- hobees-0.1.0a1/src/hobees/core/context_manager.py +203 -0
- hobees-0.1.0a1/src/hobees/core/hive_builder.py +551 -0
- hobees-0.1.0a1/src/hobees/core/llm_factory.py +202 -0
- hobees-0.1.0a1/src/hobees/core/memory_manager.py +302 -0
- hobees-0.1.0a1/src/hobees/core/model_discovery.py +164 -0
- hobees-0.1.0a1/src/hobees/core/queen.py +236 -0
- hobees-0.1.0a1/src/hobees/core/reasoning_patch.py +96 -0
- hobees-0.1.0a1/src/hobees/core/skill_harvester.py +308 -0
- hobees-0.1.0a1/src/hobees/core/streaming.py +315 -0
- hobees-0.1.0a1/src/hobees/core/telemetry.py +225 -0
- hobees-0.1.0a1/src/hobees/core/tool_registry.py +272 -0
- hobees-0.1.0a1/src/hobees/core/tracing.py +426 -0
- hobees-0.1.0a1/src/hobees/db/__init__.py +0 -0
- hobees-0.1.0a1/src/hobees/db/analytics.py +230 -0
- hobees-0.1.0a1/src/hobees/db/backends.py +34 -0
- hobees-0.1.0a1/src/hobees/db/models.py +289 -0
- hobees-0.1.0a1/src/hobees/db/session.py +86 -0
- hobees-0.1.0a1/tests/conftest.py +21 -0
- hobees-0.1.0a1/tests/test_api.py +223 -0
- hobees-0.1.0a1/tests/test_cli_startup.py +60 -0
- hobees-0.1.0a1/tests/test_completion.py +111 -0
- hobees-0.1.0a1/tests/test_context_manager.py +101 -0
- hobees-0.1.0a1/tests/test_database_backends.py +206 -0
- hobees-0.1.0a1/tests/test_hive_builder.py +236 -0
- hobees-0.1.0a1/tests/test_hive_remove.py +111 -0
- hobees-0.1.0a1/tests/test_hive_run.py +134 -0
- hobees-0.1.0a1/tests/test_import_cmd.py +78 -0
- hobees-0.1.0a1/tests/test_memory_manager.py +140 -0
- hobees-0.1.0a1/tests/test_model_discovery.py +32 -0
- hobees-0.1.0a1/tests/test_run_lifecycle.py +114 -0
- hobees-0.1.0a1/tests/test_skill_harvester.py +335 -0
- hobees-0.1.0a1/tests/test_tool_registry.py +62 -0
- hobees-0.1.0a1/tests/test_tracing.py +217 -0
- hobees-0.1.0a1/tests/test_tui.py +216 -0
- hobees-0.1.0a1/uv.lock +2700 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
test:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
python-version: ["3.11", "3.12"]
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
- uses: astral-sh/setup-uv@v6
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
- run: uv sync --locked --group dev
|
|
24
|
+
- name: Test
|
|
25
|
+
env:
|
|
26
|
+
HOBEES_DATABASE_URL: sqlite:////tmp/hobees_test.db
|
|
27
|
+
run: uv run --locked pytest
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- release
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- uses: astral-sh/setup-uv@v6
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
|
|
21
|
+
- name: Check branch and version
|
|
22
|
+
run: |
|
|
23
|
+
python - <<'PY'
|
|
24
|
+
import os
|
|
25
|
+
import tomllib
|
|
26
|
+
|
|
27
|
+
with open("pyproject.toml", "rb") as project_file:
|
|
28
|
+
version = tomllib.load(project_file)["project"]["version"]
|
|
29
|
+
|
|
30
|
+
ref_name = os.environ["GITHUB_REF_NAME"]
|
|
31
|
+
if ref_name != "release":
|
|
32
|
+
raise SystemExit(f"Expected branch 'release', got {ref_name}")
|
|
33
|
+
|
|
34
|
+
if not version:
|
|
35
|
+
raise SystemExit("Missing project.version in pyproject.toml")
|
|
36
|
+
PY
|
|
37
|
+
|
|
38
|
+
- run: uv sync --locked --group dev
|
|
39
|
+
- name: Test
|
|
40
|
+
env:
|
|
41
|
+
HOBEES_DATABASE_URL: sqlite:////tmp/hobees_test.db
|
|
42
|
+
run: uv run --locked pytest
|
|
43
|
+
|
|
44
|
+
- name: Build package
|
|
45
|
+
run: uv build
|
|
46
|
+
|
|
47
|
+
- uses: actions/upload-artifact@v7
|
|
48
|
+
with:
|
|
49
|
+
name: python-package-distributions
|
|
50
|
+
path: dist/
|
|
51
|
+
if-no-files-found: error
|
|
52
|
+
|
|
53
|
+
publish:
|
|
54
|
+
needs: build
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
environment:
|
|
57
|
+
name: pypi
|
|
58
|
+
url: https://pypi.org/p/hobees
|
|
59
|
+
permissions:
|
|
60
|
+
id-token: write
|
|
61
|
+
steps:
|
|
62
|
+
- uses: actions/download-artifact@v8
|
|
63
|
+
with:
|
|
64
|
+
name: python-package-distributions
|
|
65
|
+
path: dist/
|
|
66
|
+
|
|
67
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
hobees-0.1.0a1/AGENT.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Agent Guide
|
|
2
|
+
|
|
3
|
+
This guide helps AI coding agents understand and work with the hobees repository.
|
|
4
|
+
|
|
5
|
+
## Repository Overview
|
|
6
|
+
|
|
7
|
+
Hobees is a Python CLI and FastAPI application built with LangGraph. It uses SQLAlchemy with PostgreSQL or SQLite and is managed with `uv`.
|
|
8
|
+
|
|
9
|
+
- `src/hobees/cli/` - Typer commands, interactive shell, TUI, and CLI configuration
|
|
10
|
+
- `src/hobees/core/` - Queen orchestration, hives, LLM providers, tools, memory, skills, telemetry, and context management
|
|
11
|
+
- `src/hobees/db/` - SQLAlchemy models, database setup, sessions, and analytics
|
|
12
|
+
- `src/hobees/api/` - FastAPI endpoints and server-sent event streams
|
|
13
|
+
- `tests/` - pytest coverage
|
|
14
|
+
- `Dockerfile` and `compose.yaml` - Container build and PostgreSQL runtime
|
|
15
|
+
|
|
16
|
+
## Local Setup
|
|
17
|
+
|
|
18
|
+
Use Python 3.11 or newer and install `uv`.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
uv sync
|
|
22
|
+
cp .env.example .env
|
|
23
|
+
uv run hobees init
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Choose the database by setting `HOBEES_DATABASE_URL` in `.env`; there is no
|
|
27
|
+
interactive chooser. Use `sqlite:///./hobees.db` for local, single-user use or
|
|
28
|
+
`postgresql+psycopg://user:password@localhost:5432/hobees` for PostgreSQL and
|
|
29
|
+
multi-process use. Run `uv run hobees init` after choosing. The same URL is
|
|
30
|
+
used for application data and LangGraph checkpoints. Changing the URL does not
|
|
31
|
+
copy existing data to the other database.
|
|
32
|
+
|
|
33
|
+
SQLite file paths are relative to the process working directory. File-backed
|
|
34
|
+
SQLite persists checkpoints; `sqlite:///:memory:` is temporary. Do not use
|
|
35
|
+
SQLite as a shared multi-process database. Provider API keys must be set in the
|
|
36
|
+
process environment; providers store only their environment-variable names,
|
|
37
|
+
not secret values.
|
|
38
|
+
|
|
39
|
+
Never commit `.env`, API keys, local database files, generated artifacts, or skill outputs.
|
|
40
|
+
|
|
41
|
+
## Common Commands
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
uv run pytest
|
|
45
|
+
uv run pytest tests/test_hive_builder.py
|
|
46
|
+
uv run hobees --help
|
|
47
|
+
uv run hobees init
|
|
48
|
+
uv run hobees hive list
|
|
49
|
+
uv run hobees serve --port 8420
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Run the smallest relevant test set while iterating, then run the complete suite before finalizing a change.
|
|
53
|
+
|
|
54
|
+
The PostgreSQL integration test creates and drops a unique schema in the
|
|
55
|
+
configured database. Point it only at a disposable test database:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
HOBEES_TEST_POSTGRES_URL=postgresql+psycopg://user:password@localhost:5432/hobees_test \
|
|
59
|
+
uv run pytest tests/test_database_backends.py
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Docker Workflow
|
|
63
|
+
|
|
64
|
+
Docker Compose is the supported containerized PostgreSQL workflow.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
cp .env.docker.example .env
|
|
68
|
+
# Set POSTGRES_PASSWORD and any provider API key variables.
|
|
69
|
+
mkdir -p artifacts skills
|
|
70
|
+
docker compose build
|
|
71
|
+
docker compose run --rm hobees init
|
|
72
|
+
docker compose run --rm hobees hive list
|
|
73
|
+
docker compose run --rm hobees hive run research-team "Summarize the project plan" --json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The database password is required and `.env` is not committed. Use a URL-safe password because Compose includes it in `HOBEES_DATABASE_URL`.
|
|
77
|
+
|
|
78
|
+
The production Docker image is built with `uv sync --no-dev`, so it does not
|
|
79
|
+
include pytest. Run tests from the development checkout with `uv run pytest`.
|
|
80
|
+
This repository does not define a development Docker image.
|
|
81
|
+
|
|
82
|
+
Keep `./artifacts` and `./skills` mounted when testing features that write files. On Linux, set `HOBEES_UID` and `HOBEES_GID` in `.env` to match the host user (`id -u`, `id -g`) so bind mounts remain writable.
|
|
83
|
+
|
|
84
|
+
## Change Guidelines
|
|
85
|
+
|
|
86
|
+
- Follow existing Python, Typer, Pydantic, SQLAlchemy, and LangGraph patterns.
|
|
87
|
+
- Use focused edits and preserve public CLI behavior.
|
|
88
|
+
- Put orchestration logic in `src/hobees/core/`, persistence in `src/hobees/db/`, and CLI/API presentation in their respective packages.
|
|
89
|
+
- Add or update pytest coverage for new behavior and bug fixes.
|
|
90
|
+
- Update README sections and examples when user-visible behavior changes.
|
|
91
|
+
- Do not log or persist provider credentials.
|
|
92
|
+
- Do not alter or delete existing user data, database volumes, or unrelated generated files.
|
|
93
|
+
|
|
94
|
+
## Pull Requests
|
|
95
|
+
|
|
96
|
+
Before opening a pull request:
|
|
97
|
+
|
|
98
|
+
1. Rebase or merge the latest `main`.
|
|
99
|
+
2. Run targeted tests and the full pytest suite.
|
|
100
|
+
3. Verify Docker commands if Compose or the image is affected.
|
|
101
|
+
4. Describe the user-visible change, implementation summary, and test evidence.
|
|
102
|
+
5. Keep the diff focused and avoid unrelated cleanup.
|