@trebired/git-host 2.0.0 → 2.1.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 (794) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +184 -1007
  3. package/bin/.gitkeep +1 -0
  4. package/bin/git-host-actions-runner-darwin-arm64 +0 -0
  5. package/bin/git-host-actions-runner-darwin-x64 +0 -0
  6. package/bin/git-host-actions-runner-linux-arm64-gnu +0 -0
  7. package/bin/git-host-actions-runner-linux-x64-gnu +0 -0
  8. package/dist/{internal/api → api}/forge/actions.d.ts +2 -2
  9. package/dist/api/forge/actions.d.ts.map +1 -0
  10. package/dist/{internal/api → api}/forge/actions.js +11 -56
  11. package/dist/{internal/api → api}/forge/actions.js.map +1 -1
  12. package/dist/{internal/api → api}/forge/archives.d.ts +1 -1
  13. package/dist/api/forge/archives.d.ts.map +1 -0
  14. package/dist/{internal/api → api}/forge/archives.js +3 -3
  15. package/dist/api/forge/archives.js.map +1 -0
  16. package/dist/{internal/api → api}/forge/handler.d.ts +1 -1
  17. package/dist/api/forge/handler.d.ts.map +1 -0
  18. package/dist/{internal/api → api}/forge/handler.js +1 -1
  19. package/dist/api/forge/handler.js.map +1 -0
  20. package/dist/{internal/api → api}/forge/route.d.ts +1 -1
  21. package/dist/api/forge/route.d.ts.map +1 -0
  22. package/dist/{internal/api → api}/forge/route.js +2 -2
  23. package/dist/api/forge/route.js.map +1 -0
  24. package/dist/{internal/api → api}/forge/runtime.d.ts +1 -1
  25. package/dist/api/forge/runtime.d.ts.map +1 -0
  26. package/dist/{internal/api → api}/forge/runtime.js +5 -5
  27. package/dist/api/forge/runtime.js.map +1 -0
  28. package/dist/{internal/api → api}/forge/socket.d.ts +1 -1
  29. package/dist/api/forge/socket.d.ts.map +1 -0
  30. package/dist/{internal/api → api}/forge/socket.js +3 -3
  31. package/dist/api/forge/socket.js.map +1 -0
  32. package/dist/api/handler/action.d.ts +5 -0
  33. package/dist/api/handler/action.d.ts.map +1 -0
  34. package/dist/{internal/api → api}/handler/action.js +2 -2
  35. package/dist/api/handler/action.js.map +1 -0
  36. package/dist/{internal/api → api}/handler/archive.d.ts +1 -1
  37. package/dist/api/handler/archive.d.ts.map +1 -0
  38. package/dist/api/handler/archive.js.map +1 -0
  39. package/dist/api/handler/response.d.ts.map +1 -0
  40. package/dist/{internal/api → api}/handler/response.js +2 -2
  41. package/dist/api/handler/response.js.map +1 -0
  42. package/dist/api/handler/route.d.ts.map +1 -0
  43. package/dist/{internal/api → api}/handler/route.js +1 -1
  44. package/dist/api/handler/route.js.map +1 -0
  45. package/dist/{internal/api → api}/handler/runtime.d.ts +1 -1
  46. package/dist/api/handler/runtime.d.ts.map +1 -0
  47. package/dist/{internal/api → api}/handler/runtime.js +2 -2
  48. package/dist/api/handler/runtime.js.map +1 -0
  49. package/dist/{internal/api → api}/handler.d.ts +1 -1
  50. package/dist/api/handler.d.ts.map +1 -0
  51. package/dist/api/handler.js.map +1 -0
  52. package/dist/api/routing.d.ts.map +1 -0
  53. package/dist/{internal/api → api}/routing.js +1 -1
  54. package/dist/api/routing.js.map +1 -0
  55. package/dist/api/socket/events.d.ts.map +1 -0
  56. package/dist/api/socket/events.js.map +1 -0
  57. package/dist/{internal/api → api}/socket/server.d.ts +1 -1
  58. package/dist/api/socket/server.d.ts.map +1 -0
  59. package/dist/{internal/api → api}/socket/server.js +3 -3
  60. package/dist/api/socket/server.js.map +1 -0
  61. package/dist/backend/utils/normalize.d.ts.map +1 -0
  62. package/dist/backend/utils/normalize.js.map +1 -0
  63. package/dist/backend/utils/object.d.ts.map +1 -0
  64. package/dist/backend/utils/object.js.map +1 -0
  65. package/dist/backend/utils/time.d.ts.map +1 -0
  66. package/dist/backend/utils/time.js.map +1 -0
  67. package/dist/constants.d.ts.map +1 -0
  68. package/dist/constants.js.map +1 -0
  69. package/dist/core/actions_runner.d.ts +58 -0
  70. package/dist/core/actions_runner.d.ts.map +1 -0
  71. package/dist/core/actions_runner.js +414 -0
  72. package/dist/core/actions_runner.js.map +1 -0
  73. package/dist/core/actions_workflows.d.ts +22 -0
  74. package/dist/core/actions_workflows.d.ts.map +1 -0
  75. package/dist/core/actions_workflows.js +218 -0
  76. package/dist/core/actions_workflows.js.map +1 -0
  77. package/dist/{internal/core → core}/activity.d.ts +1 -1
  78. package/dist/core/activity.d.ts.map +1 -0
  79. package/dist/{internal/core → core}/activity.js +1 -1
  80. package/dist/core/activity.js.map +1 -0
  81. package/dist/{internal/core → core}/archive.d.ts +1 -1
  82. package/dist/core/archive.d.ts.map +1 -0
  83. package/dist/{internal/core → core}/archive.js +2 -2
  84. package/dist/core/archive.js.map +1 -0
  85. package/dist/{internal/core → core}/archive_cache_filesystem.d.ts +1 -1
  86. package/dist/core/archive_cache_filesystem.d.ts.map +1 -0
  87. package/dist/core/archive_cache_filesystem.js.map +1 -0
  88. package/dist/core/create/git/forge.d.ts +4 -0
  89. package/dist/core/create/git/forge.d.ts.map +1 -0
  90. package/dist/{internal/core → core}/create/git/forge.js +5 -29
  91. package/dist/core/create/git/forge.js.map +1 -0
  92. package/dist/core/create/git/host.d.ts +4 -0
  93. package/dist/core/create/git/host.d.ts.map +1 -0
  94. package/dist/{internal/core → core}/create/git/host.js +15 -15
  95. package/dist/core/create/git/host.js.map +1 -0
  96. package/dist/{internal/core → core}/create_git_host/branch_methods.d.ts +1 -1
  97. package/dist/core/create_git_host/branch_methods.d.ts.map +1 -0
  98. package/dist/{internal/core → core}/create_git_host/branch_methods.js +5 -5
  99. package/dist/core/create_git_host/branch_methods.js.map +1 -0
  100. package/dist/{internal/core → core}/create_git_host/content_methods.d.ts +1 -1
  101. package/dist/core/create_git_host/content_methods.d.ts.map +1 -0
  102. package/dist/{internal/core → core}/create_git_host/content_methods.js +2 -2
  103. package/dist/core/create_git_host/content_methods.js.map +1 -0
  104. package/dist/{internal/core → core}/create_git_host/remote_methods.d.ts +1 -1
  105. package/dist/core/create_git_host/remote_methods.d.ts.map +1 -0
  106. package/dist/{internal/core → core}/create_git_host/remote_methods.js +2 -2
  107. package/dist/core/create_git_host/remote_methods.js.map +1 -0
  108. package/dist/{internal/core → core}/create_git_host/shared.d.ts +4 -4
  109. package/dist/core/create_git_host/shared.d.ts.map +1 -0
  110. package/dist/{internal/core → core}/create_git_host/shared.js +3 -3
  111. package/dist/core/create_git_host/shared.js.map +1 -0
  112. package/dist/{internal/core → core}/create_git_host/working_tree_methods.d.ts +1 -1
  113. package/dist/core/create_git_host/working_tree_methods.d.ts.map +1 -0
  114. package/dist/{internal/core → core}/create_git_host/working_tree_methods.js +2 -2
  115. package/dist/core/create_git_host/working_tree_methods.js.map +1 -0
  116. package/dist/{internal/core → core}/forge_actions.d.ts +1 -12
  117. package/dist/core/forge_actions.d.ts.map +1 -0
  118. package/dist/{internal/core → core}/forge_actions.js +215 -320
  119. package/dist/core/forge_actions.js.map +1 -0
  120. package/dist/{internal/core → core}/git_forge/storage_memory.d.ts +1 -1
  121. package/dist/core/git_forge/storage_memory.d.ts.map +1 -0
  122. package/dist/{internal/core → core}/git_forge/storage_memory.js +1 -47
  123. package/dist/core/git_forge/storage_memory.js.map +1 -0
  124. package/dist/{internal/core → core}/inspect/helpers.d.ts +1 -1
  125. package/dist/core/inspect/helpers.d.ts.map +1 -0
  126. package/dist/{internal/core → core}/inspect/helpers.js +3 -3
  127. package/dist/core/inspect/helpers.js.map +1 -0
  128. package/dist/{internal/core → core}/inspect/icon_theme.d.ts +1 -1
  129. package/dist/core/inspect/icon_theme.d.ts.map +1 -0
  130. package/dist/{internal/core → core}/inspect/icon_theme.js +1 -1
  131. package/dist/core/inspect/icon_theme.js.map +1 -0
  132. package/dist/{internal/core → core}/inspect/linguist_progress.d.ts +1 -1
  133. package/dist/core/inspect/linguist_progress.d.ts.map +1 -0
  134. package/dist/{internal/core → core}/inspect/linguist_progress.js +1 -1
  135. package/dist/core/inspect/linguist_progress.js.map +1 -0
  136. package/dist/{internal/core → core}/inspect.d.ts +1 -1
  137. package/dist/core/inspect.d.ts.map +1 -0
  138. package/dist/{internal/core → core}/inspect.js +3 -3
  139. package/dist/core/inspect.js.map +1 -0
  140. package/dist/{internal/core → core}/inspection.d.ts +1 -1
  141. package/dist/core/inspection.d.ts.map +1 -0
  142. package/dist/{internal/core → core}/inspection.js +3 -3
  143. package/dist/core/inspection.js.map +1 -0
  144. package/dist/core/locks.d.ts.map +1 -0
  145. package/dist/core/locks.js.map +1 -0
  146. package/dist/{internal/core → core}/operation_state.d.ts +1 -1
  147. package/dist/core/operation_state.d.ts.map +1 -0
  148. package/dist/core/operation_state.js.map +1 -0
  149. package/dist/{internal/core → core}/remote.d.ts +1 -1
  150. package/dist/core/remote.d.ts.map +1 -0
  151. package/dist/{internal/core → core}/remote.js +2 -2
  152. package/dist/core/remote.js.map +1 -0
  153. package/dist/{internal/core → core}/repository/parsers.d.ts +1 -1
  154. package/dist/core/repository/parsers.d.ts.map +1 -0
  155. package/dist/{internal/core → core}/repository/parsers.js +1 -1
  156. package/dist/core/repository/parsers.js.map +1 -0
  157. package/dist/{internal/core → core}/repository.d.ts +1 -1
  158. package/dist/core/repository.d.ts.map +1 -0
  159. package/dist/{internal/core → core}/repository.js +3 -3
  160. package/dist/core/repository.js.map +1 -0
  161. package/dist/{internal/core → core}/run_git/env.d.ts +1 -1
  162. package/dist/core/run_git/env.d.ts.map +1 -0
  163. package/dist/{internal/core → core}/run_git/env.js +2 -2
  164. package/dist/core/run_git/env.js.map +1 -0
  165. package/dist/{internal/core → core}/run_git/process.d.ts +1 -1
  166. package/dist/core/run_git/process.d.ts.map +1 -0
  167. package/dist/{internal/core → core}/run_git/process.js +1 -1
  168. package/dist/core/run_git/process.js.map +1 -0
  169. package/dist/{internal/core → core}/run_git/repository_setup.d.ts +1 -1
  170. package/dist/core/run_git/repository_setup.d.ts.map +1 -0
  171. package/dist/{internal/core → core}/run_git/repository_setup.js +2 -2
  172. package/dist/core/run_git/repository_setup.js.map +1 -0
  173. package/dist/{internal/core → core}/run_git.d.ts +1 -1
  174. package/dist/core/run_git.d.ts.map +1 -0
  175. package/dist/{internal/core → core}/run_git.js +1 -1
  176. package/dist/core/run_git.js.map +1 -0
  177. package/dist/{internal/core → core}/working_tree/mutate.d.ts +1 -1
  178. package/dist/core/working_tree/mutate.d.ts.map +1 -0
  179. package/dist/{internal/core → core}/working_tree/mutate.js +5 -5
  180. package/dist/core/working_tree/mutate.js.map +1 -0
  181. package/dist/{internal/core → core}/working_tree/read.d.ts +1 -1
  182. package/dist/core/working_tree/read.d.ts.map +1 -0
  183. package/dist/{internal/core → core}/working_tree/read.js +4 -4
  184. package/dist/core/working_tree/read.js.map +1 -0
  185. package/dist/{internal/core → core}/working_tree/shared.d.ts +1 -1
  186. package/dist/core/working_tree/shared.d.ts.map +1 -0
  187. package/dist/{internal/core → core}/working_tree/shared.js +4 -4
  188. package/dist/core/working_tree/shared.js.map +1 -0
  189. package/dist/core/working_tree.d.ts.map +1 -0
  190. package/dist/core/working_tree.js.map +1 -0
  191. package/dist/errors.d.ts.map +1 -0
  192. package/dist/errors.js.map +1 -0
  193. package/dist/frontend/js/utils/text.d.ts.map +1 -0
  194. package/dist/frontend/js/utils/text.js.map +1 -0
  195. package/dist/{internal/http → http}/handler/helpers.d.ts +1 -1
  196. package/dist/http/handler/helpers.d.ts.map +1 -0
  197. package/dist/{internal/http → http}/handler/helpers.js +2 -2
  198. package/dist/http/handler/helpers.js.map +1 -0
  199. package/dist/{internal/http → http}/handler.d.ts +1 -1
  200. package/dist/http/handler.d.ts.map +1 -0
  201. package/dist/{internal/http → http}/handler.js +2 -2
  202. package/dist/http/handler.js.map +1 -0
  203. package/dist/index.d.ts.map +1 -0
  204. package/dist/index.js.map +1 -0
  205. package/dist/logging.d.ts.map +1 -0
  206. package/dist/logging.js.map +1 -0
  207. package/dist/ssh/keys.d.ts.map +1 -0
  208. package/dist/{internal/ssh → ssh}/keys.js +2 -2
  209. package/dist/ssh/keys.js.map +1 -0
  210. package/dist/{internal/ssh → ssh}/server/audit.d.ts +2 -2
  211. package/dist/ssh/server/audit.d.ts.map +1 -0
  212. package/dist/ssh/server/audit.js.map +1 -0
  213. package/dist/{internal/ssh → ssh}/server/shared.d.ts +2 -2
  214. package/dist/ssh/server/shared.d.ts.map +1 -0
  215. package/dist/{internal/ssh → ssh}/server/shared.js +2 -2
  216. package/dist/ssh/server/shared.js.map +1 -0
  217. package/dist/{internal/ssh → ssh}/server.d.ts +1 -1
  218. package/dist/ssh/server.d.ts.map +1 -0
  219. package/dist/{internal/ssh → ssh}/server.js +2 -2
  220. package/dist/ssh/server.js.map +1 -0
  221. package/dist/types/common.d.ts.map +1 -0
  222. package/dist/{internal/types → types}/common.js.map +1 -1
  223. package/dist/{internal/types → types}/forge.d.ts +5 -10
  224. package/dist/types/forge.d.ts.map +1 -0
  225. package/dist/{internal/types → types}/forge.js.map +1 -1
  226. package/dist/types/host/archive.d.ts.map +1 -0
  227. package/dist/types/host/archive.js.map +1 -0
  228. package/dist/types/host/options.d.ts.map +1 -0
  229. package/dist/types/host/options.js.map +1 -0
  230. package/dist/types/host/service.d.ts.map +1 -0
  231. package/dist/types/host/service.js.map +1 -0
  232. package/dist/types/host.d.ts.map +1 -0
  233. package/dist/{internal/types → types}/host.js.map +1 -1
  234. package/dist/types/index.d.ts.map +1 -0
  235. package/dist/{internal/types → types}/index.js.map +1 -1
  236. package/dist/types/repository/archive.d.ts.map +1 -0
  237. package/dist/types/repository/archive.js.map +1 -0
  238. package/dist/types/repository/core.d.ts.map +1 -0
  239. package/dist/types/repository/core.js.map +1 -0
  240. package/dist/types/repository/inspection.d.ts.map +1 -0
  241. package/dist/types/repository/inspection.js.map +1 -0
  242. package/dist/types/repository.d.ts.map +1 -0
  243. package/dist/types/repository.js.map +1 -0
  244. package/dist/types/transports.d.ts.map +1 -0
  245. package/dist/types/transports.js.map +1 -0
  246. package/dist/{src/types.d.ts.map → types.d.ts.map} +1 -1
  247. package/dist/types.js.map +1 -0
  248. package/dist/utils/paths.d.ts.map +1 -0
  249. package/dist/{internal/utils → utils}/paths.js +1 -1
  250. package/dist/utils/paths.js.map +1 -0
  251. package/dist/utils/text.d.ts.map +1 -0
  252. package/dist/utils/text.js.map +1 -0
  253. package/package.json +136 -186
  254. package/dist/browser/styles.css +0 -317
  255. package/dist/internal/api/forge/actions.d.ts.map +0 -1
  256. package/dist/internal/api/forge/archives.d.ts.map +0 -1
  257. package/dist/internal/api/forge/archives.js.map +0 -1
  258. package/dist/internal/api/forge/handler.d.ts.map +0 -1
  259. package/dist/internal/api/forge/handler.js.map +0 -1
  260. package/dist/internal/api/forge/route.d.ts.map +0 -1
  261. package/dist/internal/api/forge/route.js.map +0 -1
  262. package/dist/internal/api/forge/runtime.d.ts.map +0 -1
  263. package/dist/internal/api/forge/runtime.js.map +0 -1
  264. package/dist/internal/api/forge/socket.d.ts.map +0 -1
  265. package/dist/internal/api/forge/socket.js.map +0 -1
  266. package/dist/internal/api/handler/action.d.ts +0 -5
  267. package/dist/internal/api/handler/action.d.ts.map +0 -1
  268. package/dist/internal/api/handler/action.js.map +0 -1
  269. package/dist/internal/api/handler/archive.d.ts.map +0 -1
  270. package/dist/internal/api/handler/archive.js.map +0 -1
  271. package/dist/internal/api/handler/response.d.ts.map +0 -1
  272. package/dist/internal/api/handler/response.js.map +0 -1
  273. package/dist/internal/api/handler/route.d.ts.map +0 -1
  274. package/dist/internal/api/handler/route.js.map +0 -1
  275. package/dist/internal/api/handler/runtime.d.ts.map +0 -1
  276. package/dist/internal/api/handler/runtime.js.map +0 -1
  277. package/dist/internal/api/handler.d.ts.map +0 -1
  278. package/dist/internal/api/handler.js.map +0 -1
  279. package/dist/internal/api/routing.d.ts.map +0 -1
  280. package/dist/internal/api/routing.js.map +0 -1
  281. package/dist/internal/api/socket/events.d.ts.map +0 -1
  282. package/dist/internal/api/socket/events.js.map +0 -1
  283. package/dist/internal/api/socket/server.d.ts.map +0 -1
  284. package/dist/internal/api/socket/server.js.map +0 -1
  285. package/dist/internal/backend/utils/normalize.d.ts.map +0 -1
  286. package/dist/internal/backend/utils/normalize.js.map +0 -1
  287. package/dist/internal/backend/utils/object.d.ts.map +0 -1
  288. package/dist/internal/backend/utils/object.js.map +0 -1
  289. package/dist/internal/backend/utils/time.d.ts.map +0 -1
  290. package/dist/internal/backend/utils/time.js.map +0 -1
  291. package/dist/internal/browser/index.d.ts +0 -78
  292. package/dist/internal/browser/index.d.ts.map +0 -1
  293. package/dist/internal/browser/index.js +0 -1365
  294. package/dist/internal/browser/index.js.map +0 -1
  295. package/dist/internal/constants.d.ts.map +0 -1
  296. package/dist/internal/constants.js.map +0 -1
  297. package/dist/internal/core/activity.d.ts.map +0 -1
  298. package/dist/internal/core/activity.js.map +0 -1
  299. package/dist/internal/core/archive.d.ts.map +0 -1
  300. package/dist/internal/core/archive.js.map +0 -1
  301. package/dist/internal/core/archive_cache_filesystem.d.ts.map +0 -1
  302. package/dist/internal/core/archive_cache_filesystem.js.map +0 -1
  303. package/dist/internal/core/create/git/forge.d.ts +0 -4
  304. package/dist/internal/core/create/git/forge.d.ts.map +0 -1
  305. package/dist/internal/core/create/git/forge.js.map +0 -1
  306. package/dist/internal/core/create/git/host.d.ts +0 -4
  307. package/dist/internal/core/create/git/host.d.ts.map +0 -1
  308. package/dist/internal/core/create/git/host.js.map +0 -1
  309. package/dist/internal/core/create_git_host/branch_methods.d.ts.map +0 -1
  310. package/dist/internal/core/create_git_host/branch_methods.js.map +0 -1
  311. package/dist/internal/core/create_git_host/content_methods.d.ts.map +0 -1
  312. package/dist/internal/core/create_git_host/content_methods.js.map +0 -1
  313. package/dist/internal/core/create_git_host/remote_methods.d.ts.map +0 -1
  314. package/dist/internal/core/create_git_host/remote_methods.js.map +0 -1
  315. package/dist/internal/core/create_git_host/shared.d.ts.map +0 -1
  316. package/dist/internal/core/create_git_host/shared.js.map +0 -1
  317. package/dist/internal/core/create_git_host/working_tree_methods.d.ts.map +0 -1
  318. package/dist/internal/core/create_git_host/working_tree_methods.js.map +0 -1
  319. package/dist/internal/core/forge_actions.d.ts.map +0 -1
  320. package/dist/internal/core/forge_actions.js.map +0 -1
  321. package/dist/internal/core/git_forge/storage_memory.d.ts.map +0 -1
  322. package/dist/internal/core/git_forge/storage_memory.js.map +0 -1
  323. package/dist/internal/core/inspect/helpers.d.ts.map +0 -1
  324. package/dist/internal/core/inspect/helpers.js.map +0 -1
  325. package/dist/internal/core/inspect/icon_theme.d.ts.map +0 -1
  326. package/dist/internal/core/inspect/icon_theme.js.map +0 -1
  327. package/dist/internal/core/inspect/linguist_progress.d.ts.map +0 -1
  328. package/dist/internal/core/inspect/linguist_progress.js.map +0 -1
  329. package/dist/internal/core/inspect.d.ts.map +0 -1
  330. package/dist/internal/core/inspect.js.map +0 -1
  331. package/dist/internal/core/inspection.d.ts.map +0 -1
  332. package/dist/internal/core/inspection.js.map +0 -1
  333. package/dist/internal/core/locks.d.ts.map +0 -1
  334. package/dist/internal/core/locks.js.map +0 -1
  335. package/dist/internal/core/operation_state.d.ts.map +0 -1
  336. package/dist/internal/core/operation_state.js.map +0 -1
  337. package/dist/internal/core/remote.d.ts.map +0 -1
  338. package/dist/internal/core/remote.js.map +0 -1
  339. package/dist/internal/core/repository/parsers.d.ts.map +0 -1
  340. package/dist/internal/core/repository/parsers.js.map +0 -1
  341. package/dist/internal/core/repository.d.ts.map +0 -1
  342. package/dist/internal/core/repository.js.map +0 -1
  343. package/dist/internal/core/run_git/env.d.ts.map +0 -1
  344. package/dist/internal/core/run_git/env.js.map +0 -1
  345. package/dist/internal/core/run_git/process.d.ts.map +0 -1
  346. package/dist/internal/core/run_git/process.js.map +0 -1
  347. package/dist/internal/core/run_git/repository_setup.d.ts.map +0 -1
  348. package/dist/internal/core/run_git/repository_setup.js.map +0 -1
  349. package/dist/internal/core/run_git.d.ts.map +0 -1
  350. package/dist/internal/core/run_git.js.map +0 -1
  351. package/dist/internal/core/working_tree/mutate.d.ts.map +0 -1
  352. package/dist/internal/core/working_tree/mutate.js.map +0 -1
  353. package/dist/internal/core/working_tree/read.d.ts.map +0 -1
  354. package/dist/internal/core/working_tree/read.js.map +0 -1
  355. package/dist/internal/core/working_tree/shared.d.ts.map +0 -1
  356. package/dist/internal/core/working_tree/shared.js.map +0 -1
  357. package/dist/internal/core/working_tree.d.ts.map +0 -1
  358. package/dist/internal/core/working_tree.js.map +0 -1
  359. package/dist/internal/errors.d.ts.map +0 -1
  360. package/dist/internal/errors.js.map +0 -1
  361. package/dist/internal/frontend/js/utils/text.d.ts.map +0 -1
  362. package/dist/internal/frontend/js/utils/text.js.map +0 -1
  363. package/dist/internal/http/handler/helpers.d.ts.map +0 -1
  364. package/dist/internal/http/handler/helpers.js.map +0 -1
  365. package/dist/internal/http/handler.d.ts.map +0 -1
  366. package/dist/internal/http/handler.js.map +0 -1
  367. package/dist/internal/index.d.ts.map +0 -1
  368. package/dist/internal/index.js.map +0 -1
  369. package/dist/internal/logging.d.ts.map +0 -1
  370. package/dist/internal/logging.js.map +0 -1
  371. package/dist/internal/react/client/error.d.ts +0 -14
  372. package/dist/internal/react/client/error.d.ts.map +0 -1
  373. package/dist/internal/react/client/error.js +0 -32
  374. package/dist/internal/react/client/error.js.map +0 -1
  375. package/dist/internal/react/client/helpers.d.ts +0 -12
  376. package/dist/internal/react/client/helpers.d.ts.map +0 -1
  377. package/dist/internal/react/client/helpers.js +0 -45
  378. package/dist/internal/react/client/helpers.js.map +0 -1
  379. package/dist/internal/react/client/types.d.ts +0 -275
  380. package/dist/internal/react/client/types.d.ts.map +0 -1
  381. package/dist/internal/react/client/types.js.map +0 -1
  382. package/dist/internal/react/client.d.ts +0 -6
  383. package/dist/internal/react/client.d.ts.map +0 -1
  384. package/dist/internal/react/client.js +0 -744
  385. package/dist/internal/react/client.js.map +0 -1
  386. package/dist/internal/react/components.d.ts +0 -44412
  387. package/dist/internal/react/components.d.ts.map +0 -1
  388. package/dist/internal/react/components.js +0 -759
  389. package/dist/internal/react/components.js.map +0 -1
  390. package/dist/internal/react/hooks/query.d.ts +0 -14
  391. package/dist/internal/react/hooks/query.d.ts.map +0 -1
  392. package/dist/internal/react/hooks/query.js +0 -139
  393. package/dist/internal/react/hooks/query.js.map +0 -1
  394. package/dist/internal/react/hooks/resources.d.ts +0 -116
  395. package/dist/internal/react/hooks/resources.d.ts.map +0 -1
  396. package/dist/internal/react/hooks/resources.js +0 -600
  397. package/dist/internal/react/hooks/resources.js.map +0 -1
  398. package/dist/internal/react/hooks/types.d.ts +0 -86
  399. package/dist/internal/react/hooks/types.d.ts.map +0 -1
  400. package/dist/internal/react/hooks/types.js +0 -2
  401. package/dist/internal/react/hooks/types.js.map +0 -1
  402. package/dist/internal/react/hooks.d.ts +0 -4
  403. package/dist/internal/react/hooks.d.ts.map +0 -1
  404. package/dist/internal/react/hooks.js +0 -3
  405. package/dist/internal/react/hooks.js.map +0 -1
  406. package/dist/internal/react/index.d.ts +0 -8
  407. package/dist/internal/react/index.d.ts.map +0 -1
  408. package/dist/internal/react/index.js +0 -5
  409. package/dist/internal/react/index.js.map +0 -1
  410. package/dist/internal/react/ui/context.d.ts +0 -1918
  411. package/dist/internal/react/ui/context.d.ts.map +0 -1
  412. package/dist/internal/react/ui/context.js +0 -192
  413. package/dist/internal/react/ui/context.js.map +0 -1
  414. package/dist/internal/ssh/keys.d.ts.map +0 -1
  415. package/dist/internal/ssh/keys.js.map +0 -1
  416. package/dist/internal/ssh/server/audit.d.ts.map +0 -1
  417. package/dist/internal/ssh/server/audit.js.map +0 -1
  418. package/dist/internal/ssh/server/shared.d.ts.map +0 -1
  419. package/dist/internal/ssh/server/shared.js.map +0 -1
  420. package/dist/internal/ssh/server.d.ts.map +0 -1
  421. package/dist/internal/ssh/server.js.map +0 -1
  422. package/dist/internal/types/common.d.ts.map +0 -1
  423. package/dist/internal/types/forge.d.ts.map +0 -1
  424. package/dist/internal/types/host/archive.d.ts.map +0 -1
  425. package/dist/internal/types/host/archive.js.map +0 -1
  426. package/dist/internal/types/host/options.d.ts.map +0 -1
  427. package/dist/internal/types/host/options.js.map +0 -1
  428. package/dist/internal/types/host/service.d.ts.map +0 -1
  429. package/dist/internal/types/host/service.js.map +0 -1
  430. package/dist/internal/types/host.d.ts.map +0 -1
  431. package/dist/internal/types/index.d.ts.map +0 -1
  432. package/dist/internal/types/repository/archive.d.ts.map +0 -1
  433. package/dist/internal/types/repository/archive.js.map +0 -1
  434. package/dist/internal/types/repository/core.d.ts.map +0 -1
  435. package/dist/internal/types/repository/core.js.map +0 -1
  436. package/dist/internal/types/repository/inspection.d.ts.map +0 -1
  437. package/dist/internal/types/repository/inspection.js.map +0 -1
  438. package/dist/internal/types/repository.d.ts.map +0 -1
  439. package/dist/internal/types/repository.js.map +0 -1
  440. package/dist/internal/types/transports.d.ts.map +0 -1
  441. package/dist/internal/types/transports.js.map +0 -1
  442. package/dist/internal/types.d.ts.map +0 -1
  443. package/dist/internal/types.js +0 -2
  444. package/dist/internal/types.js.map +0 -1
  445. package/dist/internal/utils/paths.d.ts.map +0 -1
  446. package/dist/internal/utils/paths.js.map +0 -1
  447. package/dist/internal/utils/text.d.ts.map +0 -1
  448. package/dist/internal/utils/text.js.map +0 -1
  449. package/dist/src/api/forge/handler.d.ts +0 -2
  450. package/dist/src/api/forge/handler.d.ts.map +0 -1
  451. package/dist/src/api/forge/handler.js +0 -2
  452. package/dist/src/api/forge/handler.js.map +0 -1
  453. package/dist/src/api/forge/route.d.ts +0 -2
  454. package/dist/src/api/forge/route.d.ts.map +0 -1
  455. package/dist/src/api/forge/route.js +0 -2
  456. package/dist/src/api/forge/route.js.map +0 -1
  457. package/dist/src/api/handler/action.d.ts +0 -2
  458. package/dist/src/api/handler/action.d.ts.map +0 -1
  459. package/dist/src/api/handler/action.js +0 -2
  460. package/dist/src/api/handler/action.js.map +0 -1
  461. package/dist/src/api/handler/archive.d.ts +0 -2
  462. package/dist/src/api/handler/archive.d.ts.map +0 -1
  463. package/dist/src/api/handler/archive.js +0 -2
  464. package/dist/src/api/handler/archive.js.map +0 -1
  465. package/dist/src/api/handler/response.d.ts +0 -2
  466. package/dist/src/api/handler/response.d.ts.map +0 -1
  467. package/dist/src/api/handler/response.js +0 -2
  468. package/dist/src/api/handler/response.js.map +0 -1
  469. package/dist/src/api/handler/route.d.ts +0 -2
  470. package/dist/src/api/handler/route.d.ts.map +0 -1
  471. package/dist/src/api/handler/route.js +0 -2
  472. package/dist/src/api/handler/route.js.map +0 -1
  473. package/dist/src/api/handler.d.ts +0 -2
  474. package/dist/src/api/handler.d.ts.map +0 -1
  475. package/dist/src/api/handler.js +0 -2
  476. package/dist/src/api/handler.js.map +0 -1
  477. package/dist/src/api/socket/events.d.ts +0 -2
  478. package/dist/src/api/socket/events.d.ts.map +0 -1
  479. package/dist/src/api/socket/events.js +0 -2
  480. package/dist/src/api/socket/events.js.map +0 -1
  481. package/dist/src/api/socket/server.d.ts +0 -2
  482. package/dist/src/api/socket/server.d.ts.map +0 -1
  483. package/dist/src/api/socket/server.js +0 -2
  484. package/dist/src/api/socket/server.js.map +0 -1
  485. package/dist/src/backend/utils/normalize.d.ts +0 -2
  486. package/dist/src/backend/utils/normalize.d.ts.map +0 -1
  487. package/dist/src/backend/utils/normalize.js +0 -4
  488. package/dist/src/backend/utils/normalize.js.map +0 -1
  489. package/dist/src/backend/utils/object.d.ts +0 -3
  490. package/dist/src/backend/utils/object.d.ts.map +0 -1
  491. package/dist/src/backend/utils/object.js +0 -12
  492. package/dist/src/backend/utils/object.js.map +0 -1
  493. package/dist/src/backend/utils/time.d.ts +0 -3
  494. package/dist/src/backend/utils/time.d.ts.map +0 -1
  495. package/dist/src/backend/utils/time.js +0 -7
  496. package/dist/src/backend/utils/time.js.map +0 -1
  497. package/dist/src/browser/index.d.ts +0 -2
  498. package/dist/src/browser/index.d.ts.map +0 -1
  499. package/dist/src/browser/index.js +0 -2
  500. package/dist/src/browser/index.js.map +0 -1
  501. package/dist/src/constants.d.ts +0 -2
  502. package/dist/src/constants.d.ts.map +0 -1
  503. package/dist/src/constants.js +0 -2
  504. package/dist/src/constants.js.map +0 -1
  505. package/dist/src/core/archive.d.ts +0 -2
  506. package/dist/src/core/archive.d.ts.map +0 -1
  507. package/dist/src/core/archive.js +0 -2
  508. package/dist/src/core/archive.js.map +0 -1
  509. package/dist/src/core/archive_cache_filesystem.d.ts +0 -2
  510. package/dist/src/core/archive_cache_filesystem.d.ts.map +0 -1
  511. package/dist/src/core/archive_cache_filesystem.js +0 -2
  512. package/dist/src/core/archive_cache_filesystem.js.map +0 -1
  513. package/dist/src/core/create/git/forge.d.ts +0 -2
  514. package/dist/src/core/create/git/forge.d.ts.map +0 -1
  515. package/dist/src/core/create/git/forge.js +0 -2
  516. package/dist/src/core/create/git/forge.js.map +0 -1
  517. package/dist/src/core/create/git/host.d.ts +0 -2
  518. package/dist/src/core/create/git/host.d.ts.map +0 -1
  519. package/dist/src/core/create/git/host.js +0 -2
  520. package/dist/src/core/create/git/host.js.map +0 -1
  521. package/dist/src/core/create_git_host/branch_methods.d.ts +0 -2
  522. package/dist/src/core/create_git_host/branch_methods.d.ts.map +0 -1
  523. package/dist/src/core/create_git_host/branch_methods.js +0 -2
  524. package/dist/src/core/create_git_host/branch_methods.js.map +0 -1
  525. package/dist/src/core/create_git_host/content_methods.d.ts +0 -2
  526. package/dist/src/core/create_git_host/content_methods.d.ts.map +0 -1
  527. package/dist/src/core/create_git_host/content_methods.js +0 -2
  528. package/dist/src/core/create_git_host/content_methods.js.map +0 -1
  529. package/dist/src/core/create_git_host/remote_methods.d.ts +0 -2
  530. package/dist/src/core/create_git_host/remote_methods.d.ts.map +0 -1
  531. package/dist/src/core/create_git_host/remote_methods.js +0 -2
  532. package/dist/src/core/create_git_host/remote_methods.js.map +0 -1
  533. package/dist/src/core/create_git_host/shared.d.ts +0 -2
  534. package/dist/src/core/create_git_host/shared.d.ts.map +0 -1
  535. package/dist/src/core/create_git_host/shared.js +0 -2
  536. package/dist/src/core/create_git_host/shared.js.map +0 -1
  537. package/dist/src/core/create_git_host/working_tree_methods.d.ts +0 -2
  538. package/dist/src/core/create_git_host/working_tree_methods.d.ts.map +0 -1
  539. package/dist/src/core/create_git_host/working_tree_methods.js +0 -2
  540. package/dist/src/core/create_git_host/working_tree_methods.js.map +0 -1
  541. package/dist/src/core/git_forge/storage_memory.d.ts +0 -2
  542. package/dist/src/core/git_forge/storage_memory.d.ts.map +0 -1
  543. package/dist/src/core/git_forge/storage_memory.js +0 -2
  544. package/dist/src/core/git_forge/storage_memory.js.map +0 -1
  545. package/dist/src/core/inspect/helpers.d.ts +0 -2
  546. package/dist/src/core/inspect/helpers.d.ts.map +0 -1
  547. package/dist/src/core/inspect/helpers.js +0 -2
  548. package/dist/src/core/inspect/helpers.js.map +0 -1
  549. package/dist/src/core/inspect/icon_theme.d.ts +0 -2
  550. package/dist/src/core/inspect/icon_theme.d.ts.map +0 -1
  551. package/dist/src/core/inspect/icon_theme.js +0 -2
  552. package/dist/src/core/inspect/icon_theme.js.map +0 -1
  553. package/dist/src/core/inspect/linguist_progress.d.ts +0 -2
  554. package/dist/src/core/inspect/linguist_progress.d.ts.map +0 -1
  555. package/dist/src/core/inspect/linguist_progress.js +0 -2
  556. package/dist/src/core/inspect/linguist_progress.js.map +0 -1
  557. package/dist/src/core/inspect.d.ts +0 -2
  558. package/dist/src/core/inspect.d.ts.map +0 -1
  559. package/dist/src/core/inspect.js +0 -2
  560. package/dist/src/core/inspect.js.map +0 -1
  561. package/dist/src/core/inspection.d.ts +0 -2
  562. package/dist/src/core/inspection.d.ts.map +0 -1
  563. package/dist/src/core/inspection.js +0 -2
  564. package/dist/src/core/inspection.js.map +0 -1
  565. package/dist/src/core/locks.d.ts +0 -2
  566. package/dist/src/core/locks.d.ts.map +0 -1
  567. package/dist/src/core/locks.js +0 -2
  568. package/dist/src/core/locks.js.map +0 -1
  569. package/dist/src/core/operation_state.d.ts +0 -2
  570. package/dist/src/core/operation_state.d.ts.map +0 -1
  571. package/dist/src/core/operation_state.js +0 -2
  572. package/dist/src/core/operation_state.js.map +0 -1
  573. package/dist/src/core/remote.d.ts +0 -2
  574. package/dist/src/core/remote.d.ts.map +0 -1
  575. package/dist/src/core/remote.js +0 -2
  576. package/dist/src/core/remote.js.map +0 -1
  577. package/dist/src/core/repository/parsers.d.ts +0 -2
  578. package/dist/src/core/repository/parsers.d.ts.map +0 -1
  579. package/dist/src/core/repository/parsers.js +0 -2
  580. package/dist/src/core/repository/parsers.js.map +0 -1
  581. package/dist/src/core/repository.d.ts +0 -2
  582. package/dist/src/core/repository.d.ts.map +0 -1
  583. package/dist/src/core/repository.js +0 -2
  584. package/dist/src/core/repository.js.map +0 -1
  585. package/dist/src/core/run_git/env.d.ts +0 -2
  586. package/dist/src/core/run_git/env.d.ts.map +0 -1
  587. package/dist/src/core/run_git/env.js +0 -2
  588. package/dist/src/core/run_git/env.js.map +0 -1
  589. package/dist/src/core/run_git/process.d.ts +0 -2
  590. package/dist/src/core/run_git/process.d.ts.map +0 -1
  591. package/dist/src/core/run_git/process.js +0 -2
  592. package/dist/src/core/run_git/process.js.map +0 -1
  593. package/dist/src/core/run_git/repository_setup.d.ts +0 -2
  594. package/dist/src/core/run_git/repository_setup.d.ts.map +0 -1
  595. package/dist/src/core/run_git/repository_setup.js +0 -2
  596. package/dist/src/core/run_git/repository_setup.js.map +0 -1
  597. package/dist/src/core/run_git.d.ts +0 -2
  598. package/dist/src/core/run_git.d.ts.map +0 -1
  599. package/dist/src/core/run_git.js +0 -2
  600. package/dist/src/core/run_git.js.map +0 -1
  601. package/dist/src/core/working_tree/mutate.d.ts +0 -2
  602. package/dist/src/core/working_tree/mutate.d.ts.map +0 -1
  603. package/dist/src/core/working_tree/mutate.js +0 -2
  604. package/dist/src/core/working_tree/mutate.js.map +0 -1
  605. package/dist/src/core/working_tree/read.d.ts +0 -2
  606. package/dist/src/core/working_tree/read.d.ts.map +0 -1
  607. package/dist/src/core/working_tree/read.js +0 -2
  608. package/dist/src/core/working_tree/read.js.map +0 -1
  609. package/dist/src/core/working_tree/shared.d.ts +0 -2
  610. package/dist/src/core/working_tree/shared.d.ts.map +0 -1
  611. package/dist/src/core/working_tree/shared.js +0 -2
  612. package/dist/src/core/working_tree/shared.js.map +0 -1
  613. package/dist/src/core/working_tree.d.ts +0 -2
  614. package/dist/src/core/working_tree.d.ts.map +0 -1
  615. package/dist/src/core/working_tree.js +0 -2
  616. package/dist/src/core/working_tree.js.map +0 -1
  617. package/dist/src/errors.d.ts +0 -2
  618. package/dist/src/errors.d.ts.map +0 -1
  619. package/dist/src/errors.js +0 -2
  620. package/dist/src/errors.js.map +0 -1
  621. package/dist/src/frontend/js/utils/text.d.ts +0 -2
  622. package/dist/src/frontend/js/utils/text.d.ts.map +0 -1
  623. package/dist/src/frontend/js/utils/text.js +0 -4
  624. package/dist/src/frontend/js/utils/text.js.map +0 -1
  625. package/dist/src/http/handler/helpers.d.ts +0 -2
  626. package/dist/src/http/handler/helpers.d.ts.map +0 -1
  627. package/dist/src/http/handler/helpers.js +0 -2
  628. package/dist/src/http/handler/helpers.js.map +0 -1
  629. package/dist/src/http/handler.d.ts +0 -2
  630. package/dist/src/http/handler.d.ts.map +0 -1
  631. package/dist/src/http/handler.js +0 -2
  632. package/dist/src/http/handler.js.map +0 -1
  633. package/dist/src/index.d.ts +0 -2
  634. package/dist/src/index.d.ts.map +0 -1
  635. package/dist/src/index.js +0 -2
  636. package/dist/src/index.js.map +0 -1
  637. package/dist/src/logging.d.ts +0 -2
  638. package/dist/src/logging.d.ts.map +0 -1
  639. package/dist/src/logging.js +0 -2
  640. package/dist/src/logging.js.map +0 -1
  641. package/dist/src/react/client/error.d.ts +0 -2
  642. package/dist/src/react/client/error.d.ts.map +0 -1
  643. package/dist/src/react/client/error.js +0 -2
  644. package/dist/src/react/client/error.js.map +0 -1
  645. package/dist/src/react/client/helpers.d.ts +0 -2
  646. package/dist/src/react/client/helpers.d.ts.map +0 -1
  647. package/dist/src/react/client/helpers.js +0 -2
  648. package/dist/src/react/client/helpers.js.map +0 -1
  649. package/dist/src/react/client/types.d.ts +0 -2
  650. package/dist/src/react/client/types.d.ts.map +0 -1
  651. package/dist/src/react/client/types.js +0 -2
  652. package/dist/src/react/client/types.js.map +0 -1
  653. package/dist/src/react/client.d.ts +0 -2
  654. package/dist/src/react/client.d.ts.map +0 -1
  655. package/dist/src/react/client.js +0 -2
  656. package/dist/src/react/client.js.map +0 -1
  657. package/dist/src/react/components.d.ts +0 -2
  658. package/dist/src/react/components.d.ts.map +0 -1
  659. package/dist/src/react/components.js +0 -2
  660. package/dist/src/react/components.js.map +0 -1
  661. package/dist/src/react/hooks/query.d.ts +0 -2
  662. package/dist/src/react/hooks/query.d.ts.map +0 -1
  663. package/dist/src/react/hooks/query.js +0 -2
  664. package/dist/src/react/hooks/query.js.map +0 -1
  665. package/dist/src/react/hooks/resources.d.ts +0 -2
  666. package/dist/src/react/hooks/resources.d.ts.map +0 -1
  667. package/dist/src/react/hooks/resources.js +0 -2
  668. package/dist/src/react/hooks/resources.js.map +0 -1
  669. package/dist/src/react/hooks/types.d.ts +0 -2
  670. package/dist/src/react/hooks/types.d.ts.map +0 -1
  671. package/dist/src/react/hooks/types.js +0 -2
  672. package/dist/src/react/hooks/types.js.map +0 -1
  673. package/dist/src/react/hooks.d.ts +0 -2
  674. package/dist/src/react/hooks.d.ts.map +0 -1
  675. package/dist/src/react/hooks.js +0 -2
  676. package/dist/src/react/hooks.js.map +0 -1
  677. package/dist/src/react/index.d.ts +0 -2
  678. package/dist/src/react/index.d.ts.map +0 -1
  679. package/dist/src/react/index.js +0 -2
  680. package/dist/src/react/index.js.map +0 -1
  681. package/dist/src/react/ui/context.d.ts +0 -2
  682. package/dist/src/react/ui/context.d.ts.map +0 -1
  683. package/dist/src/react/ui/context.js +0 -2
  684. package/dist/src/react/ui/context.js.map +0 -1
  685. package/dist/src/ssh/keys.d.ts +0 -2
  686. package/dist/src/ssh/keys.d.ts.map +0 -1
  687. package/dist/src/ssh/keys.js +0 -2
  688. package/dist/src/ssh/keys.js.map +0 -1
  689. package/dist/src/ssh/server/audit.d.ts +0 -2
  690. package/dist/src/ssh/server/audit.d.ts.map +0 -1
  691. package/dist/src/ssh/server/audit.js +0 -2
  692. package/dist/src/ssh/server/audit.js.map +0 -1
  693. package/dist/src/ssh/server/shared.d.ts +0 -2
  694. package/dist/src/ssh/server/shared.d.ts.map +0 -1
  695. package/dist/src/ssh/server/shared.js +0 -2
  696. package/dist/src/ssh/server/shared.js.map +0 -1
  697. package/dist/src/ssh/server.d.ts +0 -2
  698. package/dist/src/ssh/server.d.ts.map +0 -1
  699. package/dist/src/ssh/server.js +0 -2
  700. package/dist/src/ssh/server.js.map +0 -1
  701. package/dist/src/types/common.d.ts +0 -2
  702. package/dist/src/types/common.d.ts.map +0 -1
  703. package/dist/src/types/common.js +0 -2
  704. package/dist/src/types/common.js.map +0 -1
  705. package/dist/src/types/forge.d.ts +0 -2
  706. package/dist/src/types/forge.d.ts.map +0 -1
  707. package/dist/src/types/forge.js +0 -2
  708. package/dist/src/types/forge.js.map +0 -1
  709. package/dist/src/types/host.d.ts +0 -2
  710. package/dist/src/types/host.d.ts.map +0 -1
  711. package/dist/src/types/host.js +0 -2
  712. package/dist/src/types/host.js.map +0 -1
  713. package/dist/src/types/index.d.ts +0 -2
  714. package/dist/src/types/index.d.ts.map +0 -1
  715. package/dist/src/types/index.js +0 -2
  716. package/dist/src/types/index.js.map +0 -1
  717. package/dist/src/types/repository.d.ts +0 -2
  718. package/dist/src/types/repository.d.ts.map +0 -1
  719. package/dist/src/types/repository.js +0 -2
  720. package/dist/src/types/repository.js.map +0 -1
  721. package/dist/src/types/transports.d.ts +0 -2
  722. package/dist/src/types/transports.d.ts.map +0 -1
  723. package/dist/src/types/transports.js +0 -2
  724. package/dist/src/types/transports.js.map +0 -1
  725. package/dist/src/types.d.ts +0 -2
  726. package/dist/src/types.js +0 -2
  727. package/dist/src/types.js.map +0 -1
  728. package/dist/src/utils/paths.d.ts +0 -2
  729. package/dist/src/utils/paths.d.ts.map +0 -1
  730. package/dist/src/utils/paths.js +0 -2
  731. package/dist/src/utils/paths.js.map +0 -1
  732. package/dist/src/utils/text.d.ts +0 -2
  733. package/dist/src/utils/text.d.ts.map +0 -1
  734. package/dist/src/utils/text.js +0 -2
  735. package/dist/src/utils/text.js.map +0 -1
  736. /package/dist/{internal/api → api}/handler/archive.js +0 -0
  737. /package/dist/{internal/api → api}/handler/response.d.ts +0 -0
  738. /package/dist/{internal/api → api}/handler/route.d.ts +0 -0
  739. /package/dist/{internal/api → api}/handler.js +0 -0
  740. /package/dist/{internal/api → api}/routing.d.ts +0 -0
  741. /package/dist/{internal/api → api}/socket/events.d.ts +0 -0
  742. /package/dist/{internal/api → api}/socket/events.js +0 -0
  743. /package/dist/{internal/backend → backend}/utils/normalize.d.ts +0 -0
  744. /package/dist/{internal/backend → backend}/utils/normalize.js +0 -0
  745. /package/dist/{internal/backend → backend}/utils/object.d.ts +0 -0
  746. /package/dist/{internal/backend → backend}/utils/object.js +0 -0
  747. /package/dist/{internal/backend → backend}/utils/time.d.ts +0 -0
  748. /package/dist/{internal/backend → backend}/utils/time.js +0 -0
  749. /package/dist/{internal/constants.d.ts → constants.d.ts} +0 -0
  750. /package/dist/{internal/constants.js → constants.js} +0 -0
  751. /package/dist/{internal/core → core}/archive_cache_filesystem.js +0 -0
  752. /package/dist/{internal/core → core}/locks.d.ts +0 -0
  753. /package/dist/{internal/core → core}/locks.js +0 -0
  754. /package/dist/{internal/core → core}/operation_state.js +0 -0
  755. /package/dist/{internal/core → core}/working_tree.d.ts +0 -0
  756. /package/dist/{internal/core → core}/working_tree.js +0 -0
  757. /package/dist/{internal/errors.d.ts → errors.d.ts} +0 -0
  758. /package/dist/{internal/errors.js → errors.js} +0 -0
  759. /package/dist/{internal/frontend → frontend}/js/utils/text.d.ts +0 -0
  760. /package/dist/{internal/frontend → frontend}/js/utils/text.js +0 -0
  761. /package/dist/{internal/index.d.ts → index.d.ts} +0 -0
  762. /package/dist/{internal/index.js → index.js} +0 -0
  763. /package/dist/{internal/logging.d.ts → logging.d.ts} +0 -0
  764. /package/dist/{internal/logging.js → logging.js} +0 -0
  765. /package/dist/{internal/ssh → ssh}/keys.d.ts +0 -0
  766. /package/dist/{internal/ssh → ssh}/server/audit.js +0 -0
  767. /package/dist/{internal/types → types}/common.d.ts +0 -0
  768. /package/dist/{internal/types → types}/common.js +0 -0
  769. /package/dist/{internal/types → types}/forge.js +0 -0
  770. /package/dist/{internal/types → types}/host/archive.d.ts +0 -0
  771. /package/dist/{internal/types → types}/host/archive.js +0 -0
  772. /package/dist/{internal/types → types}/host/options.d.ts +0 -0
  773. /package/dist/{internal/types → types}/host/options.js +0 -0
  774. /package/dist/{internal/types → types}/host/service.d.ts +0 -0
  775. /package/dist/{internal/types → types}/host/service.js +0 -0
  776. /package/dist/{internal/types → types}/host.d.ts +0 -0
  777. /package/dist/{internal/types → types}/host.js +0 -0
  778. /package/dist/{internal/types → types}/index.d.ts +0 -0
  779. /package/dist/{internal/types → types}/index.js +0 -0
  780. /package/dist/{internal/types → types}/repository/archive.d.ts +0 -0
  781. /package/dist/{internal/types → types}/repository/archive.js +0 -0
  782. /package/dist/{internal/types → types}/repository/core.d.ts +0 -0
  783. /package/dist/{internal/types → types}/repository/core.js +0 -0
  784. /package/dist/{internal/types → types}/repository/inspection.d.ts +0 -0
  785. /package/dist/{internal/types → types}/repository/inspection.js +0 -0
  786. /package/dist/{internal/types → types}/repository.d.ts +0 -0
  787. /package/dist/{internal/types → types}/repository.js +0 -0
  788. /package/dist/{internal/types → types}/transports.d.ts +0 -0
  789. /package/dist/{internal/types → types}/transports.js +0 -0
  790. /package/dist/{internal/types.d.ts → types.d.ts} +0 -0
  791. /package/dist/{internal/react/client/types.js → types.js} +0 -0
  792. /package/dist/{internal/utils → utils}/paths.d.ts +0 -0
  793. /package/dist/{internal/utils → utils}/text.d.ts +0 -0
  794. /package/dist/{internal/utils → utils}/text.js +0 -0
