@enbox/gitd 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (502) hide show
  1. package/LICENSE +177 -0
  2. package/README.md +134 -0
  3. package/dist/esm/ci.js +76 -0
  4. package/dist/esm/ci.js.map +1 -0
  5. package/dist/esm/cli/agent.js +86 -0
  6. package/dist/esm/cli/agent.js.map +1 -0
  7. package/dist/esm/cli/commands/ci.js +278 -0
  8. package/dist/esm/cli/commands/ci.js.map +1 -0
  9. package/dist/esm/cli/commands/clone.js +77 -0
  10. package/dist/esm/cli/commands/clone.js.map +1 -0
  11. package/dist/esm/cli/commands/daemon.js +132 -0
  12. package/dist/esm/cli/commands/daemon.js.map +1 -0
  13. package/dist/esm/cli/commands/github-api.js +36 -0
  14. package/dist/esm/cli/commands/github-api.js.map +1 -0
  15. package/dist/esm/cli/commands/init.js +69 -0
  16. package/dist/esm/cli/commands/init.js.map +1 -0
  17. package/dist/esm/cli/commands/issue.js +293 -0
  18. package/dist/esm/cli/commands/issue.js.map +1 -0
  19. package/dist/esm/cli/commands/log.js +90 -0
  20. package/dist/esm/cli/commands/log.js.map +1 -0
  21. package/dist/esm/cli/commands/migrate.js +444 -0
  22. package/dist/esm/cli/commands/migrate.js.map +1 -0
  23. package/dist/esm/cli/commands/notification.js +141 -0
  24. package/dist/esm/cli/commands/notification.js.map +1 -0
  25. package/dist/esm/cli/commands/org.js +353 -0
  26. package/dist/esm/cli/commands/org.js.map +1 -0
  27. package/dist/esm/cli/commands/patch.js +375 -0
  28. package/dist/esm/cli/commands/patch.js.map +1 -0
  29. package/dist/esm/cli/commands/registry.js +501 -0
  30. package/dist/esm/cli/commands/registry.js.map +1 -0
  31. package/dist/esm/cli/commands/release.js +197 -0
  32. package/dist/esm/cli/commands/release.js.map +1 -0
  33. package/dist/esm/cli/commands/repo.js +148 -0
  34. package/dist/esm/cli/commands/repo.js.map +1 -0
  35. package/dist/esm/cli/commands/serve.js +148 -0
  36. package/dist/esm/cli/commands/serve.js.map +1 -0
  37. package/dist/esm/cli/commands/setup.js +92 -0
  38. package/dist/esm/cli/commands/setup.js.map +1 -0
  39. package/dist/esm/cli/commands/shim.js +75 -0
  40. package/dist/esm/cli/commands/shim.js.map +1 -0
  41. package/dist/esm/cli/commands/social.js +206 -0
  42. package/dist/esm/cli/commands/social.js.map +1 -0
  43. package/dist/esm/cli/commands/web.js +36 -0
  44. package/dist/esm/cli/commands/web.js.map +1 -0
  45. package/dist/esm/cli/commands/wiki.js +185 -0
  46. package/dist/esm/cli/commands/wiki.js.map +1 -0
  47. package/dist/esm/cli/flags.js +29 -0
  48. package/dist/esm/cli/flags.js.map +1 -0
  49. package/dist/esm/cli/main.js +331 -0
  50. package/dist/esm/cli/main.js.map +1 -0
  51. package/dist/esm/cli/repo-context.js +53 -0
  52. package/dist/esm/cli/repo-context.js.map +1 -0
  53. package/dist/esm/daemon/adapter.js +18 -0
  54. package/dist/esm/daemon/adapter.js.map +1 -0
  55. package/dist/esm/daemon/adapters/github.js +112 -0
  56. package/dist/esm/daemon/adapters/github.js.map +1 -0
  57. package/dist/esm/daemon/adapters/go.js +51 -0
  58. package/dist/esm/daemon/adapters/go.js.map +1 -0
  59. package/dist/esm/daemon/adapters/index.js +32 -0
  60. package/dist/esm/daemon/adapters/index.js.map +1 -0
  61. package/dist/esm/daemon/adapters/npm.js +51 -0
  62. package/dist/esm/daemon/adapters/npm.js.map +1 -0
  63. package/dist/esm/daemon/adapters/oci.js +62 -0
  64. package/dist/esm/daemon/adapters/oci.js.map +1 -0
  65. package/dist/esm/daemon/index.js +12 -0
  66. package/dist/esm/daemon/index.js.map +1 -0
  67. package/dist/esm/daemon/server.js +167 -0
  68. package/dist/esm/daemon/server.js.map +1 -0
  69. package/dist/esm/git-remote/credential-helper.js +106 -0
  70. package/dist/esm/git-remote/credential-helper.js.map +1 -0
  71. package/dist/esm/git-remote/credential-main.js +109 -0
  72. package/dist/esm/git-remote/credential-main.js.map +1 -0
  73. package/dist/esm/git-remote/index.js +10 -0
  74. package/dist/esm/git-remote/index.js.map +1 -0
  75. package/dist/esm/git-remote/main.js +78 -0
  76. package/dist/esm/git-remote/main.js.map +1 -0
  77. package/dist/esm/git-remote/parse-url.js +60 -0
  78. package/dist/esm/git-remote/parse-url.js.map +1 -0
  79. package/dist/esm/git-remote/resolve.js +175 -0
  80. package/dist/esm/git-remote/resolve.js.map +1 -0
  81. package/dist/esm/git-remote/service.js +82 -0
  82. package/dist/esm/git-remote/service.js.map +1 -0
  83. package/dist/esm/git-server/auth.js +211 -0
  84. package/dist/esm/git-server/auth.js.map +1 -0
  85. package/dist/esm/git-server/bundle-restore.js +180 -0
  86. package/dist/esm/git-server/bundle-restore.js.map +1 -0
  87. package/dist/esm/git-server/bundle-sync.js +233 -0
  88. package/dist/esm/git-server/bundle-sync.js.map +1 -0
  89. package/dist/esm/git-server/did-service.js +73 -0
  90. package/dist/esm/git-server/did-service.js.map +1 -0
  91. package/dist/esm/git-server/git-backend.js +186 -0
  92. package/dist/esm/git-server/git-backend.js.map +1 -0
  93. package/dist/esm/git-server/http-handler.js +295 -0
  94. package/dist/esm/git-server/http-handler.js.map +1 -0
  95. package/dist/esm/git-server/index.js +16 -0
  96. package/dist/esm/git-server/index.js.map +1 -0
  97. package/dist/esm/git-server/push-authorizer.js +62 -0
  98. package/dist/esm/git-server/push-authorizer.js.map +1 -0
  99. package/dist/esm/git-server/ref-sync.js +132 -0
  100. package/dist/esm/git-server/ref-sync.js.map +1 -0
  101. package/dist/esm/git-server/server.js +185 -0
  102. package/dist/esm/git-server/server.js.map +1 -0
  103. package/dist/esm/git-server/verify.js +109 -0
  104. package/dist/esm/git-server/verify.js.map +1 -0
  105. package/dist/esm/github-shim/helpers.js +273 -0
  106. package/dist/esm/github-shim/helpers.js.map +1 -0
  107. package/dist/esm/github-shim/index.js +13 -0
  108. package/dist/esm/github-shim/index.js.map +1 -0
  109. package/dist/esm/github-shim/issues.js +318 -0
  110. package/dist/esm/github-shim/issues.js.map +1 -0
  111. package/dist/esm/github-shim/pulls.js +423 -0
  112. package/dist/esm/github-shim/pulls.js.map +1 -0
  113. package/dist/esm/github-shim/releases.js +154 -0
  114. package/dist/esm/github-shim/releases.js.map +1 -0
  115. package/dist/esm/github-shim/repos.js +86 -0
  116. package/dist/esm/github-shim/repos.js.map +1 -0
  117. package/dist/esm/github-shim/server.js +351 -0
  118. package/dist/esm/github-shim/server.js.map +1 -0
  119. package/dist/esm/github-shim/users.js +61 -0
  120. package/dist/esm/github-shim/users.js.map +1 -0
  121. package/dist/esm/index.js +26 -0
  122. package/dist/esm/index.js.map +1 -0
  123. package/dist/esm/indexer/api.js +132 -0
  124. package/dist/esm/indexer/api.js.map +1 -0
  125. package/dist/esm/indexer/crawler.js +256 -0
  126. package/dist/esm/indexer/crawler.js.map +1 -0
  127. package/dist/esm/indexer/index.js +9 -0
  128. package/dist/esm/indexer/index.js.map +1 -0
  129. package/dist/esm/indexer/main.js +76 -0
  130. package/dist/esm/indexer/main.js.map +1 -0
  131. package/dist/esm/indexer/store.js +334 -0
  132. package/dist/esm/indexer/store.js.map +1 -0
  133. package/dist/esm/issues.js +133 -0
  134. package/dist/esm/issues.js.map +1 -0
  135. package/dist/esm/notifications.js +47 -0
  136. package/dist/esm/notifications.js.map +1 -0
  137. package/dist/esm/org.js +90 -0
  138. package/dist/esm/org.js.map +1 -0
  139. package/dist/esm/patches.js +136 -0
  140. package/dist/esm/patches.js.map +1 -0
  141. package/dist/esm/refs.js +54 -0
  142. package/dist/esm/refs.js.map +1 -0
  143. package/dist/esm/registry.js +81 -0
  144. package/dist/esm/registry.js.map +1 -0
  145. package/dist/esm/releases.js +78 -0
  146. package/dist/esm/releases.js.map +1 -0
  147. package/dist/esm/repo.js +150 -0
  148. package/dist/esm/repo.js.map +1 -0
  149. package/dist/esm/resolver/index.js +10 -0
  150. package/dist/esm/resolver/index.js.map +1 -0
  151. package/dist/esm/resolver/resolve.js +189 -0
  152. package/dist/esm/resolver/resolve.js.map +1 -0
  153. package/dist/esm/resolver/trust-chain.js +155 -0
  154. package/dist/esm/resolver/trust-chain.js.map +1 -0
  155. package/dist/esm/resolver/verify.js +186 -0
  156. package/dist/esm/resolver/verify.js.map +1 -0
  157. package/dist/esm/shims/go/index.js +9 -0
  158. package/dist/esm/shims/go/index.js.map +1 -0
  159. package/dist/esm/shims/go/proxy.js +275 -0
  160. package/dist/esm/shims/go/proxy.js.map +1 -0
  161. package/dist/esm/shims/go/server.js +70 -0
  162. package/dist/esm/shims/go/server.js.map +1 -0
  163. package/dist/esm/shims/index.js +15 -0
  164. package/dist/esm/shims/index.js.map +1 -0
  165. package/dist/esm/shims/npm/index.js +9 -0
  166. package/dist/esm/shims/npm/index.js.map +1 -0
  167. package/dist/esm/shims/npm/registry.js +234 -0
  168. package/dist/esm/shims/npm/registry.js.map +1 -0
  169. package/dist/esm/shims/npm/server.js +72 -0
  170. package/dist/esm/shims/npm/server.js.map +1 -0
  171. package/dist/esm/shims/oci/index.js +9 -0
  172. package/dist/esm/shims/oci/index.js.map +1 -0
  173. package/dist/esm/shims/oci/registry.js +276 -0
  174. package/dist/esm/shims/oci/registry.js.map +1 -0
  175. package/dist/esm/shims/oci/server.js +82 -0
  176. package/dist/esm/shims/oci/server.js.map +1 -0
  177. package/dist/esm/social.js +70 -0
  178. package/dist/esm/social.js.map +1 -0
  179. package/dist/esm/web/html.js +123 -0
  180. package/dist/esm/web/html.js.map +1 -0
  181. package/dist/esm/web/index.js +7 -0
  182. package/dist/esm/web/index.js.map +1 -0
  183. package/dist/esm/web/routes.js +420 -0
  184. package/dist/esm/web/routes.js.map +1 -0
  185. package/dist/esm/web/server.js +225 -0
  186. package/dist/esm/web/server.js.map +1 -0
  187. package/dist/esm/wiki.js +63 -0
  188. package/dist/esm/wiki.js.map +1 -0
  189. package/dist/types/ci.d.ts +203 -0
  190. package/dist/types/ci.d.ts.map +1 -0
  191. package/dist/types/cli/agent.d.ts +59 -0
  192. package/dist/types/cli/agent.d.ts.map +1 -0
  193. package/dist/types/cli/commands/ci.d.ts +16 -0
  194. package/dist/types/cli/commands/ci.d.ts.map +1 -0
  195. package/dist/types/cli/commands/clone.d.ts +13 -0
  196. package/dist/types/cli/commands/clone.d.ts.map +1 -0
  197. package/dist/types/cli/commands/daemon.d.ts +29 -0
  198. package/dist/types/cli/commands/daemon.d.ts.map +1 -0
  199. package/dist/types/cli/commands/github-api.d.ts +14 -0
  200. package/dist/types/cli/commands/github-api.d.ts.map +1 -0
  201. package/dist/types/cli/commands/init.d.ts +11 -0
  202. package/dist/types/cli/commands/init.d.ts.map +1 -0
  203. package/dist/types/cli/commands/issue.d.ts +16 -0
  204. package/dist/types/cli/commands/issue.d.ts.map +1 -0
  205. package/dist/types/cli/commands/log.d.ts +13 -0
  206. package/dist/types/cli/commands/log.d.ts.map +1 -0
  207. package/dist/types/cli/commands/migrate.d.ts +19 -0
  208. package/dist/types/cli/commands/migrate.d.ts.map +1 -0
  209. package/dist/types/cli/commands/notification.d.ts +16 -0
  210. package/dist/types/cli/commands/notification.d.ts.map +1 -0
  211. package/dist/types/cli/commands/org.d.ts +19 -0
  212. package/dist/types/cli/commands/org.d.ts.map +1 -0
  213. package/dist/types/cli/commands/patch.d.ts +17 -0
  214. package/dist/types/cli/commands/patch.d.ts.map +1 -0
  215. package/dist/types/cli/commands/registry.d.ts +25 -0
  216. package/dist/types/cli/commands/registry.d.ts.map +1 -0
  217. package/dist/types/cli/commands/release.d.ts +13 -0
  218. package/dist/types/cli/commands/release.d.ts.map +1 -0
  219. package/dist/types/cli/commands/repo.d.ts +15 -0
  220. package/dist/types/cli/commands/repo.d.ts.map +1 -0
  221. package/dist/types/cli/commands/serve.d.ts +22 -0
  222. package/dist/types/cli/commands/serve.d.ts.map +1 -0
  223. package/dist/types/cli/commands/setup.d.ts +16 -0
  224. package/dist/types/cli/commands/setup.d.ts.map +1 -0
  225. package/dist/types/cli/commands/shim.d.ts +16 -0
  226. package/dist/types/cli/commands/shim.d.ts.map +1 -0
  227. package/dist/types/cli/commands/social.d.ts +19 -0
  228. package/dist/types/cli/commands/social.d.ts.map +1 -0
  229. package/dist/types/cli/commands/web.d.ts +14 -0
  230. package/dist/types/cli/commands/web.d.ts.map +1 -0
  231. package/dist/types/cli/commands/wiki.d.ts +14 -0
  232. package/dist/types/cli/commands/wiki.d.ts.map +1 -0
  233. package/dist/types/cli/flags.d.ts +16 -0
  234. package/dist/types/cli/flags.d.ts.map +1 -0
  235. package/dist/types/cli/main.d.ts +69 -0
  236. package/dist/types/cli/main.d.ts.map +1 -0
  237. package/dist/types/cli/repo-context.d.ts +30 -0
  238. package/dist/types/cli/repo-context.d.ts.map +1 -0
  239. package/dist/types/daemon/adapter.d.ts +74 -0
  240. package/dist/types/daemon/adapter.d.ts.map +1 -0
  241. package/dist/types/daemon/adapters/github.d.ts +10 -0
  242. package/dist/types/daemon/adapters/github.d.ts.map +1 -0
  243. package/dist/types/daemon/adapters/go.d.ts +10 -0
  244. package/dist/types/daemon/adapters/go.d.ts.map +1 -0
  245. package/dist/types/daemon/adapters/index.d.ts +22 -0
  246. package/dist/types/daemon/adapters/index.d.ts.map +1 -0
  247. package/dist/types/daemon/adapters/npm.d.ts +10 -0
  248. package/dist/types/daemon/adapters/npm.d.ts.map +1 -0
  249. package/dist/types/daemon/adapters/oci.d.ts +10 -0
  250. package/dist/types/daemon/adapters/oci.d.ts.map +1 -0
  251. package/dist/types/daemon/index.d.ts +14 -0
  252. package/dist/types/daemon/index.d.ts.map +1 -0
  253. package/dist/types/daemon/server.d.ts +55 -0
  254. package/dist/types/daemon/server.d.ts.map +1 -0
  255. package/dist/types/git-remote/credential-helper.d.ts +49 -0
  256. package/dist/types/git-remote/credential-helper.d.ts.map +1 -0
  257. package/dist/types/git-remote/credential-main.d.ts +24 -0
  258. package/dist/types/git-remote/credential-main.d.ts.map +1 -0
  259. package/dist/types/git-remote/index.d.ts +10 -0
  260. package/dist/types/git-remote/index.d.ts.map +1 -0
  261. package/dist/types/git-remote/main.d.ts +23 -0
  262. package/dist/types/git-remote/main.d.ts.map +1 -0
  263. package/dist/types/git-remote/parse-url.d.ts +32 -0
  264. package/dist/types/git-remote/parse-url.d.ts.map +1 -0
  265. package/dist/types/git-remote/resolve.d.ts +30 -0
  266. package/dist/types/git-remote/resolve.d.ts.map +1 -0
  267. package/dist/types/git-remote/service.d.ts +75 -0
  268. package/dist/types/git-remote/service.d.ts.map +1 -0
  269. package/dist/types/git-server/auth.d.ts +129 -0
  270. package/dist/types/git-server/auth.d.ts.map +1 -0
  271. package/dist/types/git-server/bundle-restore.d.ts +48 -0
  272. package/dist/types/git-server/bundle-restore.d.ts.map +1 -0
  273. package/dist/types/git-server/bundle-sync.d.ts +90 -0
  274. package/dist/types/git-server/bundle-sync.d.ts.map +1 -0
  275. package/dist/types/git-server/did-service.d.ts +26 -0
  276. package/dist/types/git-server/did-service.d.ts.map +1 -0
  277. package/dist/types/git-server/git-backend.d.ts +84 -0
  278. package/dist/types/git-server/git-backend.d.ts.map +1 -0
  279. package/dist/types/git-server/http-handler.d.ts +73 -0
  280. package/dist/types/git-server/http-handler.d.ts.map +1 -0
  281. package/dist/types/git-server/index.d.ts +16 -0
  282. package/dist/types/git-server/index.d.ts.map +1 -0
  283. package/dist/types/git-server/push-authorizer.d.ts +38 -0
  284. package/dist/types/git-server/push-authorizer.d.ts.map +1 -0
  285. package/dist/types/git-server/ref-sync.d.ts +52 -0
  286. package/dist/types/git-server/ref-sync.d.ts.map +1 -0
  287. package/dist/types/git-server/server.d.ts +70 -0
  288. package/dist/types/git-server/server.d.ts.map +1 -0
  289. package/dist/types/git-server/verify.d.ts +12 -0
  290. package/dist/types/git-server/verify.d.ts.map +1 -0
  291. package/dist/types/github-shim/helpers.d.ts +108 -0
  292. package/dist/types/github-shim/helpers.d.ts.map +1 -0
  293. package/dist/types/github-shim/index.d.ts +15 -0
  294. package/dist/types/github-shim/index.d.ts.map +1 -0
  295. package/dist/types/github-shim/issues.d.ts +24 -0
  296. package/dist/types/github-shim/issues.d.ts.map +1 -0
  297. package/dist/types/github-shim/pulls.d.ts +31 -0
  298. package/dist/types/github-shim/pulls.d.ts.map +1 -0
  299. package/dist/types/github-shim/releases.d.ts +18 -0
  300. package/dist/types/github-shim/releases.d.ts.map +1 -0
  301. package/dist/types/github-shim/repos.d.ts +21 -0
  302. package/dist/types/github-shim/repos.d.ts.map +1 -0
  303. package/dist/types/github-shim/server.d.ts +53 -0
  304. package/dist/types/github-shim/server.d.ts.map +1 -0
  305. package/dist/types/github-shim/users.d.ts +17 -0
  306. package/dist/types/github-shim/users.d.ts.map +1 -0
  307. package/dist/types/index.d.ts +26 -0
  308. package/dist/types/index.d.ts.map +1 -0
  309. package/dist/types/indexer/api.d.ts +32 -0
  310. package/dist/types/indexer/api.d.ts.map +1 -0
  311. package/dist/types/indexer/crawler.d.ts +72 -0
  312. package/dist/types/indexer/crawler.d.ts.map +1 -0
  313. package/dist/types/indexer/index.d.ts +12 -0
  314. package/dist/types/indexer/index.d.ts.map +1 -0
  315. package/dist/types/indexer/main.d.ts +21 -0
  316. package/dist/types/indexer/main.d.ts.map +1 -0
  317. package/dist/types/indexer/store.d.ts +168 -0
  318. package/dist/types/indexer/store.d.ts.map +1 -0
  319. package/dist/types/issues.d.ts +395 -0
  320. package/dist/types/issues.d.ts.map +1 -0
  321. package/dist/types/notifications.d.ts +93 -0
  322. package/dist/types/notifications.d.ts.map +1 -0
  323. package/dist/types/org.d.ts +232 -0
  324. package/dist/types/org.d.ts.map +1 -0
  325. package/dist/types/patches.d.ts +410 -0
  326. package/dist/types/patches.d.ts.map +1 -0
  327. package/dist/types/refs.d.ts +114 -0
  328. package/dist/types/refs.d.ts.map +1 -0
  329. package/dist/types/registry.d.ts +212 -0
  330. package/dist/types/registry.d.ts.map +1 -0
  331. package/dist/types/releases.d.ts +204 -0
  332. package/dist/types/releases.d.ts.map +1 -0
  333. package/dist/types/repo.d.ts +450 -0
  334. package/dist/types/repo.d.ts.map +1 -0
  335. package/dist/types/resolver/index.d.ts +13 -0
  336. package/dist/types/resolver/index.d.ts.map +1 -0
  337. package/dist/types/resolver/resolve.d.ts +80 -0
  338. package/dist/types/resolver/resolve.d.ts.map +1 -0
  339. package/dist/types/resolver/trust-chain.d.ts +54 -0
  340. package/dist/types/resolver/trust-chain.d.ts.map +1 -0
  341. package/dist/types/resolver/verify.d.ts +62 -0
  342. package/dist/types/resolver/verify.d.ts.map +1 -0
  343. package/dist/types/shims/go/index.d.ts +11 -0
  344. package/dist/types/shims/go/index.d.ts.map +1 -0
  345. package/dist/types/shims/go/proxy.d.ts +51 -0
  346. package/dist/types/shims/go/proxy.d.ts.map +1 -0
  347. package/dist/types/shims/go/server.d.ts +23 -0
  348. package/dist/types/shims/go/server.d.ts.map +1 -0
  349. package/dist/types/shims/index.d.ts +18 -0
  350. package/dist/types/shims/index.d.ts.map +1 -0
  351. package/dist/types/shims/npm/index.d.ts +11 -0
  352. package/dist/types/shims/npm/index.d.ts.map +1 -0
  353. package/dist/types/shims/npm/registry.d.ts +46 -0
  354. package/dist/types/shims/npm/registry.d.ts.map +1 -0
  355. package/dist/types/shims/npm/server.d.ts +23 -0
  356. package/dist/types/shims/npm/server.d.ts.map +1 -0
  357. package/dist/types/shims/oci/index.d.ts +11 -0
  358. package/dist/types/shims/oci/index.d.ts.map +1 -0
  359. package/dist/types/shims/oci/registry.d.ts +56 -0
  360. package/dist/types/shims/oci/registry.d.ts.map +1 -0
  361. package/dist/types/shims/oci/server.d.ts +23 -0
  362. package/dist/types/shims/oci/server.d.ts.map +1 -0
  363. package/dist/types/social.d.ts +162 -0
  364. package/dist/types/social.d.ts.map +1 -0
  365. package/dist/types/web/html.d.ts +23 -0
  366. package/dist/types/web/html.d.ts.map +1 -0
  367. package/dist/types/web/index.d.ts +8 -0
  368. package/dist/types/web/index.d.ts.map +1 -0
  369. package/dist/types/web/routes.d.ts +21 -0
  370. package/dist/types/web/routes.d.ts.map +1 -0
  371. package/dist/types/web/server.d.ts +38 -0
  372. package/dist/types/web/server.d.ts.map +1 -0
  373. package/dist/types/wiki.d.ts +143 -0
  374. package/dist/types/wiki.d.ts.map +1 -0
  375. package/package.json +108 -0
  376. package/schemas/ci/check-run.json +23 -0
  377. package/schemas/ci/check-suite.json +23 -0
  378. package/schemas/issues/assignment.json +17 -0
  379. package/schemas/issues/comment.json +14 -0
  380. package/schemas/issues/issue.json +20 -0
  381. package/schemas/issues/label.json +17 -0
  382. package/schemas/issues/reaction.json +14 -0
  383. package/schemas/issues/status-change.json +14 -0
  384. package/schemas/notifications/notification.json +20 -0
  385. package/schemas/org/org-member.json +17 -0
  386. package/schemas/org/org.json +26 -0
  387. package/schemas/org/team-member.json +17 -0
  388. package/schemas/org/team.json +17 -0
  389. package/schemas/patches/merge-result.json +14 -0
  390. package/schemas/patches/patch-status-change.json +14 -0
  391. package/schemas/patches/patch.json +20 -0
  392. package/schemas/patches/review-comment.json +17 -0
  393. package/schemas/patches/review.json +14 -0
  394. package/schemas/patches/revision.json +30 -0
  395. package/schemas/refs/git-ref.json +32 -0
  396. package/schemas/registry/attestation.json +23 -0
  397. package/schemas/registry/package-version.json +23 -0
  398. package/schemas/registry/package.json +32 -0
  399. package/schemas/releases/release.json +17 -0
  400. package/schemas/repo/collaborator.json +17 -0
  401. package/schemas/repo/repo.json +35 -0
  402. package/schemas/repo/settings.json +39 -0
  403. package/schemas/repo/topic.json +14 -0
  404. package/schemas/repo/webhook.json +26 -0
  405. package/schemas/social/activity.json +23 -0
  406. package/schemas/social/follow.json +17 -0
  407. package/schemas/social/star.json +20 -0
  408. package/schemas/wiki/wiki-history.json +20 -0
  409. package/schemas/wiki/wiki-page.json +17 -0
  410. package/src/ci.ts +118 -0
  411. package/src/cli/agent.ts +117 -0
  412. package/src/cli/commands/ci.ts +300 -0
  413. package/src/cli/commands/clone.ts +78 -0
  414. package/src/cli/commands/daemon.ts +129 -0
  415. package/src/cli/commands/github-api.ts +30 -0
  416. package/src/cli/commands/init.ts +69 -0
  417. package/src/cli/commands/issue.ts +321 -0
  418. package/src/cli/commands/log.ts +106 -0
  419. package/src/cli/commands/migrate.ts +525 -0
  420. package/src/cli/commands/notification.ts +148 -0
  421. package/src/cli/commands/org.ts +381 -0
  422. package/src/cli/commands/patch.ts +413 -0
  423. package/src/cli/commands/registry.ts +542 -0
  424. package/src/cli/commands/release.ts +189 -0
  425. package/src/cli/commands/repo.ts +160 -0
  426. package/src/cli/commands/serve.ts +153 -0
  427. package/src/cli/commands/setup.ts +97 -0
  428. package/src/cli/commands/shim.ts +79 -0
  429. package/src/cli/commands/social.ts +221 -0
  430. package/src/cli/commands/web.ts +30 -0
  431. package/src/cli/commands/wiki.ts +199 -0
  432. package/src/cli/flags.ts +28 -0
  433. package/src/cli/main.ts +350 -0
  434. package/src/cli/repo-context.ts +55 -0
  435. package/src/daemon/adapter.ts +95 -0
  436. package/src/daemon/adapters/github.ts +86 -0
  437. package/src/daemon/adapters/go.ts +47 -0
  438. package/src/daemon/adapters/index.ts +36 -0
  439. package/src/daemon/adapters/npm.ts +47 -0
  440. package/src/daemon/adapters/oci.ts +59 -0
  441. package/src/daemon/index.ts +16 -0
  442. package/src/daemon/server.ts +204 -0
  443. package/src/git-remote/credential-helper.ts +114 -0
  444. package/src/git-remote/credential-main.ts +118 -0
  445. package/src/git-remote/index.ts +10 -0
  446. package/src/git-remote/main.ts +74 -0
  447. package/src/git-remote/parse-url.ts +81 -0
  448. package/src/git-remote/resolve.ts +207 -0
  449. package/src/git-remote/service.ts +126 -0
  450. package/src/git-server/auth.ts +308 -0
  451. package/src/git-server/bundle-restore.ts +217 -0
  452. package/src/git-server/bundle-sync.ts +300 -0
  453. package/src/git-server/did-service.ts +77 -0
  454. package/src/git-server/git-backend.ts +222 -0
  455. package/src/git-server/http-handler.ts +386 -0
  456. package/src/git-server/index.ts +16 -0
  457. package/src/git-server/push-authorizer.ts +77 -0
  458. package/src/git-server/ref-sync.ts +166 -0
  459. package/src/git-server/server.ts +236 -0
  460. package/src/git-server/verify.ts +116 -0
  461. package/src/github-shim/helpers.ts +311 -0
  462. package/src/github-shim/index.ts +35 -0
  463. package/src/github-shim/issues.ts +389 -0
  464. package/src/github-shim/pulls.ts +500 -0
  465. package/src/github-shim/releases.ts +185 -0
  466. package/src/github-shim/repos.ts +95 -0
  467. package/src/github-shim/server.ts +334 -0
  468. package/src/github-shim/users.ts +63 -0
  469. package/src/index.ts +26 -0
  470. package/src/indexer/api.ts +162 -0
  471. package/src/indexer/crawler.ts +290 -0
  472. package/src/indexer/index.ts +22 -0
  473. package/src/indexer/main.ts +83 -0
  474. package/src/indexer/store.ts +408 -0
  475. package/src/issues.ts +200 -0
  476. package/src/notifications.ts +80 -0
  477. package/src/org.ts +147 -0
  478. package/src/patches.ts +203 -0
  479. package/src/refs.ts +94 -0
  480. package/src/registry.ts +132 -0
  481. package/src/releases.ts +124 -0
  482. package/src/repo.ts +234 -0
  483. package/src/resolver/index.ts +42 -0
  484. package/src/resolver/resolve.ts +244 -0
  485. package/src/resolver/trust-chain.ts +217 -0
  486. package/src/resolver/verify.ts +237 -0
  487. package/src/shims/go/index.ts +14 -0
  488. package/src/shims/go/proxy.ts +336 -0
  489. package/src/shims/go/server.ts +82 -0
  490. package/src/shims/index.ts +20 -0
  491. package/src/shims/npm/index.ts +14 -0
  492. package/src/shims/npm/registry.ts +288 -0
  493. package/src/shims/npm/server.ts +84 -0
  494. package/src/shims/oci/index.ts +14 -0
  495. package/src/shims/oci/registry.ts +334 -0
  496. package/src/shims/oci/server.ts +94 -0
  497. package/src/social.ts +116 -0
  498. package/src/web/html.ts +120 -0
  499. package/src/web/index.ts +8 -0
  500. package/src/web/routes.ts +449 -0
  501. package/src/web/server.ts +256 -0
  502. package/src/wiki.ts +102 -0
