@richhardry/codor 0.10.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 (388) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +293 -0
  3. package/bin/codor.mjs +7 -0
  4. package/node_modules/@codor/adapter-antigravity/dist/adapter.d.ts +41 -0
  5. package/node_modules/@codor/adapter-antigravity/dist/adapter.d.ts.map +1 -0
  6. package/node_modules/@codor/adapter-antigravity/dist/adapter.js +275 -0
  7. package/node_modules/@codor/adapter-antigravity/dist/adapter.js.map +1 -0
  8. package/node_modules/@codor/adapter-antigravity/dist/index.d.ts +2 -0
  9. package/node_modules/@codor/adapter-antigravity/dist/index.d.ts.map +1 -0
  10. package/node_modules/@codor/adapter-antigravity/dist/index.js +2 -0
  11. package/node_modules/@codor/adapter-antigravity/dist/index.js.map +1 -0
  12. package/node_modules/@codor/adapter-antigravity/package.json +18 -0
  13. package/node_modules/@codor/adapter-claude-code/dist/adapter.d.ts +94 -0
  14. package/node_modules/@codor/adapter-claude-code/dist/adapter.d.ts.map +1 -0
  15. package/node_modules/@codor/adapter-claude-code/dist/adapter.js +785 -0
  16. package/node_modules/@codor/adapter-claude-code/dist/adapter.js.map +1 -0
  17. package/node_modules/@codor/adapter-claude-code/dist/index.d.ts +8 -0
  18. package/node_modules/@codor/adapter-claude-code/dist/index.d.ts.map +1 -0
  19. package/node_modules/@codor/adapter-claude-code/dist/index.js +5 -0
  20. package/node_modules/@codor/adapter-claude-code/dist/index.js.map +1 -0
  21. package/node_modules/@codor/adapter-claude-code/dist/limits-probe.d.ts +18 -0
  22. package/node_modules/@codor/adapter-claude-code/dist/limits-probe.d.ts.map +1 -0
  23. package/node_modules/@codor/adapter-claude-code/dist/limits-probe.js +67 -0
  24. package/node_modules/@codor/adapter-claude-code/dist/limits-probe.js.map +1 -0
  25. package/node_modules/@codor/adapter-claude-code/dist/peek.d.ts +3 -0
  26. package/node_modules/@codor/adapter-claude-code/dist/peek.d.ts.map +1 -0
  27. package/node_modules/@codor/adapter-claude-code/dist/peek.js +128 -0
  28. package/node_modules/@codor/adapter-claude-code/dist/peek.js.map +1 -0
  29. package/node_modules/@codor/adapter-claude-code/dist/query.d.ts +9 -0
  30. package/node_modules/@codor/adapter-claude-code/dist/query.d.ts.map +1 -0
  31. package/node_modules/@codor/adapter-claude-code/dist/query.js +7 -0
  32. package/node_modules/@codor/adapter-claude-code/dist/query.js.map +1 -0
  33. package/node_modules/@codor/adapter-claude-code/dist/translate.d.ts +40 -0
  34. package/node_modules/@codor/adapter-claude-code/dist/translate.d.ts.map +1 -0
  35. package/node_modules/@codor/adapter-claude-code/dist/translate.js +505 -0
  36. package/node_modules/@codor/adapter-claude-code/dist/translate.js.map +1 -0
  37. package/node_modules/@codor/adapter-claude-code/package.json +18 -0
  38. package/node_modules/@codor/adapter-codex/dist/adapter.d.ts +105 -0
  39. package/node_modules/@codor/adapter-codex/dist/adapter.d.ts.map +1 -0
  40. package/node_modules/@codor/adapter-codex/dist/adapter.js +625 -0
  41. package/node_modules/@codor/adapter-codex/dist/adapter.js.map +1 -0
  42. package/node_modules/@codor/adapter-codex/dist/app-server-transport.d.ts +39 -0
  43. package/node_modules/@codor/adapter-codex/dist/app-server-transport.d.ts.map +1 -0
  44. package/node_modules/@codor/adapter-codex/dist/app-server-transport.js +186 -0
  45. package/node_modules/@codor/adapter-codex/dist/app-server-transport.js.map +1 -0
  46. package/node_modules/@codor/adapter-codex/dist/index.d.ts +8 -0
  47. package/node_modules/@codor/adapter-codex/dist/index.d.ts.map +1 -0
  48. package/node_modules/@codor/adapter-codex/dist/index.js +5 -0
  49. package/node_modules/@codor/adapter-codex/dist/index.js.map +1 -0
  50. package/node_modules/@codor/adapter-codex/dist/limits-probe.d.ts +18 -0
  51. package/node_modules/@codor/adapter-codex/dist/limits-probe.d.ts.map +1 -0
  52. package/node_modules/@codor/adapter-codex/dist/limits-probe.js +87 -0
  53. package/node_modules/@codor/adapter-codex/dist/limits-probe.js.map +1 -0
  54. package/node_modules/@codor/adapter-codex/dist/peek.d.ts +3 -0
  55. package/node_modules/@codor/adapter-codex/dist/peek.d.ts.map +1 -0
  56. package/node_modules/@codor/adapter-codex/dist/peek.js +98 -0
  57. package/node_modules/@codor/adapter-codex/dist/peek.js.map +1 -0
  58. package/node_modules/@codor/adapter-codex/dist/translate.d.ts +17 -0
  59. package/node_modules/@codor/adapter-codex/dist/translate.d.ts.map +1 -0
  60. package/node_modules/@codor/adapter-codex/dist/translate.js +286 -0
  61. package/node_modules/@codor/adapter-codex/dist/translate.js.map +1 -0
  62. package/node_modules/@codor/adapter-codex/package.json +17 -0
  63. package/node_modules/@codor/adapter-copilot/dist/adapter.d.ts +40 -0
  64. package/node_modules/@codor/adapter-copilot/dist/adapter.d.ts.map +1 -0
  65. package/node_modules/@codor/adapter-copilot/dist/adapter.js +190 -0
  66. package/node_modules/@codor/adapter-copilot/dist/adapter.js.map +1 -0
  67. package/node_modules/@codor/adapter-copilot/dist/index.d.ts +4 -0
  68. package/node_modules/@codor/adapter-copilot/dist/index.d.ts.map +1 -0
  69. package/node_modules/@codor/adapter-copilot/dist/index.js +3 -0
  70. package/node_modules/@codor/adapter-copilot/dist/index.js.map +1 -0
  71. package/node_modules/@codor/adapter-copilot/dist/translate.d.ts +11 -0
  72. package/node_modules/@codor/adapter-copilot/dist/translate.d.ts.map +1 -0
  73. package/node_modules/@codor/adapter-copilot/dist/translate.js +184 -0
  74. package/node_modules/@codor/adapter-copilot/dist/translate.js.map +1 -0
  75. package/node_modules/@codor/adapter-copilot/package.json +18 -0
  76. package/node_modules/@codor/adapter-cursor/dist/adapter.d.ts +32 -0
  77. package/node_modules/@codor/adapter-cursor/dist/adapter.d.ts.map +1 -0
  78. package/node_modules/@codor/adapter-cursor/dist/adapter.js +179 -0
  79. package/node_modules/@codor/adapter-cursor/dist/adapter.js.map +1 -0
  80. package/node_modules/@codor/adapter-cursor/dist/index.d.ts +9 -0
  81. package/node_modules/@codor/adapter-cursor/dist/index.d.ts.map +1 -0
  82. package/node_modules/@codor/adapter-cursor/dist/index.js +8 -0
  83. package/node_modules/@codor/adapter-cursor/dist/index.js.map +1 -0
  84. package/node_modules/@codor/adapter-cursor/dist/translate.d.ts +15 -0
  85. package/node_modules/@codor/adapter-cursor/dist/translate.d.ts.map +1 -0
  86. package/node_modules/@codor/adapter-cursor/dist/translate.js +164 -0
  87. package/node_modules/@codor/adapter-cursor/dist/translate.js.map +1 -0
  88. package/node_modules/@codor/adapter-cursor/package.json +17 -0
  89. package/node_modules/@codor/adapter-gemini/dist/adapter.d.ts +36 -0
  90. package/node_modules/@codor/adapter-gemini/dist/adapter.d.ts.map +1 -0
  91. package/node_modules/@codor/adapter-gemini/dist/adapter.js +245 -0
  92. package/node_modules/@codor/adapter-gemini/dist/adapter.js.map +1 -0
  93. package/node_modules/@codor/adapter-gemini/dist/index.d.ts +4 -0
  94. package/node_modules/@codor/adapter-gemini/dist/index.d.ts.map +1 -0
  95. package/node_modules/@codor/adapter-gemini/dist/index.js +3 -0
  96. package/node_modules/@codor/adapter-gemini/dist/index.js.map +1 -0
  97. package/node_modules/@codor/adapter-gemini/dist/translate.d.ts +12 -0
  98. package/node_modules/@codor/adapter-gemini/dist/translate.d.ts.map +1 -0
  99. package/node_modules/@codor/adapter-gemini/dist/translate.js +123 -0
  100. package/node_modules/@codor/adapter-gemini/dist/translate.js.map +1 -0
  101. package/node_modules/@codor/adapter-gemini/package.json +18 -0
  102. package/node_modules/@codor/adapter-opencode/dist/adapter.d.ts +42 -0
  103. package/node_modules/@codor/adapter-opencode/dist/adapter.d.ts.map +1 -0
  104. package/node_modules/@codor/adapter-opencode/dist/adapter.js +240 -0
  105. package/node_modules/@codor/adapter-opencode/dist/adapter.js.map +1 -0
  106. package/node_modules/@codor/adapter-opencode/dist/index.d.ts +4 -0
  107. package/node_modules/@codor/adapter-opencode/dist/index.d.ts.map +1 -0
  108. package/node_modules/@codor/adapter-opencode/dist/index.js +3 -0
  109. package/node_modules/@codor/adapter-opencode/dist/index.js.map +1 -0
  110. package/node_modules/@codor/adapter-opencode/dist/translate.d.ts +12 -0
  111. package/node_modules/@codor/adapter-opencode/dist/translate.d.ts.map +1 -0
  112. package/node_modules/@codor/adapter-opencode/dist/translate.js +144 -0
  113. package/node_modules/@codor/adapter-opencode/dist/translate.js.map +1 -0
  114. package/node_modules/@codor/adapter-opencode/package.json +18 -0
  115. package/node_modules/@codor/cli/dist/artifact.d.ts +33 -0
  116. package/node_modules/@codor/cli/dist/artifact.d.ts.map +1 -0
  117. package/node_modules/@codor/cli/dist/artifact.js +183 -0
  118. package/node_modules/@codor/cli/dist/artifact.js.map +1 -0
  119. package/node_modules/@codor/cli/dist/attach.d.ts +25 -0
  120. package/node_modules/@codor/cli/dist/attach.d.ts.map +1 -0
  121. package/node_modules/@codor/cli/dist/attach.js +133 -0
  122. package/node_modules/@codor/cli/dist/attach.js.map +1 -0
  123. package/node_modules/@codor/cli/dist/connection.d.ts +21 -0
  124. package/node_modules/@codor/cli/dist/connection.d.ts.map +1 -0
  125. package/node_modules/@codor/cli/dist/connection.js +130 -0
  126. package/node_modules/@codor/cli/dist/connection.js.map +1 -0
  127. package/node_modules/@codor/cli/dist/detect.d.ts +14 -0
  128. package/node_modules/@codor/cli/dist/detect.d.ts.map +1 -0
  129. package/node_modules/@codor/cli/dist/detect.js +99 -0
  130. package/node_modules/@codor/cli/dist/detect.js.map +1 -0
  131. package/node_modules/@codor/cli/dist/index.d.ts +17 -0
  132. package/node_modules/@codor/cli/dist/index.d.ts.map +1 -0
  133. package/node_modules/@codor/cli/dist/index.js +24 -0
  134. package/node_modules/@codor/cli/dist/index.js.map +1 -0
  135. package/node_modules/@codor/cli/dist/mirror.d.ts +4 -0
  136. package/node_modules/@codor/cli/dist/mirror.d.ts.map +1 -0
  137. package/node_modules/@codor/cli/dist/mirror.js +93 -0
  138. package/node_modules/@codor/cli/dist/mirror.js.map +1 -0
  139. package/node_modules/@codor/cli/dist/program.d.ts +17 -0
  140. package/node_modules/@codor/cli/dist/program.d.ts.map +1 -0
  141. package/node_modules/@codor/cli/dist/program.js +1068 -0
  142. package/node_modules/@codor/cli/dist/program.js.map +1 -0
  143. package/node_modules/@codor/cli/dist/runtime-install.d.ts +61 -0
  144. package/node_modules/@codor/cli/dist/runtime-install.d.ts.map +1 -0
  145. package/node_modules/@codor/cli/dist/runtime-install.js +122 -0
  146. package/node_modules/@codor/cli/dist/runtime-install.js.map +1 -0
  147. package/node_modules/@codor/cli/dist/runtime-paths.d.ts +24 -0
  148. package/node_modules/@codor/cli/dist/runtime-paths.d.ts.map +1 -0
  149. package/node_modules/@codor/cli/dist/runtime-paths.js +69 -0
  150. package/node_modules/@codor/cli/dist/runtime-paths.js.map +1 -0
  151. package/node_modules/@codor/cli/dist/setup-flow.d.ts +69 -0
  152. package/node_modules/@codor/cli/dist/setup-flow.d.ts.map +1 -0
  153. package/node_modules/@codor/cli/dist/setup-flow.js +110 -0
  154. package/node_modules/@codor/cli/dist/setup-flow.js.map +1 -0
  155. package/node_modules/@codor/cli/dist/setup-session.d.ts +105 -0
  156. package/node_modules/@codor/cli/dist/setup-session.d.ts.map +1 -0
  157. package/node_modules/@codor/cli/dist/setup-session.js +346 -0
  158. package/node_modules/@codor/cli/dist/setup-session.js.map +1 -0
  159. package/node_modules/@codor/cli/dist/setup-ui.d.ts +93 -0
  160. package/node_modules/@codor/cli/dist/setup-ui.d.ts.map +1 -0
  161. package/node_modules/@codor/cli/dist/setup-ui.js +249 -0
  162. package/node_modules/@codor/cli/dist/setup-ui.js.map +1 -0
  163. package/node_modules/@codor/cli/dist/setup.d.ts +108 -0
  164. package/node_modules/@codor/cli/dist/setup.d.ts.map +1 -0
  165. package/node_modules/@codor/cli/dist/setup.js +878 -0
  166. package/node_modules/@codor/cli/dist/setup.js.map +1 -0
  167. package/node_modules/@codor/cli/dist/terminal-keys.d.ts +26 -0
  168. package/node_modules/@codor/cli/dist/terminal-keys.d.ts.map +1 -0
  169. package/node_modules/@codor/cli/dist/terminal-keys.js +70 -0
  170. package/node_modules/@codor/cli/dist/terminal-keys.js.map +1 -0
  171. package/node_modules/@codor/cli/dist/terminal-qr.d.ts +2 -0
  172. package/node_modules/@codor/cli/dist/terminal-qr.d.ts.map +1 -0
  173. package/node_modules/@codor/cli/dist/terminal-qr.js +30 -0
  174. package/node_modules/@codor/cli/dist/terminal-qr.js.map +1 -0
  175. package/node_modules/@codor/cli/dist/up.d.ts +52 -0
  176. package/node_modules/@codor/cli/dist/up.d.ts.map +1 -0
  177. package/node_modules/@codor/cli/dist/up.js +178 -0
  178. package/node_modules/@codor/cli/dist/up.js.map +1 -0
  179. package/node_modules/@codor/cli/package.json +24 -0
  180. package/node_modules/@codor/cli/packaging/systemd/codor.service +21 -0
  181. package/node_modules/@codor/cli/runtime/web/assets/LandingPage-BOmG5kSw.js +31 -0
  182. package/node_modules/@codor/cli/runtime/web/assets/LedgerPage-CecuTS8-.js +1 -0
  183. package/node_modules/@codor/cli/runtime/web/assets/NoChannels-CYiBXGQd.js +11 -0
  184. package/node_modules/@codor/cli/runtime/web/assets/PairingCodeInput-Cr6XDWx-.js +1 -0
  185. package/node_modules/@codor/cli/runtime/web/assets/PairingPage-CQBWNA2L.js +6 -0
  186. package/node_modules/@codor/cli/runtime/web/assets/SettingsPage-DGLbSXE7.js +16 -0
  187. package/node_modules/@codor/cli/runtime/web/assets/StartupUnavailable-DdQBHip_.js +1 -0
  188. package/node_modules/@codor/cli/runtime/web/assets/arrow-left-BOpjMuRi.js +6 -0
  189. package/node_modules/@codor/cli/runtime/web/assets/browser-BWQYNOsD.js +6 -0
  190. package/node_modules/@codor/cli/runtime/web/assets/graph-toBZHlC0.js +1 -0
  191. package/node_modules/@codor/cli/runtime/web/assets/index-Cxi54Xim.js +408 -0
  192. package/node_modules/@codor/cli/runtime/web/assets/index-DjwJakJC.css +1 -0
  193. package/node_modules/@codor/cli/runtime/web/assets/qr-DpynCwP9.js +8 -0
  194. package/node_modules/@codor/cli/runtime/web/assets/react-C8w-UNLI.js +32 -0
  195. package/node_modules/@codor/cli/runtime/web/assets/sodium-DtsvMzX9.js +1 -0
  196. package/node_modules/@codor/cli/runtime/web/codor-192.png +0 -0
  197. package/node_modules/@codor/cli/runtime/web/codor-512.png +0 -0
  198. package/node_modules/@codor/cli/runtime/web/codor-apple-touch-180.png +0 -0
  199. package/node_modules/@codor/cli/runtime/web/codor-favicon.svg +86 -0
  200. package/node_modules/@codor/cli/runtime/web/codor-mark.svg +86 -0
  201. package/node_modules/@codor/cli/runtime/web/codor-maskable-512.png +0 -0
  202. package/node_modules/@codor/cli/runtime/web/codor-og.png +0 -0
  203. package/node_modules/@codor/cli/runtime/web/fonts/BitcountPropSingle-latin.woff2 +0 -0
  204. package/node_modules/@codor/cli/runtime/web/fonts/Geist-Variable.woff2 +0 -0
  205. package/node_modules/@codor/cli/runtime/web/fonts/GeistMono-Variable.woff2 +0 -0
  206. package/node_modules/@codor/cli/runtime/web/fonts/OFL.txt +93 -0
  207. package/node_modules/@codor/cli/runtime/web/index.html +53 -0
  208. package/node_modules/@codor/cli/runtime/web/manifest.webmanifest +1 -0
  209. package/node_modules/@codor/cli/runtime/web/sw.js +2 -0
  210. package/node_modules/@codor/protocol/dist/adapter.d.ts +118 -0
  211. package/node_modules/@codor/protocol/dist/adapter.d.ts.map +1 -0
  212. package/node_modules/@codor/protocol/dist/adapter.js +15 -0
  213. package/node_modules/@codor/protocol/dist/adapter.js.map +1 -0
  214. package/node_modules/@codor/protocol/dist/body.d.ts +14 -0
  215. package/node_modules/@codor/protocol/dist/body.d.ts.map +1 -0
  216. package/node_modules/@codor/protocol/dist/body.js +50 -0
  217. package/node_modules/@codor/protocol/dist/body.js.map +1 -0
  218. package/node_modules/@codor/protocol/dist/changelog.d.ts +30 -0
  219. package/node_modules/@codor/protocol/dist/changelog.d.ts.map +1 -0
  220. package/node_modules/@codor/protocol/dist/changelog.js +19 -0
  221. package/node_modules/@codor/protocol/dist/changelog.js.map +1 -0
  222. package/node_modules/@codor/protocol/dist/default-recipient.d.ts +8 -0
  223. package/node_modules/@codor/protocol/dist/default-recipient.d.ts.map +1 -0
  224. package/node_modules/@codor/protocol/dist/default-recipient.js +19 -0
  225. package/node_modules/@codor/protocol/dist/default-recipient.js.map +1 -0
  226. package/node_modules/@codor/protocol/dist/delivery.d.ts +42 -0
  227. package/node_modules/@codor/protocol/dist/delivery.d.ts.map +1 -0
  228. package/node_modules/@codor/protocol/dist/delivery.js +44 -0
  229. package/node_modules/@codor/protocol/dist/delivery.js.map +1 -0
  230. package/node_modules/@codor/protocol/dist/events.d.ts +284 -0
  231. package/node_modules/@codor/protocol/dist/events.d.ts.map +1 -0
  232. package/node_modules/@codor/protocol/dist/events.js +150 -0
  233. package/node_modules/@codor/protocol/dist/events.js.map +1 -0
  234. package/node_modules/@codor/protocol/dist/ids.d.ts +19 -0
  235. package/node_modules/@codor/protocol/dist/ids.d.ts.map +1 -0
  236. package/node_modules/@codor/protocol/dist/ids.js +27 -0
  237. package/node_modules/@codor/protocol/dist/ids.js.map +1 -0
  238. package/node_modules/@codor/protocol/dist/index.d.ts +14 -0
  239. package/node_modules/@codor/protocol/dist/index.d.ts.map +1 -0
  240. package/node_modules/@codor/protocol/dist/index.js +14 -0
  241. package/node_modules/@codor/protocol/dist/index.js.map +1 -0
  242. package/node_modules/@codor/protocol/dist/interaction.d.ts +45 -0
  243. package/node_modules/@codor/protocol/dist/interaction.d.ts.map +1 -0
  244. package/node_modules/@codor/protocol/dist/interaction.js +33 -0
  245. package/node_modules/@codor/protocol/dist/interaction.js.map +1 -0
  246. package/node_modules/@codor/protocol/dist/member.d.ts +146 -0
  247. package/node_modules/@codor/protocol/dist/member.d.ts.map +1 -0
  248. package/node_modules/@codor/protocol/dist/member.js +169 -0
  249. package/node_modules/@codor/protocol/dist/member.js.map +1 -0
  250. package/node_modules/@codor/protocol/dist/message.d.ts +166 -0
  251. package/node_modules/@codor/protocol/dist/message.d.ts.map +1 -0
  252. package/node_modules/@codor/protocol/dist/message.js +95 -0
  253. package/node_modules/@codor/protocol/dist/message.js.map +1 -0
  254. package/node_modules/@codor/protocol/dist/observability.d.ts +80 -0
  255. package/node_modules/@codor/protocol/dist/observability.d.ts.map +1 -0
  256. package/node_modules/@codor/protocol/dist/observability.js +41 -0
  257. package/node_modules/@codor/protocol/dist/observability.js.map +1 -0
  258. package/node_modules/@codor/protocol/dist/room.d.ts +430 -0
  259. package/node_modules/@codor/protocol/dist/room.d.ts.map +1 -0
  260. package/node_modules/@codor/protocol/dist/room.js +142 -0
  261. package/node_modules/@codor/protocol/dist/room.js.map +1 -0
  262. package/node_modules/@codor/protocol/dist/ws.d.ts +1348 -0
  263. package/node_modules/@codor/protocol/dist/ws.d.ts.map +1 -0
  264. package/node_modules/@codor/protocol/dist/ws.js +282 -0
  265. package/node_modules/@codor/protocol/dist/ws.js.map +1 -0
  266. package/node_modules/@codor/protocol/package.json +17 -0
  267. package/node_modules/@codor/switchboard/dist/adapter-registry.d.ts +14 -0
  268. package/node_modules/@codor/switchboard/dist/adapter-registry.d.ts.map +1 -0
  269. package/node_modules/@codor/switchboard/dist/adapter-registry.js +175 -0
  270. package/node_modules/@codor/switchboard/dist/adapter-registry.js.map +1 -0
  271. package/node_modules/@codor/switchboard/dist/authorization.d.ts +13 -0
  272. package/node_modules/@codor/switchboard/dist/authorization.d.ts.map +1 -0
  273. package/node_modules/@codor/switchboard/dist/authorization.js +96 -0
  274. package/node_modules/@codor/switchboard/dist/authorization.js.map +1 -0
  275. package/node_modules/@codor/switchboard/dist/blobs.d.ts +17 -0
  276. package/node_modules/@codor/switchboard/dist/blobs.d.ts.map +1 -0
  277. package/node_modules/@codor/switchboard/dist/blobs.js +54 -0
  278. package/node_modules/@codor/switchboard/dist/blobs.js.map +1 -0
  279. package/node_modules/@codor/switchboard/dist/collaboration.d.ts +115 -0
  280. package/node_modules/@codor/switchboard/dist/collaboration.d.ts.map +1 -0
  281. package/node_modules/@codor/switchboard/dist/collaboration.js +123 -0
  282. package/node_modules/@codor/switchboard/dist/collaboration.js.map +1 -0
  283. package/node_modules/@codor/switchboard/dist/continuation.d.ts +33 -0
  284. package/node_modules/@codor/switchboard/dist/continuation.d.ts.map +1 -0
  285. package/node_modules/@codor/switchboard/dist/continuation.js +177 -0
  286. package/node_modules/@codor/switchboard/dist/continuation.js.map +1 -0
  287. package/node_modules/@codor/switchboard/dist/crypto/browser-sessions.d.ts +22 -0
  288. package/node_modules/@codor/switchboard/dist/crypto/browser-sessions.d.ts.map +1 -0
  289. package/node_modules/@codor/switchboard/dist/crypto/browser-sessions.js +92 -0
  290. package/node_modules/@codor/switchboard/dist/crypto/browser-sessions.js.map +1 -0
  291. package/node_modules/@codor/switchboard/dist/crypto/challenge.d.ts +37 -0
  292. package/node_modules/@codor/switchboard/dist/crypto/challenge.d.ts.map +1 -0
  293. package/node_modules/@codor/switchboard/dist/crypto/challenge.js +132 -0
  294. package/node_modules/@codor/switchboard/dist/crypto/challenge.js.map +1 -0
  295. package/node_modules/@codor/switchboard/dist/crypto/keys.d.ts +41 -0
  296. package/node_modules/@codor/switchboard/dist/crypto/keys.d.ts.map +1 -0
  297. package/node_modules/@codor/switchboard/dist/crypto/keys.js +145 -0
  298. package/node_modules/@codor/switchboard/dist/crypto/keys.js.map +1 -0
  299. package/node_modules/@codor/switchboard/dist/crypto/pairing.d.ts +53 -0
  300. package/node_modules/@codor/switchboard/dist/crypto/pairing.d.ts.map +1 -0
  301. package/node_modules/@codor/switchboard/dist/crypto/pairing.js +182 -0
  302. package/node_modules/@codor/switchboard/dist/crypto/pairing.js.map +1 -0
  303. package/node_modules/@codor/switchboard/dist/crypto/roomkeys.d.ts +30 -0
  304. package/node_modules/@codor/switchboard/dist/crypto/roomkeys.d.ts.map +1 -0
  305. package/node_modules/@codor/switchboard/dist/crypto/roomkeys.js +101 -0
  306. package/node_modules/@codor/switchboard/dist/crypto/roomkeys.js.map +1 -0
  307. package/node_modules/@codor/switchboard/dist/daemon.d.ts +545 -0
  308. package/node_modules/@codor/switchboard/dist/daemon.d.ts.map +1 -0
  309. package/node_modules/@codor/switchboard/dist/daemon.js +3907 -0
  310. package/node_modules/@codor/switchboard/dist/daemon.js.map +1 -0
  311. package/node_modules/@codor/switchboard/dist/fake-adapter.d.ts +103 -0
  312. package/node_modules/@codor/switchboard/dist/fake-adapter.d.ts.map +1 -0
  313. package/node_modules/@codor/switchboard/dist/fake-adapter.js +228 -0
  314. package/node_modules/@codor/switchboard/dist/fake-adapter.js.map +1 -0
  315. package/node_modules/@codor/switchboard/dist/index.d.ts +44 -0
  316. package/node_modules/@codor/switchboard/dist/index.d.ts.map +1 -0
  317. package/node_modules/@codor/switchboard/dist/index.js +24 -0
  318. package/node_modules/@codor/switchboard/dist/index.js.map +1 -0
  319. package/node_modules/@codor/switchboard/dist/ledger/resolve.d.ts +12 -0
  320. package/node_modules/@codor/switchboard/dist/ledger/resolve.d.ts.map +1 -0
  321. package/node_modules/@codor/switchboard/dist/ledger/resolve.js +17 -0
  322. package/node_modules/@codor/switchboard/dist/ledger/resolve.js.map +1 -0
  323. package/node_modules/@codor/switchboard/dist/ledger/vault.d.ts +47 -0
  324. package/node_modules/@codor/switchboard/dist/ledger/vault.d.ts.map +1 -0
  325. package/node_modules/@codor/switchboard/dist/ledger/vault.js +175 -0
  326. package/node_modules/@codor/switchboard/dist/ledger/vault.js.map +1 -0
  327. package/node_modules/@codor/switchboard/dist/ledger/watch.d.ts +73 -0
  328. package/node_modules/@codor/switchboard/dist/ledger/watch.d.ts.map +1 -0
  329. package/node_modules/@codor/switchboard/dist/ledger/watch.js +232 -0
  330. package/node_modules/@codor/switchboard/dist/ledger/watch.js.map +1 -0
  331. package/node_modules/@codor/switchboard/dist/local-dirs.d.ts +14 -0
  332. package/node_modules/@codor/switchboard/dist/local-dirs.d.ts.map +1 -0
  333. package/node_modules/@codor/switchboard/dist/local-dirs.js +40 -0
  334. package/node_modules/@codor/switchboard/dist/local-dirs.js.map +1 -0
  335. package/node_modules/@codor/switchboard/dist/local-socket.d.ts +3 -0
  336. package/node_modules/@codor/switchboard/dist/local-socket.d.ts.map +1 -0
  337. package/node_modules/@codor/switchboard/dist/local-socket.js +16 -0
  338. package/node_modules/@codor/switchboard/dist/local-socket.js.map +1 -0
  339. package/node_modules/@codor/switchboard/dist/pricing.d.ts +32 -0
  340. package/node_modules/@codor/switchboard/dist/pricing.d.ts.map +1 -0
  341. package/node_modules/@codor/switchboard/dist/pricing.js +64 -0
  342. package/node_modules/@codor/switchboard/dist/pricing.js.map +1 -0
  343. package/node_modules/@codor/switchboard/dist/process-liveness.d.ts +2 -0
  344. package/node_modules/@codor/switchboard/dist/process-liveness.d.ts.map +1 -0
  345. package/node_modules/@codor/switchboard/dist/process-liveness.js +9 -0
  346. package/node_modules/@codor/switchboard/dist/process-liveness.js.map +1 -0
  347. package/node_modules/@codor/switchboard/dist/push/producer.d.ts +54 -0
  348. package/node_modules/@codor/switchboard/dist/push/producer.d.ts.map +1 -0
  349. package/node_modules/@codor/switchboard/dist/push/producer.js +168 -0
  350. package/node_modules/@codor/switchboard/dist/push/producer.js.map +1 -0
  351. package/node_modules/@codor/switchboard/dist/push/subscriptions.d.ts +29 -0
  352. package/node_modules/@codor/switchboard/dist/push/subscriptions.d.ts.map +1 -0
  353. package/node_modules/@codor/switchboard/dist/push/subscriptions.js +83 -0
  354. package/node_modules/@codor/switchboard/dist/push/subscriptions.js.map +1 -0
  355. package/node_modules/@codor/switchboard/dist/redact.d.ts +11 -0
  356. package/node_modules/@codor/switchboard/dist/redact.d.ts.map +1 -0
  357. package/node_modules/@codor/switchboard/dist/redact.js +65 -0
  358. package/node_modules/@codor/switchboard/dist/redact.js.map +1 -0
  359. package/node_modules/@codor/switchboard/dist/residency.d.ts +110 -0
  360. package/node_modules/@codor/switchboard/dist/residency.d.ts.map +1 -0
  361. package/node_modules/@codor/switchboard/dist/residency.js +587 -0
  362. package/node_modules/@codor/switchboard/dist/residency.js.map +1 -0
  363. package/node_modules/@codor/switchboard/dist/router.d.ts +120 -0
  364. package/node_modules/@codor/switchboard/dist/router.d.ts.map +1 -0
  365. package/node_modules/@codor/switchboard/dist/router.js +198 -0
  366. package/node_modules/@codor/switchboard/dist/router.js.map +1 -0
  367. package/node_modules/@codor/switchboard/dist/server.d.ts +50 -0
  368. package/node_modules/@codor/switchboard/dist/server.d.ts.map +1 -0
  369. package/node_modules/@codor/switchboard/dist/server.js +1425 -0
  370. package/node_modules/@codor/switchboard/dist/server.js.map +1 -0
  371. package/node_modules/@codor/switchboard/dist/store.d.ts +534 -0
  372. package/node_modules/@codor/switchboard/dist/store.d.ts.map +1 -0
  373. package/node_modules/@codor/switchboard/dist/store.js +2625 -0
  374. package/node_modules/@codor/switchboard/dist/store.js.map +1 -0
  375. package/node_modules/@codor/switchboard/dist/transport/hyperswarm.d.ts +59 -0
  376. package/node_modules/@codor/switchboard/dist/transport/hyperswarm.d.ts.map +1 -0
  377. package/node_modules/@codor/switchboard/dist/transport/hyperswarm.js +183 -0
  378. package/node_modules/@codor/switchboard/dist/transport/hyperswarm.js.map +1 -0
  379. package/node_modules/@codor/switchboard/dist/transport/peer.d.ts +87 -0
  380. package/node_modules/@codor/switchboard/dist/transport/peer.d.ts.map +1 -0
  381. package/node_modules/@codor/switchboard/dist/transport/peer.js +316 -0
  382. package/node_modules/@codor/switchboard/dist/transport/peer.js.map +1 -0
  383. package/node_modules/@codor/switchboard/dist/working-directory.d.ts +2 -0
  384. package/node_modules/@codor/switchboard/dist/working-directory.d.ts.map +1 -0
  385. package/node_modules/@codor/switchboard/dist/working-directory.js +26 -0
  386. package/node_modules/@codor/switchboard/dist/working-directory.js.map +1 -0
  387. package/node_modules/@codor/switchboard/package.json +33 -0
  388. package/package.json +58 -0
