@idleware/ringi 0.5.0 → 0.6.1

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 (378) hide show
  1. package/package.json +1 -1
  2. package/target/dts/adapters/fs/index.d.ts +2 -0
  3. package/target/dts/adapters/fs/lock.d.ts +1 -0
  4. package/target/dts/adapters/fs/write.d.ts +5 -0
  5. package/target/dts/adapters/host-posix/group-state.d.ts +7 -0
  6. package/target/dts/adapters/host-posix/groups.d.ts +1 -0
  7. package/target/dts/adapters/host-posix/index.d.ts +2 -0
  8. package/target/dts/adapters/host-posix/launch.d.ts +7 -0
  9. package/target/dts/adapters/host-posix/probes.d.ts +5 -0
  10. package/target/dts/adapters/host-posix/stats.d.ts +9 -0
  11. package/target/dts/adapters/keys-file/index.d.ts +2 -0
  12. package/target/dts/adapters/state-fs/index.d.ts +5 -0
  13. package/target/dts/adapters/tool-claude/index.d.ts +2 -0
  14. package/target/dts/adapters/tool-codex/index.d.ts +2 -0
  15. package/target/dts/adapters/tool-cursor/index.d.ts +2 -0
  16. package/target/dts/adapters/tool-traces/index.d.ts +3 -0
  17. package/target/dts/adapters/transport-git/branches.d.ts +43 -0
  18. package/target/dts/adapters/transport-git/files.d.ts +2 -0
  19. package/target/dts/adapters/transport-git/index.d.ts +32 -0
  20. package/target/dts/adapters/transport-git/marks.d.ts +20 -0
  21. package/target/dts/adapters/transport-git/remote/admit.d.ts +7 -0
  22. package/target/dts/adapters/transport-git/remote/alarms.d.ts +3 -0
  23. package/target/dts/adapters/transport-git/remote/bootstrap.d.ts +7 -0
  24. package/target/dts/adapters/transport-git/remote/branch-commit.d.ts +3 -0
  25. package/target/dts/adapters/transport-git/remote/branch-control.d.ts +15 -0
  26. package/target/dts/adapters/transport-git/remote/branch-scan.d.ts +2 -0
  27. package/target/dts/adapters/transport-git/remote/branch.d.ts +5 -0
  28. package/target/dts/adapters/transport-git/remote/cache.d.ts +3 -0
  29. package/target/dts/adapters/transport-git/remote/commits.d.ts +2 -0
  30. package/target/dts/adapters/transport-git/remote/forget.d.ts +2 -0
  31. package/target/dts/adapters/transport-git/remote/git.d.ts +26 -0
  32. package/target/dts/adapters/transport-git/remote/heartbeat-facts.d.ts +1 -0
  33. package/target/dts/adapters/transport-git/remote/heartbeat-name.d.ts +6 -0
  34. package/target/dts/adapters/transport-git/remote/heartbeat-object.d.ts +10 -0
  35. package/target/dts/adapters/transport-git/remote/heartbeat-push.d.ts +2 -0
  36. package/target/dts/adapters/transport-git/remote/heartbeat.d.ts +7 -0
  37. package/target/dts/adapters/transport-git/remote/keys.d.ts +13 -0
  38. package/target/dts/adapters/transport-git/remote/main.d.ts +11 -0
  39. package/target/dts/adapters/transport-git/remote/process.d.ts +20 -0
  40. package/target/dts/adapters/transport-git/remote/push-retry.d.ts +2 -0
  41. package/target/dts/adapters/transport-git/remote/push-validate.d.ts +2 -0
  42. package/target/dts/adapters/transport-git/remote/push.d.ts +16 -0
  43. package/target/dts/adapters/transport-git/remote/roster.d.ts +7 -0
  44. package/target/dts/adapters/transport-git/remote/signals.d.ts +15 -0
  45. package/target/dts/adapters/transport-git/remote/signature.d.ts +5 -0
  46. package/target/dts/adapters/transport-git/remote/sync-heartbeat.d.ts +2 -0
  47. package/target/dts/adapters/transport-git/remote/sync-rooms.d.ts +6 -0
  48. package/target/dts/adapters/transport-git/remote/sync-tags.d.ts +8 -0
  49. package/target/dts/adapters/transport-git/remote/sync.d.ts +2 -0
  50. package/target/dts/adapters/transport-git/remote/types.d.ts +64 -0
  51. package/target/dts/adapters/transport-git/remote.d.ts +17 -0
  52. package/target/dts/adapters/transport-git/repo.d.ts +31 -0
  53. package/target/dts/adapters/transport-git/run.d.ts +21 -0
  54. package/target/dts/adapters/transport-git/signing.d.ts +4 -0
  55. package/target/dts/adapters/transport-git/tags.d.ts +15 -0
  56. package/target/dts/adapters/transport-git/transport.d.ts +7 -0
  57. package/target/dts/adapters/transport-kafka/index.d.ts +2 -0
  58. package/target/dts/adapters/transport-temporal/index.d.ts +2 -0
  59. package/target/dts/cli.d.ts +2 -1
  60. package/target/dts/{cli/agent.d.ts → clients/cli/agent/index.d.ts} +3 -3
  61. package/target/dts/{cli → clients/cli/agent}/session.d.ts +2 -2
  62. package/target/dts/clients/cli/arg-parse.d.ts +2 -0
  63. package/target/dts/{cli → clients/cli}/args.d.ts +2 -2
  64. package/target/dts/clients/cli/commands.d.ts +2 -0
  65. package/target/dts/clients/cli/context.d.ts +4 -0
  66. package/target/dts/{cli/index.d.ts → clients/cli/help.d.ts} +1 -3
  67. package/target/dts/clients/cli/index.d.ts +4 -0
  68. package/target/dts/clients/cli/operator/heartbeat-format.d.ts +5 -0
  69. package/target/dts/clients/cli/operator/heartbeat.d.ts +3 -0
  70. package/target/dts/clients/cli/operator/hub-commands.d.ts +6 -0
  71. package/target/dts/clients/cli/operator/hub.d.ts +2 -0
  72. package/target/dts/clients/cli/operator/index.d.ts +5 -0
  73. package/target/dts/clients/cli/operator/room-lifecycle.d.ts +5 -0
  74. package/target/dts/clients/cli/operator/room-list.d.ts +5 -0
  75. package/target/dts/clients/cli/operator/room-members.d.ts +4 -0
  76. package/target/dts/clients/cli/operator/room.d.ts +2 -0
  77. package/target/dts/clients/cli/operator/sessions.d.ts +5 -0
  78. package/target/dts/clients/cli/operator/watch.d.ts +2 -0
  79. package/target/dts/clients/cli/operator/where-format.d.ts +7 -0
  80. package/target/dts/clients/cli/operator/where.d.ts +2 -0
  81. package/target/dts/clients/cli/shared/budget.d.ts +7 -0
  82. package/target/dts/clients/cli/shared/files.d.ts +4 -0
  83. package/target/dts/clients/cli/shared/index.d.ts +7 -0
  84. package/target/dts/clients/cli/shared/messages.d.ts +7 -0
  85. package/target/dts/clients/cli/shared/profile.d.ts +4 -0
  86. package/target/dts/clients/cli/shared/session.d.ts +6 -0
  87. package/target/dts/clients/cli/shared/signals.d.ts +3 -0
  88. package/target/dts/clients/cli/shared/work.d.ts +6 -0
  89. package/target/dts/clients/cli/skill/index.d.ts +3 -0
  90. package/target/dts/{cli/skill.d.ts → clients/cli/skill/targets.d.ts} +1 -2
  91. package/target/dts/composition/index.d.ts +2 -0
  92. package/target/dts/{heartbeat → core/agents/heartbeat}/index.d.ts +2 -4
  93. package/target/dts/{app/heartbeat.d.ts → core/agents/heartbeat/pulse.d.ts} +5 -6
  94. package/target/dts/core/agents/heartbeat/singleton.d.ts +3 -0
  95. package/target/dts/core/agents/heartbeat/tools.d.ts +6 -0
  96. package/target/dts/{app → core/agents}/overview.d.ts +12 -6
  97. package/target/dts/core/agents/ports/host.d.ts +47 -0
  98. package/target/dts/core/agents/ports/index.d.ts +9 -0
  99. package/target/dts/core/agents/ports/tools.d.ts +18 -0
  100. package/target/dts/core/agents/sessions/agent.d.ts +70 -0
  101. package/target/dts/core/agents/sessions/binding.d.ts +9 -0
  102. package/target/dts/core/agents/sessions/context.d.ts +8 -0
  103. package/target/dts/{runtime/session.d.ts → core/agents/sessions/index.d.ts} +2 -9
  104. package/target/dts/core/agents/sessions/join.d.ts +20 -0
  105. package/target/dts/core/agents/sessions/resume.d.ts +2 -0
  106. package/target/dts/core/agents/sessions/session.d.ts +46 -0
  107. package/target/dts/core/agents/sessions/wait.d.ts +38 -0
  108. package/target/dts/core/agents/turns/budgets.d.ts +5 -0
  109. package/target/dts/core/agents/turns/dispatch.d.ts +9 -0
  110. package/target/dts/core/agents/turns/exhaustion.d.ts +11 -0
  111. package/target/dts/core/agents/turns/grants.d.ts +4 -0
  112. package/target/dts/core/agents/turns/index.d.ts +4 -0
  113. package/target/dts/core/agents/turns/limits.d.ts +2 -0
  114. package/target/dts/core/agents/turns/messages.d.ts +10 -0
  115. package/target/dts/core/agents/turns/pings.d.ts +5 -0
  116. package/target/dts/core/agents/turns/plan.d.ts +3 -0
  117. package/target/dts/core/agents/turns/poll.d.ts +8 -0
  118. package/target/dts/core/agents/turns/results.d.ts +3 -0
  119. package/target/dts/core/agents/turns/seat.d.ts +2 -0
  120. package/target/dts/core/agents/turns/types.d.ts +59 -0
  121. package/target/dts/core/hub/decisions/budget.d.ts +15 -0
  122. package/target/dts/core/hub/decisions/check.d.ts +6 -0
  123. package/target/dts/core/hub/decisions/index.d.ts +5 -0
  124. package/target/dts/core/hub/decisions/proposal.d.ts +38 -0
  125. package/target/dts/core/hub/decisions/usage.d.ts +12 -0
  126. package/target/dts/{runtime/reader.d.ts → core/hub/history/index.d.ts} +12 -6
  127. package/target/dts/core/hub/ports/index.d.ts +16 -0
  128. package/target/dts/core/hub/ports/state.d.ts +12 -0
  129. package/target/dts/{store/index.d.ts → core/hub/ports/store.d.ts} +48 -18
  130. package/target/dts/core/hub/protocol/index.d.ts +5 -0
  131. package/target/dts/{protocol/index.d.ts → core/hub/protocol/model.d.ts} +0 -25
  132. package/target/dts/core/hub/protocol/order.d.ts +2 -0
  133. package/target/dts/core/hub/protocol/reading.d.ts +8 -0
  134. package/target/dts/core/hub/protocol/text.d.ts +11 -0
  135. package/target/dts/core/hub/protocol/threads.d.ts +5 -0
  136. package/target/dts/core/hub/rooms/compat.d.ts +5 -0
  137. package/target/dts/core/hub/rooms/hubs.d.ts +14 -0
  138. package/target/dts/core/hub/rooms/index.d.ts +53 -0
  139. package/target/dts/core/hub/rooms/messages.d.ts +8 -0
  140. package/target/dts/core/hub/rooms/rooms.d.ts +10 -0
  141. package/target/dts/core/hub/signals/check.d.ts +3 -0
  142. package/target/dts/core/hub/signals/effective.d.ts +3 -0
  143. package/target/dts/core/hub/signals/index.d.ts +5 -0
  144. package/target/dts/core/hub/signals/marks.d.ts +4 -0
  145. package/target/dts/core/hub/signals/model.d.ts +28 -0
  146. package/target/dts/core/hub/signals/pins.d.ts +5 -0
  147. package/target/dts/{hub/signals.d.ts → core/hub/signals/write.d.ts} +1 -1
  148. package/target/dts/core/hub/usecases/actor.d.ts +6 -0
  149. package/target/dts/{app → core/hub/usecases}/budget.d.ts +5 -18
  150. package/target/dts/core/hub/usecases/config.d.ts +6 -0
  151. package/target/dts/{app → core/hub/usecases}/context.d.ts +3 -8
  152. package/target/dts/{app → core/hub/usecases}/hubs.d.ts +1 -1
  153. package/target/dts/core/hub/usecases/propose.d.ts +17 -0
  154. package/target/dts/{app → core/hub/usecases}/room.d.ts +8 -34
  155. package/target/dts/{app → core/hub/usecases}/rooms.d.ts +2 -6
  156. package/target/dts/core/hub/usecases/roster.d.ts +5 -0
  157. package/target/dts/core/hub/usecases/send.d.ts +21 -0
  158. package/target/dts/core/hub/usecases/staging.d.ts +8 -0
  159. package/target/dts/{app → core/hub/usecases}/view.d.ts +4 -4
  160. package/target/dts/{domain/profiles.d.ts → core/hub/work/index.d.ts} +3 -7
  161. package/target/dts/core/hub/work/parse.d.ts +2 -0
  162. package/target/dts/core/hub/work/task.d.ts +6 -0
  163. package/target/dts/core/signing/index.d.ts +35 -0
  164. package/target/dts/index.d.ts +8 -8
  165. package/target/dts/lib/fail.d.ts +8 -0
  166. package/target/dts/lib/index.d.ts +3 -11
  167. package/target/dts/lib/json.d.ts +1 -0
  168. package/target/esm/adapters/fs/index.js +5 -0
  169. package/target/esm/adapters/fs/lock.js +83 -0
  170. package/target/esm/adapters/fs/write.js +25 -0
  171. package/target/esm/adapters/host-posix/group-state.js +24 -0
  172. package/target/esm/adapters/host-posix/groups.js +43 -0
  173. package/target/esm/adapters/host-posix/index.js +35 -0
  174. package/target/esm/adapters/host-posix/launch.js +80 -0
  175. package/target/esm/adapters/host-posix/probes.js +66 -0
  176. package/target/esm/adapters/host-posix/stats.js +27 -0
  177. package/target/esm/adapters/keys-file/index.js +68 -0
  178. package/target/esm/adapters/state-fs/index.js +79 -0
  179. package/target/esm/adapters/tool-claude/index.js +32 -0
  180. package/target/esm/adapters/tool-codex/index.js +38 -0
  181. package/target/esm/adapters/tool-cursor/index.js +8 -0
  182. package/target/esm/adapters/tool-traces/index.js +18 -0
  183. package/target/esm/adapters/transport-git/branches.js +155 -0
  184. package/target/esm/adapters/transport-git/files.js +48 -0
  185. package/target/esm/adapters/transport-git/index.js +128 -0
  186. package/target/esm/adapters/transport-git/marks.js +88 -0
  187. package/target/esm/adapters/transport-git/remote/admit.js +71 -0
  188. package/target/esm/adapters/transport-git/remote/alarms.js +30 -0
  189. package/target/esm/adapters/transport-git/remote/bootstrap.js +47 -0
  190. package/target/esm/adapters/transport-git/remote/branch-commit.js +36 -0
  191. package/target/esm/adapters/transport-git/remote/branch-control.js +37 -0
  192. package/target/esm/adapters/transport-git/remote/branch-scan.js +28 -0
  193. package/target/esm/adapters/transport-git/remote/branch.js +37 -0
  194. package/target/esm/adapters/transport-git/remote/cache.js +23 -0
  195. package/target/esm/adapters/transport-git/remote/commits.js +25 -0
  196. package/target/esm/adapters/transport-git/remote/forget.js +35 -0
  197. package/target/esm/adapters/transport-git/remote/git.js +58 -0
  198. package/target/esm/adapters/transport-git/remote/heartbeat-facts.js +35 -0
  199. package/target/esm/adapters/transport-git/remote/heartbeat-name.js +19 -0
  200. package/target/esm/adapters/transport-git/remote/heartbeat-object.js +40 -0
  201. package/target/esm/adapters/transport-git/remote/heartbeat-push.js +44 -0
  202. package/target/esm/adapters/transport-git/remote/heartbeat.js +44 -0
  203. package/target/esm/adapters/transport-git/remote/keys.js +75 -0
  204. package/target/esm/adapters/transport-git/remote/main.js +41 -0
  205. package/target/esm/adapters/transport-git/remote/process.js +37 -0
  206. package/target/esm/adapters/transport-git/remote/push-retry.js +46 -0
  207. package/target/esm/adapters/transport-git/remote/push-validate.js +39 -0
  208. package/target/esm/adapters/transport-git/remote/push.js +62 -0
  209. package/target/esm/adapters/transport-git/remote/roster.js +48 -0
  210. package/target/esm/adapters/transport-git/remote/signals.js +63 -0
  211. package/target/esm/adapters/transport-git/remote/signature.js +56 -0
  212. package/target/esm/adapters/transport-git/remote/sync-heartbeat.js +26 -0
  213. package/target/esm/adapters/transport-git/remote/sync-rooms.js +38 -0
  214. package/target/esm/adapters/transport-git/remote/sync-tags.js +48 -0
  215. package/target/esm/adapters/transport-git/remote/sync.js +38 -0
  216. package/target/esm/adapters/transport-git/remote/types.js +10 -0
  217. package/target/esm/adapters/transport-git/remote.js +17 -0
  218. package/target/esm/adapters/transport-git/repo.js +115 -0
  219. package/target/esm/adapters/transport-git/run.js +57 -0
  220. package/target/esm/adapters/transport-git/signing.js +44 -0
  221. package/target/esm/adapters/transport-git/tags.js +21 -0
  222. package/target/esm/adapters/transport-git/transport.js +29 -0
  223. package/target/esm/adapters/transport-kafka/index.js +4 -0
  224. package/target/esm/adapters/transport-temporal/index.js +4 -0
  225. package/target/esm/cli.js +5 -4
  226. package/target/esm/{cli/agent.js → clients/cli/agent/index.js} +8 -7
  227. package/target/esm/{cli → clients/cli/agent}/session.js +7 -7
  228. package/target/esm/clients/cli/arg-parse.js +41 -0
  229. package/target/esm/{cli → clients/cli}/args.js +3 -36
  230. package/target/esm/clients/cli/commands.js +45 -0
  231. package/target/esm/clients/cli/context.js +6 -0
  232. package/target/esm/{cli/index.js → clients/cli/help.js} +4 -77
  233. package/target/esm/clients/cli/index.js +27 -0
  234. package/target/esm/clients/cli/operator/heartbeat-format.js +8 -0
  235. package/target/esm/clients/cli/operator/heartbeat.js +35 -0
  236. package/target/esm/clients/cli/operator/hub-commands.js +37 -0
  237. package/target/esm/clients/cli/operator/hub.js +10 -0
  238. package/target/esm/clients/cli/operator/index.js +8 -0
  239. package/target/esm/clients/cli/operator/room-lifecycle.js +23 -0
  240. package/target/esm/clients/cli/operator/room-list.js +27 -0
  241. package/target/esm/clients/cli/operator/room-members.js +15 -0
  242. package/target/esm/clients/cli/operator/room.js +15 -0
  243. package/target/esm/clients/cli/operator/sessions.js +32 -0
  244. package/target/esm/clients/cli/operator/watch.js +15 -0
  245. package/target/esm/clients/cli/operator/where-format.js +24 -0
  246. package/target/esm/clients/cli/operator/where.js +32 -0
  247. package/target/esm/clients/cli/shared/budget.js +50 -0
  248. package/target/esm/clients/cli/shared/files.js +26 -0
  249. package/target/esm/clients/cli/shared/index.js +10 -0
  250. package/target/esm/clients/cli/shared/messages.js +41 -0
  251. package/target/esm/clients/cli/shared/profile.js +17 -0
  252. package/target/esm/clients/cli/shared/session.js +8 -0
  253. package/target/esm/clients/cli/shared/signals.js +21 -0
  254. package/target/esm/clients/cli/shared/work.js +26 -0
  255. package/target/esm/clients/cli/skill/index.js +40 -0
  256. package/target/esm/clients/cli/skill/targets.js +20 -0
  257. package/target/esm/composition/index.js +34 -0
  258. package/target/esm/{heartbeat → core/agents/heartbeat}/index.js +14 -12
  259. package/target/esm/{app/heartbeat.js → core/agents/heartbeat/pulse.js} +31 -55
  260. package/target/esm/core/agents/heartbeat/singleton.js +38 -0
  261. package/target/esm/core/agents/heartbeat/tools.js +24 -0
  262. package/target/esm/{app → core/agents}/overview.js +15 -9
  263. package/target/esm/core/agents/ports/host.js +4 -0
  264. package/target/esm/core/agents/ports/index.js +7 -0
  265. package/target/esm/core/agents/ports/tools.js +5 -0
  266. package/target/esm/{app → core/agents/sessions}/agent.js +11 -43
  267. package/target/esm/core/agents/sessions/binding.js +43 -0
  268. package/target/esm/core/agents/sessions/context.js +11 -0
  269. package/target/esm/core/agents/sessions/index.js +59 -0
  270. package/target/esm/core/agents/sessions/join.js +55 -0
  271. package/target/esm/core/agents/sessions/resume.js +54 -0
  272. package/target/esm/core/agents/sessions/session.js +28 -0
  273. package/target/esm/core/agents/sessions/wait.js +47 -0
  274. package/target/esm/core/agents/turns/budgets.js +48 -0
  275. package/target/esm/core/agents/turns/dispatch.js +40 -0
  276. package/target/esm/core/agents/turns/exhaustion.js +16 -0
  277. package/target/esm/core/agents/turns/grants.js +36 -0
  278. package/target/esm/core/agents/turns/index.js +33 -0
  279. package/target/esm/core/agents/turns/limits.js +11 -0
  280. package/target/esm/core/agents/turns/messages.js +32 -0
  281. package/target/esm/core/agents/turns/pings.js +30 -0
  282. package/target/esm/core/agents/turns/plan.js +29 -0
  283. package/target/esm/core/agents/turns/poll.js +48 -0
  284. package/target/esm/core/agents/turns/results.js +40 -0
  285. package/target/esm/core/agents/turns/seat.js +44 -0
  286. package/target/esm/core/agents/turns/types.js +3 -0
  287. package/target/esm/{domain/index.js → core/hub/capabilities.js} +3 -3
  288. package/target/esm/core/hub/decisions/budget.js +40 -0
  289. package/target/esm/core/hub/decisions/check.js +43 -0
  290. package/target/esm/core/hub/decisions/index.js +10 -0
  291. package/target/esm/core/hub/decisions/proposal.js +73 -0
  292. package/target/esm/core/hub/decisions/usage.js +39 -0
  293. package/target/esm/core/hub/history/index.js +90 -0
  294. package/target/esm/core/hub/ports/index.js +10 -0
  295. package/target/esm/core/hub/ports/state.js +5 -0
  296. package/target/esm/core/hub/ports/store.js +10 -0
  297. package/target/esm/{protocol → core/hub/protocol}/files.js +4 -2
  298. package/target/esm/core/hub/protocol/index.js +9 -0
  299. package/target/esm/core/hub/protocol/model.js +15 -0
  300. package/target/esm/core/hub/protocol/order.js +39 -0
  301. package/target/esm/core/hub/protocol/reading.js +29 -0
  302. package/target/esm/core/hub/protocol/text.js +95 -0
  303. package/target/esm/core/hub/protocol/threads.js +52 -0
  304. package/target/esm/core/hub/rooms/compat.js +51 -0
  305. package/target/esm/core/hub/rooms/hubs.js +92 -0
  306. package/target/esm/core/hub/rooms/index.js +23 -0
  307. package/target/esm/core/hub/rooms/messages.js +47 -0
  308. package/target/esm/core/hub/rooms/rooms.js +84 -0
  309. package/target/esm/core/hub/signals/check.js +33 -0
  310. package/target/esm/core/hub/signals/effective.js +31 -0
  311. package/target/esm/core/hub/signals/index.js +23 -0
  312. package/target/esm/core/hub/signals/marks.js +30 -0
  313. package/target/esm/core/hub/signals/model.js +5 -0
  314. package/target/esm/core/hub/signals/pins.js +21 -0
  315. package/target/esm/{hub/signals.js → core/hub/signals/write.js} +4 -4
  316. package/target/esm/core/hub/usecases/actor.js +3 -0
  317. package/target/esm/core/hub/usecases/budget.js +78 -0
  318. package/target/esm/core/hub/usecases/config.js +5 -0
  319. package/target/esm/core/hub/usecases/context.js +13 -0
  320. package/target/esm/core/hub/usecases/hubs.js +95 -0
  321. package/target/esm/core/hub/usecases/propose.js +39 -0
  322. package/target/esm/core/hub/usecases/room.js +82 -0
  323. package/target/esm/{app → core/hub/usecases}/rooms.js +11 -63
  324. package/target/esm/core/hub/usecases/roster.js +47 -0
  325. package/target/esm/core/hub/usecases/send.js +78 -0
  326. package/target/esm/core/hub/usecases/staging.js +60 -0
  327. package/target/esm/{app → core/hub/usecases}/view.js +33 -33
  328. package/target/esm/core/hub/work/index.js +13 -0
  329. package/target/esm/core/hub/work/parse.js +37 -0
  330. package/target/esm/core/hub/work/task.js +68 -0
  331. package/target/esm/core/signing/index.js +4 -0
  332. package/target/esm/index.js +7 -6
  333. package/target/esm/lib/fail.js +18 -0
  334. package/target/esm/lib/index.js +20 -195
  335. package/target/esm/lib/json.js +81 -0
  336. package/target/dts/app/agent.d.ts +0 -109
  337. package/target/dts/app/session.d.ts +0 -65
  338. package/target/dts/cli/context.d.ts +0 -6
  339. package/target/dts/cli/operator.d.ts +0 -10
  340. package/target/dts/cli/shared.d.ts +0 -27
  341. package/target/dts/domain/decisions.d.ts +0 -65
  342. package/target/dts/domain/signals.d.ts +0 -37
  343. package/target/dts/heartbeat/platform.d.ts +0 -15
  344. package/target/dts/heartbeat/tools.d.ts +0 -11
  345. package/target/dts/home/index.d.ts +0 -21
  346. package/target/dts/hub/index.d.ts +0 -72
  347. package/target/dts/runtime/watch.d.ts +0 -17
  348. package/target/dts/store/git/index.d.ts +0 -92
  349. package/target/dts/store/git/remote.d.ts +0 -95
  350. package/target/dts/store/kafka/index.d.ts +0 -2
  351. package/target/dts/store/temporal/index.d.ts +0 -2
  352. package/target/esm/app/budget.js +0 -95
  353. package/target/esm/app/context.js +0 -16
  354. package/target/esm/app/hubs.js +0 -76
  355. package/target/esm/app/room.js +0 -181
  356. package/target/esm/app/session.js +0 -99
  357. package/target/esm/cli/context.js +0 -8
  358. package/target/esm/cli/operator.js +0 -185
  359. package/target/esm/cli/shared.js +0 -159
  360. package/target/esm/cli/skill.js +0 -54
  361. package/target/esm/domain/decisions.js +0 -178
  362. package/target/esm/domain/profiles.js +0 -96
  363. package/target/esm/domain/signals.js +0 -134
  364. package/target/esm/heartbeat/platform.js +0 -83
  365. package/target/esm/heartbeat/tools.js +0 -68
  366. package/target/esm/home/index.js +0 -88
  367. package/target/esm/hub/index.js +0 -224
  368. package/target/esm/protocol/index.js +0 -219
  369. package/target/esm/runtime/reader.js +0 -65
  370. package/target/esm/runtime/session.js +0 -116
  371. package/target/esm/runtime/watch.js +0 -321
  372. package/target/esm/store/git/index.js +0 -719
  373. package/target/esm/store/git/remote.js +0 -928
  374. package/target/esm/store/index.js +0 -15
  375. package/target/esm/store/kafka/index.js +0 -3
  376. package/target/esm/store/temporal/index.js +0 -3
  377. /package/target/dts/{domain/index.d.ts → core/hub/capabilities.d.ts} +0 -0
  378. /package/target/dts/{protocol → core/hub/protocol}/files.d.ts +0 -0
