@chipschat/protocol 0.0.0-stage → 1.0.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 (371) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +56 -2
  3. package/dist/generated/types.d.ts +4052 -0
  4. package/dist/generated/types.d.ts.map +1 -0
  5. package/dist/generated/types.js +7 -0
  6. package/dist/generated/types.js.map +1 -0
  7. package/dist/src/address.d.ts +106 -0
  8. package/dist/src/address.d.ts.map +1 -0
  9. package/dist/src/address.js +141 -0
  10. package/dist/src/address.js.map +1 -0
  11. package/dist/src/agent-context-windows.d.ts +235 -0
  12. package/dist/src/agent-context-windows.d.ts.map +1 -0
  13. package/dist/src/agent-context-windows.js +213 -0
  14. package/dist/src/agent-context-windows.js.map +1 -0
  15. package/dist/src/agent-heartbeats.d.ts +106 -0
  16. package/dist/src/agent-heartbeats.d.ts.map +1 -0
  17. package/dist/src/agent-heartbeats.js +111 -0
  18. package/dist/src/agent-heartbeats.js.map +1 -0
  19. package/dist/src/agent-models.d.ts +158 -0
  20. package/dist/src/agent-models.d.ts.map +1 -0
  21. package/dist/src/agent-models.js +171 -0
  22. package/dist/src/agent-models.js.map +1 -0
  23. package/dist/src/agent-place.d.ts +76 -0
  24. package/dist/src/agent-place.d.ts.map +1 -0
  25. package/dist/src/agent-place.js +80 -0
  26. package/dist/src/agent-place.js.map +1 -0
  27. package/dist/src/agents.d.ts +24 -0
  28. package/dist/src/agents.d.ts.map +1 -0
  29. package/dist/src/agents.js +58 -0
  30. package/dist/src/agents.js.map +1 -0
  31. package/dist/src/capabilities.d.ts +121 -0
  32. package/dist/src/capabilities.d.ts.map +1 -0
  33. package/dist/src/capabilities.js +120 -0
  34. package/dist/src/capabilities.js.map +1 -0
  35. package/dist/src/checklist.d.ts +19 -0
  36. package/dist/src/checklist.d.ts.map +1 -0
  37. package/dist/src/checklist.js +22 -0
  38. package/dist/src/checklist.js.map +1 -0
  39. package/dist/src/commands.d.ts +50 -0
  40. package/dist/src/commands.d.ts.map +1 -0
  41. package/dist/src/commands.js +274 -0
  42. package/dist/src/commands.js.map +1 -0
  43. package/dist/src/connectors.d.ts +90 -0
  44. package/dist/src/connectors.d.ts.map +1 -0
  45. package/dist/src/connectors.js +119 -0
  46. package/dist/src/connectors.js.map +1 -0
  47. package/dist/src/context-files.d.ts +304 -0
  48. package/dist/src/context-files.d.ts.map +1 -0
  49. package/dist/src/context-files.js +247 -0
  50. package/dist/src/context-files.js.map +1 -0
  51. package/dist/src/context.d.ts +369 -0
  52. package/dist/src/context.d.ts.map +1 -0
  53. package/dist/src/context.js +526 -0
  54. package/dist/src/context.js.map +1 -0
  55. package/dist/src/direct-asks.d.ts +36 -0
  56. package/dist/src/direct-asks.d.ts.map +1 -0
  57. package/dist/src/direct-asks.js +43 -0
  58. package/dist/src/direct-asks.js.map +1 -0
  59. package/dist/src/envelope.d.ts +70 -0
  60. package/dist/src/envelope.d.ts.map +1 -0
  61. package/dist/src/envelope.js +46 -0
  62. package/dist/src/envelope.js.map +1 -0
  63. package/dist/src/events/catalogue.d.ts +50 -0
  64. package/dist/src/events/catalogue.d.ts.map +1 -0
  65. package/dist/src/events/catalogue.js +70 -0
  66. package/dist/src/events/catalogue.js.map +1 -0
  67. package/dist/src/events/chips-to-harness.d.ts +37 -0
  68. package/dist/src/events/chips-to-harness.d.ts.map +1 -0
  69. package/dist/src/events/chips-to-harness.js +511 -0
  70. package/dist/src/events/chips-to-harness.js.map +1 -0
  71. package/dist/src/events/harness-to-chips.d.ts +38 -0
  72. package/dist/src/events/harness-to-chips.d.ts.map +1 -0
  73. package/dist/src/events/harness-to-chips.js +593 -0
  74. package/dist/src/events/harness-to-chips.js.map +1 -0
  75. package/dist/src/events/index.d.ts +6 -0
  76. package/dist/src/events/index.d.ts.map +1 -0
  77. package/dist/src/events/index.js +5 -0
  78. package/dist/src/events/index.js.map +1 -0
  79. package/dist/src/events/workspace.d.ts +222 -0
  80. package/dist/src/events/workspace.d.ts.map +1 -0
  81. package/dist/src/events/workspace.js +1039 -0
  82. package/dist/src/events/workspace.js.map +1 -0
  83. package/dist/src/exchange.d.ts +262 -0
  84. package/dist/src/exchange.d.ts.map +1 -0
  85. package/dist/src/exchange.js +413 -0
  86. package/dist/src/exchange.js.map +1 -0
  87. package/dist/src/first-names.d.ts +29 -0
  88. package/dist/src/first-names.d.ts.map +1 -0
  89. package/dist/src/first-names.js +80 -0
  90. package/dist/src/first-names.js.map +1 -0
  91. package/dist/src/frames.d.ts +526 -0
  92. package/dist/src/frames.d.ts.map +1 -0
  93. package/dist/src/frames.js +346 -0
  94. package/dist/src/frames.js.map +1 -0
  95. package/dist/src/harness-jobs.d.ts +313 -0
  96. package/dist/src/harness-jobs.d.ts.map +1 -0
  97. package/dist/src/harness-jobs.js +210 -0
  98. package/dist/src/harness-jobs.js.map +1 -0
  99. package/dist/src/ids/index.d.ts +3 -0
  100. package/dist/src/ids/index.d.ts.map +1 -0
  101. package/dist/src/ids/index.js +2 -0
  102. package/dist/src/ids/index.js.map +1 -0
  103. package/dist/src/ids/ulid.d.ts +96 -0
  104. package/dist/src/ids/ulid.d.ts.map +1 -0
  105. package/dist/src/ids/ulid.js +212 -0
  106. package/dist/src/ids/ulid.js.map +1 -0
  107. package/dist/src/index.d.ts +81 -0
  108. package/dist/src/index.d.ts.map +1 -0
  109. package/dist/src/index.js +47 -0
  110. package/dist/src/index.js.map +1 -0
  111. package/dist/src/invite-link.d.ts +64 -0
  112. package/dist/src/invite-link.d.ts.map +1 -0
  113. package/dist/src/invite-link.js +99 -0
  114. package/dist/src/invite-link.js.map +1 -0
  115. package/dist/src/join.d.ts +188 -0
  116. package/dist/src/join.d.ts.map +1 -0
  117. package/dist/src/join.js +190 -0
  118. package/dist/src/join.js.map +1 -0
  119. package/dist/src/limits.d.ts +50 -0
  120. package/dist/src/limits.d.ts.map +1 -0
  121. package/dist/src/limits.js +106 -0
  122. package/dist/src/limits.js.map +1 -0
  123. package/dist/src/matters.d.ts +22 -0
  124. package/dist/src/matters.d.ts.map +1 -0
  125. package/dist/src/matters.js +26 -0
  126. package/dist/src/matters.js.map +1 -0
  127. package/dist/src/mentions.d.ts +63 -0
  128. package/dist/src/mentions.d.ts.map +1 -0
  129. package/dist/src/mentions.js +129 -0
  130. package/dist/src/mentions.js.map +1 -0
  131. package/dist/src/names.d.ts +58 -0
  132. package/dist/src/names.d.ts.map +1 -0
  133. package/dist/src/names.js +192 -0
  134. package/dist/src/names.js.map +1 -0
  135. package/dist/src/no-reply.d.ts +17 -0
  136. package/dist/src/no-reply.d.ts.map +1 -0
  137. package/dist/src/no-reply.js +48 -0
  138. package/dist/src/no-reply.js.map +1 -0
  139. package/dist/src/notifications.d.ts +81 -0
  140. package/dist/src/notifications.d.ts.map +1 -0
  141. package/dist/src/notifications.js +65 -0
  142. package/dist/src/notifications.js.map +1 -0
  143. package/dist/src/pages.d.ts +32 -0
  144. package/dist/src/pages.d.ts.map +1 -0
  145. package/dist/src/pages.js +32 -0
  146. package/dist/src/pages.js.map +1 -0
  147. package/dist/src/pairing.d.ts +99 -0
  148. package/dist/src/pairing.d.ts.map +1 -0
  149. package/dist/src/pairing.js +163 -0
  150. package/dist/src/pairing.js.map +1 -0
  151. package/dist/src/primitives.d.ts +267 -0
  152. package/dist/src/primitives.d.ts.map +1 -0
  153. package/dist/src/primitives.js +279 -0
  154. package/dist/src/primitives.js.map +1 -0
  155. package/dist/src/project.d.ts +335 -0
  156. package/dist/src/project.d.ts.map +1 -0
  157. package/dist/src/project.js +499 -0
  158. package/dist/src/project.js.map +1 -0
  159. package/dist/src/ranges.d.ts +31 -0
  160. package/dist/src/ranges.d.ts.map +1 -0
  161. package/dist/src/ranges.js +51 -0
  162. package/dist/src/ranges.js.map +1 -0
  163. package/dist/src/relay.d.ts +177 -0
  164. package/dist/src/relay.d.ts.map +1 -0
  165. package/dist/src/relay.js +147 -0
  166. package/dist/src/relay.js.map +1 -0
  167. package/dist/src/room-files.d.ts +146 -0
  168. package/dist/src/room-files.d.ts.map +1 -0
  169. package/dist/src/room-files.js +135 -0
  170. package/dist/src/room-files.js.map +1 -0
  171. package/dist/src/room-note.d.ts +213 -0
  172. package/dist/src/room-note.d.ts.map +1 -0
  173. package/dist/src/room-note.js +457 -0
  174. package/dist/src/room-note.js.map +1 -0
  175. package/dist/src/space-icons.d.ts +68 -0
  176. package/dist/src/space-icons.d.ts.map +1 -0
  177. package/dist/src/space-icons.js +142 -0
  178. package/dist/src/space-icons.js.map +1 -0
  179. package/dist/src/spend.d.ts +57 -0
  180. package/dist/src/spend.d.ts.map +1 -0
  181. package/dist/src/spend.js +94 -0
  182. package/dist/src/spend.js.map +1 -0
  183. package/dist/src/visibility.d.ts +170 -0
  184. package/dist/src/visibility.d.ts.map +1 -0
  185. package/dist/src/visibility.js +218 -0
  186. package/dist/src/visibility.js.map +1 -0
  187. package/fixtures/agent.asked.json +15 -0
  188. package/fixtures/agent.attached.json +15 -0
  189. package/fixtures/agent.deleted.json +16 -0
  190. package/fixtures/agent.fork.json +14 -0
  191. package/fixtures/agent.lock_set.json +13 -0
  192. package/fixtures/agent.registered.json +17 -0
  193. package/fixtures/agent.released.json +16 -0
  194. package/fixtures/agent.updated.json +14 -0
  195. package/fixtures/approval.executed.json +16 -0
  196. package/fixtures/approval.request.json +45 -0
  197. package/fixtures/approval.resolved.json +20 -0
  198. package/fixtures/approval.routed.json +20 -0
  199. package/fixtures/artifact.create.json +18 -0
  200. package/fixtures/attachment.fetched.json +15 -0
  201. package/fixtures/attachment.limits_set.json +15 -0
  202. package/fixtures/budget.warning.json +20 -0
  203. package/fixtures/checkpoint.json +16 -0
  204. package/fixtures/context.compacted.json +16 -0
  205. package/fixtures/context.usage.json +17 -0
  206. package/fixtures/exchange.limits_set.json +15 -0
  207. package/fixtures/exchange.set.json +13 -0
  208. package/fixtures/feedback.json +21 -0
  209. package/fixtures/frames/ack.json +6 -0
  210. package/fixtures/frames/context.edit.json +11 -0
  211. package/fixtures/frames/context_window.change.json +9 -0
  212. package/fixtures/frames/context_window.compact.json +8 -0
  213. package/fixtures/frames/error.json +6 -0
  214. package/fixtures/frames/event.json +20 -0
  215. package/fixtures/frames/events.json +39 -0
  216. package/fixtures/frames/folder.open.json +6 -0
  217. package/fixtures/frames/folder.open.page.json +7 -0
  218. package/fixtures/frames/folder.run.json +8 -0
  219. package/fixtures/frames/folder.run_state.json +12 -0
  220. package/fixtures/frames/heartbeat.change.json +10 -0
  221. package/fixtures/frames/hello.json +18 -0
  222. package/fixtures/frames/job.change.json +9 -0
  223. package/fixtures/frames/join.json +19 -0
  224. package/fixtures/frames/model.change.json +10 -0
  225. package/fixtures/frames/ping.json +4 -0
  226. package/fixtures/frames/pong.json +4 -0
  227. package/fixtures/frames/presence.json +12 -0
  228. package/fixtures/frames/receipt.json +5 -0
  229. package/fixtures/frames/restart.json +5 -0
  230. package/fixtures/frames/subscribe.json +6 -0
  231. package/fixtures/handoff.json +20 -0
  232. package/fixtures/harness.removed.json +15 -0
  233. package/fixtures/harness.transferred.json +15 -0
  234. package/fixtures/hello.json +61 -0
  235. package/fixtures/join.allowed.json +20 -0
  236. package/fixtures/join.denied.json +17 -0
  237. package/fixtures/lane.updated.json +17 -0
  238. package/fixtures/membership.added.json +16 -0
  239. package/fixtures/membership.removed.json +14 -0
  240. package/fixtures/membership.replaced.json +15 -0
  241. package/fixtures/message.deleted.json +15 -0
  242. package/fixtures/message.edited.json +15 -0
  243. package/fixtures/message.handed.json +14 -0
  244. package/fixtures/message.heard.json +14 -0
  245. package/fixtures/message.held.json +14 -0
  246. package/fixtures/message.hidden.json +14 -0
  247. package/fixtures/message.new.json +96 -0
  248. package/fixtures/message.overheard.json +22 -0
  249. package/fixtures/message.pinned.json +14 -0
  250. package/fixtures/message.post.json +14 -0
  251. package/fixtures/message.shown.json +14 -0
  252. package/fixtures/message.unpinned.json +14 -0
  253. package/fixtures/person.face_set.json +17 -0
  254. package/fixtures/person.joined.json +16 -0
  255. package/fixtures/person.removed.json +16 -0
  256. package/fixtures/person.renamed.json +14 -0
  257. package/fixtures/policy.updated.json +30 -0
  258. package/fixtures/project.changed.json +21 -0
  259. package/fixtures/question.answered.json +23 -0
  260. package/fixtures/question.ask.json +37 -0
  261. package/fixtures/receipt.json +15 -0
  262. package/fixtures/relay.set.json +12 -0
  263. package/fixtures/role.changed.json +15 -0
  264. package/fixtures/run.cancel.json +15 -0
  265. package/fixtures/run.completed.json +20 -0
  266. package/fixtures/run.failed.json +20 -0
  267. package/fixtures/run.pause.json +15 -0
  268. package/fixtures/run.plan.json +24 -0
  269. package/fixtures/run.requested.json +34 -0
  270. package/fixtures/run.resume.json +15 -0
  271. package/fixtures/run.started.json +33 -0
  272. package/fixtures/run.status.json +17 -0
  273. package/fixtures/run.steer.json +21 -0
  274. package/fixtures/session.ended.json +15 -0
  275. package/fixtures/session.renamed.json +15 -0
  276. package/fixtures/session.started.json +17 -0
  277. package/fixtures/space.claimed.json +15 -0
  278. package/fixtures/space.created.json +14 -0
  279. package/fixtures/space.erased.json +13 -0
  280. package/fixtures/space.lead_set.json +13 -0
  281. package/fixtures/space.lock_set.json +13 -0
  282. package/fixtures/space.spend_ceiling_set.json +13 -0
  283. package/fixtures/space.updated.json +14 -0
  284. package/fixtures/step.log.json +26 -0
  285. package/fixtures/task.json +22 -0
  286. package/fixtures/turn.passed.json +14 -0
  287. package/fixtures/usage.json +21 -0
  288. package/fixtures/workspace.renamed.json +13 -0
  289. package/generated/agent-connect.json +13966 -0
  290. package/generated/schema/agent.asked.json +114 -0
  291. package/generated/schema/agent.attached.json +465 -0
  292. package/generated/schema/agent.deleted.json +127 -0
  293. package/generated/schema/agent.fork.json +107 -0
  294. package/generated/schema/agent.lock_set.json +105 -0
  295. package/generated/schema/agent.registered.json +130 -0
  296. package/generated/schema/agent.released.json +129 -0
  297. package/generated/schema/agent.updated.json +151 -0
  298. package/generated/schema/approval.executed.json +125 -0
  299. package/generated/schema/approval.request.json +279 -0
  300. package/generated/schema/approval.resolved.json +162 -0
  301. package/generated/schema/approval.routed.json +185 -0
  302. package/generated/schema/artifact.create.json +206 -0
  303. package/generated/schema/attachment.fetched.json +114 -0
  304. package/generated/schema/attachment.limits_set.json +136 -0
  305. package/generated/schema/budget.warning.json +152 -0
  306. package/generated/schema/checkpoint.json +111 -0
  307. package/generated/schema/context.compacted.json +124 -0
  308. package/generated/schema/context.usage.json +120 -0
  309. package/generated/schema/exchange.limits_set.json +127 -0
  310. package/generated/schema/exchange.set.json +144 -0
  311. package/generated/schema/feedback.json +173 -0
  312. package/generated/schema/handoff.json +122 -0
  313. package/generated/schema/harness.removed.json +122 -0
  314. package/generated/schema/harness.transferred.json +117 -0
  315. package/generated/schema/hello.json +509 -0
  316. package/generated/schema/join.allowed.json +176 -0
  317. package/generated/schema/join.denied.json +150 -0
  318. package/generated/schema/lane.updated.json +223 -0
  319. package/generated/schema/membership.added.json +153 -0
  320. package/generated/schema/membership.removed.json +126 -0
  321. package/generated/schema/membership.replaced.json +106 -0
  322. package/generated/schema/message.deleted.json +105 -0
  323. package/generated/schema/message.edited.json +107 -0
  324. package/generated/schema/message.handed.json +111 -0
  325. package/generated/schema/message.heard.json +100 -0
  326. package/generated/schema/message.held.json +181 -0
  327. package/generated/schema/message.hidden.json +100 -0
  328. package/generated/schema/message.new.json +1369 -0
  329. package/generated/schema/message.overheard.json +701 -0
  330. package/generated/schema/message.pinned.json +100 -0
  331. package/generated/schema/message.post.json +290 -0
  332. package/generated/schema/message.shown.json +100 -0
  333. package/generated/schema/message.unpinned.json +100 -0
  334. package/generated/schema/person.face_set.json +134 -0
  335. package/generated/schema/person.joined.json +128 -0
  336. package/generated/schema/person.removed.json +133 -0
  337. package/generated/schema/person.renamed.json +114 -0
  338. package/generated/schema/policy.updated.json +277 -0
  339. package/generated/schema/project.changed.json +199 -0
  340. package/generated/schema/question.answered.json +154 -0
  341. package/generated/schema/question.ask.json +194 -0
  342. package/generated/schema/receipt.json +109 -0
  343. package/generated/schema/relay.set.json +99 -0
  344. package/generated/schema/role.changed.json +116 -0
  345. package/generated/schema/run.cancel.json +106 -0
  346. package/generated/schema/run.completed.json +139 -0
  347. package/generated/schema/run.failed.json +135 -0
  348. package/generated/schema/run.pause.json +106 -0
  349. package/generated/schema/run.plan.json +128 -0
  350. package/generated/schema/run.requested.json +309 -0
  351. package/generated/schema/run.resume.json +106 -0
  352. package/generated/schema/run.started.json +142 -0
  353. package/generated/schema/run.status.json +120 -0
  354. package/generated/schema/run.steer.json +163 -0
  355. package/generated/schema/session.ended.json +106 -0
  356. package/generated/schema/session.renamed.json +108 -0
  357. package/generated/schema/session.started.json +116 -0
  358. package/generated/schema/space.claimed.json +107 -0
  359. package/generated/schema/space.created.json +148 -0
  360. package/generated/schema/space.erased.json +129 -0
  361. package/generated/schema/space.lead_set.json +108 -0
  362. package/generated/schema/space.lock_set.json +99 -0
  363. package/generated/schema/space.spend_ceiling_set.json +102 -0
  364. package/generated/schema/space.updated.json +112 -0
  365. package/generated/schema/step.log.json +187 -0
  366. package/generated/schema/task.json +268 -0
  367. package/generated/schema/turn.passed.json +99 -0
  368. package/generated/schema/usage.json +155 -0
  369. package/generated/schema/workspace.renamed.json +107 -0
  370. package/generated/types.ts +4178 -0
  371. package/package.json +38 -3
