@trebired/git-host 2.0.0 → 2.2.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 (968) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +394 -988
  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/api/forge/actions.d.ts +20 -0
  9. package/dist/api/forge/actions.d.ts.map +1 -0
  10. package/dist/api/forge/actions.js +308 -0
  11. package/dist/api/forge/actions.js.map +1 -0
  12. package/dist/api/forge/archives.d.ts +5 -0
  13. package/dist/api/forge/archives.d.ts.map +1 -0
  14. package/dist/api/forge/archives.js +63 -0
  15. package/dist/api/forge/archives.js.map +1 -0
  16. package/dist/api/forge/handler.d.ts +6 -0
  17. package/dist/api/forge/handler.d.ts.map +1 -0
  18. package/dist/api/forge/handler.js +23 -0
  19. package/dist/api/forge/handler.js.map +1 -0
  20. package/dist/api/forge/route.d.ts +83 -0
  21. package/dist/api/forge/route.d.ts.map +1 -0
  22. package/dist/api/forge/route.js +112 -0
  23. package/dist/api/forge/route.js.map +1 -0
  24. package/dist/api/forge/runtime.d.ts +5 -0
  25. package/dist/api/forge/runtime.d.ts.map +1 -0
  26. package/dist/api/forge/runtime.js +181 -0
  27. package/dist/api/forge/runtime.js.map +1 -0
  28. package/dist/api/forge/socket.d.ts +6 -0
  29. package/dist/api/forge/socket.d.ts.map +1 -0
  30. package/dist/api/forge/socket.js +49 -0
  31. package/dist/api/forge/socket.js.map +1 -0
  32. package/dist/api/forge/socket_subscription.d.ts +10 -0
  33. package/dist/api/forge/socket_subscription.d.ts.map +1 -0
  34. package/dist/api/forge/socket_subscription.js +202 -0
  35. package/dist/api/forge/socket_subscription.js.map +1 -0
  36. package/dist/api/handler/action.d.ts +5 -0
  37. package/dist/api/handler/action.d.ts.map +1 -0
  38. package/dist/api/handler/action.js +109 -0
  39. package/dist/api/handler/action.js.map +1 -0
  40. package/dist/api/handler/archive.d.ts +43 -0
  41. package/dist/api/handler/archive.d.ts.map +1 -0
  42. package/dist/api/handler/archive.js.map +1 -0
  43. package/dist/api/handler/response.d.ts.map +1 -0
  44. package/dist/api/handler/response.js +100 -0
  45. package/dist/api/handler/response.js.map +1 -0
  46. package/dist/api/handler/route.d.ts.map +1 -0
  47. package/dist/api/handler/route.js +54 -0
  48. package/dist/api/handler/route.js.map +1 -0
  49. package/dist/api/handler/runtime.d.ts +5 -0
  50. package/dist/api/handler/runtime.d.ts.map +1 -0
  51. package/dist/api/handler/runtime.js +187 -0
  52. package/dist/api/handler/runtime.js.map +1 -0
  53. package/dist/api/handler.d.ts +6 -0
  54. package/dist/api/handler.d.ts.map +1 -0
  55. package/dist/api/handler.js.map +1 -0
  56. package/dist/api/routing.d.ts.map +1 -0
  57. package/dist/api/routing.js +35 -0
  58. package/dist/api/routing.js.map +1 -0
  59. package/dist/api/socket/events.d.ts.map +1 -0
  60. package/dist/api/socket/events.js.map +1 -0
  61. package/dist/api/socket/linguist_connection.d.ts +9 -0
  62. package/dist/api/socket/linguist_connection.d.ts.map +1 -0
  63. package/dist/api/socket/linguist_connection.js +167 -0
  64. package/dist/api/socket/linguist_connection.js.map +1 -0
  65. package/dist/api/socket/server.d.ts +6 -0
  66. package/dist/api/socket/server.d.ts.map +1 -0
  67. package/dist/api/socket/server.js +49 -0
  68. package/dist/api/socket/server.js.map +1 -0
  69. package/dist/backend/utils/normalize.d.ts.map +1 -0
  70. package/dist/backend/utils/normalize.js.map +1 -0
  71. package/dist/backend/utils/object.d.ts.map +1 -0
  72. package/dist/backend/utils/object.js.map +1 -0
  73. package/dist/backend/utils/time.d.ts.map +1 -0
  74. package/dist/backend/utils/time.js.map +1 -0
  75. package/dist/constants.d.ts.map +1 -0
  76. package/dist/constants.js.map +1 -0
  77. package/dist/core/actions/artifacts.d.ts +21 -0
  78. package/dist/core/actions/artifacts.d.ts.map +1 -0
  79. package/dist/core/actions/artifacts.js +121 -0
  80. package/dist/core/actions/artifacts.js.map +1 -0
  81. package/dist/core/actions/expressions.d.ts +15 -0
  82. package/dist/core/actions/expressions.d.ts.map +1 -0
  83. package/dist/core/actions/expressions.js +279 -0
  84. package/dist/core/actions/expressions.js.map +1 -0
  85. package/dist/core/actions/go_runner.d.ts +6 -0
  86. package/dist/core/actions/go_runner.d.ts.map +1 -0
  87. package/dist/core/actions/go_runner.js +106 -0
  88. package/dist/core/actions/go_runner.js.map +1 -0
  89. package/dist/core/actions/local_runner.d.ts +28 -0
  90. package/dist/core/actions/local_runner.d.ts.map +1 -0
  91. package/dist/core/actions/local_runner.js +121 -0
  92. package/dist/core/actions/local_runner.js.map +1 -0
  93. package/dist/core/actions/node_runner.d.ts +4 -0
  94. package/dist/core/actions/node_runner.d.ts.map +1 -0
  95. package/dist/core/actions/node_runner.js +175 -0
  96. package/dist/core/actions/node_runner.js.map +1 -0
  97. package/dist/core/actions/normalize.d.ts +7 -0
  98. package/dist/core/actions/normalize.d.ts.map +1 -0
  99. package/dist/core/actions/normalize.js +401 -0
  100. package/dist/core/actions/normalize.js.map +1 -0
  101. package/dist/core/actions/planner.d.ts +13 -0
  102. package/dist/core/actions/planner.d.ts.map +1 -0
  103. package/dist/core/actions/planner.js +106 -0
  104. package/dist/core/actions/planner.js.map +1 -0
  105. package/dist/core/actions/redaction.d.ts +5 -0
  106. package/dist/core/actions/redaction.d.ts.map +1 -0
  107. package/dist/core/actions/redaction.js +28 -0
  108. package/dist/core/actions/redaction.js.map +1 -0
  109. package/dist/core/actions/release_assets.d.ts +31 -0
  110. package/dist/core/actions/release_assets.d.ts.map +1 -0
  111. package/dist/core/actions/release_assets.js +114 -0
  112. package/dist/core/actions/release_assets.js.map +1 -0
  113. package/dist/core/actions/runner/launch.d.ts +5 -0
  114. package/dist/core/actions/runner/launch.d.ts.map +1 -0
  115. package/dist/core/actions/runner/launch.js +100 -0
  116. package/dist/core/actions/runner/launch.js.map +1 -0
  117. package/dist/core/actions/runner/protocol.d.ts +7 -0
  118. package/dist/core/actions/runner/protocol.d.ts.map +1 -0
  119. package/dist/core/actions/runner/protocol.js +66 -0
  120. package/dist/core/actions/runner/protocol.js.map +1 -0
  121. package/dist/core/actions/runner.d.ts +6 -0
  122. package/dist/core/actions/runner.d.ts.map +1 -0
  123. package/dist/core/actions/runner.js +13 -0
  124. package/dist/core/actions/runner.js.map +1 -0
  125. package/dist/core/actions/types.d.ts +90 -0
  126. package/dist/core/actions/types.d.ts.map +1 -0
  127. package/dist/core/actions/types.js.map +1 -0
  128. package/dist/core/actions/workflows.d.ts +22 -0
  129. package/dist/core/actions/workflows.d.ts.map +1 -0
  130. package/dist/core/actions/workflows.js +158 -0
  131. package/dist/core/actions/workflows.js.map +1 -0
  132. package/dist/core/actions/workspace.d.ts +7 -0
  133. package/dist/core/actions/workspace.d.ts.map +1 -0
  134. package/dist/core/actions/workspace.js +47 -0
  135. package/dist/core/actions/workspace.js.map +1 -0
  136. package/dist/core/activity.d.ts +11 -0
  137. package/dist/core/activity.d.ts.map +1 -0
  138. package/dist/core/activity.js +224 -0
  139. package/dist/core/activity.js.map +1 -0
  140. package/dist/core/archive.d.ts +22 -0
  141. package/dist/core/archive.d.ts.map +1 -0
  142. package/dist/core/archive.js +563 -0
  143. package/dist/core/archive.js.map +1 -0
  144. package/dist/core/archive_cache_filesystem.d.ts +8 -0
  145. package/dist/core/archive_cache_filesystem.d.ts.map +1 -0
  146. package/dist/core/archive_cache_filesystem.js +164 -0
  147. package/dist/core/archive_cache_filesystem.js.map +1 -0
  148. package/dist/core/create/git/forge.d.ts +4 -0
  149. package/dist/core/create/git/forge.d.ts.map +1 -0
  150. package/dist/core/create/git/forge.js +600 -0
  151. package/dist/core/create/git/forge.js.map +1 -0
  152. package/dist/core/create/git/host.d.ts +4 -0
  153. package/dist/core/create/git/host.d.ts.map +1 -0
  154. package/dist/core/create/git/host.js +182 -0
  155. package/dist/core/create/git/host.js.map +1 -0
  156. package/dist/core/create_git_host/branch_methods.d.ts +5 -0
  157. package/dist/core/create_git_host/branch_methods.d.ts.map +1 -0
  158. package/dist/core/create_git_host/branch_methods.js +223 -0
  159. package/dist/core/create_git_host/branch_methods.js.map +1 -0
  160. package/dist/core/create_git_host/content_methods.d.ts +5 -0
  161. package/dist/core/create_git_host/content_methods.d.ts.map +1 -0
  162. package/dist/core/create_git_host/content_methods.js +72 -0
  163. package/dist/core/create_git_host/content_methods.js.map +1 -0
  164. package/dist/core/create_git_host/remote_methods.d.ts +5 -0
  165. package/dist/core/create_git_host/remote_methods.d.ts.map +1 -0
  166. package/dist/core/create_git_host/remote_methods.js +108 -0
  167. package/dist/core/create_git_host/remote_methods.js.map +1 -0
  168. package/dist/core/create_git_host/shared.d.ts +23 -0
  169. package/dist/core/create_git_host/shared.d.ts.map +1 -0
  170. package/dist/core/create_git_host/shared.js +17 -0
  171. package/dist/core/create_git_host/shared.js.map +1 -0
  172. package/dist/core/create_git_host/working_tree_methods.d.ts +5 -0
  173. package/dist/core/create_git_host/working_tree_methods.d.ts.map +1 -0
  174. package/dist/core/create_git_host/working_tree_methods.js +84 -0
  175. package/dist/core/create_git_host/working_tree_methods.js.map +1 -0
  176. package/dist/core/forge_actions.d.ts +33 -0
  177. package/dist/core/forge_actions.d.ts.map +1 -0
  178. package/dist/core/forge_actions.js +1470 -0
  179. package/dist/core/forge_actions.js.map +1 -0
  180. package/dist/core/git_forge/storage_memory.d.ts +4 -0
  181. package/dist/core/git_forge/storage_memory.d.ts.map +1 -0
  182. package/dist/core/git_forge/storage_memory.js +353 -0
  183. package/dist/core/git_forge/storage_memory.js.map +1 -0
  184. package/dist/core/inspect/helpers.d.ts +27 -0
  185. package/dist/core/inspect/helpers.d.ts.map +1 -0
  186. package/dist/core/inspect/helpers.js +86 -0
  187. package/dist/core/inspect/helpers.js.map +1 -0
  188. package/dist/core/inspect/icon_theme.d.ts +4 -0
  189. package/dist/core/inspect/icon_theme.d.ts.map +1 -0
  190. package/dist/core/inspect/icon_theme.js +72 -0
  191. package/dist/core/inspect/icon_theme.js.map +1 -0
  192. package/dist/core/inspect/linguist_progress.d.ts +14 -0
  193. package/dist/core/inspect/linguist_progress.d.ts.map +1 -0
  194. package/dist/core/inspect/linguist_progress.js +92 -0
  195. package/dist/core/inspect/linguist_progress.js.map +1 -0
  196. package/dist/core/inspect.d.ts +47 -0
  197. package/dist/core/inspect.d.ts.map +1 -0
  198. package/dist/core/inspect.js +547 -0
  199. package/dist/core/inspect.js.map +1 -0
  200. package/dist/core/inspection.d.ts +11 -0
  201. package/dist/core/inspection.d.ts.map +1 -0
  202. package/dist/core/inspection.js +593 -0
  203. package/dist/core/inspection.js.map +1 -0
  204. package/dist/core/locks.d.ts.map +1 -0
  205. package/dist/core/locks.js.map +1 -0
  206. package/dist/core/operation_state.d.ts +4 -0
  207. package/dist/core/operation_state.d.ts.map +1 -0
  208. package/dist/core/operation_state.js.map +1 -0
  209. package/dist/core/remote.d.ts +13 -0
  210. package/dist/core/remote.d.ts.map +1 -0
  211. package/dist/core/remote.js +187 -0
  212. package/dist/core/remote.js.map +1 -0
  213. package/dist/core/repository/parsers.d.ts +13 -0
  214. package/dist/core/repository/parsers.d.ts.map +1 -0
  215. package/dist/core/repository/parsers.js +217 -0
  216. package/dist/core/repository/parsers.js.map +1 -0
  217. package/dist/core/repository.d.ts +13 -0
  218. package/dist/core/repository.d.ts.map +1 -0
  219. package/dist/core/repository.js +136 -0
  220. package/dist/core/repository.js.map +1 -0
  221. package/dist/core/run_git/env.d.ts +7 -0
  222. package/dist/core/run_git/env.d.ts.map +1 -0
  223. package/dist/core/run_git/env.js +18 -0
  224. package/dist/core/run_git/env.js.map +1 -0
  225. package/dist/core/run_git/process.d.ts +13 -0
  226. package/dist/core/run_git/process.d.ts.map +1 -0
  227. package/dist/core/run_git/process.js +97 -0
  228. package/dist/core/run_git/process.js.map +1 -0
  229. package/dist/core/run_git/repository_setup.d.ts +20 -0
  230. package/dist/core/run_git/repository_setup.d.ts.map +1 -0
  231. package/dist/core/run_git/repository_setup.js +116 -0
  232. package/dist/core/run_git/repository_setup.js.map +1 -0
  233. package/dist/core/run_git.d.ts +6 -0
  234. package/dist/core/run_git.d.ts.map +1 -0
  235. package/dist/core/run_git.js +6 -0
  236. package/dist/core/run_git.js.map +1 -0
  237. package/dist/core/working_tree/mutate.d.ts +12 -0
  238. package/dist/core/working_tree/mutate.d.ts.map +1 -0
  239. package/dist/core/working_tree/mutate.js +266 -0
  240. package/dist/core/working_tree/mutate.js.map +1 -0
  241. package/dist/core/working_tree/read.d.ts +6 -0
  242. package/dist/core/working_tree/read.d.ts.map +1 -0
  243. package/dist/core/working_tree/read.js +102 -0
  244. package/dist/core/working_tree/read.js.map +1 -0
  245. package/dist/core/working_tree/shared.d.ts +20 -0
  246. package/dist/core/working_tree/shared.d.ts.map +1 -0
  247. package/dist/core/working_tree/shared.js +87 -0
  248. package/dist/core/working_tree/shared.js.map +1 -0
  249. package/dist/core/working_tree.d.ts.map +1 -0
  250. package/dist/core/working_tree.js.map +1 -0
  251. package/dist/errors.d.ts.map +1 -0
  252. package/dist/errors.js.map +1 -0
  253. package/dist/frontend/js/utils/text.d.ts.map +1 -0
  254. package/dist/frontend/js/utils/text.js.map +1 -0
  255. package/dist/http/handler/helpers.d.ts +35 -0
  256. package/dist/http/handler/helpers.d.ts.map +1 -0
  257. package/dist/http/handler/helpers.js +146 -0
  258. package/dist/http/handler/helpers.js.map +1 -0
  259. package/dist/http/handler.d.ts +6 -0
  260. package/dist/http/handler.d.ts.map +1 -0
  261. package/dist/http/handler.js +220 -0
  262. package/dist/http/handler.js.map +1 -0
  263. package/dist/index.d.ts +28 -0
  264. package/dist/index.d.ts.map +1 -0
  265. package/dist/index.js.map +1 -0
  266. package/dist/logging.d.ts.map +1 -0
  267. package/dist/logging.js.map +1 -0
  268. package/dist/ssh/keys.d.ts.map +1 -0
  269. package/dist/ssh/keys.js +41 -0
  270. package/dist/ssh/keys.js.map +1 -0
  271. package/dist/ssh/server/audit.d.ts +5 -0
  272. package/dist/ssh/server/audit.d.ts.map +1 -0
  273. package/dist/ssh/server/audit.js.map +1 -0
  274. package/dist/ssh/server/shared.d.ts +30 -0
  275. package/dist/ssh/server/shared.d.ts.map +1 -0
  276. package/dist/ssh/server/shared.js +93 -0
  277. package/dist/ssh/server/shared.js.map +1 -0
  278. package/dist/ssh/server.d.ts +5 -0
  279. package/dist/ssh/server.d.ts.map +1 -0
  280. package/dist/ssh/server.js +277 -0
  281. package/dist/ssh/server.js.map +1 -0
  282. package/dist/types/common.d.ts.map +1 -0
  283. package/dist/types/common.js.map +1 -0
  284. package/dist/types/forge/activity.d.ts +52 -0
  285. package/dist/types/forge/activity.d.ts.map +1 -0
  286. package/dist/types/forge/activity.js +2 -0
  287. package/dist/types/forge/activity.js.map +1 -0
  288. package/dist/types/forge/api.d.ts +116 -0
  289. package/dist/types/forge/api.d.ts.map +1 -0
  290. package/dist/types/forge/api.js +2 -0
  291. package/dist/types/forge/api.js.map +1 -0
  292. package/dist/types/forge/releases.d.ts +98 -0
  293. package/dist/types/forge/releases.d.ts.map +1 -0
  294. package/dist/types/forge/releases.js +2 -0
  295. package/dist/types/forge/releases.js.map +1 -0
  296. package/dist/types/forge/social_forks.d.ts +51 -0
  297. package/dist/types/forge/social_forks.d.ts.map +1 -0
  298. package/dist/types/forge/social_forks.js +2 -0
  299. package/dist/types/forge/social_forks.js.map +1 -0
  300. package/dist/types/forge/workflows.d.ts +332 -0
  301. package/dist/types/forge/workflows.d.ts.map +1 -0
  302. package/dist/types/forge/workflows.js +2 -0
  303. package/dist/types/forge/workflows.js.map +1 -0
  304. package/dist/types/forge.d.ts +6 -0
  305. package/dist/types/forge.d.ts.map +1 -0
  306. package/dist/types/forge.js.map +1 -0
  307. package/dist/types/host/archive.d.ts.map +1 -0
  308. package/dist/types/host/archive.js.map +1 -0
  309. package/dist/types/host/options.d.ts.map +1 -0
  310. package/dist/types/host/options.js.map +1 -0
  311. package/dist/types/host/service.d.ts.map +1 -0
  312. package/dist/types/host/service.js.map +1 -0
  313. package/dist/types/host.d.ts.map +1 -0
  314. package/dist/types/host.js.map +1 -0
  315. package/dist/types/index.d.ts +6 -0
  316. package/dist/types/index.d.ts.map +1 -0
  317. package/dist/types/index.js.map +1 -0
  318. package/dist/types/repository/archive.d.ts.map +1 -0
  319. package/dist/types/repository/archive.js.map +1 -0
  320. package/dist/types/repository/core.d.ts.map +1 -0
  321. package/dist/types/repository/core.js.map +1 -0
  322. package/dist/types/repository/inspection.d.ts.map +1 -0
  323. package/dist/types/repository/inspection.js.map +1 -0
  324. package/dist/types/repository.d.ts.map +1 -0
  325. package/dist/types/repository.js.map +1 -0
  326. package/dist/types/transports.d.ts.map +1 -0
  327. package/dist/types/transports.js.map +1 -0
  328. package/dist/types.d.ts.map +1 -0
  329. package/dist/types.js.map +1 -0
  330. package/dist/utils/paths.d.ts.map +1 -0
  331. package/dist/utils/paths.js +51 -0
  332. package/dist/utils/paths.js.map +1 -0
  333. package/dist/utils/text.d.ts.map +1 -0
  334. package/dist/utils/text.js.map +1 -0
  335. package/package.json +163 -184
  336. package/dist/browser/styles.css +0 -317
  337. package/dist/internal/api/forge/actions.d.ts +0 -17
  338. package/dist/internal/api/forge/actions.d.ts.map +0 -1
  339. package/dist/internal/api/forge/actions.js +0 -317
  340. package/dist/internal/api/forge/actions.js.map +0 -1
  341. package/dist/internal/api/forge/archives.d.ts +0 -5
  342. package/dist/internal/api/forge/archives.d.ts.map +0 -1
  343. package/dist/internal/api/forge/archives.js +0 -63
  344. package/dist/internal/api/forge/archives.js.map +0 -1
  345. package/dist/internal/api/forge/handler.d.ts +0 -6
  346. package/dist/internal/api/forge/handler.d.ts.map +0 -1
  347. package/dist/internal/api/forge/handler.js +0 -23
  348. package/dist/internal/api/forge/handler.js.map +0 -1
  349. package/dist/internal/api/forge/route.d.ts +0 -73
  350. package/dist/internal/api/forge/route.d.ts.map +0 -1
  351. package/dist/internal/api/forge/route.js +0 -106
  352. package/dist/internal/api/forge/route.js.map +0 -1
  353. package/dist/internal/api/forge/runtime.d.ts +0 -5
  354. package/dist/internal/api/forge/runtime.d.ts.map +0 -1
  355. package/dist/internal/api/forge/runtime.js +0 -181
  356. package/dist/internal/api/forge/runtime.js.map +0 -1
  357. package/dist/internal/api/forge/socket.d.ts +0 -6
  358. package/dist/internal/api/forge/socket.d.ts.map +0 -1
  359. package/dist/internal/api/forge/socket.js +0 -193
  360. package/dist/internal/api/forge/socket.js.map +0 -1
  361. package/dist/internal/api/handler/action.d.ts +0 -5
  362. package/dist/internal/api/handler/action.d.ts.map +0 -1
  363. package/dist/internal/api/handler/action.js +0 -103
  364. package/dist/internal/api/handler/action.js.map +0 -1
  365. package/dist/internal/api/handler/archive.d.ts +0 -43
  366. package/dist/internal/api/handler/archive.d.ts.map +0 -1
  367. package/dist/internal/api/handler/archive.js.map +0 -1
  368. package/dist/internal/api/handler/response.d.ts.map +0 -1
  369. package/dist/internal/api/handler/response.js +0 -100
  370. package/dist/internal/api/handler/response.js.map +0 -1
  371. package/dist/internal/api/handler/route.d.ts.map +0 -1
  372. package/dist/internal/api/handler/route.js +0 -54
  373. package/dist/internal/api/handler/route.js.map +0 -1
  374. package/dist/internal/api/handler/runtime.d.ts +0 -5
  375. package/dist/internal/api/handler/runtime.d.ts.map +0 -1
  376. package/dist/internal/api/handler/runtime.js +0 -187
  377. package/dist/internal/api/handler/runtime.js.map +0 -1
  378. package/dist/internal/api/handler.d.ts +0 -6
  379. package/dist/internal/api/handler.d.ts.map +0 -1
  380. package/dist/internal/api/handler.js.map +0 -1
  381. package/dist/internal/api/routing.d.ts.map +0 -1
  382. package/dist/internal/api/routing.js +0 -35
  383. package/dist/internal/api/routing.js.map +0 -1
  384. package/dist/internal/api/socket/events.d.ts.map +0 -1
  385. package/dist/internal/api/socket/events.js.map +0 -1
  386. package/dist/internal/api/socket/server.d.ts +0 -6
  387. package/dist/internal/api/socket/server.d.ts.map +0 -1
  388. package/dist/internal/api/socket/server.js +0 -164
  389. package/dist/internal/api/socket/server.js.map +0 -1
  390. package/dist/internal/backend/utils/normalize.d.ts.map +0 -1
  391. package/dist/internal/backend/utils/normalize.js.map +0 -1
  392. package/dist/internal/backend/utils/object.d.ts.map +0 -1
  393. package/dist/internal/backend/utils/object.js.map +0 -1
  394. package/dist/internal/backend/utils/time.d.ts.map +0 -1
  395. package/dist/internal/backend/utils/time.js.map +0 -1
  396. package/dist/internal/browser/index.d.ts +0 -78
  397. package/dist/internal/browser/index.d.ts.map +0 -1
  398. package/dist/internal/browser/index.js +0 -1365
  399. package/dist/internal/browser/index.js.map +0 -1
  400. package/dist/internal/constants.d.ts.map +0 -1
  401. package/dist/internal/constants.js.map +0 -1
  402. package/dist/internal/core/activity.d.ts +0 -11
  403. package/dist/internal/core/activity.d.ts.map +0 -1
  404. package/dist/internal/core/activity.js +0 -206
  405. package/dist/internal/core/activity.js.map +0 -1
  406. package/dist/internal/core/archive.d.ts +0 -22
  407. package/dist/internal/core/archive.d.ts.map +0 -1
  408. package/dist/internal/core/archive.js +0 -563
  409. package/dist/internal/core/archive.js.map +0 -1
  410. package/dist/internal/core/archive_cache_filesystem.d.ts +0 -8
  411. package/dist/internal/core/archive_cache_filesystem.d.ts.map +0 -1
  412. package/dist/internal/core/archive_cache_filesystem.js +0 -158
  413. package/dist/internal/core/archive_cache_filesystem.js.map +0 -1
  414. package/dist/internal/core/create/git/forge.d.ts +0 -4
  415. package/dist/internal/core/create/git/forge.d.ts.map +0 -1
  416. package/dist/internal/core/create/git/forge.js +0 -614
  417. package/dist/internal/core/create/git/forge.js.map +0 -1
  418. package/dist/internal/core/create/git/host.d.ts +0 -4
  419. package/dist/internal/core/create/git/host.d.ts.map +0 -1
  420. package/dist/internal/core/create/git/host.js +0 -182
  421. package/dist/internal/core/create/git/host.js.map +0 -1
  422. package/dist/internal/core/create_git_host/branch_methods.d.ts +0 -5
  423. package/dist/internal/core/create_git_host/branch_methods.d.ts.map +0 -1
  424. package/dist/internal/core/create_git_host/branch_methods.js +0 -223
  425. package/dist/internal/core/create_git_host/branch_methods.js.map +0 -1
  426. package/dist/internal/core/create_git_host/content_methods.d.ts +0 -5
  427. package/dist/internal/core/create_git_host/content_methods.d.ts.map +0 -1
  428. package/dist/internal/core/create_git_host/content_methods.js +0 -72
  429. package/dist/internal/core/create_git_host/content_methods.js.map +0 -1
  430. package/dist/internal/core/create_git_host/remote_methods.d.ts +0 -5
  431. package/dist/internal/core/create_git_host/remote_methods.d.ts.map +0 -1
  432. package/dist/internal/core/create_git_host/remote_methods.js +0 -108
  433. package/dist/internal/core/create_git_host/remote_methods.js.map +0 -1
  434. package/dist/internal/core/create_git_host/shared.d.ts +0 -23
  435. package/dist/internal/core/create_git_host/shared.d.ts.map +0 -1
  436. package/dist/internal/core/create_git_host/shared.js +0 -17
  437. package/dist/internal/core/create_git_host/shared.js.map +0 -1
  438. package/dist/internal/core/create_git_host/working_tree_methods.d.ts +0 -5
  439. package/dist/internal/core/create_git_host/working_tree_methods.d.ts.map +0 -1
  440. package/dist/internal/core/create_git_host/working_tree_methods.js +0 -84
  441. package/dist/internal/core/create_git_host/working_tree_methods.js.map +0 -1
  442. package/dist/internal/core/forge_actions.d.ts +0 -36
  443. package/dist/internal/core/forge_actions.d.ts.map +0 -1
  444. package/dist/internal/core/forge_actions.js +0 -730
  445. package/dist/internal/core/forge_actions.js.map +0 -1
  446. package/dist/internal/core/git_forge/storage_memory.d.ts +0 -4
  447. package/dist/internal/core/git_forge/storage_memory.d.ts.map +0 -1
  448. package/dist/internal/core/git_forge/storage_memory.js +0 -329
  449. package/dist/internal/core/git_forge/storage_memory.js.map +0 -1
  450. package/dist/internal/core/inspect/helpers.d.ts +0 -27
  451. package/dist/internal/core/inspect/helpers.d.ts.map +0 -1
  452. package/dist/internal/core/inspect/helpers.js +0 -86
  453. package/dist/internal/core/inspect/helpers.js.map +0 -1
  454. package/dist/internal/core/inspect/icon_theme.d.ts +0 -4
  455. package/dist/internal/core/inspect/icon_theme.d.ts.map +0 -1
  456. package/dist/internal/core/inspect/icon_theme.js +0 -72
  457. package/dist/internal/core/inspect/icon_theme.js.map +0 -1
  458. package/dist/internal/core/inspect/linguist_progress.d.ts +0 -14
  459. package/dist/internal/core/inspect/linguist_progress.d.ts.map +0 -1
  460. package/dist/internal/core/inspect/linguist_progress.js +0 -92
  461. package/dist/internal/core/inspect/linguist_progress.js.map +0 -1
  462. package/dist/internal/core/inspect.d.ts +0 -47
  463. package/dist/internal/core/inspect.d.ts.map +0 -1
  464. package/dist/internal/core/inspect.js +0 -547
  465. package/dist/internal/core/inspect.js.map +0 -1
  466. package/dist/internal/core/inspection.d.ts +0 -11
  467. package/dist/internal/core/inspection.d.ts.map +0 -1
  468. package/dist/internal/core/inspection.js +0 -593
  469. package/dist/internal/core/inspection.js.map +0 -1
  470. package/dist/internal/core/locks.d.ts.map +0 -1
  471. package/dist/internal/core/locks.js.map +0 -1
  472. package/dist/internal/core/operation_state.d.ts +0 -4
  473. package/dist/internal/core/operation_state.d.ts.map +0 -1
  474. package/dist/internal/core/operation_state.js.map +0 -1
  475. package/dist/internal/core/remote.d.ts +0 -13
  476. package/dist/internal/core/remote.d.ts.map +0 -1
  477. package/dist/internal/core/remote.js +0 -187
  478. package/dist/internal/core/remote.js.map +0 -1
  479. package/dist/internal/core/repository/parsers.d.ts +0 -13
  480. package/dist/internal/core/repository/parsers.d.ts.map +0 -1
  481. package/dist/internal/core/repository/parsers.js +0 -204
  482. package/dist/internal/core/repository/parsers.js.map +0 -1
  483. package/dist/internal/core/repository.d.ts +0 -13
  484. package/dist/internal/core/repository.d.ts.map +0 -1
  485. package/dist/internal/core/repository.js +0 -136
  486. package/dist/internal/core/repository.js.map +0 -1
  487. package/dist/internal/core/run_git/env.d.ts +0 -7
  488. package/dist/internal/core/run_git/env.d.ts.map +0 -1
  489. package/dist/internal/core/run_git/env.js +0 -18
  490. package/dist/internal/core/run_git/env.js.map +0 -1
  491. package/dist/internal/core/run_git/process.d.ts +0 -13
  492. package/dist/internal/core/run_git/process.d.ts.map +0 -1
  493. package/dist/internal/core/run_git/process.js +0 -96
  494. package/dist/internal/core/run_git/process.js.map +0 -1
  495. package/dist/internal/core/run_git/repository_setup.d.ts +0 -20
  496. package/dist/internal/core/run_git/repository_setup.d.ts.map +0 -1
  497. package/dist/internal/core/run_git/repository_setup.js +0 -116
  498. package/dist/internal/core/run_git/repository_setup.js.map +0 -1
  499. package/dist/internal/core/run_git.d.ts +0 -6
  500. package/dist/internal/core/run_git.d.ts.map +0 -1
  501. package/dist/internal/core/run_git.js +0 -6
  502. package/dist/internal/core/run_git.js.map +0 -1
  503. package/dist/internal/core/working_tree/mutate.d.ts +0 -12
  504. package/dist/internal/core/working_tree/mutate.d.ts.map +0 -1
  505. package/dist/internal/core/working_tree/mutate.js +0 -266
  506. package/dist/internal/core/working_tree/mutate.js.map +0 -1
  507. package/dist/internal/core/working_tree/read.d.ts +0 -6
  508. package/dist/internal/core/working_tree/read.d.ts.map +0 -1
  509. package/dist/internal/core/working_tree/read.js +0 -108
  510. package/dist/internal/core/working_tree/read.js.map +0 -1
  511. package/dist/internal/core/working_tree/shared.d.ts +0 -20
  512. package/dist/internal/core/working_tree/shared.d.ts.map +0 -1
  513. package/dist/internal/core/working_tree/shared.js +0 -87
  514. package/dist/internal/core/working_tree/shared.js.map +0 -1
  515. package/dist/internal/core/working_tree.d.ts.map +0 -1
  516. package/dist/internal/core/working_tree.js.map +0 -1
  517. package/dist/internal/errors.d.ts.map +0 -1
  518. package/dist/internal/errors.js.map +0 -1
  519. package/dist/internal/frontend/js/utils/text.d.ts.map +0 -1
  520. package/dist/internal/frontend/js/utils/text.js.map +0 -1
  521. package/dist/internal/http/handler/helpers.d.ts +0 -35
  522. package/dist/internal/http/handler/helpers.d.ts.map +0 -1
  523. package/dist/internal/http/handler/helpers.js +0 -146
  524. package/dist/internal/http/handler/helpers.js.map +0 -1
  525. package/dist/internal/http/handler.d.ts +0 -6
  526. package/dist/internal/http/handler.d.ts.map +0 -1
  527. package/dist/internal/http/handler.js +0 -220
  528. package/dist/internal/http/handler.js.map +0 -1
  529. package/dist/internal/index.d.ts +0 -28
  530. package/dist/internal/index.d.ts.map +0 -1
  531. package/dist/internal/index.js.map +0 -1
  532. package/dist/internal/logging.d.ts.map +0 -1
  533. package/dist/internal/logging.js.map +0 -1
  534. package/dist/internal/react/client/error.d.ts +0 -14
  535. package/dist/internal/react/client/error.d.ts.map +0 -1
  536. package/dist/internal/react/client/error.js +0 -32
  537. package/dist/internal/react/client/error.js.map +0 -1
  538. package/dist/internal/react/client/helpers.d.ts +0 -12
  539. package/dist/internal/react/client/helpers.d.ts.map +0 -1
  540. package/dist/internal/react/client/helpers.js +0 -45
  541. package/dist/internal/react/client/helpers.js.map +0 -1
  542. package/dist/internal/react/client/types.d.ts +0 -275
  543. package/dist/internal/react/client/types.d.ts.map +0 -1
  544. package/dist/internal/react/client/types.js.map +0 -1
  545. package/dist/internal/react/client.d.ts +0 -6
  546. package/dist/internal/react/client.d.ts.map +0 -1
  547. package/dist/internal/react/client.js +0 -744
  548. package/dist/internal/react/client.js.map +0 -1
  549. package/dist/internal/react/components.d.ts +0 -44412
  550. package/dist/internal/react/components.d.ts.map +0 -1
  551. package/dist/internal/react/components.js +0 -759
  552. package/dist/internal/react/components.js.map +0 -1
  553. package/dist/internal/react/hooks/query.d.ts +0 -14
  554. package/dist/internal/react/hooks/query.d.ts.map +0 -1
  555. package/dist/internal/react/hooks/query.js +0 -139
  556. package/dist/internal/react/hooks/query.js.map +0 -1
  557. package/dist/internal/react/hooks/resources.d.ts +0 -116
  558. package/dist/internal/react/hooks/resources.d.ts.map +0 -1
  559. package/dist/internal/react/hooks/resources.js +0 -600
  560. package/dist/internal/react/hooks/resources.js.map +0 -1
  561. package/dist/internal/react/hooks/types.d.ts +0 -86
  562. package/dist/internal/react/hooks/types.d.ts.map +0 -1
  563. package/dist/internal/react/hooks/types.js.map +0 -1
  564. package/dist/internal/react/hooks.d.ts +0 -4
  565. package/dist/internal/react/hooks.d.ts.map +0 -1
  566. package/dist/internal/react/hooks.js +0 -3
  567. package/dist/internal/react/hooks.js.map +0 -1
  568. package/dist/internal/react/index.d.ts +0 -8
  569. package/dist/internal/react/index.d.ts.map +0 -1
  570. package/dist/internal/react/index.js +0 -5
  571. package/dist/internal/react/index.js.map +0 -1
  572. package/dist/internal/react/ui/context.d.ts +0 -1918
  573. package/dist/internal/react/ui/context.d.ts.map +0 -1
  574. package/dist/internal/react/ui/context.js +0 -192
  575. package/dist/internal/react/ui/context.js.map +0 -1
  576. package/dist/internal/ssh/keys.d.ts.map +0 -1
  577. package/dist/internal/ssh/keys.js +0 -41
  578. package/dist/internal/ssh/keys.js.map +0 -1
  579. package/dist/internal/ssh/server/audit.d.ts +0 -5
  580. package/dist/internal/ssh/server/audit.d.ts.map +0 -1
  581. package/dist/internal/ssh/server/audit.js.map +0 -1
  582. package/dist/internal/ssh/server/shared.d.ts +0 -30
  583. package/dist/internal/ssh/server/shared.d.ts.map +0 -1
  584. package/dist/internal/ssh/server/shared.js +0 -93
  585. package/dist/internal/ssh/server/shared.js.map +0 -1
  586. package/dist/internal/ssh/server.d.ts +0 -5
  587. package/dist/internal/ssh/server.d.ts.map +0 -1
  588. package/dist/internal/ssh/server.js +0 -277
  589. package/dist/internal/ssh/server.js.map +0 -1
  590. package/dist/internal/types/common.d.ts.map +0 -1
  591. package/dist/internal/types/common.js.map +0 -1
  592. package/dist/internal/types/forge.d.ts +0 -481
  593. package/dist/internal/types/forge.d.ts.map +0 -1
  594. package/dist/internal/types/forge.js.map +0 -1
  595. package/dist/internal/types/host/archive.d.ts.map +0 -1
  596. package/dist/internal/types/host/archive.js.map +0 -1
  597. package/dist/internal/types/host/options.d.ts.map +0 -1
  598. package/dist/internal/types/host/options.js.map +0 -1
  599. package/dist/internal/types/host/service.d.ts.map +0 -1
  600. package/dist/internal/types/host/service.js.map +0 -1
  601. package/dist/internal/types/host.d.ts.map +0 -1
  602. package/dist/internal/types/host.js.map +0 -1
  603. package/dist/internal/types/index.d.ts +0 -6
  604. package/dist/internal/types/index.d.ts.map +0 -1
  605. package/dist/internal/types/index.js.map +0 -1
  606. package/dist/internal/types/repository/archive.d.ts.map +0 -1
  607. package/dist/internal/types/repository/archive.js.map +0 -1
  608. package/dist/internal/types/repository/core.d.ts.map +0 -1
  609. package/dist/internal/types/repository/core.js.map +0 -1
  610. package/dist/internal/types/repository/inspection.d.ts.map +0 -1
  611. package/dist/internal/types/repository/inspection.js.map +0 -1
  612. package/dist/internal/types/repository.d.ts.map +0 -1
  613. package/dist/internal/types/repository.js.map +0 -1
  614. package/dist/internal/types/transports.d.ts.map +0 -1
  615. package/dist/internal/types/transports.js.map +0 -1
  616. package/dist/internal/types.d.ts.map +0 -1
  617. package/dist/internal/types.js +0 -2
  618. package/dist/internal/types.js.map +0 -1
  619. package/dist/internal/utils/paths.d.ts.map +0 -1
  620. package/dist/internal/utils/paths.js +0 -51
  621. package/dist/internal/utils/paths.js.map +0 -1
  622. package/dist/internal/utils/text.d.ts.map +0 -1
  623. package/dist/internal/utils/text.js.map +0 -1
  624. package/dist/src/api/forge/handler.d.ts +0 -2
  625. package/dist/src/api/forge/handler.d.ts.map +0 -1
  626. package/dist/src/api/forge/handler.js +0 -2
  627. package/dist/src/api/forge/handler.js.map +0 -1
  628. package/dist/src/api/forge/route.d.ts +0 -2
  629. package/dist/src/api/forge/route.d.ts.map +0 -1
  630. package/dist/src/api/forge/route.js +0 -2
  631. package/dist/src/api/forge/route.js.map +0 -1
  632. package/dist/src/api/handler/action.d.ts +0 -2
  633. package/dist/src/api/handler/action.d.ts.map +0 -1
  634. package/dist/src/api/handler/action.js +0 -2
  635. package/dist/src/api/handler/action.js.map +0 -1
  636. package/dist/src/api/handler/archive.d.ts +0 -2
  637. package/dist/src/api/handler/archive.d.ts.map +0 -1
  638. package/dist/src/api/handler/archive.js +0 -2
  639. package/dist/src/api/handler/archive.js.map +0 -1
  640. package/dist/src/api/handler/response.d.ts +0 -2
  641. package/dist/src/api/handler/response.d.ts.map +0 -1
  642. package/dist/src/api/handler/response.js +0 -2
  643. package/dist/src/api/handler/response.js.map +0 -1
  644. package/dist/src/api/handler/route.d.ts +0 -2
  645. package/dist/src/api/handler/route.d.ts.map +0 -1
  646. package/dist/src/api/handler/route.js +0 -2
  647. package/dist/src/api/handler/route.js.map +0 -1
  648. package/dist/src/api/handler.d.ts +0 -2
  649. package/dist/src/api/handler.d.ts.map +0 -1
  650. package/dist/src/api/handler.js +0 -2
  651. package/dist/src/api/handler.js.map +0 -1
  652. package/dist/src/api/socket/events.d.ts +0 -2
  653. package/dist/src/api/socket/events.d.ts.map +0 -1
  654. package/dist/src/api/socket/events.js +0 -2
  655. package/dist/src/api/socket/events.js.map +0 -1
  656. package/dist/src/api/socket/server.d.ts +0 -2
  657. package/dist/src/api/socket/server.d.ts.map +0 -1
  658. package/dist/src/api/socket/server.js +0 -2
  659. package/dist/src/api/socket/server.js.map +0 -1
  660. package/dist/src/backend/utils/normalize.d.ts +0 -2
  661. package/dist/src/backend/utils/normalize.d.ts.map +0 -1
  662. package/dist/src/backend/utils/normalize.js +0 -4
  663. package/dist/src/backend/utils/normalize.js.map +0 -1
  664. package/dist/src/backend/utils/object.d.ts +0 -3
  665. package/dist/src/backend/utils/object.d.ts.map +0 -1
  666. package/dist/src/backend/utils/object.js +0 -12
  667. package/dist/src/backend/utils/object.js.map +0 -1
  668. package/dist/src/backend/utils/time.d.ts +0 -3
  669. package/dist/src/backend/utils/time.d.ts.map +0 -1
  670. package/dist/src/backend/utils/time.js +0 -7
  671. package/dist/src/backend/utils/time.js.map +0 -1
  672. package/dist/src/browser/index.d.ts +0 -2
  673. package/dist/src/browser/index.d.ts.map +0 -1
  674. package/dist/src/browser/index.js +0 -2
  675. package/dist/src/browser/index.js.map +0 -1
  676. package/dist/src/constants.d.ts +0 -2
  677. package/dist/src/constants.d.ts.map +0 -1
  678. package/dist/src/constants.js +0 -2
  679. package/dist/src/constants.js.map +0 -1
  680. package/dist/src/core/archive.d.ts +0 -2
  681. package/dist/src/core/archive.d.ts.map +0 -1
  682. package/dist/src/core/archive.js +0 -2
  683. package/dist/src/core/archive.js.map +0 -1
  684. package/dist/src/core/archive_cache_filesystem.d.ts +0 -2
  685. package/dist/src/core/archive_cache_filesystem.d.ts.map +0 -1
  686. package/dist/src/core/archive_cache_filesystem.js +0 -2
  687. package/dist/src/core/archive_cache_filesystem.js.map +0 -1
  688. package/dist/src/core/create/git/forge.d.ts +0 -2
  689. package/dist/src/core/create/git/forge.d.ts.map +0 -1
  690. package/dist/src/core/create/git/forge.js +0 -2
  691. package/dist/src/core/create/git/forge.js.map +0 -1
  692. package/dist/src/core/create/git/host.d.ts +0 -2
  693. package/dist/src/core/create/git/host.d.ts.map +0 -1
  694. package/dist/src/core/create/git/host.js +0 -2
  695. package/dist/src/core/create/git/host.js.map +0 -1
  696. package/dist/src/core/create_git_host/branch_methods.d.ts +0 -2
  697. package/dist/src/core/create_git_host/branch_methods.d.ts.map +0 -1
  698. package/dist/src/core/create_git_host/branch_methods.js +0 -2
  699. package/dist/src/core/create_git_host/branch_methods.js.map +0 -1
  700. package/dist/src/core/create_git_host/content_methods.d.ts +0 -2
  701. package/dist/src/core/create_git_host/content_methods.d.ts.map +0 -1
  702. package/dist/src/core/create_git_host/content_methods.js +0 -2
  703. package/dist/src/core/create_git_host/content_methods.js.map +0 -1
  704. package/dist/src/core/create_git_host/remote_methods.d.ts +0 -2
  705. package/dist/src/core/create_git_host/remote_methods.d.ts.map +0 -1
  706. package/dist/src/core/create_git_host/remote_methods.js +0 -2
  707. package/dist/src/core/create_git_host/remote_methods.js.map +0 -1
  708. package/dist/src/core/create_git_host/shared.d.ts +0 -2
  709. package/dist/src/core/create_git_host/shared.d.ts.map +0 -1
  710. package/dist/src/core/create_git_host/shared.js +0 -2
  711. package/dist/src/core/create_git_host/shared.js.map +0 -1
  712. package/dist/src/core/create_git_host/working_tree_methods.d.ts +0 -2
  713. package/dist/src/core/create_git_host/working_tree_methods.d.ts.map +0 -1
  714. package/dist/src/core/create_git_host/working_tree_methods.js +0 -2
  715. package/dist/src/core/create_git_host/working_tree_methods.js.map +0 -1
  716. package/dist/src/core/git_forge/storage_memory.d.ts +0 -2
  717. package/dist/src/core/git_forge/storage_memory.d.ts.map +0 -1
  718. package/dist/src/core/git_forge/storage_memory.js +0 -2
  719. package/dist/src/core/git_forge/storage_memory.js.map +0 -1
  720. package/dist/src/core/inspect/helpers.d.ts +0 -2
  721. package/dist/src/core/inspect/helpers.d.ts.map +0 -1
  722. package/dist/src/core/inspect/helpers.js +0 -2
  723. package/dist/src/core/inspect/helpers.js.map +0 -1
  724. package/dist/src/core/inspect/icon_theme.d.ts +0 -2
  725. package/dist/src/core/inspect/icon_theme.d.ts.map +0 -1
  726. package/dist/src/core/inspect/icon_theme.js +0 -2
  727. package/dist/src/core/inspect/icon_theme.js.map +0 -1
  728. package/dist/src/core/inspect/linguist_progress.d.ts +0 -2
  729. package/dist/src/core/inspect/linguist_progress.d.ts.map +0 -1
  730. package/dist/src/core/inspect/linguist_progress.js +0 -2
  731. package/dist/src/core/inspect/linguist_progress.js.map +0 -1
  732. package/dist/src/core/inspect.d.ts +0 -2
  733. package/dist/src/core/inspect.d.ts.map +0 -1
  734. package/dist/src/core/inspect.js +0 -2
  735. package/dist/src/core/inspect.js.map +0 -1
  736. package/dist/src/core/inspection.d.ts +0 -2
  737. package/dist/src/core/inspection.d.ts.map +0 -1
  738. package/dist/src/core/inspection.js +0 -2
  739. package/dist/src/core/inspection.js.map +0 -1
  740. package/dist/src/core/locks.d.ts +0 -2
  741. package/dist/src/core/locks.d.ts.map +0 -1
  742. package/dist/src/core/locks.js +0 -2
  743. package/dist/src/core/locks.js.map +0 -1
  744. package/dist/src/core/operation_state.d.ts +0 -2
  745. package/dist/src/core/operation_state.d.ts.map +0 -1
  746. package/dist/src/core/operation_state.js +0 -2
  747. package/dist/src/core/operation_state.js.map +0 -1
  748. package/dist/src/core/remote.d.ts +0 -2
  749. package/dist/src/core/remote.d.ts.map +0 -1
  750. package/dist/src/core/remote.js +0 -2
  751. package/dist/src/core/remote.js.map +0 -1
  752. package/dist/src/core/repository/parsers.d.ts +0 -2
  753. package/dist/src/core/repository/parsers.d.ts.map +0 -1
  754. package/dist/src/core/repository/parsers.js +0 -2
  755. package/dist/src/core/repository/parsers.js.map +0 -1
  756. package/dist/src/core/repository.d.ts +0 -2
  757. package/dist/src/core/repository.d.ts.map +0 -1
  758. package/dist/src/core/repository.js +0 -2
  759. package/dist/src/core/repository.js.map +0 -1
  760. package/dist/src/core/run_git/env.d.ts +0 -2
  761. package/dist/src/core/run_git/env.d.ts.map +0 -1
  762. package/dist/src/core/run_git/env.js +0 -2
  763. package/dist/src/core/run_git/env.js.map +0 -1
  764. package/dist/src/core/run_git/process.d.ts +0 -2
  765. package/dist/src/core/run_git/process.d.ts.map +0 -1
  766. package/dist/src/core/run_git/process.js +0 -2
  767. package/dist/src/core/run_git/process.js.map +0 -1
  768. package/dist/src/core/run_git/repository_setup.d.ts +0 -2
  769. package/dist/src/core/run_git/repository_setup.d.ts.map +0 -1
  770. package/dist/src/core/run_git/repository_setup.js +0 -2
  771. package/dist/src/core/run_git/repository_setup.js.map +0 -1
  772. package/dist/src/core/run_git.d.ts +0 -2
  773. package/dist/src/core/run_git.d.ts.map +0 -1
  774. package/dist/src/core/run_git.js +0 -2
  775. package/dist/src/core/run_git.js.map +0 -1
  776. package/dist/src/core/working_tree/mutate.d.ts +0 -2
  777. package/dist/src/core/working_tree/mutate.d.ts.map +0 -1
  778. package/dist/src/core/working_tree/mutate.js +0 -2
  779. package/dist/src/core/working_tree/mutate.js.map +0 -1
  780. package/dist/src/core/working_tree/read.d.ts +0 -2
  781. package/dist/src/core/working_tree/read.d.ts.map +0 -1
  782. package/dist/src/core/working_tree/read.js +0 -2
  783. package/dist/src/core/working_tree/read.js.map +0 -1
  784. package/dist/src/core/working_tree/shared.d.ts +0 -2
  785. package/dist/src/core/working_tree/shared.d.ts.map +0 -1
  786. package/dist/src/core/working_tree/shared.js +0 -2
  787. package/dist/src/core/working_tree/shared.js.map +0 -1
  788. package/dist/src/core/working_tree.d.ts +0 -2
  789. package/dist/src/core/working_tree.d.ts.map +0 -1
  790. package/dist/src/core/working_tree.js +0 -2
  791. package/dist/src/core/working_tree.js.map +0 -1
  792. package/dist/src/errors.d.ts +0 -2
  793. package/dist/src/errors.d.ts.map +0 -1
  794. package/dist/src/errors.js +0 -2
  795. package/dist/src/errors.js.map +0 -1
  796. package/dist/src/frontend/js/utils/text.d.ts +0 -2
  797. package/dist/src/frontend/js/utils/text.d.ts.map +0 -1
  798. package/dist/src/frontend/js/utils/text.js +0 -4
  799. package/dist/src/frontend/js/utils/text.js.map +0 -1
  800. package/dist/src/http/handler/helpers.d.ts +0 -2
  801. package/dist/src/http/handler/helpers.d.ts.map +0 -1
  802. package/dist/src/http/handler/helpers.js +0 -2
  803. package/dist/src/http/handler/helpers.js.map +0 -1
  804. package/dist/src/http/handler.d.ts +0 -2
  805. package/dist/src/http/handler.d.ts.map +0 -1
  806. package/dist/src/http/handler.js +0 -2
  807. package/dist/src/http/handler.js.map +0 -1
  808. package/dist/src/index.d.ts +0 -2
  809. package/dist/src/index.d.ts.map +0 -1
  810. package/dist/src/index.js +0 -2
  811. package/dist/src/index.js.map +0 -1
  812. package/dist/src/logging.d.ts +0 -2
  813. package/dist/src/logging.d.ts.map +0 -1
  814. package/dist/src/logging.js +0 -2
  815. package/dist/src/logging.js.map +0 -1
  816. package/dist/src/react/client/error.d.ts +0 -2
  817. package/dist/src/react/client/error.d.ts.map +0 -1
  818. package/dist/src/react/client/error.js +0 -2
  819. package/dist/src/react/client/error.js.map +0 -1
  820. package/dist/src/react/client/helpers.d.ts +0 -2
  821. package/dist/src/react/client/helpers.d.ts.map +0 -1
  822. package/dist/src/react/client/helpers.js +0 -2
  823. package/dist/src/react/client/helpers.js.map +0 -1
  824. package/dist/src/react/client/types.d.ts +0 -2
  825. package/dist/src/react/client/types.d.ts.map +0 -1
  826. package/dist/src/react/client/types.js +0 -2
  827. package/dist/src/react/client/types.js.map +0 -1
  828. package/dist/src/react/client.d.ts +0 -2
  829. package/dist/src/react/client.d.ts.map +0 -1
  830. package/dist/src/react/client.js +0 -2
  831. package/dist/src/react/client.js.map +0 -1
  832. package/dist/src/react/components.d.ts +0 -2
  833. package/dist/src/react/components.d.ts.map +0 -1
  834. package/dist/src/react/components.js +0 -2
  835. package/dist/src/react/components.js.map +0 -1
  836. package/dist/src/react/hooks/query.d.ts +0 -2
  837. package/dist/src/react/hooks/query.d.ts.map +0 -1
  838. package/dist/src/react/hooks/query.js +0 -2
  839. package/dist/src/react/hooks/query.js.map +0 -1
  840. package/dist/src/react/hooks/resources.d.ts +0 -2
  841. package/dist/src/react/hooks/resources.d.ts.map +0 -1
  842. package/dist/src/react/hooks/resources.js +0 -2
  843. package/dist/src/react/hooks/resources.js.map +0 -1
  844. package/dist/src/react/hooks/types.d.ts +0 -2
  845. package/dist/src/react/hooks/types.d.ts.map +0 -1
  846. package/dist/src/react/hooks/types.js +0 -2
  847. package/dist/src/react/hooks/types.js.map +0 -1
  848. package/dist/src/react/hooks.d.ts +0 -2
  849. package/dist/src/react/hooks.d.ts.map +0 -1
  850. package/dist/src/react/hooks.js +0 -2
  851. package/dist/src/react/hooks.js.map +0 -1
  852. package/dist/src/react/index.d.ts +0 -2
  853. package/dist/src/react/index.d.ts.map +0 -1
  854. package/dist/src/react/index.js +0 -2
  855. package/dist/src/react/index.js.map +0 -1
  856. package/dist/src/react/ui/context.d.ts +0 -2
  857. package/dist/src/react/ui/context.d.ts.map +0 -1
  858. package/dist/src/react/ui/context.js +0 -2
  859. package/dist/src/react/ui/context.js.map +0 -1
  860. package/dist/src/ssh/keys.d.ts +0 -2
  861. package/dist/src/ssh/keys.d.ts.map +0 -1
  862. package/dist/src/ssh/keys.js +0 -2
  863. package/dist/src/ssh/keys.js.map +0 -1
  864. package/dist/src/ssh/server/audit.d.ts +0 -2
  865. package/dist/src/ssh/server/audit.d.ts.map +0 -1
  866. package/dist/src/ssh/server/audit.js +0 -2
  867. package/dist/src/ssh/server/audit.js.map +0 -1
  868. package/dist/src/ssh/server/shared.d.ts +0 -2
  869. package/dist/src/ssh/server/shared.d.ts.map +0 -1
  870. package/dist/src/ssh/server/shared.js +0 -2
  871. package/dist/src/ssh/server/shared.js.map +0 -1
  872. package/dist/src/ssh/server.d.ts +0 -2
  873. package/dist/src/ssh/server.d.ts.map +0 -1
  874. package/dist/src/ssh/server.js +0 -2
  875. package/dist/src/ssh/server.js.map +0 -1
  876. package/dist/src/types/common.d.ts +0 -2
  877. package/dist/src/types/common.d.ts.map +0 -1
  878. package/dist/src/types/common.js +0 -2
  879. package/dist/src/types/common.js.map +0 -1
  880. package/dist/src/types/forge.d.ts +0 -2
  881. package/dist/src/types/forge.d.ts.map +0 -1
  882. package/dist/src/types/forge.js +0 -2
  883. package/dist/src/types/forge.js.map +0 -1
  884. package/dist/src/types/host.d.ts +0 -2
  885. package/dist/src/types/host.d.ts.map +0 -1
  886. package/dist/src/types/host.js +0 -2
  887. package/dist/src/types/host.js.map +0 -1
  888. package/dist/src/types/index.d.ts +0 -2
  889. package/dist/src/types/index.d.ts.map +0 -1
  890. package/dist/src/types/index.js +0 -2
  891. package/dist/src/types/index.js.map +0 -1
  892. package/dist/src/types/repository.d.ts +0 -2
  893. package/dist/src/types/repository.d.ts.map +0 -1
  894. package/dist/src/types/repository.js +0 -2
  895. package/dist/src/types/repository.js.map +0 -1
  896. package/dist/src/types/transports.d.ts +0 -2
  897. package/dist/src/types/transports.d.ts.map +0 -1
  898. package/dist/src/types/transports.js +0 -2
  899. package/dist/src/types/transports.js.map +0 -1
  900. package/dist/src/types.d.ts +0 -2
  901. package/dist/src/types.d.ts.map +0 -1
  902. package/dist/src/types.js +0 -2
  903. package/dist/src/types.js.map +0 -1
  904. package/dist/src/utils/paths.d.ts +0 -2
  905. package/dist/src/utils/paths.d.ts.map +0 -1
  906. package/dist/src/utils/paths.js +0 -2
  907. package/dist/src/utils/paths.js.map +0 -1
  908. package/dist/src/utils/text.d.ts +0 -2
  909. package/dist/src/utils/text.d.ts.map +0 -1
  910. package/dist/src/utils/text.js +0 -2
  911. package/dist/src/utils/text.js.map +0 -1
  912. /package/dist/{internal/api → api}/handler/archive.js +0 -0
  913. /package/dist/{internal/api → api}/handler/response.d.ts +0 -0
  914. /package/dist/{internal/api → api}/handler/route.d.ts +0 -0
  915. /package/dist/{internal/api → api}/handler.js +0 -0
  916. /package/dist/{internal/api → api}/routing.d.ts +0 -0
  917. /package/dist/{internal/api → api}/socket/events.d.ts +0 -0
  918. /package/dist/{internal/api → api}/socket/events.js +0 -0
  919. /package/dist/{internal/backend → backend}/utils/normalize.d.ts +0 -0
  920. /package/dist/{internal/backend → backend}/utils/normalize.js +0 -0
  921. /package/dist/{internal/backend → backend}/utils/object.d.ts +0 -0
  922. /package/dist/{internal/backend → backend}/utils/object.js +0 -0
  923. /package/dist/{internal/backend → backend}/utils/time.d.ts +0 -0
  924. /package/dist/{internal/backend → backend}/utils/time.js +0 -0
  925. /package/dist/{internal/constants.d.ts → constants.d.ts} +0 -0
  926. /package/dist/{internal/constants.js → constants.js} +0 -0
  927. /package/dist/{internal/react/client → core/actions}/types.js +0 -0
  928. /package/dist/{internal/core → core}/locks.d.ts +0 -0
  929. /package/dist/{internal/core → core}/locks.js +0 -0
  930. /package/dist/{internal/core → core}/operation_state.js +0 -0
  931. /package/dist/{internal/core → core}/working_tree.d.ts +0 -0
  932. /package/dist/{internal/core → core}/working_tree.js +0 -0
  933. /package/dist/{internal/errors.d.ts → errors.d.ts} +0 -0
  934. /package/dist/{internal/errors.js → errors.js} +0 -0
  935. /package/dist/{internal/frontend → frontend}/js/utils/text.d.ts +0 -0
  936. /package/dist/{internal/frontend → frontend}/js/utils/text.js +0 -0
  937. /package/dist/{internal/index.js → index.js} +0 -0
  938. /package/dist/{internal/logging.d.ts → logging.d.ts} +0 -0
  939. /package/dist/{internal/logging.js → logging.js} +0 -0
  940. /package/dist/{internal/ssh → ssh}/keys.d.ts +0 -0
  941. /package/dist/{internal/ssh → ssh}/server/audit.js +0 -0
  942. /package/dist/{internal/types → types}/common.d.ts +0 -0
  943. /package/dist/{internal/types → types}/common.js +0 -0
  944. /package/dist/{internal/types → types}/forge.js +0 -0
  945. /package/dist/{internal/types → types}/host/archive.d.ts +0 -0
  946. /package/dist/{internal/types → types}/host/archive.js +0 -0
  947. /package/dist/{internal/types → types}/host/options.d.ts +0 -0
  948. /package/dist/{internal/types → types}/host/options.js +0 -0
  949. /package/dist/{internal/types → types}/host/service.d.ts +0 -0
  950. /package/dist/{internal/types → types}/host/service.js +0 -0
  951. /package/dist/{internal/types → types}/host.d.ts +0 -0
  952. /package/dist/{internal/types → types}/host.js +0 -0
  953. /package/dist/{internal/types → types}/index.js +0 -0
  954. /package/dist/{internal/types → types}/repository/archive.d.ts +0 -0
  955. /package/dist/{internal/types → types}/repository/archive.js +0 -0
  956. /package/dist/{internal/types → types}/repository/core.d.ts +0 -0
  957. /package/dist/{internal/types → types}/repository/core.js +0 -0
  958. /package/dist/{internal/types → types}/repository/inspection.d.ts +0 -0
  959. /package/dist/{internal/types → types}/repository/inspection.js +0 -0
  960. /package/dist/{internal/types → types}/repository.d.ts +0 -0
  961. /package/dist/{internal/types → types}/repository.js +0 -0
  962. /package/dist/{internal/types → types}/transports.d.ts +0 -0
  963. /package/dist/{internal/types → types}/transports.js +0 -0
  964. /package/dist/{internal/types.d.ts → types.d.ts} +0 -0
  965. /package/dist/{internal/react/hooks/types.js → types.js} +0 -0
  966. /package/dist/{internal/utils → utils}/paths.d.ts +0 -0
  967. /package/dist/{internal/utils → utils}/text.d.ts +0 -0
  968. /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+.
