gitspace 0.2.0-rc.20 → 0.2.0-rc.21

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 (474) hide show
  1. package/package.json +11 -6
  2. package/.claude/settings.local.json +0 -10
  3. package/.gitspace/bundle.json +0 -50
  4. package/.gitspace/events.json +0 -11
  5. package/.gitspace/processes.json +0 -23
  6. package/.gitspace/scripts/select/01-status.sh +0 -39
  7. package/.gitspace/scripts/setup/01-install-deps.sh +0 -12
  8. package/.gitspace/scripts/setup/02-typecheck.sh +0 -16
  9. package/AGENTS.md +0 -469
  10. package/CLAUDE.md +0 -1
  11. package/bun.lock +0 -794
  12. package/docs/CONNECTION.md +0 -623
  13. package/docs/GATEWAY-WORKER.md +0 -319
  14. package/docs/GETTING-STARTED.md +0 -448
  15. package/docs/GITSPACE-PLATFORM.md +0 -1819
  16. package/docs/INFRASTRUCTURE.md +0 -1347
  17. package/docs/PROTOCOL.md +0 -619
  18. package/docs/QUICKSTART.md +0 -183
  19. package/docs/RELAY.md +0 -327
  20. package/docs/REMOTE-DESIGN.md +0 -554
  21. package/docs/ROADMAP.md +0 -564
  22. package/docs/SITE_DOCS_FIGMA_MAKE.md +0 -1176
  23. package/docs/STACK-DESIGN.md +0 -588
  24. package/docs/UNIFIED_ARCHITECTURE.md +0 -138
  25. package/experiments/pty-benchmark.ts +0 -148
  26. package/experiments/pty-latency.ts +0 -100
  27. package/experiments/router/client.ts +0 -199
  28. package/experiments/router/protocol.ts +0 -74
  29. package/experiments/router/router.ts +0 -217
  30. package/experiments/router/session.ts +0 -180
  31. package/experiments/router/test.ts +0 -133
  32. package/experiments/socket-bandwidth.ts +0 -77
  33. package/homebrew/gitspace.rb +0 -45
  34. package/landing-page/ATTRIBUTIONS.md +0 -3
  35. package/landing-page/README.md +0 -11
  36. package/landing-page/bun.lock +0 -801
  37. package/landing-page/guidelines/Guidelines.md +0 -61
  38. package/landing-page/index.html +0 -37
  39. package/landing-page/package.json +0 -90
  40. package/landing-page/postcss.config.mjs +0 -15
  41. package/landing-page/public/_redirects +0 -1
  42. package/landing-page/public/favicon.png +0 -0
  43. package/landing-page/src/app/App.tsx +0 -53
  44. package/landing-page/src/app/components/figma/ImageWithFallback.tsx +0 -27
  45. package/landing-page/src/app/components/ui/accordion.tsx +0 -66
  46. package/landing-page/src/app/components/ui/alert-dialog.tsx +0 -157
  47. package/landing-page/src/app/components/ui/alert.tsx +0 -66
  48. package/landing-page/src/app/components/ui/aspect-ratio.tsx +0 -11
  49. package/landing-page/src/app/components/ui/avatar.tsx +0 -53
  50. package/landing-page/src/app/components/ui/badge.tsx +0 -46
  51. package/landing-page/src/app/components/ui/breadcrumb.tsx +0 -109
  52. package/landing-page/src/app/components/ui/button.tsx +0 -57
  53. package/landing-page/src/app/components/ui/calendar.tsx +0 -75
  54. package/landing-page/src/app/components/ui/card.tsx +0 -92
  55. package/landing-page/src/app/components/ui/carousel.tsx +0 -241
  56. package/landing-page/src/app/components/ui/chart.tsx +0 -353
  57. package/landing-page/src/app/components/ui/checkbox.tsx +0 -32
  58. package/landing-page/src/app/components/ui/collapsible.tsx +0 -33
  59. package/landing-page/src/app/components/ui/command.tsx +0 -177
  60. package/landing-page/src/app/components/ui/context-menu.tsx +0 -252
  61. package/landing-page/src/app/components/ui/dialog.tsx +0 -135
  62. package/landing-page/src/app/components/ui/drawer.tsx +0 -132
  63. package/landing-page/src/app/components/ui/dropdown-menu.tsx +0 -257
  64. package/landing-page/src/app/components/ui/form.tsx +0 -168
  65. package/landing-page/src/app/components/ui/hover-card.tsx +0 -44
  66. package/landing-page/src/app/components/ui/input-otp.tsx +0 -77
  67. package/landing-page/src/app/components/ui/input.tsx +0 -21
  68. package/landing-page/src/app/components/ui/label.tsx +0 -24
  69. package/landing-page/src/app/components/ui/menubar.tsx +0 -276
  70. package/landing-page/src/app/components/ui/navigation-menu.tsx +0 -168
  71. package/landing-page/src/app/components/ui/pagination.tsx +0 -127
  72. package/landing-page/src/app/components/ui/popover.tsx +0 -48
  73. package/landing-page/src/app/components/ui/progress.tsx +0 -31
  74. package/landing-page/src/app/components/ui/radio-group.tsx +0 -45
  75. package/landing-page/src/app/components/ui/resizable.tsx +0 -56
  76. package/landing-page/src/app/components/ui/scroll-area.tsx +0 -58
  77. package/landing-page/src/app/components/ui/select.tsx +0 -189
  78. package/landing-page/src/app/components/ui/separator.tsx +0 -28
  79. package/landing-page/src/app/components/ui/sheet.tsx +0 -139
  80. package/landing-page/src/app/components/ui/sidebar.tsx +0 -726
  81. package/landing-page/src/app/components/ui/skeleton.tsx +0 -13
  82. package/landing-page/src/app/components/ui/slider.tsx +0 -63
  83. package/landing-page/src/app/components/ui/sonner.tsx +0 -25
  84. package/landing-page/src/app/components/ui/switch.tsx +0 -31
  85. package/landing-page/src/app/components/ui/table.tsx +0 -116
  86. package/landing-page/src/app/components/ui/tabs.tsx +0 -66
  87. package/landing-page/src/app/components/ui/textarea.tsx +0 -18
  88. package/landing-page/src/app/components/ui/toggle-group.tsx +0 -73
  89. package/landing-page/src/app/components/ui/toggle.tsx +0 -47
  90. package/landing-page/src/app/components/ui/tooltip.tsx +0 -61
  91. package/landing-page/src/app/components/ui/use-mobile.ts +0 -21
  92. package/landing-page/src/app/components/ui/utils.ts +0 -6
  93. package/landing-page/src/components/docs/DocsContent.tsx +0 -801
  94. package/landing-page/src/components/docs/DocsSidebar.tsx +0 -90
  95. package/landing-page/src/components/landing/CTA.tsx +0 -59
  96. package/landing-page/src/components/landing/Comparison.tsx +0 -84
  97. package/landing-page/src/components/landing/FaultyTerminal.tsx +0 -424
  98. package/landing-page/src/components/landing/Features.tsx +0 -201
  99. package/landing-page/src/components/landing/Hero.tsx +0 -142
  100. package/landing-page/src/components/landing/Pricing.tsx +0 -140
  101. package/landing-page/src/components/landing/Roadmap.tsx +0 -86
  102. package/landing-page/src/components/landing/Security.tsx +0 -81
  103. package/landing-page/src/components/landing/TerminalWindow.tsx +0 -27
  104. package/landing-page/src/components/landing/UseCases.tsx +0 -55
  105. package/landing-page/src/components/landing/Workflow.tsx +0 -101
  106. package/landing-page/src/components/layout/DashboardNavbar.tsx +0 -37
  107. package/landing-page/src/components/layout/Footer.tsx +0 -55
  108. package/landing-page/src/components/layout/LandingNavbar.tsx +0 -82
  109. package/landing-page/src/components/ui/badge.tsx +0 -39
  110. package/landing-page/src/components/ui/breadcrumb.tsx +0 -115
  111. package/landing-page/src/components/ui/button.tsx +0 -57
  112. package/landing-page/src/components/ui/card.tsx +0 -79
  113. package/landing-page/src/components/ui/mock-terminal.tsx +0 -68
  114. package/landing-page/src/components/ui/separator.tsx +0 -28
  115. package/landing-page/src/lib/utils.ts +0 -6
  116. package/landing-page/src/main.tsx +0 -10
  117. package/landing-page/src/pages/Dashboard.tsx +0 -133
  118. package/landing-page/src/pages/DocsPage.tsx +0 -79
  119. package/landing-page/src/pages/LandingPage.tsx +0 -31
  120. package/landing-page/src/pages/TerminalView.tsx +0 -106
  121. package/landing-page/src/styles/fonts.css +0 -0
  122. package/landing-page/src/styles/index.css +0 -3
  123. package/landing-page/src/styles/tailwind.css +0 -4
  124. package/landing-page/src/styles/theme.css +0 -181
  125. package/landing-page/vite.config.ts +0 -19
  126. package/scripts/GHOSTTY_TAB_BUG.md +0 -106
  127. package/scripts/build.ts +0 -298
  128. package/scripts/migrate-secrets.ts +0 -77
  129. package/scripts/release.ts +0 -140
  130. package/scripts/sample-events.ts +0 -263
  131. package/scripts/test-tabs-minimal.ts +0 -68
  132. package/scripts/test-tabs-workaround.ts +0 -95
  133. package/scripts/test-tabs.ts +0 -171
  134. package/src/__tests__/test-utils.ts +0 -298
  135. package/src/app/input/__tests__/sessionCommands.test.ts +0 -40
  136. package/src/app/input/sessionCommands.ts +0 -94
  137. package/src/app/session/__tests__/useAttachController.test.ts +0 -229
  138. package/src/app/session/createSessionBackend.bun.ts +0 -76
  139. package/src/app/session/createSessionBackend.web.ts +0 -104
  140. package/src/app/session/types.ts +0 -16
  141. package/src/app/session/useAttachController.ts +0 -220
  142. package/src/app/session/useProcessActions.ts +0 -201
  143. package/src/app/session/useSessionClient.ts +0 -35
  144. package/src/app/session/useWorkspaceDeleteFlow.ts +0 -170
  145. package/src/app.tui.tsx +0 -2929
  146. package/src/app.web.tsx +0 -1454
  147. package/src/commands/__tests__/connect-key.test.ts +0 -10
  148. package/src/commands/__tests__/events.test.ts +0 -201
  149. package/src/commands/__tests__/notifications.test.ts +0 -349
  150. package/src/commands/__tests__/process.test.ts +0 -251
  151. package/src/commands/__tests__/serve-messages.test.ts +0 -190
  152. package/src/commands/__tests__/serve-process-hosting.test.ts +0 -63
  153. package/src/commands/access.ts +0 -298
  154. package/src/commands/add.ts +0 -455
  155. package/src/commands/auth.ts +0 -369
  156. package/src/commands/bundle.ts +0 -232
  157. package/src/commands/config.ts +0 -242
  158. package/src/commands/connect-key.ts +0 -1
  159. package/src/commands/connect.ts +0 -576
  160. package/src/commands/directory.ts +0 -16
  161. package/src/commands/events.ts +0 -157
  162. package/src/commands/host.ts +0 -566
  163. package/src/commands/identity.ts +0 -184
  164. package/src/commands/linear.ts +0 -717
  165. package/src/commands/list.ts +0 -181
  166. package/src/commands/migrate.ts +0 -52
  167. package/src/commands/notifications.ts +0 -351
  168. package/src/commands/process.ts +0 -104
  169. package/src/commands/relay.ts +0 -315
  170. package/src/commands/remove.ts +0 -279
  171. package/src/commands/review.ts +0 -787
  172. package/src/commands/serve.ts +0 -1946
  173. package/src/commands/share.ts +0 -451
  174. package/src/commands/status.ts +0 -125
  175. package/src/commands/switch.ts +0 -361
  176. package/src/commands/tmux.ts +0 -317
  177. package/src/components/DPad.web.tsx +0 -343
  178. package/src/components/DiffViewer.web.tsx +0 -1192
  179. package/src/components/Events.tsx +0 -137
  180. package/src/components/Events.tui.tsx +0 -129
  181. package/src/components/Events.web.tsx +0 -386
  182. package/src/components/FloatingControls.web.tsx +0 -112
  183. package/src/components/FloatingJogWheel.web.tsx +0 -240
  184. package/src/components/Flow.tsx +0 -458
  185. package/src/components/Flow.tui.tsx +0 -343
  186. package/src/components/Flow.web.tsx +0 -442
  187. package/src/components/Inbox.tsx +0 -448
  188. package/src/components/Inbox.tui.tsx +0 -262
  189. package/src/components/Inbox.web.tsx +0 -329
  190. package/src/components/MachineList.tsx +0 -187
  191. package/src/components/MachineList.tui.tsx +0 -161
  192. package/src/components/MachineList.web.tsx +0 -210
  193. package/src/components/NumPad.web.tsx +0 -270
  194. package/src/components/ProjectList.tsx +0 -175
  195. package/src/components/ProjectList.tui.tsx +0 -109
  196. package/src/components/ProjectList.web.tsx +0 -143
  197. package/src/components/ProjectOnboardingStep.ts +0 -23
  198. package/src/components/ProjectOnboardingStep.tui.tsx +0 -88
  199. package/src/components/ProjectOnboardingStep.web.tsx +0 -59
  200. package/src/components/RemoteMachineScreen.tui.tsx +0 -690
  201. package/src/components/ScriptTerminal.tui.tsx +0 -160
  202. package/src/components/ScriptTerminal.web.tsx +0 -89
  203. package/src/components/SessionTerminal.tui.tsx +0 -406
  204. package/src/components/SessionTerminal.web.tsx +0 -467
  205. package/src/components/SpacesBrowser.tsx +0 -540
  206. package/src/components/SpacesBrowser.tui.tsx +0 -258
  207. package/src/components/SpacesBrowser.web.tsx +0 -332
  208. package/src/components/TerminalControls.web.tsx +0 -464
  209. package/src/components/ThreadPanel.web.tsx +0 -798
  210. package/src/components/__tests__/SpacesBrowser.test.ts +0 -541
  211. package/src/components/__tests__/SpacesBrowser.tui.test.tsx +0 -249
  212. package/src/components/__tests__/script-terminal-buffer.tui.test.ts +0 -72
  213. package/src/components/index.ts +0 -105
  214. package/src/components/review-decision-colors.ts +0 -11
  215. package/src/components/script-terminal-buffer.tui.ts +0 -37
  216. package/src/components/session-terminal-page-navigation.ts +0 -48
  217. package/src/components/terminal-bracketed-paste.tui.test.ts +0 -43
  218. package/src/components/terminal-bracketed-paste.tui.ts +0 -46
  219. package/src/core/__tests__/access.test.ts +0 -240
  220. package/src/core/__tests__/bundle-refresh.test.ts +0 -567
  221. package/src/core/__tests__/bundle.test.ts +0 -209
  222. package/src/core/__tests__/github-review.test.ts +0 -781
  223. package/src/core/__tests__/project-lifecycle.test.ts +0 -137
  224. package/src/core/__tests__/workspace-lifecycle.test.ts +0 -159
  225. package/src/core/__tests__/workspace.test.ts +0 -149
  226. package/src/core/access.ts +0 -277
  227. package/src/core/bundle-refresh.ts +0 -1064
  228. package/src/core/bundle.ts +0 -326
  229. package/src/core/config.ts +0 -405
  230. package/src/core/git.ts +0 -768
  231. package/src/core/github-review.ts +0 -761
  232. package/src/core/github.ts +0 -151
  233. package/src/core/identity.ts +0 -631
  234. package/src/core/linear.ts +0 -403
  235. package/src/core/preferences-service.ts +0 -17
  236. package/src/core/project-catalog.ts +0 -52
  237. package/src/core/project-lifecycle.ts +0 -163
  238. package/src/core/review-executor.ts +0 -316
  239. package/src/core/review.ts +0 -407
  240. package/src/core/secret-runtime.ts +0 -167
  241. package/src/core/shell.ts +0 -117
  242. package/src/core/trusted-relays.ts +0 -315
  243. package/src/core/workspace-lifecycle.ts +0 -216
  244. package/src/core/workspace.ts +0 -363
  245. package/src/hooks/__tests__/useLocalSession.tui.test.ts +0 -557
  246. package/src/hooks/index.ts +0 -8
  247. package/src/hooks/index.tui.ts +0 -32
  248. package/src/hooks/useDaemonStatus.tui.ts +0 -174
  249. package/src/hooks/useLocalSession.tui.ts +0 -395
  250. package/src/hooks/useRelayConnection.web.ts +0 -54
  251. package/src/hooks/useRemoteMachines.tui.ts +0 -166
  252. package/src/hooks/useRemoteTerminal.tui.ts +0 -22
  253. package/src/hooks/useReview.web.ts +0 -248
  254. package/src/hooks/useTerminal.web.ts +0 -36
  255. package/src/hooks/useUserActivity.ts +0 -61
  256. package/src/hooks/useVisualViewport.web.ts +0 -104
  257. package/src/index.ts +0 -1376
  258. package/src/lib/events/__tests__/collector-filter.test.ts +0 -105
  259. package/src/lib/events/__tests__/store-query.test.ts +0 -103
  260. package/src/lib/events/collector.ts +0 -494
  261. package/src/lib/events/filters.ts +0 -26
  262. package/src/lib/events/index.ts +0 -11
  263. package/src/lib/events/indexer.ts +0 -14
  264. package/src/lib/events/paths.ts +0 -69
  265. package/src/lib/events/reader.ts +0 -212
  266. package/src/lib/events/store.ts +0 -141
  267. package/src/lib/invite.web.ts +0 -58
  268. package/src/lib/preferences-service.web.ts +0 -41
  269. package/src/lib/processes/__tests__/config.test.ts +0 -83
  270. package/src/lib/processes/__tests__/names.test.ts +0 -125
  271. package/src/lib/processes/__tests__/schema.test.ts +0 -208
  272. package/src/lib/processes/__tests__/watchdog.test.ts +0 -210
  273. package/src/lib/processes/autostart.ts +0 -16
  274. package/src/lib/processes/config.ts +0 -187
  275. package/src/lib/processes/control.ts +0 -53
  276. package/src/lib/processes/editor.ts +0 -32
  277. package/src/lib/processes/events-config.ts +0 -37
  278. package/src/lib/processes/index.ts +0 -14
  279. package/src/lib/processes/instances.ts +0 -20
  280. package/src/lib/processes/manager.ts +0 -131
  281. package/src/lib/processes/names.ts +0 -71
  282. package/src/lib/processes/registry.ts +0 -26
  283. package/src/lib/processes/runner.ts +0 -211
  284. package/src/lib/processes/scheduler.ts +0 -17
  285. package/src/lib/processes/schema.ts +0 -74
  286. package/src/lib/processes/session-list.ts +0 -15
  287. package/src/lib/processes/state.ts +0 -82
  288. package/src/lib/processes/watchdog.test.ts +0 -79
  289. package/src/lib/processes/watchdog.ts +0 -106
  290. package/src/lib/remote-session/__tests__/protocol.test.ts +0 -291
  291. package/src/lib/remote-session/index.ts +0 -7
  292. package/src/lib/remote-session/protocol.ts +0 -443
  293. package/src/lib/remote-session/session-handler.ts +0 -1298
  294. package/src/lib/remote-session/workspace-scanner.ts +0 -161
  295. package/src/lib/sonner.web.ts +0 -1
  296. package/src/lib/storage/identity-store.web.ts +0 -94
  297. package/src/lib/tmux-lite/README.md +0 -81
  298. package/src/lib/tmux-lite/cli.ts +0 -855
  299. package/src/lib/tmux-lite/crypto/__tests__/helpers/handshake-runner.ts +0 -349
  300. package/src/lib/tmux-lite/crypto/__tests__/helpers/mock-relay.ts +0 -291
  301. package/src/lib/tmux-lite/crypto/__tests__/helpers/test-identities.ts +0 -142
  302. package/src/lib/tmux-lite/crypto/__tests__/integration/authorization.integration.test.ts +0 -339
  303. package/src/lib/tmux-lite/crypto/__tests__/integration/e2e-communication.integration.test.ts +0 -477
  304. package/src/lib/tmux-lite/crypto/__tests__/integration/error-handling.integration.test.ts +0 -499
  305. package/src/lib/tmux-lite/crypto/__tests__/integration/handshake.integration.test.ts +0 -371
  306. package/src/lib/tmux-lite/crypto/__tests__/integration/security.integration.test.ts +0 -573
  307. package/src/lib/tmux-lite/crypto/access-control.test.ts +0 -512
  308. package/src/lib/tmux-lite/crypto/access-control.ts +0 -320
  309. package/src/lib/tmux-lite/crypto/frames.test.ts +0 -262
  310. package/src/lib/tmux-lite/crypto/frames.ts +0 -141
  311. package/src/lib/tmux-lite/crypto/handshake.ts +0 -894
  312. package/src/lib/tmux-lite/crypto/identity.test.ts +0 -220
  313. package/src/lib/tmux-lite/crypto/identity.ts +0 -286
  314. package/src/lib/tmux-lite/crypto/index.ts +0 -51
  315. package/src/lib/tmux-lite/crypto/invites.test.ts +0 -381
  316. package/src/lib/tmux-lite/crypto/invites.ts +0 -215
  317. package/src/lib/tmux-lite/crypto/keyexchange.ts +0 -435
  318. package/src/lib/tmux-lite/crypto/keys.test.ts +0 -58
  319. package/src/lib/tmux-lite/crypto/keys.ts +0 -47
  320. package/src/lib/tmux-lite/crypto/secretbox.test.ts +0 -169
  321. package/src/lib/tmux-lite/crypto/secretbox.ts +0 -124
  322. package/src/lib/tmux-lite/handshake-handler.ts +0 -451
  323. package/src/lib/tmux-lite/process-run.integration.test.ts +0 -266
  324. package/src/lib/tmux-lite/protocol.test.ts +0 -307
  325. package/src/lib/tmux-lite/protocol.ts +0 -291
  326. package/src/lib/tmux-lite/relay-client.ts +0 -506
  327. package/src/lib/tmux-lite/server-lifecycle.test.ts +0 -212
  328. package/src/lib/tmux-lite/server.ts +0 -1412
  329. package/src/lib/tmux-lite/shell-integration.sh +0 -37
  330. package/src/lib/tmux-lite/terminal-queries.test.ts +0 -54
  331. package/src/lib/tmux-lite/terminal-queries.ts +0 -49
  332. package/src/notifications/__tests__/useNotifications.test.ts +0 -739
  333. package/src/notifications/index.ts +0 -32
  334. package/src/notifications/policy.test.ts +0 -424
  335. package/src/notifications/policy.ts +0 -139
  336. package/src/notifications/types.ts +0 -82
  337. package/src/notifications/useNotifications.ts +0 -350
  338. package/src/pages/ReviewPage.web.tsx +0 -511
  339. package/src/preferences/index.ts +0 -1
  340. package/src/preferences/types.ts +0 -9
  341. package/src/relay/__tests__/e2e-flow.test.ts +0 -1284
  342. package/src/relay/__tests__/helpers/auth.ts +0 -354
  343. package/src/relay/__tests__/helpers/ports.ts +0 -51
  344. package/src/relay/__tests__/protocol-validation.test.ts +0 -265
  345. package/src/relay/authorization.ts +0 -303
  346. package/src/relay/embedded-assets.generated.d.ts +0 -15
  347. package/src/relay/identity.ts +0 -352
  348. package/src/relay/index.ts +0 -57
  349. package/src/relay/pipes.test.ts +0 -427
  350. package/src/relay/pipes.ts +0 -195
  351. package/src/relay/protocol.ts +0 -804
  352. package/src/relay/registries.test.ts +0 -437
  353. package/src/relay/registries.ts +0 -593
  354. package/src/relay/server.test.ts +0 -1323
  355. package/src/relay/server.ts +0 -1128
  356. package/src/relay/signing.ts +0 -238
  357. package/src/relay/types.ts +0 -69
  358. package/src/relay-client/__tests__/machine-directory-client.test.ts +0 -152
  359. package/src/relay-client/__tests__/useMachineDirectory.test.ts +0 -172
  360. package/src/relay-client/adapters/browser.ts +0 -27
  361. package/src/relay-client/adapters/node.ts +0 -29
  362. package/src/relay-client/index.ts +0 -33
  363. package/src/relay-client/machine-directory-client.ts +0 -244
  364. package/src/relay-client/useMachineDirectory.ts +0 -175
  365. package/src/serve/client-session-manager.ts +0 -635
  366. package/src/serve/daemon.ts +0 -497
  367. package/src/serve/pty-session.ts +0 -236
  368. package/src/serve/types.ts +0 -174
  369. package/src/session/__tests__/backend-manager.test.ts +0 -101
  370. package/src/session/__tests__/local-session-backend.test.ts +0 -1129
  371. package/src/session/__tests__/reducer.test.ts +0 -80
  372. package/src/session/__tests__/remote-session-backend.test.ts +0 -995
  373. package/src/session/__tests__/session-name.test.ts +0 -35
  374. package/src/session/__tests__/useBundleRefreshAttachFlow.test.ts +0 -431
  375. package/src/session/__tests__/useRemoteSessionClient.test.ts +0 -424
  376. package/src/session/__tests__/workspace-shell-hooks.integration.test.ts +0 -268
  377. package/src/session/__tests__/workspace-shell-hooks.test.ts +0 -24
  378. package/src/session/adapters/browser-remote.ts +0 -101
  379. package/src/session/adapters/node-remote.ts +0 -135
  380. package/src/session/backend-key.ts +0 -5
  381. package/src/session/backend-manager.ts +0 -80
  382. package/src/session/backend.ts +0 -93
  383. package/src/session/backends/local-session-backend.ts +0 -1119
  384. package/src/session/backends/remote-session-backend.ts +0 -1378
  385. package/src/session/crypto/__tests__/web-terminal.test.ts +0 -1158
  386. package/src/session/crypto/frames.web.ts +0 -205
  387. package/src/session/crypto/handshake.web.ts +0 -396
  388. package/src/session/crypto/identity.web.ts +0 -133
  389. package/src/session/crypto/keyexchange.web.ts +0 -246
  390. package/src/session/crypto/relay-signing.web.ts +0 -53
  391. package/src/session/events.ts +0 -38
  392. package/src/session/index.ts +0 -116
  393. package/src/session/reducer.ts +0 -274
  394. package/src/session/selectors.ts +0 -28
  395. package/src/session/session-name.ts +0 -50
  396. package/src/session/types.ts +0 -101
  397. package/src/session/useBundleRefreshAttachFlow.ts +0 -608
  398. package/src/session/useRemoteSessionClient.ts +0 -424
  399. package/src/session/useSessionEngine.ts +0 -432
  400. package/src/session/workspace-shell-hooks.ts +0 -35
  401. package/src/tui/__tests__/input-text.test.ts +0 -24
  402. package/src/tui/__tests__/local-terminal-sync.test.ts +0 -82
  403. package/src/tui/__tests__/session-terminal-page-navigation.test.ts +0 -94
  404. package/src/tui/app.tsx +0 -2
  405. package/src/tui/index.ts +0 -18
  406. package/src/tui/input-text.ts +0 -38
  407. package/src/tui/local-terminal-sync.ts +0 -41
  408. package/src/types/bundle-refresh.ts +0 -42
  409. package/src/types/bundle.ts +0 -130
  410. package/src/types/config.ts +0 -287
  411. package/src/types/errors.ts +0 -292
  412. package/src/types/events.ts +0 -91
  413. package/src/types/identity.ts +0 -284
  414. package/src/types/processes.ts +0 -45
  415. package/src/types/review.ts +0 -349
  416. package/src/types/script-phase.ts +0 -3
  417. package/src/types/workspace-fuzzy.ts +0 -49
  418. package/src/types/workspace.ts +0 -151
  419. package/src/utils/__tests__/onboarding.test.ts +0 -358
  420. package/src/utils/__tests__/run-scripts.test.ts +0 -535
  421. package/src/utils/__tests__/run-workspace-scripts.test.ts +0 -406
  422. package/src/utils/__tests__/workspace-setup.integration.test.ts +0 -633
  423. package/src/utils/__tests__/workspace-state.test.ts +0 -78
  424. package/src/utils/bun-socket-writer.ts +0 -80
  425. package/src/utils/clipboard.ts +0 -53
  426. package/src/utils/deps.test.ts +0 -31
  427. package/src/utils/deps.ts +0 -145
  428. package/src/utils/device.web.ts +0 -163
  429. package/src/utils/fuzzy-match.ts +0 -125
  430. package/src/utils/hostnames.ts +0 -43
  431. package/src/utils/hunk-header.ts +0 -17
  432. package/src/utils/id.ts +0 -9
  433. package/src/utils/logger.ts +0 -127
  434. package/src/utils/markdown.ts +0 -254
  435. package/src/utils/normalize-env-key.ts +0 -13
  436. package/src/utils/onboarding.ts +0 -279
  437. package/src/utils/prompts.ts +0 -176
  438. package/src/utils/run-commands.ts +0 -112
  439. package/src/utils/run-scripts.ts +0 -337
  440. package/src/utils/run-workspace-scripts.ts +0 -355
  441. package/src/utils/sanitize.test.ts +0 -149
  442. package/src/utils/sanitize.ts +0 -162
  443. package/src/utils/secrets.ts +0 -836
  444. package/src/utils/shell-escape.ts +0 -40
  445. package/src/utils/utf8.ts +0 -79
  446. package/src/utils/workspace-id.ts +0 -55
  447. package/src/utils/workspace-state.ts +0 -427
  448. package/src/version.generated.d.ts +0 -2
  449. package/todo-security.md +0 -92
  450. package/tsconfig.json +0 -29
  451. package/web/README.md +0 -73
  452. package/web/bun.lock +0 -675
  453. package/web/eslint.config.js +0 -23
  454. package/web/index.css +0 -249
  455. package/web/index.html +0 -16
  456. package/web/main.tsx +0 -10
  457. package/web/package.json +0 -39
  458. package/web/public/vite.svg +0 -1
  459. package/web/tsconfig.app.json +0 -35
  460. package/web/tsconfig.json +0 -7
  461. package/web/tsconfig.node.json +0 -26
  462. package/web/vite.config.ts +0 -39
  463. package/worker/bun.lock +0 -237
  464. package/worker/package.json +0 -22
  465. package/worker/schema.sql +0 -96
  466. package/worker/src/handlers/auth.ts +0 -451
  467. package/worker/src/handlers/subdomains.ts +0 -376
  468. package/worker/src/handlers/user.ts +0 -98
  469. package/worker/src/index.ts +0 -70
  470. package/worker/src/middleware/auth.ts +0 -152
  471. package/worker/src/services/cloudflare.ts +0 -609
  472. package/worker/src/types.ts +0 -96
  473. package/worker/tsconfig.json +0 -15
  474. package/worker/wrangler.toml +0 -26