@@ -0,0 +1,7 @@
1
+ import type { Transport } from '../../core/hub/ports/store.ts';
2
+ import type { SigningContext } from '../../core/signing/index.ts';
3
+ type Options = {
4
+ signer?: SigningContext | (() => SigningContext);
5
+ };
6
+ export declare const gitTransport: (home: string, opt?: Options) => Transport;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { Transport } from '../../core/hub/ports/store.ts';
2
+ export declare const kafka: Transport;
@@ -0,0 +1,2 @@
1
+ import type { Transport } from '../../core/hub/ports/store.ts';
2
+ export declare const temporal: Transport;
@@ -1,3 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import { main } from './cli/index.ts';
2
+ import './composition/index.ts';
3
+ import { main } from './clients/cli/index.ts';
3
4
  export { main };
@@ -1,6 +1,6 @@
1
- import * as Agent from '../app/agent.ts';
2
- import type { Opts } from './args.ts';
3
- import type { Ctx } from './context.ts';
1
+ import * as Agent from '../../../core/agents/sessions/agent.ts';
2
+ import type { Opts } from '../args.ts';
3
+ import type { Ctx } from '../context.ts';
4
4
  export declare const showInbox: ({ R, me, s }: Ctx, res: Agent.Inbox, o: Opts) => void;