21
+ Runtime support:
22
+
23
+ - Node.js 18+
24
+ - Bun 1+
25
+ - `git` available on the host
23
26
 
24
27
  ```sh
25
28
  npm install @trebired/git-host
26
29
  ```
27
30
 
28
- ```sh
29
- npm install @trebired/logger
30
- ```
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.
31
32
 
32
- Optional React companion:
33
-
34
- ```sh
35
- npm install react
36
- ```
37
-
38
- Optional browser pages:
39
-
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,492 @@ 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:
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.
170
78
 
171
- ```ts
172
- import { createServer } from "node:http";
173
- import { createGitHost, createGitHttpHandler } from "@trebired/git-host";
174
- import { createLog } from "@trebired/logger";
79
+ ### Workflow File
175
80
 
176
- const log = createLog({
177
- console: true,
178
- quiet: true,
179
- save: false,
180
- });
81
+ `git-host` now supports two workflow formats:
181
82
 
182
- const gitHost = createGitHost({
183
- resolveRepository(repositoryId) {
184
- return {
185
- id: repositoryId,
186
- path: `/srv/git-workspaces/${repositoryId}/workspace`,
187
- };
188
- },
189
- });
83
+ - legacy flat shell workflows for backward compatibility
84
+ - a documented GitHub-Actions-inspired subset for multi-job CI and publish pipelines
190
85
 
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
- }));
86
+ Legacy workflows still work:
201
87
 
202
- server.listen(3000);
88
+ ```yaml
89
+ name: Build and test
90
+ trigger: push
91
+ source:
92
+ branches:
93
+ - main
94
+ steps:
95
+ - name: Install
96
+ run: bun install
97
+ - name: Test
98
+ run: bun test
99
+ - name: Build
100
+ run: bun run build
203
101
  ```
204
102
 
205
- Then clients can use:
103
+ Supported trigger values in v1:
104
+
105
+ - `push`
106
+ - `release.create`
107
+ - `release.update`
108
+ - `manual`
109
+
110
+ The richer subset uses `on`, `jobs`, `needs`, matrix strategy, expressions, built-in `uses:` adapters, artifacts, and concurrency:
111
+
112
+ ```yaml
113
+ name: Package publish
114
+ on:
115
+ workflow_dispatch:
116
+ inputs:
117
+ publish:
118
+ type: boolean
119
+ default: false
120
+ target_ref:
121
+ type: string
122
+ required: true
123
+ push:
124
+ tags:
125
+ - v*
126
+ env:
127
+ BUILD_DIR: dist
128
+ concurrency:
129
+ group: publish-${{ github.ref }}
130
+ cancel-in-progress: true
131
+ permissions:
132
+ contents: read
133
+ packages: write
134
+ jobs:
135
+ build:
136
+ runs-on: ubuntu-latest
137
+ strategy:
138
+ matrix:
139
+ target:
140
+ - linux
141
+ - darwin
142
+ steps:
143
+ - uses: actions/checkout@v4
144
+ - uses: oven-sh/setup-bun@v2
145
+ - run: bun install --frozen-lockfile
146
+ - run: |
147
+ mkdir -p "${BUILD_DIR}"
148
+ printf '%s\n' "${{ matrix.target }}" > "${BUILD_DIR}/${{ matrix.target }}.txt"
149
+ - uses: actions/upload-artifact@v4
150
+ with:
151
+ name: build-${{ matrix.target }}
152
+ path: dist/${{ matrix.target }}.txt
153
+
154
+ publish:
155
+ needs: build
156
+ runs-on: ubuntu-latest
157
+ if: ${{ needs.build.result == 'success' }}
158
+ steps:
159
+ - uses: actions/download-artifact@v4
160
+ with:
161
+ name: build-linux
162
+ path: publish-assets
163
+ - name: Publish
164
+ env:
165
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
166
+ run: |
167
+ test -n "${NPM_TOKEN}"
168
+ ls -R publish-assets
169
+ printf 'publishing from %s\n' "${{ github.ref }}"
170
+ - uses: actions/publish-release-asset@v1
171
+ with:
172
+ name: mytool-linux-x64
173
+ path: publish-assets
174
+ format: tar.gz
175
+ ```
206
176
 
207
- ```sh
208
- git clone http://127.0.0.1:3000/git/demo.git
209
- git push
177
+ Supported subset:
178
+
179
+ - top-level `name`, `on`, `env`, `permissions`, and `concurrency`
180
+ - `on.workflow_dispatch.inputs` with `string` and `boolean` types, defaults, and required flags
181
+ - `on.push.branches` and `on.push.tags` with exact matches or `*` wildcards
182
+ - multiple `jobs`
183
+ - per-job `name`, `runs-on`, `needs`, `if`, `env`, `strategy.matrix`, and `steps`
184
+ - shell steps with `run`
185
+ - built-in `uses:` handlers for:
186
+ - `actions/checkout@v4`
187
+ - `actions/setup-node@v4`
188
+ - `oven-sh/setup-bun@v2`
189
+ - `actions/upload-artifact@v4`
190
+ - `actions/download-artifact@v4`
191
+ - `actions/publish-release-asset@v1` (no GitHub equivalent — see below)
192
+ - expressions in common places such as env values, `if`, shell commands, concurrency groups, and built-in action `with` values
193
+ - expression contexts:
194
+ - `github.ref`
195
+ - `github.ref_name`
196
+ - `github.event_name`
197
+ - `github.event.inputs.<name>`
198
+ - `matrix.<name>`
199
+ - `secrets.<name>`
200
+ - `env.<name>`
201
+ - `job.status`
202
+ - `needs.<job>.result`
203
+
204
+ ### Publishing Release Assets
205
+
206
+ `actions/publish-release-asset@v1` compresses a downloaded/checked-out path into a real
207
+ `.tar.gz` or `.zip` and attaches it to a release as a `GitForgeReleaseAsset` with a
208
+ `storage_pointer` your host's `releaseAssetStore.openAssetDownload()` resolves at
209
+ download time — the same asset shape and download path the release API already
210
+ serves. GitHub Actions has no built-in equivalent for this (you'd reach for a
211
+ marketplace action like `softprops/action-gh-release`); this is an intentional
212
+ Operlorn-only addition, not an attempt to mirror GitHub syntax for something GitHub
213
+ doesn't ship itself.
214
+
215
+ ```yaml
216
+ - uses: actions/publish-release-asset@v1
217
+ with:
218
+ name: mytool-linux-x64 # required; archive extension is added automatically
219
+ path: dist/linux # required; file or directory, relative to the workspace
220
+ format: tar.gz # optional, "tar.gz" (default) or "zip"
221
+ tag: v1.2.3 # optional; defaults to github.ref_name
210
222
  ```