package/README.md CHANGED
@@ -1,60 +1,43 @@
1
1
  # @trebired/git-host
2
2
 
3
- Embeddable Git forge for Node.js and Bun apps with real Git CLI execution, smart HTTP and SSH transports, repository inspection APIs, forge features such as releases and forks, and optional React/browser companions.
3
+ Embeddable Git host and forge for Node.js and Bun apps with real Git CLI execution, smart HTTP and SSH transports, repository APIs, normalized repository activity, and repository-owned Actions workflows.
4
4
 
5
- `@trebired/git-host` gives your app real Git repository operations, forge-style repository metadata, and real Git transports without forcing you into a monolithic hosted product. It runs the real Git CLI, helps you resolve repository paths safely, serializes mutations per repository, and exposes reusable APIs for repository initialization, summary reads, content inspection, branch operations, working-tree changes, releases, forks, stars, watching, activity feeds, JSON API handlers, browser-ready pages, and smart HTTP and SSH hosting.
5
+ `@trebired/git-host` is meant for larger self-hosted products that already own users, permissions, storage, and UI, but do not want to keep rebuilding the Git and forge layer underneath them.
6
6
 
7
- It is aimed at platforms and products that already own users, permissions, tokens, repository records, and UI, but want to stop hand-rolling the Git layer underneath all of that.
7
+ It is:
8
8
 