@@ -0,0 +1,213 @@
1
+ /**
2
+ * What an agent is told of the room with each turn (ADR 0092): who is in it, how to reach each of
3
+ * them with an @, and what an @ does.
4
+ *
5
+ * Chips knows the room and its rules; a harness knew only what it had heard. So Chips words the
6
+ * note, once, here, and sends it on `message.new` as `room`: the members, each with the handle
7
+ * that reaches them, and the note itself for each who takes the turn. The server that sends it,
8
+ * the conformance fake that plays the server and the SDK that hands it over read the same words.
9
+ * It no longer says when Chips holds the agents (ADR 0187): the referee's warning says that, when
10
+ * it matters, in the workspace's own numbers.
11
+ *
12
+ * Each agent is listed with the harness it runs on (ADR 0101): "ASCII Art (Jacobian agent,
13
+ * @ASCIIArt)". A brief that said "Jacobian is the lead" left two agents asking "@Jacobian" in a room
14
+ * where Jacobian's agent was called ASCII Art.
15
+ *
16
+ * A room may have a lead (ADR 0104): the agent that hands out the work, and that Chips hands what
17
+ * was nobody's turn once the room goes still. The note says who it is, which of the others have a
18
+ * turn going and how long each has been without one, and, to the one taking the turn, what is
19
+ * news to it: that it has just joined, who joined since it last spoke, or, to the lead, that this
20
+ * message is its because it was nobody's. People in a team see all that for themselves; an agent
21
+ * exists only in its turns, so Chips says it at the top of each. And when older lines of what was
22
+ * said since its last turn were left out of the turn, it says that too (ADR 0105).
23
+ *
24
+ * In a room with other agents, every taker is told it may answer `NO_REPLY` when a message asks
25
+ * nothing of it now, and the lead that a step handed from one agent to another needs no word from
26
+ * it (ADR 0109). ASCII Art's OpenClaw agents, named for a step that was theirs later, said "Ready
27
+ * for J2's updated HTML", and J1, copied on each hand-off, said it again to the next agent.
28
+ */
29
+ import { z } from "zod";
30
+ import { type JobSpend } from "./spend.js";
31
+ export declare const roomMember: z.ZodObject<{
32
+ participant_id: z.ZodString;
33
+ kind: z.ZodEnum<{
34
+ person: "person";
35
+ harness: "harness";
36
+ agent: "agent";
37
+ }>;
38
+ name: z.ZodString;
39
+ harness: z.ZodOptional<z.ZodString>;
40
+ handle: z.ZodOptional<z.ZodString>;
41
+ lead: z.ZodOptional<z.ZodLiteral<true>>;
42
+ time_zone: z.ZodOptional<z.ZodString>;
43
+ }, z.core.$strip>;
44
+ export type RoomMember = z.infer<typeof roomMember>;
45
+ export declare const roomWork: z.ZodObject<{
46
+ participant_id: z.ZodString;
47
+ minutes: z.ZodInt;
48
+ step: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strip>;
50
+ export type RoomWork = z.infer<typeof roomWork>;
51
+ export declare const roomIdle: z.ZodObject<{
52
+ participant_id: z.ZodString;
53
+ minutes: z.ZodInt;
54
+ }, z.core.$strip>;
55
+ export type RoomIdle = z.infer<typeof roomIdle>;
56
+ export declare const roomNote: z.ZodObject<{
57
+ members: z.ZodArray<z.ZodObject<{
58
+ participant_id: z.ZodString;
59
+ kind: z.ZodEnum<{
60
+ person: "person";
61
+ harness: "harness";
62
+ agent: "agent";
63
+ }>;
64
+ name: z.ZodString;
65
+ harness: z.ZodOptional<z.ZodString>;
66
+ handle: z.ZodOptional<z.ZodString>;
67
+ lead: z.ZodOptional<z.ZodLiteral<true>>;
68
+ time_zone: z.ZodOptional<z.ZodString>;
69
+ }, z.core.$strip>>;
70
+ notes: z.ZodRecord<z.ZodString, z.ZodString>;
71
+ rules: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
72
+ working: z.ZodOptional<z.ZodArray<z.ZodObject<{
73
+ participant_id: z.ZodString;
74
+ minutes: z.ZodInt;
75
+ step: z.ZodOptional<z.ZodString>;
76
+ }, z.core.$strip>>>;
77
+ idle: z.ZodOptional<z.ZodArray<z.ZodObject<{
78
+ participant_id: z.ZodString;
79
+ minutes: z.ZodInt;
80
+ }, z.core.$strip>>>;
81
+ }, z.core.$strip>;
82
+ export type RoomNote = z.infer<typeof roomNote>;
83
+ /** A member as the server and the fake know them. */
84
+ export interface NoteMember {
85
+ readonly id: string;
86
+ readonly kind: "person" | "agent";
87
+ readonly name: string;
88
+ /**
89
+ * For an agent, its harness's name; for a harness waiting under the first name its room holds
90
+ * for its agent, its own (ADR 0150).
91
+ */
92
+ readonly harness?: string | undefined;
93
+ /** The room's lead (ADR 0104). */
94
+ readonly lead?: boolean | undefined;
95
+ /** For a person, the IANA zone of their newest phone (ADR 0157). */
96
+ readonly timeZone?: string | undefined;
97
+ }
98
+ /** Who has a turn going in the room, and how long the others have been without one (ADR 0104). */
99
+ export interface RoomNow {
100
+ readonly working: readonly RoomWork[];
101
+ readonly idle: readonly RoomIdle[];
102
+ }
103
+ /**
104
+ * What is news to one who takes the turn (ADR 0104), with who did it by name: that it joined the
105
+ * room and has not spoken there since; who joined since it last spoke there; to the lead, that
106
+ * the message is its because it was nobody's turn, who said it, and which person to tell; or that
107
+ * the message is the taker's though nobody @-mentioned it.
108
+ */
109
+ export interface TakerNews {
110
+ readonly joined?: {
111
+ readonly minutes: number;
112
+ readonly by?: string | undefined;
113
+ /** Whether the room has files, which the turn lists at their current versions. */
114
+ readonly files: boolean;
115
+ };
116
+ readonly newcomers?: readonly {
117
+ readonly id: string;
118
+ readonly by?: string | undefined;
119
+ }[];
120
+ readonly nobodys?: {
121
+ readonly saidBy: string;
122
+ readonly tell?: string | undefined;
123
+ };
124
+ /** That the message is the taker's though it has no @ for it, and who sent it (`yoursWithoutAt`). */
125
+ readonly yours?: {
126
+ readonly saidBy: string;
127
+ };
128
+ /** That the message went to every agent here, and who sent it (`toEveryAgent`, ADR 0249). */
129
+ readonly toAll?: {
130
+ readonly saidBy: string;
131
+ };
132
+ /**
133
+ * How many lines of what was said since its last turn come with this one, when older ones were
134
+ * left out to fit its harness's budget (ADR 0105).
135
+ */
136
+ readonly cut?: {
137
+ readonly shown: number;
138
+ };
139
+ }
140
+ /**
141
+ * The handle that reaches a member among these, with its @: the whole name without spaces, else
142
+ * the first word, whichever is a handle a text can hold and names them (ADR 0091). Its own case,
143
+ * so `@OpenClaw2` rather than `@openclaw2`.
144
+ */
145
+ export declare function noteHandle(member: NoteMember, members: readonly NoteMember[]): string | undefined;
146
+ /**
147
+ * The members as the note lists them, each with its handle: people first, then agents, each by
148
+ * name, numbers in order ("OpenClaw 2" before "OpenClaw 10"). Not the order they joined, which two
149
+ * Chipses can break a tie in differently; this reads the same from both.
150
+ */
151
+ export declare function roomMembers(members: readonly NoteMember[]): RoomMember[];
152
+ /**
153
+ * The note for one who takes the turn:
154
+ *
155
+ * > In this room: Arjun (person, @Arjun), ASCII Art (Jacobian agent, @ASCIIArt), and you,
156
+ * > OpenClaw 2 (OpenClaw agent, @OpenClaw2). ASCII Art leads here: it hands out the work, and what
157
+ * > is nobody's turn goes to it. Working now: O1, 2 minutes in (last step: Editing
158
+ * > ascii-alphabet.html). Not working: ASCII Art for 3 minutes. This job has spent $1.20 of the
159
+ * > $3.00 this room allows a job; at $3.00 Chips holds the agents until a person acts. Everyone
160
+ * > here reads what you write; only those you @-mention act on it. To hand work to an agent or ask
161
+ * > it something, @-mention it. If a message asks nothing of you now, as when it names a step that
162
+ * > is yours later, answer NO_REPLY and nothing else: the room shows nothing, and nobody needs to
163
+ * > hear that you are ready or waiting.
164
+ *
165
+ * What is news to the taker comes first (ADR 0104): the lead's "Nobody has this turn", "You joined
166
+ * this room", "New since your last turn". What the job has spent comes after who is working, when
167
+ * Chips said (ADR 0117), in a room with other agents or none. The note ends with its rules
168
+ * (`roomRules`, ADR 0250), the same from turn to turn: with no other agent in the room, only
169
+ * "Everyone here reads what you write."
170
+ *
171
+ * Given the instant the turn is sent (`at`), each person's time there follows the room's line
172
+ * (ADR 0157): "Arjun's time now: 9:12 am, Tuesday 13 October 2026 (2026-10-13T09:12-07:00,
173
+ * America/Los_Angeles)." An agent asked for something at 10am, or in 50 minutes, has the date,
174
+ * the clock and the offset to write it with.
175
+ */
176
+ export declare function renderRoomNote(members: readonly RoomMember[], youId: string, now?: RoomNow, news?: TakerNews, spend?: JobSpend, at?: string): string;
177
+ /**
178
+ * How the space works, the words a taker's note ends with (ADR 0250): that everyone here reads what
179
+ * it writes, and beside other agents, what an @ does and when to answer NO_REPLY. They stay the same
180
+ * from turn to turn while the space's agents do. Said with every turn, they were a quarter of what a
181
+ * turn in a busy room carried, and in a session that keeps its turns they piled up, so `message.new`
182
+ * carries them apart too (`room.rules`) for a harness to say once a session.
183
+ */
184
+ export declare function roomRules(members: readonly RoomMember[], youId: string): string;
185
+ /**
186
+ * A taker's note without the rules it ends with (ADR 0250), for a turn whose session already holds
187
+ * them: the whole note from a Chips that sent no rules, and nothing for a taker with no note.
188
+ */
189
+ export declare function noteWithoutRules(room: Pick<RoomNote, "notes" | "rules"> | undefined, taker: string): string | undefined;
190
+ export declare const MONTHS: readonly ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
191
+ /**
192
+ * Whether a message is for this taker though it does not @ it (ADR 0081): its sender chose it in
193
+ * the composer, answered its words, or wrote on to it. Not one for every agent, nor one that
194
+ * @-mentions it. Its note says so beside other agents, where it otherwise reads that only those
195
+ * @-mentioned act, and an agent that was not the lead took a person's choice as nobody's turn
196
+ * (ADR 0104 addendum, 15 October 2026).
197
+ */
198
+ export declare function yoursWithoutAt(payload: Readonly<Record<string, unknown>>, taker: string): boolean;
199
+ /**
200
+ * Whether a message went to every agent in the room (ADR 0081's All). Its note says so beside other
201
+ * agents (ADR 0249), where it otherwise reads that only those @-mentioned act: in a room of four
202
+ * agents on 30 October 2026 the lead passed a person's question for all of them on with an @ to the
203
+ * three who already had it, one of them had asked the others the same, and each answered twice.
204
+ */
205
+ export declare function toEveryAgent(payload: Readonly<Record<string, unknown>>): boolean;
206
+ /**
207
+ * The room as `message.new` carries it: the members, and a note for each who takes the turn; with
208
+ * who has a turn going when Chips said (ADR 0104), what is news to each taker, what the job has
209
+ * spent (ADR 0117), and each person's time at the instant it is sent (`at`, ADR 0157); and the
210
+ * rules each note ends with (ADR 0250).
211
+ */
212
+ export declare function roomNoteFor(members: readonly NoteMember[], takers: readonly string[], now?: RoomNow, news?: Readonly<Record<string, TakerNews>>, spend?: JobSpend, at?: string): RoomNote;
213
+ //# sourceMappingURL=room-note.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"room-note.d.ts","sourceRoot":"","sources":["../../src/room-note.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,QAAQ,EAAc,MAAM,YAAY,CAAC;AAEvD,eAAO,MAAM,UAAU;;;;;;;;;;;;iBAqCrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,QAAQ;;;;iBASnB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ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