211
223
 
212
- SSH hosting:
224
+ The target release must already exist — this step does not create one. Resolution
225
+ order: `with.tag` if given, else the run's `release_id` (set automatically when the
226
+ workflow was triggered by `release.create`), else a release matching `with.tag`/
227
+ `github.ref_name` by `tag_name`. If none is found, the step fails with a clear error
228
+ rather than guessing at release metadata (author, target ref, draft state) that
229
+ belongs to the proper release-creation flow. Successful publishes emit a
230
+ `release_asset.published` run event.
213
231
 
214
- ```ts
215
- import { createGitSshServer } from "@trebired/git-host";
216
- import { createLog } from "@trebired/logger";
232
+ Intentional differences from GitHub Actions:
217
233
 
218
- const log = createLog({
219
- console: true,
220
- quiet: true,
221
- save: false,
222
- });
234
+ - this is not a full marketplace runner
235
+ - only the built-in `uses:` adapters above are supported
236
+ - unsupported `runs-on` labels fail clearly instead of pretending to be available
237
+ - matrix jobs run sequentially on the local runner in v1
238
+ - secrets are injected for expressions and runtime env, then redacted from streamed and persisted logs
239
+ - service containers and arbitrary marketplace actions are not supported in v1
223
240
 
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
- };
236
- },
237
- resolveRepository(repositoryKey) {
238
- return {
239
- id: repositoryKey,
240
- path: `/srv/git-workspaces/${repositoryKey}/workspace`,
241
- };
242
- },
243
- });
241
+ 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:
244
242
 
245
- sshServer.listen(2222, "0.0.0.0");
243
+ ```text
244
+ .git-host/workflows/build.yml
246
245
  ```
247
246
 
248
- Then clients can use:
247
+ ### Custom Workflow Root
249
248
 
250
- ```sh
251
- git clone ssh://git@127.0.0.1:2222/demo.git
252
- git push
253
- ```
254
-
255
- JSON API hosting:
249
+ The root folder is configurable. The folder name does not have to stay `.git-host`.
256
250
 
257
251
  ```ts