9
- The package keeps auth, permission, and persistence decisions host-owned while giving you reusable Git behavior, forge adapters, and browser integration.
9
+ - a reusable Git host/runtime layer for your app
10
+ - a forge layer with releases, forks, social state, activity, and Actions
11
+ - built on the real `git` binary
10
12
 
11
- It also exposes an optional React companion at `@trebired/git-host/react` for typed API clients, providers, and headless data hooks, plus an optional browser UI entry at `@trebired/git-host/browser` for full repository pages.
13
+ It is not:
12
14
 
13
- In plain terms:
14
-
15
- - it is a Git hosting and lightweight forge layer you embed into your app
16
- - it is not a full hosted SaaS product with built-in accounts, billing, or platform ownership
17
- - it is not a reimplementation of Git
18
- - it uses the real `git` binary for the hard parts
15
+ - a hosted SaaS
16
+ - a fake in-memory Git implementation
17
+ - a frontend/UI package
19
18
 
20
19
  ## Install
21
20
 
22
- Runtime support: Bun 1+ and Node.js 18+.
23
-
24
- ```sh
25
- npm install @trebired/git-host
26
- ```
27
-
28
- ```sh
29
- npm install @trebired/logger
30
- ```
21
+ Runtime support:
31
22
 
32
- Optional React companion:
23
+ - Node.js 18+
24
+ - Bun 1+
25
+ - `git` available on the host
33
26
 