5
5
  export declare const inbox: (a: Ctx, o: Opts) => void;
6
6
  export declare const take: (a: Ctx, o: Opts) => void;
@@ -1,5 +1,5 @@
1
- import * as Session from '../app/session.ts';
2
- import type { Opts } from './args.ts';
1
+ import * as Session from '../../../core/agents/sessions/session.ts';
2
+ import type { Opts } from '../args.ts';
3
3
  export declare const briefing: (s: Session.Session) => void;
4
4
  export declare const join: (o: Opts) => void;
5
5
  export declare const resume: (o: Opts) => void;
@@ -0,0 +1,2 @@
1
+ import type { Opts } from './args.ts';
2
+ export declare const parseArgs: (argv: string[]) => Opts;
@@ -1,11 +1,11 @@
1
- import type { Entry } from '../protocol/files.ts';
1
+ import type { Entry } from '../../core/hub/protocol/files.ts';
2
2
  export declare const out: (s?: string) => void;
3
3
  export declare const dump: (v: unknown) => void;
4
4
  export type Opts = {
5
5
  _: string[];
6
6
  [key: string]: string | string[] | boolean | undefined;
7
7
  };
8
- export declare const parseArgs: (argv: string[]) => Opts;
8
+ export { parseArgs } from './arg-parse.ts';
9
9
  export declare const opt: (o: Opts, key: string) => string | undefined;