258
- import { createServer } from "node:http";
259
- import { createGitApiHandler, createGitApiSocketServer, createGitHost } from "@trebired/git-host";
260
- import { createLog } from "@trebired/logger";
252
+ import { createGitForge } from "@trebired/git-host";
261
253
 
262
- const log = createLog({
263
- console: true,
264
- quiet: true,
265
- save: false,
266
- });
267
-
268
- const gitHost = createGitHost({
269
- resolveRepository(repositoryId) {
254
+ const forge = createGitForge({
255
+ actions: {
256
+ workflowRoot: ".ci",
257
+ },
258
+ createForkRepository({ upstreamRepositoryId }) {
270
259
  return {
271
- id: repositoryId,
272
- path: `/srv/git-workspaces/${repositoryId}/workspace`,
260
+ id: `${upstreamRepositoryId}-fork`,
261
+ path: resolveRepositoryPath({
262
+ rootDir: repositoriesRoot,
263
+ repositoryPath: `${upstreamRepositoryId}-fork/workspace`,
264
+ }),
273
265
  };
274
266
  },
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);
283
- },
284
- }));
285
-
286
- createGitApiSocketServer({
287
- basePath: "/api/git",
288
267
  gitHost,
289
- httpServer: apiServer,
290
- logger: log,
291
- authorize({ action, repositoryId }) {
292
- return canReadRepository(repositoryId, action);
293
- },
268
+ storage,
294
269
  });
