@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,99 @@
1
+ /**
2
+ * The pairing payload (M4.1, ADR 0038): what a QR carries, and what `POST /v1/pairing-codes`
3
+ * answers beside the code.
4
+ *
5
+ * Since Gate 2 a QR has been an address with the code in its fragment —
6
+ * `http://192.168.1.20:4431/#pair=ABC-234` — which a phone's camera opens and the page reads.
7
+ * That stays the shape. What joins it, in the same fragment, is everything else a phone needs
8
+ * to reach the server when it is not on that network: the relay to dial, the server's tunnel
9
+ * key to ask for there and to authenticate it by, a version, and a list of candidate addresses
10
+ * for a direct path across the internet that is empty in v0. A QR without a version is one
11
+ * from before this, and reads as a code alone.
12
+ *
13
+ * The fragment rather than the query, as before: a fragment never reaches a server's log.
14
+ */
15
+ import { z } from "zod";
16
+ /** The payload's version. Bumped when a field's meaning changes, never for a new field. */
17
+ export declare const PAIRING_VERSION = 1;
18
+ /** Six characters from thirty-two, in two groups, as `chips serve` prints them. */
19
+ export declare const pairingCode: z.ZodString;
20
+ /**
21
+ * A code as somebody typed it, in the form a code is compared in (SEC-6): upper case, the dash
22
+ * put back after the third character, whatever else was typed between the characters dropped.
23
+ * Anything that is not six characters of the alphabet comes back as typed, trimmed, which no code
24
+ * matches.
25
+ */
26
+ export declare function pairingCodeTyped(typed: string): string;
27
+ /** The server's tunnel key: thirty-two bytes, base64url without padding. */
28
+ export declare const serverKey: z.ZodString;
29
+ export declare const pairingPayload: z.ZodObject<{
30
+ v: z.ZodInt;
31
+ code: z.ZodString;
32
+ lan: z.ZodOptional<z.ZodURL>;
33
+ relay: z.ZodOptional<z.ZodURL>;
34
+ key: z.ZodOptional<z.ZodString>;
35
+ candidates: z.ZodDefault<z.ZodArray<z.ZodObject<{
36
+ address: z.ZodString;
37
+ }, z.core.$loose>>>;
38
+ }, z.core.$strip>;
39
+ export type PairingPayload = z.infer<typeof pairingPayload>;
40
+ /** What a server offers beside a code, and what a QR carries beside it. */
41
+ export interface PairingOffer {
42
+ readonly relay?: string | undefined;
43
+ readonly key?: string | undefined;
44
+ /**
45
+ * The server on its network, when that is not the address the QR opens: a page served from
46
+ * somewhere else — the desktop app — names the server it is paired with here.
47
+ */
48
+ readonly lan?: string | undefined;
49
+ }
50
+ /**
51
+ * The text a QR carries: the address the phone should try first, with the code and the rest in
52
+ * the fragment. `base` is that address — the LAN address when the server is bound to the
53
+ * network, else its own.
54
+ */
55
+ export declare function pairingUrl(base: string, code: string, offer?: PairingOffer): string;
56
+ /**
57
+ * The same payload as a link the installed app opens: `chips://pair?pair=ABC-234&v=1&lan=…`.
58
+ *
59
+ * A QR's address opens in a browser, and a browser makes a device key only on a secure origin,
60
+ * which a server's plain-HTTP address on a home network or a tailnet never is. The app has no
61
+ * such rule. So a page that cannot pair offers this link instead, and `pnpm phone` hands it to
62
+ * the app directly at launch, with nobody typing anything. The server's address travels in the
63
+ * query as `lan`, because a `chips://` link has no origin of its own to fall back on.
64
+ */
65
+ export declare function appPairingUrl(server: string, code: string, offer?: PairingOffer): string;
66
+ /** Where a pairing link opens at a relay (ADR 0210): the page a computer is sent to. */
67
+ export declare const RELAY_PAIR_PATH = "/pair";
68
+ /**
69
+ * The link a phone sends a computer to pair it, when the server has a relay (ADR 0210): the relay's
70
+ * own page, with the payload in its fragment and the server beside it as `lan`. The relay is on the
71
+ * open internet where the server may not be, so the link opens on any network; the page hands the
72
+ * payload to Chips for Mac as `chips://pair?…`, or to the server's own page for a browser on its
73
+ * network. The fragment never reaches the relay. `until` is when the code runs out, in seconds, so
74
+ * the page can say so instead of letting a pairing fail.
75
+ *
76
+ * https://relay.chipschat.ai/pair#pair=ABC-234&v=1&lan=https://host&relay=wss://…&key=…&until=…
77
+ */
78
+ export declare function pairRelayUrl(relay: string, code: string, offer: {
79
+ readonly lan: string;
80
+ readonly key: string;
81
+ readonly until?: number | undefined;
82
+ }): string;
83
+ /**
84
+ * The payload in a link somebody pasted (ADR 0210): the relay's page, the server's own page, or
85
+ * the app's `chips://pair?…`. Nothing when it carries no code, and nothing for a relay page that
86
+ * names no server, since its own origin is the relay's and no server answers there.
87
+ */
88
+ export declare function pairingFromLink(text: string): PairingPayload | undefined;
89
+ /**
90
+ * The payload in an address: the fragment first, and the query for a link somebody rewrote.
91
+ * Nothing when there is no code. A QR from before M4.1 reads as version 0 with the code and,
92
+ * when the address has an origin, that origin as the network to try.
93
+ */
94
+ export declare function pairingFromUrl(url: {
95
+ readonly origin?: string | undefined;
96
+ readonly search: string;
97
+ readonly hash: string;
98
+ }): PairingPayload | undefined;
99
+ //# sourceMappingURL=pairing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pairing.d.ts","sourceRoot":"","sources":["../../src/pairing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,2FAA2F;AAC3F,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC,mFAAmF;AACnF,eAAO,MAAM,WAAW,aAAkE,CAAC;AAE3F;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAItD;AAED,4EAA4E;AAC5E,eAAO,MAAM,SAAS,aAA0D,CAAC;AAEjF,eAAO,MAAM,cAAc;;;;;;;;;iBAiBzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,2EAA2E;AAC3E,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,YAAiB,GAAG,MAAM,CAOvF;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,YAAiB,GAAG,MAAM,CAM5F;AAED,wFAAwF;AACxF,eAAO,MAAM,eAAe,UAAU,CAAC;AAEvC;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GACzF,MAAM,CASR;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAexE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,GAAG,cAAc,GAAG,SAAS,CA0B7B"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * The pairing payload (M4.1, ADR 0038): what a QR carries, and what `POST /v1/pairing-codes`
3
+ * answers beside the code.
4
+ *
5
+ * Since Gate 2 a QR has been an address with the code in its fragment —
6
+ * `http://192.168.1.20:4431/#pair=ABC-234` — which a phone's camera opens and the page reads.
7
+ * That stays the shape. What joins it, in the same fragment, is everything else a phone needs
8
+ * to reach the server when it is not on that network: the relay to dial, the server's tunnel
9
+ * key to ask for there and to authenticate it by, a version, and a list of candidate addresses
10
+ * for a direct path across the internet that is empty in v0. A QR without a version is one
11
+ * from before this, and reads as a code alone.
12
+ *
13
+ * The fragment rather than the query, as before: a fragment never reaches a server's log.
14
+ */
15
+ import { z } from "zod";
16
+ import { candidateAddresses } from "./relay.js";
17
+ /** The payload's version. Bumped when a field's meaning changes, never for a new field. */
18
+ export const PAIRING_VERSION = 1;
19
+ /** Six characters from thirty-two, in two groups, as `chips serve` prints them. */
20
+ export const pairingCode = z.string().regex(/^[A-Z2-9]{3}-[A-Z2-9]{3}$/, "a pairing code");
21
+ /**
22
+ * A code as somebody typed it, in the form a code is compared in (SEC-6): upper case, the dash
23
+ * put back after the third character, whatever else was typed between the characters dropped.
24
+ * Anything that is not six characters of the alphabet comes back as typed, trimmed, which no code
25
+ * matches.
26
+ */
27
+ export function pairingCodeTyped(typed) {
28
+ const characters = typed.toUpperCase().replace(/[^A-Z2-9]/g, "");
29
+ if (characters.length !== 6)
30
+ return typed.trim().toUpperCase();
31
+ return `${characters.slice(0, 3)}-${characters.slice(3)}`;
32
+ }
33
+ /** The server's tunnel key: thirty-two bytes, base64url without padding. */
34
+ export const serverKey = z.string().regex(/^[A-Za-z0-9_-]{43}$/, "a server key");
35
+ export const pairingPayload = z.object({
36
+ v: z.int().nonnegative().describe("0 for a QR from before M4.1, which carries a code alone."),
37
+ code: pairingCode,
38
+ lan: z
39
+ .url({ protocol: /^https?$/ })
40
+ .optional()
41
+ .describe("The server on the network it is on. Tried first, on a short timeout."),
42
+ relay: z
43
+ .url({ protocol: /^wss?$/ })
44
+ .optional()
45
+ .describe("The relay the server dials out to, when it has one."),
46
+ key: serverKey
47
+ .optional()
48
+ .describe("The server's tunnel key: asked for at the relay, and what the tunnel authenticates."),
49
+ candidates: candidateAddresses,
50
+ });
51
+ /**
52
+ * The text a QR carries: the address the phone should try first, with the code and the rest in
53
+ * the fragment. `base` is that address — the LAN address when the server is bound to the
54
+ * network, else its own.
55
+ */
56
+ export function pairingUrl(base, code, offer = {}) {
57
+ const fields = new URLSearchParams({ pair: code, v: String(PAIRING_VERSION) });
58
+ if (offer.relay !== undefined && offer.relay !== "")
59
+ fields.set("relay", offer.relay);
60
+ if (offer.key !== undefined && offer.key !== "")
61
+ fields.set("key", offer.key);
62
+ if (offer.lan !== undefined && offer.lan !== "" && offer.lan !== base)
63
+ fields.set("lan", offer.lan);
64
+ return `${base.replace(/\/$/, "")}/#${fields.toString()}`;
65
+ }
66
+ /**
67
+ * The same payload as a link the installed app opens: `chips://pair?pair=ABC-234&v=1&lan=…`.
68
+ *
69
+ * A QR's address opens in a browser, and a browser makes a device key only on a secure origin,
70
+ * which a server's plain-HTTP address on a home network or a tailnet never is. The app has no
71
+ * such rule. So a page that cannot pair offers this link instead, and `pnpm phone` hands it to
72
+ * the app directly at launch, with nobody typing anything. The server's address travels in the
73
+ * query as `lan`, because a `chips://` link has no origin of its own to fall back on.
74
+ */
75
+ export function appPairingUrl(server, code, offer = {}) {
76
+ const fields = new URLSearchParams({ pair: code, v: String(PAIRING_VERSION) });
77
+ fields.set("lan", (offer.lan ?? server).replace(/\/$/, ""));
78
+ if (offer.relay !== undefined && offer.relay !== "")
79
+ fields.set("relay", offer.relay);
80
+ if (offer.key !== undefined && offer.key !== "")
81
+ fields.set("key", offer.key);
82
+ return `chips://pair?${fields.toString()}`;
83
+ }
84
+ /** Where a pairing link opens at a relay (ADR 0210): the page a computer is sent to. */
85
+ export const RELAY_PAIR_PATH = "/pair";
86
+ /**
87
+ * The link a phone sends a computer to pair it, when the server has a relay (ADR 0210): the relay's
88
+ * own page, with the payload in its fragment and the server beside it as `lan`. The relay is on the
89
+ * open internet where the server may not be, so the link opens on any network; the page hands the
90
+ * payload to Chips for Mac as `chips://pair?…`, or to the server's own page for a browser on its
91
+ * network. The fragment never reaches the relay. `until` is when the code runs out, in seconds, so
92
+ * the page can say so instead of letting a pairing fail.
93
+ *
94
+ * https://relay.chipschat.ai/pair#pair=ABC-234&v=1&lan=https://host&relay=wss://…&key=…&until=…
95
+ */
96
+ export function pairRelayUrl(relay, code, offer) {
97
+ const page = /^https?:\/\/[^/?#]+/i.exec(relay.replace(/^ws(s?):\/\//i, "http$1://"))?.[0];
98
+ if (page === undefined)
99
+ throw new Error(`not a relay's address: ${relay}`);
100
+ const lan = /^https?:\/\/[^/?#]+/i.exec(offer.lan)?.[0] ?? offer.lan.replace(/\/$/, "");
101
+ const fields = new URLSearchParams({ pair: code, v: String(PAIRING_VERSION), lan });
102
+ fields.set("relay", relay);
103
+ fields.set("key", offer.key);
104
+ if (offer.until !== undefined)
105
+ fields.set("until", String(Math.floor(offer.until)));
106
+ return `${page}${RELAY_PAIR_PATH}#${fields.toString()}`;
107
+ }
108
+ /**
109
+ * The payload in a link somebody pasted (ADR 0210): the relay's page, the server's own page, or
110
+ * the app's `chips://pair?…`. Nothing when it carries no code, and nothing for a relay page that
111
+ * names no server, since its own origin is the relay's and no server answers there.
112
+ */
113
+ export function pairingFromLink(text) {
114
+ // A link copied out of a message may come with the message: the word that holds the code.
115
+ const word = text.split(/\s+/).find((each) => each.includes("pair=")) ?? "";
116
+ let url;
117
+ try {
118
+ url = new URL(word);
119
+ }
120
+ catch {
121
+ return undefined;
122
+ }
123
+ const payload = pairingFromUrl({ origin: url.origin, search: url.search, hash: url.hash });
124
+ if (payload === undefined)
125
+ return undefined;
126
+ const named = new URLSearchParams(url.hash.replace(/^#/, "")).has("lan") || url.searchParams.has("lan");
127
+ if (url.pathname === RELAY_PAIR_PATH && !named)
128
+ return undefined;
129
+ return payload;
130
+ }
131
+ /**
132
+ * The payload in an address: the fragment first, and the query for a link somebody rewrote.
133
+ * Nothing when there is no code. A QR from before M4.1 reads as version 0 with the code and,
134
+ * when the address has an origin, that origin as the network to try.
135
+ */
136
+ export function pairingFromUrl(url) {
137
+ const fragment = new URLSearchParams(url.hash.replace(/^#/, ""));
138
+ const query = new URLSearchParams(url.search);
139
+ const field = (name) => query.get(name) ?? fragment.get(name);
140
+ const code = field("pair");
141
+ if (code === null || code === "")
142
+ return undefined;
143
+ const version = field("v");
144
+ const origin = url.origin !== undefined && /^https?:\/\//.test(url.origin) ? url.origin : undefined;
145
+ // The network address is the QR's own, unless the fragment names one: a page that is not the
146
+ // server's says where the server is.
147
+ const lan = field("lan") ?? origin;
148
+ const parsed = pairingPayload.safeParse({
149
+ v: version === null ? 0 : Number.parseInt(version, 10),
150
+ code: code.trim().toUpperCase(),
151
+ ...(lan === undefined || lan === null ? {} : { lan }),
152
+ ...(field("relay") === null ? {} : { relay: field("relay") }),
153
+ ...(field("key") === null ? {} : { key: field("key") }),
154
+ candidates: [],
155
+ });
156
+ // A fragment that names a relay this version cannot read is still a code: the phone pairs on
157
+ // the network it is on, which is the path that needs nothing from the fragment.
158
+ if (parsed.success)
159
+ return parsed.data;
160
+ const plain = pairingPayload.safeParse({ v: 0, code: code.trim().toUpperCase(), candidates: [] });
161
+ return plain.success ? plain.data : undefined;
162
+ }
163
+ //# sourceMappingURL=pairing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pairing.js","sourceRoot":"","sources":["../../src/pairing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,2FAA2F;AAC3F,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC;AAEjC,mFAAmF;AACnF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,2BAA2B,EAAE,gBAAgB,CAAC,CAAC;AAE3F;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IACjE,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC/D,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;AAC5D,CAAC;AAED,4EAA4E;AAC5E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,EAAE,cAAc,CAAC,CAAC;AAEjF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,CAAC,EAAE,CAA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AAC,EAAE,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC;QACtD,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE;QAC/B,GAAG,CAAC,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QACrD,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACvD,UAAU,EAAE,EAAE;KACf,CAAC,CAAC;IACH,6FAA6F;IAC7F,gFAAgF;IAChF,IAAI,MAAM,CAAC,OAAO;QAAE,OAAO,MAAM,CAAC,IAAI,CAAC;IACvC,MAAM,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;IAClG,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAChD,CAAC"}
@@ -0,0 +1,267 @@
1
+ /**
2
+ * The sub-schemas events are built from. Each one exists because more than one event needs
3
+ * it, and each carries a description, because those descriptions become the documentation
4
+ * reference (technical-plan decision 13).
5
+ */
6
+ import { z } from "zod";
7
+ import { type IdKind } from "./ids/index.js";
8
+ /** A schema for one kind of prefixed ULID, for example `run_01K4...` (decision 11). */
9
+ export declare function id<K extends IdKind>(kind: K): z.ZodString;
10
+ /**
11
+ * Who takes part in rooms without being a person: an agent (ADR 0087), or a harness written
12
+ * before agents, which is a member of rooms until the upgrade gives it one.
13
+ */
14
+ export declare const agentId: z.ZodString;
15
+ /**
16
+ * Somebody in a room a message can be for (ADR 0204): an agent (`agentId`), or a person (`usr_`).
17
+ */
18
+ export declare const memberId: z.ZodString;
19
+ /** The kinds of participant: a person, an agent in rooms, and the harness behind agents. */
20
+ export declare const PARTICIPANT_KINDS: readonly ["person", "harness", "agent"];
21
+ export type ParticipantKind = (typeof PARTICIPANT_KINDS)[number];
22
+ export declare const isoTimestamp: z.ZodISODateTime;
23
+ /** Who caused an event. Every envelope says so; the audit log is a read of this field. */
24
+ export declare const actor: z.ZodObject<{
25
+ kind: z.ZodEnum<{
26
+ person: "person";
27
+ harness: "harness";
28
+ agent: "agent";
29
+ system: "system";
30
+ }>;
31
+ id: z.ZodString;
32
+ harness_id: z.ZodOptional<z.ZodString>;
33
+ }, z.core.$strip>;
34
+ export type Actor = z.infer<typeof actor>;
35
+ /** A person, harness or agent as another party sees them, with the role Chips assigns. */
36
+ export declare const participantRef: z.ZodObject<{
37
+ participant_id: z.ZodString;
38
+ kind: z.ZodEnum<{
39
+ person: "person";
40
+ harness: "harness";
41
+ agent: "agent";
42
+ }>;
43
+ display_name: z.ZodString;
44
+ role: z.ZodEnum<{
45
+ owner: "owner";
46
+ member: "member";
47
+ guest: "guest";
48
+ }>;
49
+ workspace_role: z.ZodOptional<z.ZodEnum<{
50
+ owner: "owner";
51
+ member: "member";
52
+ guest: "guest";
53
+ admin: "admin";
54
+ }>>;
55
+ }, z.core.$strip>;
56
+ export type ParticipantRef = z.infer<typeof participantRef>;
57
+ /** The longest transcript an attachment carries: far more than five minutes of anyone talking. */
58
+ export declare const MAX_TRANSCRIPT_LENGTH = 50000;
59
+ /**
60
+ * An attachment. Anything you can send a person you can send a harness, so this shape carries
61
+ * files, images, video and voice notes alike (decision 10).
62
+ */
63
+ export declare const attachment: z.ZodObject<{
64
+ attachment_id: z.ZodString;
65
+ filename: z.ZodString;
66
+ mime_type: z.ZodString;
67
+ byte_size: z.ZodInt;
68
+ sha256: z.ZodString;
69
+ width: z.ZodOptional<z.ZodInt>;
70
+ height: z.ZodOptional<z.ZodInt>;
71
+ duration_ms: z.ZodOptional<z.ZodInt>;
72
+ transcript: z.ZodOptional<z.ZodString>;
73
+ replaces: z.ZodOptional<z.ZodString>;
74
+ }, z.core.$strip>;
75
+ export type Attachment = z.infer<typeof attachment>;
76
+ /** An attachment as it reaches a harness: with a URL it can actually fetch. */
77
+ export declare const signedAttachment: z.ZodObject<{
78
+ attachment_id: z.ZodString;
79
+ filename: z.ZodString;
80
+ mime_type: z.ZodString;
81
+ byte_size: z.ZodInt;
82
+ sha256: z.ZodString;
83
+ width: z.ZodOptional<z.ZodInt>;
84
+ height: z.ZodOptional<z.ZodInt>;
85
+ duration_ms: z.ZodOptional<z.ZodInt>;
86
+ transcript: z.ZodOptional<z.ZodString>;
87
+ replaces: z.ZodOptional<z.ZodString>;
88
+ url: z.ZodURL;
89
+ url_expires_at: z.ZodISODateTime;
90
+ }, z.core.$strip>;
91
+ export type SignedAttachment = z.infer<typeof signedAttachment>;
92
+ /** Where a claim came from. External sources are what make an action risky. */
93
+ export declare const source: z.ZodObject<{
94
+ kind: z.ZodEnum<{
95
+ external: "external";
96
+ internal: "internal";
97
+ }>;
98
+ label: z.ZodString;
99
+ url: z.ZodOptional<z.ZodURL>;
100
+ }, z.core.$strip>;
101
+ export type Source = z.infer<typeof source>;
102
+ /**
103
+ * Risk classes. These are the flags the policy engine matches on (decision 8), so the list is
104
+ * closed: a new class is a protocol change, not a free-text string a harness invents.
105
+ */
106
+ export declare const riskClass: z.ZodEnum<{
107
+ external: "external";
108
+ external_communication: "external_communication";
109
+ irreversible: "irreversible";
110
+ destructive: "destructive";
111
+ financial: "financial";
112
+ credential: "credential";
113
+ privacy: "privacy";
114
+ legal: "legal";
115
+ }>;
116
+ export type RiskClass = z.infer<typeof riskClass>;
117
+ /**
118
+ * What kind of call a step is (ADR 0162), so a tool whose name Chips has never read still draws
119
+ * as what it does. Closed for the same reason as the risk classes: each is a glyph and a few
120
+ * words in the apps, and a kind nobody draws would be a dot again.
121
+ */
122
+ export declare const stepKind: z.ZodEnum<{
123
+ edit: "edit";
124
+ search: "search";
125
+ web: "web";
126
+ shell: "shell";
127
+ image: "image";
128
+ memory: "memory";
129
+ file: "file";
130
+ mail: "mail";
131
+ handoff: "handoff";
132
+ other: "other";
133
+ }>;
134
+ export type StepKind = z.infer<typeof stepKind>;
135
+ /** The action a harness wants to take. `kind` is what policy rules glob against. */
136
+ export declare const action: z.ZodObject<{
137
+ kind: z.ZodString;
138
+ input: z.ZodOptional<z.ZodUnknown>;
139
+ external: z.ZodOptional<z.ZodBoolean>;
140
+ irreversible: z.ZodOptional<z.ZodBoolean>;
141
+ money_usd: z.ZodOptional<z.ZodNumber>;
142
+ }, z.core.$strip>;
143
+ export type Action = z.infer<typeof action>;
144
+ /** What a person is shown before they decide. A diff for a change, prose for a message. */
145
+ export declare const preview: z.ZodObject<{
146
+ format: z.ZodEnum<{
147
+ markdown: "markdown";
148
+ plain: "plain";
149
+ diff: "diff";
150
+ json: "json";
151
+ table: "table";
152
+ }>;
153
+ body: z.ZodString;
154
+ title: z.ZodOptional<z.ZodString>;
155
+ }, z.core.$strip>;
156
+ export type Preview = z.infer<typeof preview>;
157
+ /**
158
+ * Who may answer an approval. `owner`, `role:<name>` and `lead` are resolved by Chips, so a
159
+ * harness never needs to know who is on shift; once resolved the list holds ids — a person's,
160
+ * or the lead harness's (M5.5).
161
+ */
162
+ export declare const approverRef: z.ZodString;
163
+ /** Autonomy levels L0 to L3 (blueprint: trust is a dial, not a switch). */
164
+ export declare const autonomyLevel: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
165
+ export type AutonomyLevel = z.infer<typeof autonomyLevel>;
166
+ /** One policy rule. Rules read like sentences: `email.send to an external domain -> ask the owner`. */
167
+ export declare const policyRule: z.ZodObject<{
168
+ match: z.ZodString;
169
+ when: z.ZodOptional<z.ZodObject<{
170
+ external: z.ZodOptional<z.ZodBoolean>;
171
+ irreversible: z.ZodOptional<z.ZodBoolean>;
172
+ money_usd_over: z.ZodOptional<z.ZodNumber>;
173
+ risk: z.ZodOptional<z.ZodArray<z.ZodEnum<{
174
+ external: "external";
175
+ external_communication: "external_communication";
176
+ irreversible: "irreversible";
177
+ destructive: "destructive";
178
+ financial: "financial";
179
+ credential: "credential";
180
+ privacy: "privacy";
181
+ legal: "legal";
182
+ }>>>;
183
+ starts_with: z.ZodOptional<z.ZodArray<z.ZodString>>;
184
+ }, z.core.$strip>>;
185
+ decision: z.ZodEnum<{
186
+ allow: "allow";
187
+ ask: "ask";
188
+ deny: "deny";
189
+ }>;
190
+ approvers: z.ZodOptional<z.ZodArray<z.ZodString>>;
191
+ reason: z.ZodOptional<z.ZodString>;
192
+ off: z.ZodOptional<z.ZodBoolean>;
193
+ made_by: z.ZodOptional<z.ZodString>;
194
+ made_at: z.ZodOptional<z.ZodISODateTime>;
195
+ }, z.core.$strip>;
196
+ export type PolicyRule = z.infer<typeof policyRule>;
197
+ export declare const policy: z.ZodObject<{
198
+ autonomy: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
199
+ rules: z.ZodArray<z.ZodObject<{
200
+ match: z.ZodString;
201
+ when: z.ZodOptional<z.ZodObject<{
202
+ external: z.ZodOptional<z.ZodBoolean>;
203
+ irreversible: z.ZodOptional<z.ZodBoolean>;
204
+ money_usd_over: z.ZodOptional<z.ZodNumber>;
205
+ risk: z.ZodOptional<z.ZodArray<z.ZodEnum<{
206
+ external: "external";
207
+ external_communication: "external_communication";
208
+ irreversible: "irreversible";
209
+ destructive: "destructive";
210
+ financial: "financial";
211
+ credential: "credential";
212
+ privacy: "privacy";
213
+ legal: "legal";
214
+ }>>>;
215
+ starts_with: z.ZodOptional<z.ZodArray<z.ZodString>>;
216
+ }, z.core.$strip>>;
217
+ decision: z.ZodEnum<{
218
+ allow: "allow";
219
+ ask: "ask";
220
+ deny: "deny";
221
+ }>;
222
+ approvers: z.ZodOptional<z.ZodArray<z.ZodString>>;
223
+ reason: z.ZodOptional<z.ZodString>;
224
+ off: z.ZodOptional<z.ZodBoolean>;
225
+ made_by: z.ZodOptional<z.ZodString>;
226
+ made_at: z.ZodOptional<z.ZodISODateTime>;
227
+ }, z.core.$strip>>;
228
+ }, z.core.$strip>;
229
+ export type Policy = z.infer<typeof policy>;
230
+ /** Money is always an estimate and always labelled as one (blueprint: cost rolls up the trail). */
231
+ export declare const cost: z.ZodObject<{
232
+ usd: z.ZodNumber;
233
+ estimated: z.ZodLiteral<true>;
234
+ }, z.core.$strip>;
235
+ export type Cost = z.infer<typeof cost>;
236
+ export declare const budget: z.ZodObject<{
237
+ limit_usd: z.ZodNumber;
238
+ spent_usd: z.ZodNumber;
239
+ }, z.core.$strip>;
240
+ export type Budget = z.infer<typeof budget>;
241
+ /** How work travelled to get here, so a lane can be traced back to the message that caused it. */
242
+ export declare const trailEntry: z.ZodObject<{
243
+ participant_id: z.ZodString;
244
+ run_id: z.ZodOptional<z.ZodString>;
245
+ goal: z.ZodOptional<z.ZodString>;
246
+ }, z.core.$strip>;
247
+ export type TrailEntry = z.infer<typeof trailEntry>;
248
+ /**
249
+ * A pointer to one visit a harness made to a space: `scout:<session_id>`, and whatever
250
+ * the harness calls it elsewhere. A space outlives its sessions (ADR 0024), so this is what
251
+ * tells one visit's runs from another's, and what lets a person open the harness's own
252
+ * transcript of it.
253
+ */
254
+ export declare const sessionRef: z.ZodString;
255
+ /**
256
+ * A person's standing in the workspace, as distinct from their standing in a room (ADR 0034).
257
+ * An owner does everything; an admin everything but touch an owner or make one; a member the
258
+ * ordinary things; a guest is in one space only and changes nothing about the workspace.
259
+ */
260
+ export declare const workspaceRole: z.ZodEnum<{
261
+ owner: "owner";
262
+ member: "member";
263
+ guest: "guest";
264
+ admin: "admin";
265
+ }>;
266
+ export type WorkspaceRole = z.infer<typeof workspaceRole>;
267
+ //# sourceMappingURL=primitives.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/primitives.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAe,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAI1D,uFAAuF;AACvF,wBAAgB,EAAE,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,CAAC,eAK3C;AAED;;;GAGG;AACH,eAAO,MAAM,OAAO,aAQjB,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,QAAQ,aAQlB,CAAC;AAEJ,4FAA4F;AAC5F,eAAO,MAAM,iBAAiB,yCAA0C,CAAC;AACzE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,eAAO,MAAM,YAAY,kBAEoD,CAAC;AAE9E,0FAA0F;AAC1F,eAAO,MAAM,KAAK;;;;;;;;;iBAYuC,CAAC;AAC1D,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AAE1C,0FAA0F;AAC1F,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;iBAqB8B,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,kGAAkG;AAClG,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;iBA+BoB,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,O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