@chipschat/protocol 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +56 -2
  3. package/dist/envelope.d.ts +54 -0
  4. package/dist/envelope.d.ts.map +1 -0
  5. package/dist/envelope.js +48 -0
  6. package/dist/envelope.js.map +1 -0
  7. package/dist/events/agent-to-chips.d.ts +27 -0
  8. package/dist/events/agent-to-chips.d.ts.map +1 -0
  9. package/dist/events/agent-to-chips.js +392 -0
  10. package/dist/events/agent-to-chips.js.map +1 -0
  11. package/dist/events/catalogue.d.ts +48 -0
  12. package/dist/events/catalogue.d.ts.map +1 -0
  13. package/dist/events/catalogue.js +67 -0
  14. package/dist/events/catalogue.js.map +1 -0
  15. package/dist/events/chips-to-agent.d.ts +24 -0
  16. package/dist/events/chips-to-agent.d.ts.map +1 -0
  17. package/dist/events/chips-to-agent.js +324 -0
  18. package/dist/events/chips-to-agent.js.map +1 -0
  19. package/dist/events/chips-to-harness.d.ts +24 -0
  20. package/dist/events/chips-to-harness.d.ts.map +1 -0
  21. package/dist/events/chips-to-harness.js +324 -0
  22. package/dist/events/chips-to-harness.js.map +1 -0
  23. package/dist/events/harness-to-chips.d.ts +27 -0
  24. package/dist/events/harness-to-chips.d.ts.map +1 -0
  25. package/dist/events/harness-to-chips.js +390 -0
  26. package/dist/events/harness-to-chips.js.map +1 -0
  27. package/dist/events/index.d.ts +6 -0
  28. package/dist/events/index.d.ts.map +1 -0
  29. package/dist/events/index.js +5 -0
  30. package/dist/events/index.js.map +1 -0
  31. package/dist/events/workspace.d.ts +19 -0
  32. package/dist/events/workspace.d.ts.map +1 -0
  33. package/dist/events/workspace.js +79 -0
  34. package/dist/events/workspace.js.map +1 -0
  35. package/dist/frames.d.ts +175 -0
  36. package/dist/frames.d.ts.map +1 -0
  37. package/dist/frames.js +161 -0
  38. package/dist/frames.js.map +1 -0
  39. package/dist/generated/types.d.ts +4052 -0
  40. package/dist/generated/types.d.ts.map +1 -0
  41. package/dist/generated/types.js +7 -0
  42. package/dist/generated/types.js.map +1 -0
  43. package/dist/ids/index.d.ts +3 -0
  44. package/dist/ids/index.d.ts.map +1 -0
  45. package/dist/ids/index.js +2 -0
  46. package/dist/ids/index.js.map +1 -0
  47. package/dist/ids/ulid.d.ts +83 -0
  48. package/dist/ids/ulid.d.ts.map +1 -0
  49. package/dist/ids/ulid.js +199 -0
  50. package/dist/ids/ulid.js.map +1 -0
  51. package/dist/index.d.ts +18 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +13 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/primitives.d.ts +194 -0
  56. package/dist/primitives.d.ts.map +1 -0
  57. package/dist/primitives.js +193 -0
  58. package/dist/primitives.js.map +1 -0
  59. package/dist/src/address.d.ts +106 -0
  60. package/dist/src/address.d.ts.map +1 -0
  61. package/dist/src/address.js +141 -0
  62. package/dist/src/address.js.map +1 -0
  63. package/dist/src/agent-context-windows.d.ts +235 -0
  64. package/dist/src/agent-context-windows.d.ts.map +1 -0
  65. package/dist/src/agent-context-windows.js +213 -0
  66. package/dist/src/agent-context-windows.js.map +1 -0
  67. package/dist/src/agent-heartbeats.d.ts +106 -0
  68. package/dist/src/agent-heartbeats.d.ts.map +1 -0
  69. package/dist/src/agent-heartbeats.js +111 -0
  70. package/dist/src/agent-heartbeats.js.map +1 -0
  71. package/dist/src/agent-models.d.ts +158 -0
  72. package/dist/src/agent-models.d.ts.map +1 -0
  73. package/dist/src/agent-models.js +171 -0
  74. package/dist/src/agent-models.js.map +1 -0
  75. package/dist/src/agent-place.d.ts +76 -0
  76. package/dist/src/agent-place.d.ts.map +1 -0
  77. package/dist/src/agent-place.js +80 -0
  78. package/dist/src/agent-place.js.map +1 -0
  79. package/dist/src/agents.d.ts +24 -0
  80. package/dist/src/agents.d.ts.map +1 -0
  81. package/dist/src/agents.js +58 -0
  82. package/dist/src/agents.js.map +1 -0
  83. package/dist/src/capabilities.d.ts +121 -0
  84. package/dist/src/capabilities.d.ts.map +1 -0
  85. package/dist/src/capabilities.js +120 -0
  86. package/dist/src/capabilities.js.map +1 -0
  87. package/dist/src/checklist.d.ts +19 -0
  88. package/dist/src/checklist.d.ts.map +1 -0
  89. package/dist/src/checklist.js +22 -0
  90. package/dist/src/checklist.js.map +1 -0
  91. package/dist/src/commands.d.ts +50 -0
  92. package/dist/src/commands.d.ts.map +1 -0
  93. package/dist/src/commands.js +274 -0
  94. package/dist/src/commands.js.map +1 -0
  95. package/dist/src/connectors.d.ts +90 -0
  96. package/dist/src/connectors.d.ts.map +1 -0
  97. package/dist/src/connectors.js +119 -0
  98. package/dist/src/connectors.js.map +1 -0
  99. package/dist/src/context-files.d.ts +304 -0
  100. package/dist/src/context-files.d.ts.map +1 -0
  101. package/dist/src/context-files.js +247 -0
  102. package/dist/src/context-files.js.map +1 -0
  103. package/dist/src/context.d.ts +369 -0
  104. package/dist/src/context.d.ts.map +1 -0
  105. package/dist/src/context.js +526 -0
  106. package/dist/src/context.js.map +1 -0
  107. package/dist/src/direct-asks.d.ts +36 -0
  108. package/dist/src/direct-asks.d.ts.map +1 -0
  109. package/dist/src/direct-asks.js +43 -0
  110. package/dist/src/direct-asks.js.map +1 -0
  111. package/dist/src/envelope.d.ts +70 -0
  112. package/dist/src/envelope.d.ts.map +1 -0
  113. package/dist/src/envelope.js +46 -0
  114. package/dist/src/envelope.js.map +1 -0
  115. package/dist/src/events/catalogue.d.ts +50 -0
  116. package/dist/src/events/catalogue.d.ts.map +1 -0
  117. package/dist/src/events/catalogue.js +70 -0
  118. package/dist/src/events/catalogue.js.map +1 -0
  119. package/dist/src/events/chips-to-harness.d.ts +37 -0
  120. package/dist/src/events/chips-to-harness.d.ts.map +1 -0
  121. package/dist/src/events/chips-to-harness.js +511 -0
  122. package/dist/src/events/chips-to-harness.js.map +1 -0
  123. package/dist/src/events/harness-to-chips.d.ts +38 -0
  124. package/dist/src/events/harness-to-chips.d.ts.map +1 -0
  125. package/dist/src/events/harness-to-chips.js +593 -0
  126. package/dist/src/events/harness-to-chips.js.map +1 -0
  127. package/dist/src/events/index.d.ts +6 -0
  128. package/dist/src/events/index.d.ts.map +1 -0
  129. package/dist/src/events/index.js +5 -0
  130. package/dist/src/events/index.js.map +1 -0
  131. package/dist/src/events/workspace.d.ts +222 -0
  132. package/dist/src/events/workspace.d.ts.map +1 -0
  133. package/dist/src/events/workspace.js +1039 -0
  134. package/dist/src/events/workspace.js.map +1 -0
  135. package/dist/src/exchange.d.ts +262 -0
  136. package/dist/src/exchange.d.ts.map +1 -0
  137. package/dist/src/exchange.js +413 -0
  138. package/dist/src/exchange.js.map +1 -0
  139. package/dist/src/first-names.d.ts +29 -0
  140. package/dist/src/first-names.d.ts.map +1 -0
  141. package/dist/src/first-names.js +80 -0
  142. package/dist/src/first-names.js.map +1 -0
  143. package/dist/src/frames.d.ts +526 -0
  144. package/dist/src/frames.d.ts.map +1 -0
  145. package/dist/src/frames.js +346 -0
  146. package/dist/src/frames.js.map +1 -0
  147. package/dist/src/harness-jobs.d.ts +313 -0
  148. package/dist/src/harness-jobs.d.ts.map +1 -0
  149. package/dist/src/harness-jobs.js +210 -0
  150. package/dist/src/harness-jobs.js.map +1 -0
  151. package/dist/src/ids/index.d.ts +3 -0
  152. package/dist/src/ids/index.d.ts.map +1 -0
  153. package/dist/src/ids/index.js +2 -0
  154. package/dist/src/ids/index.js.map +1 -0
  155. package/dist/src/ids/ulid.d.ts +96 -0
  156. package/dist/src/ids/ulid.d.ts.map +1 -0
  157. package/dist/src/ids/ulid.js +212 -0
  158. package/dist/src/ids/ulid.js.map +1 -0
  159. package/dist/src/index.d.ts +81 -0
  160. package/dist/src/index.d.ts.map +1 -0
  161. package/dist/src/index.js +47 -0
  162. package/dist/src/index.js.map +1 -0
  163. package/dist/src/invite-link.d.ts +64 -0
  164. package/dist/src/invite-link.d.ts.map +1 -0
  165. package/dist/src/invite-link.js +99 -0
  166. package/dist/src/invite-link.js.map +1 -0
  167. package/dist/src/join.d.ts +188 -0
  168. package/dist/src/join.d.ts.map +1 -0
  169. package/dist/src/join.js +190 -0
  170. package/dist/src/join.js.map +1 -0
  171. package/dist/src/limits.d.ts +50 -0
  172. package/dist/src/limits.d.ts.map +1 -0
  173. package/dist/src/limits.js +106 -0
  174. package/dist/src/limits.js.map +1 -0
  175. package/dist/src/matters.d.ts +22 -0
  176. package/dist/src/matters.d.ts.map +1 -0
  177. package/dist/src/matters.js +26 -0
  178. package/dist/src/matters.js.map +1 -0
  179. package/dist/src/mentions.d.ts +63 -0
  180. package/dist/src/mentions.d.ts.map +1 -0
  181. package/dist/src/mentions.js +129 -0
  182. package/dist/src/mentions.js.map +1 -0
  183. package/dist/src/names.d.ts +58 -0
  184. package/dist/src/names.d.ts.map +1 -0
  185. package/dist/src/names.js +192 -0
  186. package/dist/src/names.js.map +1 -0
  187. package/dist/src/no-reply.d.ts +17 -0
  188. package/dist/src/no-reply.d.ts.map +1 -0
  189. package/dist/src/no-reply.js +48 -0
  190. package/dist/src/no-reply.js.map +1 -0
  191. package/dist/src/notifications.d.ts +81 -0
  192. package/dist/src/notifications.d.ts.map +1 -0
  193. package/dist/src/notifications.js +65 -0
  194. package/dist/src/notifications.js.map +1 -0
  195. package/dist/src/pages.d.ts +32 -0
  196. package/dist/src/pages.d.ts.map +1 -0
  197. package/dist/src/pages.js +32 -0
  198. package/dist/src/pages.js.map +1 -0
  199. package/dist/src/pairing.d.ts +99 -0
  200. package/dist/src/pairing.d.ts.map +1 -0
  201. package/dist/src/pairing.js +163 -0
  202. package/dist/src/pairing.js.map +1 -0
  203. package/dist/src/primitives.d.ts +267 -0
  204. package/dist/src/primitives.d.ts.map +1 -0
  205. package/dist/src/primitives.js +279 -0
  206. package/dist/src/primitives.js.map +1 -0
  207. package/dist/src/project.d.ts +335 -0
  208. package/dist/src/project.d.ts.map +1 -0
  209. package/dist/src/project.js +499 -0
  210. package/dist/src/project.js.map +1 -0
  211. package/dist/src/ranges.d.ts +31 -0
  212. package/dist/src/ranges.d.ts.map +1 -0
  213. package/dist/src/ranges.js +51 -0
  214. package/dist/src/ranges.js.map +1 -0
  215. package/dist/src/relay.d.ts +177 -0
  216. package/dist/src/relay.d.ts.map +1 -0
  217. package/dist/src/relay.js +147 -0
  218. package/dist/src/relay.js.map +1 -0
  219. package/dist/src/room-files.d.ts +146 -0
  220. package/dist/src/room-files.d.ts.map +1 -0
  221. package/dist/src/room-files.js +135 -0
  222. package/dist/src/room-files.js.map +1 -0
  223. package/dist/src/room-note.d.ts +213 -0
  224. package/dist/src/room-note.d.ts.map +1 -0
  225. package/dist/src/room-note.js +457 -0
  226. package/dist/src/room-note.js.map +1 -0
  227. package/dist/src/space-icons.d.ts +68 -0
  228. package/dist/src/space-icons.d.ts.map +1 -0
  229. package/dist/src/space-icons.js +142 -0
  230. package/dist/src/space-icons.js.map +1 -0
  231. package/dist/src/spend.d.ts +57 -0
  232. package/dist/src/spend.d.ts.map +1 -0
  233. package/dist/src/spend.js +94 -0
  234. package/dist/src/spend.js.map +1 -0
  235. package/dist/src/visibility.d.ts +170 -0
  236. package/dist/src/visibility.d.ts.map +1 -0
  237. package/dist/src/visibility.js +218 -0
  238. package/dist/src/visibility.js.map +1 -0
  239. package/fixtures/agent.asked.json +15 -0
  240. package/fixtures/agent.attached.json +15 -0
  241. package/fixtures/agent.deleted.json +16 -0
  242. package/fixtures/agent.fork.json +14 -0
  243. package/fixtures/agent.lock_set.json +13 -0
  244. package/fixtures/agent.registered.json +17 -0
  245. package/fixtures/agent.released.json +16 -0
  246. package/fixtures/agent.updated.json +14 -0
  247. package/fixtures/approval.executed.json +16 -0
  248. package/fixtures/approval.request.json +45 -0
  249. package/fixtures/approval.resolved.json +20 -0
  250. package/fixtures/approval.routed.json +20 -0
  251. package/fixtures/artifact.create.json +18 -0
  252. package/fixtures/attachment.fetched.json +15 -0
  253. package/fixtures/attachment.limits_set.json +15 -0
  254. package/fixtures/budget.warning.json +20 -0
  255. package/fixtures/checkpoint.json +16 -0
  256. package/fixtures/context.compacted.json +16 -0
  257. package/fixtures/context.usage.json +17 -0
  258. package/fixtures/exchange.limits_set.json +15 -0
  259. package/fixtures/exchange.set.json +13 -0
  260. package/fixtures/feedback.json +21 -0
  261. package/fixtures/frames/ack.json +6 -0
  262. package/fixtures/frames/context.edit.json +11 -0
  263. package/fixtures/frames/context_window.change.json +9 -0
  264. package/fixtures/frames/context_window.compact.json +8 -0
  265. package/fixtures/frames/error.json +6 -0
  266. package/fixtures/frames/event.json +20 -0
  267. package/fixtures/frames/events.json +39 -0
  268. package/fixtures/frames/folder.open.json +6 -0
  269. package/fixtures/frames/folder.open.page.json +7 -0
  270. package/fixtures/frames/folder.run.json +8 -0
  271. package/fixtures/frames/folder.run_state.json +12 -0
  272. package/fixtures/frames/heartbeat.change.json +10 -0
  273. package/fixtures/frames/hello.json +18 -0
  274. package/fixtures/frames/job.change.json +9 -0
  275. package/fixtures/frames/join.json +19 -0
  276. package/fixtures/frames/model.change.json +10 -0
  277. package/fixtures/frames/ping.json +4 -0
  278. package/fixtures/frames/pong.json +4 -0
  279. package/fixtures/frames/presence.json +12 -0
  280. package/fixtures/frames/receipt.json +5 -0
  281. package/fixtures/frames/restart.json +5 -0
  282. package/fixtures/frames/subscribe.json +6 -0
  283. package/fixtures/handoff.json +20 -0
  284. package/fixtures/harness.removed.json +15 -0
  285. package/fixtures/harness.transferred.json +15 -0
  286. package/fixtures/hello.json +61 -0
  287. package/fixtures/join.allowed.json +20 -0
  288. package/fixtures/join.denied.json +17 -0
  289. package/fixtures/lane.updated.json +17 -0
  290. package/fixtures/membership.added.json +16 -0
  291. package/fixtures/membership.removed.json +14 -0
  292. package/fixtures/membership.replaced.json +15 -0
  293. package/fixtures/message.deleted.json +15 -0
  294. package/fixtures/message.edited.json +15 -0
  295. package/fixtures/message.handed.json +14 -0
  296. package/fixtures/message.heard.json +14 -0
  297. package/fixtures/message.held.json +14 -0
  298. package/fixtures/message.hidden.json +14 -0
  299. package/fixtures/message.new.json +96 -0
  300. package/fixtures/message.overheard.json +22 -0
  301. package/fixtures/message.pinned.json +14 -0
  302. package/fixtures/message.post.json +14 -0
  303. package/fixtures/message.shown.json +14 -0
  304. package/fixtures/message.unpinned.json +14 -0
  305. package/fixtures/person.face_set.json +17 -0
  306. package/fixtures/person.joined.json +16 -0
  307. package/fixtures/person.removed.json +16 -0
  308. package/fixtures/person.renamed.json +14 -0
  309. package/fixtures/policy.updated.json +30 -0
  310. package/fixtures/project.changed.json +21 -0
  311. package/fixtures/question.answered.json +23 -0
  312. package/fixtures/question.ask.json +37 -0
  313. package/fixtures/receipt.json +15 -0
  314. package/fixtures/relay.set.json +12 -0
  315. package/fixtures/role.changed.json +15 -0
  316. package/fixtures/run.cancel.json +15 -0
  317. package/fixtures/run.completed.json +20 -0
  318. package/fixtures/run.failed.json +20 -0
  319. package/fixtures/run.pause.json +15 -0
  320. package/fixtures/run.plan.json +24 -0
  321. package/fixtures/run.requested.json +34 -0
  322. package/fixtures/run.resume.json +15 -0
  323. package/fixtures/run.started.json +33 -0
  324. package/fixtures/run.status.json +17 -0
  325. package/fixtures/run.steer.json +21 -0
  326. package/fixtures/session.ended.json +15 -0
  327. package/fixtures/session.renamed.json +15 -0
  328. package/fixtures/session.started.json +17 -0
  329. package/fixtures/space.claimed.json +15 -0
  330. package/fixtures/space.created.json +14 -0
  331. package/fixtures/space.erased.json +13 -0
  332. package/fixtures/space.lead_set.json +13 -0
  333. package/fixtures/space.lock_set.json +13 -0
  334. package/fixtures/space.spend_ceiling_set.json +13 -0
  335. package/fixtures/space.updated.json +14 -0
  336. package/fixtures/step.log.json +26 -0
  337. package/fixtures/task.json +22 -0
  338. package/fixtures/turn.passed.json +14 -0
  339. package/fixtures/usage.json +21 -0
  340. package/fixtures/workspace.renamed.json +13 -0
  341. package/generated/agent-connect.json +13966 -0
  342. package/generated/schema/agent.asked.json +114 -0
  343. package/generated/schema/agent.attached.json +465 -0
  344. package/generated/schema/agent.deleted.json +127 -0
  345. package/generated/schema/agent.fork.json +107 -0
  346. package/generated/schema/agent.lock_set.json +105 -0
  347. package/generated/schema/agent.registered.json +130 -0
  348. package/generated/schema/agent.released.json +129 -0
  349. package/generated/schema/agent.updated.json +151 -0
  350. package/generated/schema/approval.executed.json +125 -0
  351. package/generated/schema/approval.request.json +279 -0
  352. package/generated/schema/approval.resolved.json +162 -0
  353. package/generated/schema/approval.routed.json +185 -0
  354. package/generated/schema/artifact.create.json +206 -0
  355. package/generated/schema/attachment.fetched.json +114 -0
  356. package/generated/schema/attachment.limits_set.json +136 -0
  357. package/generated/schema/budget.warning.json +152 -0
  358. package/generated/schema/checkpoint.json +111 -0
  359. package/generated/schema/context.compacted.json +124 -0
  360. package/generated/schema/context.usage.json +120 -0
  361. package/generated/schema/exchange.limits_set.json +127 -0
  362. package/generated/schema/exchange.set.json +144 -0
  363. package/generated/schema/feedback.json +173 -0
  364. package/generated/schema/handoff.json +122 -0
  365. package/generated/schema/harness.removed.json +122 -0
  366. package/generated/schema/harness.transferred.json +117 -0
  367. package/generated/schema/hello.json +509 -0
  368. package/generated/schema/join.allowed.json +176 -0
  369. package/generated/schema/join.denied.json +150 -0
  370. package/generated/schema/lane.updated.json +223 -0
  371. package/generated/schema/membership.added.json +153 -0
  372. package/generated/schema/membership.removed.json +126 -0
  373. package/generated/schema/membership.replaced.json +106 -0
  374. package/generated/schema/message.deleted.json +105 -0
  375. package/generated/schema/message.edited.json +107 -0
  376. package/generated/schema/message.handed.json +111 -0
  377. package/generated/schema/message.heard.json +100 -0
  378. package/generated/schema/message.held.json +181 -0
  379. package/generated/schema/message.hidden.json +100 -0
  380. package/generated/schema/message.new.json +1369 -0
  381. package/generated/schema/message.overheard.json +701 -0
  382. package/generated/schema/message.pinned.json +100 -0
  383. package/generated/schema/message.post.json +290 -0
  384. package/generated/schema/message.shown.json +100 -0
  385. package/generated/schema/message.unpinned.json +100 -0
  386. package/generated/schema/person.face_set.json +134 -0
  387. package/generated/schema/person.joined.json +128 -0
  388. package/generated/schema/person.removed.json +133 -0
  389. package/generated/schema/person.renamed.json +114 -0
  390. package/generated/schema/policy.updated.json +277 -0
  391. package/generated/schema/project.changed.json +199 -0
  392. package/generated/schema/question.answered.json +154 -0
  393. package/generated/schema/question.ask.json +194 -0
  394. package/generated/schema/receipt.json +109 -0
  395. package/generated/schema/relay.set.json +99 -0
  396. package/generated/schema/role.changed.json +116 -0
  397. package/generated/schema/run.cancel.json +106 -0
  398. package/generated/schema/run.completed.json +139 -0
  399. package/generated/schema/run.failed.json +135 -0
  400. package/generated/schema/run.pause.json +106 -0
  401. package/generated/schema/run.plan.json +128 -0
  402. package/generated/schema/run.requested.json +309 -0
  403. package/generated/schema/run.resume.json +106 -0
  404. package/generated/schema/run.started.json +142 -0
  405. package/generated/schema/run.status.json +120 -0
  406. package/generated/schema/run.steer.json +163 -0
  407. package/generated/schema/session.ended.json +106 -0
  408. package/generated/schema/session.renamed.json +108 -0
  409. package/generated/schema/session.started.json +116 -0
  410. package/generated/schema/space.claimed.json +107 -0
  411. package/generated/schema/space.created.json +148 -0
  412. package/generated/schema/space.erased.json +129 -0
  413. package/generated/schema/space.lead_set.json +108 -0
  414. package/generated/schema/space.lock_set.json +99 -0
  415. package/generated/schema/space.spend_ceiling_set.json +102 -0
  416. package/generated/schema/space.updated.json +112 -0
  417. package/generated/schema/step.log.json +187 -0
  418. package/generated/schema/task.json +268 -0
  419. package/generated/schema/turn.passed.json +99 -0
  420. package/generated/schema/usage.json +155 -0
  421. package/generated/schema/workspace.renamed.json +107 -0
  422. package/generated/types.ts +4178 -0
  423. package/package.json +37 -3
