brnrd 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 (247) hide show
  1. brnrd-0.1.0/LICENSE +21 -0
  2. brnrd-0.1.0/LICENSE-OVERVIEW.md +27 -0
  3. brnrd-0.1.0/MANIFEST.in +1 -0
  4. brnrd-0.1.0/PKG-INFO +233 -0
  5. brnrd-0.1.0/README.md +194 -0
  6. brnrd-0.1.0/pyproject.toml +71 -0
  7. brnrd-0.1.0/setup.cfg +4 -0
  8. brnrd-0.1.0/src/brnrd/LICENSE +661 -0
  9. brnrd-0.1.0/src/brnrd/__init__.py +14 -0
  10. brnrd-0.1.0/src/brnrd/__main__.py +22 -0
  11. brnrd-0.1.0/src/brnrd/activity_records.py +49 -0
  12. brnrd-0.1.0/src/brnrd/app.py +89 -0
  13. brnrd-0.1.0/src/brnrd/auth.py +78 -0
  14. brnrd-0.1.0/src/brnrd/billing.py +501 -0
  15. brnrd-0.1.0/src/brnrd/config.py +106 -0
  16. brnrd-0.1.0/src/brnrd/db.py +39 -0
  17. brnrd-0.1.0/src/brnrd/ids.py +99 -0
  18. brnrd-0.1.0/src/brnrd/inbox.py +203 -0
  19. brnrd-0.1.0/src/brnrd/migrations.py +158 -0
  20. brnrd-0.1.0/src/brnrd/models.py +378 -0
  21. brnrd-0.1.0/src/brnrd/oauth.py +165 -0
  22. brnrd-0.1.0/src/brnrd/pack_relay.py +70 -0
  23. brnrd-0.1.0/src/brnrd/platforms/__init__.py +1 -0
  24. brnrd-0.1.0/src/brnrd/platforms/github.py +83 -0
  25. brnrd-0.1.0/src/brnrd/platforms/github_app.py +109 -0
  26. brnrd-0.1.0/src/brnrd/platforms/telegram.py +207 -0
  27. brnrd-0.1.0/src/brnrd/routers/__init__.py +1 -0
  28. brnrd-0.1.0/src/brnrd/routers/accounts.py +195 -0
  29. brnrd-0.1.0/src/brnrd/routers/billing.py +226 -0
  30. brnrd-0.1.0/src/brnrd/routers/config_approval.py +140 -0
  31. brnrd-0.1.0/src/brnrd/routers/daemons.py +391 -0
  32. brnrd-0.1.0/src/brnrd/routers/dev.py +22 -0
  33. brnrd-0.1.0/src/brnrd/routers/github_app.py +157 -0
  34. brnrd-0.1.0/src/brnrd/routers/pairing.py +173 -0
  35. brnrd-0.1.0/src/brnrd/routers/render.py +46 -0
  36. brnrd-0.1.0/src/brnrd/routers/webhooks.py +319 -0
  37. brnrd-0.1.0/src/brnrd/schemas.py +534 -0
  38. brnrd-0.1.0/src/brnrd/security.py +14 -0
  39. brnrd-0.1.0/src/brnrd/stripe_api.py +167 -0
  40. brnrd-0.1.0/src/brnrd/wake_requests.py +141 -0
  41. brnrd-0.1.0/src/brnrd.egg-info/PKG-INFO +233 -0
  42. brnrd-0.1.0/src/brnrd.egg-info/SOURCES.txt +245 -0
  43. brnrd-0.1.0/src/brnrd.egg-info/dependency_links.txt +1 -0
  44. brnrd-0.1.0/src/brnrd.egg-info/entry_points.txt +2 -0
  45. brnrd-0.1.0/src/brnrd.egg-info/requires.txt +17 -0
  46. brnrd-0.1.0/src/brnrd.egg-info/top_level.txt +3 -0
  47. brnrd-0.1.0/src/brnrd_web/LICENSE +661 -0
  48. brnrd-0.1.0/src/brnrd_web/__init__.py +28 -0
  49. brnrd-0.1.0/src/brnrd_web/activity_dashboard.py +1211 -0
  50. brnrd-0.1.0/src/brnrd_web/routes.py +655 -0
  51. brnrd-0.1.0/src/brnrd_web/static/app.css +479 -0
  52. brnrd-0.1.0/src/brnrd_web/static/dashboard.css +895 -0
  53. brnrd-0.1.0/src/brnrd_web/templates/base.html +15 -0
  54. brnrd-0.1.0/src/brnrd_web/templates/config_approve.html +29 -0
  55. brnrd-0.1.0/src/brnrd_web/templates/connect.html +21 -0
  56. brnrd-0.1.0/src/brnrd_web/templates/dashboard.html +295 -0
  57. brnrd-0.1.0/src/brnrd_web/templates/message.html +16 -0
  58. brnrd-0.1.0/src/brr/AGENTS.md +651 -0
  59. brnrd-0.1.0/src/brr/Dockerfile +109 -0
  60. brnrd-0.1.0/src/brr/LICENSE +21 -0
  61. brnrd-0.1.0/src/brr/__init__.py +5 -0
  62. brnrd-0.1.0/src/brr/__main__.py +12 -0
  63. brnrd-0.1.0/src/brr/account.py +631 -0
  64. brnrd-0.1.0/src/brr/adopt.py +367 -0
  65. brnrd-0.1.0/src/brr/bench.py +597 -0
  66. brnrd-0.1.0/src/brr/branching.py +209 -0
  67. brnrd-0.1.0/src/brr/claude_status.py +310 -0
  68. brnrd-0.1.0/src/brr/claude_usage.py +715 -0
  69. brnrd-0.1.0/src/brr/cli.py +1109 -0
  70. brnrd-0.1.0/src/brr/codex_status.py +318 -0
  71. brnrd-0.1.0/src/brr/codex_usage.py +391 -0
  72. brnrd-0.1.0/src/brr/config.py +52 -0
  73. brnrd-0.1.0/src/brr/conversations.py +1174 -0
  74. brnrd-0.1.0/src/brr/daemon.py +5591 -0
  75. brnrd-0.1.0/src/brr/daemon_install/__init__.py +168 -0
  76. brnrd-0.1.0/src/brr/daemon_install/linux.py +269 -0
  77. brnrd-0.1.0/src/brr/daemon_install/macos.py +271 -0
  78. brnrd-0.1.0/src/brr/data/__init__.py +1 -0
  79. brnrd-0.1.0/src/brr/data/runner-capabilities.json +53 -0
  80. brnrd-0.1.0/src/brr/dev_reload.py +102 -0
  81. brnrd-0.1.0/src/brr/diffense/__init__.py +25 -0
  82. brnrd-0.1.0/src/brr/diffense/gist.py +232 -0
  83. brnrd-0.1.0/src/brr/diffense/pack.py +492 -0
  84. brnrd-0.1.0/src/brr/diffense/prbody.py +319 -0
  85. brnrd-0.1.0/src/brr/diffense/render.py +65 -0
  86. brnrd-0.1.0/src/brr/diffense/review-pr64.html +710 -0
  87. brnrd-0.1.0/src/brr/diffense/template.html +710 -0
  88. brnrd-0.1.0/src/brr/docs/__init__.py +72 -0
  89. brnrd-0.1.0/src/brr/docs/account-daemon.md +73 -0
  90. brnrd-0.1.0/src/brr/docs/active-task.md +80 -0
  91. brnrd-0.1.0/src/brr/docs/brr-internals.md +366 -0
  92. brnrd-0.1.0/src/brr/docs/conversations.md +167 -0
  93. brnrd-0.1.0/src/brr/docs/envs.md +322 -0
  94. brnrd-0.1.0/src/brr/docs/execution-map.md +209 -0
  95. brnrd-0.1.0/src/brr/docs/portals.md +330 -0
  96. brnrd-0.1.0/src/brr/docs/review-pack.md +55 -0
  97. brnrd-0.1.0/src/brr/dominion.py +561 -0
  98. brnrd-0.1.0/src/brr/envs/__init__.py +895 -0
  99. brnrd-0.1.0/src/brr/ergonomics/__init__.py +49 -0
  100. brnrd-0.1.0/src/brr/ergonomics/probes.py +461 -0
  101. brnrd-0.1.0/src/brr/ergonomics/proxy.py +174 -0
  102. brnrd-0.1.0/src/brr/ergonomics/record.py +65 -0
  103. brnrd-0.1.0/src/brr/ergonomics/store.py +180 -0
  104. brnrd-0.1.0/src/brr/facets.py +415 -0
  105. brnrd-0.1.0/src/brr/forge_state.py +268 -0
  106. brnrd-0.1.0/src/brr/forges.py +388 -0
  107. brnrd-0.1.0/src/brr/gates/README.md +127 -0
  108. brnrd-0.1.0/src/brr/gates/__init__.py +42 -0
  109. brnrd-0.1.0/src/brr/gates/cloud.py +1181 -0
  110. brnrd-0.1.0/src/brr/gates/delivery.py +171 -0
  111. brnrd-0.1.0/src/brr/gates/github/__init__.py +87 -0
  112. brnrd-0.1.0/src/brr/gates/github/attachments.py +79 -0
  113. brnrd-0.1.0/src/brr/gates/github/cache.py +28 -0
  114. brnrd-0.1.0/src/brr/gates/github/client.py +191 -0
  115. brnrd-0.1.0/src/brr/gates/github/constants.py +63 -0
  116. brnrd-0.1.0/src/brr/gates/github/delivery.py +190 -0
  117. brnrd-0.1.0/src/brr/gates/github/loop.py +101 -0
  118. brnrd-0.1.0/src/brr/gates/github/parse.py +102 -0
  119. brnrd-0.1.0/src/brr/gates/github/paths.py +70 -0
  120. brnrd-0.1.0/src/brr/gates/github/polling.py +695 -0
  121. brnrd-0.1.0/src/brr/gates/github/progress.py +125 -0
  122. brnrd-0.1.0/src/brr/gates/github/prs.py +56 -0
  123. brnrd-0.1.0/src/brr/gates/github/state.py +81 -0
  124. brnrd-0.1.0/src/brr/gates/github/wizard.py +170 -0
  125. brnrd-0.1.0/src/brr/gates/runtime.py +176 -0
  126. brnrd-0.1.0/src/brr/gates/slack.py +312 -0
  127. brnrd-0.1.0/src/brr/gates/telegram.py +715 -0
  128. brnrd-0.1.0/src/brr/gitops.py +433 -0
  129. brnrd-0.1.0/src/brr/hooks.py +703 -0
  130. brnrd-0.1.0/src/brr/kb_health.py +314 -0
  131. brnrd-0.1.0/src/brr/kb_preflight.py +713 -0
  132. brnrd-0.1.0/src/brr/knowledge.py +284 -0
  133. brnrd-0.1.0/src/brr/pitfalls.py +118 -0
  134. brnrd-0.1.0/src/brr/presence.py +194 -0
  135. brnrd-0.1.0/src/brr/prompts/daemon-substrate.md +177 -0
  136. brnrd-0.1.0/src/brr/prompts/diffense.md +45 -0
  137. brnrd-0.1.0/src/brr/prompts/dominion-playbook.md +155 -0
  138. brnrd-0.1.0/src/brr/prompts/identity-core.md +89 -0
  139. brnrd-0.1.0/src/brr/prompts/introspection.md +56 -0
  140. brnrd-0.1.0/src/brr/prompts/kb-index.md +14 -0
  141. brnrd-0.1.0/src/brr/prompts/kb-log.md +13 -0
  142. brnrd-0.1.0/src/brr/prompts/run.md +95 -0
  143. brnrd-0.1.0/src/brr/prompts/runners.md +222 -0
  144. brnrd-0.1.0/src/brr/prompts/setup.md +93 -0
  145. brnrd-0.1.0/src/brr/prompts/weave.md +62 -0
  146. brnrd-0.1.0/src/brr/prompts/worker.md +22 -0
  147. brnrd-0.1.0/src/brr/prompts.py +1521 -0
  148. brnrd-0.1.0/src/brr/protocol.py +623 -0
  149. brnrd-0.1.0/src/brr/relics.py +280 -0
  150. brnrd-0.1.0/src/brr/run.py +217 -0
  151. brnrd-0.1.0/src/brr/run_context.py +402 -0
  152. brnrd-0.1.0/src/brr/run_ledger.py +489 -0
  153. brnrd-0.1.0/src/brr/run_progress.py +1155 -0
  154. brnrd-0.1.0/src/brr/runner.py +1106 -0
  155. brnrd-0.1.0/src/brr/runner_capabilities.py +162 -0
  156. brnrd-0.1.0/src/brr/runner_cores.py +578 -0
  157. brnrd-0.1.0/src/brr/runner_failures.py +89 -0
  158. brnrd-0.1.0/src/brr/runner_quota.py +485 -0
  159. brnrd-0.1.0/src/brr/runner_select.py +492 -0
  160. brnrd-0.1.0/src/brr/schedule.py +374 -0
  161. brnrd-0.1.0/src/brr/spending_plan.py +241 -0
  162. brnrd-0.1.0/src/brr/statusline.py +240 -0
  163. brnrd-0.1.0/src/brr/sync.py +293 -0
  164. brnrd-0.1.0/src/brr/updates.py +165 -0
  165. brnrd-0.1.0/src/brr/wake_request.py +113 -0
  166. brnrd-0.1.0/src/brr/worktree.py +709 -0
  167. brnrd-0.1.0/tests/test_account.py +294 -0
  168. brnrd-0.1.0/tests/test_adopt.py +227 -0
  169. brnrd-0.1.0/tests/test_bench.py +225 -0
  170. brnrd-0.1.0/tests/test_branching.py +299 -0
  171. brnrd-0.1.0/tests/test_brnrd_activity.py +424 -0
  172. brnrd-0.1.0/tests/test_brnrd_billing.py +329 -0
  173. brnrd-0.1.0/tests/test_brnrd_config_approval.py +240 -0
  174. brnrd-0.1.0/tests/test_brnrd_dashboard.py +704 -0
  175. brnrd-0.1.0/tests/test_brnrd_github.py +230 -0
  176. brnrd-0.1.0/tests/test_brnrd_inbox.py +421 -0
  177. brnrd-0.1.0/tests/test_brnrd_oauth.py +101 -0
  178. brnrd-0.1.0/tests/test_brnrd_pack_relay.py +148 -0
  179. brnrd-0.1.0/tests/test_brnrd_plans.py +152 -0
  180. brnrd-0.1.0/tests/test_brnrd_quota.py +169 -0
  181. brnrd-0.1.0/tests/test_brnrd_run_ledger.py +227 -0
  182. brnrd-0.1.0/tests/test_brnrd_runners.py +243 -0
  183. brnrd-0.1.0/tests/test_brnrd_telegram.py +589 -0
  184. brnrd-0.1.0/tests/test_brnrd_web.py +411 -0
  185. brnrd-0.1.0/tests/test_claude_status.py +146 -0
  186. brnrd-0.1.0/tests/test_claude_usage.py +247 -0
  187. brnrd-0.1.0/tests/test_cli.py +651 -0
  188. brnrd-0.1.0/tests/test_cloud_gate.py +1243 -0
  189. brnrd-0.1.0/tests/test_codex_status.py +156 -0
  190. brnrd-0.1.0/tests/test_codex_usage.py +152 -0
  191. brnrd-0.1.0/tests/test_config.py +25 -0
  192. brnrd-0.1.0/tests/test_conversations.py +857 -0
  193. brnrd-0.1.0/tests/test_daemon.py +3771 -0
  194. brnrd-0.1.0/tests/test_daemon_burst.py +338 -0
  195. brnrd-0.1.0/tests/test_daemon_conversations.py +247 -0
  196. brnrd-0.1.0/tests/test_daemon_heartbeat.py +300 -0
  197. brnrd-0.1.0/tests/test_daemon_install_linux.py +108 -0
  198. brnrd-0.1.0/tests/test_daemon_install_macos.py +164 -0
  199. brnrd-0.1.0/tests/test_daemon_mirror_cards.py +145 -0
  200. brnrd-0.1.0/tests/test_daemon_progress_packets.py +713 -0
  201. brnrd-0.1.0/tests/test_daemon_salvage.py +126 -0
  202. brnrd-0.1.0/tests/test_daemon_single_flight.py +173 -0
  203. brnrd-0.1.0/tests/test_deliver_stream.py +132 -0
  204. brnrd-0.1.0/tests/test_dev_reload.py +78 -0
  205. brnrd-0.1.0/tests/test_diffense_gist.py +176 -0
  206. brnrd-0.1.0/tests/test_diffense_pack.py +349 -0
  207. brnrd-0.1.0/tests/test_diffense_prbody.py +196 -0
  208. brnrd-0.1.0/tests/test_dockerfile.py +113 -0
  209. brnrd-0.1.0/tests/test_docs.py +163 -0
  210. brnrd-0.1.0/tests/test_dominion.py +437 -0
  211. brnrd-0.1.0/tests/test_dominion_commit.py +184 -0
  212. brnrd-0.1.0/tests/test_envs.py +1161 -0
  213. brnrd-0.1.0/tests/test_ergonomics.py +439 -0
  214. brnrd-0.1.0/tests/test_facets.py +276 -0
  215. brnrd-0.1.0/tests/test_forge_state.py +332 -0
  216. brnrd-0.1.0/tests/test_forges.py +255 -0
  217. brnrd-0.1.0/tests/test_gate_setup.py +44 -0
  218. brnrd-0.1.0/tests/test_github_gate.py +2221 -0
  219. brnrd-0.1.0/tests/test_gitops.py +347 -0
  220. brnrd-0.1.0/tests/test_hooks.py +609 -0
  221. brnrd-0.1.0/tests/test_kb_health.py +275 -0
  222. brnrd-0.1.0/tests/test_kb_preflight.py +632 -0
  223. brnrd-0.1.0/tests/test_knowledge.py +256 -0
  224. brnrd-0.1.0/tests/test_outbox.py +926 -0
  225. brnrd-0.1.0/tests/test_pitfalls.py +111 -0
  226. brnrd-0.1.0/tests/test_presence.py +93 -0
  227. brnrd-0.1.0/tests/test_prompts.py +1513 -0
  228. brnrd-0.1.0/tests/test_protocol.py +386 -0
  229. brnrd-0.1.0/tests/test_relics.py +173 -0
  230. brnrd-0.1.0/tests/test_run.py +139 -0
  231. brnrd-0.1.0/tests/test_run_context.py +71 -0
  232. brnrd-0.1.0/tests/test_run_ledger.py +414 -0
  233. brnrd-0.1.0/tests/test_run_progress.py +1109 -0
  234. brnrd-0.1.0/tests/test_runner.py +1147 -0
  235. brnrd-0.1.0/tests/test_runner_capabilities.py +47 -0
  236. brnrd-0.1.0/tests/test_runner_cores.py +324 -0
  237. brnrd-0.1.0/tests/test_runner_quota.py +249 -0
  238. brnrd-0.1.0/tests/test_runner_select.py +476 -0
  239. brnrd-0.1.0/tests/test_schedule.py +234 -0
  240. brnrd-0.1.0/tests/test_schedule_daemon.py +251 -0
  241. brnrd-0.1.0/tests/test_slack_render_update.py +311 -0
  242. brnrd-0.1.0/tests/test_spending_plan.py +200 -0
  243. brnrd-0.1.0/tests/test_statusline.py +76 -0
  244. brnrd-0.1.0/tests/test_sync.py +406 -0
  245. brnrd-0.1.0/tests/test_telegram_gate.py +504 -0
  246. brnrd-0.1.0/tests/test_telegram_render_update.py +498 -0
  247. brnrd-0.1.0/tests/test_wake_request.py +114 -0