34
27
  ```sh
35
- npm install react
28
+ npm install @trebired/git-host
36
29
  ```
37
30
 
38
- Optional browser pages:
31
+ For the packaged Actions runner binaries, the npm package ships Linux GNU and macOS builds. If you are working locally from source, the runtime can also fall back to the TypeScript runner path when a packaged binary is not present.
39
32
 
40
- ```sh
41
- npm install react
42
- ```
33
+ ## Quick Start
43
34
 
44
35
  ```ts
45
36
  import { createGitHost, resolveRepositoryPath } from "@trebired/git-host";
46
- import { createLog } from "@trebired/logger";
47
-
48
- const log = createLog({
49
- console: true,
50
- quiet: true,
51
- save: false,
52
- });
53
37
 
54
38
  const repositoriesRoot = "/srv/git-workspaces";
55
39
 
56
40
  const gitHost = createGitHost({
57
- logger: log,
58
41
  resolveRepository(repositoryId) {
59
42
  return {
60
43
  id: repositoryId,
@@ -68,1069 +51,263 @@ const gitHost = createGitHost({
68
51
 
69
52
  await gitHost.ensureRepository("demo", {
70
53
  actor: {
71
- name: "Alice",
72
54
  email: "alice@example.com",
55
+ name: "Alice",
73
56
  },
74
57
  });
75
58
 
76
59
  const summary = await gitHost.readSummary("demo");
77
60
  console.log(summary.repository.current_branch);
61
+ ```
78
62
 