@@ -0,0 +1,228 @@
1
+ export class FakeAdapter {
2
+ handleStep;
3
+ id;
4
+ capabilities;
5
+ script = [];
6
+ deliveries = [];
7
+ // harn:assume context-peek-reads-session-artifacts ref=adapter-peek-contract
8
+ /** Scriptable pre-turn context estimate; undefined = no artifact. */
9
+ peekUsage;
10
+ peekContextUsage() {
11
+ return Promise.resolve(this.peekUsage === undefined ? undefined : { ...this.peekUsage });
12
+ }
13
+ // harn:end context-peek-reads-session-artifacts
14
+ respondCalls = [];
15
+ pendingAnswers = new Map();
16
+ pendingBySession = new WeakMap();
17
+ attachedRefs = new Set();
18
+ nextSession = 0;
19
+ nextRequest = 0;
20
+ nextResponseError;
21
+ concurrent = new Map();
22
+ maxConcurrent = 0;
23
+ constructor(id = 'fake', capabilities = {}, handleStep) {
24
+ this.handleStep = handleStep;
25
+ this.id = id;
26
+ this.capabilities = {
27
+ resume: true,
28
+ discover: true,
29
+ interactiveAttach: false,
30
+ ask: true,
31
+ approvals: 'runtime',
32
+ extensions: false,
33
+ // harn:assume canonical-spawn-controls-enforced ref=fake-thinking-capability
34
+ thinking: false,
35
+ // The fake harness declares its mapping like any other; tests that need a
36
+ // deferring harness pass their own.
37
+ policies: {
38
+ 'read-only': 'read-only',
39
+ 'workspace-write': 'workspace-write',
40
+ 'full-access': 'full-access',
41
+ },
42
+ // harn:end canonical-spawn-controls-enforced
43
+ ...capabilities,
44
+ };
45
+ }
46
+ enqueue(...turns) {
47
+ this.script.push(...turns);
48
+ }
49
+ failNextResponse(message) {
50
+ this.nextResponseError = new Error(message);
51
+ }
52
+ spawn(opts) {
53
+ return {
54
+ harness: this.id,
55
+ cwd: opts.cwd,
56
+ policy: opts.policy,
57
+ model: opts.model,
58
+ thinking: opts.thinking,
59
+ };
60
+ }
61
+ attach(session_ref) {
62
+ this.attachedRefs.add(session_ref);
63
+ return { harness: this.id, session_ref, cwd: process.cwd() };
64
+ }
65
+ wasAttached(ref) {
66
+ return this.attachedRefs.has(ref);
67
+ }
68
+ async *deliver(session, payload, hooks = {}) {
69
+ hooks.onStarted?.({});
70
+ if (session.session_ref === undefined) {
71
+ session.session_ref = `fake-session-${++this.nextSession}`;
72
+ hooks.onSessionRef?.(session.session_ref);
73
+ }
74
+ this.deliveries.push({
75
+ payload,
76
+ session_ref: session.session_ref,
77
+ cwd: session.cwd,
78
+ policy: session.policy,
79
+ model: session.model,
80
+ thinking: session.thinking,
81
+ attached: this.attachedRefs.has(session.session_ref),
82
+ });
83
+ const key = session.session_ref;
84
+ const running = (this.concurrent.get(key) ?? 0) + 1;
85
+ this.concurrent.set(key, running);
86
+ this.maxConcurrent = Math.max(this.maxConcurrent, running);
87
+ try {
88
+ const turn = this.script.shift();
89
+ if (!turn) {
90
+ // Fail loudly: completing with routable text here would let default
91
+ // routing ping-pong two agents forever (a failed turn kills the
92
+ // member and stops the chain — tests must script every turn).
93
+ yield { type: 'run.completed', status: 'failed', final_text: '(unscripted turn)' };
94
+ return;
95
+ }
96
+ if (turn.kind === 'die-silently') {
97
+ return; // EOF with no completion — daemon sees 'interrupted'
98
+ }
99
+ if (turn.kind === 'fail-on-interrupt') {
100
+ const nativeId = `fake-interrupt-${++this.nextRequest}`;
101
+ const interrupted = new Promise((resolve) => this.pendingAnswers.set(nativeId, resolve));
102
+ this.pendingBySession.set(session, nativeId);
103
+ await interrupted;
104
+ this.pendingBySession.delete(session);
105
+ yield {
106
+ type: 'run.completed',
107
+ status: 'failed',
108
+ ...(turn.error !== undefined
109
+ ? { error: turn.error }
110
+ : { final_text: turn.final_text ?? 'process exited 130 after SIGINT' }),
111
+ };
112
+ return;
113
+ }
114
+ if (turn.kind === 'ask') {
115
+ const nativeId = `fake-req-${++this.nextRequest}`;
116
+ const answer = new Promise((resolve) => this.pendingAnswers.set(nativeId, resolve));
117
+ this.pendingBySession.set(session, nativeId);
118
+ yield {
119
+ type: turn.card.kind === 'ask' ? 'ask.raised' : 'approval.raised',
120
+ card: { ...turn.card, interaction_id: nativeId },
121
+ };
122
+ const value = await answer; // the run is BLOCKED until answered
123
+ this.pendingBySession.delete(session);
124
+ if (value === INTERRUPTED) {
125
+ yield { type: 'run.completed', status: 'interrupted' };
126
+ return;
127
+ }
128
+ yield {
129
+ type: 'run.completed',
130
+ status: 'completed',
131
+ final_text: turn.reply(value),
132
+ usage: { input_tokens: 10, output_tokens: 5 },
133
+ };
134
+ return;
135
+ }
136
+ // harn:assume fake-adapter-drives-live-collaboration ref=fake-live-step-vocabulary
137
+ for (const step of turn.steps ?? []) {
138
+ if (!this.handleStep)
139
+ throw new Error(`fake step ${step.kind} has no handler`);
140
+ await this.handleStep(session, step);
141
+ }
142
+ // harn:end fake-adapter-drives-live-collaboration
143
+ // harn:assume normalized-run-items-presented-live ref=delayed-fake-run-fixture
144
+ for (const item of turn.items ?? []) {
145
+ yield item;
146
+ if (turn.item_delay_ms !== undefined) {
147
+ await new Promise((resolve) => setTimeout(resolve, turn.item_delay_ms));
148
+ }
149
+ }
150
+ if (turn.delay_ms !== undefined) {
151
+ await new Promise((resolve) => setTimeout(resolve, turn.delay_ms));
152
+ }
153
+ // harn:end normalized-run-items-presented-live
154
+ yield {
155
+ type: 'run.completed',
156
+ status: turn.status ?? 'completed',
157
+ final_text: turn.final_text,
158
+ // harn:assume failed-run-details-never-route-as-replies ref=fake-failed-turn-detail
159
+ ...(turn.error !== undefined && { error: turn.error }),
160
+ // harn:end failed-run-details-never-route-as-replies
161
+ usage: turn.usage ?? { input_tokens: 100, output_tokens: 20, cost_usd: 0.01 },
162
+ ...(turn.agent_usage !== undefined && { agent_usage: turn.agent_usage }),
163
+ };
164
+ }
165
+ finally {
166
+ this.concurrent.set(key, (this.concurrent.get(key) ?? 1) - 1);
167
+ }
168
+ }
169
+ async respondInteraction(_session, interaction_id, answer) {
170
+ this.respondCalls.push({ interaction_id, answer });
171
+ if (this.nextResponseError) {
172
+ const error = this.nextResponseError;
173
+ this.nextResponseError = undefined;
174
+ throw error;
175
+ }
176
+ const resolve = this.pendingAnswers.get(interaction_id);
177
+ if (!resolve)
178
+ throw new Error(`no pending interaction ${interaction_id}`);
179
+ this.pendingAnswers.delete(interaction_id);
180
+ resolve(answer);
181
+ await new Promise((r) => setImmediate(r)); // ack after the turn resumed
182
+ }
183
+ /**
184
+ * Observable stand-in for a harness's native compaction: records the call and
185
+ * returns whatever re-baseline the test staged, so the daemon's gate and the
186
+ * ring update can be proven without a real engine. It is an own property, so
187
+ * a test can delete it to model a harness that cannot compact at all.
188
+ */
189
+ compactUsage;
190
+ compactions = [];
191
+ /**
192
+ * When held, compactSession parks until released. A UI test needs the
193
+ * in-flight state to be a fact it controls, not a race it hopes to observe.
194
+ */
195
+ compactionHold = null;
196
+ heldCompactions = [];
197
+ holdCompactions() {
198
+ this.compactionHold = () => undefined;
199
+ }
200
+ releaseCompactions() {
201
+ this.compactionHold = null;
202
+ const waiting = this.heldCompactions;
203
+ this.heldCompactions = [];
204
+ for (const release of waiting)
205
+ release();
206
+ }
207
+ compactSession = async (session) => {
208
+ this.compactions.push(session);
209
+ if (this.compactionHold !== null) {
210
+ await new Promise((resolve) => this.heldCompactions.push(resolve));
211
+ }
212
+ return await Promise.resolve(this.compactUsage);
213
+ };
214
+ interrupt(session) {
215
+ const nativeId = this.pendingBySession.get(session);
216
+ if (!nativeId)
217
+ return;
218
+ const resolve = this.pendingAnswers.get(nativeId);
219
+ this.pendingAnswers.delete(nativeId);
220
+ this.pendingBySession.delete(session);
221
+ resolve?.(INTERRUPTED);
222
+ }
223
+ discoverSessions() {
224
+ return [];
225
+ }
226
+ }
227
+ const INTERRUPTED = Symbol('fake turn interrupted');
228
+ //# sourceMappingURL=fake-adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fake-adapter.js","sourceRoot":"","sources":["../src/fake-adapter.ts"],"names":[],"mappings":"AAqEA,MAAM,OAAO,WAAW;IA0BH;IAzBV,EAAE,CAAS;IACX,YAAY,CAAsB;IAEnC,MAAM,GAAe,EAAE,CAAC;IACvB,UAAU,GAAoB,EAAE,CAAC;IAC1C,6EAA6E;IAC7E,qEAAqE;IACrE,SAAS,CAAyB;IAClC,gBAAgB;QACd,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CA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AAC;QAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC;QACrC,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,KAAK,MAAM,OAAO,IAAI,OAAO;YAAE,OAAO,EAAE,CAAC;IAC3C,CAAC;IAED,cAAc,GAAG,KAAK,EAAE,OAAgB,EAAmC,EAAE;QAC3E,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/B,IAAI,IAAI,CAAC,cAAc,KAAK,IAAI,EAAE,CAAC;YACjC,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAC3E,CAAC;QACD,OAAO,MAAM,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAClD,CAAC,CAAC;IAEF,SAAS,CAAC,OAAgB;QACxB,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACpD,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAClD,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,EAAE,CAAC,WAAW,CAAC,CAAC;IACzB,CAAC;IAED,gBAAgB;QACd,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AAED,MAAM,WAAW,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,44 @@
1
+ export { Store } from './store.js';
2
+ export type { AtomicMirroredTurn, NewMember, NewMessage, SyncResult } from './store.js';
3
+ export { CollaborationGroupSchema, CollaborationParticipantSchema, CollaborationRoundSchema, CollaborationTerminalStatusSchema, composeGroupRoundPayload, deliveryBatchClass, selectDeliveryBatchPrefix, } from './collaboration.js';
4
+ export type { CollaborationGroup, CollaborationGroupState, CollaborationParticipant, CollaborationRound, CollaborationRoundParticipantInput, CollaborationRoundProjection, CollaborationRoundState, CollaborationTerminalStatus, DeliveryBatchClass, GroupResultPresentationStatus, GroupRoundPayloadContext, } from './collaboration.js';
5
+ export { composeDeliveryPayloads, composePayload, evaluateBrakes, isAddressable, isRoutable, parseBody, resolveRecipients, } from './router.js';
6
+ export type { BrakeStats, BrakeVerdict, EligibilityContext, ParsedBody, PayloadContext, ResolvedRef, RouteResult, RoutingContext, } from './router.js';
7
+ export { BlobStore } from './blobs.js';
8
+ export { Daemon } from './daemon.js';
9
+ export type { DaemonOptions, FrameListener } from './daemon.js';
10
+ export { FakeAdapter } from './fake-adapter.js';
11
+ export type { DeliverRecord, FakeTurn } from './fake-adapter.js';
12
+ export { BUILTIN_ADAPTER_IDS, loadAdapterRegistry, } from './adapter-registry.js';
13
+ export type { AdapterFactoryContext, AdapterModuleConfig, AdapterRegistryOptions, } from './adapter-registry.js';
14
+ export { REDACTED, redactText, redactValue } from './redact.js';
15
+ export { startServer } from './server.js';
16
+ export type { RunningServer, ServerOptions } from './server.js';
17
+ export { isPipePath, localSocketPath } from './local-socket.js';
18
+ export { DeviceKeyStore, generateIdentity, } from './crypto/keys.js';
19
+ export type { DeviceIdentity, PeerKind, PeerRecord, PublicIdentity, } from './crypto/keys.js';
20
+ export { openSealedBox, RoomKeyStore, sealBox, } from './crypto/roomkeys.js';
21
+ export type { SealedRoomKey } from './crypto/roomkeys.js';
22
+ export { CryptoVault, PairingService, pairingUrl, } from './crypto/pairing.js';
23
+ export type { PairingOffer, PairingRequest, PairingResult, } from './crypto/pairing.js';
24
+ export { AuthenticatedConnectionRegistry, ChallengeAuthority, challengeBytes, constantTimeEqual, hashTranscript, signChallenge, } from './crypto/challenge.js';
25
+ export type { AuthChallenge, AuthenticatedConnection, } from './crypto/challenge.js';
26
+ export { BrowserDeviceSessionAuthority } from './crypto/browser-sessions.js';
27
+ export type { BrowserDeviceSession } from './crypto/browser-sessions.js';
28
+ export { HyperswarmTransport, lineTopic, } from './transport/hyperswarm.js';
29
+ export type { HyperswarmTransportOptions, LineConfig, RunEventPayload, } from './transport/hyperswarm.js';
30
+ export { EnvelopeDecoder, encodeEnvelope, envelopeUlid, ReliablePeer, validateEnvelope, } from './transport/peer.js';
31
+ export type { NoiseDuplex, OutgoingEnvelope, TransportEnvelope, } from './transport/peer.js';
32
+ export { RemoteAttemptAmbiguousError, ResidencyCoordinator, ResidentAttemptJournal, remoteMemberSpec, } from './residency.js';
33
+ export { buildPushPreview, paddedPushPreview, PUSH_BUCKETS, PUSH_DEVICE_ENVELOPE_MAGIC, PUSH_DEVICE_ENVELOPE_OVERHEAD, PUSH_ENVELOPE_OVERHEAD, PUSH_PREVIEW_LIMIT, PUSH_SEALED_ROOM_KEY_BYTES, PushProducer, sealPushPreview, wrapPushForDevice, } from './push/producer.js';
34
+ export type { HumanPushEvent, HumanPushKind, HumanPushNotifier, PushDeliveryResult, PushPreview, PushProducerOptions, } from './push/producer.js';
35
+ export { PushSubscriptionStore, WebPushSubscriptionSchema, } from './push/subscriptions.js';
36
+ export type { DevicePushSubscription, WebPushSubscription, } from './push/subscriptions.js';
37
+ export { LedgerVault } from './ledger/vault.js';
38
+ export type { LedgerNote, LedgerNoteType, LedgerWrite } from './ledger/vault.js';
39
+ export { LedgerResolver } from './ledger/resolve.js';
40
+ export type { LedgerLookup, ResolvedLedgerRef } from './ledger/resolve.js';
41
+ export { addRemoteLedgerNote, LedgerManager } from './ledger/watch.js';
42
+ export type { LedgerChange, LedgerManagerOptions } from './ledger/watch.js';
43
+ export type { RemoteDeliverHooks, ResidentAttempt, ResidentDeliveryRequest, ResidentMember, ResidencyBoundary, ResidencyCoordinatorOptions, } from './residency.js';
44
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceR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AC3B,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAC1B,6BAA6B,EAC7B,sBAAsB,EACtB,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACZ,eAAe,EACf,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvE,YAAY,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,iBAAiB,EACjB,2BAA2B,GAC5B,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,24 @@
1
+ export { Store } from './store.js';
2
+ export { CollaborationGroupSchema, CollaborationParticipantSchema, CollaborationRoundSchema, CollaborationTerminalStatusSchema, composeGroupRoundPayload, deliveryBatchClass, selectDeliveryBatchPrefix, } from './collaboration.js';
3
+ export { composeDeliveryPayloads, composePayload, evaluateBrakes, isAddressable, isRoutable, parseBody, resolveRecipients, } from './router.js';
4
+ export { BlobStore } from './blobs.js';
5
+ export { Daemon } from './daemon.js';
6
+ export { FakeAdapter } from './fake-adapter.js';
7
+ export { BUILTIN_ADAPTER_IDS, loadAdapterRegistry, } from './adapter-registry.js';
8
+ export { REDACTED, redactText, redactValue } from './redact.js';
9
+ export { startServer } from './server.js';
10
+ export { isPipePath, localSocketPath } from './local-socket.js';
11
+ export { DeviceKeyStore, generateIdentity, } from './crypto/keys.js';
12
+ export { openSealedBox, RoomKeyStore, sealBox, } from './crypto/roomkeys.js';
13
+ export { CryptoVault, PairingService, pairingUrl, } from './crypto/pairing.js';
14
+ export { AuthenticatedConnectionRegistry, ChallengeAuthority, challengeBytes, constantTimeEqual, hashTranscript, signChallenge, } from './crypto/challenge.js';
15
+ export { BrowserDeviceSessionAuthority } from './crypto/browser-sessions.js';
16
+ export { HyperswarmTransport, lineTopic, } from './transport/hyperswarm.js';
17
+ export { EnvelopeDecoder, encodeEnvelope, envelopeUlid, ReliablePeer, validateEnvelope, } from './transport/peer.js';
18
+ export { RemoteAttemptAmbiguousError, ResidencyCoordinator, ResidentAttemptJournal, remoteMemberSpec, } from './residency.js';
19
+ export { buildPushPreview, paddedPushPreview, PUSH_BUCKETS, PUSH_DEVICE_ENVELOPE_MAGIC, PUSH_DEVICE_ENVELOPE_OVERHEAD, PUSH_ENVELOPE_OVERHEAD, PUSH_PREVIEW_LIMIT, PUSH_SEALED_ROOM_KEY_BYTES, PushProducer, sealPushPreview, wrapPushForDevice, } from './push/producer.js';
20
+ export { PushSubscriptionStore, WebPushSubscriptionSchema, } from './push/subscriptions.js';
21
+ export { LedgerVault } from './ledger/vault.js';
22
+ export { LedgerResolver } from './ledger/resolve.js';
23
+ export { addRemoteLedgerNote, LedgerManager } from './ledger/watch.js';
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,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OAAO,EACL,2BAA2B,EAC3B,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAC1B,6BAA6B,EAC7B,sBAAsB,EACtB,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACZ,eAAe,EACf,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAS5B,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AAKjC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { LedgerNote } from './vault.js';
2
+ export interface ResolvedLedgerRef {
3
+ name: string;
4
+ body: string;
5
+ }
6
+ export type LedgerLookup = (room: string, name: string) => LedgerNote | undefined;
7
+ export declare class LedgerResolver {
8
+ private readonly lookup;
9
+ constructor(lookup: LedgerLookup);
10
+ resolve(room: string, names: string[]): ResolvedLedgerRef[];
11
+ }
12
+ //# sourceMappingURL=resolve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../src/ledger/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAC;AAElF,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,YAAY;IAEjD,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE;CAS5D"}
@@ -0,0 +1,17 @@
1
+ export class LedgerResolver {
2
+ lookup;
3
+ constructor(lookup) {
4
+ this.lookup = lookup;
5
+ }
6
+ resolve(room, names) {
7
+ const seen = new Set();
8
+ return names.flatMap((name) => {
9
+ if (seen.has(name))
10
+ return [];
11
+ seen.add(name);
12
+ const note = this.lookup(room, name);
13
+ return note ? [{ name: note.name, body: note.content }] : [];
14
+ });
15
+ }
16
+ }
17
+ //# sourceMappingURL=resolve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/ledger/resolve.ts"],"names":[],"mappings":"AASA,MAAM,OAAO,cAAc;IACI;IAA7B,YAA6B,MAAoB;QAApB,WAAM,GAAN,MAAM,CAAc;IAAG,CAAC;IAErD,OAAO,CAAC,IAAY,EAAE,KAAe;QACnC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;QAC/B,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE,OAAO,EAAE,CAAC;YAC9B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACf,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACrC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,47 @@
1
+ import { z } from 'zod';
2
+ export declare const LedgerNoteTypeSchema: z.ZodEnum<{
3
+ decision: "decision";
4
+ constraint: "constraint";
5
+ contract: "contract";
6
+ }>;
7
+ export type LedgerNoteType = z.infer<typeof LedgerNoteTypeSchema>;
8
+ export interface LedgerNote {
9
+ name: string;
10
+ type?: LedgerNoteType;
11
+ body: string;
12
+ content: string;
13
+ relative_path: string;
14
+ }
15
+ export declare const LedgerWriteSchema: z.ZodObject<{
16
+ name: z.ZodString;
17
+ type: z.ZodEnum<{
18
+ decision: "decision";
19
+ constraint: "constraint";
20
+ contract: "contract";
21
+ }>;
22
+ body: z.ZodString;
23
+ author: z.ZodString;
24
+ }, z.core.$strict>;
25
+ export type LedgerWrite = z.infer<typeof LedgerWriteSchema>;
26
+ export declare class LedgerVault {
27
+ readonly room: string;
28
+ readonly root: string;
29
+ private readonly auditRoot;
30
+ constructor(dataDir: string, room: string);
31
+ isEnabled(): boolean;
32
+ bootstrap(): void;
33
+ add(write: LedgerWrite): LedgerNote;
34
+ note(name: string): LedgerNote | undefined;
35
+ noteAt(path: string): LedgerNote | undefined;
36
+ snapshot(): Record<string, string>;
37
+ pull(destination: string): string;
38
+ consumeAuditAuthor(path: string): string | undefined;
39
+ private writeIfMissing;
40
+ private markdownFiles;
41
+ private parse;
42
+ private writeAuditMarker;
43
+ private contentHash;
44
+ private auditMarker;
45
+ private contains;
46
+ }
47
+ //# sourceMappingURL=vault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../src/ledger/vault.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;EAAiD,CAAC;AACnF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB;AAGD,eAAO,MAAM,iBAAiB;;;;;;;;;kBAKnB,CAAC;AACZ,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAwB5D,qBAAa,WAAW;IAIO,QAAQ,CAAC,IAAI,EAAE,MAAM;IAHlD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;gBAEvB,OAAO,EAAE,MAAM,EAAW,IAAI,EAAE,MAAM;IAQlD,SAAS,IAAI,OAAO;IAIpB,SAAS,IAAI,IAAI;IAuBjB,GAAG,CAAC,KAAK,EAAE,WAAW,GAAG,UAAU;IAenC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAU1C,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAK5C,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAQlC,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;IAUjC,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAkBpD,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,KAAK;IAeb,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,QAAQ;CAIjB"}
@@ -0,0 +1,175 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync, } from 'node:fs';
3
+ import { basename, dirname, join, relative, resolve, sep } from 'node:path';
4
+ import matter from 'gray-matter';
5
+ import { RoomIdSchema } from '@codor/protocol';
6
+ import { z } from 'zod';
7
+ export const LedgerNoteTypeSchema = z.enum(['decision', 'constraint', 'contract']);
8
+ const NOTE_NAME = /^[a-z0-9][a-z0-9-]{0,62}$/;
9
+ export const LedgerWriteSchema = z.object({
10
+ name: z.string().regex(NOTE_NAME, 'ledger note name must be a lowercase slug'),
11
+ type: LedgerNoteTypeSchema,
12
+ body: z.string(),
13
+ author: z.string().trim().min(1, 'ledger author must not be empty'),
14
+ }).strict();
15
+ const template = (name, type, heading) => matter.stringify(`# ${heading}\n\n`, { name, type });
16
+ function safeNoteName(name) {
17
+ if (!NOTE_NAME.test(name))
18
+ throw new Error('ledger note name must be a lowercase slug');
19
+ return name;
20
+ }
21
+ function noteTypeDirectory(type) {
22
+ return `${type}s`;
23
+ }
24
+ function validLedgerWrite(write) {
25
+ const parsed = LedgerWriteSchema.safeParse(write);
26
+ if (parsed.success)
27
+ return parsed.data;
28
+ const detail = parsed.error.issues
29
+ .map((issue) => `${issue.path.join('.') || 'write'}: ${issue.message}`)
30
+ .join('; ');
31
+ throw new Error(`invalid ledger write: ${detail}`);
32
+ }
33
+ // harn:assume ledger-home-only-refs-travel ref=home-ledger-vault
34
+ export class LedgerVault {
35
+ room;
36
+ root;
37
+ auditRoot;
38
+ constructor(dataDir, room) {
39
+ this.room = room;
40
+ RoomIdSchema.parse(room);
41
+ this.root = join(resolve(dataDir), 'rooms', room, 'ledger');
42
+ // harn:assume codor-runtime-identity-is-a-clean-break ref=ledger-runtime-identity
43
+ this.auditRoot = join(this.root, '.codor-audit');
44
+ // harn:end codor-runtime-identity-is-a-clean-break
45
+ }
46
+ isEnabled() {
47
+ return existsSync(this.root);
48
+ }
49
+ bootstrap() {
50
+ for (const directory of ['decisions', 'constraints', 'contracts']) {
51
+ mkdirSync(join(this.root, directory), { recursive: true, mode: 0o700 });
52
+ }
53
+ mkdirSync(this.auditRoot, { recursive: true, mode: 0o700 });
54
+ this.writeIfMissing('INDEX.md', matter.stringify('# Channel Ledger\n\n## Decisions\n\n## Constraints\n\n## Contracts\n', { name: 'index' }));
55
+ this.writeIfMissing('decisions/_template.md', template('decision-template', 'decision', 'Decision'));
56
+ this.writeIfMissing('constraints/_template.md', template('constraint-template', 'constraint', 'Constraint'));
57
+ this.writeIfMissing('contracts/_template.md', template('contract-template', 'contract', 'Contract'));
58
+ }
59
+ add(write) {
60
+ this.bootstrap();
61
+ const valid = validLedgerWrite(write);
62
+ const name = safeNoteName(valid.name);
63
+ const path = resolve(this.root, noteTypeDirectory(valid.type), `${name}.md`);
64
+ if (!this.contains(path))
65
+ throw new Error('ledger write path must remain inside the channel vault');
66
+ const content = matter.stringify(valid.body.endsWith('\n') ? valid.body : `${valid.body}\n`, { name, type: valid.type });
67
+ this.writeAuditMarker(path, valid.author, content);
68
+ writeFileSync(path, content);
69
+ return this.note(name);
70
+ }
71
+ note(name) {
72
+ safeNoteName(name);
73
+ if (!this.isEnabled())
74
+ return undefined;
75
+ for (const path of this.markdownFiles()) {
76
+ const parsed = this.parse(path);
77
+ if (parsed.name === name)
78
+ return parsed;
79
+ }
80
+ return undefined;
81
+ }
82
+ noteAt(path) {
83
+ if (!this.contains(path) || !path.endsWith('.md') || !existsSync(path))
84
+ return undefined;
85
+ return this.parse(path);
86
+ }
87
+ snapshot() {
88
+ if (!this.isEnabled())
89
+ return {};
90
+ return Object.fromEntries(this.markdownFiles().map((path) => [
91
+ relative(this.root, path).split(sep).join('/'),
92
+ readFileSync(path, 'utf8'),
93
+ ]));
94
+ }
95
+ pull(destination) {
96
+ const target = join(resolve(destination), 'ledger');
97
+ for (const [relativePath, content] of Object.entries(this.snapshot())) {
98
+ const path = join(target, relativePath);
99
+ mkdirSync(dirname(path), { recursive: true });
100
+ writeFileSync(path, content);
101
+ }
102
+ return target;
103
+ }
104
+ consumeAuditAuthor(path) {
105
+ const marker = this.auditMarker(path);
106
+ if (!existsSync(marker))
107
+ return undefined;
108
+ try {
109
+ const parsed = JSON.parse(readFileSync(marker, 'utf8'));
110
+ const currentHash = existsSync(path) ? this.contentHash(readFileSync(path)) : undefined;
111
+ return typeof parsed.author === 'string' && parsed.author !== '' &&
112
+ typeof parsed.content_hash === 'string' && parsed.content_hash === currentHash
113
+ ? parsed.author
114
+ : undefined;
115
+ }
116
+ finally {
117
+ rmSync(marker, { force: true });
118
+ }
119
+ }
120
+ writeIfMissing(relativePath, content) {
121
+ const path = join(this.root, relativePath);
122
+ if (!existsSync(path))
123
+ writeFileSync(path, content);
124
+ }
125
+ markdownFiles() {
126
+ const files = [];
127
+ const visit = (directory) => {
128
+ for (const entry of readdirSync(directory, { withFileTypes: true })) {
129
+ if (entry.name === '.codor-audit')
130
+ continue;
131
+ const path = join(directory, entry.name);
132
+ if (entry.isDirectory())
133
+ visit(path);
134
+ else if (entry.isFile() && entry.name.endsWith('.md'))
135
+ files.push(path);
136
+ }
137
+ };
138
+ visit(this.root);
139
+ return files.sort();
140
+ }
141
+ parse(path) {
142
+ const content = readFileSync(path, 'utf8');
143
+ const parsed = matter(content);
144
+ const fallback = basename(path, '.md').replace(/^_/, '');
145
+ const name = typeof parsed.data.name === 'string' ? parsed.data.name : fallback;
146
+ const noteType = LedgerNoteTypeSchema.safeParse(parsed.data.type);
147
+ return {
148
+ name,
149
+ type: noteType.success ? noteType.data : undefined,
150
+ body: parsed.content,
151
+ content,
152
+ relative_path: relative(this.root, path).split(sep).join('/'),
153
+ };
154
+ }
155
+ writeAuditMarker(path, author, content) {
156
+ mkdirSync(this.auditRoot, { recursive: true, mode: 0o700 });
157
+ writeFileSync(this.auditMarker(path), JSON.stringify({
158
+ author,
159
+ content_hash: this.contentHash(content),
160
+ }));
161
+ }
162
+ contentHash(content) {
163
+ return createHash('sha256').update(content).digest('hex');
164
+ }
165
+ auditMarker(path) {
166
+ const encoded = Buffer.from(relative(this.root, path), 'utf8').toString('base64url');
167
+ return join(this.auditRoot, `${encoded}.json`);
168
+ }
169
+ contains(path) {
170
+ const fromRoot = relative(this.root, resolve(path));
171
+ return fromRoot !== '..' && !fromRoot.startsWith(`..${sep}`) && !fromRoot.startsWith(sep);
172
+ }
173
+ }
174
+ // harn:end ledger-home-only-refs-travel
175
+ //# sourceMappingURL=vault.js.map
@@ -0,0 +1 @@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