hive-am 1.1.0 → 1.2.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 (261) hide show
  1. package/CHANGELOG.md +83 -1
  2. package/README.md +9 -1
  3. package/package.json +13 -2
  4. package/server/dist/api.js +42 -762
  5. package/server/dist/connections/channel-skill.js +13 -1
  6. package/server/dist/connections/files.js +45 -1
  7. package/server/dist/connections/manager.js +41 -3
  8. package/server/dist/connections/outbound.js +2 -1
  9. package/server/dist/connections/prompt.js +4 -0
  10. package/server/dist/connections/router.js +3 -2
  11. package/server/dist/connections/store.js +4 -43
  12. package/server/dist/connections/telegram.js +43 -3
  13. package/server/dist/cron.js +2 -1
  14. package/server/dist/db/json.js +16 -0
  15. package/server/dist/db/migrations.js +199 -0
  16. package/server/dist/db.js +98 -196
  17. package/server/dist/errors.js +11 -0
  18. package/server/dist/git/browse.js +99 -0
  19. package/server/dist/git/ops.js +136 -19
  20. package/server/dist/git/repo.js +2 -1
  21. package/server/dist/history/claude.js +21 -21
  22. package/server/dist/history/index.js +17 -9
  23. package/server/dist/history/kiro.js +17 -12
  24. package/server/dist/history/lines.js +12 -0
  25. package/server/dist/history/opencode.js +18 -1
  26. package/server/dist/http/body.js +46 -0
  27. package/server/dist/http/errors.js +21 -0
  28. package/server/dist/http/guards.js +44 -0
  29. package/server/dist/http/router.js +24 -0
  30. package/server/dist/http/routes/agents.js +103 -0
  31. package/server/dist/http/routes/channel.js +16 -0
  32. package/server/dist/http/routes/colonies.js +9 -0
  33. package/server/dist/http/routes/connections.js +36 -0
  34. package/server/dist/http/routes/fs.js +22 -0
  35. package/server/dist/http/routes/git.js +90 -0
  36. package/server/dist/http/routes/meta.js +11 -0
  37. package/server/dist/http/routes/notebook.js +34 -0
  38. package/server/dist/http/routes/orchestration.js +32 -0
  39. package/server/dist/http/routes/resources.js +68 -0
  40. package/server/dist/http/routes/schedules.js +40 -0
  41. package/server/dist/http/routes/skills.js +47 -0
  42. package/server/dist/http/routes/terminals.js +18 -0
  43. package/server/dist/http/routes/types.js +36 -0
  44. package/server/dist/http/validate.js +65 -0
  45. package/server/dist/index.js +67 -5
  46. package/server/dist/instructions.js +8 -2
  47. package/server/dist/objects/agent.js +49 -0
  48. package/server/dist/objects/database.js +451 -0
  49. package/server/dist/objects/db-history.js +79 -0
  50. package/server/dist/objects/docker-info.js +75 -0
  51. package/server/dist/objects/docker.js +285 -0
  52. package/server/dist/objects/driver-props.js +196 -0
  53. package/server/dist/objects/exec.js +16 -0
  54. package/server/dist/objects/http-history.js +44 -0
  55. package/server/dist/objects/http-script.js +644 -0
  56. package/server/dist/objects/http.js +735 -0
  57. package/server/dist/objects/index.js +445 -0
  58. package/server/dist/objects/model.js +250 -0
  59. package/server/dist/objects/runner.js +211 -0
  60. package/server/dist/objects/stats.js +106 -0
  61. package/server/dist/objects/store.js +115 -0
  62. package/server/dist/objects/supervisor.js +111 -0
  63. package/server/dist/objects/templates.js +67 -0
  64. package/server/dist/providers/claude.js +3 -13
  65. package/server/dist/providers/index.js +7 -1
  66. package/server/dist/providers/kiro.js +2 -5
  67. package/server/dist/providers/opencode.js +2 -5
  68. package/server/dist/providers/preamble.js +2 -0
  69. package/server/dist/providers/spawn.js +31 -3
  70. package/server/dist/runtime.js +8 -6
  71. package/server/dist/schedules.js +2 -21
  72. package/server/dist/seed.js +15 -11
  73. package/server/dist/services/agents.js +90 -0
  74. package/server/dist/services/colonies.js +38 -0
  75. package/server/dist/services/connections.js +76 -0
  76. package/server/dist/services/notebook.js +22 -0
  77. package/server/dist/services/providers.js +27 -0
  78. package/server/dist/services/schedules.js +18 -0
  79. package/server/dist/sessions-summary.js +51 -0
  80. package/server/dist/skills/defaults.js +37 -0
  81. package/server/dist/skills/notebook.js +3 -8
  82. package/server/dist/terminals.js +177 -0
  83. package/server/dist/wake.js +13 -16
  84. package/server/dist/watch.js +2 -8
  85. package/server/mcp/dispatch.mjs +70 -1
  86. package/web/.next/BUILD_ID +1 -1
  87. package/web/.next/app-build-manifest.json +150 -98
  88. package/web/.next/app-path-routes-manifest.json +7 -5
  89. package/web/.next/build-manifest.json +14 -14
  90. package/web/.next/prerender-manifest.json +67 -43
  91. package/web/.next/react-loadable-manifest.json +26 -1
  92. package/web/.next/required-server-files.json +13 -1
  93. package/web/.next/routes-manifest.json +26 -0
  94. package/web/.next/server/app/_not-found/page.js +2 -2
  95. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  96. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  97. package/web/.next/server/app/_not-found.html +1 -1
  98. package/web/.next/server/app/_not-found.rsc +12 -11
  99. package/web/.next/server/app/agents/[id]/page.js +4 -4
  100. package/web/.next/server/app/agents/[id]/page.js.nft.json +1 -1
  101. package/web/.next/server/app/agents/[id]/page_client-reference-manifest.js +1 -1
  102. package/web/.next/server/app/agents/page.js +2 -2
  103. package/web/.next/server/app/agents/page.js.nft.json +1 -1
  104. package/web/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  105. package/web/.next/server/app/agents.html +1 -1
  106. package/web/.next/server/app/agents.rsc +14 -13
  107. package/web/.next/server/app/connections/page.js +2 -2
  108. package/web/.next/server/app/connections/page.js.nft.json +1 -1
  109. package/web/.next/server/app/connections/page_client-reference-manifest.js +1 -1
  110. package/web/.next/server/app/connections.html +1 -1
  111. package/web/.next/server/app/connections.rsc +14 -13
  112. package/web/.next/server/app/index.html +1 -1
  113. package/web/.next/server/app/index.rsc +14 -13
  114. package/web/.next/server/app/page.js +2 -2
  115. package/web/.next/server/app/page.js.nft.json +1 -1
  116. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  117. package/web/.next/server/app/relations/page.js +2 -2
  118. package/web/.next/server/app/relations/page.js.nft.json +1 -1
  119. package/web/.next/server/app/relations/page_client-reference-manifest.js +1 -1
  120. package/web/.next/server/app/relations.html +1 -1
  121. package/web/.next/server/app/relations.rsc +14 -13
  122. package/web/.next/server/app/resources/[id]/page.js +2 -0
  123. package/web/.next/server/app/resources/[id]/page.js.nft.json +1 -0
  124. package/web/.next/server/app/resources/[id]/page_client-reference-manifest.js +1 -0
  125. package/web/.next/server/app/resources/page.js +2 -0
  126. package/web/.next/server/app/resources/page.js.nft.json +1 -0
  127. package/web/.next/server/app/resources/page_client-reference-manifest.js +1 -0
  128. package/web/.next/server/app/resources.html +1 -0
  129. package/web/.next/server/app/resources.meta +15 -0
  130. package/web/.next/server/app/resources.rsc +25 -0
  131. package/web/.next/server/app/schedules/page.js +2 -2
  132. package/web/.next/server/app/schedules/page.js.nft.json +1 -1
  133. package/web/.next/server/app/schedules/page_client-reference-manifest.js +1 -1
  134. package/web/.next/server/app/schedules.html +1 -1
  135. package/web/.next/server/app/schedules.rsc +14 -13
  136. package/web/.next/server/app/sessions/page.js +2 -2
  137. package/web/.next/server/app/sessions/page.js.nft.json +1 -1
  138. package/web/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  139. package/web/.next/server/app/sessions.html +1 -1
  140. package/web/.next/server/app/sessions.rsc +14 -13
  141. package/web/.next/server/app/skills/page.js +2 -2
  142. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  143. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  144. package/web/.next/server/app/skills.html +1 -1
  145. package/web/.next/server/app/skills.rsc +14 -13
  146. package/web/.next/server/app/types/page.js +2 -2
  147. package/web/.next/server/app/types/page.js.nft.json +1 -1
  148. package/web/.next/server/app/types/page_client-reference-manifest.js +1 -1
  149. package/web/.next/server/app/types.html +1 -1
  150. package/web/.next/server/app/types.rsc +14 -13
  151. package/web/.next/server/app-paths-manifest.json +7 -5
  152. package/web/.next/server/chunks/143.js +1 -1
  153. package/web/.next/server/chunks/274.js +1 -0
  154. package/web/.next/server/chunks/306.js +1 -0
  155. package/web/.next/server/chunks/423.js +1 -0
  156. package/web/.next/server/chunks/505.js +6 -0
  157. package/web/.next/server/chunks/555.js +1 -0
  158. package/web/.next/server/chunks/612.js +1 -0
  159. package/web/.next/server/chunks/638.js +1 -0
  160. package/web/.next/server/chunks/692.js +18 -0
  161. package/web/.next/server/chunks/716.js +2 -0
  162. package/web/.next/server/chunks/790.js +11 -0
  163. package/web/.next/server/chunks/802.js +1 -0
  164. package/web/.next/server/chunks/890.js +1 -1
  165. package/web/.next/server/chunks/919.js +1 -0
  166. package/web/.next/server/chunks/950.js +6 -0
  167. package/web/.next/server/middleware-build-manifest.js +1 -1
  168. package/web/.next/server/middleware-react-loadable-manifest.js +1 -1
  169. package/web/.next/server/next-font-manifest.js +1 -1
  170. package/web/.next/server/next-font-manifest.json +1 -1
  171. package/web/.next/server/pages/404.html +1 -1
  172. package/web/.next/server/pages/500.html +1 -1
  173. package/web/.next/server/server-reference-manifest.json +1 -1
  174. package/web/.next/static/chunks/0937d497-114a2a3de515565e.js +1 -0
  175. package/web/.next/static/chunks/176-aeaf907a6ea5627d.js +1 -0
  176. package/web/.next/static/chunks/291-efae53ea5f7ee92d.js +1 -0
  177. package/web/.next/static/chunks/2b9ff8ee-969e65cc354b2150.js +1 -0
  178. package/web/.next/static/chunks/30-9adcbe92b15a6815.js +1 -0
  179. package/web/.next/static/chunks/316-26da9cc233ba7557.js +1 -0
  180. package/web/.next/static/chunks/350-56599dc3bf06066d.js +1 -0
  181. package/web/.next/static/chunks/486-13e08542f3a1cbac.js +1 -0
  182. package/web/.next/static/chunks/491-6b4e6201f5110dff.js +1 -0
  183. package/web/.next/static/chunks/517-ccaf8cc5c733cbd8.js +1 -0
  184. package/web/.next/static/chunks/545.bfbd92b7632c09de.js +1 -0
  185. package/web/.next/static/chunks/{805-d946ebedb7e85f73.js → 562-7c2e33d838e869bf.js} +1 -1
  186. package/web/.next/static/chunks/581-3ad5c4343dad3f50.js +1 -0
  187. package/web/.next/static/chunks/586-f7017d585a84738d.js +1 -0
  188. package/web/.next/static/chunks/657.b4c39e676c3e20dc.js +1 -0
  189. package/web/.next/static/chunks/701.6abcaf5e60463eef.js +6 -0
  190. package/web/.next/static/chunks/705-a16e1fe09be1ac7f.js +1 -0
  191. package/web/.next/static/chunks/706-fa2be0f10ffebe6a.js +1 -0
  192. package/web/.next/static/chunks/837-33c7480524f48577.js +1 -0
  193. package/web/.next/static/chunks/839-23c5508622fae942.js +1 -0
  194. package/web/.next/static/chunks/844-fe55292e0701f436.js +1 -0
  195. package/web/.next/static/chunks/89-b194fcffe5120c44.js +1 -0
  196. package/web/.next/static/chunks/97.594543c2196de524.js +1 -0
  197. package/web/.next/static/chunks/app/_not-found/page-238a7b80bda6b4ae.js +1 -0
  198. package/web/.next/static/chunks/app/agents/[id]/page-4af6c246c4ca7a97.js +1 -0
  199. package/web/.next/static/chunks/app/agents/page-f4c4c80f955f3967.js +1 -0
  200. package/web/.next/static/chunks/app/connections/page-0936beaf02d863c6.js +1 -0
  201. package/web/.next/static/chunks/app/layout-87ebb70bd9cb8443.js +1 -0
  202. package/web/.next/static/chunks/app/page-a7f292117b7d76bf.js +1 -0
  203. package/web/.next/static/chunks/app/relations/page-fba25393c8688714.js +1 -0
  204. package/web/.next/static/chunks/app/resources/[id]/page-d110d89bb8b5fca7.js +1 -0
  205. package/web/.next/static/chunks/app/resources/page-bbd0b450d3f3131d.js +1 -0
  206. package/web/.next/static/chunks/app/schedules/page-a1124397fc760413.js +1 -0
  207. package/web/.next/static/chunks/app/sessions/page-0e322811b0cde724.js +1 -0
  208. package/web/.next/static/chunks/app/skills/page-22ea0ef89d9f7a13.js +1 -0
  209. package/web/.next/static/chunks/app/types/page-18c4e1db2724d41d.js +1 -0
  210. package/web/.next/static/chunks/fcafe1ac.366e4950d3b0d4b7.js +18 -0
  211. package/web/.next/static/chunks/framework-bbac72adbbe2d328.js +1 -0
  212. package/web/.next/static/chunks/main-app-6086068e5fb5eacd.js +1 -0
  213. package/web/.next/static/chunks/main-c15f3fee674e0303.js +1 -0
  214. package/web/.next/static/chunks/pages/_app-d1670a2c6ce392fc.js +1 -0
  215. package/web/.next/static/chunks/pages/_error-95aac014d202fa7a.js +1 -0
  216. package/web/.next/static/chunks/webpack-ef515e41a83a16ac.js +1 -0
  217. package/web/.next/static/css/945795da867f5250.css +1 -0
  218. package/web/.next/static/css/dd4e32c285f75776.css +1 -0
  219. package/web/.next/static/p4S3i9kvO359GW91DQiHu/_buildManifest.js +1 -0
  220. package/web/.next/trace +29 -23
  221. package/web/.next/types/app/resources/[id]/page.ts +84 -0
  222. package/web/.next/types/app/resources/page.ts +84 -0
  223. package/web/.next/types/routes.d.ts +6 -2
  224. package/web/.next/types/validator.ts +18 -0
  225. package/web/next.config.mjs +4 -0
  226. package/web/.next/server/chunks/247.js +0 -1
  227. package/web/.next/server/chunks/484.js +0 -11
  228. package/web/.next/server/chunks/851.js +0 -1
  229. package/web/.next/server/chunks/932.js +0 -2
  230. package/web/.next/static/_z2hBOHhwiR5ytdI_8alh/_buildManifest.js +0 -1
  231. package/web/.next/static/chunks/0937d497-44abb0f9355ace92.js +0 -1
  232. package/web/.next/static/chunks/2b9ff8ee-c3b61ac1e608c57d.js +0 -1
  233. package/web/.next/static/chunks/463-6ae35cdefdc59169.js +0 -1
  234. package/web/.next/static/chunks/493-50d2adf9fd5ec680.js +0 -1
  235. package/web/.next/static/chunks/517-eb26c72f6059aa26.js +0 -1
  236. package/web/.next/static/chunks/589-8bf536f331de4269.js +0 -1
  237. package/web/.next/static/chunks/657.f1e03b7b65eba1d9.js +0 -1
  238. package/web/.next/static/chunks/687-3a4205f51be38602.js +0 -1
  239. package/web/.next/static/chunks/837-fd7623601dc78ed8.js +0 -1
  240. package/web/.next/static/chunks/850-318f32484989dd59.js +0 -1
  241. package/web/.next/static/chunks/89-ace2e1aa63babfdf.js +0 -1
  242. package/web/.next/static/chunks/951-e250b541b67da7ce.js +0 -1
  243. package/web/.next/static/chunks/app/_not-found/page-bbd54d7b9a55d7ae.js +0 -1
  244. package/web/.next/static/chunks/app/agents/[id]/page-a8b7a43d2c18483f.js +0 -1
  245. package/web/.next/static/chunks/app/agents/page-e9b17f1c3439ef98.js +0 -1
  246. package/web/.next/static/chunks/app/connections/page-477f36fcd5b13d78.js +0 -1
  247. package/web/.next/static/chunks/app/layout-a2d38e3de5911b1b.js +0 -1
  248. package/web/.next/static/chunks/app/page-6fc87fc5a128a204.js +0 -1
  249. package/web/.next/static/chunks/app/relations/page-0355a93a8eb67989.js +0 -1
  250. package/web/.next/static/chunks/app/schedules/page-39befd15b3b20586.js +0 -1
  251. package/web/.next/static/chunks/app/sessions/page-beae9a74a07d69e0.js +0 -1
  252. package/web/.next/static/chunks/app/skills/page-4f839ac913e26d32.js +0 -1
  253. package/web/.next/static/chunks/app/types/page-4f6b99af3232f861.js +0 -1
  254. package/web/.next/static/chunks/framework-0e68884e76d9a8d3.js +0 -1
  255. package/web/.next/static/chunks/main-app-d6f73ccd41f325c5.js +0 -1
  256. package/web/.next/static/chunks/main-cd22509db15764e2.js +0 -1
  257. package/web/.next/static/chunks/pages/_app-0f75d689c738a6fc.js +0 -1
  258. package/web/.next/static/chunks/pages/_error-d481f6d49fb4455d.js +0 -1
  259. package/web/.next/static/chunks/webpack-d40de72e52f65f79.js +0 -1
  260. package/web/.next/static/css/da22f0402b1c40ae.css +0 -1
  261. /package/web/.next/static/{_z2hBOHhwiR5ytdI_8alh → p4S3i9kvO359GW91DQiHu}/_ssgManifest.js +0 -0