10
10
  export declare const list: (o: Opts, key: string) => string[];
11
11
  export declare const flag: (o: Opts, key: string) => boolean;
@@ -0,0 +1,2 @@
1
+ import type { Opts } from './args.ts';
2
+ export declare const dispatch: (cmd: string, o: Opts, rest: string[]) => void | Promise<void>;
@@ -0,0 +1,4 @@
1
+ import type { Opts } from './args.ts';
2
+ export type { Ctx } from '../../core/agents/sessions/context.ts';
3
+ export { isRef } from '../../core/hub/usecases/room.ts';
4
+ export declare const operatorCtx: (o: Opts) => import("../../core/hub/usecases/actor.ts").Actor;
@@ -1,5 +1,3 @@
1
- import type { Profile } from '../domain/profiles.ts';
2
1
  export declare const TABLE: Array<[string, 'operator' | 'session' | 'agent' | 'both', string]>;
2
+ export declare const helpText: () => string;
3
3
  export declare const helpMarkdown: () => string;
4
- export declare const main: (argv?: string[]) => Promise<void>;
5
- export type { Profile };
@@ -0,0 +1,4 @@
1
+ export type { Profile } from '../../core/hub/work/index.ts';
2
+ export { helpMarkdown, TABLE } from './help.ts';
3
+ export declare const failure: (e: unknown) => string;
4
+ export declare const main: (argv?: string[]) => Promise<void>;
@@ -0,0 +1,5 @@
1
+ import type { Pulse } from '../../../core/agents/heartbeat/pulse.ts';
2
+ type Published = ReturnType<typeof import('../../../core/agents/heartbeat/pulse.ts').published>[number];
3
+ export declare const publishedLine: (h: Published) => string;
4
+ export declare const pulseLine: ({ session: s, tool, beat: b }: Pulse) => string;
5
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { Opts } from '../args.ts';
2
+ export declare const heartbeats: (o: Opts) => Promise<void>;
3
+ export declare const pulse: (o: Opts) => Promise<void>;
@@ -0,0 +1,6 @@
1
+ import type { Opts } from '../args.ts';
2
+ export declare const listHub: (_: Opts) => void;
3
+ export declare const createHub: (o: Opts) => void;
4
+ export declare const switchHub: (o: Opts) => void;
5
+ export declare const addHub: (o: Opts) => void;
6
+ export declare const amendHub: (o: Opts) => void;
@@ -0,0 +1,2 @@
1
+ import type { Opts } from '../args.ts';
2
+ export declare const hub: (o: Opts) => void;
@@ -0,0 +1,5 @@
1
+ export { heartbeats, pulse } from './heartbeat.ts';
2
+ export { hub } from './hub.ts';
3
+ export { roomCmd } from './room.ts';
4
+ export { forget, sessionLine, sessions } from './sessions.ts';
5
+ export { where } from './where.ts';
@@ -0,0 +1,5 @@
1
+ import type { Hub } from '../../../core/hub/rooms/index.ts';
2
+ import type { Opts } from '../args.ts';
3
+ export declare const archiveRoom: (H: Hub, arg: string | undefined, o: Opts) => void;
4
+ export declare const deleteRoom: (H: Hub, arg: string | undefined, o: Opts) => void;
5
+ export declare const rebaseRoomContract: (H: Hub, arg: string | undefined, o: Opts) => void;
@@ -0,0 +1,5 @@
1
+ import type { Hub } from '../../../core/hub/rooms/index.ts';
2
+ import type { Opts } from '../args.ts';
3
+ export declare const listRoom: (H: Hub, arg: string | undefined, o: Opts) => void;
4
+ export declare const createRoom: (H: Hub, arg: string | undefined, o: Opts) => void;
5
+ export declare const switchRoom: (H: Hub, arg: string | undefined, o: Opts) => void;
@@ -0,0 +1,4 @@
1
+ import type { Hub } from '../../../core/hub/rooms/index.ts';
2
+ import type { Opts } from '../args.ts';
3
+ export declare const admitRoom: (H: Hub, arg: string | undefined, o: Opts) => void;
4
+ export declare const removeRoom: (H: Hub, arg: string | undefined, o: Opts) => void;
@@ -0,0 +1,2 @@
1
+ import type { Opts } from '../args.ts';
2
+ export declare const roomCmd: (o: Opts) => void;
@@ -0,0 +1,5 @@
1
+ import type { SessionView } from '../../../core/agents/overview.ts';
2
+ import type { Opts } from '../args.ts';
3
+ export declare const sessionLine: (s: SessionView) => string;
4
+ export declare const sessions: (o: Opts) => void;
5
+ export declare const forget: (o: Opts) => void;
@@ -0,0 +1,2 @@
1
+ import type { Opts } from '../args.ts';
2
+ export declare const watchCommand: (o: Opts) => Promise<void>;
@@ -0,0 +1,7 @@
1
+ import type { Where } from '../../../core/agents/overview.ts';
2
+ import type { Room } from '../../../core/hub/rooms/index.ts';
3
+ import type { All, Message } from '../../../core/hub/protocol/index.ts';
4
+ import type { Opts } from '../args.ts';
5
+ export declare const hubLine: (H: Where['hub']) => string;
6
+ export declare const printOverview: (w: Where, R: Room) => void;
7
+ export declare const showMessage: (R: Room, o: Opts, all: All, m: Message) => void;
@@ -0,0 +1,2 @@
1
+ import type { Opts } from '../args.ts';
2
+ export declare const where: (o: Opts) => Promise<void>;
@@ -0,0 +1,7 @@
1
+ import type { Opts } from '../args.ts';
2
+ import type { Ctx } from '../context.ts';
3
+ export declare const propose: (a: Ctx, o: Opts) => void;
4
+ export declare const stamp_: (a: Ctx, o: Opts) => void;
5
+ export declare const decide: (a: Ctx, o: Opts) => void;
6
+ export declare const proposals: (a: Ctx, o: Opts) => void;
7
+ export declare const grants: (a: Ctx, o: Opts) => void;
@@ -0,0 +1,4 @@
1
+ import type { Opts } from '../args.ts';
2
+ import type { Ctx } from '../context.ts';
3
+ export declare const cat: (a: Ctx, o: Opts) => void;
4
+ export declare const get: (a: Ctx, o: Opts) => void;
@@ -0,0 +1,7 @@
1
+ export { decide, grants, proposals, propose, stamp_ } from './budget.ts';
2
+ export { cat, get } from './files.ts';
3
+ export { add, read, reply, send, thread } from './messages.ts';
4
+ export { profileCmd, who } from './profile.ts';
5
+ export { scopeLine, waiting } from './session.ts';
6
+ export { signals } from './signals.ts';
7
+ export { log, taskLine, tasks } from './work.ts';
@@ -0,0 +1,7 @@
1
+ import type { Opts } from '../args.ts';
2
+ import type { Ctx } from '../context.ts';
3
+ export declare const add: (a: Ctx, o: Opts) => void;
4
+ export declare const send: (a: Ctx, o: Opts) => void;
5
+ export declare const reply: (a: Ctx, o: Opts) => void;
6
+ export declare const read: (a: Ctx, o: Opts) => void;
7
+ export declare const thread: (a: Ctx, o: Opts) => void;
@@ -0,0 +1,4 @@
1
+ import type { Opts } from '../args.ts';
2
+ import type { Ctx } from '../context.ts';
3
+ export declare const profileCmd: ({ R }: Ctx, o: Opts) => void;
4
+ export declare const who: (a: Ctx) => void;
@@ -0,0 +1,6 @@
1
+ import type { Session } from '../../../core/agents/sessions/session.ts';
2
+ export declare const scopeLine: (s: Session, quorum?: boolean) => string;
3
+ export declare const waiting: (room: string, st: {
4
+ quorum: number | null;
5
+ agents: number;
6
+ }) => string;
@@ -0,0 +1,3 @@
1
+ import type { Opts } from '../args.ts';
2
+ import type { Ctx } from '../context.ts';
3
+ export declare const signals: (a: Ctx, o: Opts) => void;
@@ -0,0 +1,6 @@
1
+ import type { TaskView } from '../../../core/hub/usecases/view.ts';
2
+ import type { Opts } from '../args.ts';
3
+ import type { Ctx } from '../context.ts';
4
+ export declare const taskLine: (t: TaskView) => string;
5
+ export declare const tasks: (a: Ctx, o: Opts) => void;
6
+ export declare const log: (a: Ctx, o: Opts) => void;
@@ -0,0 +1,3 @@
1
+ import type { Opts } from '../args.ts';
2
+ export { SKILL, skillTargets } from './targets.ts';
3
+ export declare const skill: (o: Opts) => void;
@@ -1,4 +1,3 @@
1
- import type { Opts } from './args.ts';
2
1
  export declare const SKILL: string;