79
- const linguist = await gitHost.readLinguist("demo", {
80
- ref: "main",
81
- onProgress(event) {
82
- console.log(event.stage, event.percent);
83
- },
84
- });
85
- console.log(linguist.languages.results);
86
-
87
- const tree = await gitHost.listTree("demo", {
88
- ref: "main",
89
- recursive: true,
90
- linguist: true,
91
- icons: true,
92
- });
93
- console.log(tree[0]?.language, Boolean(tree[0]?.icon));
94
-
95
- const tags = await gitHost.listTags("demo");
96
- const blame = await gitHost.readBlame("demo", {
97
- ref: "main",
98
- path: "src/app.ts",
99
- });
100
- const search = await gitHost.search("demo", {
101
- ref: "main",
102
- path: "src",
103
- query: "value",
104
- });
105
- const archive = await gitHost.readArchive("demo", {
106
- ref: "main",
107
- format: "tar.gz",
108
- });
109
- const archiveLinks = gitHost.resolveArchiveLinks("demo", {
110
- basePath: "/api/git",
111
- ref: "main",
112
- });
113
- console.log(tags.length, blame.lines[0]?.author_name, search.match_count, archive.file_name, archiveLinks.zip.href);
114
-
115
- const inspectionTarget = await gitHost.resolveInspectionTarget("demo", {
116
- ref: "auto",
117
- });
118
- console.log(inspectionTarget.state, inspectionTarget.resolved_ref);
119
-
120
- const treeSnapshot = await gitHost.readTree("demo", {
121
- ref: "auto",
122
- recursive: true,
123
- nested: true,
124
- ascii: true,
125
- icons: true,
126
- linguist: true,
127
- });
128
- console.log(treeSnapshot.ascii);
129
-
130
- const directorySnapshot = await gitHost.readDirectory("demo", {
131
- path: "src",
132
- ref: "auto",
133
- icons: true,
134
- linguist: true,
135
- includeLineCounts: true,
136
- });
137
- console.log(directorySnapshot.kind);
63
+ ## Actions Model
138
64
 
139
- const fileSnapshot = await gitHost.readFile("demo", {
140
- path: "src/app.ts",
141
- ref: "auto",
142
- includeLanguage: true,
143
- includeIcon: true,
144
- });
145
- console.log(fileSnapshot.language, fileSnapshot.icon?.name);
146
-
147
- const repositoryAnalysis = await gitHost.readRepositoryAnalysis("demo", {
148
- ref: "auto",
149
- icons: true,
150
- nested: true,
151
- ascii: true,
152
- onProgress(event) {
153
- console.log(event.phase, event.percent);
154
- },
155
- });
156
- console.log(repositoryAnalysis.linguist.languages.results);
65
+ Repository Actions are repository-owned. Workflows are discovered from files committed inside the repository itself, not from top-level global records.
157
66
 
158
- const workingTree = await gitHost.readWorkingTree("demo");
159
- console.log(workingTree.unstaged_entries);
67
+ Default layout:
160
68
 
161
- await gitHost.fetch("demo", {
162
- remoteCredentials: {
163
- username: "git-user",
164
- password: process.env.GIT_TOKEN || "",
165
- },
166
- });
69
+ ```text
70
+ <repository-worktree>/
71
+ .git-host/
72
+ workflows/
73
+ build.yml
74
+ release.yml
167
75
  ```
168
76
 
169
- Smart HTTP hosting:
170
-
171
- ```ts
172
- import { createServer } from "node:http";
173
- import { createGitHost, createGitHttpHandler } from "@trebired/git-host";
174
- import { createLog } from "@trebired/logger";
77
+ The `workflows/` directory is intentional. It keeps the model familiar and gives you room to add more package-owned repository metadata under the configurable root later.
78
+
79
+ ### Workflow File
80
+
81
+ Example workflow file:
82
+
83
+ ```yaml
84
+ name: Build and test
85
+ trigger: push
86
+ source:
87
+ branches:
88
+ - main
89
+ steps:
90
+ - name: Install
91
+ run: bun install
92
+ - name: Test
93
+ run: bun test
94
+ - name: Build
95
+ run: bun run build
96
+ ```
175
97
 
176
- const log = createLog({
177
- console: true,
178
- quiet: true,
179
- save: false,
180
- });
98
+ Supported trigger values in v1:
181
99
 
182
- const gitHost = createGitHost({
183
- resolveRepository(repositoryId) {
184
- return {
185
- id: repositoryId,
186
- path: `/srv/git-workspaces/${repositoryId}/workspace`,
187
- };
188
- },
189
- });
100
+ - `push`
101
+ - `release.create`
102
+ - `release.update`
103
+ - `manual`
190
104
 
191
- const server = createServer(createGitHttpHandler({
192
- basePath: "/git",
193
- logger: log,
194
- resolveRepository(repositoryKey) {
195
- return {
196
- id: repositoryKey,
197
- path: `/srv/git-workspaces/${repositoryKey}/workspace`,
198
- };
199
- },
200
- }));
105
+ Each workflow file is exposed through the forge API as a repository-owned workflow record. The stable workflow id is the repository-relative definition path, for example:
201
106
 
202
- server.listen(3000);
107
+ ```text
108
+ .git-host/workflows/build.yml
203
109
  ```
204
110
 
205
- Then clients can use:
206
-
207
- ```sh
208
- git clone http://127.0.0.1:3000/git/demo.git
209
- git push
210
- ```
111
+ ### Custom Workflow Root
211
112
 
212
- SSH hosting:
113
+ The root folder is configurable. The folder name does not have to stay `.git-host`.
213
114
 
214
115
  ```ts
215
- import { createGitSshServer } from "@trebired/git-host";
216
- import { createLog } from "@trebired/logger";
217
-
218
- const log = createLog({
219
- console: true,
220
- quiet: true,
221
- save: false,
222
- });
116
+ import { createGitForge } from "@trebired/git-host";
223
117
 