@@ -1,801 +0,0 @@
1
- import { Terminal, Copy, Check } from "lucide-react";
2
- import { useState } from "react";
3
- import { cn } from "../../lib/utils";
4
- import { Badge } from "../../app/components/ui/badge";
5
-
6
- function CodeBlock({ code, language = "bash", multiLine = false }: { code: string; language?: string; multiLine?: boolean }) {
7
- const [copied, setCopied] = useState(false);
8
-
9
- const onCopy = () => {
10
- navigator.clipboard.writeText(code);
11
- setCopied(true);
12
- setTimeout(() => setCopied(false), 2000);
13
- };
14
-
15
- const lines = code.split('\n');
16
-
17
- return (
18
- <div className="relative mt-4 mb-6 group">
19
- <div className="absolute top-3 right-3 opacity-0 group-hover:opacity-100 transition-opacity z-10">
20
- <button
21
- onClick={onCopy}
22
- className="p-1.5 rounded bg-zinc-700 hover:bg-zinc-600 text-zinc-300 transition-colors"
23
- >
24
- {copied ? <Check className="w-3.5 h-3.5 text-green-400" /> : <Copy className="w-3.5 h-3.5" />}
25
- </button>
26
- </div>
27
- <div className="bg-zinc-900 rounded-lg border border-zinc-800 p-4 overflow-x-auto font-mono text-sm leading-relaxed">
28
- {multiLine ? (
29
- lines.map((line, i) => (
30
- <div key={i} className="flex">
31
- {language === 'bash' && line.trim() && !line.startsWith('#') && !line.startsWith('//') && (
32
- <span className="text-zinc-500 select-none mr-2">$</span>
33
- )}
34
- <span className={line.startsWith('#') || line.startsWith('//') ? "text-zinc-500" : "text-zinc-300"}>{line}</span>
35
- </div>
36
- ))
37
- ) : (
38
- <>
39
- {language === 'bash' && <span className="text-zinc-500 select-none mr-2">$</span>}
40
- <span className="text-zinc-300">{code}</span>
41
- </>
42
- )}
43
- </div>
44
- </div>
45
- );
46
- }
47
-
48
- function JsonBlock({ code }: { code: string }) {
49
- const [copied, setCopied] = useState(false);
50
-
51
- const onCopy = () => {
52
- navigator.clipboard.writeText(code);
53
- setCopied(true);
54
- setTimeout(() => setCopied(false), 2000);
55
- };
56
-
57
- return (
58
- <div className="relative mt-4 mb-6 group">
59
- <div className="absolute top-3 right-3 opacity-0 group-hover:opacity-100 transition-opacity z-10">
60
- <button
61
- onClick={onCopy}
62
- className="p-1.5 rounded bg-zinc-700 hover:bg-zinc-600 text-zinc-300 transition-colors"
63
- >
64
- {copied ? <Check className="w-3.5 h-3.5 text-green-400" /> : <Copy className="w-3.5 h-3.5" />}
65
- </button>
66
- </div>
67
- <div className="bg-zinc-900 rounded-lg border border-zinc-800 p-4 overflow-x-auto font-mono text-sm leading-relaxed">
68
- <pre className="text-zinc-300">{code}</pre>
69
- </div>
70
- </div>
71
- );
72
- }
73
-
74
- export function DocsContent({ section }: { section: string }) {
75
- switch (section) {
76
- case "overview":
77
- return (
78
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
79
- <h1 className="text-4xl font-bold mb-6">Overview</h1>
80
- <p className="text-xl text-zinc-400 mb-8 leading-relaxed">
81
- GitSpace is a CLI tool for managing GitHub repository workspaces using git worktrees, with optional secure remote terminal access.
82
- </p>
83
-
84
- <h3 className="text-xl font-semibold text-white mb-4">Local Development</h3>
85
- <ul className="list-disc list-inside space-y-2 text-zinc-400 mb-8 ml-2">
86
- <li>Work on multiple branches simultaneously without stashing</li>
87
- <li>Interactive TUI for visual workspace management</li>
88
- <li>Convention-based scripts for automation</li>
89
- <li>Team onboarding via repo config bundles</li>
90
- </ul>
91
-
92
- <h3 className="text-xl font-semibold text-white mb-4">Remote Access</h3>
93
- <ul className="list-disc list-inside space-y-2 text-zinc-400 mb-8 ml-2">
94
- <li>E2E encrypted terminal access from any browser or CLI</li>
95
- <li>Zero-trust relay: routes traffic but cannot decrypt content</li>
96
- <li>Identity-based auth using Ed25519/X25519 cryptographic keys</li>
97
- <li>Instant hosting via gitspace.sh subdomains</li>
98
- </ul>
99
- </div>
100
- );
101
-
102
- case "quick-start":
103
- return (
104
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
105
- <h1 className="text-4xl font-bold mb-6">Quick Start</h1>
106
-
107
- <h3 className="text-xl font-semibold text-white mb-4">5-Minute Setup with gitspace.sh</h3>
108
- <CodeBlock code={`# 1. Install (pick your package manager)
109
- npm install -g gitspace
110
- # or: bun install -g gitspace
111
- # or: pnpm install -g gitspace
112
-
113
- # 2. Create identity
114
- gssh identity init
115
-
116
- # 3. Login to gitspace.sh
117
- gssh auth login
118
-
119
- # 4. Reserve your subdomain
120
- gssh host reserve yourname
121
-
122
- # 5. Start serving
123
- gssh serve
124
-
125
- # 6. Access from browser: https://yourname.gitspace.sh`} multiLine />
126
-
127
- <h3 className="text-xl font-semibold text-white mb-4 mt-12">Local-Only Quick Start</h3>
128
- <CodeBlock code={`# Install
129
- npm install -g gitspace
130
-
131
- # Authenticate GitHub
132
- gh auth login
133
-
134
- # Launch TUI
135
- gssh
136
-
137
- # Or via CLI:
138
- gssh add project # Add a GitHub repo
139
- gssh add my-feature # Create a workspace`} multiLine />
140
- </div>
141
- );
142
-
143
- case "installation":
144
- return (
145
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
146
- <h1 className="text-4xl font-bold mb-6">Installation</h1>
147
-
148
- <h3 className="text-xl font-semibold text-white mb-4">Prerequisites</h3>
149
- <p className="text-zinc-400 mb-4">Required:</p>
150
- <ul className="list-disc list-inside space-y-2 text-zinc-400 mb-8 ml-2">
151
- <li><a href="https://git-scm.com/" className="text-green-400 hover:underline">Git</a> - Version control</li>
152
- <li><a href="https://cli.github.com/" className="text-green-400 hover:underline">GitHub CLI</a> - <code className="text-zinc-300">gh auth login</code> before using GitSpace</li>
153
- <li><a href="https://stedolan.github.io/jq/" className="text-green-400 hover:underline">jq</a> - JSON processing</li>
154
- </ul>
155
-
156
- <h3 className="text-xl font-semibold text-white mb-4">Install GitSpace</h3>
157
- <CodeBlock code={`# npm
158
- npm install -g gitspace
159
-
160
- # bun
161
- bun install -g gitspace
162
-
163
- # pnpm
164
- pnpm install -g gitspace
165
-
166
- # yarn
167
- yarn global add gitspace`} multiLine />
168
- <CodeBlock code="gssh --version" />
169
-
170
- <h3 className="text-xl font-semibold text-white mb-4">Authenticate GitHub CLI</h3>
171
- <CodeBlock code="gh auth login" />
172
- </div>
173
- );
174
-
175
- case "tui-interface":
176
- return (
177
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
178
- <h1 className="text-4xl font-bold mb-6">TUI Interface</h1>
179
-
180
- <p className="text-zinc-400 mb-4">Launch the TUI with no arguments:</p>
181
- <CodeBlock code="gssh" />
182
-
183
- <p className="text-zinc-400 mb-8">
184
- The TUI provides a two-panel interface:
185
- </p>
186
- <ul className="list-disc list-inside space-y-2 text-zinc-400 mb-8 ml-2">
187
- <li><strong className="text-white">Left panel</strong>: Your projects</li>
188
- <li><strong className="text-white">Right panel</strong>: Workspaces in the selected project</li>
189
- </ul>
190
-
191
- <h3 className="text-xl font-semibold text-white mb-4">Key Bindings</h3>
192
- <div className="overflow-x-auto">
193
- <table className="w-full text-sm text-left text-zinc-400 mb-8">
194
- <thead className="text-xs text-zinc-500 uppercase bg-zinc-900">
195
- <tr>
196
- <th className="px-4 py-3">Key</th>
197
- <th className="px-4 py-3">Action</th>
198
- </tr>
199
- </thead>
200
- <tbody>
201
- <tr className="border-b border-zinc-800">
202
- <td className="px-4 py-3 font-mono text-green-400">Enter</td>
203
- <td className="px-4 py-3">Select project / Open workspace</td>
204
- </tr>
205
- <tr className="border-b border-zinc-800">
206
- <td className="px-4 py-3 font-mono text-green-400">Tab</td>
207
- <td className="px-4 py-3">Switch between panels</td>
208
- </tr>
209
- <tr className="border-b border-zinc-800">
210
- <td className="px-4 py-3 font-mono text-green-400">n</td>
211
- <td className="px-4 py-3">New project / workspace</td>
212
- </tr>
213
- <tr className="border-b border-zinc-800">
214
- <td className="px-4 py-3 font-mono text-green-400">d</td>
215
- <td className="px-4 py-3">Delete selected item</td>
216
- </tr>
217
- <tr className="border-b border-zinc-800">
218
- <td className="px-4 py-3 font-mono text-green-400">?</td>
219
- <td className="px-4 py-3">Show help</td>
220
- </tr>
221
- <tr className="border-b border-zinc-800">
222
- <td className="px-4 py-3 font-mono text-green-400">q</td>
223
- <td className="px-4 py-3">Quit</td>
224
- </tr>
225
- </tbody>
226
- </table>
227
- </div>
228
- </div>
229
- );
230
-
231
- case "cli-commands":
232
- return (
233
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
234
- <h1 className="text-4xl font-bold mb-6">CLI Commands</h1>
235
-
236
- <h3 className="text-xl font-semibold text-white mb-4">Projects</h3>
237
- <CodeBlock code={`gssh add project # Add from GitHub (interactive)
238
- gssh add project --org myorg # Filter by organization
239
- gssh switch project myapp # Switch to a project
240
- gssh list projects # List all projects
241
- gssh remove project myapp # Remove a project`} multiLine language="bash" />
242
-
243
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">Workspaces</h3>
244
- <CodeBlock code={`gssh add my-feature # Create workspace
245
- gssh add --from develop # Create from specific branch
246
- gssh switch my-feature # Switch to workspace
247
- gssh switch # Interactive selection
248
- gssh list # List workspaces
249
- gssh remove workspace my-feature`} multiLine language="bash" />
250
-
251
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">Other Commands</h3>
252
- <CodeBlock code={`gssh directory # Print current project path
253
- gssh status # Show daemon statuses`} multiLine language="bash" />
254
-
255
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">Command Options</h3>
256
-
257
- <h4 className="text-lg font-medium text-zinc-300 mb-3">Options for <code className="text-green-400">gssh add project</code></h4>
258
- <ul className="list-disc list-inside space-y-2 text-zinc-400 mb-6 ml-2 text-sm">
259
- <li><code className="text-zinc-300">--bundle-url &lt;url&gt;</code> - Load bundle from remote URL (zip archive)</li>
260
- <li><code className="text-zinc-300">--bundle-path &lt;path&gt;</code> - Load bundle from local directory</li>
261
- <li><code className="text-zinc-300">--skip-bundle</code> - Skip bundle detection and onboarding</li>
262
- <li><code className="text-zinc-300">--no-clone</code> - Create project structure without cloning</li>
263
- <li><code className="text-zinc-300">--org &lt;org&gt;</code> - Filter repos to specific organization</li>
264
- </ul>
265
-
266
- <h4 className="text-lg font-medium text-zinc-300 mb-3">Options for <code className="text-green-400">gssh add [workspace-name]</code></h4>
267
- <ul className="list-disc list-inside space-y-2 text-zinc-400 mb-6 ml-2 text-sm">
268
- <li><code className="text-zinc-300">--branch &lt;name&gt;</code> - Specify different branch name from workspace name</li>
269
- <li><code className="text-zinc-300">--from &lt;branch&gt;</code> - Create from specific branch instead of base</li>
270
- <li><code className="text-zinc-300">--no-setup</code> - Skip setup commands</li>
271
- </ul>
272
-
273
- <h4 className="text-lg font-medium text-zinc-300 mb-3">Options for <code className="text-green-400">gssh remove workspace</code></h4>
274
- <ul className="list-disc list-inside space-y-2 text-zinc-400 mb-6 ml-2 text-sm">
275
- <li><code className="text-zinc-300">--force</code> - Skip confirmation prompts</li>
276
- <li><code className="text-zinc-300">--keep-branch</code> - Don't delete git branch when removing</li>
277
- </ul>
278
- </div>
279
- );
280
-
281
- case "custom-scripts":
282
- return (
283
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
284
- <h1 className="text-4xl font-bold mb-6">Custom Scripts</h1>
285
-
286
- <p className="text-zinc-400 mb-4">
287
- GitSpace uses convention-based scripts stored per workspace in <code className="text-zinc-300">~/gitspace/&lt;project&gt;/workspaces/&lt;workspace&gt;/.gitspace/scripts/</code>:
288
- </p>
289
-
290
- <div className="bg-zinc-900 rounded-lg border border-zinc-800 p-4 font-mono text-sm mb-8">
291
- <pre className="text-zinc-300">{`~/gitspace/<project>/workspaces/<workspace>/.gitspace/
292
- └── scripts/
293
- ├── pre/ # Run before setup (once)
294
- ├── setup/ # Run on workspace creation (once)
295
- ├── select/ # Run every time workspace is opened
296
- └── remove/ # Run before workspace deletion`}</pre>
297
- </div>
298
-
299
- <h3 className="text-xl font-semibold text-white mb-4">Rules</h3>
300
- <ul className="list-disc list-inside space-y-2 text-zinc-400 mb-8 ml-2">
301
- <li>Scripts must be executable (<code className="text-zinc-300">chmod +x</code>)</li>
302
- <li>Run alphabetically (use <code className="text-zinc-300">01-</code>, <code className="text-zinc-300">02-</code> prefixes)</li>
303
- <li>Working directory: the workspace</li>
304
- <li>Arguments: <code className="text-zinc-300">$1</code> = workspace name, <code className="text-zinc-300">$2</code> = repository</li>
305
- </ul>
306
-
307
- <h3 className="text-xl font-semibold text-white mb-4">Example Script</h3>
308
- <p className="text-zinc-500 text-sm mb-2">.gitspace/scripts/select/01-status.sh</p>
309
- <JsonBlock code={`#!/bin/bash
310
- echo "Switching to: $1"
311
- git fetch origin
312
- git status`} />
313
- </div>
314
- );
315
-
316
- case "repo-bundles":
317
- return (
318
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
319
- <h1 className="text-4xl font-bold mb-6">Repo Config Bundles</h1>
320
-
321
- <p className="text-zinc-400 mb-4">
322
- Bundles allow teams to share onboarding configurations. Place in <code className="text-zinc-300">.gitspace/</code>:
323
- </p>
324
-
325
- <div className="bg-zinc-900 rounded-lg border border-zinc-800 p-4 font-mono text-sm mb-8">
326
- <pre className="text-zinc-300">{`.gitspace/
327
- ├── bundle.json # Manifest
328
- └── scripts/
329
- ├── pre/ # Pre-setup scripts
330
- ├── setup/ # Setup scripts
331
- ├── select/ # Select scripts
332
- └── remove/ # Remove scripts`}</pre>
333
- </div>
334
-
335
- <h3 className="text-xl font-semibold text-white mb-4">Manifest Example</h3>
336
- <JsonBlock code={`{
337
- "version": "1.0",
338
- "name": "my-app-bundle",
339
- "onboarding": [
340
- { "id": "node", "type": "confirm", "title": "Node.js", "checkCommand": "node" },
341
- { "id": "api-key", "type": "secret", "title": "API Key", "configKey": "apiKey" }
342
- ]
343
- }`} />
344
-
345
- <h3 className="text-xl font-semibold text-white mb-4">Step Types</h3>
346
- <div className="overflow-x-auto">
347
- <table className="w-full text-sm text-left text-zinc-400 mb-8">
348
- <thead className="text-xs text-zinc-500 uppercase bg-zinc-900">
349
- <tr>
350
- <th className="px-4 py-3">Type</th>
351
- <th className="px-4 py-3">Purpose</th>
352
- <th className="px-4 py-3">Storage</th>
353
- </tr>
354
- </thead>
355
- <tbody>
356
- <tr className="border-b border-zinc-800">
357
- <td className="px-4 py-3 font-mono text-green-400">info</td>
358
- <td className="px-4 py-3">Display information</td>
359
- <td className="px-4 py-3">N/A</td>
360
- </tr>
361
- <tr className="border-b border-zinc-800">
362
- <td className="px-4 py-3 font-mono text-green-400">confirm</td>
363
- <td className="px-4 py-3">Verify installation</td>
364
- <td className="px-4 py-3">N/A</td>
365
- </tr>
366
- <tr className="border-b border-zinc-800">
367
- <td className="px-4 py-3 font-mono text-green-400">secret</td>
368
- <td className="px-4 py-3">Sensitive values</td>
369
- <td className="px-4 py-3">OS Keychain</td>
370
- </tr>
371
- <tr className="border-b border-zinc-800">
372
- <td className="px-4 py-3 font-mono text-green-400">input</td>
373
- <td className="px-4 py-3">Plain text</td>
374
- <td className="px-4 py-3">Config file</td>
375
- </tr>
376
- </tbody>
377
- </table>
378
- </div>
379
-
380
- <h3 className="text-xl font-semibold text-white mb-4">Using Values in Scripts</h3>
381
- <JsonBlock code={`echo "Team: $TEAM_NAME"
382
- echo "Has API key: $API_KEY"`} />
383
- </div>
384
- );
385
-
386
- case "gitspace-managed":
387
- return (
388
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
389
- <h1 className="text-4xl font-bold mb-6">gitspace.sh (Managed)</h1>
390
-
391
- <p className="text-zinc-400 mb-6">
392
- The easiest way to get remote access:
393
- </p>
394
-
395
- <CodeBlock code={`# 1. Create identity
396
- gssh identity init
397
-
398
- # 2. Login with GitHub
399
- gssh auth login
400
-
401
- # 3. Reserve subdomain
402
- gssh host reserve yourname
403
-
404
- # 4. Start serving
405
- gssh serve
406
-
407
- # 5. Access: https://yourname.gitspace.sh`} multiLine />
408
-
409
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">Manage Subdomains</h3>
410
- <CodeBlock code={`gssh host list # List your subdomains
411
- gssh host set-primary name # Set primary
412
- gssh host release name # Release subdomain
413
- gssh host status # Show status`} multiLine language="bash" />
414
- </div>
415
- );
416
-
417
- case "self-hosted-relay":
418
- return (
419
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
420
- <h1 className="text-4xl font-bold mb-6">Self-Hosted Relay</h1>
421
-
422
- <p className="text-zinc-400 mb-6">For complete control, run your own relay:</p>
423
-
424
- <h3 className="text-xl font-semibold text-white mb-4">1. Start Relay</h3>
425
- <CodeBlock code="gssh relay start --port 4480" />
426
-
427
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">2. Authorize Machine</h3>
428
- <CodeBlock
429
- code={`# On the machine
430
- gssh identity init --label "My Mac"
431
- gssh identity show
432
-
433
- # On the relay host
434
- gssh relay authorize gssh-pub:<keys> --label "My Mac"`}
435
- multiLine
436
- />
437
-
438
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">3. Serve</h3>
439
- <CodeBlock code="gssh serve --relay ws://localhost:4480/ws" />
440
-
441
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">4. Create Invite</h3>
442
- <CodeBlock code="gssh share create" />
443
- <p className="text-zinc-500 text-sm mt-2">Output: <code className="text-green-400">https://gitspace.sh/join#&lt;TOKEN&gt;</code></p>
444
-
445
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">5. Connect from Client</h3>
446
- <CodeBlock code={`gssh identity init --label "Laptop"
447
- gssh connect https://gitspace.sh/join#<TOKEN>`} multiLine />
448
- </div>
449
- );
450
-
451
- case "identity-management":
452
- return (
453
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
454
- <h1 className="text-4xl font-bold mb-6">Identity Management</h1>
455
-
456
- <p className="text-zinc-400 mb-6">
457
- Every machine and client has a cryptographic identity:
458
- </p>
459
-
460
- <CodeBlock code={`gssh identity init [--label <name>] [--force]
461
- gssh identity show [--fingerprint] [--json]`} multiLine language="bash" />
462
-
463
- <p className="text-zinc-500 text-sm mt-4">
464
- Identity storage: <code className="text-zinc-300">~/gitspace/.identity/</code>
465
- </p>
466
-
467
- <p className="text-zinc-400 mt-8 mb-4">
468
- Identity is encrypted at rest and requires an unlock password when used for remote connections.
469
- </p>
470
- </div>
471
- );
472
-
473
- case "access-control":
474
- return (
475
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
476
- <h1 className="text-4xl font-bold mb-6">Access Control</h1>
477
-
478
- <h3 className="text-xl font-semibold text-white mb-4">Grant Access</h3>
479
- <CodeBlock code={`gssh access add gssh-pub:<keys> --label "Brad's Phone"`} />
480
-
481
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">Manage Access</h3>
482
- <CodeBlock code={`gssh access list [--json]
483
- gssh access remove "Brad's Phone"
484
- gssh access remove <key-prefix> --force`} multiLine language="bash" />
485
-
486
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">Connect Without Invite (Pre-Authorized)</h3>
487
- <CodeBlock code="gssh --relay ws://relay.example.com/ws" />
488
-
489
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">Public Key Format</h3>
490
- <p className="text-zinc-400 mb-4 text-sm">
491
- Public keys are displayed in this format:
492
- </p>
493
- <div className="bg-zinc-900 rounded-lg border border-zinc-800 p-4 font-mono text-sm text-green-400 break-all">
494
- gssh-pub:&lt;BASE64_SIGNING_PUBLIC_KEY&gt;:&lt;BASE64_KEY_EXCHANGE_PUBLIC_KEY&gt;
495
- </div>
496
- </div>
497
- );
498
-
499
- case "configuration":
500
- return (
501
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
502
- <h1 className="text-4xl font-bold mb-6">Configuration</h1>
503
-
504
- <h3 className="text-xl font-semibold text-white mb-4">Global Config</h3>
505
- <p className="text-zinc-500 text-sm mb-2">~/gitspace/.config.json</p>
506
- <JsonBlock code={`{
507
- "currentProject": "my-app",
508
- "projectsDir": "/Users/username/gitspace",
509
- "defaultBaseBranch": "main"
510
- }`} />
511
-
512
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">Project Config</h3>
513
- <p className="text-zinc-500 text-sm mb-2">~/gitspace/&lt;project&gt;/.config.json</p>
514
- <JsonBlock code={`{
515
- "name": "my-app",
516
- "repository": "myorg/my-app",
517
- "baseBranch": "main"
518
- }`} />
519
-
520
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">Environment Variables</h3>
521
- <div className="overflow-x-auto">
522
- <table className="w-full text-sm text-left text-zinc-400 mb-8">
523
- <thead className="text-xs text-zinc-500 uppercase bg-zinc-900">
524
- <tr>
525
- <th className="px-4 py-3">Variable</th>
526
- <th className="px-4 py-3">Description</th>
527
- <th className="px-4 py-3">Default</th>
528
- </tr>
529
- </thead>
530
- <tbody>
531
- <tr className="border-b border-zinc-800">
532
- <td className="px-4 py-3 font-mono text-green-400">RELAY_PORT</td>
533
- <td className="px-4 py-3">Relay port</td>
534
- <td className="px-4 py-3">4480</td>
535
- </tr>
536
- <tr className="border-b border-zinc-800">
537
- <td className="px-4 py-3 font-mono text-green-400">SPACES_CURRENT_PROJECT</td>
538
- <td className="px-4 py-3">Override project</td>
539
- <td className="px-4 py-3">Config</td>
540
- </tr>
541
- </tbody>
542
- </table>
543
- </div>
544
- </div>
545
- );
546
-
547
- case "troubleshooting":
548
- return (
549
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
550
- <h1 className="text-4xl font-bold mb-6">Troubleshooting</h1>
551
-
552
- <div className="space-y-8">
553
- <div className="p-4 rounded-lg border border-zinc-800 bg-zinc-900/50">
554
- <h4 className="text-white font-bold mb-2">"command not found: gssh"</h4>
555
- <p className="text-zinc-400 text-sm mb-2">Ensure Bun's global bin is in your PATH:</p>
556
- <CodeBlock code={`export PATH="$HOME/.bun/bin:$PATH"`} />
557
- <p className="text-zinc-500 text-sm">Add to your shell profile (<code className="text-zinc-300">~/.zshrc</code>, <code className="text-zinc-300">~/.bashrc</code>)</p>
558
- </div>
559
-
560
- <div className="p-4 rounded-lg border border-zinc-800 bg-zinc-900/50">
561
- <h4 className="text-white font-bold mb-2">"No identity found"</h4>
562
- <CodeBlock code="gssh identity init --label 'My Device'" />
563
- </div>
564
-
565
- <div className="p-4 rounded-lg border border-zinc-800 bg-zinc-900/50">
566
- <h4 className="text-white font-bold mb-2">"Failed to unlock identity"</h4>
567
- <p className="text-zinc-400 text-sm mb-2">You're entering the wrong password. If forgotten, recreate:</p>
568
- <CodeBlock code="gssh identity init --force" />
569
- <p className="text-zinc-500 text-sm">Warning: This invalidates existing invites and access grants</p>
570
- </div>
571
-
572
- <div className="p-4 rounded-lg border border-zinc-800 bg-zinc-900/50">
573
- <h4 className="text-white font-bold mb-2">"Machine offline"</h4>
574
- <ul className="list-disc list-inside text-zinc-400 text-sm space-y-1 ml-2">
575
- <li>Ensure <code className="text-zinc-300">gssh serve</code> is running on the target machine</li>
576
- <li>Check the machine can reach the relay URL</li>
577
- <li>Verify the machine is authorized on the relay</li>
578
- </ul>
579
- </div>
580
-
581
- <div className="p-4 rounded-lg border border-zinc-800 bg-zinc-900/50">
582
- <h4 className="text-white font-bold mb-2">"Client not authorized"</h4>
583
- <p className="text-zinc-400 text-sm mb-2">You need an invite or your public key must be added:</p>
584
- <CodeBlock code="gssh access add <your-public-key> --label 'Name'" />
585
- </div>
586
-
587
- <div className="p-4 rounded-lg border border-zinc-800 bg-zinc-900/50">
588
- <h4 className="text-white font-bold mb-2">"Invite expired"</h4>
589
- <p className="text-zinc-400 text-sm mb-2">Create a new invite with longer expiration:</p>
590
- <CodeBlock code="gssh share create --expires 7d" />
591
- </div>
592
-
593
- <div className="p-4 rounded-lg border border-zinc-800 bg-zinc-900/50">
594
- <h4 className="text-white font-bold mb-2">"GitHub CLI not authenticated"</h4>
595
- <CodeBlock code="gh auth login" />
596
- </div>
597
- </div>
598
- </div>
599
- );
600
-
601
- case "security":
602
- return (
603
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
604
- <h1 className="text-4xl font-bold mb-6">Security</h1>
605
-
606
- <div className="space-y-8">
607
- <div className="p-6 rounded-xl bg-green-500/5 border border-green-500/20">
608
- <h3 className="font-bold text-green-400 mb-2">End-to-End Encrypted</h3>
609
- <p className="text-zinc-400 text-sm leading-relaxed">
610
- Terminal traffic encrypted with AES-256-GCM. Relay cannot decrypt.
611
- </p>
612
- </div>
613
-
614
- <div className="p-6 rounded-xl bg-blue-500/5 border border-blue-500/20">
615
- <h3 className="font-bold text-blue-400 mb-2">Cryptographic Identity</h3>
616
- <p className="text-zinc-400 text-sm leading-relaxed">
617
- Ed25519 signing + X25519 key exchange. No passwords for authentication.
618
- </p>
619
- </div>
620
-
621
- <div className="p-6 rounded-xl bg-purple-500/5 border border-purple-500/20">
622
- <h3 className="font-bold text-purple-400 mb-2">X3DH Handshake</h3>
623
- <p className="text-zinc-400 text-sm leading-relaxed">
624
- Session keys derived per-connection for forward secrecy.
625
- </p>
626
- </div>
627
-
628
- <div className="p-6 rounded-xl bg-yellow-500/5 border border-yellow-500/20">
629
- <h3 className="font-bold text-yellow-500 mb-3">Current Limitations</h3>
630
- <ul className="list-disc list-inside space-y-3 text-zinc-400 text-sm leading-relaxed">
631
- <li>
632
- <strong className="text-white">Client proof-of-possession</strong>: The handshake doesn't fully enforce that the client possesses the private key corresponding to their claimed public key. If an attacker learns an authorized public key, ACL identity spoofing is theoretically possible.
633
- </li>
634
- <li>
635
- <strong className="text-white">Permission enforcement</strong>: Permission flags (<code className="text-zinc-300">read</code>/<code className="text-zinc-300">write</code>/<code className="text-zinc-300">manage</code>) are not fully enforced server-side after the handshake completes. "View-only" access should be treated as intended behavior rather than a strict security guarantee.
636
- </li>
637
- </ul>
638
- <p className="text-zinc-500 text-sm mt-4">These limitations are being addressed in future releases.</p>
639
- </div>
640
- </div>
641
- </div>
642
- );
643
-
644
- case "glossary":
645
- return (
646
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
647
- <h1 className="text-4xl font-bold mb-6">Glossary</h1>
648
-
649
- <dl className="grid gap-6">
650
- <div>
651
- <dt className="text-white font-bold mb-1">Machine</dt>
652
- <dd className="text-zinc-400 text-sm">Device running <code className="text-zinc-300">gssh serve</code></dd>
653
- </div>
654
- <div>
655
- <dt className="text-white font-bold mb-1">Client</dt>
656
- <dd className="text-zinc-400 text-sm">Device connecting via browser or CLI</dd>
657
- </div>
658
- <div>
659
- <dt className="text-white font-bold mb-1">Relay</dt>
660
- <dd className="text-zinc-400 text-sm">WebSocket router (default: <code className="text-zinc-300">wss://relay.gitspace.sh</code>)</dd>
661
- </div>
662
- <div>
663
- <dt className="text-white font-bold mb-1">Relay Identity</dt>
664
- <dd className="text-zinc-400 text-sm">Ed25519 keypair used by the relay to sign messages and challenges</dd>
665
- </div>
666
- <div>
667
- <dt className="text-white font-bold mb-1">Authorized Machine</dt>
668
- <dd className="text-zinc-400 text-sm">Machine public key approved to register with a relay</dd>
669
- </div>
670
- <div>
671
- <dt className="text-white font-bold mb-1">Identity</dt>
672
- <dd className="text-zinc-400 text-sm">Ed25519 signing + X25519 key exchange keypairs, encrypted at rest</dd>
673
- </div>
674
- <div>
675
- <dt className="text-white font-bold mb-1">Invite</dt>
676
- <dd className="text-zinc-400 text-sm">Signed token that bootstraps trust and enables first connection</dd>
677
- </div>
678
- <div>
679
- <dt className="text-white font-bold mb-1">ACL (Access Control List)</dt>
680
- <dd className="text-zinc-400 text-sm">Machine-managed list of authorized client identities</dd>
681
- </div>
682
- <div>
683
- <dt className="text-white font-bold mb-1">X3DH</dt>
684
- <dd className="text-zinc-400 text-sm">Extended Triple Diffie-Hellman handshake for session key establishment</dd>
685
- </div>
686
- <div>
687
- <dt className="text-white font-bold mb-1">PTY</dt>
688
- <dd className="text-zinc-400 text-sm">Pseudo-terminal, the interface between your shell and the terminal</dd>
689
- </div>
690
- <div>
691
- <dt className="text-white font-bold mb-1">Worktree</dt>
692
- <dd className="text-zinc-400 text-sm">Git feature allowing multiple working directories for one repository</dd>
693
- </div>
694
- <div>
695
- <dt className="text-white font-bold mb-1">Bundle</dt>
696
- <dd className="text-zinc-400 text-sm">Repository configuration package for team onboarding</dd>
697
- </div>
698
- <div>
699
- <dt className="text-white font-bold mb-1">Session</dt>
700
- <dd className="text-zinc-400 text-sm">A terminal session managed by tmux-lite on the server</dd>
701
- </div>
702
- <div>
703
- <dt className="text-white font-bold mb-1">TUI</dt>
704
- <dd className="text-zinc-400 text-sm">Terminal User Interface, the interactive <code className="text-zinc-300">gssh</code> interface</dd>
705
- </div>
706
- <div>
707
- <dt className="text-white font-bold mb-1">tmux-lite</dt>
708
- <dd className="text-zinc-400 text-sm">Built-in terminal multiplexer for managing sessions</dd>
709
- </div>
710
- <div>
711
- <dt className="text-white font-bold mb-1">Subdomain</dt>
712
- <dd className="text-zinc-400 text-sm">Your custom URL on gitspace.sh (e.g., <code className="text-zinc-300">yourname.gitspace.sh</code>)</dd>
713
- </div>
714
- </dl>
715
- </div>
716
- );
717
-
718
- case "linear-integration":
719
- return (
720
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
721
- <h1 className="text-4xl font-bold mb-6">Linear Integration</h1>
722
-
723
- <p className="text-zinc-400 mb-8">
724
- GitSpace integrates with Linear to create workspaces directly from issues. Configure Linear at the user level,
725
- then optionally customize per-project.
726
- </p>
727
-
728
- <h3 className="text-xl font-semibold text-white mb-4">Setup</h3>
729
- <p className="text-zinc-400 mb-4">
730
- Run the setup wizard to configure your Linear API key and select teams:
731
- </p>
732
- <CodeBlock code="gssh linear setup" />
733
-
734
- <p className="text-zinc-400 mb-4">
735
- The wizard will:
736
- </p>
737
- <ul className="list-disc list-inside space-y-2 text-zinc-400 mb-8 ml-2">
738
- <li>Prompt for your Linear API key (stored securely in OS keychain)</li>
739
- <li>Fetch available teams from Linear</li>
740
- <li>Let you select which teams to work with</li>
741
- <li>Set a default team for new projects</li>
742
- </ul>
743
-
744
- <h3 className="text-xl font-semibold text-white mb-4">Project-Level Configuration</h3>
745
- <p className="text-zinc-400 mb-4">
746
- Configure Linear for a specific project:
747
- </p>
748
- <CodeBlock code="gssh linear setup --project myapp" />
749
-
750
- <p className="text-zinc-400 mb-4">
751
- You can choose to:
752
- </p>
753
- <ul className="list-disc list-inside space-y-2 text-zinc-400 mb-8 ml-2">
754
- <li><strong className="text-zinc-300">Use user-level API key</strong> - Inherit from your global config and select which teams to use</li>
755
- <li><strong className="text-zinc-300">Use project-specific API key</strong> - Enter a different API key for this project (useful for different Linear workspaces)</li>
756
- </ul>
757
-
758
- <h3 className="text-xl font-semibold text-white mb-4">Commands</h3>
759
- <CodeBlock code={`gssh linear setup # User-level setup wizard
760
- gssh linear setup --project app # Project-specific config (key + teams)
761
- gssh linear show # Show user-level config
762
- gssh linear show --project app # Show project config
763
- gssh linear clear # Clear user-level config
764
- gssh linear clear --project app # Clear project config (including API key)`} multiLine language="bash" />
765
-
766
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">Creating Workspaces from Issues</h3>
767
- <p className="text-zinc-400 mb-4">
768
- Once configured, you can create workspaces from Linear issues:
769
- </p>
770
- <ul className="list-disc list-inside space-y-2 text-zinc-400 mb-8 ml-2">
771
- <li>In the TUI, select "Create from Linear issue" when adding a workspace</li>
772
- <li>Or use the CLI: <code className="text-zinc-300">gssh add</code> and select "Create from Linear issue"</li>
773
- </ul>
774
-
775
- <p className="text-zinc-400 mb-4">
776
- The workspace will be named using the issue identifier and title, and issue details will be saved
777
- to <code className="text-zinc-300">.prompt/issue.md</code> in the workspace.
778
- </p>
779
-
780
- <h3 className="text-xl font-semibold text-white mb-4 mt-8">Getting Your API Key</h3>
781
- <p className="text-zinc-400 mb-4">
782
- To get your Linear API key:
783
- </p>
784
- <ol className="list-decimal list-inside space-y-2 text-zinc-400 mb-8 ml-2">
785
- <li>Go to Linear → Settings → API</li>
786
- <li>Under "Personal API keys", click "Create key"</li>
787
- <li>Give it a name (e.g., "GitSpace")</li>
788
- <li>Copy the key and paste it when prompted by <code className="text-zinc-300">gssh linear setup</code></li>
789
- </ol>
790
- </div>
791
- );
792
-
793
- default:
794
- return (
795
- <div className="max-w-3xl animate-in fade-in slide-in-from-bottom-4 duration-500">
796
- <h1 className="text-4xl font-bold mb-6">Documentation</h1>
797
- <p className="text-zinc-400">Select a section from the sidebar to get started.</p>
798
- </div>
799
- );
800
- }
801
- }