3
2
  export declare const skillTargets: (project: boolean) => string[];
4
- export declare const skill: (o: Opts) => void;
3
+ export declare const sameSkill: (dir: string) => boolean;
@@ -0,0 +1,2 @@
1
+ import type { Build } from '../core/hub/ports/index.ts';
2
+ export declare const build: Build;
@@ -1,3 +1,4 @@
1
+ import type { ProcessRows } from '../ports/host.ts';
1
2
  export type Facts = {
2
3
  at: number;
3
4
  alive: boolean | null;
@@ -23,10 +24,7 @@ export type SessionLike = {
23
24
  lastSeen: string;
24
25
  state: string;
25
26
  };
26
- export declare const probe: (s: SessionLike, waits?: string | null, rows?: Map<number, {
27
- ppid: number;
28
- cpu: number;
29
- }> | null) => Facts;
27
+ export declare const probe: (s: SessionLike, waits?: string | null, rows?: ProcessRows | null) => Facts;
30
28
  export declare const tracedBy: (s: Pick<SessionLike, 'handle' | 'product'>) => string;
31
29
  export declare const judge: (cur: Facts, prev?: Facts | null, { active, next }?: {
32
30
  active?: number;
@@ -1,6 +1,7 @@
1
- import * as HB from '../heartbeat/index.ts';
2
- import type { Room } from '../hub/index.ts';
3
- import type { Session } from '../runtime/session.ts';
1
+ import * as HB from './index.ts';
2
+ export { ensurePulse } from './singleton.ts';
3
+ import type { Room } from '../../hub/rooms/index.ts';
4
+ import type { Session } from '../sessions/index.ts';
4
5
  export type Pulse = {
5
6
  session: Session;
6
7
  tool: string;
@@ -9,13 +10,11 @@ export type Pulse = {
9
10
  export declare const heartbeats: ({ sample }?: {
10
11
  sample?: number;
11
12
  }) => Promise<Pulse[]>;
12
- export declare const ensurePulse: (cli: string) => void;
13
13
  export type Beaten = {
14
14
  session: Session;
15
15
  beat?: HB.Beat;
16
16
  error?: string;
17
17
  };
18
- export declare const beatAll: (prev: Map<string, HB.Facts>, next: number) => Beaten[];
19
18
  export declare const pulse: ({ every, once, log }: {
20
19
  every?: number;
21
20
  once?: boolean;
@@ -23,7 +22,7 @@ export declare const pulse: ({ every, once, log }: {
23
22
  }) => Promise<number>;
24
23
  export declare const published: (R: Room) => {
25
24
  agent: string;
26
- target: import("../index.ts").Rev;
25
+ target: import("../../../index.ts").Rev;
27
26
  time: number;
28
27
  text: string;
29
28
  state: string;
@@ -0,0 +1,3 @@
1
+ export declare const ensurePulse: (cli: string) => void;
2
+ export declare const claim: () => number | null;
3
+ export declare const release: () => void;
@@ -0,0 +1,6 @@
1
+ import type { SessionRef } from '../ports/index.ts';
2
+ export declare const toolOf: (s: SessionRef) => {
3
+ tool: string;
4
+ id: string;
5
+ } | null;
6
+ export declare const traceTime: (s: SessionRef) => number | null;
@@ -1,9 +1,10 @@
1
- import * as D from '../domain/decisions.ts';
2
- import type { Hub, Room } from '../hub/index.ts';
3
- import type { All, Message } from '../protocol/index.ts';
4
- import { liveness } from '../runtime/session.ts';
5
- import type { Session } from '../runtime/session.ts';
6
- import type { TaskView } from './view.ts';
1
+ import * as D from '../hub/decisions/index.ts';
2
+ import type { Hub, Room } from '../hub/rooms/index.ts';
3
+ import type { All, Message } from '../hub/protocol/index.ts';
4
+ import { liveness } from './sessions/index.ts';
5
+ import type { Session } from './sessions/index.ts';
6
+ import type { RoomView } from '../hub/usecases/rooms.ts';
7
+ import type { TaskView } from '../hub/usecases/view.ts';
7
8
  export type SessionView = Session & {
8
9
  liveness: ReturnType<typeof liveness>;
9
10
  };
@@ -21,5 +22,10 @@ export declare const arrived: (H: Hub, R: Room, seen: Set<string>) => {
21
22
  all: All;
22
23
  messages: Message[];
23
24
  };
25
+ export declare const roomsActive: (H: Hub, o?: {
26
+ archived?: boolean;
27
+ }) => Array<RoomView & {
28
+ active: number;
29
+ }>;
24
30
  export declare const sessions: () => SessionView[];
25
31
  export declare const forgetSession: (handle: string) => void;
@@ -0,0 +1,47 @@
1
+ export type Environment = Record<string, string | undefined>;
2
+ export type ProcessRows = Map<number, {
3
+ ppid: number;
4
+ cpu: number;
5
+ }>;
6
+ export type Ancestor = {
7
+ pid: number;
8
+ name: string;
9
+ };
10
+ export type Ended = {
11
+ code: number | null;
12
+ signal: string | null;
13
+ timedOut: boolean;
14
+ seconds: number;
15
+ };
16
+ export type Clock = {
17
+ wall(): number;
18
+ monotonic(): number;
19
+ };
20
+ declare const handle: unique symbol;
21
+ export type ProcessHandle = {
22
+ readonly [handle]: true;
23
+ };
24
+ export type Launch = {
25
+ env: Environment;
26
+ } & ({
27
+ shell: string;
28
+ timeout: number | null;
29
+ } | {
30
+ file: string;
31
+ args: readonly string[];
32
+ });
33
+ export interface ProcessHost {
34
+ readonly supported: boolean;
35
+ readonly clock: Clock;
36
+ alive(pid: number): boolean;
37
+ ancestors(pid: number): Ancestor[];
38
+ snapshot(): ProcessRows | null;
39
+ inspect(pid: number, rows?: ProcessRows | null): {
40
+ alive: boolean | null;
41
+ cpu: number | null;
42
+ };
43
+ start(request: Launch): ProcessHandle;
44
+ stop(process: ProcessHandle): void;
45
+ awaitQuiescence(process: ProcessHandle, deadline?: number): Promise<Ended | null>;
46
+ }
47
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AgentTool } from './tools.ts';
2
+ import type { ProcessHost } from './host.ts';
3
+ export type { AgentTool, Env, SessionRef } from './tools.ts';
4
+ export type AgentPorts = {
5
+ tools: readonly AgentTool[];
6
+ host: ProcessHost;
7
+ };
8
+ export declare const wireAgents: (p: AgentPorts) => void;
9
+ export declare const agentPorts: () => AgentPorts;
@@ -0,0 +1,18 @@
1
+ export type Env = Record<string, string | undefined>;
2
+ export type SessionRef = {
3
+ handle: string;
4
+ product: string | null;
5
+ };
6
+ export interface AgentTool {
7
+ readonly id: string;
8
+ detect(env: Env): boolean;
9
+ readonly processes?: readonly string[];
10
+ session?(env: Env): {
11
+ handle: string;
12
+ pid: number | null;
13
+ } | null;
14
+ traceId?(s: SessionRef): string | null;
15
+ traceTime?(id: string): number | null;
16
+ skillDirs?(base: string): string[];
17
+ sandboxHint?(where: string): string;
18
+ }
@@ -0,0 +1,70 @@
1
+ import type { Session } from './index.ts';
2
+ import type { Actor } from '../../hub/usecases/room.ts';
3
+ export { wait } from './wait.ts';
4
+ export { bound } from './index.ts';
5
+ export { watch } from '../turns/index.ts';
6
+ export type { WatchOptions } from '../turns/index.ts';
7
+ export type InboxOptions = {
8
+ peek?: boolean;
9
+ limit?: number;
10
+ };
11
+ export declare const started: ({ R }: Actor) => {
12
+ quorum: number | null;
13
+ agents: number;
14
+ started: boolean;
15
+ };
16
+ export declare const inbox: ({ R, me }: Actor, { peek, limit }?: InboxOptions) => {
17
+ rest: number;
18
+ cursors: Record<string, string>;
19
+ all: import("../../hub/protocol/model.ts").All;
20
+ msgs: {
21
+ id: string;
22
+ from: string;
23
+ trust: 'asserted' | 'verified';
24
+ time: number;
25
+ seq: number;
26
+ invalid: string | null;
27
+ subject: string;
28
+ body: string;
29
+ to: string[];
30
+ re: string | null;
31
+ kind: string | null;
32
+ state: string | null;
33
+ assign: string[] | null;
34
+ roles: Record<string, string> | null;
35
+ hop: number;
36
+ bad: string | null;
37
+ trailers: import("../../hub/protocol/model.ts").Trailers;
38
+ refused: import("../../hub/protocol/model.ts").Refused[];
39
+ reId: string | null;
40
+ hopEff: number;
41
+ files: import("../../hub/protocol/model.ts").FileRef[];
42
+ }[];
43
+ };
44
+ export type Inbox = ReturnType<typeof inbox>;
45
+ export declare const take: ({ R, me }: Actor, ref: string) => {
46
+ m: import("../../hub/protocol/model.ts").Message;
47
+ made: boolean;
48
+ };
49
+ export declare const whoami: ({ s, R }: Actor & {
50
+ s?: Session;
51
+ }) => {
52
+ session: Session;
53
+ profile: string;
54
+ members: string[];
55
+ };
56
+ export declare const card: ({ R, me }: Actor, text: string) => string;
57
+ export type PingInput = {
58
+ to: string;
59
+ text?: string;
60
+ next?: number;
61
+ re?: string;
62
+ };
63
+ export declare const ping: ({ R, me }: Actor, { to, text, next, re }: PingInput) => {
64
+ id: string;
65
+ to: string;
66
+ previous: {
67
+ id: string;
68
+ answeredAt: number | null;
69
+ } | null;
70
+ };
@@ -0,0 +1,9 @@
1
+ import type { Hub, Room } from '../../hub/rooms/index.ts';
2
+ import type { Session } from './index.ts';
3
+ export type Bound = {
4
+ s: Session;
5
+ H: Hub;
6
+ R: Room;
7
+ me: string;
8
+ };
9
+ export declare const bound: () => Bound;
@@ -0,0 +1,8 @@
1
+ import type { Session } from './index.ts';
2
+ import type { Actor } from '../../hub/usecases/actor.ts';
3
+ export type Ctx = Actor & {
4
+ s?: Session;
5
+ };
6
+ export declare const agent: () => Ctx;
7
+ export declare const skillDirs: (base: string) => string[];
8
+ export declare const sandboxHints: (where: string) => string[];
@@ -1,5 +1,5 @@
1
- import type { Hub, Room } from '../hub/index.ts';
2
- export declare const LEASE: number;
1
+ export { bound } from './binding.ts';
2
+ export type { Bound } from './binding.ts';
3
3
  export type Session = {
4
4
  handle: string;
5
5
  product: string | null;
@@ -28,13 +28,6 @@ export declare const pidAlive: (pid: number) => boolean;
28
28
  export declare const liveness: (s: Session) => 'active' | 'stopped' | 'gone';
29
29
  export declare const seatHolder: (hub: string, genesis: string, agent: string, except: string) => Session | undefined;
30
30
  export declare const ownSession: (handle: string) => Session | null;
31
- export type Bound = {
32
- s: Session;
33
- H: Hub;
34
- R: Room;
35
- me: string;
36
- };
37
- export declare const bound: () => Bound;
38
31
  export declare const parseSelector: (sel: string | undefined) => {
39
32
  hub: string | null;
40
33
  room: string;
@@ -0,0 +1,20 @@
1
+ import type { Session } from './index.ts';
2
+ import type { JoinKey } from '../../hub/ports/store.ts';
3
+ export type JoinInput = {
4
+ hub: string;
5
+ room: string;
6
+ agent?: string;
7
+ scope?: string;
8
+ };
9
+ export type JoinResult = {
10
+ agent: string;
11
+ hub: string;
12
+ room: string;
13
+ } & ({
14
+ session: Session;
15
+ key: null;
16
+ } | {
17
+ session: null;
18
+ key: JoinKey;
19
+ });
20
+ export declare const join: ({ hub, room, agent: id, scope }: JoinInput) => JoinResult;
@@ -0,0 +1,2 @@
1
+ import type { Session } from './index.ts';
2
+ export declare const resume: (selector?: string) => Session;
@@ -0,0 +1,46 @@
1
+ import type { Session } from './index.ts';
2
+ export { resume } from './resume.ts';
3
+ export { join } from './join.ts';
4
+ export type { JoinInput, JoinResult } from './join.ts';
5
+ export { bound } from './index.ts';
6
+ export type { Session } from './index.ts';
7
+ export declare const briefing: (s: Session) => {
8
+ session: Session;
9
+ actor: import("./binding.ts").Bound;
10
+ start: {
11
+ quorum: number | null;
12
+ agents: number;
13
+ started: boolean;
14
+ };
15
+ tasks: import("../../hub/usecases/view.ts").TaskView[];
16
+ inbox: {
17
+ rest: number;
18
+ cursors: Record<string, string>;
19
+ all: import("../../../index.ts").All;
20
+ msgs: {
21
+ id: string;
22
+ from: string;
23
+ trust: 'asserted' | 'verified';
24
+ time: number;
25
+ seq: number;
26
+ invalid: string | null;
27
+ subject: string;
28
+ body: string;
29
+ to: string[];
30
+ re: string | null;
31
+ kind: string | null;
32
+ state: string | null;
33
+ assign: string[] | null;
34
+ roles: Record<string, string> | null;
35
+ hop: number;
36
+ bad: string | null;
37
+ trailers: import("../../../index.ts").Trailers;
38
+ refused: import("../../../index.ts").Refused[];
39
+ reId: string | null;
40
+ hopEff: number;
41
+ files: import("../../../index.ts").FileRef[];
42
+ }[];
43
+ } | null;
44
+ };
45
+ export declare const stop: () => Session;
46
+ export declare const leave: () => Session;