295
-
296
- apiServer.listen(3100);
297
- ```
298
-
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
270
  ```
319
271
 
320
- ## Source Archives
321
-
322
- git-host now exposes GitHub-style source archive downloads for branches, tags, commit SHAs, and forge releases.
323
-
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.
328
-
329
- Archives are always generated from Git objects with `git archive`, never from the checked-out working tree.
330
-
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.
335
-
336
- Default behavior:
272
+ That makes the workflow layout:
337
273
 
338
- ```ts
339
- const archive = await gitHost.readArchive("demo", {
340
- format: "zip",
341
- ref: "main",
342
- });
343
-
344
- console.log(archive.file_name);
345
- // demo-main.zip
346
-
347
- const links = gitHost.resolveArchiveLinks("demo", {
348
- basePath: "/api/git",
349
- ref: "main",
350
- });
351
-
352
- console.log(links.zip.href);
353
- // /api/git/repositories/demo/zipball/main
274
+ ```text
275
+ <repository-worktree>/
276
+ .ci/
277
+ workflows/
278
+ build.yml
354
279
  ```
355
280
 
356
- Custom archive filename and root directory behavior:
281
+ You can also resolve the workflow root per repository:
357
282
 
358
283
  ```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) {
373
- return {
374
- id: repositoryId,
375
- path: `/srv/git-workspaces/${repositoryId}/workspace`,
376
- };
284
+ actions: {
285
+ async resolveWorkflowRoot(repositoryId) {
286
+ return repositoryId.startsWith("legacy-") ? ".ci" : ".git-host";
377
287
  },
378
- });
379
-
380
- const preview = await gitHost.resolveArchive("demo", {
381
- format: "tar.gz",
382
- ref: "v1",
383
- });
384
-
385
- console.log(preview.file_name);
386
- console.log(preview.root_directory);
387
- ```
388
-
389
- You can also override the outer filename or root directory per call without changing host defaults:
390
-
391
- ```ts
392
- const releaseZip = await gitHost.openArchive("demo", {
393
- fileName: "demo-release.zip",
394
- format: "zip",
395
- ref: "v1",
396
- rootDirectory: "demo-release/",
397
- });
288
+ }
398
289
  ```
399
290
 
400
- Custom archive URL generation for host-owned routes:
291
+ ## Actions Execution
292
+
293
+ Workflow runs are persistent and repository-owned:
294
+
295
+ - workflows are loaded from the triggering ref/commit
296
+ - each run materializes an exact snapshot for that ref/commit
297
+ - jobs and matrix children execute from staged snapshot workspaces, never from a dirty live working tree
298
+ - jobs honor `needs` ordering
299
+ - steps run sequentially inside each job
300
+ - stdout and stderr are captured and persisted
301
+ - host-provided env and secrets can be merged into the execution context
302
+ - named artifacts can be uploaded in one job and downloaded in dependent jobs
303
+ - live run events are streamed over Socket.IO
304
+ - queued/running runs can be cancelled
305
+ - workflow concurrency groups can block or cancel overlapping runs
306
+
307
+ The runtime emits persisted run events such as:
308
+
309
+ - `run.accepted`
310
+ - `run.cancellation_requested`
311
+ - `run.status`
312
+ - `job.started`
313
+ - `job.output`
314
+ - `job.heartbeat`
315
+ - `job.finished`
316
+ - `step.started`
317
+ - `step.output`
318
+ - `step.heartbeat`
319
+ - `step.finished`
320
+ - `artifact.uploaded`
321
+ - `artifact.downloaded`
322
+ - `release_asset.published`
323
+ - `run.finished`
324
+ - `run.failed`
325
+ - `run.cancelled`
326
+
327
+ ### Host Context And Redaction
328
+
329
+ Hosts can inject per-repository execution context through `actions.resolveExecutionContext()`:
401
330
 
402
331
  ```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}`;
332
+ const forge = createGitForge({
333
+ actions: {
334
+ async resolveExecutionContext({ repositoryId, triggerKind, workflow }) {
335
+ return {
336
+ actor: {
337
+ id: "ci-bot",
338
+ },
339
+ env: {
340
+ CI: "true",
341
+ REPOSITORY_ID: repositoryId,
342
+ },
343
+ metadata: {
344
+ trigger_kind: triggerKind,
345
+ workflow_name: workflow.name,
346
+ },
347
+ secrets: {
348
+ NPM_TOKEN: process.env.NPM_TOKEN || "",
349
+ },
350
+ };
408
351
  },
409
352
  },
410
- resolveRepository(repositoryId) {
353
+ createForkRepository({ upstreamRepositoryId }) {
411
354
  return {
412
- id: repositoryId,
413
- path: `/srv/git-workspaces/${repositoryId}/workspace`,
355
+ id: `${upstreamRepositoryId}-fork`,
356
+ path: resolveRepositoryPath({
357
+ rootDir: repositoriesRoot,
358
+ repositoryPath: `${upstreamRepositoryId}-fork/workspace`,
359
+ }),
414
360
  };
415
361
  },
362
+ gitHost,
363
+ storage,
416
364
  });
417
-
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
365
  ```
