bumblehive 0.1.0__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 (120) hide show
  1. bumblehive-0.1.0/.gitignore +235 -0
  2. bumblehive-0.1.0/LICENSE +201 -0
  3. bumblehive-0.1.0/PKG-INFO +112 -0
  4. bumblehive-0.1.0/README.md +79 -0
  5. bumblehive-0.1.0/pyproject.toml +69 -0
  6. bumblehive-0.1.0/src/bumblehive/__init__.py +47 -0
  7. bumblehive-0.1.0/src/bumblehive/agent/__init__.py +46 -0
  8. bumblehive-0.1.0/src/bumblehive/agent/context/__init__.py +33 -0
  9. bumblehive-0.1.0/src/bumblehive/agent/context/builder.py +363 -0
  10. bumblehive-0.1.0/src/bumblehive/agent/context/governor.py +109 -0
  11. bumblehive-0.1.0/src/bumblehive/agent/context/history.py +416 -0
  12. bumblehive-0.1.0/src/bumblehive/agent/context/prompts/__init__.py +1 -0
  13. bumblehive-0.1.0/src/bumblehive/agent/context/prompts/agent_instructions.md +23 -0
  14. bumblehive-0.1.0/src/bumblehive/agent/context/prompts/tool_use_instructions.md +42 -0
  15. bumblehive-0.1.0/src/bumblehive/agent/context/window.py +235 -0
  16. bumblehive-0.1.0/src/bumblehive/agent/loop.py +159 -0
  17. bumblehive-0.1.0/src/bumblehive/agent/runner.py +399 -0
  18. bumblehive-0.1.0/src/bumblehive/config/__init__.py +3 -0
  19. bumblehive-0.1.0/src/bumblehive/config/loader.py +37 -0
  20. bumblehive-0.1.0/src/bumblehive/config/schema.py +383 -0
  21. bumblehive-0.1.0/src/bumblehive/console.py +585 -0
  22. bumblehive-0.1.0/src/bumblehive/observability/__init__.py +96 -0
  23. bumblehive-0.1.0/src/bumblehive/observability/emitter.py +71 -0
  24. bumblehive-0.1.0/src/bumblehive/observability/emitters.py +243 -0
  25. bumblehive-0.1.0/src/bumblehive/observability/events.py +69 -0
  26. bumblehive-0.1.0/src/bumblehive/observability/hooks.py +95 -0
  27. bumblehive-0.1.0/src/bumblehive/observability/payloads.py +44 -0
  28. bumblehive-0.1.0/src/bumblehive/observability/recording.py +16 -0
  29. bumblehive-0.1.0/src/bumblehive/observability/streaming.py +105 -0
  30. bumblehive-0.1.0/src/bumblehive/paths.py +28 -0
  31. bumblehive-0.1.0/src/bumblehive/protocols/__init__.py +15 -0
  32. bumblehive-0.1.0/src/bumblehive/protocols/errors.py +10 -0
  33. bumblehive-0.1.0/src/bumblehive/protocols/generation.py +22 -0
  34. bumblehive-0.1.0/src/bumblehive/protocols/mcp.py +22 -0
  35. bumblehive-0.1.0/src/bumblehive/protocols/tool_calls.py +125 -0
  36. bumblehive-0.1.0/src/bumblehive/providers/__init__.py +23 -0
  37. bumblehive-0.1.0/src/bumblehive/providers/base.py +222 -0
  38. bumblehive-0.1.0/src/bumblehive/providers/manager.py +56 -0
  39. bumblehive-0.1.0/src/bumblehive/providers/openai_chat_completions.py +904 -0
  40. bumblehive-0.1.0/src/bumblehive/providers/streaming.py +48 -0
  41. bumblehive-0.1.0/src/bumblehive/runtime.py +395 -0
  42. bumblehive-0.1.0/src/bumblehive/session/__init__.py +9 -0
  43. bumblehive-0.1.0/src/bumblehive/session/manager.py +155 -0
  44. bumblehive-0.1.0/src/bumblehive/session/models.py +13 -0
  45. bumblehive-0.1.0/src/bumblehive/session/stores/__init__.py +3 -0
  46. bumblehive-0.1.0/src/bumblehive/session/stores/json_file.py +101 -0
  47. bumblehive-0.1.0/src/bumblehive/skills/__init__.py +13 -0
  48. bumblehive-0.1.0/src/bumblehive/skills/loader.py +74 -0
  49. bumblehive-0.1.0/src/bumblehive/skills/manager.py +82 -0
  50. bumblehive-0.1.0/src/bumblehive/skills/models.py +30 -0
  51. bumblehive-0.1.0/src/bumblehive/skills/render.py +47 -0
  52. bumblehive-0.1.0/src/bumblehive/tools/__init__.py +24 -0
  53. bumblehive-0.1.0/src/bumblehive/tools/adapters/__init__.py +6 -0
  54. bumblehive-0.1.0/src/bumblehive/tools/adapters/function.py +21 -0
  55. bumblehive-0.1.0/src/bumblehive/tools/adapters/mcp.py +89 -0
  56. bumblehive-0.1.0/src/bumblehive/tools/base.py +133 -0
  57. bumblehive-0.1.0/src/bumblehive/tools/builtins/__init__.py +59 -0
  58. bumblehive-0.1.0/src/bumblehive/tools/builtins/file.py +1074 -0
  59. bumblehive-0.1.0/src/bumblehive/tools/builtins/patch.py +359 -0
  60. bumblehive-0.1.0/src/bumblehive/tools/builtins/search.py +526 -0
  61. bumblehive-0.1.0/src/bumblehive/tools/builtins/shell.py +1086 -0
  62. bumblehive-0.1.0/src/bumblehive/tools/builtins/state.py +34 -0
  63. bumblehive-0.1.0/src/bumblehive/tools/builtins/workspace.py +267 -0
  64. bumblehive-0.1.0/src/bumblehive/tools/executor.py +122 -0
  65. bumblehive-0.1.0/src/bumblehive/tools/manager.py +289 -0
  66. bumblehive-0.1.0/src/bumblehive/tools/mcp/__init__.py +13 -0
  67. bumblehive-0.1.0/src/bumblehive/tools/mcp/manager.py +226 -0
  68. bumblehive-0.1.0/src/bumblehive/tools/registry.py +159 -0
  69. bumblehive-0.1.0/src/bumblehive/tools/scope.py +104 -0
  70. bumblehive-0.1.0/tests/__init__.py +1 -0
  71. bumblehive-0.1.0/tests/agent/__init__.py +1 -0
  72. bumblehive-0.1.0/tests/agent/context/__init__.py +1 -0
  73. bumblehive-0.1.0/tests/agent/context/test_builder.py +89 -0
  74. bumblehive-0.1.0/tests/agent/context/test_governor.py +55 -0
  75. bumblehive-0.1.0/tests/agent/context/test_history.py +95 -0
  76. bumblehive-0.1.0/tests/agent/context/test_window.py +79 -0
  77. bumblehive-0.1.0/tests/agent/test_loop.py +418 -0
  78. bumblehive-0.1.0/tests/agent/test_runner.py +273 -0
  79. bumblehive-0.1.0/tests/config/__init__.py +1 -0
  80. bumblehive-0.1.0/tests/config/test_loader.py +39 -0
  81. bumblehive-0.1.0/tests/config/test_schema.py +130 -0
  82. bumblehive-0.1.0/tests/conftest.py +18 -0
  83. bumblehive-0.1.0/tests/observability/__init__.py +1 -0
  84. bumblehive-0.1.0/tests/observability/test_emitters.py +197 -0
  85. bumblehive-0.1.0/tests/observability/test_hooks.py +38 -0
  86. bumblehive-0.1.0/tests/observability/test_streaming.py +58 -0
  87. bumblehive-0.1.0/tests/protocols/__init__.py +1 -0
  88. bumblehive-0.1.0/tests/protocols/test_generation.py +14 -0
  89. bumblehive-0.1.0/tests/protocols/test_mcp.py +27 -0
  90. bumblehive-0.1.0/tests/protocols/test_tool_calls.py +48 -0
  91. bumblehive-0.1.0/tests/providers/__init__.py +1 -0
  92. bumblehive-0.1.0/tests/providers/test_base.py +135 -0
  93. bumblehive-0.1.0/tests/providers/test_manager.py +90 -0
  94. bumblehive-0.1.0/tests/providers/test_openai_chat_completions.py +470 -0
  95. bumblehive-0.1.0/tests/providers/test_streaming.py +170 -0
  96. bumblehive-0.1.0/tests/session/__init__.py +1 -0
  97. bumblehive-0.1.0/tests/session/stores/__init__.py +1 -0
  98. bumblehive-0.1.0/tests/session/stores/test_json_file.py +39 -0
  99. bumblehive-0.1.0/tests/session/test_manager.py +124 -0
  100. bumblehive-0.1.0/tests/skills/__init__.py +1 -0
  101. bumblehive-0.1.0/tests/skills/test_loader.py +55 -0
  102. bumblehive-0.1.0/tests/skills/test_manager.py +66 -0
  103. bumblehive-0.1.0/tests/test_console.py +85 -0
  104. bumblehive-0.1.0/tests/test_paths.py +28 -0
  105. bumblehive-0.1.0/tests/test_runtime.py +424 -0
  106. bumblehive-0.1.0/tests/tools/__init__.py +1 -0
  107. bumblehive-0.1.0/tests/tools/adapters/__init__.py +0 -0
  108. bumblehive-0.1.0/tests/tools/adapters/test_function.py +59 -0
  109. bumblehive-0.1.0/tests/tools/builtins/__init__.py +1 -0
  110. bumblehive-0.1.0/tests/tools/builtins/test_file.py +242 -0
  111. bumblehive-0.1.0/tests/tools/builtins/test_patch.py +146 -0
  112. bumblehive-0.1.0/tests/tools/builtins/test_search.py +155 -0
  113. bumblehive-0.1.0/tests/tools/builtins/test_shell.py +381 -0
  114. bumblehive-0.1.0/tests/tools/builtins/test_workspace.py +56 -0
  115. bumblehive-0.1.0/tests/tools/mcp/__init__.py +1 -0
  116. bumblehive-0.1.0/tests/tools/mcp/test_manager.py +337 -0
  117. bumblehive-0.1.0/tests/tools/test_base.py +61 -0
  118. bumblehive-0.1.0/tests/tools/test_executor.py +89 -0
  119. bumblehive-0.1.0/tests/tools/test_manager.py +125 -0
  120. bumblehive-0.1.0/tests/tools/test_scope.py +32 -0
