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.
Files changed (69) hide show
  1. hobees-0.1.0a1/.dockerignore +15 -0
  2. hobees-0.1.0a1/.github/workflows/ci.yml +27 -0
  3. hobees-0.1.0a1/.github/workflows/release.yml +67 -0
  4. hobees-0.1.0a1/.gitignore +17 -0
  5. hobees-0.1.0a1/AGENT.md +102 -0
  6. hobees-0.1.0a1/CHANGELOG.md +6 -0
  7. hobees-0.1.0a1/CODE_DESIGN.md +776 -0
  8. hobees-0.1.0a1/CONTRIBUTING.md +54 -0
  9. hobees-0.1.0a1/Dockerfile +31 -0
  10. hobees-0.1.0a1/LICENSE +202 -0
  11. hobees-0.1.0a1/PKG-INFO +651 -0
  12. hobees-0.1.0a1/README.md +610 -0
  13. hobees-0.1.0a1/compose.yaml +42 -0
  14. hobees-0.1.0a1/config-template.json +176 -0
  15. hobees-0.1.0a1/config-template.yaml +197 -0
  16. hobees-0.1.0a1/pyproject.toml +61 -0
  17. hobees-0.1.0a1/src/hobees/__init__.py +0 -0
  18. hobees-0.1.0a1/src/hobees/api/__init__.py +5 -0
  19. hobees-0.1.0a1/src/hobees/api/app.py +408 -0
  20. hobees-0.1.0a1/src/hobees/cli/__init__.py +0 -0
  21. hobees-0.1.0a1/src/hobees/cli/bee_cmd.py +281 -0
  22. hobees-0.1.0a1/src/hobees/cli/commands.py +64 -0
  23. hobees-0.1.0a1/src/hobees/cli/completion.py +178 -0
  24. hobees-0.1.0a1/src/hobees/cli/hive_cmd.py +710 -0
  25. hobees-0.1.0a1/src/hobees/cli/icons.py +101 -0
  26. hobees-0.1.0a1/src/hobees/cli/import_cmd.py +554 -0
  27. hobees-0.1.0a1/src/hobees/cli/main.py +631 -0
  28. hobees-0.1.0a1/src/hobees/cli/memory_cmd.py +129 -0
  29. hobees-0.1.0a1/src/hobees/cli/provider_cmd.py +591 -0
  30. hobees-0.1.0a1/src/hobees/cli/shell.py +2148 -0
  31. hobees-0.1.0a1/src/hobees/cli/skill_cmd.py +274 -0
  32. hobees-0.1.0a1/src/hobees/cli/tui.py +1888 -0
  33. hobees-0.1.0a1/src/hobees/config.py +60 -0
  34. hobees-0.1.0a1/src/hobees/core/__init__.py +0 -0
  35. hobees-0.1.0a1/src/hobees/core/context_manager.py +203 -0
  36. hobees-0.1.0a1/src/hobees/core/hive_builder.py +551 -0
  37. hobees-0.1.0a1/src/hobees/core/llm_factory.py +202 -0
  38. hobees-0.1.0a1/src/hobees/core/memory_manager.py +302 -0
  39. hobees-0.1.0a1/src/hobees/core/model_discovery.py +164 -0
  40. hobees-0.1.0a1/src/hobees/core/queen.py +236 -0
  41. hobees-0.1.0a1/src/hobees/core/reasoning_patch.py +96 -0
  42. hobees-0.1.0a1/src/hobees/core/skill_harvester.py +308 -0
  43. hobees-0.1.0a1/src/hobees/core/streaming.py +315 -0
  44. hobees-0.1.0a1/src/hobees/core/telemetry.py +225 -0
  45. hobees-0.1.0a1/src/hobees/core/tool_registry.py +272 -0
  46. hobees-0.1.0a1/src/hobees/core/tracing.py +426 -0
  47. hobees-0.1.0a1/src/hobees/db/__init__.py +0 -0
  48. hobees-0.1.0a1/src/hobees/db/analytics.py +230 -0
  49. hobees-0.1.0a1/src/hobees/db/backends.py +34 -0
  50. hobees-0.1.0a1/src/hobees/db/models.py +289 -0
  51. hobees-0.1.0a1/src/hobees/db/session.py +86 -0
  52. hobees-0.1.0a1/tests/conftest.py +21 -0
  53. hobees-0.1.0a1/tests/test_api.py +223 -0
  54. hobees-0.1.0a1/tests/test_cli_startup.py +60 -0
  55. hobees-0.1.0a1/tests/test_completion.py +111 -0
  56. hobees-0.1.0a1/tests/test_context_manager.py +101 -0
  57. hobees-0.1.0a1/tests/test_database_backends.py +206 -0
  58. hobees-0.1.0a1/tests/test_hive_builder.py +236 -0
  59. hobees-0.1.0a1/tests/test_hive_remove.py +111 -0
  60. hobees-0.1.0a1/tests/test_hive_run.py +134 -0
  61. hobees-0.1.0a1/tests/test_import_cmd.py +78 -0
  62. hobees-0.1.0a1/tests/test_memory_manager.py +140 -0
  63. hobees-0.1.0a1/tests/test_model_discovery.py +32 -0
  64. hobees-0.1.0a1/tests/test_run_lifecycle.py +114 -0
  65. hobees-0.1.0a1/tests/test_skill_harvester.py +335 -0
  66. hobees-0.1.0a1/tests/test_tool_registry.py +62 -0
  67. hobees-0.1.0a1/tests/test_tracing.py +217 -0
  68. hobees-0.1.0a1/tests/test_tui.py +216 -0
  69. hobees-0.1.0a1/uv.lock +2700 -0
@@ -0,0 +1,15 @@
1
+ .git
2
+ .venv
3
+ __pycache__
4
+ *.py[cod]
5
+ .pytest_cache
6
+ .mypy_cache
7
+ .ruff_cache
8
+ .env
9
+ .env.*
10
+ artifacts
11
+ config
12
+ skills
13
+ build
14
+ dist
15
+ tests
@@ -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
@@ -0,0 +1,17 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.pyc
4
+ .env*
5
+ .hobees/
6
+ *.egg-info/
7
+ build/
8
+ dist/
9
+
10
+ # Local runtime databases
11
+ *.db
12
+ *.db-journal
13
+
14
+ # Local runtime outputs and synced skill files
15
+ artifacts/
16
+ skills/
17
+
@@ -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.
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+
3
+ Notable project changes are recorded here. The package version is defined in
4
+ `pyproject.toml`. Before a release, move the relevant entries from **Unreleased**
5
+ to a heading matching that version and add the release date.
6
+