hive-am 0.0.0-stage → 1.0.0

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 (218) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/LICENSE +21 -0
  3. package/README.md +118 -2
  4. package/bin/hive-am.mjs +55 -0
  5. package/package.json +64 -4
  6. package/server/dist/api.js +689 -0
  7. package/server/dist/connections/fake.js +23 -0
  8. package/server/dist/connections/files.js +94 -0
  9. package/server/dist/connections/format.js +31 -0
  10. package/server/dist/connections/index.js +3 -0
  11. package/server/dist/connections/manager.js +114 -0
  12. package/server/dist/connections/outbound.js +55 -0
  13. package/server/dist/connections/prompt.js +14 -0
  14. package/server/dist/connections/public.js +23 -0
  15. package/server/dist/connections/router.js +224 -0
  16. package/server/dist/connections/rules.js +11 -0
  17. package/server/dist/connections/store.js +108 -0
  18. package/server/dist/connections/telegram.js +287 -0
  19. package/server/dist/connections/types.js +1 -0
  20. package/server/dist/connections/vision.js +37 -0
  21. package/server/dist/db.js +357 -0
  22. package/server/dist/git/ops.js +453 -0
  23. package/server/dist/git/repo.js +356 -0
  24. package/server/dist/git/switch.js +189 -0
  25. package/server/dist/history/claude.js +128 -0
  26. package/server/dist/history/index.js +19 -0
  27. package/server/dist/history/kiro.js +89 -0
  28. package/server/dist/history/opencode.js +78 -0
  29. package/server/dist/index.js +20 -0
  30. package/server/dist/instructions.js +102 -0
  31. package/server/dist/mcp-config.js +23 -0
  32. package/server/dist/models.js +38 -0
  33. package/server/dist/pricing.js +22 -0
  34. package/server/dist/providers/claude.js +98 -0
  35. package/server/dist/providers/index.js +6 -0
  36. package/server/dist/providers/kiro.js +86 -0
  37. package/server/dist/providers/opencode.js +88 -0
  38. package/server/dist/providers/preamble.js +13 -0
  39. package/server/dist/providers/spawn.js +46 -0
  40. package/server/dist/runtime.js +140 -0
  41. package/server/dist/seed.js +33 -0
  42. package/server/dist/skills/defaults.js +233 -0
  43. package/server/dist/skills/notebook.js +116 -0
  44. package/server/dist/stats.js +66 -0
  45. package/server/dist/types.js +1 -0
  46. package/server/mcp/dispatch.mjs +207 -0
  47. package/server/package.json +3 -0
  48. package/web/.next/BUILD_ID +1 -0
  49. package/web/.next/app-build-manifest.json +108 -0
  50. package/web/.next/app-path-routes-manifest.json +14 -0
  51. package/web/.next/build-manifest.json +33 -0
  52. package/web/.next/diagnostics/build-diagnostics.json +6 -0
  53. package/web/.next/diagnostics/framework.json +1 -0
  54. package/web/.next/export-marker.json +6 -0
  55. package/web/.next/images-manifest.json +58 -0
  56. package/web/.next/next-minimal-server.js.nft.json +1 -0
  57. package/web/.next/next-server.js.nft.json +1 -0
  58. package/web/.next/package.json +1 -0
  59. package/web/.next/prerender-manifest.json +292 -0
  60. package/web/.next/react-loadable-manifest.json +1 -0
  61. package/web/.next/required-server-files.json +329 -0
  62. package/web/.next/routes-manifest.json +122 -0
  63. package/web/.next/server/app/_not-found/page.js +2 -0
  64. package/web/.next/server/app/_not-found/page.js.nft.json +1 -0
  65. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  66. package/web/.next/server/app/_not-found.html +1 -0
  67. package/web/.next/server/app/_not-found.meta +16 -0
  68. package/web/.next/server/app/_not-found.rsc +20 -0
  69. package/web/.next/server/app/agents/[id]/page.js +4 -0
  70. package/web/.next/server/app/agents/[id]/page.js.nft.json +1 -0
  71. package/web/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -0
  72. package/web/.next/server/app/agents/page.js +2 -0
  73. package/web/.next/server/app/agents/page.js.nft.json +1 -0
  74. package/web/.next/server/app/agents/page_client-reference-manifest.js +1 -0
  75. package/web/.next/server/app/agents.html +1 -0
  76. package/web/.next/server/app/agents.meta +15 -0
  77. package/web/.next/server/app/agents.rsc +24 -0
  78. package/web/.next/server/app/apple-icon.png/route.js +1 -0
  79. package/web/.next/server/app/apple-icon.png/route.js.nft.json +1 -0
  80. package/web/.next/server/app/apple-icon.png.body +0 -0
  81. package/web/.next/server/app/apple-icon.png.meta +1 -0
  82. package/web/.next/server/app/connections/page.js +2 -0
  83. package/web/.next/server/app/connections/page.js.nft.json +1 -0
  84. package/web/.next/server/app/connections/page_client-reference-manifest.js +1 -0
  85. package/web/.next/server/app/connections.html +1 -0
  86. package/web/.next/server/app/connections.meta +15 -0
  87. package/web/.next/server/app/connections.rsc +24 -0
  88. package/web/.next/server/app/favicon.ico/route.js +1 -0
  89. package/web/.next/server/app/favicon.ico/route.js.nft.json +1 -0
  90. package/web/.next/server/app/favicon.ico.body +0 -0
  91. package/web/.next/server/app/favicon.ico.meta +1 -0
  92. package/web/.next/server/app/icon.png/route.js +1 -0
  93. package/web/.next/server/app/icon.png/route.js.nft.json +1 -0
  94. package/web/.next/server/app/icon.png.body +0 -0
  95. package/web/.next/server/app/icon.png.meta +1 -0
  96. package/web/.next/server/app/index.html +1 -0
  97. package/web/.next/server/app/index.meta +15 -0
  98. package/web/.next/server/app/index.rsc +24 -0
  99. package/web/.next/server/app/page.js +2 -0
  100. package/web/.next/server/app/page.js.nft.json +1 -0
  101. package/web/.next/server/app/page_client-reference-manifest.js +1 -0
  102. package/web/.next/server/app/relations/page.js +2 -0
  103. package/web/.next/server/app/relations/page.js.nft.json +1 -0
  104. package/web/.next/server/app/relations/page_client-reference-manifest.js +1 -0
  105. package/web/.next/server/app/relations.html +1 -0
  106. package/web/.next/server/app/relations.meta +15 -0
  107. package/web/.next/server/app/relations.rsc +25 -0
  108. package/web/.next/server/app/sessions/page.js +2 -0
  109. package/web/.next/server/app/sessions/page.js.nft.json +1 -0
  110. package/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -0
  111. package/web/.next/server/app/sessions.html +1 -0
  112. package/web/.next/server/app/sessions.meta +15 -0
  113. package/web/.next/server/app/sessions.rsc +24 -0
  114. package/web/.next/server/app/skills/page.js +2 -0
  115. package/web/.next/server/app/skills/page.js.nft.json +1 -0
  116. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -0
  117. package/web/.next/server/app/skills.html +1 -0
  118. package/web/.next/server/app/skills.meta +15 -0
  119. package/web/.next/server/app/skills.rsc +24 -0
  120. package/web/.next/server/app/types/page.js +2 -0
  121. package/web/.next/server/app/types/page.js.nft.json +1 -0
  122. package/web/.next/server/app/types/page_client-reference-manifest.js +1 -0
  123. package/web/.next/server/app/types.html +1 -0
  124. package/web/.next/server/app/types.meta +15 -0
  125. package/web/.next/server/app/types.rsc +24 -0
  126. package/web/.next/server/app-paths-manifest.json +14 -0
  127. package/web/.next/server/chunks/143.js +1 -0
  128. package/web/.next/server/chunks/149.js +11 -0
  129. package/web/.next/server/chunks/247.js +1 -0
  130. package/web/.next/server/chunks/335.js +1 -0
  131. package/web/.next/server/chunks/405.js +6 -0
  132. package/web/.next/server/chunks/593.js +1 -0
  133. package/web/.next/server/chunks/691.js +22 -0
  134. package/web/.next/server/chunks/851.js +1 -0
  135. package/web/.next/server/chunks/890.js +1 -0
  136. package/web/.next/server/chunks/896.js +1 -0
  137. package/web/.next/server/chunks/932.js +2 -0
  138. package/web/.next/server/functions-config-manifest.json +4 -0
  139. package/web/.next/server/interception-route-rewrite-manifest.js +1 -0
  140. package/web/.next/server/middleware-build-manifest.js +1 -0
  141. package/web/.next/server/middleware-manifest.json +6 -0
  142. package/web/.next/server/middleware-react-loadable-manifest.js +1 -0
  143. package/web/.next/server/next-font-manifest.js +1 -0
  144. package/web/.next/server/next-font-manifest.json +1 -0
  145. package/web/.next/server/pages/404.html +1 -0
  146. package/web/.next/server/pages/500.html +1 -0
  147. package/web/.next/server/pages/_app.js +1 -0
  148. package/web/.next/server/pages/_app.js.nft.json +1 -0
  149. package/web/.next/server/pages/_document.js +1 -0
  150. package/web/.next/server/pages/_document.js.nft.json +1 -0
  151. package/web/.next/server/pages/_error.js +19 -0
  152. package/web/.next/server/pages/_error.js.nft.json +1 -0
  153. package/web/.next/server/pages-manifest.json +6 -0
  154. package/web/.next/server/server-reference-manifest.js +1 -0
  155. package/web/.next/server/server-reference-manifest.json +1 -0
  156. package/web/.next/server/webpack-runtime.js +1 -0
  157. package/web/.next/static/84BpRSahg2BTwk3mX6AG8/_buildManifest.js +1 -0
  158. package/web/.next/static/84BpRSahg2BTwk3mX6AG8/_ssgManifest.js +1 -0
  159. package/web/.next/static/chunks/0937d497-44abb0f9355ace92.js +1 -0
  160. package/web/.next/static/chunks/2b9ff8ee-c3b61ac1e608c57d.js +1 -0
  161. package/web/.next/static/chunks/351-65da8c1a6e25f93b.js +1 -0
  162. package/web/.next/static/chunks/463-6ae35cdefdc59169.js +1 -0
  163. package/web/.next/static/chunks/493-92266798be872b8f.js +1 -0
  164. package/web/.next/static/chunks/517-eb26c72f6059aa26.js +1 -0
  165. package/web/.next/static/chunks/657.f1e03b7b65eba1d9.js +1 -0
  166. package/web/.next/static/chunks/687-3a4205f51be38602.js +1 -0
  167. package/web/.next/static/chunks/805-d946ebedb7e85f73.js +1 -0
  168. package/web/.next/static/chunks/837-fd7623601dc78ed8.js +1 -0
  169. package/web/.next/static/chunks/850-318f32484989dd59.js +1 -0
  170. package/web/.next/static/chunks/89-ace2e1aa63babfdf.js +1 -0
  171. package/web/.next/static/chunks/951-e250b541b67da7ce.js +1 -0
  172. package/web/.next/static/chunks/app/_not-found/page-bbd54d7b9a55d7ae.js +1 -0
  173. package/web/.next/static/chunks/app/agents/[id]/page-5eaf094fec246f1b.js +1 -0
  174. package/web/.next/static/chunks/app/agents/page-e9b17f1c3439ef98.js +1 -0
  175. package/web/.next/static/chunks/app/connections/page-c6afd90abd82d47a.js +1 -0
  176. package/web/.next/static/chunks/app/layout-c415d5a847cd94b3.js +1 -0
  177. package/web/.next/static/chunks/app/page-6fc87fc5a128a204.js +1 -0
  178. package/web/.next/static/chunks/app/relations/page-0355a93a8eb67989.js +1 -0
  179. package/web/.next/static/chunks/app/sessions/page-beae9a74a07d69e0.js +1 -0
  180. package/web/.next/static/chunks/app/skills/page-4f839ac913e26d32.js +1 -0
  181. package/web/.next/static/chunks/app/types/page-4f6b99af3232f861.js +1 -0
  182. package/web/.next/static/chunks/framework-0e68884e76d9a8d3.js +1 -0
  183. package/web/.next/static/chunks/main-app-d6f73ccd41f325c5.js +1 -0
  184. package/web/.next/static/chunks/main-cd22509db15764e2.js +1 -0
  185. package/web/.next/static/chunks/pages/_app-0f75d689c738a6fc.js +1 -0
  186. package/web/.next/static/chunks/pages/_error-d481f6d49fb4455d.js +1 -0
  187. package/web/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  188. package/web/.next/static/chunks/webpack-d40de72e52f65f79.js +1 -0
  189. package/web/.next/static/css/abe1a6216491f944.css +1 -0
  190. package/web/.next/static/css/c4a545148b5320ec.css +31 -0
  191. package/web/.next/static/media/0aa834ed78bf6d07-s.woff2 +0 -0
  192. package/web/.next/static/media/0fdd058fab82a774-s.woff2 +0 -0
  193. package/web/.next/static/media/2042050246a708c9-s.woff2 +0 -0
  194. package/web/.next/static/media/313510e2713fb214-s.p.woff2 +0 -0
  195. package/web/.next/static/media/33553e7595b74ccf-s.p.woff2 +0 -0
  196. package/web/.next/static/media/67957d42bae0796d-s.woff2 +0 -0
  197. package/web/.next/static/media/851c4691abdf3def-s.woff2 +0 -0
  198. package/web/.next/static/media/886030b0b59bc5a7-s.woff2 +0 -0
  199. package/web/.next/static/media/939c4f875ee75fbb-s.woff2 +0 -0
  200. package/web/.next/static/media/a6c19694cd327cd4-s.woff2 +0 -0
  201. package/web/.next/static/media/a8a8dd7277bab4cf-s.woff2 +0 -0
  202. package/web/.next/static/media/bb3ef058b751a6ad-s.p.woff2 +0 -0
  203. package/web/.next/static/media/f911b923c6adde36-s.woff2 +0 -0
  204. package/web/.next/trace +23 -0
  205. package/web/.next/types/app/agents/[id]/page.ts +84 -0
  206. package/web/.next/types/app/agents/page.ts +84 -0
  207. package/web/.next/types/app/connections/page.ts +84 -0
  208. package/web/.next/types/app/page.ts +84 -0
  209. package/web/.next/types/app/relations/page.ts +84 -0
  210. package/web/.next/types/app/sessions/page.ts +84 -0
  211. package/web/.next/types/app/skills/page.ts +84 -0
  212. package/web/.next/types/app/types/page.ts +84 -0
  213. package/web/.next/types/cache-life.d.ts +141 -0
  214. package/web/.next/types/package.json +1 -0
  215. package/web/.next/types/routes.d.ts +65 -0
  216. package/web/.next/types/validator.ts +124 -0
  217. package/web/next.config.mjs +10 -0
  218. package/web/public/logo.png +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,26 @@
