@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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Richard Xiong
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,293 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="website/public/codor-mark-dark.svg">
4
+ <img src="website/public/codor-mark-light.svg" width="112" alt="Codor logo">
5
+ </picture>
6
+ </p>
7
+
8
+ <h1 align="center">Codor</h1>
9
+ <p align="center"><strong>One channel. Every agent on the wire.</strong></p>
10
+ <p align="center">
11
+ <img alt="Node.js 22.12+" src="https://img.shields.io/badge/Node.js-22.12%2B-3c873a">
12
+ <img alt="pnpm 10.9" src="https://img.shields.io/badge/pnpm-10.9-f69220">
13
+ <img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-222222">
14
+ <a href="https://discord.gg/PtUfM6BhBy"><img alt="Join the Codor Discord" src="https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white"></a>
15
+ </p>
16
+
17
+ > [!WARNING]
18
+ > **Codor is currently in alpha and still under active development.** Expect some features to be
19
+ > broken or unfinished, along with frequent updates.
20
+
21
+ <!-- harn:assume operator-launches-serve-web-next ref=readme-current-web-client -->
22
+ <!-- harn:assume public-npx-setup-is-primary-install ref=readme-primary-install -->
23
+ ## Install
24
+
25
+ Install and configure Codor in one command (Node.js 22.12.0 or newer):
26
+
27
+ ```sh
28
+ npx @richhardry/codor setup
29
+ ```
30
+
31
+ The interactive setup checks this computer, prepares private files, asks how the browser should
32
+ connect, starts Codor, verifies the daemon, and prints a QR, URL, eight-character pairing code, and
33
+ expiry. It never sends channel data through a Codor-hosted service.
34
+
35
+ Preview without changing the host:
36
+
37
+ ```sh
38
+ npx @richhardry/codor setup --dry-run
39
+ ```
40
+
41
+ For unattended setup, approve mutation and choose exposure explicitly:
42
+
43
+ ```sh
44
+ npx @richhardry/codor setup --yes --access localhost
45
+ # or: --access tailscale
46
+ ```
47
+
48
+ - **Linux:** systemd user service.
49
+ - **macOS:** LaunchAgent after login—no Terminal window needs to stay open.
50
+
51
+ <!-- harn:assume windows-setup-installs-private-task-service ref=readme-native-windows-service -->
52
+ - **Windows (native):** hidden per-user Task Scheduler service—no WSL or open terminal required.
53
+ <!-- harn:end windows-setup-installs-private-task-service -->
54
+
55
+ <!-- harn:assume wsl-setup-keeps-private-windows-loopback ref=readme-wsl-access -->
56
+ **Windows with WSL2:** run setup inside WSL, then open the same `http://127.0.0.1:8137`
57
+ address in your Windows browser.
58
+ <!-- harn:end wsl-setup-keeps-private-windows-loopback -->
59
+
60
+ Open the pairing link. Codor is then available locally at <http://127.0.0.1:8137>.
61
+ <!-- harn:end public-npx-setup-is-primary-install -->
62
+
63
+ <details>
64
+ <summary><strong>First time? Install prerequisites</strong></summary>
65
+
66
+ You need Node.js 22.12.0 or newer and one authenticated agent CLI. Git and pnpm are needed only
67
+ for source development.
68
+
69
+ **macOS**
70
+
71
+ ```sh
72
+ xcode-select --install
73
+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
74
+ brew install git node pnpm
75
+ ```
76
+
77
+ **Ubuntu / Debian**
78
+
79
+ ```sh
80
+ sudo apt update
81
+ sudo apt install -y git curl
82
+ curl https://get.volta.sh | bash
83
+ ```
84
+
85
+ Open a new terminal, then run:
86
+
87
+ ```sh
88
+ volta install node@22.12.0
89
+ npm install -g pnpm@10.9.0
90
+ ```
91
+
92
+ **Windows** (PowerShell)
93
+
94
+ ```powershell
95
+ winget install Git.Git OpenJS.NodeJS.LTS
96
+ npm install -g pnpm@10.9.0
97
+ ```
98
+
99
+ Install and sign in to at least one supported agent:
100
+ [Claude Code](https://docs.anthropic.com/en/docs/claude-code/getting-started),
101
+ [Codex](https://github.com/openai/codex),
102
+ [Cursor](https://cursor.com/cli),
103
+ [Antigravity](https://antigravity.google/docs/cli/getting-started) (`agy`),
104
+ [Gemini](https://github.com/google-gemini/gemini-cli),
105
+ [Copilot](https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started), or
106
+ [OpenCode](https://opencode.ai/docs/).
107
+
108
+ </details>
109
+
110
+ ## Access remotely with Tailscale
111
+
112
+ Tailscale lets you open Codor privately from your phone, tablet, or another computer—without
113
+ putting it on the public internet. [Install Tailscale](https://tailscale.com/download) and sign in
114
+ on both devices with the same account.
115
+
116
+ `codor setup` can publish Codor privately over Tailscale automatically. If you skipped that step,
117
+ run:
118
+
119
+ ```sh
120
+ tailscale serve --bg http://127.0.0.1:8137
121
+ tailscale serve status
122
+ codor --data-dir "$HOME/.codor" pair --endpoint https://<machine>.<tailnet>.ts.net
123
+ ```
124
+
125
+ Open the generated pairing link on your other device. Use private Tailscale Serve—not public
126
+ Funnel—so Codor remains available only inside your tailnet.
127
+
128
+ <!-- harn:assume readme-explains-existing-session-custody ref=readme-existing-session-workflow -->
129
+ ## Attach existing sessions
130
+
131
+ Already working in Claude Code or Codex? Add that live session to a channel without starting over.
132
+ From the same project—or by asking the agent to run it:
133
+
134
+ ```sh
135
+ codor join <channel-name> --as planner
136
+ ```
137
+
138
+ Codor detects the current or most recent Claude Code/Codex session. If detection is ambiguous, be
139
+ explicit:
140
+
141
+ ```sh
142
+ codor join <channel-name> --as planner --harness claude-code --session <session-id> --cwd "$PWD"
143
+ codor join <channel-name> --as reviewer --harness codex --session <thread-id> --cwd "$PWD"
144
+ ```
145
+
146
+ The existing terminal remains in control while joined. Configure the
147
+ [Claude Code hooks](docs/JOIN.md#claude-code-hooks) or
148
+ [Codex notify](docs/JOIN.md#codex-notify) once so completed turns appear in the channel. When you
149
+ finish using that terminal, hand the session to Codor:
150
+
151
+ ```sh
152
+ codor adopt -r <channel-name> planner
153
+ ```
154
+
155
+ For the opposite direction—temporarily opening a session Codor already manages—run:
156
+
157
+ ```sh
158
+ codor attach -r <channel-name> planner
159
+ ```
160
+
161
+ This opens the native resumable session and returns it to Codor when you exit. It supports
162
+ resumable Claude Code, Codex, Gemini, OpenCode, and Copilot members. See the complete
163
+ [existing-session guide](docs/JOIN.md).
164
+ <!-- harn:end readme-explains-existing-session-custody -->
165
+
166
+ <details>
167
+ <summary><strong>Service checks, upgrades, and development mode</strong></summary>
168
+
169
+ Preview changes with `codor setup --dry-run`.
170
+
171
+ ```sh
172
+ # Linux service
173
+ systemctl --user status codor.service
174
+ journalctl --user -u codor.service -f
175
+
176
+ # macOS service
177
+ launchctl print "gui/$(id -u)/app.codor.switchboard"
178
+ tail -f "$HOME/.codor/logs/codor.err.log"
179
+ ```
180
+
181
+ For package upgrades, rerun `npx @richhardry/codor setup`; it refreshes the user service against
182
+ the invoking installed runtime. Restart `codor.service` on Linux or
183
+ `app.codor.switchboard` with `launchctl kickstart -k` on macOS if the service manager has not
184
+ already restarted it.
185
+
186
+ <!-- harn:assume source-cli-installers-remain-idempotent-fallback ref=readme-native-windows-installer -->
187
+ For source development, clone the repository, run `pnpm install --frozen-lockfile && pnpm -r build`,
188
+ then use `scripts/install-cli.sh` on POSIX or
189
+ `powershell -ExecutionPolicy Bypass -File scripts/install-cli.ps1` on Windows. These idempotent
190
+ checkout installers are contributor fallbacks, not the normal product installation.
191
+ <!-- harn:end source-cli-installers-remain-idempotent-fallback -->
192
+
193
+ The supported browser build is `packages/web-next/dist`; it contains the complete browser runtime
194
+ and service worker. Foreground development, backup, restore, and detailed operations are in
195
+ [docs/SELF-HOST.md](docs/SELF-HOST.md).
196
+
197
+ </details>
198
+ <!-- harn:end operator-launches-serve-web-next -->
199
+
200
+ <!-- harn:assume human-facing-surfaces-call-rooms-channels ref=public-docs-channel-terminology -->
201
+ ## What Codor does
202
+
203
+ Codor gives persistent coding agents one shared channel while each keeps its native session and
204
+ context. Messages, mentions, tool evidence, files, unread state, and run history stay on your
205
+ machine.
206
+
207
+ ![Codor channel showing chronological agent work, approvals, and People & agents](website/public/codor-channel.png)
208
+
209
+ - Mention agents to give them work and let them collaborate.
210
+ - Watch every human and agent message in permanent chronological order.
211
+ - Resume after sleep, disconnects, and restarts without losing streamed work.
212
+ - Add remote machines, a ledger, Slack, or Telegram only when you need them.
213
+ <!-- harn:end human-facing-surfaces-call-rooms-channels -->
214
+
215
+ ## Everyday CLI
216
+
217
+ <!-- harn:assume source-cli-installers-remain-idempotent-fallback ref=cli-install-docs -->
218
+ The source-checkout installers remain idempotent development fallbacks. Normal installation uses
219
+ `npx @richhardry/codor setup`. Most use happens in the PWA, but these commands are useful from a
220
+ terminal:
221
+
222
+ ```sh
223
+ codor channels
224
+ codor post -r desk '@reviewer check #12'
225
+ codor tail -r desk --once
226
+ codor revive -r desk reviewer
227
+ ```
228
+
229
+ Run `codor --help` for the complete CLI. Adapter authors can start with
230
+ [docs/ADAPTERS.md](docs/ADAPTERS.md).
231
+ <!-- harn:end source-cli-installers-remain-idempotent-fallback -->
232
+
233
+ <!-- harn:assume agent-member-credentials-are-defense-in-depth ref=readme-agent-trust-boundary -->
234
+ > [!IMPORTANT]
235
+ > Agent credentials narrow Codor permissions; they are not a process sandbox. Agents still run as
236
+ > your OS user. Use a separate account, VM, or container when code needs real containment.
237
+ <!-- harn:end agent-member-credentials-are-defense-in-depth -->
238
+
239
+ <details>
240
+ <summary><strong>Advanced collaboration and privacy</strong></summary>
241
+
242
+ <!-- harn:assume live-collaboration-contract-is-public-v5 ref=readme-live-collaboration -->
243
+ Agents can post interim updates, wait for named peers, inspect status, and search bounded redacted
244
+ run evidence without ending their native turn:
245
+
246
+ ```sh
247
+ codor post --wait --timeout 300 '@reviewer check the fixture'
248
+ codor status reviewer
249
+ codor tail --follow --until-mention coder --timeout 300
250
+ codor search -r desk --runs --limit 50 'fixture'
251
+ ```
252
+
253
+ Agent subprocesses receive their channel identity, member credential, and collaboration
254
+ conventions, so interim posts are attributed correctly. `post --wait` accepts only a direct reply
255
+ from an addressed member; timeout is normal control flow and matching deliveries are consumed once.
256
+ Claude Code's inbox hook checks after tool calls without injecting empty messages. The PWA shows
257
+ who is working or waiting, on whom, and for how long.
258
+ <!-- harn:end live-collaboration-contract-is-public-v5 -->
259
+
260
+ Remote relays can see sealed payloads plus delivery
261
+ metadata, but cannot decrypt channel content.
262
+
263
+ Keep port 8137 on localhost and use a private authenticated tunnel such as Tailscale Serve. Read
264
+ [docs/PRIVACY.md](docs/PRIVACY.md) before enabling remote access, push, DHT lines, or bridges.
265
+
266
+ </details>
267
+
268
+ ## Documentation
269
+
270
+ [Self-host](docs/SELF-HOST.md) · [Architecture](docs/ARCHITECTURE.md) ·
271
+ [Protocol](docs/PROTOCOL.md) · [Privacy](docs/PRIVACY.md) · [Roadmap](docs/ROADMAP.md)
272
+
273
+ <details>
274
+ <summary><strong>Development</strong></summary>
275
+
276
+ ```sh
277
+ pnpm install --frozen-lockfile
278
+ pnpm test:all
279
+ pnpm audit:license
280
+ ```
281
+
282
+ Physical-device and credential-gated checks are in [MANUAL-VERIFY.md](MANUAL-VERIFY.md).
283
+
284
+ </details>
285
+
286
+ ## Join the Discord
287
+
288
+ Codor is being built in public. [Join the Codor Discord](https://discord.gg/PtUfM6BhBy) to ask
289
+ questions, report bugs, share feedback, and follow new releases.
290
+
291
+ ## License
292
+
293
+ [MIT](LICENSE), copyright 2026 Richard Xiong.
package/bin/codor.mjs ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { runCli } from '@codor/cli';
3
+
4
+ await runCli().catch((error) => {
5
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
6
+ process.exitCode = 1;
7
+ });
@@ -0,0 +1,41 @@
1
+ import { type AdapterTurnHooks, type HarnessAdapter, type ModelCatalog, type Session, type SessionRef, type SpawnOpts, type WireEvent } from '@codor/protocol';
2
+ export declare function parseConversationId(log: string): string | undefined;
3
+ export declare function antigravitySlug(display: string): string;
4
+ export interface AntigravityInvocation {
5
+ mode: 'plan' | 'accept-edits';
6
+ skipPermissions: boolean;
7
+ }
8
+ export declare function antigravityMode(policy: string | undefined): AntigravityInvocation;
9
+ export declare function antigravityArgs(session: Session, payload: string, logFile: string, model?: string | undefined): string[];
10
+ export declare class AntigravityAdapter implements HarnessAdapter {
11
+ private readonly command;
12
+ readonly id = "antigravity";
13
+ readonly capabilities: {
14
+ readonly resume: true;
15
+ readonly discover: false;
16
+ readonly interactiveAttach: false;
17
+ readonly ask: false;
18
+ readonly approvals: "spawn-time";
19
+ readonly extensions: false;
20
+ readonly thinking: false;
21
+ readonly live_inbox: false;
22
+ readonly policies: {
23
+ readonly 'read-only': "--mode plan";
24
+ readonly 'workspace-write': "--mode accept-edits";
25
+ readonly 'full-access': "--mode accept-edits --dangerously-skip-permissions";
26
+ };
27
+ };
28
+ private readonly children;
29
+ private readonly displayNames;
30
+ constructor(command?: string);
31
+ spawn(opts: SpawnOpts): Session;
32
+ listModels(): Promise<ModelCatalog>;
33
+ attach(sessionRef: SessionRef): Session;
34
+ deliver(session: Session, payload: string, hooks?: AdapterTurnHooks): AsyncIterable<WireEvent>;
35
+ private recoverSessionRef;
36
+ interrupt(session: Session): void;
37
+ private signal;
38
+ respondInteraction(): Promise<void>;
39
+ discoverSessions(): SessionRef[];
40
+ }
41
+ //# sourceMappingURL=adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../src/adapter.ts"],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,OAAO,GAAG,IAAI;IAKjC,OAAO,CAAC,MAAM;IAUd,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAInC,gBAAgB,IAAI,UAAU,EAAE;CAGjC"}
@@ -0,0 +1,275 @@
1
+ import { randomUUID } from 'node:crypto';
2
+ import { readFileSync, rmSync } from 'node:fs';
3
+ import { tmpdir } from 'node:os';
4
+ import { join } from 'node:path';
5
+ import { PolicySchema, } from '@codor/protocol';
6
+ import spawn from 'cross-spawn';
7
+ const CONVERSATION_RE = /\bfor ([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b/gi;
8
+ const MAX_OUTPUT_BYTES = 256 * 1024;
9
+ const TRUNCATED = '\n[output truncated]';
10
+ export function parseConversationId(log) {
11
+ return [...log.matchAll(CONVERSATION_RE)].at(-1)?.[1]?.toLowerCase();
12
+ }
13
+ export function antigravitySlug(display) {
14
+ return display.toLowerCase().replace(/[^a-z0-9.]+/g, '-').replace(/^-+|-+$/g, '');
15
+ }
16
+ function utf8Prefix(value, maxBytes) {
17
+ if (maxBytes <= 0)
18
+ return '';
19
+ if (Buffer.byteLength(value, 'utf8') <= maxBytes)
20
+ return value;
21
+ let bytes = 0;
22
+ let prefix = '';
23
+ for (const point of value) {
24
+ const pointBytes = Buffer.byteLength(point, 'utf8');
25
+ if (bytes + pointBytes > maxBytes)
26
+ break;
27
+ prefix += point;
28
+ bytes += pointBytes;
29
+ }
30
+ return prefix;
31
+ }
32
+ function finalOutput(output, truncated) {
33
+ if (!truncated)
34
+ return output;
35
+ const markerBytes = Buffer.byteLength(TRUNCATED, 'utf8');
36
+ return `${utf8Prefix(output, MAX_OUTPUT_BYTES - markerBytes)}${TRUNCATED}`;
37
+ }
38
+ // harn:assume canonical-spawn-controls-enforced ref=antigravity-spawn-control-mapping
39
+ export function antigravityMode(policy) {
40
+ if (policy === undefined)
41
+ return { mode: 'accept-edits', skipPermissions: false };
42
+ if (!PolicySchema.safeParse(policy).success) {
43
+ throw new Error(`unknown policy '${policy}'; valid policies: ${PolicySchema.options.join(', ')}`);
44
+ }
45
+ if (policy === 'read-only')
46
+ return { mode: 'plan', skipPermissions: false };
47
+ if (policy === 'workspace-write')
48
+ return { mode: 'accept-edits', skipPermissions: false };
49
+ return { mode: 'accept-edits', skipPermissions: true };
50
+ }
51
+ export function antigravityArgs(session, payload, logFile, model = session.model) {
52
+ if (session.thinking !== undefined) {
53
+ throw new Error("adapter 'antigravity' does not support thinking levels");
54
+ }
55
+ const { mode, skipPermissions } = antigravityMode(session.policy);
56
+ const args = [
57
+ '--mode', mode,
58
+ '--add-dir', session.cwd,
59
+ '--log-file', logFile,
60
+ '--print-timeout', '30m',
61
+ ];
62
+ if (model !== undefined)
63
+ args.push('--model', model);
64
+ if (skipPermissions)
65
+ args.push('--dangerously-skip-permissions');
66
+ if (session.session_ref !== undefined)
67
+ args.push('--conversation', session.session_ref);
68
+ args.push('--print', payload);
69
+ return args;
70
+ }
71
+ // harn:end canonical-spawn-controls-enforced
72
+ export class AntigravityAdapter {
73
+ command;
74
+ id = 'antigravity';
75
+ // harn:assume canonical-spawn-controls-enforced ref=antigravity-capability-map
76
+ capabilities = {
77
+ resume: true,
78
+ discover: false,
79
+ interactiveAttach: false,
80
+ ask: false,
81
+ approvals: 'spawn-time',
82
+ extensions: false,
83
+ thinking: false,
84
+ live_inbox: false,
85
+ // harn:assume harness-declares-what-a-policy-becomes ref=antigravity-policy-declarations
86
+ policies: {
87
+ 'read-only': '--mode plan',
88
+ 'workspace-write': '--mode accept-edits',
89
+ 'full-access': '--mode accept-edits --dangerously-skip-permissions',
90
+ },
91
+ // harn:end harness-declares-what-a-policy-becomes
92
+ };
93
+ // harn:end canonical-spawn-controls-enforced
94
+ children = new WeakMap();
95
+ displayNames = new Map();
96
+ constructor(command = 'agy') {
97
+ this.command = command;
98
+ }
99
+ spawn(opts) {
100
+ antigravityMode(opts.policy);
101
+ if (opts.thinking !== undefined) {
102
+ throw new Error("adapter 'antigravity' does not support thinking levels");
103
+ }
104
+ return {
105
+ harness: this.id,
106
+ cwd: opts.cwd,
107
+ model: opts.model,
108
+ policy: opts.policy,
109
+ };
110
+ }
111
+ // harn:assume adapters-own-their-model-catalog ref=antigravity-model-catalog
112
+ listModels() {
113
+ const result = spawn.sync(this.command, ['models'], {
114
+ timeout: 5_000,
115
+ maxBuffer: 1_000_000,
116
+ encoding: 'utf8',
117
+ });
118
+ if (result.error)
119
+ return Promise.reject(result.error);
120
+ if (result.status !== 0) {
121
+ return Promise.reject(new Error(`Command failed: ${this.command} models`));
122
+ }
123
+ const displays = String(result.stdout ?? '')
124
+ .split(/\r?\n/)
125
+ .map((line) => line.trim())
126
+ .filter(Boolean);
127
+ if (displays.length === 0)
128
+ return Promise.reject(new Error('agy listed no models'));
129
+ const next = new Map();
130
+ for (const display of displays) {
131
+ const slug = antigravitySlug(display);
132
+ if (slug === '')
133
+ return Promise.reject(new Error(`agy model '${display}' has no safe slug`));
134
+ const existing = next.get(slug);
135
+ if (existing !== undefined && existing !== display) {
136
+ return Promise.reject(new Error(`agy model names collide at slug '${slug}'`));
137
+ }
138
+ next.set(slug, display);
139
+ }
140
+ this.displayNames.clear();
141
+ for (const [slug, display] of next)
142
+ this.displayNames.set(slug, display);
143
+ return Promise.resolve({ models: [...next.keys()], source: 'discovered' });
144
+ }
145
+ // harn:end adapters-own-their-model-catalog
146
+ attach(sessionRef) {
147
+ return { harness: this.id, session_ref: sessionRef, cwd: process.cwd() };
148
+ }
149
+ // harn:assume adapter-process-lifecycle-supervised ref=antigravity-cli-process-supervision
150
+ async *deliver(session, payload, hooks = {}) {
151
+ const logFile = join(tmpdir(), `codor-antigravity-${randomUUID()}.log`);
152
+ const model = session.model === undefined
153
+ ? undefined
154
+ : this.displayNames.get(session.model) ?? session.model;
155
+ const child = spawn(this.command, antigravityArgs(session, payload, logFile, model), {
156
+ cwd: session.cwd,
157
+ stdio: ['ignore', 'pipe', 'pipe'],
158
+ detached: true,
159
+ // harn:assume adapter-children-inherit-session-env ref=antigravity-child-environment
160
+ env: { ...process.env, ...session.env },
161
+ // harn:end adapter-children-inherit-session-env
162
+ });
163
+ this.children.set(session, child);
164
+ let output = '';
165
+ let truncated = false;
166
+ let stderr = '';
167
+ let terminal = false;
168
+ let childError;
169
+ child.stdout.setEncoding('utf8');
170
+ child.stderr.setEncoding('utf8');
171
+ child.stderr.on('data', (chunk) => {
172
+ stderr = `${stderr}${chunk}`.slice(-8192);
173
+ });
174
+ const spawned = new Promise((resolve, reject) => {
175
+ child.once('spawn', resolve);
176
+ child.once('error', (error) => {
177
+ childError = error;
178
+ reject(error);
179
+ });
180
+ });
181
+ const closed = new Promise((resolve) => child.once('close', (code, signal) => resolve({ code, signal })));
182
+ try {
183
+ try {
184
+ await spawned;
185
+ }
186
+ catch (error) {
187
+ terminal = true;
188
+ yield {
189
+ type: 'run.completed',
190
+ status: 'failed',
191
+ final_text: error instanceof Error ? error.message : String(error),
192
+ };
193
+ return;
194
+ }
195
+ hooks.onStarted?.({ pid: child.pid, process_group_id: child.pid });
196
+ // harn:assume antigravity-plain-output-is-bounded ref=antigravity-output-bound
197
+ for await (const chunk of child.stdout) {
198
+ const text = chunk;
199
+ const accepted = utf8Prefix(text, MAX_OUTPUT_BYTES - Buffer.byteLength(output, 'utf8'));
200
+ if (accepted !== text)
201
+ truncated = true;
202
+ if (accepted !== '') {
203
+ output += accepted;
204
+ yield { type: 'run.item', item_type: 'text_delta', payload: { text: accepted } };
205
+ }
206
+ }
207
+ // harn:end antigravity-plain-output-is-bounded
208
+ const exit = await closed;
209
+ // harn:assume antigravity-session-resume-is-log-derived ref=antigravity-log-resume
210
+ const sessionRef = this.recoverSessionRef(logFile);
211
+ if (sessionRef !== undefined && sessionRef !== session.session_ref) {
212
+ session.session_ref = sessionRef;
213
+ hooks.onSessionRef?.(sessionRef);
214
+ }
215
+ // harn:end antigravity-session-resume-is-log-derived
216
+ const detail = stderr.trim() || childError?.message;
217
+ const status = childError !== undefined || (exit.code !== null && exit.code !== 0)
218
+ ? 'failed'
219
+ : exit.signal !== null ? 'interrupted' : 'completed';
220
+ const evidence = status === 'completed' ? output.trim() : output.trim() || detail || '';
221
+ const finalText = finalOutput(evidence, truncated);
222
+ terminal = true;
223
+ yield {
224
+ type: 'run.completed',
225
+ status,
226
+ ...(finalText !== '' && { final_text: finalText }),
227
+ };
228
+ }
229
+ finally {
230
+ if (!terminal) {
231
+ const finalText = finalOutput(output.trim(), truncated);
232
+ yield {
233
+ type: 'run.completed',
234
+ status: 'interrupted',
235
+ ...(finalText !== '' && { final_text: finalText }),
236
+ };
237
+ }
238
+ this.children.delete(session);
239
+ rmSync(logFile, { force: true });
240
+ if (child.exitCode === null && child.signalCode === null)
241
+ this.signal(child, 'SIGKILL');
242
+ }
243
+ }
244
+ recoverSessionRef(logFile) {
245
+ try {
246
+ return parseConversationId(readFileSync(logFile, 'utf8'));
247
+ }
248
+ catch {
249
+ return undefined;
250
+ }
251
+ }
252
+ interrupt(session) {
253
+ const child = this.children.get(session);
254
+ if (child)
255
+ this.signal(child, 'SIGINT');
256
+ }
257
+ signal(child, signal) {
258
+ if (child.pid === undefined)
259
+ return;
260
+ try {
261
+ process.kill(process.platform === 'win32' ? child.pid : -child.pid, signal);
262
+ }
263
+ catch {
264
+ child.kill(signal);
265
+ }
266
+ }
267
+ // harn:end adapter-process-lifecycle-supervised
268
+ respondInteraction() {
269
+ return Promise.reject(new Error('agy print mode has no interaction response channel'));
270
+ }
271
+ discoverSessions() {
272
+ return [];
273
+ }
274
+ }
275
+ //# sourceMappingURL=adapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC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AAC;QAAC,MAAM,CAAC;YACP,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IACD,gDAAgD;IAEhD,kBAAkB;QAChB,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC,CAAC;IACzF,CAAC;IAED,gBAAgB;QACd,OAAO,EAAE,CAAC;IACZ,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { AntigravityAdapter, antigravityArgs, antigravityMode, antigravitySlug, parseConversationId, } from './adapter.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,mBAAmB,GACpB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { AntigravityAdapter, antigravityArgs, antigravityMode, antigravitySlug, parseConversationId, } from './adapter.js';
2
+ //# sourceMappingURL=index.js.map