package/LICENSE ADDED
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to the Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by the Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding any notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
package/README.md ADDED
@@ -0,0 +1,134 @@
1
+ # gitd
2
+
3
+ > **Research preview** — this project is under active development and not yet ready for production use. APIs, protocols, and CLI commands may change without notice.
4
+
5
+ A decentralized forge (GitHub alternative) built on [DWN](https://github.com/enboxorg/enbox) protocols. Git is already decentralized — `gitd` decentralizes the rest: issues, pull requests, code review, CI status, releases, package registry, and social features.
6
+
7
+ ## Why
8
+
9
+ GitHub centralizes the social layer around git: identity, access control, issue tracking, code review, package hosting, and discovery all depend on a single provider. `gitd` replaces that layer with DWN protocols, where:
10
+
11
+ - **Identity is self-sovereign** — DIDs replace GitHub usernames. Portable across providers.
12
+ - **Every user owns their data** — your issues, stars, and contributions live on your DWN, not a central server.
13
+ - **Access control is protocol-level** — roles (maintainer, triager, contributor) are DWN records with cryptographic authorization.
14
+ - **Git transport is DID-addressed** — `git clone did::did:dht:abc123/my-repo` resolves via the DID document.
15
+ - **Packages are DID-scoped** — no global namespace squatting, cryptographic provenance by default.
16
+ - **Repos are self-healing** — git bundles stored as DWN records enable any host to restore a repo on demand.
17
+
18
+ ## Install
19
+
20
+ ```bash
21
+ curl -fsSL https://gitd.sh/install | bash
22
+ ```
23
+
24
+ Installs prebuilt binaries for Linux, macOS, and Windows (Git Bash/WSL). Three binaries are installed:
25
+
26
+ | Binary | Purpose |
27
+ |---|---|
28
+ | `gitd` | Main CLI — forge commands, servers, shims |
29
+ | `git-remote-did` | Git remote helper — resolves `did::` URLs to git endpoints |
30
+ | `git-remote-did-credential` | Git credential helper — generates DID-signed push tokens |
31
+
32
+ ```bash
33
+ # Or install via bun/npm
34
+ bun add -g @enbox/gitd
35
+ ```
36
+
37
+ ## CLI
38
+
39
+ ```bash
40
+ # Setup & transport
41
+ gitd setup # Configure git for DID-based remotes
42
+ gitd clone did:dht:abc/repo # Clone via DID resolution
43
+ gitd init my-repo # Create a repo record + bare git repo
44
+ gitd serve # Start git transport server
45
+
46
+ # Issues
47
+ gitd issue create "Bug report"
48
+ gitd issue show 1
49
+ gitd issue comment 1 "On it"
50
+ gitd issue close 1
51
+ gitd issue list
52
+
53
+ # Patches (pull requests)
54
+ gitd patch create "Add feature"
55
+ gitd patch show 1
56
+ gitd patch comment 1 "LGTM"
57
+ gitd patch merge 1
58
+ gitd patch list
59
+
60
+ # Releases
61
+ gitd release create v1.0.0
62
+ gitd release show v1.0.0
63
+ gitd release list
64
+
65
+ # CI / Check suites
66
+ gitd ci create <commit>
67
+ gitd ci run <suite-id> lint
68
+ gitd ci update <run-id> --status completed --conclusion success
69
+ gitd ci status
70
+
71
+ # Package registry
72
+ gitd registry publish my-pkg 1.0.0 ./pkg.tgz
73
+ gitd registry info my-pkg
74
+ gitd registry verify my-pkg 1.0.0 --trusted did:jwk:build-svc
75
+
76
+ # Wiki, orgs, social, notifications
77
+ gitd wiki create getting-started "Getting Started"
78
+ gitd org create my-org
79
+ gitd social star <did>
80
+ gitd notification list
81
+
82
+ # GitHub migration
83
+ gitd migrate all owner/repo # Import repo, issues, PRs, releases
84
+
85
+ # Web UI & services
86
+ gitd web # Read-only web UI
87
+ gitd indexer # Repo discovery + search service
88
+ gitd daemon # Unified shim daemon (GitHub API, npm, Go, OCI)
89
+ gitd whoami # Show connected DID
90
+ ```
91
+
92
+ ## Git Transport
93
+
94
+ - **Smart HTTP server** — `git clone` and `git push` via native git protocol
95
+ - **DID-signed push auth** — pushers prove DID ownership, server checks DWN role records
96
+ - **Ref mirroring** — branch/tag refs sync to DWN records after each push
97
+ - **Bundle sync** — git bundles sync to DWN records after each push (full, incremental, and squash)
98
+ - **Cold-start restore** — repos auto-restore from DWN bundles when a host has no local copy
99
+
100
+ ## Web UI
101
+
102
+ Server-rendered HTML interface for browsing any DWN-enabled git repo. Enter a DID to browse their repos, issues, patches, releases, and wiki pages. No client-side JavaScript.
103
+
104
+ ```bash
105
+ gitd web --port 3000
106
+ ```
107
+
108
+ ## Compatibility Shims
109
+
110
+ Local proxy servers that translate native tool protocols into DWN queries, so existing tools work without modification:
111
+
112
+ - **GitHub API** (`gitd github-api`) — GitHub REST API v3 compatible; works with `gh` CLI, VS Code extensions, CI systems
113
+ - **npm** (`gitd shim npm`) — `npm install --registry=http://localhost:4873 @did:dht:abc/my-pkg`
114
+ - **Go** (`gitd shim go`) — `GOPROXY=http://localhost:4874 go get did.enbox.org/did:dht:abc/my-mod`
115
+ - **OCI/Docker** (`gitd shim oci`) — `docker pull localhost:5555/did:dht:abc/my-image:v1.0.0`
116
+
117
+ Run all shims in one process with `gitd daemon`, or start them individually.
118
+
119
+ ## Architecture
120
+
121
+ See [ARCHITECTURE.md](./ARCHITECTURE.md) for a high-level overview of protocols, transport, and system design. See [PLAN.md](./PLAN.md) for the full implementation plan with detailed protocol definitions and roadmap.
122
+
123
+ ## Development
124
+
125
+ ```bash
126
+ bun install # Install dependencies
127
+ bun run build # Build (clean + tsc)
128
+ bun run lint # Lint (ESLint, zero warnings)
129
+ bun test .spec.ts # Run all tests
130
+ ```
131
+
132
+ ## License
133
+
134
+ Apache-2.0
package/dist/esm/ci.js ADDED
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Forge CI/CD Protocol — check suites, check runs, and build artifacts.
3
+ *
4
+ * CI bots are DID-bearing agents added as maintainers to the repository.
5
+ * Check runs are mutable (status transitions: queued -> in_progress -> completed).
6
+ *
7
+ * @module
8
+ */
9
+ import { defineProtocol } from '@enbox/api';
10
+ // ---------------------------------------------------------------------------
11
+ // Protocol definition
12
+ // ---------------------------------------------------------------------------
13
+ export const ForgeCiDefinition = {
14
+ protocol: 'https://enbox.org/protocols/forge/ci',
15
+ published: true,
16
+ uses: {
17
+ repo: 'https://enbox.org/protocols/forge/repo',
18
+ },
19
+ types: {
20
+ checkSuite: {
21
+ schema: 'https://enbox.org/schemas/forge/check-suite',
22
+ dataFormats: ['application/json'],
23
+ },
24
+ checkRun: {
25
+ schema: 'https://enbox.org/schemas/forge/check-run',
26
+ dataFormats: ['application/json'],
27
+ },
28
+ artifact: {
29
+ dataFormats: ['application/octet-stream', 'application/gzip'],
30
+ },
31
+ },
32
+ structure: {
33
+ repo: {
34
+ $ref: 'repo:repo',
35
+ checkSuite: {
36
+ $actions: [
37
+ { role: 'repo:repo/contributor', can: ['read'] },
38
+ { role: 'repo:repo/maintainer', can: ['create', 'update'] },
39
+ ],
40
+ $tags: {
41
+ $requiredTags: ['commitSha', 'status'],
42
+ $allowUndefinedTags: false,
43
+ commitSha: { type: 'string' },
44
+ status: { type: 'string', enum: ['queued', 'in_progress', 'completed'] },
45
+ conclusion: { type: 'string', enum: ['success', 'failure', 'cancelled', 'skipped'] },
46
+ branch: { type: 'string' },
47
+ },
48
+ checkRun: {
49
+ $actions: [
50
+ { role: 'repo:repo/contributor', can: ['read'] },
51
+ { who: 'author', of: 'repo/checkSuite', can: ['create', 'update'] },
52
+ ],
53
+ $tags: {
54
+ $requiredTags: ['name', 'status'],
55
+ $allowUndefinedTags: false,
56
+ name: { type: 'string' },
57
+ status: { type: 'string', enum: ['queued', 'in_progress', 'completed'] },
58
+ conclusion: { type: 'string', enum: ['success', 'failure', 'cancelled', 'skipped'] },
59
+ },
60
+ artifact: {
61
+ $actions: [
62
+ { role: 'repo:repo/contributor', can: ['read'] },
63
+ { who: 'author', of: 'repo/checkSuite', can: ['create'] },
64
+ ],
65
+ },
66
+ },
67
+ },
68
+ },
69
+ },
70
+ };
71
+ // ---------------------------------------------------------------------------
72
+ // Typed protocol export
73
+ // ---------------------------------------------------------------------------
74
+ /** Typed Forge CI protocol for use with `dwn.using()`. */
75
+ export const ForgeCiProtocol = defineProtocol(ForgeCiDefinition, {});
76
+ //# sourceMappingURL=ci.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci.js","sourceRoot":"","sources":["../../src/ci.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAgC5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAI,sCAAsC;IAClD,SAAS,EAAG,IAAI;IAChB,IAAI,EAAQ;QACV,IAAI,EAAE,wCAAwC;KAC/C;IACD,KAAK,EAAE;QACL,UAAU,EAAE;YACV,MAAM,EAAQ,6CAA6C;YAC3D,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;QACD,QAAQ,EAAE;YACR,MAAM,EAAQ,2CAA2C;YACzD,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,CAAC,0BAA0B,EAAE,kBAAkB,CAAC;SAC9D;KACF;IACD,SAAS,EAAE;QACT,IAAI,EAAE;YACJ,IAAI,EAAE,WAAW;YAEjB,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,EAAE,IAAI,EAAE,uBAAuB,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE;oBAChD,EAAE,IAAI,EAAE,sBAAsB,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,QAAQ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QAAQ,EAAE,EAAE,EAAE,iBAAiB,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE;yBAC1D;qBACF;iBACF;aACF;SACF;KACF;CACoC,CAAC;AAExC,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E,0DAA0D;AAC1D,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAC3C,iBAAiB,EACjB,EAAsB,CACvB,CAAC"}
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Agent bootstrapping — connects to (or creates) a local Web5 agent.
3
+ *
4
+ * On first run the agent vault is initialized with a password, a DID is
5
+ * created, and the forge protocols are installed. Subsequent runs unlock
6
+ * the existing vault and return a ready-to-use `TypedWeb5` instance for
7
+ * each protocol.
8
+ *
9
+ * @module
10
+ */
11
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
+ return new (P || (P = Promise))(function (resolve, reject) {
14
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ import { Web5 } from '@enbox/api';
21
+ import { ForgeCiProtocol } from '../ci.js';
22
+ import { ForgeIssuesProtocol } from '../issues.js';
23
+ import { ForgeNotificationsProtocol } from '../notifications.js';
24
+ import { ForgeOrgProtocol } from '../org.js';
25
+ import { ForgePatchesProtocol } from '../patches.js';
26
+ import { ForgeRefsProtocol } from '../refs.js';
27
+ import { ForgeRegistryProtocol } from '../registry.js';
28
+ import { ForgeReleasesProtocol } from '../releases.js';
29
+ import { ForgeRepoProtocol } from '../repo.js';
30
+ import { ForgeSocialProtocol } from '../social.js';
31
+ import { ForgeWikiProtocol } from '../wiki.js';
32
+ // ---------------------------------------------------------------------------
33
+ // Agent bootstrap
34
+ // ---------------------------------------------------------------------------
35
+ /**
36
+ * Connect to the local Web5 agent, initializing on first launch.
37
+ *
38
+ * The agent's persistent data lives under `dataPath` (default:
39
+ * `~/.gitd/agent`). Sync is disabled — the CLI operates against
40
+ * the local DWN only.
41
+ */
42
+ export function connectAgent(password) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ const { web5, did, recoveryPhrase } = yield Web5.connect({
45
+ password,
46
+ sync: 'off',
47
+ });
48
+ if (recoveryPhrase) {
49
+ console.log('');
50
+ console.log(' Recovery phrase (save this — it cannot be shown again):');
51
+ console.log(` ${recoveryPhrase}`);
52
+ console.log('');
53
+ }
54
+ // Bind typed protocol handles.
55
+ const repo = web5.using(ForgeRepoProtocol);
56
+ const refs = web5.using(ForgeRefsProtocol);
57
+ const issues = web5.using(ForgeIssuesProtocol);
58
+ const patches = web5.using(ForgePatchesProtocol);
59
+ const ci = web5.using(ForgeCiProtocol);
60
+ const releases = web5.using(ForgeReleasesProtocol);
61
+ const registry = web5.using(ForgeRegistryProtocol);
62
+ const social = web5.using(ForgeSocialProtocol);
63
+ const notifications = web5.using(ForgeNotificationsProtocol);
64
+ const wiki = web5.using(ForgeWikiProtocol);
65
+ const org = web5.using(ForgeOrgProtocol);
66
+ // Install / verify all protocols (idempotent).
67
+ // Repo protocol requires encryption: webhook has encryptionRequired: true,
68
+ // and bundle records are optionally encrypted based on repo visibility.
69
+ yield repo.configure({ encryption: true });
70
+ yield refs.configure();
71
+ yield issues.configure();
72
+ yield patches.configure();
73
+ yield ci.configure();
74
+ yield releases.configure();
75
+ yield registry.configure();
76
+ yield social.configure();
77
+ yield notifications.configure();
78
+ yield wiki.configure();
79
+ yield org.configure();
80
+ return {
81
+ did, repo, refs, issues, patches, ci, releases,
82
+ registry, social, notifications, wiki, org, web5,
83
+ };
84
+ });
85
+ }
86
+ //# sourceMappingURL=agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.js","sourceRo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