224
- const sshServer = createGitSshServer({
225
- hostKeys: [hostPrivateKeyPem],
226
- logger: log,
227
- authenticate({ publicKey, username }) {
228
- if (username !== "git") return null;
229
- const account = findAccountBySshPublicKey(publicKey);
230
- if (!account) return null;
231
- return {
232
- publicKey: account.publicKey,
233
- remoteUser: account.username,
234
- identity: account,
235
- };
118
+ const forge = createGitForge({
119
+ actions: {
120
+ workflowRoot: ".ci",
236
121
  },
237
- resolveRepository(repositoryKey) {
122
+ createForkRepository({ upstreamRepositoryId }) {
238
123
  return {
239
- id: repositoryKey,
240
- path: `/srv/git-workspaces/${repositoryKey}/workspace`,
124
+ id: `${upstreamRepositoryId}-fork`,
125
+ path: resolveRepositoryPath({
126
+ rootDir: repositoriesRoot,
127
+ repositoryPath: `${upstreamRepositoryId}-fork/workspace`,
128
+ }),
241
129
  };
242
130
  },
131
+ gitHost,
132
+ storage,
243
133
  });
244
-
245
- sshServer.listen(2222, "0.0.0.0");
246
134
  ```
247
135
 
248
- Then clients can use:
136
+ That makes the workflow layout:
249
137
 
250
- ```sh
251
- git clone ssh://git@127.0.0.1:2222/demo.git
252
- git push
138
+ ```text
139
+ <repository-worktree>/
140
+ .ci/
141
+ workflows/
142
+ build.yml
253
143
  ```
254
144
 
255
- JSON API hosting:
145
+ You can also resolve the workflow root per repository:
256
146
 
257
147
  ```ts
258
- import { createServer } from "node:http";
259
- import { createGitApiHandler, createGitApiSocketServer, createGitHost } from "@trebired/git-host";
260
- import { createLog } from "@trebired/logger";
261
-
262
- const log = createLog({
263
- console: true,
264
- quiet: true,
265
- save: false,
266
- });
267
-
268
- const gitHost = createGitHost({
269
- resolveRepository(repositoryId) {
270
- return {
271
- id: repositoryId,
272
- path: `/srv/git-workspaces/${repositoryId}/workspace`,
273
- };
274
- },
275
- });
276
-
277
- const apiServer = createServer(createGitApiHandler({
278
- basePath: "/api/git",
279
- gitHost,
280
- logger: log,
281
- authorize({ action, repositoryId }) {
282
- return canReadRepository(repositoryId, action);
148
+ actions: {
149
+ async resolveWorkflowRoot(repositoryId) {
150
+ return repositoryId.startsWith("legacy-") ? ".ci" : ".git-host";
283
151
  },
284
- }));
285
-
286
- createGitApiSocketServer({
287
- basePath: "/api/git",
288
- gitHost,
289
- httpServer: apiServer,
290
- logger: log,
291
- authorize({ action, repositoryId }) {
292
- return canReadRepository(repositoryId, action);
293
- },
294
- });
295
-
296
- apiServer.listen(3100);
152
+ }
297
153
  ```
298
154
 
299
- Then apps can use routes like:
300
-
301
- ```txt
302
- GET /api/git/repositories/demo/summary
303
- GET /api/git/repositories/demo/branches
304
- GET /api/git/repositories/demo/commits?limit=20&ref=main&path=src/app.ts
305
- GET /api/git/repositories/demo/commits/<commit-ref>
306
- GET /api/git/repositories/demo/tags
307
- GET /api/git/repositories/demo/tags/v1
308
- GET /api/git/repositories/demo/tree?ref=HEAD&path=src&linguist=true&icons=true
309
- GET /api/git/repositories/demo/linguist?ref=HEAD
310
- GET /api/git/repositories/demo/blame?ref=HEAD&path=src/app.ts
311
- GET /api/git/repositories/demo/search?ref=HEAD&path=src&query=value
312
- GET /api/git/repositories/demo/archive?ref=HEAD&format=zip
313
- GET /api/git/repositories/demo/archive?ref=HEAD&format=tar.gz
314
- GET /api/git/repositories/demo/zipball/main
315
- GET /api/git/repositories/demo/tarball/v1
316
- GET /api/git/repositories/demo/blob?ref=HEAD&path=README.md
317
- GET /api/git/repositories/demo/diff?baseRef=main&headRef=feature%2Fx&path=src
318
- ```
155
+ ## Actions Execution
319
156
 
320
- ## Source Archives
157
+ Workflow runs are persistent and repository-owned:
321
158
 
322
- git-host now exposes GitHub-style source archive downloads for branches, tags, commit SHAs, and forge releases.
159
+ - workflows are loaded from the triggering ref/commit
160
+ - each run materializes an exact snapshot for that ref/commit
161
+ - steps run sequentially
162
+ - stdout and stderr are captured and persisted
163
+ - live run events are streamed over Socket.IO
164
+ - queued/running runs can be cancelled
323
165
 
324
- - `zipball/:ref` streams a `zip` archive.
325
- - `tarball/:ref` streams a `tar.gz` archive.
326
- - `readArchive()` still returns a base64 payload for JSON-first consumers.
327
- - `resolveArchiveLinks()` builds typed download URLs for branches, tags, releases, and commit SHAs.
166
+ The runtime emits persisted run events such as:
328
167
 
329
- Archives are always generated from Git objects with `git archive`, never from the checked-out working tree.
168
+ - `run.accepted`
169
+ - `run.status`
170
+ - `step.started`
171
+ - `step.output`
172
+ - `step.heartbeat`
173
+ - `step.finished`
174
+ - `run.finished`
175
+ - `run.failed`
176
+ - `run.cancelled`
330
177
 
331
- - Branch and tag downloads resolve to the current target commit first, then use a SHA-based cache key.
332
- - Commit SHA downloads are the stable choice when you need predictable contents.
333
- - The extracted root directory is commit-based, so the inner folder stays stable for a fixed commit even if the request came from a branch or tag name.
334
- - The outer archive bytes are streamed and cached, but git-host does not promise byte-for-byte identical compression output forever unless you choose to enforce that at the cache/backend layer.
178
+ ## Activity Integration
335
179
 
336
- Default behavior:
180
+ Repository activity is normalized and repository-owned. Activity entries are returned through the repository activity API and can be used to trigger workflows.
337
181
 
338
- ```ts
339
- const archive = await gitHost.readArchive("demo", {
340
- format: "zip",
341
- ref: "main",
342
- });
182
+ Examples of normalized kinds:
343
183
 
344
- console.log(archive.file_name);
345
- // demo-main.zip
184
+ - `repository.push`
185
+ - `repository.pull`
186
+ - `repository.fetch`
187
+ - `release.create`
188
+ - `release.update`
189
+ - `release.delete`
190
+ - `repository.fork.create`
191
+ - `repository.fork.sync`
192
+ - `repository.star`
193
+ - `repository.unstar`
194
+ - `repository.watch`
195
+ - `repository.unwatch`
346
196
 
347
- const links = gitHost.resolveArchiveLinks("demo", {
348
- basePath: "/api/git",
349
- ref: "main",
350
- });
197
+ Push-triggered Actions can be created from:
351
198
 
352
- console.log(links.zip.href);
353
- // /api/git/repositories/demo/zipball/main
354
- ```
199
+ - smart HTTP pushes
200
+ - SSH pushes
201
+ - programmatic host/forge push operations
355
202
 
356
- Custom archive filename and root directory behavior:
203
+ ## Smart HTTP And SSH
204
+
205
+ ### HTTP
357
206
 
358
207
  ```ts
359
- const gitHost = createGitHost({
360
- archive: {
361
- resolveFileName({ format, ref, repository, resolvedCommit }) {
362
- const label = repository.id === "demo" ? "customer-demo" : repository.id;
363
- const shortSha = resolvedCommit.slice(0, 8);
364
- return format === "zip"
365
- ? `${label}-${ref}-${shortSha}.zip`
366
- : `${label}-${ref}-${shortSha}.tar.gz`;
367
- },
368
- resolveRootDirectory({ repository, resolvedCommit }) {
369
- return `${repository.id}-src-${resolvedCommit.slice(0, 12)}/`;
370
- },
371
- },
372
- resolveRepository(repositoryId) {
208
+ import { createServer } from "node:http";
209
+ import { createGitHttpHandler } from "@trebired/git-host";
210
+
211
+ const server = createServer(createGitHttpHandler({
212
+ basePath: "/git",
213
+ resolveRepository(repositoryKey) {
373
214
  return {
374
- id: repositoryId,
375
- path: `/srv/git-workspaces/${repositoryId}/workspace`,
215
+ id: repositoryKey,
216
+ path: `/srv/git-workspaces/${repositoryKey}/workspace`,
376
217
  };
377
218
  },
378
- });
379
-
380
- const preview = await gitHost.resolveArchive("demo", {
381
- format: "tar.gz",
382
- ref: "v1",
383
- });
219
+ }));
384
220
 
385
- console.log(preview.file_name);
386
- console.log(preview.root_directory);
221
+ server.listen(3000);
387
222
  ```
388
223
 
389
- You can also override the outer filename or root directory per call without changing host defaults:
224
+ ### SSH
390
225
 
391
226
  ```ts
392
- const releaseZip = await gitHost.openArchive("demo", {
393
- fileName: "demo-release.zip",
394
- format: "zip",
395
- ref: "v1",
396
- rootDirectory: "demo-release/",
397
- });
398
- ```
399
-
400
- Custom archive URL generation for host-owned routes:
227
+ import { createGitSshServer } from "@trebired/git-host";
401
228
 
402
- ```ts
403
- const gitHost = createGitHost({
404
- archive: {
405
- buildUrl({ format, ref, repositoryKey }) {
406
- const route = format === "zip" ? "source.zip" : "source.tar.gz";
407
- return `/projects/${encodeURIComponent(repositoryKey)}/refs/${encodeURIComponent(ref)}/${route}`;
408
- },
409
- },
410
- resolveRepository(repositoryId) {
229
+ const server = createGitSshServer({
230
+ hostKeys: [process.env.GIT_HOST_SSH_KEY || ""],
231
+ resolveRepository(repositoryKey) {
411
232
  return {
412
- id: repositoryId,
413
- path: `/srv/git-workspaces/${repositoryId}/workspace`,
233
+ id: repositoryKey,
234
+ path: `/srv/git-workspaces/${repositoryKey}/workspace`,
414
235
  };
415
236
  },
416
237
  });
417
238
 
418
- const links = gitHost.resolveArchiveLinks("acme/demo", {
419
- ref: "release/v1",
420
- });
421
-
422
- console.log(links.tar_gz.href);
423
- // /projects/acme%2Fdemo/refs/release%2Fv1/source.tar.gz
424
- ```
425
-
426
- Host-owned download route with the exported response helper:
427
-
428
- ```ts
429
- import express from "express";
430
- import { writeGitArchiveResponse } from "@trebired/git-host";
431
-
432
- const app = express();
433
-
434
- app.get("/projects/:owner/:repo/archive/:ref.zip", async (req, res, next) => {
435
- try {
436
- const repositoryId = `${req.params.owner}/${req.params.repo}`;
437
- const archive = await gitHost.openArchive(repositoryId, {
438
- fileName: `${req.params.repo}-${req.params.ref}.zip`,
439
- format: "zip",
440
- ref: req.params.ref,
441
- repositoryKey: repositoryId,
442
- });
443
- await writeGitArchiveResponse(req, res, { archive });
444
- } catch (error) {
445
- next(error);
446
- }
447
- });
448
-
449
- app.head("/projects/:owner/:repo/archive/:ref.zip", async (req, res, next) => {
450
- try {
451
- const repositoryId = `${req.params.owner}/${req.params.repo}`;
452
- const archive = await gitHost.openArchive(repositoryId, {
453
- fileName: `${req.params.repo}-${req.params.ref}.zip`,
454
- format: "zip",
455
- ref: req.params.ref,
456
- repositoryKey: repositoryId,
457
- });
458
- await writeGitArchiveResponse(req, res, { archive });
459
- } catch (error) {
460
- next(error);
461
- }
462
- });
463
- ```
464
-
465
- `writeGitArchiveResponse()` applies the correct `content-type`, `content-disposition`, `content-length` when known, redirect handling, and `HEAD` semantics for either `readArchive()` or `openArchive()` results.
466
-
467
- ### Releases, Tags, and Assets
468
-
469
- A forge release is metadata attached to a Git tag. Its automatic source archives are not uploaded assets.
470
-
471
- - `release.assets` remains your uploaded files.
472
- - `release.source_archives.zip` and `release.source_archives.tar_gz` point at the automatic downloads for the tagged source.
473
- - Tag list/detail responses also expose `source_archives`.
474
- - If a release points at a missing tag, the forge API returns `release_tag_not_found`.
475
-
476
- Uploaded release assets have matching host ergonomics:
477
-
478
- - `forge.resolveReleaseAssetLink()` returns typed host-owned metadata for an asset download URL.
479
- - `forge.openReleaseAsset()` returns a stream or redirect download shape without assuming a storage backend.
480
- - `writeGitReleaseAssetResponse()` applies headers and `HEAD` behavior for custom host routes.
481
-
482
- ```ts
483
- const assetLink = await forge.resolveReleaseAssetLink("demo", release.id, asset.id, {
484
- repositoryKey: "acme/demo",
485
- });
486
-
487
- console.log(assetLink.href);
488
-
489
- const assetDownload = await forge.openReleaseAsset("demo", release.id, asset.id, {
490
- repositoryKey: "acme/demo",
491
- });
492
- ```
493
-
494
- ### Cache Behavior
495
-
496
- The built-in archive service prefers on-demand generation plus cache.
497
-
498
- - Cache keys include repository id, resolved commit SHA, archive format, and the configured archive cache key version.
499
- - Moving a tag or branch to a different commit produces a new cache key automatically.
500
- - The default cache backend is filesystem-backed under the system temp directory.
501
- - You can inject your own `archive.cache` backend, including future object-storage implementations.
502
- - Cached entries carry TTL metadata and the filesystem backend performs periodic expired-entry cleanup.
503
-
504
- ### Security Notes
505
-
506
- - Public repositories can expose `zipball` and `tarball` routes without auth.
507
- - Private repositories should authorize before archive generation just like any other read route.
508
- - The API handlers authorize archive downloads before they resolve refs or touch the cache.
509
- - Cache backends can optionally mint redirect URLs for object storage, but the default filesystem backend streams directly from git-host.
510
-
511
- ## Frontend Integration
512
-
513
- The package now supports three frontend integration modes.
514
-
515
- ### 1. Full Browser Pages
516
-
517
- Use `@trebired/git-host/browser` when you want git-host to own the whole repository area:
518
-
519
- - repository shell
520
- - tabs and navigation behavior
521
- - stats, actions, and social controls
522
- - loading, error, retry, and empty states
523
- - code browsing, blame, compare, releases, forks, activity, branches, tags, and search pages
524
-
525
- Host apps mostly provide:
526
-
527
- - auth
528
- - API base URL
529
- - repository key
530
- - route adapter
531
- - theme tokens
532
- - optional policy and diagnostics hooks
533
-
534
- Default styling is optional.
535
-
536
- - If you want the package look, import `@trebired/git-host/browser/styles.css`.
537
- - If you want package-owned structure with your own design system, skip that stylesheet and pass theme slots/classes.
538
-
539
- ```ts
540
- import {
541
- GitRepositoryOverviewPage,
542
- createGitRepositoryRouteAdapter,
543
- } from "@trebired/git-host/browser";
544
-
545
- const routeAdapter = createGitRepositoryRouteAdapter({
546
- repositoryBasePath: "/workspaces",
547
- });
548
-
549
- function RepositoryScreen() {
550
- return (
551
- <GitRepositoryOverviewPage
552
- baseUrl="/api/git"
553
- repositoryKey="demo"
554
- routeAdapter={routeAdapter}
555
- branding={{
556
- getCloneUrl(repositoryKey) {
557
- return `https://git.example.com/${repositoryKey}.git`;
558
- },
559
- }}
560
- unstyled
561
- theme={{
562
- classNames: {
563
- page: "repo-page",
564
- header: "repo-header",
565
- title: "repo-title",
566
- tabs: "repo-tabs",
567
- "tab-link": "repo-tab",
568
- card: "repo-card",
569
- button: "repo-button",
570
- },
571
- slots: {
572
- page: {
573
- attributes: {
574
- "data-repository-surface": "git-host",
575
- },
576
- },
577
- },
578
- variables: {
579
- "--git-browser-accent": "#0a7f5a",
580
- },
581
- }}
582
- />
583
- );
584
- }
585
- ```
586
-
587
- ### 2. Hybrid Shell + Package Sections
588
-
589
- Use `@trebired/git-host/react` when your app owns the outer chrome but git-host should own the repository section UI patterns:
590
-
591
- ```ts
592
- import {
593
- GitApiClientProvider,
594
- GitCommitList,
595
- GitRepositoryShell,
596
- GitRepositoryUiProvider,
597
- createGitApiClient,
598
- createGitRepositoryRouteAdapter,
599
- useGitCommits,
600
- useGitOverview,
601
- } from "@trebired/git-host/react";
602
-
603
- const client = createGitApiClient({ baseUrl: "/api/git" });
604
- const routes = createGitRepositoryRouteAdapter({
605
- repositoryBasePath: "/app/repos",
606
- });
607
-
608
- function RepositoryCommitsSection({ repositoryKey }: { repositoryKey: string }) {
609
- const overview = useGitOverview(repositoryKey);
610
- const commits = useGitCommits(repositoryKey, {
611
- ref: overview.data?.repository.repository.current_branch,
612
- });
613
-
614
- return (
615
- <GitRepositoryShell
616
- page="commits"
617
- repositoryKey={repositoryKey}
618
- loading={overview.loading || commits.loading}
619
- error={overview.error || commits.error}
620
- social={overview.data?.social}
621
- stats={[
622
- { label: "Branch", value: overview.data?.repository.repository.current_branch || "-" },
623
- { label: "Forks", value: String(overview.data?.fork_count || 0) },
624
- ]}
625
- >
626
- <GitCommitList commits={commits.data || []} repositoryKey={repositoryKey} />
627
- </GitRepositoryShell>
628
- );
629
- }
630
-
631
- function App() {
632
- return (
633
- <GitApiClientProvider client={client}>
634
- <GitRepositoryUiProvider
635
- routeAdapter={routes}
636
- theme={{
637
- unstyled: true,
638
- classNames: {
639
- page: "repo-surface",
640
- header: "repo-shell-header",
641
- card: "repo-panel",
642
- button: "repo-action",
643
- },
644
- }}
645
- >
646
- <RepositoryCommitsSection repositoryKey="demo" />
647
- </GitRepositoryUiProvider>
648
- </GitApiClientProvider>
649
- );
650
- }
239
+ server.listen(2222);
651
240
  ```
652
241
 
653
- ### 3. Fully Custom Layout
654
-
655
- Use the typed client, hooks, diagnostics, route adapter, and low-level models when you want full control over the page structure:
656
-
657
- ```ts
658
- import {
659
- GitApiClientProvider,
660
- createGitApiClient,
661
- useGitOverview,
662
- useGitSearch,
663
- } from "@trebired/git-host/react";
664
-
665
- const client = createGitApiClient({ baseUrl: "/api/git" });
666
-
667
- function CustomRepositorySearch({ repositoryKey }: { repositoryKey: string }) {
668
- const overview = useGitOverview(repositoryKey);
669
- const search = useGitSearch(repositoryKey, {
670
- query: "value",
671
- ref: overview.data?.repository.repository.current_branch,
672
- });
673
-
674
- if (search.loading) return "Searching...";
675
- if (search.error) return search.error.message;
676
- return JSON.stringify(search.data?.files || []);
677
- }
678
- ```
242
+ ## Forge Layer
679
243
 
680
- ## Frontend Surface
681
-
682
- `@trebired/git-host/browser` ships package-owned repository pages for:
683
-
684
- - overview
685
- - code/tree/blob
686
- - commits
687
- - commit detail
688
- - releases
689
- - release detail
690
- - forks
691
- - activity
692
- - blame
693
- - diff/compare
694
- - branches
695
- - tags
696
- - search
697
-
698
- `@trebired/git-host/react` now ships reusable repository primitives such as:
699
-
700
- - `GitRepositoryUiProvider`
701
- - `GitRepositoryShell`
702
- - `GitRepositoryHeader`
703
- - `GitRepositoryTabs`
704
- - `GitRepositoryStats`
705
- - `GitRepositoryActionBar`
706
- - `GitRepositorySocialButtons`
707
- - `GitCommitList`
708
- - `GitReleaseList`
709
- - `GitForkList`
710
- - `GitBranchList`
711
- - `GitTagList`
712
- - `GitTreeView`
713
- - `GitBlobView`
714
- - `GitBlameView`
715
- - `GitDiffView`
716
- - `GitSearchResults`
717
- - `GitBranchSelector`
718
- - `GitTagSelector`
719
- - `GitEmptyState`
720
- - `GitErrorState`
721
- - `GitLoadingState`
722
-
723
- ### Styling And Skinning
724
-
725
- The package is designed around three frontend ownership levels:
726
-
727
- - full package UI: import `@trebired/git-host/browser/styles.css` and use the browser pages directly
728
- - package structure + app styling: skip the stylesheet and pass `theme.unstyled`, `theme.classNames`, and `theme.slots`
729
- - package logic + app rendering: use the typed hooks, mutations, diagnostics, and route adapter with fully custom host rendering
730
-
731
- The package now treats styling as optional rather than required:
732
-
733
- - no browser page requires `@trebired/git-host/browser/styles.css` to function
734
- - structural components expose stable `data-slot` markers for host CSS targeting
735
- - `GitRepositoryUiProvider` accepts `theme.classNames` and `theme.slots` for slot-level class and attribute overrides
736
- - `GitBrowserProvider` and browser pages accept `unstyled` as a shortcut for `theme.unstyled: true`
737
- - render-state components can be replaced through `components.LoadingState`, `components.ErrorState`, and `components.EmptyState`
244
+ Use `createGitForge()` when you want repository releases, forks, activity, social state, and Actions on top of the Git host:
738
245
 
739
246
  ```ts