425
366
 
426
- Host-owned download route with the exported response helper:
367
+ Runtime env merge order:
427
368
 
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
- ```
369
+ - base process env
370
+ - static `actions.env`
371
+ - host-provided execution env
372
+ - workflow `env`
373
+ - job `env`
374
+ - step `env`
464
375
 
465
- `writeGitArchiveResponse()` applies the correct `content-type`, `content-disposition`, `content-length` when known, redirect handling, and `HEAD` semantics for either `readArchive()` or `openArchive()` results.
376
+ Secrets are available to expressions and the runtime env, but their values are redacted from:
466
377
 
467
- ### Releases, Tags, and Assets
378
+ - live socket output
379
+ - persisted event payloads
380
+ - step output previews
468
381
 
469
- A forge release is metadata attached to a Git tag. Its automatic source archives are not uploaded assets.
382
+ ### Workflow APIs
470
383
 
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`.
384
+ The forge API exposes:
475
385
 
476
- Uploaded release assets have matching host ergonomics:
386
+ - list workflows
387
+ - read a workflow definition
388
+ - manually run a workflow with `inputs`, `env`, `secrets`, and trigger context
389
+ - cancel a workflow run
390
+ - list workflow runs
391
+ - read a workflow run
392
+ - list job runs
393
+ - list step runs
394
+ - list run artifacts
395
+ - list run events
396
+ - subscribe to live run events over Socket.IO
477
397
 
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.
398
+ The HTTP API keeps the existing routes and adds run sub-collections such as:
481
399
 