@@ -0,0 +1,218 @@
1
+ /**
2
+ * Who may see an event (phase-0-review finding 6).
3
+ *
4
+ * Reading the log and subscribing to it are both scoped by membership: a credential sees the
5
+ * spaces it belongs to, and nothing else. Before this, any credential in a workspace
6
+ * could read every space's events, including a direct space it was not in.
7
+ *
8
+ * The rule, in one place so the live path and the replay path cannot drift:
9
+ *
10
+ * - An event that belongs to a space is visible only to that space's members.
11
+ * - An event with no space — a workspace-wide thing — is visible to everyone in the
12
+ * workspace. In Phase 1 nothing appends one in normal flow; the ones that arrive in M1.4 and
13
+ * M3 (a policy change, a budget warning) will want per-recipient scoping, which is theirs to
14
+ * add. What an agent said in no room (`message.held`, ADR 0087) has no space either, and is
15
+ * its harness's alone: its words are for the room it joins next, not for the workspace.
16
+ * - A person asking for a copy of an agent (`agent.fork`, ADR 0087) is visible to the agent's
17
+ * harness, which makes the copy for a room it is not in.
18
+ * - A person asking a harness for a new agent (`agent.asked`, ADR 0108) is visible to that
19
+ * harness, which makes the agent for a room it is not in.
20
+ * - A harness's agent being made, renamed, archived, given a face or deleted (`agent.registered`,
21
+ * `agent.updated`, `agent.deleted`) has no space either, and went to everybody: a guest in no room with the
22
+ * agent, and every other harness, were sent its name and its harness's own key for it (agents
23
+ * review, finding 3). It is its harness's to hear, and anybody's who is told every agent: an
24
+ * owner or admin of the workspace. Since his call of 19 October 2026 (ADR 0034's addendum) that
25
+ * is no longer every person who is not a guest: a member is told the agents in their rooms, as
26
+ * a guest is. Whoever shares a room with the agent, and a person who owns its harness, are told
27
+ * too, which the caller works out, since a room is not something an event with none can say.
28
+ * - The event that adds or removes a participant is always visible to that participant, so a
29
+ * person can see themselves join a space they are not yet listed in.
30
+ * - The event that opens a space is visible to whoever opened it, who is its first
31
+ * member (ADR 0018) but is not yet listed anywhere a live session has read — and to the
32
+ * person it was opened *for*, since ADR 0024, because a harness opens a space for its owner
33
+ * as it finds one and they would otherwise never be sent the event that names it — and to the
34
+ * harness it was asked *of*, when a person opens a room for a harness to claim, which is how
35
+ * the harness hears that there is one before it is added to it.
36
+ * - The event that opens a thread is visible to everyone in the space it grows in (M5.4): a
37
+ * thread has no members of its own, and its events are theirs from then on.
38
+ * - An approval that names the viewer as somebody who may answer it is visible to them
39
+ * wherever it is (M5.5): the lane's lead, handed a low-risk ask by policy, is not in the
40
+ * specialist's room and would otherwise never be sent what it is to decide. Since ADR 0042 a
41
+ * person named from elsewhere in the workspace is in the same position, and the decision and
42
+ * its outcome name them too, so what they were sent is answered on their screen as well.
43
+ * - A message a person deleted for themselves, and their Undo (ADR 0167), are theirs alone,
44
+ * though they belong to a room: nobody else in it, and no harness, is told that one person
45
+ * stopped seeing a line. The one rule that takes something away from a room's members.
46
+ *
47
+ * The replay path builds a SQL predicate from the same member set (see the server's event store)
48
+ * plus the membership events naming the viewer. The join needs no special case — a viewer's set
49
+ * already lists every space they are in — but a removal is from a space they are no longer in,
50
+ * and a client resuming after it left a space elsewhere must still be told.
51
+ *
52
+ * It lives with the protocol so that the server and the conformance fake ask the same function:
53
+ * the fake's own copy had come to send what an agent said in no room to everybody (agents
54
+ * review, finding 37).
55
+ */
56
+ /** The ids a viewer answers to: itself, and a harness's agents. */
57
+ function idsOf(viewer) {
58
+ return [viewer.participantId, ...(viewer.alsoIs ?? [])];
59
+ }
60
+ /** The events that add a participant to a space or remove one. Always visible to that participant. */
61
+ export const MEMBERSHIP_EVENTS = new Set([
62
+ "membership.added",
63
+ "membership.removed",
64
+ "membership.replaced",
65
+ ]);
66
+ /**
67
+ * Where an agent is (ADR 0087): put in a room or taken out of one. The room is told, as of
68
+ * anything in it, and so is the agent's harness, which has left the room by the time its agent's
69
+ * release is written. Nobody else: a person reads an agent's room from the directory, and an
70
+ * event naming a room a client has never heard of would make it one.
71
+ */
72
+ export const WHEREABOUTS_EVENTS = new Set([
73
+ "agent.attached",
74
+ "agent.released",
75
+ ]);
76
+ /**
77
+ * A person asking for a copy of an agent in a room (ADR 0087, Fork). The room is told, as of
78
+ * anything in it, and so is the agent's harness, which makes the copy: the agent it names is in
79
+ * another room, so its harness is not a member of the room the copy is for.
80
+ */
81
+ export const FORK_EVENTS = new Set(["agent.fork"]);
82
+ /**
83
+ * A person asking a harness for a new agent in a room (ADR 0108). The room is told, as of anything
84
+ * in it, and so is the harness the event names, which makes the agent: no agent of its is there
85
+ * yet, and a harness is a member of no room itself.
86
+ */
87
+ export const ASK_EVENTS = new Set(["agent.asked"]);
88
+ /**
89
+ * What an agent said while in no room (ADR 0087, rule 6). It has no space, so the workspace-wide
90
+ * rule would send it to everyone — every person, guests too, and every other harness — before
91
+ * the room it is meant for hears it. Only the agent's own harness is told; a person reads how
92
+ * many wait from the directory (`held`).
93
+ */
94
+ export const HELD_EVENTS = new Set(["message.held"]);
95
+ /**
96
+ * A harness's agent made or changed (ADR 0087): who it is, what it is called, whether it is
97
+ * archived, the face it wears. No space, and not everybody's: see the rule above.
98
+ */
99
+ export const DIRECTORY_EVENTS = new Set([
100
+ "agent.registered",
101
+ "agent.updated",
102
+ "agent.deleted",
103
+ ]);
104
+ /**
105
+ * What came of a join request (ADR 0122): who asked, from where, and what a person let in. No
106
+ * space, and not everybody's: a harness and a guest are told nothing of who else is let in. A
107
+ * person who sees the whole directory is, as they see the harness appear in it.
108
+ */
109
+ export const JOIN_EVENTS = new Set(["join.allowed", "join.denied"]);
110
+ /**
111
+ * A person's face chosen (ADR 0139). No space, and a person's to see, not a harness's: a harness
112
+ * draws nobody, and one that does not know the event has no business being sent it. A person who
113
+ * sees the directory is told, as of a join; a guest reads it the next time it reads who is who.
114
+ */
115
+ export const FACE_EVENTS = new Set(["person.face_set"]);
116
+ /**
117
+ * An agent's changes locked or let go (ADR 0199). No space, and a person's to see, not a harness's,
118
+ * as a face is: the lock holds people's hands, and a harness is held by nothing it says. A person
119
+ * told every agent is told; anybody else reads it the next time they read who is who.
120
+ */
121
+ export const LOCK_EVENTS = new Set(["agent.lock_set"]);
122
+ /**
123
+ * A person deleting a message for themselves, and taking that back (ADR 0167). They belong to the
124
+ * room the message is in, and are sent only to the person who did them, on each of their devices.
125
+ */
126
+ export const SELF_EVENTS = new Set(["message.hidden", "message.shown"]);
127
+ /** Whether an event with no space is this viewer's: most are everybody's, and five kinds are not. */
128
+ function seesRoomless(event, viewer) {
129
+ const agent = String(event.payload["agent_id"]);
130
+ if (HELD_EVENTS.has(event.type))
131
+ return idsOf(viewer).includes(agent);
132
+ if (JOIN_EVENTS.has(event.type) || FACE_EVENTS.has(event.type)) {
133
+ return viewer.seesDirectory === true;
134
+ }
135
+ if (LOCK_EVENTS.has(event.type))
136
+ return viewer.seesAgents === true;
137
+ if (!DIRECTORY_EVENTS.has(event.type))
138
+ return true;
139
+ return (viewer.seesAgents === true ||
140
+ idsOf(viewer).includes(agent) ||
141
+ event.payload["harness_id"] === viewer.participantId);
142
+ }
143
+ /**
144
+ * Whether a live event should be delivered to a viewer. For `DIRECTORY_EVENTS` a caller that
145
+ * gets `false` asks one thing more, which this cannot: whether the viewer shares a room with the
146
+ * agent the event is about, or is a person who owns its harness.
147
+ */
148
+ export function canSee(event, viewer) {
149
+ if (SELF_EVENTS.has(event.type))
150
+ return event.actor.id === viewer.participantId;
151
+ const space = event.space_id;
152
+ if (space === null)
153
+ return seesRoomless(event, viewer);
154
+ if (viewer.memberSpaces.has(space))
155
+ return true;
156
+ const ids = idsOf(viewer);
157
+ if (MEMBERSHIP_EVENTS.has(event.type))
158
+ return ids.some((id) => namesViewer(event, id));
159
+ if (WHEREABOUTS_EVENTS.has(event.type) || FORK_EVENTS.has(event.type)) {
160
+ return ids.includes(String(event.payload["agent_id"]));
161
+ }
162
+ if (ASK_EVENTS.has(event.type))
163
+ return event.payload["harness_id"] === viewer.participantId;
164
+ return (opensFor(event, viewer.participantId) ||
165
+ opensThreadIn(event, viewer.memberSpaces) ||
166
+ ids.some((id) => namesApprover(event, id)));
167
+ }
168
+ /**
169
+ * The events that carry who may answer an approval, resolved to ids. The two decisions are
170
+ * here as well since ADR 0042: somebody named outside the room is sent the ask, so they are
171
+ * sent what came of it — otherwise the card on their phone would never cool.
172
+ */
173
+ export const APPROVER_EVENTS = new Set([
174
+ "approval.request",
175
+ "approval.routed",
176
+ "approval.resolved",
177
+ "approval.executed",
178
+ ]);
179
+ /** True when an approval names the viewer as somebody who may answer it (M5.5). */
180
+ export function namesApprover(event, participantId) {
181
+ if (!APPROVER_EVENTS.has(event.type))
182
+ return false;
183
+ const approvers = event.payload["approvers"];
184
+ return Array.isArray(approvers) && approvers.includes(participantId);
185
+ }
186
+ /** True when this opens a thread in one of the viewer's spaces, which makes it theirs too (M5.4). */
187
+ export function opensThreadIn(event, memberSpaces) {
188
+ if (event.type !== "space.created")
189
+ return false;
190
+ const parent = event.payload["parent_space_id"];
191
+ return typeof parent === "string" && memberSpaces.has(parent);
192
+ }
193
+ /**
194
+ * True when this is a space being opened for the viewer: by them, on their behalf, or for them
195
+ * to claim. A harness asked beside another from the + (`also_asked_of`) is asked as much as the
196
+ * first: it was sent nothing until its next `hello`, so it never learnt the room was asked of it,
197
+ * and the first words there went unanswered (agents review, finding 17).
198
+ */
199
+ export function opensFor(event, participantId) {
200
+ if (event.type !== "space.created")
201
+ return false;
202
+ const also = event.payload["also_asked_of"];
203
+ return (event.actor.id === participantId ||
204
+ event.payload["opened_for"] === participantId ||
205
+ event.payload["asked_of"] === participantId ||
206
+ (Array.isArray(also) && also.includes(participantId)));
207
+ }
208
+ /**
209
+ * True when a membership event is about this viewer, so they see the moment they are added: the
210
+ * one added or removed, or either side of a replacement (ADR 0087).
211
+ */
212
+ export function namesViewer(event, participantId) {
213
+ const { payload } = event;
214
+ return (payload["participant_id"] === participantId ||
215
+ (event.type === "membership.replaced" &&
216
+ (payload["to"] === participantId || payload["from"] === participantId)));
217
+ }
218
+ //# sourceMappingURL=visibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visibility.js","sourceRoot":"","sources":["../../src/visibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAgCH,mEAAmE;AACnE,SAAS,KAAK,CAAC,MAAc;IAC3B,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,sGAAsG;AACtG,MAAM,CA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000N1",
5
+ "ts": "2026-10-03T18:58:00.000Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "person",
10
+ "id": "usr_01K4ZQPX000000000000000003"
11
+ },
12
+ "harness_id": "hrn_01K4ZQPX000000000000000004",
13
+ "name": "Reviewer",
14
+ "by": "usr_01K4ZQPX000000000000000003"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "v": 1,
3
+ "type": "agent.attached",
4
+ "id": "evt_01K4ZQPX0000000000000000G3",
5
+ "ts": "2026-09-30T09:06:00.004Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "actor": {
8
+ "kind": "person",
9
+ "id": "usr_01K4ZQPX000000000000000003"
10
+ },
11
+ "agent_id": "agt_01K4ZQPX0000000000000000A1",
12
+ "space_id": "spc_01K4ZQPX000000000000000002",
13
+ "by": "usr_01K4ZQPX000000000000000003",
14
+ "moved_from": "spc_01K4ZQPX0000000000000000S7"
15
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "v": 1,
3
+ "type": "agent.deleted",
4
+ "id": "evt_01K4ZQPX0000000000000000G6",
5
+ "ts": "2026-10-02T17:05:00.000Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "actor": {
8
+ "kind": "person",
9
+ "id": "usr_01K4ZQPX000000000000000003"
10
+ },
11
+ "agent_id": "agt_01K4ZQPX0000000000000000A1",
12
+ "harness_id": "hrn_01K4ZQPX000000000000000004",
13
+ "key": "space-kitchen",
14
+ "name": "Kitchen and bath",
15
+ "by": "usr_01K4ZQPX000000000000000003"
16
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "v": 1,
3
+ "type": "agent.fork",
4
+ "id": "evt_01K4ZQPX0000000000000000F1",
5
+ "ts": "2026-10-01T16:12:00.000Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "person",
10
+ "id": "usr_01K4ZQPX000000000000000003"
11
+ },
12
+ "agent_id": "agt_01K4ZQPX0000000000000000A1",
13
+ "by": "usr_01K4ZQPX000000000000000003"
14
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "v": 1,
3
+ "type": "agent.lock_set",
4
+ "id": "evt_01K4ZQPX0000000000000000Z7",
5
+ "ts": "2026-10-18T07:00:00.000Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "actor": {
8
+ "kind": "person",
9
+ "id": "usr_01K4ZQPX000000000000000003"
10
+ },
11
+ "agent_id": "agt_01K4ZQPX0000000000000000A1",
12
+ "locked": true
13
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "v": 1,
3
+ "type": "agent.registered",
4
+ "id": "evt_01K4ZQPX0000000000000000G1",
5
+ "ts": "2026-09-30T09:00:00.004Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "actor": {
8
+ "kind": "harness",
9
+ "id": "hrn_01K4ZQPX000000000000000004"
10
+ },
11
+ "idempotency_key": "agent-hrn_01K4ZQPX000000000000000004-e0d0f115",
12
+ "agent_id": "agt_01K4ZQPX0000000000000000A1",
13
+ "harness_id": "hrn_01K4ZQPX000000000000000004",
14
+ "key": "e0d0f115",
15
+ "name": "Kitchen remodel",
16
+ "lead": false
17
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "v": 1,
3
+ "type": "agent.released",
4
+ "id": "evt_01K4ZQPX0000000000000000G4",
5
+ "ts": "2026-09-30T09:06:00.002Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "actor": {
8
+ "kind": "system",
9
+ "id": "system"
10
+ },
11
+ "agent_id": "agt_01K4ZQPX0000000000000000A1",
12
+ "space_id": "spc_01K4ZQPX0000000000000000S7",
13
+ "by": "usr_01K4ZQPX000000000000000003",
14
+ "reason": "moved",
15
+ "moved_to": "spc_01K4ZQPX000000000000000002"
16
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "v": 1,
3
+ "type": "agent.updated",
4
+ "id": "evt_01K4ZQPX0000000000000000G2",
5
+ "ts": "2026-09-30T09:05:00.004Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "actor": {
8
+ "kind": "harness",
9
+ "id": "hrn_01K4ZQPX000000000000000004"
10
+ },
11
+ "agent_id": "agt_01K4ZQPX0000000000000000A1",
12
+ "name": "Kitchen and bath",
13
+ "state": "active"
14
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "v": 1,
3
+ "type": "approval.executed",
4
+ "id": "evt_01K4ZQPX000000000000000070",
5
+ "ts": "2026-09-02T14:22:12.004Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "harness",
10
+ "id": "hrn_01K4ZQPX000000000000000004"
11
+ },
12
+ "run_id": "run_01K4ZQPX000000000000000005",
13
+ "approval_id": "apr_01K4ZQPX000000000000000006",
14
+ "outcome": "executed",
15
+ "detail": "Sent to dana@northwind.com at 14:31."
16
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "v": 1,
3
+ "type": "approval.request",
4
+ "id": "evt_01K4ZQPX000000000000000068",
5
+ "ts": "2026-09-02T14:22:04.004Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "harness",
10
+ "id": "hrn_01K4ZQPX000000000000000004"
11
+ },
12
+ "run_id": "run_01K4ZQPX000000000000000005",
13
+ "approval_id": "apr_01K4ZQPX000000000000000006",
14
+ "step_id": "email-dana",
15
+ "action": {
16
+ "kind": "email.send",
17
+ "input": {
18
+ "to": "dana@northwind.com",
19
+ "subject": "PO #4471 confirmation"
20
+ },
21
+ "external": true,
22
+ "irreversible": true
23
+ },
24
+ "question": "Send this email to dana@northwind.com?",
25
+ "effect": "It confirms PO #4471 for 120 units, delivered 19 September.",
26
+ "lasts": "once",
27
+ "preview": {
28
+ "format": "markdown",
29
+ "title": "To dana@northwind.com",
30
+ "body": "Hi Dana, confirming PO #4471 for 120 units, delivery 19 September. Shout if anything looks off."
31
+ },
32
+ "risk": ["external_communication", "irreversible"],
33
+ "sources": [
34
+ {
35
+ "kind": "external",
36
+ "label": "vendor website",
37
+ "url": "https://northwind.example/contact"
38
+ }
39
+ ],
40
+ "expires_in": 3600,
41
+ "fallback": "deny",
42
+ "approvers": ["usr_01K4ZQPX000000000000000003"],
43
+ "editable": true,
44
+ "resume_token": "rt_9f2c7d0184a05c3b"
45
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "v": 1,
3
+ "type": "approval.resolved",
4
+ "id": "evt_01K4ZQPX000000000000000076",
5
+ "ts": "2026-09-02T14:22:18.004Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "system",
10
+ "id": "system"
11
+ },
12
+ "run_id": "run_01K4ZQPX000000000000000005",
13
+ "approval_id": "apr_01K4ZQPX000000000000000006",
14
+ "decision": "approved",
15
+ "scope": "once",
16
+ "reason": "Looks right. Send it.",
17
+ "resolved_by": "usr_01K4ZQPX000000000000000003",
18
+ "resolved_at": "2026-09-02T14:30:12.881Z",
19
+ "resolved_elsewhere": false
20
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "v": 1,
3
+ "type": "approval.routed",
4
+ "id": "evt_01K4ZQPX0000000000000000D8",
5
+ "ts": "2026-09-06T12:04:00.004Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "run_id": "run_01K4ZQPX000000000000000005",
9
+ "actor": {
10
+ "kind": "person",
11
+ "id": "usr_01K4ZQPX000000000000000003"
12
+ },
13
+ "idempotency_key": "route-1",
14
+ "approval_id": "apr_01K4ZQPX000000000000000006",
15
+ "to": ["usr_01K4ZQPX000000000000000009"],
16
+ "approvers": ["usr_01K4ZQPX000000000000000009"],
17
+ "reason": "Dana knows the Northwind account.",
18
+ "routed_by": "usr_01K4ZQPX000000000000000003",
19
+ "routed_at": "2026-09-06T12:04:00.004Z"
20
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "v": 1,
3
+ "type": "artifact.create",
4
+ "id": "evt_01K4ZQPX00000000000000006A",
5
+ "ts": "2026-09-02T14:22:06.004Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "harness",
10
+ "id": "hrn_01K4ZQPX000000000000000004"
11
+ },
12
+ "run_id": "run_01K4ZQPX000000000000000005",
13
+ "artifact_id": "att_01K4ZQPX00000000000000000C",
14
+ "kind": "document",
15
+ "title": "Northwind confirmation, PO #4471",
16
+ "version": 1,
17
+ "body": "Hi Dana, confirming PO #4471 for 120 units, delivery 19 September."
18
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "v": 1,
3
+ "type": "attachment.fetched",
4
+ "id": "evt_01K4ZQPX0000000000000000CC",
5
+ "ts": "2026-09-02T14:22:16.504Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "harness",
10
+ "id": "hrn_01K4ZQPX000000000000000004"
11
+ },
12
+ "attachment_id": "att_01K4ZQPX000000000000000008",
13
+ "filename": "PO-4471.pdf",
14
+ "by": "hrn_01K4ZQPX000000000000000004"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "v": 1,
3
+ "type": "attachment.limits_set",
4
+ "id": "evt_01K4ZQPX0000000000000000E9",
5
+ "ts": "2026-09-10T09:05:00.000Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "actor": {
8
+ "kind": "person",
9
+ "id": "usr_01K4ZQPX000000000000000003"
10
+ },
11
+ "idempotency_key": "limits-1",
12
+ "image_bytes": 26214400,
13
+ "video_bytes": 104857600,
14
+ "file_bytes": null
15
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "v": 1,
3
+ "type": "budget.warning",
4
+ "id": "evt_01K4ZQPX00000000000000007D",
5
+ "ts": "2026-09-02T14:22:25.004Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "system",
10
+ "id": "system"
11
+ },
12
+ "budget": {
13
+ "limit_usd": 3,
14
+ "spent_usd": 2.41
15
+ },
16
+ "threshold": 80,
17
+ "action": "warn",
18
+ "scope": "job",
19
+ "since_seq": 14049
20
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "v": 1,
3
+ "type": "checkpoint",
4
+ "id": "evt_01K4ZQPX00000000000000006B",
5
+ "ts": "2026-09-02T14:22:07.004Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "harness",
10
+ "id": "hrn_01K4ZQPX000000000000000004"
11
+ },
12
+ "run_id": "run_01K4ZQPX000000000000000005",
13
+ "label": "PO read and the CRM record checked.",
14
+ "next": "Draft the confirmation email.",
15
+ "compacted": false
16
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "v": 1,
3
+ "type": "context.compacted",
4
+ "id": "evt_01K4ZQPX0000000000000000C7",
5
+ "ts": "2026-10-09T18:30:00.000Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "agent",
10
+ "id": "agt_01K4ZQPX0000000000000000A1"
11
+ },
12
+ "from": 214000,
13
+ "to": 21000,
14
+ "window": 272000,
15
+ "by": "itself"
16
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "v": 1,
3
+ "type": "context.usage",
4
+ "id": "evt_01K4ZQPX00000000000000006F",
5
+ "ts": "2026-09-02T14:22:11.004Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "harness",
10
+ "id": "hrn_01K4ZQPX000000000000000004"
11
+ },
12
+ "run_id": "run_01K4ZQPX000000000000000005",
13
+ "used_tokens": 82000,
14
+ "limit_tokens": 200000,
15
+ "model": "opus-5",
16
+ "compacted": false
17
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "v": 1,
3
+ "type": "exchange.limits_set",
4
+ "id": "evt_01K4ZQPX0000000000000000M1",
5
+ "ts": "2026-10-17T15:30:00.000Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "actor": {
8
+ "kind": "person",
9
+ "id": "usr_01K4ZQPX000000000000000003"
10
+ },
11
+ "idempotency_key": "exchange-limits-1",
12
+ "stop": 32,
13
+ "hold": null,
14
+ "circles": false
15
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "v": 1,
3
+ "type": "exchange.set",
4
+ "id": "evt_01K4ZQPX0000000000000000X1",
5
+ "ts": "2026-10-02T18:53:00.000Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "person",
10
+ "id": "usr_01K4ZQPX000000000000000003"
11
+ },
12
+ "state": "paused"
13
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "v": 1,
3
+ "type": "feedback",
4
+ "id": "evt_01K4ZQPX00000000000000007F",
5
+ "ts": "2026-09-02T14:22:27.004Z",
6
+ "workspace_id": "ws_01K4ZQPX000000000000000001",
7
+ "space_id": "spc_01K4ZQPX000000000000000002",
8
+ "actor": {
9
+ "kind": "person",
10
+ "id": "usr_01K4ZQPX000000000000000003"
11
+ },
12
+ "message_id": "msg_01K4ZQPX000000000000000067",
13
+ "kind": "correction",
14
+ "text": "The delivery date is the 19th, not the 12th.",
15
+ "from": {
16
+ "participant_id": "usr_01K4ZQPX000000000000000003",
17
+ "kind": "person",
18
+ "display_name": "Arjun",
19
+ "role": "owner"
20
+ }
21
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "frame": "ack",
3
+ "idempotency_key": "scout-run-5-step-2",
4
+ "seq": 42,
5
+ "duplicate": false
6
+ }