1
+ # Changelog
2
+
3
+ All notable changes to hive-am are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project follows [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [1.0.0] - 2026-10-09
10
+
11
+ ### Added
12
+
13
+ - Agent manager over Claude Code, OpenCode and Kiro, resuming each CLI's native session.
14
+ - Orchestrators and subagents: explicit delegation, with a new subagent session for every task.
15
+ - Colonies with optional inheritance of folder, permissions, skills and context; honeycomb map, agent types and relations canvas.
16
+ - Skills loaded always or on demand (per assignment), with seven skills included.
17
+ - Agent notebook: its own memory, readable and editable from the interface.
18
+ - Telegram connection: private chats, groups and topics, per-thread silence, files and images in both directions and an optional image model.
19
+ - Three permission levels (read-only, edit files and full access) enforced by the CLI itself in all three providers.
20
+ - Git changes explorer: tree, diffs, history, commit, pull, push, branches, conflicts, stashes, blame and discarding changes.
21
+ - Interface in English and Spanish, with light and dark themes.
22
+ - Complete documentation in English and Spanish.
23
+ - npm package with the `hive-am` command.
24
+
25
+ [Unreleased]: https://github.com/hughcbscrt/hive-am/compare/v1.0.0...HEAD
26
+ [1.0.0]: https://github.com/hughcbscrt/hive-am/releases/tag/v1.0.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Hugo Hernández Valdez
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 all
13
+ 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 THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,119 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <img src="web/public/logo.png" alt="hive-am" width="180" />
3
+ </p>
2
4
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
5
+ <h1 align="center">hive-am</h1>
6
+
7
+ <p align="center">
8
+ <strong>A colony of coding agents on your machine.</strong><br />
9
+ Orchestrators and subagents over <b>Claude Code</b>, <b>OpenCode</b> and <b>Kiro</b>, with the real sessions of each CLI, a browser UI and Telegram.
10
+ </p>
11
+
12
+ <p align="center">
13
+ <a href="https://github.com/hughcbscrt/hive-am/commits/main"><img alt="Last commit" src="https://img.shields.io/github/last-commit/hughcbscrt/hive-am?style=flat-square&color=bf963d" /></a>
14
+ <a href="https://github.com/hughcbscrt/hive-am/pulls?q=is%3Apr"><img alt="Pull requests" src="https://img.shields.io/github/issues-pr-closed/hughcbscrt/hive-am?style=flat-square&color=bf963d" /></a>
15
+ <a href="https://github.com/hughcbscrt/hive-am/issues"><img alt="Issues" src="https://img.shields.io/github/issues/hughcbscrt/hive-am?style=flat-square&color=bf963d" /></a>
16
+ <a href="https://github.com/hughcbscrt/hive-am"><img alt="Repo size" src="https://img.shields.io/github/repo-size/hughcbscrt/hive-am?style=flat-square&color=bf963d" /></a>
17
+ <a href="https://github.com/hughcbscrt/hive-am"><img alt="Top language" src="https://img.shields.io/github/languages/top/hughcbscrt/hive-am?style=flat-square&color=3178c6" /></a>
18
+ <img alt="Node 20+" src="https://img.shields.io/badge/node-%E2%89%A520-339933?style=flat-square&logo=nodedotjs&logoColor=white" />
19
+ <img alt="Next.js 15" src="https://img.shields.io/badge/Next.js-15-000000?style=flat-square&logo=nextdotjs&logoColor=white" />
20
+ <img alt="SQLite" src="https://img.shields.io/badge/SQLite-local-003B57?style=flat-square&logo=sqlite&logoColor=white" />
21
+ </p>
22
+
23
+ ---
24
+
25
+ hive-am lets you create **orchestrators** and **subagents**, group them into **colonies**, give them **skills** and a **notebook**,
26
+ talk to them from the browser or from **Telegram**, and see everything they did, even after a blackout. It runs the CLIs you already
27
+ have installed; it does not replace them and it never copies your conversations into its own database.
28
+
29
+ ## Highlights
30
+
31
+ - **Three providers, one place.** Claude Code, OpenCode and Kiro agents side by side, each with its own model.
32
+ - **Real sessions.** An agent stores only a pointer (`provider`, `session_id`, `cwd`). The transcript lives in the CLI's own store and is read back from there. After a restart every agent resumes its real session.
33
+ - **Orchestration.** An orchestrator delegates to the workers connected to it on the Relations canvas. Every delegation runs in a fresh native session of the worker, and the rule is enforced on the server, not just requested.
34
+ - **Colonies.** Group agents on a honeycomb map and lend them defaults: working folder, permissions, skills and a shared prompt. Each agent can opt out per field.
35
+ - **Skills.** Seven general skills ship with hive-am (all ordinary: edit or delete them). Assign them to an agent, a type or a colony, and choose per assignment whether they are **always** in the instructions or loaded **on demand** with a `skill_read` tool. Searchable picker with token weights.
36
+ - **Notebook.** An agent can keep a persistent notebook of what it learns (no credentials, no duplicates, every note with its source). You can read and edit it from the agent's settings.
37
+ - **Telegram.** Link a bot to an agent: private chats, groups and topics, one shared session across all of them. In groups the agent can listen to everything and speak only when it adds something; people can mute it per thread and bring it back.
38
+ - **Files and images.** People send documents and photos to the agent; the agent sends files back. An optional image model can describe pictures for models that cannot see them.
39
+ - **Permissions that hold.** *Read-only*, *Edit files* and *Full access* are enforced by the CLI itself in all three providers.
40
+ - **Changes explorer.** A Git tab per agent: file tree with highlighting, diff viewer, history, commit, pull, push and branches.
41
+ - **Local and private.** The server binds to `127.0.0.1`. Data lives in `~/.hive-am/`.
42
+
43
+ ## Providers
44
+
45
+ | Provider | Run a turn | Transcript source |
46
+ |---|---|---|
47
+ | Claude Code | `claude -p --output-format stream-json --resume <id>` | `~/.claude/projects/*/<id>.jsonl` |
48
+ | OpenCode | `opencode run --format json -s <id>` | `~/.local/share/opencode/opencode.db` (`session_message`) |
49
+ | Kiro | `kiro-cli chat --no-interactive --output-format stream-json --resume-id <id>` | `~/.kiro/sessions/cli/<id>.jsonl` |
50
+
51
+ Plain CLI processes, one per turn, not ACP. Turns are serialized per agent.
52
+
53
+ ## Quick start
54
+
55
+ You need Node 20+ and at least one of the three CLIs installed and logged in.
56
+
57
+ ```bash
58
+ git clone git@github.com:hughcbscrt/hive-am.git
59
+ cd hive-am
60
+ npm install
61
+ npm run dev # server :4400 (API + WebSocket) and Next.js UI :4401
62
+ ```
63
+
64
+ Open <http://127.0.0.1:4401>, create an agent pointing at a folder, and send it a message.
65
+
66
+ Data lives in `~/.hive-am/hive-am.db` (override with `HIVE_AM_HOME`). The server only listens on `127.0.0.1`.
67
+
68
+ ## Permission levels
69
+
70
+ | Level | Claude Code | OpenCode | Kiro |
71
+ |---|---|---|---|
72
+ | **Read-only** | `--permission-mode plan` | edit, shell and subagents denied | no tool trusted |
73
+ | **Edit files** | `acceptEdits`, `.git` and keys protected | edits (`.env` included), no shell, only inside the agent's folder | same |
74
+ | **Full access** | `bypassPermissions` | no restrictions | `--trust-all-tools` |
75
+
76
+ In *Edit files* the agent cannot touch `.git` or private keys (`*.pem`, `*.key`) and cannot write outside its folder. Details and the
77
+ few differences between providers are in [docs/06](docs/reference/en/06-providers.md) and [docs/12](docs/reference/en/12-operations-and-troubleshooting.md).
78
+
79
+ ## Connections (Telegram)
80
+
81
+ 1. Create a bot with @BotFather and copy its token.
82
+ 2. In **Connections**, add a Telegram connection, pick the agent that answers, and list the people (and groups) allowed to talk to it.
83
+ 3. Optional: set the group mode (`mention` or `open`), an alias, whether files are accepted, and an image model.
84
+
85
+ The agent answers through a `channel_reply` tool: its plain text is never delivered. Only authorized people and groups reach it,
86
+ checked on the server. The bot token is stored in `~/.hive-am/hive-am.db` and never returned by the API; see the note about it in
87
+ [docs/14](docs/reference/en/14-external-connections.md).
88
+
89
+ ## How it is built
90
+
91
+ - `server/`: TypeScript. SQLite entities, provider runners, native history readers, the per-agent turn queue, REST and WebSocket.
92
+ - `src/instructions.ts`: what each agent is told (identity, skills, team, channels, notebook) and which hive tools it gets.
93
+ - `src/connections/`: external connections. One agent session shared by every chat, group or topic.
94
+ - `src/skills/`: the skills that ship with hive-am and the agent notebook.
95
+ - `mcp/dispatch.mjs`: the `hive` MCP server: `list_agents` and `dispatch` for orchestrators, `channel_*` for connections, `notebook_*` and `skill_read`.
96
+ - `web/`: Next.js 15 UI. Colony (honeycomb), Agents, the agent workspace (chat, changes, settings, notebook, sessions), Relations canvas, Types, Skills, Connections and Sessions.
97
+
98
+ ## Documentation
99
+
100
+ Full documentation in English and Spanish: **[English](docs/reference/en/README.md)** · **[Español](docs/reference/es/README.md)**.
101
+
102
+ | Topic | Where |
103
+ |---|---|
104
+ | Overview and architecture | [docs/01](docs/reference/en/01-overview.md) |
105
+ | Folder structure | [docs/02](docs/reference/en/02-project-structure.md) |
106
+ | Storage and database | [docs/04](docs/reference/en/04-storage.md) |
107
+ | Providers and permissions | [docs/06](docs/reference/en/06-providers.md) |
108
+ | Agents, types, skills and colonies | [docs/07](docs/reference/en/07-agents-types-skills-colonies.md) |
109
+ | Orchestration and relations | [docs/09](docs/reference/en/09-orchestration-and-relations.md) |
110
+ | Changes explorer (git) | [docs/13](docs/reference/en/13-changes-explorer-git.md) |
111
+ | External connections | [docs/14](docs/reference/en/14-external-connections.md) |
112
+ | Operation and troubleshooting | [docs/12](docs/reference/en/12-operations-and-troubleshooting.md) |
113
+
114
+ ## Known limits
115
+
116
+ - Claude fixes the system prompt when a session starts, so changed instructions reach a resumed session as an update inside the next message (OpenCode and Kiro get them the same way).
117
+ - A turn in flight during a crash is lost; the session is intact and the agent is idle on restart.
118
+ - Instructions are advice to the model; what the server enforces is who an agent can delegate to, who a connection answers, which files can be sent, and the permission level.
119
+ - There is no automated test suite. Features are checked with simulations against real agents (`server/scripts/sim-*.ts`).
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env node
2
+ // hive-am launcher: starts the API server and the web UI from the published package.
3
+ import { spawn } from 'node:child_process';
4
+ import { readFileSync } from 'node:fs';
5
+ import { createRequire } from 'node:module';
6
+ import { dirname, join } from 'node:path';
7
+ import { fileURLToPath } from 'node:url';
8
+
9
+ const root = join(dirname(fileURLToPath(import.meta.url)), '..');
10
+ const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));
11
+ const args = process.argv.slice(2);
12
+
13
+ const HELP = `hive-am ${pkg.version}
14
+ ${pkg.description}
15
+
16
+ Usage:
17
+ hive-am [start] start the server (API + WebSocket, port 4400) and the web UI (port 4401)
18
+ hive-am --version print the version
19
+ hive-am --help show this help
20
+
21
+ Environment:
22
+ HIVE_AM_HOME data folder (default ~/.hive-am)
23
+ HIVE_AM_WEB_PORT port of the web UI (default 4401)
24
+
25
+ The API server always uses port 4400: the packaged UI is built to talk to it.
26
+ Requires Node >= ${pkg.engines?.node?.replace('>=', '') ?? '20'} and at least one of the CLIs installed and logged in: claude, opencode, kiro-cli.`;
27
+
28
+ if (args.includes('--help') || args.includes('-h')) { console.log(HELP); process.exit(0); }
29
+ if (args.includes('--version') || args.includes('-v')) { console.log(pkg.version); process.exit(0); }
30
+ if (args.length && args[0] !== 'start') { console.error(`Unknown command: ${args[0]}\n\n${HELP}`); process.exit(1); }
31
+
32
+ if (process.env.HIVE_AM_PORT && process.env.HIVE_AM_PORT !== '4400') {
33
+ console.error('HIVE_AM_PORT is not supported by the packaged build: the UI is built to talk to the API on port 4400.');
34
+ process.exit(1);
35
+ }
36
+
37
+ const webPort = process.env.HIVE_AM_WEB_PORT ?? '4401';
38
+ const next = join(dirname(createRequire(import.meta.url).resolve('next/package.json')), 'dist', 'bin', 'next');
39
+
40
+ const children = [
41
+ spawn(process.execPath, [join(root, 'server', 'dist', 'index.js')], { cwd: join(root, 'server'), stdio: 'inherit' }),
42
+ spawn(process.execPath, [next, 'start', '-p', webPort, '-H', '127.0.0.1'], { cwd: join(root, 'web'), stdio: 'inherit' }),
43
+ ];
44
+
45
+ let closing = false;
46
+ const stop = (code = 0) => {
47
+ if (closing) return;
48
+ closing = true;
49
+ for (const c of children) c.kill('SIGTERM');
50
+ setTimeout(() => process.exit(code), 500).unref();
51
+ };
52
+ for (const c of children) c.on('exit', (code) => { if (!closing) { console.error('hive-am: a process exited, stopping.'); stop(code ?? 1); } });
53
+ process.on('SIGINT', () => stop(0));
54
+ process.on('SIGTERM', () => stop(0));
55
+ setTimeout(() => console.log(`\nhive-am is running → http://127.0.0.1:${webPort} (API on 127.0.0.1:4400)`), 2500).unref();
package/package.json CHANGED
@@ -1,6 +1,66 @@
1
1
  {
2
2
  "name": "hive-am",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "A colony of coding agents: orchestrators and subagents over Claude Code, OpenCode and Kiro, with real session resume, a browser UI and Telegram.",
5
+ "keywords": [
6
+ "ai-agents",
7
+ "coding-agents",
8
+ "agent-manager",
9
+ "orchestrator",
10
+ "subagents",
11
+ "claude-code",
12
+ "opencode",
13
+ "kiro",
14
+ "telegram",
15
+ "mcp",
16
+ "cli"
17
+ ],
18
+ "homepage": "https://github.com/hughcbscrt/hive-am#readme",
19
+ "bugs": {
20
+ "url": "https://github.com/hughcbscrt/hive-am/issues"
21
+ },
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/hughcbscrt/hive-am.git"
25
+ },
26
+ "license": "MIT",
27
+ "author": {
28
+ "name": "Hugo Hernández Valdez",
29
+ "url": "https://github.com/hughcbscrt"
30
+ },
31
+ "engines": {
32
+ "node": ">=20"
33
+ },
34
+ "os": [
35
+ "linux",
36
+ "darwin"
37
+ ],
38
+ "type": "module",
39
+ "bin": {
40
+ "hive-am": "bin/hive-am.mjs"
41
+ },
42
+ "files": [
43
+ "bin",
44
+ "server/dist",
45
+ "server/mcp",
46
+ "server/package.json",
47
+ "web/.next",
48
+ "web/public",
49
+ "web/next.config.mjs",
50
+ "README.md",
51
+ "LICENSE",
52
+ "CHANGELOG.md"
53
+ ],
54
+ "dependencies": {
55
+ "better-sqlite3": "^12.11.1",
56
+ "ws": "^8.21.3",
57
+ "@xyflow/react": "^12.3.0",
58
+ "highlight.js": "^11.12.0",
59
+ "lucide-react": "^0.468.0",
60
+ "next": "^15.1.0",
61
+ "react": "^19.0.0",
62
+ "react-dom": "^19.0.0",
63
+ "react-markdown": "^10.1.0",
64
+ "remark-gfm": "^4.0.1"
65
+ }
66
+ }