740
247
  import {
741
- GitRepositoryUiProvider,
742
- GitRepositoryShell,
743
- GitCommitList,
744
- } from "@trebired/git-host/react";
745
-
746
- <GitRepositoryUiProvider
747
- theme={{
748
- unstyled: true,
749
- classNames: {
750
- page: "nativeRepoPage",
751
- header: "nativeRepoHeader",
752
- card: "nativeCard",
753
- list: "nativeList",
754
- "list-item": "nativeListItem",
755
- button: "nativeButton",
756
- },
757
- slots: {
758
- page: {
759
- attributes: {
760
- "data-app-surface": "repository",
761
- },
762
- },
763
- },
764
- }}
765
- components={{
766
- EmptyState({ title, message }) {
767
- return <section className="nativeEmpty">{title}: {message}</section>;
768
- },
769
- }}
770
- >
771
- <GitRepositoryShell page="commits" repositoryKey="demo">
772
- <GitCommitList commits={commits} repositoryKey="demo" />
773
- </GitRepositoryShell>
774
- </GitRepositoryUiProvider>;
775
- ```
776
-
777
- ### Route Adapter
778
-
779
- Both `browser` and `react` use a package-owned route adapter:
780
-
781
- ```ts
782
- import { createGitRepositoryRouteAdapter } from "@trebired/git-host/react";
248
+ createGitForge,
249
+ createGitForgeActivityRecorder,
250
+ createInMemoryGitForgeStorageAdapter,
251
+ createGitHost,
252
+ } from "@trebired/git-host";
783
253
 