@@ -0,0 +1,235 @@
1
+ # OS metadata
2
+ .DS_Store
3
+ Thumbs.db
4
+ Desktop.ini
5
+
6
+ # Byte-compiled / optimized / DLL files
7
+ __pycache__/
8
+ *.py[codz]
9
+ *$py.class
10
+
11
+ # C extensions
12
+ *.so
13
+
14
+ # Distribution / packaging
15
+ .Python
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ downloads/
20
+ eggs/
21
+ .eggs/
22
+ lib/
23
+ lib64/
24
+ parts/
25
+ sdist/
26
+ var/
27
+ wheels/
28
+ share/python-wheels/
29
+ *.egg-info/
30
+ .installed.cfg
31
+ *.egg
32
+ MANIFEST
33
+
34
+ # PyInstaller
35
+ # Usually these files are written by a python script from a template
36
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
37
+ *.manifest
38
+ *.spec
39
+
40
+ # Installer logs
41
+ pip-log.txt
42
+ pip-delete-this-directory.txt
43
+
44
+ # Unit test / coverage reports
45
+ htmlcov/
46
+ .tox/
47
+ .nox/
48
+ .coverage
49
+ .coverage.*
50
+ .cache
51
+ nosetests.xml
52
+ coverage.xml
53
+ *.cover
54
+ *.py.cover
55
+ .hypothesis/
56
+ .pytest_cache/
57
+ cover/
58
+
59
+ # Translations
60
+ *.mo
61
+ *.pot
62
+
63
+ # Django stuff:
64
+ *.log
65
+ local_settings.py
66
+ db.sqlite3
67
+ db.sqlite3-journal
68
+
69
+ # Flask stuff:
70
+ instance/
71
+ .webassets-cache
72
+
73
+ # Scrapy stuff:
74
+ .scrapy
75
+
76
+ # Sphinx documentation
77
+ docs/_build/
78
+
79
+ # PyBuilder
80
+ .pybuilder/
81
+ target/
82
+
83
+ # Jupyter Notebook
84
+ .ipynb_checkpoints
85
+
86
+ # IPython
87
+ profile_default/
88
+ ipython_config.py
89
+
90
+ # pyenv
91
+ # For a library or package, you might want to ignore these files since the code is
92
+ # intended to run in multiple environments; otherwise, check them in:
93
+ # .python-version
94
+
95
+ # pipenv
96
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
97
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
98
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
99
+ # install all needed dependencies.
100
+ #Pipfile.lock
101
+
102
+ # UV
103
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
104
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
105
+ # commonly ignored for libraries.
106
+ #uv.lock
107
+
108
+ # poetry
109
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
110
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
111
+ # commonly ignored for libraries.
112
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
113
+ #poetry.lock
114
+ #poetry.toml
115
+
116
+ # pdm
117
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
118
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
119
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
120
+ #pdm.lock
121
+ #pdm.toml
122
+ .pdm-python
123
+ .pdm-build/
124
+
125
+ # pixi
126
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
127
+ #pixi.lock
128
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
129
+ # in the .venv directory. It is recommended not to include this directory in version control.
130
+ .pixi
131
+
132
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
133
+ __pypackages__/
134
+
135
+ # Celery stuff
136
+ celerybeat-schedule
137
+ celerybeat.pid
138
+
139
+ # SageMath parsed files
140
+ *.sage.py
141
+
142
+ # Environments
143
+ .env
144
+ .env.local
145
+ .env.*.local
146
+ .envrc
147
+ .venv
148
+ env/
149
+ venv/
150
+ ENV/
151
+ env.bak/
152
+ venv.bak/
153
+
154
+ # Spyder project settings
155
+ .spyderproject
156
+ .spyproject
157
+
158
+ # Rope project settings
159
+ .ropeproject
160
+
161
+ # mkdocs documentation
162
+ /site
163
+
164
+ # mypy
165
+ .mypy_cache/
166
+ .dmypy.json
167
+ dmypy.json
168
+
169
+ # Pyre type checker
170
+ .pyre/
171
+
172
+ # pytype static type analyzer
173
+ .pytype/
174
+
175
+ # Cython debug symbols
176
+ cython_debug/
177
+
178
+ # PyCharm
179
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
180
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
181
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
182
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
183
+ #.idea/
184
+
185
+ # Abstra
186
+ # Abstra is an AI-powered process automation framework.
187
+ # Ignore directories containing user credentials, local state, and settings.
188
+ # Learn more at https://abstra.io/docs
189
+ .abstra/
190
+
191
+ # Visual Studio Code
192
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
193
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
194
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
195
+ # you could uncomment the following to ignore the entire vscode folder
196
+ # .vscode/
197
+
198
+ # Ruff stuff:
199
+ .ruff_cache/
200
+
201
+ # PyPI configuration file
202
+ .pypirc
203
+
204
+ # Local BumbleHive configuration
205
+ /bumblehive.json
206
+
207
+ # Node / Vite
208
+ node_modules/
209
+ *.tsbuildinfo
210
+
211
+ # Generated Tauri files
212
+ desktop/src-tauri/gen/schemas/
213
+ desktop/src-tauri/binaries/
214
+ desktop/src-tauri/sidecar/*
215
+ !desktop/src-tauri/sidecar/.gitkeep
216
+
217
+ # Code-signing credentials
218
+ *.p8
219
+ *.p12
220
+ *.pfx
221
+ *.pem
222
+ *.key
223
+ *.mobileprovision
224
+
225
+ # Cursor
226
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
227
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
228
+ # refer to https://docs.cursor.com/context/ignore-files
229
+ .cursorignore
230
+ .cursorindexingignore
231
+
232
+ # Marimo
233
+ marimo/_static/
234
+ marimo/_lsp/
235
+ __marimo__/
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.4
2
+ Name: bumblehive
3
+ Version: 0.1.0
4
+ Summary: An agent runtime designed for tool-driven loop engineering.
5
+ Project-URL: Homepage, https://github.com/wxhcore/bumblehive
6
+ Project-URL: Repository, https://github.com/wxhcore/bumblehive
7
+ Project-URL: Issues, https://github.com/wxhcore/bumblehive/issues
8
+ Author: wxhcore
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ Keywords: agent,agent-loop,ai,llm,mcp,tool-calling
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Requires-Python: >=3.11
19
+ Requires-Dist: fastmcp<4.0,>=3.0
20
+ Requires-Dist: jsonschema<5.0,>=4.0
21
+ Requires-Dist: mcp<2.0,>=1.26
22
+ Requires-Dist: openai<3.0,>=2.0
23
+ Requires-Dist: openpyxl<4.0,>=3.1
24
+ Requires-Dist: pymupdf<2.0,>=1.25
25
+ Requires-Dist: python-docx<2.0,>=1.1
26
+ Requires-Dist: python-pptx<2.0,>=1.0
27
+ Requires-Dist: pyyaml<7.0,>=6.0
28
+ Requires-Dist: rich<16.0,>=14.0
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest-asyncio<2.0,>=0.24; extra == 'dev'
31
+ Requires-Dist: pytest<10,>=8; extra == 'dev'
32
+ Description-Content-Type: text/markdown
33
+
34
+ # BumbleHive
35
+
36
+ An agent runtime designed for tool-driven loop engineering.
37
+
38
+ BumbleHive is a lightweight Python library for building AI agents around a clear execution loop: build context, call the model, execute tools, observe events, and continue until a final result is produced.
39
+
40
+ ## Highlights
41
+
42
+ - Tool-driven agent loop with built-in and MCP-backed tools.
43
+ - Streaming lifecycle events for model deltas, tool calls, errors, and final results.
44
+ - Session-aware runtime with isolated history and concurrency control.
45
+ - Modular Python APIs for configuration, providers, tools, skills, and observability.
46
+
47
+ ## Quick Start
48
+
49
+ ```python
50
+ import bumblehive
51
+
52
+
53
+ runtime = bumblehive.from_config(
54
+ {
55
+ "provider": {"model": "gpt-5.4"},
56
+ "agent": {"tool_names": []},
57
+ }
58
+ )
59
+
60
+ result = await runtime.run("Hello", session_id="user:123")
61
+ print(result.final_content)
62
+ ```
63
+
64
+ ## Streaming
65
+
66
+ ```python
67
+ async for event in runtime.stream("Hello", session_id="user:123"):
68
+ print(event.kind, event.session_id, event.payload)
69
+ ```
70
+
71
+ ## Local Development
72
+
73
+ The base requirements are Python 3.11+ and Node.js 20.19+/22.12+. A dedicated Conda environment is recommended:
74
+
75
+ ```bash
76
+ conda create -n bumblehive_env python=3.11 -y
77
+ conda activate bumblehive_env
78
+ npm run setup
79
+ npm run doctor
80
+ ```
81
+
82
+ `npm run setup` uses the currently active Python interpreter, does not depend on a fixed Conda path, and installs the SDK dependencies, Server, WebUI, and desktop dependencies together.
83
+
84
+ For daily development:
85
+
86
+ ```bash
87
+ conda activate bumblehive_env
88
+ npm run dev
89
+ ```
90
+
91
+ This starts the Server on `127.0.0.1:18421` and the WebUI on `127.0.0.1:1420`. Use `npm run dev:server` or `npm run dev:web` to run one component, and `npm test` for the Python test suite.
92
+
93
+ ### Desktop
94
+
95
+ macOS additionally requires Rust and Xcode Command Line Tools. Windows additionally requires the Rust MSVC toolchain, WebView2, and Microsoft C++ Build Tools with the Desktop development with C++ workload.
96
+
97
+ On a clean checkout, build the generated desktop sidecar before running the full desktop environment check:
98
+
99
+ ```bash
100
+ npm run build:sidecar
101
+ npm run doctor:desktop
102
+ ```
103
+
104
+ Then start development or create a platform-specific installer:
105
+
106
+ ```bash
107
+ npm run dev:desktop
108
+ npm run build:mac
109
+ npm run build:win
110
+ ```
111
+
112
+ The sidecar is a generated artifact and is not created by `npm run setup`. `dev:desktop` and both packaging commands rebuild it automatically with the current Python environment. Use `build:mac` only on macOS and `build:win` only on Windows.
@@ -0,0 +1,79 @@
1
+ # BumbleHive
2
+
3
+ An agent runtime designed for tool-driven loop engineering.
4
+
5
+ BumbleHive is a lightweight Python library for building AI agents around a clear execution loop: build context, call the model, execute tools, observe events, and continue until a final result is produced.
6
+
7
+ ## Highlights
8
+
9
+ - Tool-driven agent loop with built-in and MCP-backed tools.
10
+ - Streaming lifecycle events for model deltas, tool calls, errors, and final results.
11
+ - Session-aware runtime with isolated history and concurrency control.
12
+ - Modular Python APIs for configuration, providers, tools, skills, and observability.
13
+
14
+ ## Quick Start
15
+
16
+ ```python
17
+ import bumblehive
18
+
19
+
20
+ runtime = bumblehive.from_config(
21
+ {
22
+ "provider": {"model": "gpt-5.4"},
23
+ "agent": {"tool_names": []},
24
+ }
25
+ )
26
+
27
+ result = await runtime.run("Hello", session_id="user:123")
28
+ print(result.final_content)
29
+ ```
30
+
31
+ ## Streaming
32
+
33
+ ```python
34
+ async for event in runtime.stream("Hello", session_id="user:123"):
35
+ print(event.kind, event.session_id, event.payload)
36
+ ```
37
+
38
+ ## Local Development
39
+
40
+ The base requirements are Python 3.11+ and Node.js 20.19+/22.12+. A dedicated Conda environment is recommended:
41
+
42
+ ```bash
43
+ conda create -n bumblehive_env python=3.11 -y
44
+ conda activate bumblehive_env
45
+ npm run setup
46
+ npm run doctor
47
+ ```
48
+
49
+ `npm run setup` uses the currently active Python interpreter, does not depend on a fixed Conda path, and installs the SDK dependencies, Server, WebUI, and desktop dependencies together.
50
+
51
+ For daily development:
52
+
53
+ ```bash
54
+ conda activate bumblehive_env
55
+ npm run dev
56
+ ```
57
+
58
+ This starts the Server on `127.0.0.1:18421` and the WebUI on `127.0.0.1:1420`. Use `npm run dev:server` or `npm run dev:web` to run one component, and `npm test` for the Python test suite.
59
+
60
+ ### Desktop
61
+
62
+ macOS additionally requires Rust and Xcode Command Line Tools. Windows additionally requires the Rust MSVC toolchain, WebView2, and Microsoft C++ Build Tools with the Desktop development with C++ workload.
63
+
64
+ On a clean checkout, build the generated desktop sidecar before running the full desktop environment check:
65
+
66
+ ```bash
67
+ npm run build:sidecar
68
+ npm run doctor:desktop
69
+ ```
70
+
71
+ Then start development or create a platform-specific installer:
72
+
73
+ ```bash
74
+ npm run dev:desktop
75
+ npm run build:mac
76
+ npm run build:win
77
+ ```
78
+
79
+ The sidecar is a generated artifact and is not created by `npm run setup`. `dev:desktop` and both packaging commands rebuild it automatically with the current Python environment. Use `build:mac` only on macOS and `build:win` only on Windows.
@@ -0,0 +1,69 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.26"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "bumblehive"
7
+ version = "0.1.0"
8
+ description = "An agent runtime designed for tool-driven loop engineering."
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = "Apache-2.0"
12
+ license-files = ["LICENSE"]
13
+ authors = [
14
+ { name = "wxhcore" },
15
+ ]
16
+ keywords = [
17
+ "ai",
18
+ "agent",
19
+ "agent-loop",
20
+ "llm",
21
+ "mcp",
22
+ "tool-calling",
23
+ ]
24
+ classifiers = [
25
+ "Development Status :: 3 - Alpha",
26
+ "Intended Audience :: Developers",
27
+ "Operating System :: OS Independent",
28
+ "Programming Language :: Python :: 3",
29
+ "Programming Language :: Python :: 3 :: Only",
30
+ "Programming Language :: Python :: 3.11",
31
+ ]
32
+ dependencies = [
33
+ "openai>=2.0,<3.0",
34
+ "fastmcp>=3.0,<4.0",
35
+ "mcp>=1.26,<2.0",
36
+ "jsonschema>=4.0,<5.0",
37
+ "PyYAML>=6.0,<7.0",
38
+ "PyMuPDF>=1.25,<2.0",
39
+ "python-docx>=1.1,<2.0",
40
+ "openpyxl>=3.1,<4.0",
41
+ "python-pptx>=1.0,<2.0",
42
+ "rich>=14.0,<16.0",
43
+ ]
44
+
45
+ [project.optional-dependencies]
46
+ dev = [
47
+ "pytest>=8,<10",
48
+ "pytest-asyncio>=0.24,<2.0",
49
+ ]
50
+
51
+ [project.urls]
52
+ Homepage = "https://github.com/wxhcore/bumblehive"
53
+ Repository = "https://github.com/wxhcore/bumblehive"
54
+ Issues = "https://github.com/wxhcore/bumblehive/issues"
55
+
56
+ [tool.hatch.build.targets.wheel]
57
+ packages = ["src/bumblehive"]
58
+
59
+ [tool.hatch.build.targets.sdist]
60
+ include = [
61
+ "/src/bumblehive",
62
+ "/tests",
63
+ "/README.md",
64
+ "/LICENSE",
65
+ "/pyproject.toml",
66
+ ]
67
+
68
+ [tool.pytest.ini_options]
69
+ testpaths = ["tests"]