482
- ```ts
483
- const assetLink = await forge.resolveReleaseAssetLink("demo", release.id, asset.id, {
484
- repositoryKey: "acme/demo",
485
- });
400
+ - `GET /repositories/:repositoryKey/actions/runs/:runId/jobs`
401
+ - `GET /repositories/:repositoryKey/actions/runs/:runId/steps`
402
+ - `GET /repositories/:repositoryKey/actions/runs/:runId/artifacts`
486
403
 
487
- console.log(assetLink.href);
404
+ ## Activity Integration
488
405
 
489
- const assetDownload = await forge.openReleaseAsset("demo", release.id, asset.id, {
490
- repositoryKey: "acme/demo",
491
- });
492
- ```
406
+ Repository activity is normalized and repository-owned. Activity entries are returned through the repository activity API and can be used to trigger workflows.
493
407
 
494
- ### Cache Behavior
408
+ Examples of normalized kinds:
495
409
 
496
- The built-in archive service prefers on-demand generation plus cache.
410
+ - `repository.push`
411
+ - `repository.pull`
412
+ - `repository.fetch`
413
+ - `release.create`
414
+ - `release.update`
415
+ - `release.delete`
416
+ - `repository.fork.create`
417
+ - `repository.fork.sync`
418
+ - `repository.star`
419
+ - `repository.unstar`
420
+ - `repository.watch`
421
+ - `repository.unwatch`
497
422
 
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.
423
+ Push-triggered Actions can be created from:
503
424
 