@@ -8,24 +8,18 @@ import { liveOrigin, liveSource } from './runtime.js';
8
8
  import { adapterFor } from './connections/manager.js';
9
9
  import { connections, threadMessages, threads } from './connections/store.js';
10
10
  import { deliverTo } from './wake.js';
11
+ import { DomainError } from './errors.js';
11
12
  /**
12
13
  * "Tell me the moment it finishes." The agent starts a long command in the background itself (`nohup … > log 2>&1 &`) and asks hive-am to
13
14
  * watch its process: when it ends (or a marker file appears, or the waiting time runs out) the agent is woken in the same place where it
14
15
  * was asked, to read the result and report. hive-am only checks that a process is alive; it never runs anything. A job on another machine
15
16
  * works too when it is started through a local `ssh`, which lives as long as the remote command does.
16
17
  */
17
- export class WatchError extends Error {
18
+ export class WatchError extends DomainError {
18
19
  }
19
20
  const POLL_MS = Number(process.env.HIVE_AM_WATCH_POLL_MS) || 1500;
20
21
  const MS_PER_MINUTE = Number(process.env.HIVE_AM_WAKE_MS_PER_MINUTE) || 60_000;
21
22
  export const WATCH_DEFAULT_MINUTES = 120, WATCH_MAX_MINUTES = 240, WATCH_MAX_PENDING = 5;
22
- db.exec(`
23
- CREATE TABLE IF NOT EXISTS agent_watches (
24
- id TEXT PRIMARY KEY, agent_id TEXT NOT NULL REFERENCES agents(id) ON DELETE CASCADE,
25
- connection_id TEXT, thread_id TEXT REFERENCES threads(id) ON DELETE CASCADE,
26
- pid INTEGER NOT NULL, pid_stamp TEXT, file TEXT, log TEXT, note TEXT NOT NULL,
27
- started_at INTEGER NOT NULL, deadline INTEGER NOT NULL, req_id TEXT, req_name TEXT
28
- );`);
29
23
  const rows = {
30
24
  all: () => db.prepare('SELECT * FROM agent_watches ORDER BY started_at').all(),
31
25
  forAgent: (agentId) => db.prepare('SELECT * FROM agent_watches WHERE agent_id=?').all(agentId),
@@ -1,8 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  // Minimal MCP stdio server for hive-am agents. Tool groups come from HIVE_CAPS:
3
3
  // dispatch → list_agents, dispatch (orchestrators with a team)
4
- // channel → channel_reply, channel_send_file, channel_mute (agents linked to Telegram/Slack)
4
+ // channel → channel_reply, channel_send_file, channel_react, channel_mute (agents linked to Telegram/Slack)
5
5
  // wake → wake_me, wake_when_done, schedule_create, schedule_list, schedule_cancel (agents with the Wake-ups skill: to be woken later in the same place)
6
+ // objects → object_list, object_logs, object_action (agents with the Colony objects skill: the servers and containers of their colony)
6
7
  // It only talks to the hive-am HTTP API; all rules (assignments, queueing) live there.
7
8
  import { createInterface } from 'node:readline';
8
9
 
@@ -101,6 +102,17 @@ const allTools = [
101
102
  additionalProperties: false,
102
103
  },
103
104
  },
105
+ {
106
+ cap: 'channel',
107
+ name: 'channel_react',
108
+ description: 'React with ONE emoji to the message you are handling (a thumbs-up to say "got it", a heart to say thanks). It is lighter than a reply and counts as your answer when nothing else needs saying. Each platform allows only some emoji (on Telegram a fixed list: 👍 👎 ❤ 🔥 👏 🎉 🙏 👌 👀 💯 🤔 😁 😢 ✍ 🫡 …); an emoji that is not allowed is refused and the error lists the ones you can use. Follow the "Chat channels" skill for when to react.',
109
+ inputSchema: {
110
+ type: 'object',
111
+ properties: { emoji: { type: 'string', description: 'A single emoji, e.g. 👍.' } },
112
+ required: ['emoji'],
113
+ additionalProperties: false,
114
+ },
115
+ },
104
116
  {
105
117
  cap: 'channel',
106
118
  name: 'channel_mute',
@@ -112,6 +124,40 @@ const allTools = [
112
124
  additionalProperties: false,
113
125
  },
114
126
  },
127
+ {
128
+ cap: 'objects',
129
+ name: 'object_list',
130
+ description: 'List the objects of your colony (servers and Docker containers that hive-am keeps running): name, kind, state (running, starting, stopped, error, unknown) and the reason when there is one. Use the exact names in the other object tools.',
131
+ inputSchema: { type: 'object', properties: {}, additionalProperties: false },
132
+ },
133
+ {
134
+ cap: 'objects',
135
+ name: 'object_logs',
136
+ description: 'Read the latest output of an object of your colony (a server or a container). Read it before restarting something that fails. Logs can contain secrets: never repeat them in a chat.',
137
+ inputSchema: {
138
+ type: 'object',
139
+ properties: {
140
+ name: { type: 'string', description: 'The exact name of the object, as object_list shows it.' },
141
+ tail: { type: 'number', description: 'How many of the last lines to read (default 80, at most 500).' },
142
+ },
143
+ required: ['name'],
144
+ additionalProperties: false,
145
+ },
146
+ },
147
+ {
148
+ cap: 'objects',
149
+ name: 'object_action',
150
+ description: 'Start, stop or restart an object of your colony. Not available in read-only mode. It answers with the state it ended in: check it with object_list a moment later, since a server can take a while to come up. Starting, stopping and restarting interrupt whoever uses it: do not do it for something that runs fine unless you were asked.',
151
+ inputSchema: {
152
+ type: 'object',
153
+ properties: {
154
+ name: { type: 'string', description: 'The exact name of the object.' },
155
+ action: { type: 'string', enum: ['start', 'stop', 'restart'] },
156
+ },
157
+ required: ['name', 'action'],
158
+ additionalProperties: false,
159
+ },
160
+ },
115
161
  {
116
162
  cap: 'wake',
117
163
  name: 'wake_me',
@@ -229,6 +275,15 @@ async function call(name, args) {
229
275
  if (!r.ok) throw new Error(j.error ?? `channel_send_file failed (${r.status})`);
230
276
  return `Sent ${j.name} (${j.kind}).`;
231
277
  }
278
+ if (name === 'channel_react') {
279
+ const r = await fetch(`${API}/api/channel/react`, {
280
+ method: 'POST', headers: { 'content-type': 'application/json' },
281
+ body: JSON.stringify({ from: FROM, emoji: args.emoji }),
282
+ });
283
+ const j = await r.json();
284
+ if (!r.ok) throw new Error(j.error ?? `channel_react failed (${r.status})`);
285
+ return `Reacted with ${j.emoji}.`;
286
+ }
232
287
  if (name === 'channel_mute') {
233
288
  const r = await fetch(`${API}/api/channel/mute`, {
234
289
  method: 'POST', headers: { 'content-type': 'application/json' },
@@ -238,6 +293,20 @@ async function call(name, args) {
238
293
  if (!r.ok) throw new Error(j.error ?? `channel_mute failed (${r.status})`);
239
294
  return j.muted ? `Muted in this thread (${j.place}). You will only be woken when someone mentions you or replies to you.` : `Unmuted in this thread (${j.place}).`;
240
295
  }
296
+ if (name === 'object_list' || name === 'object_logs' || name === 'object_action') {
297
+ const r = await fetch(`${API}/api/agent-objects/${name.slice('object_'.length)}`, {
298
+ method: 'POST', headers: { 'content-type': 'application/json' },
299
+ body: JSON.stringify({ from: FROM, ...args }),
300
+ });
301
+ const j = await r.json();
302
+ if (!r.ok) throw new Error(j.error ?? `${name} failed (${r.status})`);
303
+ if (name === 'object_list') {
304
+ if (!j.objects.length) return 'Your colony has no objects.';
305
+ return j.objects.map((o) => `${o.name} · ${o.kind} · ${o.status}${o.detail ? ` (${o.detail})` : ''}`).join('\n');
306
+ }
307
+ if (name === 'object_logs') return j.text.trim() ? `Last lines of ${j.name}:\n${j.text}` : `${j.name} has not printed anything.`;
308
+ return `${j.name}: ${j.status}${j.detail ? ` (${j.detail})` : ''}. Check again with object_list in a moment.`;
309
+ }
241
310
  if (name === 'wake_me') {
242
311
  const r = await fetch(`${API}/api/wake`, {
243
312
  method: 'POST', headers: { 'content-type': 'application/json' },
@@ -1 +1 @@
1
- _z2hBOHhwiR5ytdI_8alh
1
+ p4S3i9kvO359GW91DQiHu
@@ -1,116 +1,168 @@
1
1
  {
2
2
  "pages": {
3
3
  "/_not-found/page": [
4
- "static/chunks/webpack-d40de72e52f65f79.js",
5
- "static/chunks/0937d497-44abb0f9355ace92.js",
6
- "static/chunks/89-ace2e1aa63babfdf.js",
7
- "static/chunks/main-app-d6f73ccd41f325c5.js",
8
- "static/chunks/app/_not-found/page-bbd54d7b9a55d7ae.js"
4
+ "static/chunks/webpack-ef515e41a83a16ac.js",
5
+ "static/chunks/0937d497-114a2a3de515565e.js",
6
+ "static/chunks/89-b194fcffe5120c44.js",
7
+ "static/chunks/main-app-6086068e5fb5eacd.js",
8
+ "static/chunks/app/_not-found/page-238a7b80bda6b4ae.js"
9
9
  ],
10
10
  "/layout": [
11
- "static/chunks/webpack-d40de72e52f65f79.js",
12
- "static/chunks/0937d497-44abb0f9355ace92.js",
13
- "static/chunks/89-ace2e1aa63babfdf.js",
14
- "static/chunks/main-app-d6f73ccd41f325c5.js",
15
- "static/css/da22f0402b1c40ae.css",
16
- "static/chunks/463-6ae35cdefdc59169.js",
17
- "static/chunks/493-50d2adf9fd5ec680.js",
18
- "static/chunks/app/layout-a2d38e3de5911b1b.js"
11
+ "static/chunks/webpack-ef515e41a83a16ac.js",
12
+ "static/chunks/0937d497-114a2a3de515565e.js",
13
+ "static/chunks/89-b194fcffe5120c44.js",
14
+ "static/chunks/main-app-6086068e5fb5eacd.js",
15
+ "static/css/945795da867f5250.css",
16
+ "static/css/dd4e32c285f75776.css",
17
+ "static/chunks/586-f7017d585a84738d.js",
18
+ "static/chunks/839-23c5508622fae942.js",
19
+ "static/chunks/app/layout-87ebb70bd9cb8443.js"
20
+ ],
21
+ "/agents/[id]/page": [
22
+ "static/chunks/webpack-ef515e41a83a16ac.js",
23
+ "static/chunks/0937d497-114a2a3de515565e.js",
24
+ "static/chunks/89-b194fcffe5120c44.js",
25
+ "static/chunks/main-app-6086068e5fb5eacd.js",
26
+ "static/chunks/586-f7017d585a84738d.js",
27
+ "static/chunks/706-fa2be0f10ffebe6a.js",
28
+ "static/chunks/837-33c7480524f48577.js",
29
+ "static/chunks/486-13e08542f3a1cbac.js",
30
+ "static/chunks/316-26da9cc233ba7557.js",
31
+ "static/chunks/839-23c5508622fae942.js",
32
+ "static/chunks/517-ccaf8cc5c733cbd8.js",
33
+ "static/chunks/350-56599dc3bf06066d.js",
34
+ "static/chunks/291-efae53ea5f7ee92d.js",
35
+ "static/chunks/30-9adcbe92b15a6815.js",
36
+ "static/chunks/705-a16e1fe09be1ac7f.js",
37
+ "static/chunks/app/agents/[id]/page-4af6c246c4ca7a97.js"
38
+ ],
39
+ "/relations/page": [
40
+ "static/chunks/webpack-ef515e41a83a16ac.js",
41
+ "static/chunks/0937d497-114a2a3de515565e.js",
42
+ "static/chunks/89-b194fcffe5120c44.js",
43
+ "static/chunks/main-app-6086068e5fb5eacd.js",
44
+ "static/css/c4a545148b5320ec.css",
45
+ "static/chunks/2b9ff8ee-969e65cc354b2150.js",
46
+ "static/chunks/586-f7017d585a84738d.js",
47
+ "static/chunks/562-7c2e33d838e869bf.js",
48
+ "static/chunks/839-23c5508622fae942.js",
49
+ "static/chunks/app/relations/page-fba25393c8688714.js"
50
+ ],
51
+ "/resources/[id]/page": [
52
+ "static/chunks/webpack-ef515e41a83a16ac.js",
53
+ "static/chunks/0937d497-114a2a3de515565e.js",
54
+ "static/chunks/89-b194fcffe5120c44.js",
55
+ "static/chunks/main-app-6086068e5fb5eacd.js",
56
+ "static/chunks/586-f7017d585a84738d.js",
57
+ "static/chunks/706-fa2be0f10ffebe6a.js",
58
+ "static/chunks/837-33c7480524f48577.js",
59
+ "static/chunks/486-13e08542f3a1cbac.js",
60
+ "static/chunks/581-3ad5c4343dad3f50.js",
61
+ "static/chunks/839-23c5508622fae942.js",
62
+ "static/chunks/517-ccaf8cc5c733cbd8.js",
63
+ "static/chunks/350-56599dc3bf06066d.js",
64
+ "static/chunks/291-efae53ea5f7ee92d.js",
65
+ "static/chunks/844-fe55292e0701f436.js",
66
+ "static/chunks/30-9adcbe92b15a6815.js",
67
+ "static/chunks/491-6b4e6201f5110dff.js",
68
+ "static/chunks/app/resources/[id]/page-d110d89bb8b5fca7.js"
19
69
  ],
20
70
  "/connections/page": [
21
- "static/chunks/webpack-d40de72e52f65f79.js",
22
- "static/chunks/0937d497-44abb0f9355ace92.js",
23
- "static/chunks/89-ace2e1aa63babfdf.js",
24
- "static/chunks/main-app-d6f73ccd41f325c5.js",
25
- "static/chunks/493-50d2adf9fd5ec680.js",
26
- "static/chunks/app/connections/page-477f36fcd5b13d78.js"
71
+ "static/chunks/webpack-ef515e41a83a16ac.js",
72
+ "static/chunks/0937d497-114a2a3de515565e.js",
73
+ "static/chunks/89-b194fcffe5120c44.js",
74
+ "static/chunks/main-app-6086068e5fb5eacd.js",
75
+ "static/chunks/586-f7017d585a84738d.js",
76
+ "static/chunks/839-23c5508622fae942.js",
77
+ "static/chunks/app/connections/page-0936beaf02d863c6.js"
27
78
  ],
28
- "/schedules/page": [
29
- "static/chunks/webpack-d40de72e52f65f79.js",
30
- "static/chunks/0937d497-44abb0f9355ace92.js",
31
- "static/chunks/89-ace2e1aa63babfdf.js",
32
- "static/chunks/main-app-d6f73ccd41f325c5.js",
33
- "static/chunks/493-50d2adf9fd5ec680.js",
34
- "static/chunks/app/schedules/page-39befd15b3b20586.js"
79
+ "/resources/page": [
80
+ "static/chunks/webpack-ef515e41a83a16ac.js",
81
+ "static/chunks/0937d497-114a2a3de515565e.js",
82
+ "static/chunks/89-b194fcffe5120c44.js",
83
+ "static/chunks/main-app-6086068e5fb5eacd.js",
84
+ "static/chunks/586-f7017d585a84738d.js",
85
+ "static/chunks/706-fa2be0f10ffebe6a.js",
86
+ "static/chunks/837-33c7480524f48577.js",
87
+ "static/chunks/486-13e08542f3a1cbac.js",
88
+ "static/chunks/581-3ad5c4343dad3f50.js",
89
+ "static/chunks/839-23c5508622fae942.js",
90
+ "static/chunks/517-ccaf8cc5c733cbd8.js",
91
+ "static/chunks/350-56599dc3bf06066d.js",
92
+ "static/chunks/291-efae53ea5f7ee92d.js",
93
+ "static/chunks/844-fe55292e0701f436.js",
94
+ "static/chunks/30-9adcbe92b15a6815.js",
95
+ "static/chunks/491-6b4e6201f5110dff.js",
96
+ "static/chunks/app/resources/page-bbd0b450d3f3131d.js"
35
97
  ],
36
98
  "/agents/page": [
37
- "static/chunks/webpack-d40de72e52f65f79.js",
38
- "static/chunks/0937d497-44abb0f9355ace92.js",
39
- "static/chunks/89-ace2e1aa63babfdf.js",
40
- "static/chunks/main-app-d6f73ccd41f325c5.js",
41
- "static/chunks/951-e250b541b67da7ce.js",
42
- "static/chunks/463-6ae35cdefdc59169.js",
43
- "static/chunks/493-50d2adf9fd5ec680.js",
44
- "static/chunks/517-eb26c72f6059aa26.js",
45
- "static/chunks/app/agents/page-e9b17f1c3439ef98.js"
99
+ "static/chunks/webpack-ef515e41a83a16ac.js",
100
+ "static/chunks/0937d497-114a2a3de515565e.js",
101
+ "static/chunks/89-b194fcffe5120c44.js",
102
+ "static/chunks/main-app-6086068e5fb5eacd.js",
103
+ "static/chunks/586-f7017d585a84738d.js",
104
+ "static/chunks/706-fa2be0f10ffebe6a.js",
105
+ "static/chunks/839-23c5508622fae942.js",
106
+ "static/chunks/517-ccaf8cc5c733cbd8.js",
107
+ "static/chunks/app/agents/page-f4c4c80f955f3967.js"
46
108
  ],
47
- "/sessions/page": [
48
- "static/chunks/webpack-d40de72e52f65f79.js",
49
- "static/chunks/0937d497-44abb0f9355ace92.js",
50
- "static/chunks/89-ace2e1aa63babfdf.js",
51
- "static/chunks/main-app-d6f73ccd41f325c5.js",
52
- "static/chunks/951-e250b541b67da7ce.js",
53
- "static/chunks/463-6ae35cdefdc59169.js",
54
- "static/chunks/493-50d2adf9fd5ec680.js",
55
- "static/chunks/app/sessions/page-beae9a74a07d69e0.js"
56
- ],
57
- "/types/page": [
58
- "static/chunks/webpack-d40de72e52f65f79.js",
59
- "static/chunks/0937d497-44abb0f9355ace92.js",
60
- "static/chunks/89-ace2e1aa63babfdf.js",
61
- "static/chunks/main-app-d6f73ccd41f325c5.js",
62
- "static/chunks/951-e250b541b67da7ce.js",
63
- "static/chunks/493-50d2adf9fd5ec680.js",
64
- "static/chunks/517-eb26c72f6059aa26.js",
65
- "static/chunks/app/types/page-4f6b99af3232f861.js"
109
+ "/page": [
110
+ "static/chunks/webpack-ef515e41a83a16ac.js",
111
+ "static/chunks/0937d497-114a2a3de515565e.js",
112
+ "static/chunks/89-b194fcffe5120c44.js",
113
+ "static/chunks/main-app-6086068e5fb5eacd.js",
114
+ "static/chunks/586-f7017d585a84738d.js",
115
+ "static/chunks/706-fa2be0f10ffebe6a.js",
116
+ "static/chunks/486-13e08542f3a1cbac.js",
117
+ "static/chunks/839-23c5508622fae942.js",
118
+ "static/chunks/517-ccaf8cc5c733cbd8.js",
119
+ "static/chunks/350-56599dc3bf06066d.js",
120
+ "static/chunks/291-efae53ea5f7ee92d.js",
121
+ "static/chunks/844-fe55292e0701f436.js",
122
+ "static/chunks/app/page-a7f292117b7d76bf.js"
66
123
  ],
67
- "/skills/page": [
68
- "static/chunks/webpack-d40de72e52f65f79.js",
69
- "static/chunks/0937d497-44abb0f9355ace92.js",
70
- "static/chunks/89-ace2e1aa63babfdf.js",
71
- "static/chunks/main-app-d6f73ccd41f325c5.js",
72
- "static/chunks/951-e250b541b67da7ce.js",
73
- "static/chunks/493-50d2adf9fd5ec680.js",
74
- "static/chunks/app/skills/page-4f839ac913e26d32.js"
124
+ "/schedules/page": [
125
+ "static/chunks/webpack-ef515e41a83a16ac.js",
126
+ "static/chunks/0937d497-114a2a3de515565e.js",
127
+ "static/chunks/89-b194fcffe5120c44.js",
128
+ "static/chunks/main-app-6086068e5fb5eacd.js",
129
+ "static/chunks/586-f7017d585a84738d.js",
130
+ "static/chunks/839-23c5508622fae942.js",
131
+ "static/chunks/app/schedules/page-a1124397fc760413.js"
75
132
  ],
76
- "/agents/[id]/page": [
77
- "static/chunks/webpack-d40de72e52f65f79.js",
78
- "static/chunks/0937d497-44abb0f9355ace92.js",
79
- "static/chunks/89-ace2e1aa63babfdf.js",
80
- "static/chunks/main-app-d6f73ccd41f325c5.js",
81
- "static/chunks/951-e250b541b67da7ce.js",
82
- "static/chunks/463-6ae35cdefdc59169.js",
83
- "static/chunks/837-fd7623601dc78ed8.js",
84
- "static/chunks/687-3a4205f51be38602.js",
85
- "static/chunks/589-8bf536f331de4269.js",
86
- "static/chunks/493-50d2adf9fd5ec680.js",
87
- "static/chunks/517-eb26c72f6059aa26.js",
88
- "static/chunks/850-318f32484989dd59.js",
89
- "static/chunks/app/agents/[id]/page-a8b7a43d2c18483f.js"
133
+ "/sessions/page": [
134
+ "static/chunks/webpack-ef515e41a83a16ac.js",
135
+ "static/chunks/0937d497-114a2a3de515565e.js",
136
+ "static/chunks/89-b194fcffe5120c44.js",
137
+ "static/chunks/main-app-6086068e5fb5eacd.js",
138
+ "static/chunks/586-f7017d585a84738d.js",
139
+ "static/chunks/706-fa2be0f10ffebe6a.js",
140
+ "static/chunks/176-aeaf907a6ea5627d.js",
141
+ "static/chunks/839-23c5508622fae942.js",
142
+ "static/chunks/350-56599dc3bf06066d.js",
143
+ "static/chunks/705-a16e1fe09be1ac7f.js",
144
+ "static/chunks/app/sessions/page-0e322811b0cde724.js"
90
145
  ],
91
- "/page": [
92
- "static/chunks/webpack-d40de72e52f65f79.js",
93
- "static/chunks/0937d497-44abb0f9355ace92.js",
94
- "static/chunks/89-ace2e1aa63babfdf.js",
95
- "static/chunks/main-app-d6f73ccd41f325c5.js",
96
- "static/chunks/951-e250b541b67da7ce.js",
97
- "static/chunks/463-6ae35cdefdc59169.js",
98
- "static/chunks/687-3a4205f51be38602.js",
99
- "static/chunks/493-50d2adf9fd5ec680.js",
100
- "static/chunks/517-eb26c72f6059aa26.js",
101
- "static/chunks/850-318f32484989dd59.js",
102
- "static/chunks/app/page-6fc87fc5a128a204.js"
146
+ "/skills/page": [
147
+ "static/chunks/webpack-ef515e41a83a16ac.js",
148
+ "static/chunks/0937d497-114a2a3de515565e.js",
149
+ "static/chunks/89-b194fcffe5120c44.js",
150
+ "static/chunks/main-app-6086068e5fb5eacd.js",
151
+ "static/chunks/586-f7017d585a84738d.js",
152
+ "static/chunks/706-fa2be0f10ffebe6a.js",
153
+ "static/chunks/839-23c5508622fae942.js",
154
+ "static/chunks/app/skills/page-22ea0ef89d9f7a13.js"
103
155
  ],
104
- "/relations/page": [
105
- "static/chunks/webpack-d40de72e52f65f79.js",
106
- "static/chunks/0937d497-44abb0f9355ace92.js",
107
- "static/chunks/89-ace2e1aa63babfdf.js",
108
- "static/chunks/main-app-d6f73ccd41f325c5.js",
109
- "static/css/c4a545148b5320ec.css",
110
- "static/chunks/2b9ff8ee-c3b61ac1e608c57d.js",
111
- "static/chunks/805-d946ebedb7e85f73.js",
112
- "static/chunks/493-50d2adf9fd5ec680.js",
113
- "static/chunks/app/relations/page-0355a93a8eb67989.js"
156
+ "/types/page": [
157
+ "static/chunks/webpack-ef515e41a83a16ac.js",
158
+ "static/chunks/0937d497-114a2a3de515565e.js",
159
+ "static/chunks/89-b194fcffe5120c44.js",
160
+ "static/chunks/main-app-6086068e5fb5eacd.js",
161
+ "static/chunks/586-f7017d585a84738d.js",
162
+ "static/chunks/706-fa2be0f10ffebe6a.js",
163
+ "static/chunks/839-23c5508622fae942.js",
164
+ "static/chunks/517-ccaf8cc5c733cbd8.js",
165
+ "static/chunks/app/types/page-18c4e1db2724d41d.js"
114
166
  ]
115
167
  }
116
168
  }
@@ -3,13 +3,15 @@
3
3
  "/favicon.ico/route": "/favicon.ico",
4
4
  "/apple-icon.png/route": "/apple-icon.png",
5
5
  "/icon.png/route": "/icon.png",
6
+ "/agents/[id]/page": "/agents/[id]",
7
+ "/relations/page": "/relations",
8
+ "/resources/[id]/page": "/resources/[id]",
6
9
  "/connections/page": "/connections",
7
- "/schedules/page": "/schedules",
10
+ "/resources/page": "/resources",
8
11
  "/agents/page": "/agents",
12
+ "/page": "/",
13
+ "/schedules/page": "/schedules",
9
14
  "/sessions/page": "/sessions",
10
- "/types/page": "/types",
11
15
  "/skills/page": "/skills",
12
- "/agents/[id]/page": "/agents/[id]",
13
- "/page": "/",
14
- "/relations/page": "/relations"
16
+ "/types/page": "/types"
15
17
  }
@@ -5,28 +5,28 @@
5
5
  "devFiles": [],
6
6
  "ampDevFiles": [],
7
7
  "lowPriorityFiles": [
8
- "static/_z2hBOHhwiR5ytdI_8alh/_buildManifest.js",
9
- "static/_z2hBOHhwiR5ytdI_8alh/_ssgManifest.js"
8
+ "static/p4S3i9kvO359GW91DQiHu/_buildManifest.js",
9
+ "static/p4S3i9kvO359GW91DQiHu/_ssgManifest.js"
10
10
  ],
11
11
  "rootMainFiles": [
12
- "static/chunks/webpack-d40de72e52f65f79.js",
13
- "static/chunks/0937d497-44abb0f9355ace92.js",
14
- "static/chunks/89-ace2e1aa63babfdf.js",
15
- "static/chunks/main-app-d6f73ccd41f325c5.js"
12
+ "static/chunks/webpack-ef515e41a83a16ac.js",
13
+ "static/chunks/0937d497-114a2a3de515565e.js",
14
+ "static/chunks/89-b194fcffe5120c44.js",
15
+ "static/chunks/main-app-6086068e5fb5eacd.js"
16
16
  ],
17
17
  "rootMainFilesTree": {},
18
18
  "pages": {
19
19
  "/_app": [
20
- "static/chunks/webpack-d40de72e52f65f79.js",
21
- "static/chunks/framework-0e68884e76d9a8d3.js",
22
- "static/chunks/main-cd22509db15764e2.js",
23
- "static/chunks/pages/_app-0f75d689c738a6fc.js"
20
+ "static/chunks/webpack-ef515e41a83a16ac.js",
21
+ "static/chunks/framework-bbac72adbbe2d328.js",
22
+ "static/chunks/main-c15f3fee674e0303.js",
23
+ "static/chunks/pages/_app-d1670a2c6ce392fc.js"
24
24
  ],
25
25
  "/_error": [
26
- "static/chunks/webpack-d40de72e52f65f79.js",
27
- "static/chunks/framework-0e68884e76d9a8d3.js",
28
- "static/chunks/main-cd22509db15764e2.js",
29
- "static/chunks/pages/_error-d481f6d49fb4455d.js"
26
+ "static/chunks/webpack-ef515e41a83a16ac.js",
27
+ "static/chunks/framework-bbac72adbbe2d328.js",
28
+ "static/chunks/main-c15f3fee674e0303.js",
29
+ "static/chunks/pages/_error-95aac014d202fa7a.js"
30
30
  ]
31
31
  },
32
32
  "ampFirstPages": []