brnrd-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 brr
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,27 @@
1
+ # License overview
2
+
3
+ This repository is a monorepo whose sub-packages ship under different
4
+ licenses, aligned with the package boundaries below.
5
+
6
+ | Path | Component | License |
7
+ |------|-----------|---------|
8
+ | repo root `LICENSE` | the brnrd distribution's daemon core | MIT |
9
+ | `src/brr/` (`src/brr/LICENSE`) | daemon core | MIT |
10
+ | `src/brnrd/` (`src/brnrd/LICENSE`) | brnrd backend (`brnrd[backend]` extra) | AGPLv3 |
11
+ | `src/brnrd_web/` (`src/brnrd_web/LICENSE`) | dashboard | AGPLv3 |
12
+
13
+ What this means in practice:
14
+
15
+ - The wheel contains all three import packages; extras select their runtime
16
+ dependencies, not which licensed source files are present.
17
+ - `pip install brnrd` installs the dependencies needed by the MIT-licensed
18
+ daemon core.
19
+ - `pip install brnrd[backend]` additionally installs the dependencies needed
20
+ to run the AGPLv3-licensed backend and dashboard. Running a modified backend
21
+ as a network service triggers the AGPL's source-availability
22
+ obligation; the permissive daemon core is unaffected.
23
+
24
+ The split is intentional: the package boundaries make the
25
+ license boundary unambiguous, and the AGPL on the backend is the
26
+ competitive-defense posture that makes shipping it as open
27
+ source defensible against managed-service competitors.
@@ -0,0 +1 @@
1
+ prune src/frontend
brnrd-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,233 @@
1
+ Metadata-Version: 2.4
2
+ Name: brnrd
3
+ Version: 0.1.0
4
+ Summary: Structured guardrails for AI agent work, managed from a chat
5
+ Author: HugiMuni
6
+ License-Expression: MIT AND AGPL-3.0-only
7
+ Project-URL: Homepage, https://brnrd.dev
8
+ Project-URL: Repository, https://github.com/Gurio/brr
9
+ Project-URL: Issues, https://github.com/Gurio/brr/issues
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Environment :: Console
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ License-File: LICENSE-OVERVIEW.md
21
+ License-File: src/brr/LICENSE
22
+ License-File: src/brnrd/LICENSE
23
+ License-File: src/brnrd_web/LICENSE
24
+ Requires-Dist: requests<3,>=2.31
25
+ Provides-Extra: backend
26
+ Requires-Dist: fastapi>=0.110; extra == "backend"
27
+ Requires-Dist: uvicorn>=0.27; extra == "backend"
28
+ Requires-Dist: sqlalchemy>=2.0; extra == "backend"
29
+ Requires-Dist: httpx>=0.27; extra == "backend"
30
+ Requires-Dist: jinja2>=3.1; extra == "backend"
31
+ Requires-Dist: python-multipart>=0.0.9; extra == "backend"
32
+ Requires-Dist: PyJWT[crypto]<3,>=2.8; extra == "backend"
33
+ Provides-Extra: postgres
34
+ Requires-Dist: psycopg[binary]>=3.1; extra == "postgres"
35
+ Provides-Extra: dev
36
+ Requires-Dist: pytest>=7.0; extra == "dev"
37
+ Requires-Dist: brnrd[backend]; extra == "dev"
38
+ Dynamic: license-file
39
+
40
+ # brnrd
41
+
42
+ ![brnrd](https://github.com/Gurio/brr/raw/main/media/brr-logo.gif)
43
+
44
+ Structured AI agent playbook with persistent knowledge base and remote execution.
45
+
46
+ brnrd produces `AGENTS.md` — a playbook that encodes your project's conventions,
47
+ workflow, and guardrails. Any AI tool that reads it (Claude Code, Cursor, Codex,
48
+ Gemini) gets the same behavior. brnrd adds a remote execution layer: a daemon that
49
+ accepts tasks from Telegram, Slack, GitHub (issue labels and PR / issue
50
+ mentions), or anything that writes a file.
51
+
52
+ **Two layers of value:**
53
+
54
+ 1. **Playbook only** — `AGENTS.md` + `kb/` work with any AI tool, no brnrd needed.
55
+ Copy the conventions, use them everywhere.
56
+ 2. **Full tool** — the brnrd daemon handles remote execution, gate I/O, knowledge
57
+ persistence, and git push.
58
+
59
+ Execution stays local. The optional managed service relays remote events and
60
+ hosts the dashboard without moving agent work off your machine.
61
+
62
+ ## Install
63
+
64
+ ```bash
65
+ pip install brnrd
66
+ ```
67
+
68
+ Or run from a local checkout while developing or customizing brnrd itself:
69
+
70
+ ```bash
71
+ git clone https://github.com/Gurio/brr
72
+ /path/to/brr/brnrd init
73
+ ```
74
+
75
+ For an editable install:
76
+
77
+ ```bash
78
+ pip install -e /path/to/brr
79
+ ```
80
+
81
+ Forks work with normal Python packaging too:
82
+
83
+ ```bash
84
+ pip install git+https://github.com/Gurio/brr.git
85
+ ```
86
+
87
+ ## Quick start
88
+
89
+ ```bash
90
+ brnrd init # detect runner, create AGENTS.md + kb/
91
+ brnrd run "fix the failing tests" # run a task through the configured environment
92
+
93
+ brnrd bind . telegram # configure a repo-local remote input
94
+ brnrd up # start the daemon in the foreground
95
+ brnrd daemon install # install the native user service
96
+ ```
97
+
98
+ From Telegram (or Slack, or a task file):
99
+
100
+ ```
101
+ > fix the failing tests in auth/
102
+ > research caching strategies for the API layer
103
+ > review the latest PR for security issues
104
+ ```
105
+
106
+ ## What brnrd creates
107
+
108
+ `brnrd init` sets up:
109
+
110
+ - **`AGENTS.md`** — playbook with workflow, kb conventions, commit protocol,
111
+ artifact rules, guardrails, self-review instructions.
112
+ - **`kb/`** — persistent knowledge base committed to the repo. Compounds
113
+ across sessions.
114
+ - **`.brr/`** — runtime directory (gitignored): inbox, responses, config,
115
+ gate state.
116
+
117
+ ## Architecture
118
+
119
+ ```
120
+ AGENTS.md + kb/ universal: works with any AI tool
121
+
122
+ ├── Claude Code reads it
123
+ ├── Cursor reads it
124
+ ├── Codex reads it
125
+
126
+ └── brnrd adds remote execution:
127
+
128
+ ┌─────────┐ .brr/inbox/ ┌────────┐ runner ┌──────────┐
129
+ │ Gates │───────────────────│ Daemon │──────────────│ Runner │
130
+ │ tg/slack│ .brr/responses │ │ subprocess │ (AI CLI) │
131
+ │ gh/any │◄──────────────────│ │◄─────────────│ │
132
+ └─────────┘ └────────┘ git push └──────────┘
133
+ ```
134
+
135
+ Gates are transport adapters — they create event files and deliver responses.
136
+ The daemon scans the inbox and runs workers. The runner is whatever AI CLI
137
+ you have installed.
138
+
139
+ Telegram works with just a bot token. Once the daemon is running, send the
140
+ bot a message; brnrd records the chat ID from each message and replies there.
141
+
142
+ ## CLI
143
+
144
+ | Command | What it does |
145
+ |------------------------|---------------------------------------|
146
+ | `brnrd init [url]` | Create AGENTS.md + kb/, detect runner |
147
+ | `brnrd run "<task>"` | Run a task via the configured runner |
148
+ | `brnrd bind <repo> <gate>` | Bind a repo-local gate |
149
+ | `brnrd connect [url]` | Connect this daemon to brnrd service |
150
+ | `brnrd add <repo>` | Add a repo to the connected account home |
151
+ | `brnrd kb "<query>"` | Search home/repo knowledge |
152
+ | `brnrd up` | Start the daemon (foreground) |
153
+ | `brnrd down` | Stop the foreground daemon |
154
+ | `brnrd daemon up` | Start the installed daemon service, or foreground daemon if no service is installed |
155
+ | `brnrd daemon down` | Stop the installed daemon service, or foreground daemon if no service is installed |
156
+ | `brnrd daemon status` | Show service and foreground daemon status |
157
+ | `brnrd daemon install` | Install the native user service (systemd or LaunchAgent) |
158
+ | `brnrd daemon uninstall` | Remove the native user service |
159
+ | `brnrd daemon logs` | Tail native service logs |
160
+
161
+ Gates: `telegram`, `slack`, `github`.
162
+
163
+ On macOS, the first daemon run that opens network sockets can trigger
164
+ the system "accept incoming network connections" prompt. Allow it if
165
+ you want gates and managed brnrd traffic to reach the local daemon.
166
+
167
+ ## Extending
168
+
169
+ **Gates** follow a file protocol: write to `.brr/inbox/`, read from
170
+ `.brr/responses/`. Any language works. See `src/brr/gates/README.md`
171
+ for the spec and a bash example.
172
+
173
+ **Runners** are CLI commands on PATH: any process that can operate files
174
+ from a prompt, print the final reply to stdout, and stream progress to
175
+ stderr. Built-in profiles cover `claude`, `codex`, and `gemini`; manage
176
+ project-specific profiles in `.brr/runners.md`, set `runner=<name>` in
177
+ `.brr/config`, or use `runner_cmd` for one custom command.
178
+
179
+ **Environments** are daemon backends. Configure the user-facing policy
180
+ with `environment=<auto|host|worktree|docker>` in `.brr/config`.
181
+ `environment=auto` prefers configured Docker isolation, then falls back
182
+ to worktree behavior. The concrete built-ins today are `host`,
183
+ `worktree`, and `docker`; future backends such as `devcontainer`, `ssh`,
184
+ or service-specific plugins fit behind the same internal protocol.
185
+
186
+ Daemon git operations are publish-plan driven. Each task starts on a
187
+ fresh `brr/<task-id>` branch from a resolved seed ref. When the event
188
+ names a target branch (`branch_target`, `target_branch`, `base_branch`,
189
+ or legacy `branch`), brnrd seeds from `<remote>/<target>` and publishes
190
+ under that name after the run. Without a structured target the task
191
+ branch is preserved as-is and published for human routing when a remote
192
+ is configured.
193
+
194
+ Docker mode wires credentials automatically: brnrd forwards
195
+ `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `GEMINI_API_KEY` /
196
+ `GOOGLE_API_KEY` from the daemon's environment, and bind-mounts your
197
+ host's `~/.claude/`, `~/.codex/`, `~/.gemini/` (when present) into the
198
+ container so subscription auth works without extra config. See
199
+ `src/brr/docs/envs.md` for the full breakdown — image expectations, the
200
+ bundled runner image, and the durability contract.
201
+
202
+ Branching is mostly task-internal. brnrd uses branches/worktrees to stage
203
+ reviewable code changes or continue an explicitly named branch, but users
204
+ usually only choose the environment policy.
205
+
206
+ **Deep customization** should use a local checkout, editable install, or
207
+ fork. `.brr/config` is for lightweight runtime choices like runner and
208
+ environment policy.
209
+
210
+ ## Development
211
+
212
+ ```bash
213
+ git clone https://github.com/Gurio/brr
214
+ cd brr
215
+ pip install -e ".[dev]"
216
+ pytest
217
+ ```
218
+
219
+ For remote-assisted brnrd development, run the daemon from the editable
220
+ install with developer reload enabled:
221
+
222
+ ```bash
223
+ brnrd up --dev-reload
224
+ ```
225
+
226
+ The daemon re-execs itself between tasks when brnrd package files change.
227
+
228
+ ## License
229
+
230
+ The local daemon core in `src/brr/` is MIT licensed. The managed backend and
231
+ dashboard in `src/brnrd/` and `src/brnrd_web/` are AGPLv3 licensed. See
232
+ [`LICENSE-OVERVIEW.md`](https://github.com/Gurio/brr/blob/main/LICENSE-OVERVIEW.md) for the package boundary and
233
+ install details.
brnrd-0.1.0/README.md ADDED
@@ -0,0 +1,194 @@
1
+ # brnrd
2
+
3
+ ![brnrd](https://github.com/Gurio/brr/raw/main/media/brr-logo.gif)
4
+
5
+ Structured AI agent playbook with persistent knowledge base and remote execution.
6
+
7
+ brnrd produces `AGENTS.md` — a playbook that encodes your project's conventions,
8
+ workflow, and guardrails. Any AI tool that reads it (Claude Code, Cursor, Codex,
9
+ Gemini) gets the same behavior. brnrd adds a remote execution layer: a daemon that
10
+ accepts tasks from Telegram, Slack, GitHub (issue labels and PR / issue
11
+ mentions), or anything that writes a file.
12
+
13
+ **Two layers of value:**
14
+
15
+ 1. **Playbook only** — `AGENTS.md` + `kb/` work with any AI tool, no brnrd needed.
16
+ Copy the conventions, use them everywhere.
17
+ 2. **Full tool** — the brnrd daemon handles remote execution, gate I/O, knowledge
18
+ persistence, and git push.
19
+
20
+ Execution stays local. The optional managed service relays remote events and
21
+ hosts the dashboard without moving agent work off your machine.
22
+
23
+ ## Install
24
+
25
+ ```bash
26
+ pip install brnrd
27
+ ```
28
+
29
+ Or run from a local checkout while developing or customizing brnrd itself:
30
+
31
+ ```bash
32
+ git clone https://github.com/Gurio/brr
33
+ /path/to/brr/brnrd init
34
+ ```
35
+
36
+ For an editable install:
37
+
38
+ ```bash
39
+ pip install -e /path/to/brr
40
+ ```
41
+
42
+ Forks work with normal Python packaging too:
43
+
44
+ ```bash
45
+ pip install git+https://github.com/Gurio/brr.git
46
+ ```
47
+
48
+ ## Quick start
49
+
50
+ ```bash
51
+ brnrd init # detect runner, create AGENTS.md + kb/
52
+ brnrd run "fix the failing tests" # run a task through the configured environment
53
+
54
+ brnrd bind . telegram # configure a repo-local remote input
55
+ brnrd up # start the daemon in the foreground
56
+ brnrd daemon install # install the native user service
57
+ ```
58
+
59
+ From Telegram (or Slack, or a task file):
60
+
61
+ ```
62
+ > fix the failing tests in auth/
63
+ > research caching strategies for the API layer
64
+ > review the latest PR for security issues
65
+ ```
66
+
67
+ ## What brnrd creates
68
+
69
+ `brnrd init` sets up:
70
+
71
+ - **`AGENTS.md`** — playbook with workflow, kb conventions, commit protocol,
72
+ artifact rules, guardrails, self-review instructions.
73
+ - **`kb/`** — persistent knowledge base committed to the repo. Compounds
74
+ across sessions.
75
+ - **`.brr/`** — runtime directory (gitignored): inbox, responses, config,
76
+ gate state.
77
+
78
+ ## Architecture
79
+
80
+ ```
81
+ AGENTS.md + kb/ universal: works with any AI tool
82
+
83
+ ├── Claude Code reads it
84
+ ├── Cursor reads it
85
+ ├── Codex reads it
86
+
87
+ └── brnrd adds remote execution:
88
+
89
+ ┌─────────┐ .brr/inbox/ ┌────────┐ runner ┌──────────┐
90
+ │ Gates │───────────────────│ Daemon │──────────────│ Runner │
91
+ │ tg/slack│ .brr/responses │ │ subprocess │ (AI CLI) │
92
+ │ gh/any │◄──────────────────│ │◄─────────────│ │
93
+ └─────────┘ └────────┘ git push └──────────┘
94
+ ```
95
+
96
+ Gates are transport adapters — they create event files and deliver responses.
97
+ The daemon scans the inbox and runs workers. The runner is whatever AI CLI
98
+ you have installed.
99
+
100
+ Telegram works with just a bot token. Once the daemon is running, send the
101
+ bot a message; brnrd records the chat ID from each message and replies there.
102
+
103
+ ## CLI
104
+
105
+ | Command | What it does |
106
+ |------------------------|---------------------------------------|
107
+ | `brnrd init [url]` | Create AGENTS.md + kb/, detect runner |
108
+ | `brnrd run "<task>"` | Run a task via the configured runner |
109
+ | `brnrd bind <repo> <gate>` | Bind a repo-local gate |
110
+ | `brnrd connect [url]` | Connect this daemon to brnrd service |
111
+ | `brnrd add <repo>` | Add a repo to the connected account home |
112
+ | `brnrd kb "<query>"` | Search home/repo knowledge |
113
+ | `brnrd up` | Start the daemon (foreground) |
114
+ | `brnrd down` | Stop the foreground daemon |
115
+ | `brnrd daemon up` | Start the installed daemon service, or foreground daemon if no service is installed |
116
+ | `brnrd daemon down` | Stop the installed daemon service, or foreground daemon if no service is installed |
117
+ | `brnrd daemon status` | Show service and foreground daemon status |
118
+ | `brnrd daemon install` | Install the native user service (systemd or LaunchAgent) |
119
+ | `brnrd daemon uninstall` | Remove the native user service |
120
+ | `brnrd daemon logs` | Tail native service logs |
121
+
122
+ Gates: `telegram`, `slack`, `github`.
123
+
124
+ On macOS, the first daemon run that opens network sockets can trigger
125
+ the system "accept incoming network connections" prompt. Allow it if
126
+ you want gates and managed brnrd traffic to reach the local daemon.
127
+
128
+ ## Extending
129
+
130
+ **Gates** follow a file protocol: write to `.brr/inbox/`, read from
131
+ `.brr/responses/`. Any language works. See `src/brr/gates/README.md`
132
+ for the spec and a bash example.
133
+
134
+ **Runners** are CLI commands on PATH: any process that can operate files
135
+ from a prompt, print the final reply to stdout, and stream progress to
136
+ stderr. Built-in profiles cover `claude`, `codex`, and `gemini`; manage
137
+ project-specific profiles in `.brr/runners.md`, set `runner=<name>` in
138
+ `.brr/config`, or use `runner_cmd` for one custom command.
139
+
140
+ **Environments** are daemon backends. Configure the user-facing policy
141
+ with `environment=<auto|host|worktree|docker>` in `.brr/config`.
142
+ `environment=auto` prefers configured Docker isolation, then falls back
143
+ to worktree behavior. The concrete built-ins today are `host`,
144
+ `worktree`, and `docker`; future backends such as `devcontainer`, `ssh`,
145
+ or service-specific plugins fit behind the same internal protocol.
146
+
147
+ Daemon git operations are publish-plan driven. Each task starts on a
148
+ fresh `brr/<task-id>` branch from a resolved seed ref. When the event
149
+ names a target branch (`branch_target`, `target_branch`, `base_branch`,
150
+ or legacy `branch`), brnrd seeds from `<remote>/<target>` and publishes
151
+ under that name after the run. Without a structured target the task
152
+ branch is preserved as-is and published for human routing when a remote
153
+ is configured.
154
+
155
+ Docker mode wires credentials automatically: brnrd forwards
156
+ `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `GEMINI_API_KEY` /
157
+ `GOOGLE_API_KEY` from the daemon's environment, and bind-mounts your
158
+ host's `~/.claude/`, `~/.codex/`, `~/.gemini/` (when present) into the
159
+ container so subscription auth works without extra config. See
160
+ `src/brr/docs/envs.md` for the full breakdown — image expectations, the
161
+ bundled runner image, and the durability contract.
162
+
163
+ Branching is mostly task-internal. brnrd uses branches/worktrees to stage
164
+ reviewable code changes or continue an explicitly named branch, but users
165
+ usually only choose the environment policy.
166
+
167
+ **Deep customization** should use a local checkout, editable install, or
168
+ fork. `.brr/config` is for lightweight runtime choices like runner and
169
+ environment policy.
170
+
171
+ ## Development
172
+
173
+ ```bash
174
+ git clone https://github.com/Gurio/brr
175
+ cd brr
176
+ pip install -e ".[dev]"
177
+ pytest
178
+ ```
179
+
180
+ For remote-assisted brnrd development, run the daemon from the editable
181
+ install with developer reload enabled:
182
+
183
+ ```bash
184
+ brnrd up --dev-reload
185
+ ```
186
+
187
+ The daemon re-execs itself between tasks when brnrd package files change.
188
+
189
+ ## License
190
+
191
+ The local daemon core in `src/brr/` is MIT licensed. The managed backend and
192
+ dashboard in `src/brnrd/` and `src/brnrd_web/` are AGPLv3 licensed. See
193
+ [`LICENSE-OVERVIEW.md`](https://github.com/Gurio/brr/blob/main/LICENSE-OVERVIEW.md) for the package boundary and
194
+ install details.
@@ -0,0 +1,71 @@
1
+ [project]
2
+ name = "brnrd"
3
+ version = "0.1.0"
4
+ description = "Structured guardrails for AI agent work, managed from a chat"
5
+ authors = [ { name = "HugiMuni" } ]
6
+ readme = "README.md"
7
+ requires-python = ">=3.10"
8
+ dependencies = ["requests>=2.31,<3"]
9
+ license = "MIT AND AGPL-3.0-only"
10
+ license-files = [
11
+ "LICENSE",
12
+ "LICENSE-OVERVIEW.md",
13
+ "src/brr/LICENSE",
14
+ "src/brnrd/LICENSE",
15
+ "src/brnrd_web/LICENSE",
16
+ ]
17
+ classifiers = [
18
+ "Development Status :: 3 - Alpha",
19
+ "Environment :: Console",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ ]
26
+
27
+ [project.urls]
28
+ Homepage = "https://brnrd.dev"
29
+ Repository = "https://github.com/Gurio/brr"
30
+ Issues = "https://github.com/Gurio/brr/issues"
31
+
32
+ [build-system]
33
+ requires = ["setuptools>=77.0.3"]
34
+ build-backend = "setuptools.build_meta"
35
+
36
+ # Per-package license split (see LICENSE-OVERVIEW.md): the daemon
37
+ # core (`src/brr/`) is MIT; the brnrd backend (`src/brnrd/`,
38
+ # pulled by the `backend` extra) is AGPLv3.
39
+ [tool.setuptools.packages.find]
40
+ where = ["src"]
41
+ include = ["brr*", "brnrd*", "brnrd_web*"]
42
+
43
+ [tool.setuptools.package-data]
44
+ brr = ["AGENTS.md", "LICENSE", "Dockerfile", "prompts/*.md", "docs/*.md", "gates/README.md", "diffense/*.html", "data/*.json"]
45
+ brnrd = ["LICENSE"]
46
+ brnrd_web = ["LICENSE", "templates/*.html", "static/*.css"]
47
+
48
+ [project.optional-dependencies]
49
+ backend = [
50
+ "fastapi>=0.110",
51
+ "uvicorn>=0.27",
52
+ "sqlalchemy>=2.0",
53
+ "httpx>=0.27",
54
+ "jinja2>=3.1",
55
+ "python-multipart>=0.0.9",
56
+ "PyJWT[crypto]>=2.8,<3",
57
+ ]
58
+ # Postgres driver for deployment (Upsun/managed). psycopg3 ships
59
+ # manylinux wheels, so no native build step. SQLite (stdlib) covers
60
+ # local dev, so this stays out of the default `backend` set.
61
+ postgres = [
62
+ "psycopg[binary]>=3.1",
63
+ ]
64
+ dev = ["pytest>=7.0", "brnrd[backend]"]
65
+
66
+ [project.scripts]
67
+ brnrd = "brr.cli:main"
68
+
69
+ [tool.pytest.ini_options]
70
+ testpaths = ["tests"]
71
+ pythonpath = ["src"]
brnrd-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+