504
- ### Security Notes
425
+ - smart HTTP pushes
426
+ - SSH pushes
427
+ - programmatic host/forge push operations
505
428
 
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.
429
+ ## Smart HTTP And SSH
510
430
 
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.
431
+ ### HTTP
538
432
 
539
433
  ```ts
540
- import {
541
- GitRepositoryOverviewPage,
542
- createGitRepositoryRouteAdapter,
543
- } from "@trebired/git-host/browser";
434
+ import { createServer } from "node:http";
435
+ import { createGitHttpHandler } from "@trebired/git-host";
544
436
 
545
- const routeAdapter = createGitRepositoryRouteAdapter({
546
- repositoryBasePath: "/workspaces",
547
- });
437
+ const server = createServer(createGitHttpHandler({
438
+ basePath: "/git",
439
+ resolveRepository(repositoryKey) {
440
+ return {
441
+ id: repositoryKey,
442
+ path: `/srv/git-workspaces/${repositoryKey}/workspace`,
443
+ };
444
+ },
445
+ }));
548
446
 
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
- }
447
+ server.listen(3000);
585
448
  ```
586
449
 
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:
450
+ ### SSH
590
451
 
591
452
  ```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
- });
453
+ import { createGitSshServer } from "@trebired/git-host";
607
454
 
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
- }
455
+ const server = createGitSshServer({
456
+ hostKeys: [process.env.GIT_HOST_SSH_KEY || ""],
457
+ resolveRepository(repositoryKey) {
458
+ return {
459
+ id: repositoryKey,
460
+ path: `/srv/git-workspaces/${repositoryKey}/workspace`,
461
+ };
462
+ },
463
+ });
630
464
 
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
- }
465
+ server.listen(2222);
651
466
  ```
652
467
 
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:
468
+ ## Forge Layer
656
469
 
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
- ```
679
-
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`
470
+ Use `createGitForge()` when you want repository releases, forks, activity, social state, and Actions on top of the Git host:
738
471
 
739
472
  ```ts
740
473
  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
474
+ createGitForge,
475
+ createGitForgeActivityRecorder,
476
+ createInMemoryGitForgeStorageAdapter,
477
+ createGitHost,
478
+ } from "@trebired/git-host";
778
479
 
779
- Both `browser` and `react` use a package-owned route adapter:
780
-
781
- ```ts
782
- import { createGitRepositoryRouteAdapter } from "@trebired/git-host/react";
783
-
784
- const routes = createGitRepositoryRouteAdapter({
785
- repositoryBasePath: "/repos",
480
+ const storage = createInMemoryGitForgeStorageAdapter();
481
+ const activity = createGitForgeActivityRecorder({
482
+ storage: storage.activity,
786
483
  });
787
484
 
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",
485
+ const gitHost = createGitHost({
486
+ activity,
487
+ resolveRepository(repositoryId) {
488
+ return {
489
+ id: repositoryId,
490
+ path: `/srv/git-workspaces/${repositoryId}/workspace`,
491
+ };
492
+ },
819
493
  });
820
494
 
821
- const socket = gitClient.openLinguistSocket("demo", {
822
- ref: "main",
823
- onProgress(event) {
824
- console.log(event.stage, event.percent);
495
+ const forge = createGitForge({
496
+ actions: {
497
+ workflowRoot: ".git-host",
498
+ workspaceRoot: "/srv/git-actions-workspaces",
499
+ // Separate from workspaceRoot: published release assets must outlive the run
500
+ // (and any per-run workspace cleanup) that produced them.
501
+ releaseAssetsRoot: "/srv/git-release-assets",
825
502
  },
826
- onResult(event) {
827
- console.log(event.data.languages.results);
503
+ createForkRepository({ upstreamRepositoryId }) {
504
+ return {
505
+ id: `${upstreamRepositoryId}-fork`,
506
+ path: `/srv/git-workspaces/${upstreamRepositoryId}-fork/workspace`,
507
+ };
828
508
  },
509
+ gitHost,
510
+ storage,
829
511
  });
830
-
831
- await socket.completed;
832
512
  ```
833
513
 
834
- ## Current API
514
+ ## JSON API And Live Sockets
835
515
 
836
- The package now exposes three main frontend/backend layers:
516
+ The package exposes backend API helpers:
837
517
 
838
- - `createGitHost()`
839
- - `createGitForge()`
840
- - `resolveRepositoryPath()`
841
- - `runGit()`
842
- - `buildGitEnv()`
843
- - `RepositoryLockManager`
844
518
  - `createGitApiHandler()`
845
519
  - `createGitForgeApiHandler()`
846
520
  - `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.
521
+ - `createGitForgeSocketServer()`
1026
522
 
1027
- The package is meant to replace or simplify:
523
+ 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
524
 
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
- ```
525
+ ## Packaging
1124
526
 
1125
- If no logger is provided and `@trebired/logger` is not installed, git-host falls back to plain `console` output for its own diagnostics.
527
+ The npm package ships:
1126
528
 
1127
- ## Roadmap
529
+ - the backend TypeScript runtime
530
+ - packaged Actions runner binaries under `bin/`
531
+ - no browser or React entrypoints
1128
532
 
1129
- The remaining package work is mostly convenience and hardening:
533
+ Repository Actions workflow binaries are built in CI for:
1130
534
 
1131
- - thin Express wrappers when they stay truly thin
1132
- - broader examples for host-app integration patterns
535
+ - Linux x64 GNU
536
+ - Linux arm64 GNU
537
+ - macOS x64
538
+ - macOS arm64
1133
539
 
1134
- ## Contributing
540
+ ## License
1135
541
 
1136
- See `CONTRIBUTING.md` for development commands and package guidelines.
542
+ MIT