784
- const routes = createGitRepositoryRouteAdapter({
785
- repositoryBasePath: "/repos",
254
+ const storage = createInMemoryGitForgeStorageAdapter();
255
+ const activity = createGitForgeActivityRecorder({
256
+ storage: storage.activity,
786
257
  });
787
258
 
788
- routes.overview("demo");
789
- routes.code("demo", "src/app.ts", "main");
790
- routes.commit("demo", "abc123");
791
- routes.release("demo", "release-1");
792
- routes.compare("demo", "main", "feature/x");
793
- ```
794
-
795
- ### Diagnostics Hooks
796
-
797
- Repository UIs are brittle, so the package also exposes lifecycle diagnostics through `GitRepositoryUiProvider`:
798
-
799
- - `onNavigate`
800
- - `onViewMount`
801
- - `onFetchStart`
802
- - `onFetchSuccess`
803
- - `onFetchError`
804
- - `onActionStart`
805
- - `onActionSuccess`
806
- - `onActionError`
807
- - `onEmptyState`
808
- - `onRenderStateChange`
809
-
810
- ### Initial Data
811
-
812
- Browser pages and hybrid sections can take a stable `initialData` shape through `GitRepositoryFrontEndInitialData`, so host apps do not need to invent per-page bootstrap payloads.
813
-
814
- For long-running repository scans, the typed client still exposes a live Socket.IO linguist stream:
815
-
816
- ```ts
817
- const gitClient = createGitApiClient({
818
- baseUrl: "/api/git",
259
+ const gitHost = createGitHost({
260
+ activity,
261
+ resolveRepository(repositoryId) {
262
+ return {
263
+ id: repositoryId,
264
+ path: `/srv/git-workspaces/${repositoryId}/workspace`,
265
+ };
266
+ },
819
267
  });
820
268
 
821
- const socket = gitClient.openLinguistSocket("demo", {
822
- ref: "main",
823
- onProgress(event) {
824
- console.log(event.stage, event.percent);
269
+ const forge = createGitForge({
270
+ actions: {
271
+ workflowRoot: ".git-host",
272
+ workspaceRoot: "/srv/git-actions-workspaces",
825
273
  },
826
- onResult(event) {
827
- console.log(event.data.languages.results);
274
+ createForkRepository({ upstreamRepositoryId }) {
275
+ return {
276
+ id: `${upstreamRepositoryId}-fork`,
277
+ path: `/srv/git-workspaces/${upstreamRepositoryId}-fork/workspace`,
278
+ };
828
279
  },
280
+ gitHost,
281
+ storage,
829
282
  });
830
-
831
- await socket.completed;
832
283
  ```
833
284
 
834
- ## Current API
285
+ ## JSON API And Live Sockets
835
286
 
836
- The package now exposes three main frontend/backend layers:
287
+ The package exposes backend API helpers:
837
288
 
838
- - `createGitHost()`
839
- - `createGitForge()`
840
- - `resolveRepositoryPath()`
841
- - `runGit()`
842
- - `buildGitEnv()`
843
- - `RepositoryLockManager`
844
289
  - `createGitApiHandler()`
845
290
  - `createGitForgeApiHandler()`
846
291
  - `createGitApiSocketServer()`
847
- - `createGitHttpHandler()`
848
- - `generateSshKeyPair()`
849
- - `normalizeSshPublicKey()`
850
- - `compareSshPublicKeys()`
851
- - `fingerprintSshPublicKey()`
852
- - `createGitSshServer()`
853
- - `@trebired/git-host/react`
854
- - `@trebired/git-host/browser`
855
-
856
- And the main host instance methods:
857
-
858
- - `ensureRepository()`
859
- - `readSummary()`
860
- - `listBranches()`
861
- - `listCommits()`
862
- - `listTags()`
863
- - `listTree()`
864
- - `readLinguist()`
865
- - `readBlame()`
866
- - `search()`
867
- - `readArchive()`
868
- - `readBlob()`
869
- - `readCommit()`
870
- - `readTag()`
871
- - `diff()`
872
- - `readWorkingTree()`
873
- - `readStagedFile()`
874
- - `readUnstagedFile()`
875
- - `createBranch()`
876
- - `createTag()`
877
- - `checkoutBranch()`
878
- - `checkoutRef()`
879
- - `deleteBranch()`
880
- - `deleteTag()`
881
- - `stagePaths()`
882
- - `unstagePaths()`
883
- - `discardPaths()`
884
- - `commit()`
885
- - `merge()`
886
- - `rebase()`
887
- - `cherryPick()`
888
- - `continueOperation()`
889
- - `abortOperation()`
890
- - `fetch()`
891
- - `pull()`
892
- - `push()`
893
- - `withRepositoryLock()`
894
-
895
- The React entry now exports:
896
-
897
- - `createGitApiClient()`
898
- - `GitApiClientProvider`
899
- - `GitRepositoryUiProvider`
900
- - `createGitRepositoryRouteAdapter()`
901
- - `openLinguistSocket()` through the typed client instance
902
- - `useGitRepositorySummary()`
903
- - `useGitOverview()`
904
- - `useGitSocialState()`
905
- - `useGitBranches()`
906
- - `useGitCommits()`
907
- - `useGitCommit()`
908
- - `useGitTags()`
909
- - `useGitTag()`
910
- - `useGitTree()`
911
- - `useGitLinguist()`
912
- - `useGitBlame()`
913
- - `useGitSearch()`
914
- - `useGitArchive()`
915
- - `useGitBlob()`
916
- - `useGitDiff()`
917
- - `useGitApiQuery()`
918
- - `GitRepositoryShell`
919
- - `GitRepositoryHeader`
920
- - `GitRepositoryTabs`
921
- - `GitRepositoryStats`
922
- - `GitRepositoryActionBar`
923
- - `GitRepositorySocialButtons`
924
- - `GitCommitList`
925
- - `GitReleaseList`
926
- - `GitForkList`
927
- - `GitBranchList`
928
- - `GitTagList`
929
- - `GitTreeView`
930
- - `GitBlobView`
931
- - `GitBlameView`
932
- - `GitDiffView`
933
- - `GitSearchResults`
934
- - `GitBranchSelector`
935
- - `GitTagSelector`
936
- - `GitStarButton`
937
- - `GitWatchButton`
938
- - `GitForkButton`
939
- - `GitSyncForkButton`
940
- - `GitCreateReleaseButton`
941
- - `GitDeleteReleaseButton`
942
- - `GitCopyCloneUrlButton`
943
- - `GitDownloadArchiveButton`
944
-
945
- The browser entry exports full-page repository surfaces such as:
946
-
947
- - `GitRepositoryOverviewPage`
948
- - `GitRepositoryCodePage`
949
- - `GitRepositoryCommitsPage`
950
- - `GitRepositoryCommitPage`
951
- - `GitRepositoryReleasesPage`
952
- - `GitRepositoryReleasePage`
953
- - `GitRepositoryForksPage`
954
- - `GitRepositoryActivityPage`
955
- - `GitRepositoryBranchesPage`
956
- - `GitRepositoryTagsPage`
957
- - `GitRepositorySearchPage`
958
- - `GitRepositoryBlamePage`
959
- - `GitRepositoryComparePage`
960
-
961
- ## Repository Model
962
-
963
- This package does not own your app database.
964
-
965
- Your app resolves a repository id to an absolute repository path. The package then runs Git operations against that path. This keeps repository metadata, permissions, tokens, SSH keys, and UI decisions inside the host app where they belong.
966
-
967
- The repository runtime is still worktree-first, but the frontend surface is intentionally much broader now so host apps can stay thin.
968
-
969
- Private remotes are still host-owned. The package now helps with the transport plumbing by supporting:
970
-
971
- - `remoteCredentials` for clone, fetch, pull, and push
972
- - `httpHeaders` for per-command HTTP headers such as bearer auth
973
- - `sshCommand` for per-command SSH transport overrides
974
-
975
- ## Why This Package
976
-
977
- Most alternatives fall into one of three buckets:
978
-
979
- - full forge products such as GitLab, Gitea, or Forgejo
980
- - Git implementation libraries that reimplement Git behavior in another runtime
981
- - one-off app code that shells out to `git` without a reusable boundary
982
-
983
- `@trebired/git-host` is aiming at the gap between those options.
984
-
985
- Use it when you want:
986
-
987
- - your app to keep owning users, permissions, tokens, SSH keys, repository records, and UI
988
- - your app to keep owning users, permissions, tokens, SSH keys, repository records, branding, auth, and top-level route mounting while git-host owns most repository UI
989
- - real Git behavior from the system `git` binary
990
- - clone, fetch, pull, and push over smart HTTP and SSH
991
- - a reusable Git runtime instead of spreading Git shell calls all over your platform code
992
- - full browser-ready repository pages or reusable React repository primitives without rebuilding the same repository shell in every host app
993
-
994
- Do not use it when you want:
995
-
996
- - a ready-made Git product with issues, pull requests, teams, admin screens, and built-in account management
997
- - a pure JavaScript Git implementation with no `git` binary dependency
998
-
999
- That makes it useful for internal developer platforms, product-specific source management, deployment systems, controlled automation environments, and apps that need Git as a capability rather than Git hosting as a separate product.
1000
-
1001
- ## Path Safety
1002
-
1003
- Repository paths should never come straight from request input.
1004
-
1005
- The intended flow is:
1006
-
1007
- ```txt
1008
- request repo id -> host app record lookup -> absolute repository path -> git-host
1009
- ```
1010
-
1011
- `resolveRepositoryPath()` is provided as a safe join helper when your host app stores repository-relative paths under one known root.
1012
-
1013
- ## Hosted Transport Hooks
1014
-
1015
- Hosted transports keep identity and permission policy in your app.
1016
-
1017
- - `createGitHttpHandler()` supports host-owned repository resolution, optional identity resolution, permission checks, and request audit events.
1018
- - `createGitSshServer()` supports host-owned public key authentication, permission checks, and command audit events.
1019
- - `createGitApiHandler()` supports host-owned repository id mapping and per-route authorization.
1020
- - `createGitApiSocketServer()` supports host-owned Socket.IO progress delivery for long-running linguist scans with the same repository mapping and authorization hooks.
1021
- - `generateSshKeyPair()`, `normalizeSshPublicKey()`, `compareSshPublicKeys()`, and `fingerprintSshPublicKey()` help host apps manage SSH transport setup without owning the parsing details themselves.
1022
-
1023
- ## Platform Fit
1024
-
1025
- `@trebired/git-host` is a good fit when a larger platform already owns users, permissions, repository records, tokens, SSH keys, and UI, but wants to stop hand-rolling the reusable Git layer.
292
+ - `createGitForgeSocketServer()`
1026
293
 
1027
- The package is meant to replace or simplify:
294
+ The forge socket server supports live workflow run viewing with replay from a sequence cursor so disconnected clients can catch up from persisted events.
1028
295
 
1029
- - Git CLI execution and environment shaping
1030
- - repository locking and mutation coordination
1031
- - repository summary, tree, linguist, blame, search, archive, blob, commit, diff, and working-tree reads
1032
- - branch, tag, checkout, commit, merge, rebase, cherry-pick, fetch, pull, and push operations
1033
- - smart HTTP and SSH Git transport handling
1034
- - thin JSON API route internals around those Git operations
1035
-
1036
- The host platform should still own:
1037
-
1038
- - repository and source metadata persistence
1039
- - permission checks and route authorization policy
1040
- - access token issuance, revocation, and storage
1041
- - SSH key ownership, private key storage, and known-host persistence
1042
- - top-level product chrome, auth flows, branding decisions, and any product-specific features outside the repository area
1043
-
1044
- That boundary is where the package simplifies a platform the most without turning into a forge product of its own.
1045
-
1046
- ## Logger Support
1047
-
1048
- `@trebired/git-host` works best with `@trebired/logger`, and that is the recommended logger.
1049
-
1050
- Why we recommend it:
1051
-
1052
- - it is simple
1053
- - it already matches git-host's expected method shape
1054
- - it keeps application logs and git-host diagnostics in one consistent format
1055
-
1056
- The logger style:
1057
-
1058
- ```ts
1059
- log.info("git-host", "initializing repository", { repositoryId: "demo" });
1060
- ```
1061
-
1062
- comes from `@trebired/logger`.
1063
-
1064
- The runtime adaptation behind `logger` and `loggerAdapter` is powered by `@trebired/logger-adapter`.
1065
-
1066
- You can pass that same `log` object into `createGitHost()`, `createGitHttpHandler()`, `createGitSshServer()`, `createGitApiHandler()`, and `createGitApiSocketServer()` through their `logger` option.
1067
-
1068
- If you do not pass a logger and `@trebired/logger` is installed in the host app, git-host will create a quiet console-only logger automatically before falling back to raw `console`.
1069
-
1070
- If you also set `verbose: true`, git-host will emit successful lifecycle and transport diagnostics through that logger. Without `verbose`, it stays much quieter and mainly reports rejected or failed operations.
1071
-
1072
- Custom loggers can also use one of these shapes:
1073
-
1074
- ```ts
1075
- type Logger = {
1076
- info(group: string, message: string, metadata?: unknown): void;
1077
- warn(group: string, message: string, metadata?: unknown): void;
1078
- error(group: string, message: string, metadata?: unknown): void;
1079
- fail(group: string, message: string, metadata?: unknown): void;
1080
- };
1081
-
1082
- type Event = {
1083
- level: "info" | "warn" | "error" | "fail";
1084
- group: string;
1085
- message: string;
1086
- metadata?: unknown;
1087
- };
1088
-
1089
- type EventLogger = (event: Event) => void;
1090
-
1091
- type SinkLogger = {
1092
- log?(event: Event): void;
1093
- write?(event: Event): void;
1094
- fatal?(message: string, metadata?: unknown): void;
1095
- };
1096
- ```
1097
-
1098
- Common logger objects such as `console`, pino-style level methods, or Winston-style sinks are also adapted as sensibly as possible.
1099
-
1100
- If you want exact control over the emitted structure, pass `logger` plus `loggerAdapter`:
1101
-
1102
- ```ts
1103
- const rows: unknown[] = [];
1104
-
1105
- const host = createGitHost({
1106
- logger: rows,
1107
- loggerAdapter(logger, event) {
1108
- logger.push({
1109
- when: event.timestamp,
1110
- scope: event.group,
1111
- severity: event.level,
1112
- text: event.message,
1113
- extra: event.metadata,
1114
- });
1115
- },
1116
- resolveRepository(repositoryId) {
1117
- return {
1118
- id: repositoryId,
1119
- path: `/srv/repos/${repositoryId}`,
1120
- };
1121
- },
1122
- });
1123
- ```
296
+ ## Packaging
1124
297
 
1125
- If no logger is provided and `@trebired/logger` is not installed, git-host falls back to plain `console` output for its own diagnostics.
298
+ The npm package ships:
1126
299
 
1127
- ## Roadmap
300
+ - the backend TypeScript runtime
301
+ - packaged Actions runner binaries under `bin/`
302
+ - no browser or React entrypoints
1128
303
 
1129
- The remaining package work is mostly convenience and hardening:
304
+ Repository Actions workflow binaries are built in CI for:
1130
305
 
1131
- - thin Express wrappers when they stay truly thin
1132
- - broader examples for host-app integration patterns
306
+ - Linux x64 GNU
307
+ - Linux arm64 GNU
308
+ - macOS x64
309
+ - macOS arm64
1133
310
 
1134
- ## Contributing
311
+ ## License
1135
312
 
1136
- See `CONTRIBUTING.md` for development commands and package guidelines.
313
+ MIT