parasor 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (633) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +208 -0
  3. package/THIRD-PARTY-NOTICES.md +138 -0
  4. package/bin/parasor.mjs +3 -0
  5. package/node_modules/@parasor/shared/dist/client.d.ts +8 -0
  6. package/node_modules/@parasor/shared/dist/client.d.ts.map +1 -0
  7. package/node_modules/@parasor/shared/dist/client.js +2 -0
  8. package/node_modules/@parasor/shared/dist/client.js.map +1 -0
  9. package/node_modules/@parasor/shared/dist/drops.d.ts +24 -0
  10. package/node_modules/@parasor/shared/dist/drops.d.ts.map +1 -0
  11. package/node_modules/@parasor/shared/dist/drops.js +2 -0
  12. package/node_modules/@parasor/shared/dist/drops.js.map +1 -0
  13. package/node_modules/@parasor/shared/dist/file-uploads.d.ts +56 -0
  14. package/node_modules/@parasor/shared/dist/file-uploads.d.ts.map +1 -0
  15. package/node_modules/@parasor/shared/dist/file-uploads.js +13 -0
  16. package/node_modules/@parasor/shared/dist/file-uploads.js.map +1 -0
  17. package/node_modules/@parasor/shared/dist/ide-commands.d.ts +8 -0
  18. package/node_modules/@parasor/shared/dist/ide-commands.d.ts.map +1 -0
  19. package/node_modules/@parasor/shared/dist/ide-commands.js +59 -0
  20. package/node_modules/@parasor/shared/dist/ide-commands.js.map +1 -0
  21. package/node_modules/@parasor/shared/dist/pane-commands.d.ts +7 -0
  22. package/node_modules/@parasor/shared/dist/pane-commands.d.ts.map +1 -0
  23. package/node_modules/@parasor/shared/dist/pane-commands.js +47 -0
  24. package/node_modules/@parasor/shared/dist/pane-commands.js.map +1 -0
  25. package/node_modules/@parasor/shared/dist/pane-model.d.ts +63 -0
  26. package/node_modules/@parasor/shared/dist/pane-model.d.ts.map +1 -0
  27. package/node_modules/@parasor/shared/dist/pane-model.js +89 -0
  28. package/node_modules/@parasor/shared/dist/pane-model.js.map +1 -0
  29. package/node_modules/@parasor/shared/dist/panes.d.ts +33 -0
  30. package/node_modules/@parasor/shared/dist/panes.d.ts.map +1 -0
  31. package/node_modules/@parasor/shared/dist/panes.js +2 -0
  32. package/node_modules/@parasor/shared/dist/panes.js.map +1 -0
  33. package/node_modules/@parasor/shared/dist/runtime.d.ts +180 -0
  34. package/node_modules/@parasor/shared/dist/runtime.d.ts.map +1 -0
  35. package/node_modules/@parasor/shared/dist/runtime.js +2 -0
  36. package/node_modules/@parasor/shared/dist/runtime.js.map +1 -0
  37. package/node_modules/@parasor/shared/dist/state.d.ts +192 -0
  38. package/node_modules/@parasor/shared/dist/state.d.ts.map +1 -0
  39. package/node_modules/@parasor/shared/dist/state.js +10 -0
  40. package/node_modules/@parasor/shared/dist/state.js.map +1 -0
  41. package/node_modules/@parasor/shared/dist/terminal.d.ts +191 -0
  42. package/node_modules/@parasor/shared/dist/terminal.d.ts.map +1 -0
  43. package/node_modules/@parasor/shared/dist/terminal.js +174 -0
  44. package/node_modules/@parasor/shared/dist/terminal.js.map +1 -0
  45. package/node_modules/@parasor/shared/dist/types.d.ts +13 -0
  46. package/node_modules/@parasor/shared/dist/types.d.ts.map +1 -0
  47. package/node_modules/@parasor/shared/dist/types.js +13 -0
  48. package/node_modules/@parasor/shared/dist/types.js.map +1 -0
  49. package/node_modules/@parasor/shared/dist/worktree-local-files.d.ts +14 -0
  50. package/node_modules/@parasor/shared/dist/worktree-local-files.d.ts.map +1 -0
  51. package/node_modules/@parasor/shared/dist/worktree-local-files.js +41 -0
  52. package/node_modules/@parasor/shared/dist/worktree-local-files.js.map +1 -0
  53. package/node_modules/@parasor/shared/dist/ws-events.d.ts +152 -0
  54. package/node_modules/@parasor/shared/dist/ws-events.d.ts.map +1 -0
  55. package/node_modules/@parasor/shared/dist/ws-events.js +2 -0
  56. package/node_modules/@parasor/shared/dist/ws-events.js.map +1 -0
  57. package/node_modules/@parasor/shared/package.json +13 -0
  58. package/package.json +61 -0
  59. package/server/agent-detector/agent-state-store.d.ts +23 -0
  60. package/server/agent-detector/agent-state-store.d.ts.map +1 -0
  61. package/server/agent-detector/agent-state-store.js +110 -0
  62. package/server/agent-detector/agent-state-store.js.map +1 -0
  63. package/server/agent-detector/detector.d.ts +80 -0
  64. package/server/agent-detector/detector.d.ts.map +1 -0
  65. package/server/agent-detector/detector.js +219 -0
  66. package/server/agent-detector/detector.js.map +1 -0
  67. package/server/agent-detector/event-map.d.ts +25 -0
  68. package/server/agent-detector/event-map.d.ts.map +1 -0
  69. package/server/agent-detector/event-map.js +136 -0
  70. package/server/agent-detector/event-map.js.map +1 -0
  71. package/server/agent-detector/manual-agent-tracker.d.ts +19 -0
  72. package/server/agent-detector/manual-agent-tracker.d.ts.map +1 -0
  73. package/server/agent-detector/manual-agent-tracker.js +123 -0
  74. package/server/agent-detector/manual-agent-tracker.js.map +1 -0
  75. package/server/agent-detector/output-eligibility.d.ts +3 -0
  76. package/server/agent-detector/output-eligibility.d.ts.map +1 -0
  77. package/server/agent-detector/output-eligibility.js +39 -0
  78. package/server/agent-detector/output-eligibility.js.map +1 -0
  79. package/server/application/files/errors.d.ts +28 -0
  80. package/server/application/files/errors.d.ts.map +1 -0
  81. package/server/application/files/errors.js +55 -0
  82. package/server/application/files/errors.js.map +1 -0
  83. package/server/application/files/local-filesystem.d.ts +36 -0
  84. package/server/application/files/local-filesystem.d.ts.map +1 -0
  85. package/server/application/files/local-filesystem.js +171 -0
  86. package/server/application/files/local-filesystem.js.map +1 -0
  87. package/server/application/files/project-file-queries.d.ts +16 -0
  88. package/server/application/files/project-file-queries.d.ts.map +1 -0
  89. package/server/application/files/project-file-queries.js +126 -0
  90. package/server/application/files/project-file-queries.js.map +1 -0
  91. package/server/application/integrations/errors.d.ts +16 -0
  92. package/server/application/integrations/errors.d.ts.map +1 -0
  93. package/server/application/integrations/errors.js +31 -0
  94. package/server/application/integrations/errors.js.map +1 -0
  95. package/server/application/integrations/hook-notify.d.ts +32 -0
  96. package/server/application/integrations/hook-notify.d.ts.map +1 -0
  97. package/server/application/integrations/hook-notify.js +118 -0
  98. package/server/application/integrations/hook-notify.js.map +1 -0
  99. package/server/application/integrations/open-url.d.ts +11 -0
  100. package/server/application/integrations/open-url.d.ts.map +1 -0
  101. package/server/application/integrations/open-url.js +23 -0
  102. package/server/application/integrations/open-url.js.map +1 -0
  103. package/server/application/ports.d.ts +11 -0
  104. package/server/application/ports.d.ts.map +1 -0
  105. package/server/application/ports.js +2 -0
  106. package/server/application/ports.js.map +1 -0
  107. package/server/application/workspace/errors.d.ts +21 -0
  108. package/server/application/workspace/errors.d.ts.map +1 -0
  109. package/server/application/workspace/errors.js +21 -0
  110. package/server/application/workspace/errors.js.map +1 -0
  111. package/server/application/workspace/pane-commands.d.ts +47 -0
  112. package/server/application/workspace/pane-commands.d.ts.map +1 -0
  113. package/server/application/workspace/pane-commands.js +193 -0
  114. package/server/application/workspace/pane-commands.js.map +1 -0
  115. package/server/application/workspace/project-commands.d.ts +34 -0
  116. package/server/application/workspace/project-commands.d.ts.map +1 -0
  117. package/server/application/workspace/project-commands.js +81 -0
  118. package/server/application/workspace/project-commands.js.map +1 -0
  119. package/server/application/workspace/project-queries.d.ts +21 -0
  120. package/server/application/workspace/project-queries.d.ts.map +1 -0
  121. package/server/application/workspace/project-queries.js +216 -0
  122. package/server/application/workspace/project-queries.js.map +1 -0
  123. package/server/application/workspace/session-commands.d.ts +24 -0
  124. package/server/application/workspace/session-commands.d.ts.map +1 -0
  125. package/server/application/workspace/session-commands.js +123 -0
  126. package/server/application/workspace/session-commands.js.map +1 -0
  127. package/server/application/workspace/session-queries.d.ts +14 -0
  128. package/server/application/workspace/session-queries.d.ts.map +1 -0
  129. package/server/application/workspace/session-queries.js +47 -0
  130. package/server/application/workspace/session-queries.js.map +1 -0
  131. package/server/application/workspace/worktree-commands.d.ts +98 -0
  132. package/server/application/workspace/worktree-commands.d.ts.map +1 -0
  133. package/server/application/workspace/worktree-commands.js +323 -0
  134. package/server/application/workspace/worktree-commands.js.map +1 -0
  135. package/server/application/workspace/worktree-local-files.d.ts +11 -0
  136. package/server/application/workspace/worktree-local-files.d.ts.map +1 -0
  137. package/server/application/workspace/worktree-local-files.js +223 -0
  138. package/server/application/workspace/worktree-local-files.js.map +1 -0
  139. package/server/application/workspace/worktree-reconcile.d.ts +21 -0
  140. package/server/application/workspace/worktree-reconcile.d.ts.map +1 -0
  141. package/server/application/workspace/worktree-reconcile.js +49 -0
  142. package/server/application/workspace/worktree-reconcile.js.map +1 -0
  143. package/server/auth/origin.d.ts +17 -0
  144. package/server/auth/origin.d.ts.map +1 -0
  145. package/server/auth/origin.js +93 -0
  146. package/server/auth/origin.js.map +1 -0
  147. package/server/auth/pairing-token.d.ts +28 -0
  148. package/server/auth/pairing-token.d.ts.map +1 -0
  149. package/server/auth/pairing-token.js +46 -0
  150. package/server/auth/pairing-token.js.map +1 -0
  151. package/server/auth/token-exchange.d.ts +11 -0
  152. package/server/auth/token-exchange.d.ts.map +1 -0
  153. package/server/auth/token-exchange.js +27 -0
  154. package/server/auth/token-exchange.js.map +1 -0
  155. package/server/auth/token.d.ts +18 -0
  156. package/server/auth/token.d.ts.map +1 -0
  157. package/server/auth/token.js +115 -0
  158. package/server/auth/token.js.map +1 -0
  159. package/server/bootstrap/create-app-server.d.ts +49 -0
  160. package/server/bootstrap/create-app-server.d.ts.map +1 -0
  161. package/server/bootstrap/create-app-server.js +154 -0
  162. package/server/bootstrap/create-app-server.js.map +1 -0
  163. package/server/bootstrap/project-runtime.d.ts +29 -0
  164. package/server/bootstrap/project-runtime.d.ts.map +1 -0
  165. package/server/bootstrap/project-runtime.js +253 -0
  166. package/server/bootstrap/project-runtime.js.map +1 -0
  167. package/server/bootstrap/pty-env.d.ts +3 -0
  168. package/server/bootstrap/pty-env.d.ts.map +1 -0
  169. package/server/bootstrap/pty-env.js +15 -0
  170. package/server/bootstrap/pty-env.js.map +1 -0
  171. package/server/bootstrap/reconcile-state.d.ts +16 -0
  172. package/server/bootstrap/reconcile-state.d.ts.map +1 -0
  173. package/server/bootstrap/reconcile-state.js +73 -0
  174. package/server/bootstrap/reconcile-state.js.map +1 -0
  175. package/server/bootstrap/runtime-loops.d.ts +51 -0
  176. package/server/bootstrap/runtime-loops.d.ts.map +1 -0
  177. package/server/bootstrap/runtime-loops.js +189 -0
  178. package/server/bootstrap/runtime-loops.js.map +1 -0
  179. package/server/bootstrap/runtime-port.d.ts +4 -0
  180. package/server/bootstrap/runtime-port.d.ts.map +1 -0
  181. package/server/bootstrap/runtime-port.js +52 -0
  182. package/server/bootstrap/runtime-port.js.map +1 -0
  183. package/server/bootstrap/safety-gate.d.ts +22 -0
  184. package/server/bootstrap/safety-gate.d.ts.map +1 -0
  185. package/server/bootstrap/safety-gate.js +43 -0
  186. package/server/bootstrap/safety-gate.js.map +1 -0
  187. package/server/bootstrap/shutdown-marker.d.ts +35 -0
  188. package/server/bootstrap/shutdown-marker.d.ts.map +1 -0
  189. package/server/bootstrap/shutdown-marker.js +100 -0
  190. package/server/bootstrap/shutdown-marker.js.map +1 -0
  191. package/server/bootstrap/shutdown-runtime.d.ts +62 -0
  192. package/server/bootstrap/shutdown-runtime.d.ts.map +1 -0
  193. package/server/bootstrap/shutdown-runtime.js +66 -0
  194. package/server/bootstrap/shutdown-runtime.js.map +1 -0
  195. package/server/bootstrap/startup-banner.d.ts +34 -0
  196. package/server/bootstrap/startup-banner.d.ts.map +1 -0
  197. package/server/bootstrap/startup-banner.js +114 -0
  198. package/server/bootstrap/startup-banner.js.map +1 -0
  199. package/server/bootstrap/wire-runtime.d.ts +42 -0
  200. package/server/bootstrap/wire-runtime.d.ts.map +1 -0
  201. package/server/bootstrap/wire-runtime.js +205 -0
  202. package/server/bootstrap/wire-runtime.js.map +1 -0
  203. package/server/cli/help.d.ts +3 -0
  204. package/server/cli/help.d.ts.map +1 -0
  205. package/server/cli/help.js +39 -0
  206. package/server/cli/help.js.map +1 -0
  207. package/server/cli/hook-client.d.ts +12 -0
  208. package/server/cli/hook-client.d.ts.map +1 -0
  209. package/server/cli/hook-client.js +81 -0
  210. package/server/cli/hook-client.js.map +1 -0
  211. package/server/cli/hook.d.ts +3 -0
  212. package/server/cli/hook.d.ts.map +1 -0
  213. package/server/cli/hook.js +152 -0
  214. package/server/cli/hook.js.map +1 -0
  215. package/server/cli/main.d.ts +2 -0
  216. package/server/cli/main.d.ts.map +1 -0
  217. package/server/cli/main.js +133 -0
  218. package/server/cli/main.js.map +1 -0
  219. package/server/cli/notify.d.ts +19 -0
  220. package/server/cli/notify.d.ts.map +1 -0
  221. package/server/cli/notify.js +77 -0
  222. package/server/cli/notify.js.map +1 -0
  223. package/server/cli/open.d.ts +2 -0
  224. package/server/cli/open.d.ts.map +1 -0
  225. package/server/cli/open.js +47 -0
  226. package/server/cli/open.js.map +1 -0
  227. package/server/cli/probe-daemon-version.d.ts +46 -0
  228. package/server/cli/probe-daemon-version.d.ts.map +1 -0
  229. package/server/cli/probe-daemon-version.js +167 -0
  230. package/server/cli/probe-daemon-version.js.map +1 -0
  231. package/server/cli/pty-host.d.ts +36 -0
  232. package/server/cli/pty-host.d.ts.map +1 -0
  233. package/server/cli/pty-host.js +390 -0
  234. package/server/cli/pty-host.js.map +1 -0
  235. package/server/cli/qr.d.ts +2 -0
  236. package/server/cli/qr.d.ts.map +1 -0
  237. package/server/cli/qr.js +70 -0
  238. package/server/cli/qr.js.map +1 -0
  239. package/server/cli/restart-confirm.d.ts +33 -0
  240. package/server/cli/restart-confirm.d.ts.map +1 -0
  241. package/server/cli/restart-confirm.js +107 -0
  242. package/server/cli/restart-confirm.js.map +1 -0
  243. package/server/cli/restart.d.ts +17 -0
  244. package/server/cli/restart.d.ts.map +1 -0
  245. package/server/cli/restart.js +145 -0
  246. package/server/cli/restart.js.map +1 -0
  247. package/server/cli/service-darwin.d.ts +70 -0
  248. package/server/cli/service-darwin.d.ts.map +1 -0
  249. package/server/cli/service-darwin.js +562 -0
  250. package/server/cli/service-darwin.js.map +1 -0
  251. package/server/cli/service-linux.d.ts +81 -0
  252. package/server/cli/service-linux.d.ts.map +1 -0
  253. package/server/cli/service-linux.js +412 -0
  254. package/server/cli/service-linux.js.map +1 -0
  255. package/server/cli/service.d.ts +33 -0
  256. package/server/cli/service.d.ts.map +1 -0
  257. package/server/cli/service.js +133 -0
  258. package/server/cli/service.js.map +1 -0
  259. package/server/cli/shim-installer.d.ts +35 -0
  260. package/server/cli/shim-installer.d.ts.map +1 -0
  261. package/server/cli/shim-installer.js +662 -0
  262. package/server/cli/shim-installer.js.map +1 -0
  263. package/server/cli/shim-open.d.ts +2 -0
  264. package/server/cli/shim-open.d.ts.map +1 -0
  265. package/server/cli/shim-open.js +128 -0
  266. package/server/cli/shim-open.js.map +1 -0
  267. package/server/cli/shutdown-deps.d.ts +41 -0
  268. package/server/cli/shutdown-deps.d.ts.map +1 -0
  269. package/server/cli/shutdown-deps.js +158 -0
  270. package/server/cli/shutdown-deps.js.map +1 -0
  271. package/server/cli/stop.d.ts +11 -0
  272. package/server/cli/stop.d.ts.map +1 -0
  273. package/server/cli/stop.js +123 -0
  274. package/server/cli/stop.js.map +1 -0
  275. package/server/cli/unknown-command.d.ts +8 -0
  276. package/server/cli/unknown-command.d.ts.map +1 -0
  277. package/server/cli/unknown-command.js +14 -0
  278. package/server/cli/unknown-command.js.map +1 -0
  279. package/server/debug/agent-status-recorder.d.ts +57 -0
  280. package/server/debug/agent-status-recorder.d.ts.map +1 -0
  281. package/server/debug/agent-status-recorder.js +209 -0
  282. package/server/debug/agent-status-recorder.js.map +1 -0
  283. package/server/debug/terminal-trace-recorder.d.ts +41 -0
  284. package/server/debug/terminal-trace-recorder.d.ts.map +1 -0
  285. package/server/debug/terminal-trace-recorder.js +112 -0
  286. package/server/debug/terminal-trace-recorder.js.map +1 -0
  287. package/server/fonts/catalog.d.ts +35 -0
  288. package/server/fonts/catalog.d.ts.map +1 -0
  289. package/server/fonts/catalog.js +76 -0
  290. package/server/fonts/catalog.js.map +1 -0
  291. package/server/fonts/installer.d.ts +45 -0
  292. package/server/fonts/installer.d.ts.map +1 -0
  293. package/server/fonts/installer.js +201 -0
  294. package/server/fonts/installer.js.map +1 -0
  295. package/server/fonts/routes.d.ts +4 -0
  296. package/server/fonts/routes.d.ts.map +1 -0
  297. package/server/fonts/routes.js +91 -0
  298. package/server/fonts/routes.js.map +1 -0
  299. package/server/fs/drops.d.ts +50 -0
  300. package/server/fs/drops.d.ts.map +1 -0
  301. package/server/fs/drops.js +137 -0
  302. package/server/fs/drops.js.map +1 -0
  303. package/server/fs/file-uploads.d.ts +57 -0
  304. package/server/fs/file-uploads.d.ts.map +1 -0
  305. package/server/fs/file-uploads.js +214 -0
  306. package/server/fs/file-uploads.js.map +1 -0
  307. package/server/fs/file-watcher.d.ts +22 -0
  308. package/server/fs/file-watcher.d.ts.map +1 -0
  309. package/server/fs/file-watcher.js +105 -0
  310. package/server/fs/file-watcher.js.map +1 -0
  311. package/server/fs/git-watcher.d.ts +76 -0
  312. package/server/fs/git-watcher.d.ts.map +1 -0
  313. package/server/fs/git-watcher.js +356 -0
  314. package/server/fs/git-watcher.js.map +1 -0
  315. package/server/fs/media.d.ts +35 -0
  316. package/server/fs/media.d.ts.map +1 -0
  317. package/server/fs/media.js +271 -0
  318. package/server/fs/media.js.map +1 -0
  319. package/server/fs/service.d.ts +97 -0
  320. package/server/fs/service.d.ts.map +1 -0
  321. package/server/fs/service.js +306 -0
  322. package/server/fs/service.js.map +1 -0
  323. package/server/fs/upload-staging.d.ts +76 -0
  324. package/server/fs/upload-staging.d.ts.map +1 -0
  325. package/server/fs/upload-staging.js +283 -0
  326. package/server/fs/upload-staging.js.map +1 -0
  327. package/server/fs/watcher-lifecycle.d.ts +24 -0
  328. package/server/fs/watcher-lifecycle.d.ts.map +1 -0
  329. package/server/fs/watcher-lifecycle.js +105 -0
  330. package/server/fs/watcher-lifecycle.js.map +1 -0
  331. package/server/index.d.ts +17 -0
  332. package/server/index.d.ts.map +1 -0
  333. package/server/index.js +510 -0
  334. package/server/index.js.map +1 -0
  335. package/server/ipc/socket-server.d.ts +28 -0
  336. package/server/ipc/socket-server.d.ts.map +1 -0
  337. package/server/ipc/socket-server.js +206 -0
  338. package/server/ipc/socket-server.js.map +1 -0
  339. package/server/lib/git-exec.d.ts +38 -0
  340. package/server/lib/git-exec.d.ts.map +1 -0
  341. package/server/lib/git-exec.js +96 -0
  342. package/server/lib/git-exec.js.map +1 -0
  343. package/server/lib/open-in-ide.d.ts +22 -0
  344. package/server/lib/open-in-ide.d.ts.map +1 -0
  345. package/server/lib/open-in-ide.js +90 -0
  346. package/server/lib/open-in-ide.js.map +1 -0
  347. package/server/lib/open-in-os.d.ts +20 -0
  348. package/server/lib/open-in-os.d.ts.map +1 -0
  349. package/server/lib/open-in-os.js +51 -0
  350. package/server/lib/open-in-os.js.map +1 -0
  351. package/server/lib/path.d.ts +2 -0
  352. package/server/lib/path.d.ts.map +1 -0
  353. package/server/lib/path.js +10 -0
  354. package/server/lib/path.js.map +1 -0
  355. package/server/lib/promise-mutex.d.ts +7 -0
  356. package/server/lib/promise-mutex.d.ts.map +1 -0
  357. package/server/lib/promise-mutex.js +26 -0
  358. package/server/lib/promise-mutex.js.map +1 -0
  359. package/server/lib/sd-notify.d.ts +8 -0
  360. package/server/lib/sd-notify.d.ts.map +1 -0
  361. package/server/lib/sd-notify.js +27 -0
  362. package/server/lib/sd-notify.js.map +1 -0
  363. package/server/net/local-machine.d.ts +7 -0
  364. package/server/net/local-machine.d.ts.map +1 -0
  365. package/server/net/local-machine.js +79 -0
  366. package/server/net/local-machine.js.map +1 -0
  367. package/server/net/reachable-host.d.ts +12 -0
  368. package/server/net/reachable-host.d.ts.map +1 -0
  369. package/server/net/reachable-host.js +25 -0
  370. package/server/net/reachable-host.js.map +1 -0
  371. package/server/network/endpoints.d.ts +14 -0
  372. package/server/network/endpoints.d.ts.map +1 -0
  373. package/server/network/endpoints.js +104 -0
  374. package/server/network/endpoints.js.map +1 -0
  375. package/server/network/qr.d.ts +16 -0
  376. package/server/network/qr.d.ts.map +1 -0
  377. package/server/network/qr.js +89 -0
  378. package/server/network/qr.js.map +1 -0
  379. package/server/port-forwarder/forwarder.d.ts +47 -0
  380. package/server/port-forwarder/forwarder.d.ts.map +1 -0
  381. package/server/port-forwarder/forwarder.js +159 -0
  382. package/server/port-forwarder/forwarder.js.map +1 -0
  383. package/server/port-scanner/scanner.d.ts +24 -0
  384. package/server/port-scanner/scanner.d.ts.map +1 -0
  385. package/server/port-scanner/scanner.js +193 -0
  386. package/server/port-scanner/scanner.js.map +1 -0
  387. package/server/pty/connection-lifecycle.d.ts +50 -0
  388. package/server/pty/connection-lifecycle.d.ts.map +1 -0
  389. package/server/pty/connection-lifecycle.js +113 -0
  390. package/server/pty/connection-lifecycle.js.map +1 -0
  391. package/server/pty/daemon-connect.d.ts +52 -0
  392. package/server/pty/daemon-connect.d.ts.map +1 -0
  393. package/server/pty/daemon-connect.js +62 -0
  394. package/server/pty/daemon-connect.js.map +1 -0
  395. package/server/pty/handshake-timeout-race.d.ts +22 -0
  396. package/server/pty/handshake-timeout-race.d.ts.map +1 -0
  397. package/server/pty/handshake-timeout-race.js +23 -0
  398. package/server/pty/handshake-timeout-race.js.map +1 -0
  399. package/server/pty/headless-replay-snapshot.d.ts +28 -0
  400. package/server/pty/headless-replay-snapshot.d.ts.map +1 -0
  401. package/server/pty/headless-replay-snapshot.js +285 -0
  402. package/server/pty/headless-replay-snapshot.js.map +1 -0
  403. package/server/pty/headless-terminal-state-cache.d.ts +31 -0
  404. package/server/pty/headless-terminal-state-cache.d.ts.map +1 -0
  405. package/server/pty/headless-terminal-state-cache.js +119 -0
  406. package/server/pty/headless-terminal-state-cache.js.map +1 -0
  407. package/server/pty/hello-ack-validator.d.ts +15 -0
  408. package/server/pty/hello-ack-validator.d.ts.map +1 -0
  409. package/server/pty/hello-ack-validator.js +30 -0
  410. package/server/pty/hello-ack-validator.js.map +1 -0
  411. package/server/pty/host-daemon/bootstrap.d.ts +100 -0
  412. package/server/pty/host-daemon/bootstrap.d.ts.map +1 -0
  413. package/server/pty/host-daemon/bootstrap.js +611 -0
  414. package/server/pty/host-daemon/bootstrap.js.map +1 -0
  415. package/server/pty/host-daemon/daemon.d.ts +111 -0
  416. package/server/pty/host-daemon/daemon.d.ts.map +1 -0
  417. package/server/pty/host-daemon/daemon.js +648 -0
  418. package/server/pty/host-daemon/daemon.js.map +1 -0
  419. package/server/pty/host-daemon/entry.d.ts +3 -0
  420. package/server/pty/host-daemon/entry.d.ts.map +1 -0
  421. package/server/pty/host-daemon/entry.js +72 -0
  422. package/server/pty/host-daemon/entry.js.map +1 -0
  423. package/server/pty/host-daemon/lockfile.d.ts +12 -0
  424. package/server/pty/host-daemon/lockfile.d.ts.map +1 -0
  425. package/server/pty/host-daemon/lockfile.js +120 -0
  426. package/server/pty/host-daemon/lockfile.js.map +1 -0
  427. package/server/pty/host-daemon/mode-marker.d.ts +77 -0
  428. package/server/pty/host-daemon/mode-marker.d.ts.map +1 -0
  429. package/server/pty/host-daemon/mode-marker.js +228 -0
  430. package/server/pty/host-daemon/mode-marker.js.map +1 -0
  431. package/server/pty/host-daemon/orphan-cleanup.d.ts +42 -0
  432. package/server/pty/host-daemon/orphan-cleanup.d.ts.map +1 -0
  433. package/server/pty/host-daemon/orphan-cleanup.js +84 -0
  434. package/server/pty/host-daemon/orphan-cleanup.js.map +1 -0
  435. package/server/pty/host-daemon/paths.d.ts +10 -0
  436. package/server/pty/host-daemon/paths.d.ts.map +1 -0
  437. package/server/pty/host-daemon/paths.js +56 -0
  438. package/server/pty/host-daemon/paths.js.map +1 -0
  439. package/server/pty/host-daemon/server-connection.d.ts +44 -0
  440. package/server/pty/host-daemon/server-connection.d.ts.map +1 -0
  441. package/server/pty/host-daemon/server-connection.js +100 -0
  442. package/server/pty/host-daemon/server-connection.js.map +1 -0
  443. package/server/pty/host-daemon/service-detection.d.ts +24 -0
  444. package/server/pty/host-daemon/service-detection.d.ts.map +1 -0
  445. package/server/pty/host-daemon/service-detection.js +16 -0
  446. package/server/pty/host-daemon/service-detection.js.map +1 -0
  447. package/server/pty/host-daemon/socket-ready.d.ts +22 -0
  448. package/server/pty/host-daemon/socket-ready.d.ts.map +1 -0
  449. package/server/pty/host-daemon/socket-ready.js +33 -0
  450. package/server/pty/host-daemon/socket-ready.js.map +1 -0
  451. package/server/pty/host-daemon/spawn-daemon.d.ts +45 -0
  452. package/server/pty/host-daemon/spawn-daemon.d.ts.map +1 -0
  453. package/server/pty/host-daemon/spawn-daemon.js +155 -0
  454. package/server/pty/host-daemon/spawn-daemon.js.map +1 -0
  455. package/server/pty/host-daemon/terminate-daemon.d.ts +16 -0
  456. package/server/pty/host-daemon/terminate-daemon.d.ts.map +1 -0
  457. package/server/pty/host-daemon/terminate-daemon.js +128 -0
  458. package/server/pty/host-daemon/terminate-daemon.js.map +1 -0
  459. package/server/pty/host-protocol/frames.d.ts +110 -0
  460. package/server/pty/host-protocol/frames.d.ts.map +1 -0
  461. package/server/pty/host-protocol/frames.js +255 -0
  462. package/server/pty/host-protocol/frames.js.map +1 -0
  463. package/server/pty/host-protocol/messages.d.ts +140 -0
  464. package/server/pty/host-protocol/messages.d.ts.map +1 -0
  465. package/server/pty/host-protocol/messages.js +117 -0
  466. package/server/pty/host-protocol/messages.js.map +1 -0
  467. package/server/pty/host.d.ts +273 -0
  468. package/server/pty/host.d.ts.map +1 -0
  469. package/server/pty/host.js +184 -0
  470. package/server/pty/host.js.map +1 -0
  471. package/server/pty/in-process-host.d.ts +224 -0
  472. package/server/pty/in-process-host.d.ts.map +1 -0
  473. package/server/pty/in-process-host.js +1183 -0
  474. package/server/pty/in-process-host.js.map +1 -0
  475. package/server/pty/osc7-lifecycle.d.ts +8 -0
  476. package/server/pty/osc7-lifecycle.d.ts.map +1 -0
  477. package/server/pty/osc7-lifecycle.js +22 -0
  478. package/server/pty/osc7-lifecycle.js.map +1 -0
  479. package/server/pty/osc7-parser.d.ts +23 -0
  480. package/server/pty/osc7-parser.d.ts.map +1 -0
  481. package/server/pty/osc7-parser.js +91 -0
  482. package/server/pty/osc7-parser.js.map +1 -0
  483. package/server/pty/remote-host.d.ts +188 -0
  484. package/server/pty/remote-host.d.ts.map +1 -0
  485. package/server/pty/remote-host.js +810 -0
  486. package/server/pty/remote-host.js.map +1 -0
  487. package/server/pty/request-correlator.d.ts +59 -0
  488. package/server/pty/request-correlator.d.ts.map +1 -0
  489. package/server/pty/request-correlator.js +75 -0
  490. package/server/pty/request-correlator.js.map +1 -0
  491. package/server/pty/scrollback-log.d.ts +130 -0
  492. package/server/pty/scrollback-log.d.ts.map +1 -0
  493. package/server/pty/scrollback-log.js +344 -0
  494. package/server/pty/scrollback-log.js.map +1 -0
  495. package/server/pty/scrollback-sanitize.d.ts +2 -0
  496. package/server/pty/scrollback-sanitize.d.ts.map +1 -0
  497. package/server/pty/scrollback-sanitize.js +54 -0
  498. package/server/pty/scrollback-sanitize.js.map +1 -0
  499. package/server/pty/session-mirror.d.ts +67 -0
  500. package/server/pty/session-mirror.d.ts.map +1 -0
  501. package/server/pty/session-mirror.js +112 -0
  502. package/server/pty/session-mirror.js.map +1 -0
  503. package/server/pty/session-policy.d.ts +85 -0
  504. package/server/pty/session-policy.d.ts.map +1 -0
  505. package/server/pty/session-policy.js +186 -0
  506. package/server/pty/session-policy.js.map +1 -0
  507. package/server/pty/version-mismatch-recovery.d.ts +71 -0
  508. package/server/pty/version-mismatch-recovery.d.ts.map +1 -0
  509. package/server/pty/version-mismatch-recovery.js +63 -0
  510. package/server/pty/version-mismatch-recovery.js.map +1 -0
  511. package/server/routes/debug-agent-status.d.ts +5 -0
  512. package/server/routes/debug-agent-status.d.ts.map +1 -0
  513. package/server/routes/debug-agent-status.js +22 -0
  514. package/server/routes/debug-agent-status.js.map +1 -0
  515. package/server/routes/debug-diagnostics.d.ts +8 -0
  516. package/server/routes/debug-diagnostics.d.ts.map +1 -0
  517. package/server/routes/debug-diagnostics.js +34 -0
  518. package/server/routes/debug-diagnostics.js.map +1 -0
  519. package/server/routes/debug-terminal-trace.d.ts +16 -0
  520. package/server/routes/debug-terminal-trace.d.ts.map +1 -0
  521. package/server/routes/debug-terminal-trace.js +545 -0
  522. package/server/routes/debug-terminal-trace.js.map +1 -0
  523. package/server/routes/drops.d.ts +13 -0
  524. package/server/routes/drops.d.ts.map +1 -0
  525. package/server/routes/drops.js +126 -0
  526. package/server/routes/drops.js.map +1 -0
  527. package/server/routes/file-uploads.d.ts +9 -0
  528. package/server/routes/file-uploads.d.ts.map +1 -0
  529. package/server/routes/file-uploads.js +119 -0
  530. package/server/routes/file-uploads.js.map +1 -0
  531. package/server/routes/files.d.ts +9 -0
  532. package/server/routes/files.d.ts.map +1 -0
  533. package/server/routes/files.js +441 -0
  534. package/server/routes/files.js.map +1 -0
  535. package/server/routes/filesystem.d.ts +6 -0
  536. package/server/routes/filesystem.d.ts.map +1 -0
  537. package/server/routes/filesystem.js +76 -0
  538. package/server/routes/filesystem.js.map +1 -0
  539. package/server/routes/git.d.ts +38 -0
  540. package/server/routes/git.d.ts.map +1 -0
  541. package/server/routes/git.js +585 -0
  542. package/server/routes/git.js.map +1 -0
  543. package/server/routes/healthz.d.ts +8 -0
  544. package/server/routes/healthz.d.ts.map +1 -0
  545. package/server/routes/healthz.js +24 -0
  546. package/server/routes/healthz.js.map +1 -0
  547. package/server/routes/hook.d.ts +14 -0
  548. package/server/routes/hook.d.ts.map +1 -0
  549. package/server/routes/hook.js +86 -0
  550. package/server/routes/hook.js.map +1 -0
  551. package/server/routes/ide-commands.d.ts +9 -0
  552. package/server/routes/ide-commands.d.ts.map +1 -0
  553. package/server/routes/ide-commands.js +23 -0
  554. package/server/routes/ide-commands.js.map +1 -0
  555. package/server/routes/lib/resolve-worktree.d.ts +30 -0
  556. package/server/routes/lib/resolve-worktree.d.ts.map +1 -0
  557. package/server/routes/lib/resolve-worktree.js +35 -0
  558. package/server/routes/lib/resolve-worktree.js.map +1 -0
  559. package/server/routes/open.d.ts +4 -0
  560. package/server/routes/open.d.ts.map +1 -0
  561. package/server/routes/open.js +21 -0
  562. package/server/routes/open.js.map +1 -0
  563. package/server/routes/pane-commands.d.ts +9 -0
  564. package/server/routes/pane-commands.d.ts.map +1 -0
  565. package/server/routes/pane-commands.js +23 -0
  566. package/server/routes/pane-commands.js.map +1 -0
  567. package/server/routes/projects.d.ts +15 -0
  568. package/server/routes/projects.d.ts.map +1 -0
  569. package/server/routes/projects.js +363 -0
  570. package/server/routes/projects.js.map +1 -0
  571. package/server/routes/server-notices.d.ts +4 -0
  572. package/server/routes/server-notices.d.ts.map +1 -0
  573. package/server/routes/server-notices.js +29 -0
  574. package/server/routes/server-notices.js.map +1 -0
  575. package/server/routes/service-config.d.ts +11 -0
  576. package/server/routes/service-config.d.ts.map +1 -0
  577. package/server/routes/service-config.js +64 -0
  578. package/server/routes/service-config.js.map +1 -0
  579. package/server/routes/sessions.d.ts +7 -0
  580. package/server/routes/sessions.d.ts.map +1 -0
  581. package/server/routes/sessions.js +218 -0
  582. package/server/routes/sessions.js.map +1 -0
  583. package/server/service/caffeinate.d.ts +33 -0
  584. package/server/service/caffeinate.d.ts.map +1 -0
  585. package/server/service/caffeinate.js +72 -0
  586. package/server/service/caffeinate.js.map +1 -0
  587. package/server/state/app-state.d.ts +167 -0
  588. package/server/state/app-state.d.ts.map +1 -0
  589. package/server/state/app-state.js +335 -0
  590. package/server/state/app-state.js.map +1 -0
  591. package/server/state/project-manager.d.ts +30 -0
  592. package/server/state/project-manager.d.ts.map +1 -0
  593. package/server/state/project-manager.js +128 -0
  594. package/server/state/project-manager.js.map +1 -0
  595. package/server/state/server-notices.d.ts +12 -0
  596. package/server/state/server-notices.d.ts.map +1 -0
  597. package/server/state/server-notices.js +32 -0
  598. package/server/state/server-notices.js.map +1 -0
  599. package/server/state/worktree-cache.d.ts +25 -0
  600. package/server/state/worktree-cache.d.ts.map +1 -0
  601. package/server/state/worktree-cache.js +53 -0
  602. package/server/state/worktree-cache.js.map +1 -0
  603. package/server/ws/events.d.ts +45 -0
  604. package/server/ws/events.d.ts.map +1 -0
  605. package/server/ws/events.js +134 -0
  606. package/server/ws/events.js.map +1 -0
  607. package/server/ws/keepalive.d.ts +27 -0
  608. package/server/ws/keepalive.d.ts.map +1 -0
  609. package/server/ws/keepalive.js +63 -0
  610. package/server/ws/keepalive.js.map +1 -0
  611. package/server/ws/terminal-attach.d.ts +13 -0
  612. package/server/ws/terminal-attach.d.ts.map +1 -0
  613. package/server/ws/terminal-attach.js +233 -0
  614. package/server/ws/terminal-attach.js.map +1 -0
  615. package/server/ws/terminal-flow.d.ts +17 -0
  616. package/server/ws/terminal-flow.d.ts.map +1 -0
  617. package/server/ws/terminal-flow.js +64 -0
  618. package/server/ws/terminal-flow.js.map +1 -0
  619. package/server/ws/terminal.d.ts +69 -0
  620. package/server/ws/terminal.d.ts.map +1 -0
  621. package/server/ws/terminal.js +311 -0
  622. package/server/ws/terminal.js.map +1 -0
  623. package/web/assets/EditorPane-CzzT3iYY.js +123 -0
  624. package/web/assets/SymbolsNerdFontMono-Regular-CwEZqMeU.woff2 +0 -0
  625. package/web/assets/TerminalPane-CjbYzePr.js +68 -0
  626. package/web/assets/TerminalPane-DkTCHfhq.css +1 -0
  627. package/web/assets/file-icons-JBi09j0r.js +6 -0
  628. package/web/assets/index-CTTkRpnn.css +2 -0
  629. package/web/assets/index-CmhewzMp.js +34 -0
  630. package/web/assets/session-resume-7f-tB-ZU.js +2 -0
  631. package/web/assets/terminal-trace-PuuFRybC.js +2803 -0
  632. package/web/assets/useVirtualKeyboard-DgJb9u9d.js +1 -0
  633. package/web/index.html +52 -0
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Worktree-scoped pane model.
3
+ *
4
+ * Replaces the legacy `PaneNode` split-tree in `panes.ts`. Both models
5
+ * co-exist while consumers move to `ProjectState.worktrees`; older reducers
6
+ * still read `ProjectState.layout`.
7
+ */
8
+ export type PaneKind = "files" | "terminal" | "browser" | "git";
9
+ export interface FilesPaneState {
10
+ kind: "files";
11
+ selectedFilePath: string | null;
12
+ }
13
+ export interface TerminalPaneState {
14
+ kind: "terminal";
15
+ sessionId: string;
16
+ }
17
+ export interface BrowserPaneState {
18
+ kind: "browser";
19
+ url: string;
20
+ /** true = created by auto port detection; false/undefined = user-opened. */
21
+ auto?: boolean;
22
+ }
23
+ export interface GitPaneState {
24
+ kind: "git";
25
+ selectedCommitSha: string | null;
26
+ }
27
+ export type PaneState = FilesPaneState | TerminalPaneState | BrowserPaneState | GitPaneState;
28
+ export interface PaneEntry {
29
+ /** Singleton ids are deterministic: `files:<wtPath>` / `git:<wtPath>`. */
30
+ id: string;
31
+ kind: PaneKind;
32
+ worktreePath: string;
33
+ state: PaneState;
34
+ }
35
+ export interface WorktreePanes {
36
+ path: string;
37
+ panes: PaneEntry[];
38
+ }
39
+ export declare function filesPaneId(worktreePath: string): string;
40
+ export declare function gitPaneId(worktreePath: string): string;
41
+ export declare function terminalPaneId(sessionId: string): string;
42
+ /**
43
+ * Single shared default for the worktree split. Files and Git tabs persist
44
+ * one ratio under the same `parasor:pane-ratio:worktree` localStorage key
45
+ * so toggling tabs never reshuffles the split.
46
+ */
47
+ export declare const DEFAULT_WORKTREE_RATIO: [number, number];
48
+ export declare function makeFilesPane(worktreePath: string): PaneEntry;
49
+ export declare function makeGitPane(worktreePath: string): PaneEntry;
50
+ export declare function makeTerminalPane(id: string, worktreePath: string, sessionId: string): PaneEntry;
51
+ export declare function makeBrowserPane(id: string, worktreePath: string, url: string): PaneEntry;
52
+ /**
53
+ * Canonical pane order: files -> terminals -> browsers -> git.
54
+ * Terminals and browsers preserve insertion order.
55
+ */
56
+ export declare function sortPanesForList(panes: PaneEntry[]): PaneEntry[];
57
+ /**
58
+ * Ensure a worktree has the two singletons (`files`, `git`). Leaves existing
59
+ * terminals/browsers untouched. Returns a new array if a singleton was
60
+ * inserted; otherwise returns the original reference.
61
+ */
62
+ export declare function ensureSingletons(worktreePath: string, panes: PaneEntry[]): PaneEntry[];
63
+ //# sourceMappingURL=pane-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":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AAa,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAU7D;AAED,wBAAgB,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,CAU3D;AAED,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAChB,SAAS,CAOX;AAED,wBAAgB,eAAe,CAC7B,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,MAAM,GACV,SAAS,CAOX;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAMhE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,SAAS,EAAE,GACjB,SAAS,EAAE,CAQb"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Worktree-scoped pane model.
3
+ *
4
+ * Replaces the legacy `PaneNode` split-tree in `panes.ts`. Both models
5
+ * co-exist while consumers move to `ProjectState.worktrees`; older reducers
6
+ * still read `ProjectState.layout`.
7
+ */
8
+ export function filesPaneId(worktreePath) {
9
+ return `files:${worktreePath}`;
10
+ }
11
+ export function gitPaneId(worktreePath) {
12
+ return `git:${worktreePath}`;
13
+ }
14
+ export function terminalPaneId(sessionId) {
15
+ return `terminal:${sessionId}`;
16
+ }
17
+ /**
18
+ * Single shared default for the worktree split. Files and Git tabs persist
19
+ * one ratio under the same `parasor:pane-ratio:worktree` localStorage key
20
+ * so toggling tabs never reshuffles the split.
21
+ */
22
+ export const DEFAULT_WORKTREE_RATIO = [35, 65];
23
+ export function makeFilesPane(worktreePath) {
24
+ return {
25
+ id: filesPaneId(worktreePath),
26
+ kind: "files",
27
+ worktreePath,
28
+ state: {
29
+ kind: "files",
30
+ selectedFilePath: null,
31
+ },
32
+ };
33
+ }
34
+ export function makeGitPane(worktreePath) {
35
+ return {
36
+ id: gitPaneId(worktreePath),
37
+ kind: "git",
38
+ worktreePath,
39
+ state: {
40
+ kind: "git",
41
+ selectedCommitSha: null,
42
+ },
43
+ };
44
+ }
45
+ export function makeTerminalPane(id, worktreePath, sessionId) {
46
+ return {
47
+ id,
48
+ kind: "terminal",
49
+ worktreePath,
50
+ state: { kind: "terminal", sessionId },
51
+ };
52
+ }
53
+ export function makeBrowserPane(id, worktreePath, url) {
54
+ return {
55
+ id,
56
+ kind: "browser",
57
+ worktreePath,
58
+ state: { kind: "browser", url },
59
+ };
60
+ }
61
+ /**
62
+ * Canonical pane order: files -> terminals -> browsers -> git.
63
+ * Terminals and browsers preserve insertion order.
64
+ */
65
+ export function sortPanesForList(panes) {
66
+ const files = panes.filter((p) => p.kind === "files");
67
+ const terminals = panes.filter((p) => p.kind === "terminal");
68
+ const browsers = panes.filter((p) => p.kind === "browser");
69
+ const git = panes.filter((p) => p.kind === "git");
70
+ return [...files, ...terminals, ...browsers, ...git];
71
+ }
72
+ /**
73
+ * Ensure a worktree has the two singletons (`files`, `git`). Leaves existing
74
+ * terminals/browsers untouched. Returns a new array if a singleton was
75
+ * inserted; otherwise returns the original reference.
76
+ */
77
+ export function ensureSingletons(worktreePath, panes) {
78
+ const hasFiles = panes.some((p) => p.kind === "files");
79
+ const hasGit = panes.some((p) => p.kind === "git");
80
+ if (hasFiles && hasGit)
81
+ return panes;
82
+ const next = [...panes];
83
+ if (!hasFiles)
84
+ next.unshift(makeFilesPane(worktreePath));
85
+ if (!hasGit)
86
+ next.push(makeGitPane(worktreePath));
87
+ return next;
88
+ }
89
+ //# sourceMappingURL=pane-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pane-model.js","sourceRoot":"","sources":["../src/pane-model.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6CH,MAAM,UAAU,WAAW,CAAC,YAAoB;IAC9C,OAAO,SAAS,YAAY,EAAE,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,YAAoB;IAC5C,OAAO,O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;
9
+ } | {
10
+ type: "filetree";
11
+ id: string;
12
+ projectId: string;
13
+ expandedPaths: string[];
14
+ } | {
15
+ type: "diff";
16
+ id: string;
17
+ projectId: string;
18
+ } | {
19
+ type: "editor";
20
+ id: string;
21
+ projectId: string;
22
+ filePath: string;
23
+ } | {
24
+ type: "empty";
25
+ id: string;
26
+ } | {
27
+ type: "split";
28
+ id: string;
29
+ direction: "horizontal" | "vertical";
30
+ children: PaneNode[];
31
+ sizes: number[];
32
+ };
33
+ //# sourceMappingURL=panes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panes.d.ts","sourceRoot":"","sources":["../src/panes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAChB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CAAE,GAC5E;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACnE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC7B;IACE,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,YAAY,GAAG,UAAU,CAAC;IACrC,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=panes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panes.js","sourceRoot":"","sources":["../src/panes.ts"],"names":[],"mappings":""}
@@ -0,0 +1,180 @@
1
+ export type AgentLifecycle = "running" | "waiting" | "completed" | "idle" | "unknown";
2
+ export type AgentSignalSource = "hook" | "notify" | "output" | "activity";
3
+ export type AgentSignalConfidence = "high" | "medium" | "low";
4
+ export interface AgentState {
5
+ sessionId: string;
6
+ lifecycle: AgentLifecycle;
7
+ source: AgentSignalSource;
8
+ confidence: AgentSignalConfidence;
9
+ detectedAt: number;
10
+ }
11
+ export interface Notification {
12
+ id: string;
13
+ projectId: string;
14
+ sessionId?: string;
15
+ type: "agent-waiting" | "port-detected" | "info";
16
+ title: string;
17
+ message: string;
18
+ timestamp: number;
19
+ read: boolean;
20
+ /** Populated for `port-detected` entries; consumed by toast UI. */
21
+ port?: number;
22
+ bindsAll?: boolean;
23
+ /**
24
+ * `true` when the port is reachable from the viewer device -- already
25
+ * bound to all interfaces, fronted by a parasor TCP forwarder, or
26
+ * parasor is loopback-bound so the viewer is on this machine and
27
+ * `localhost:<port>` already works. (`port-detected` only.)
28
+ */
29
+ reachable?: boolean;
30
+ /**
31
+ * When a TCP forwarder fronts this dev port, the forwarder's OS-assigned
32
+ * listen port. The viewer reaches the dev server at
33
+ * `<page-host>:<reachablePort>`. (`port-detected` only.)
34
+ */
35
+ reachablePort?: number;
36
+ }
37
+ export interface PortInfo {
38
+ port: number;
39
+ pid: number;
40
+ bindsAll: boolean;
41
+ /**
42
+ * See `Notification.reachable`. Set by the runtime when a `ports-updated`
43
+ * broadcast is built (the bare port scanner does not know about the TCP
44
+ * forwarder); `undefined` on hydration snapshots until the first
45
+ * post-hydration `ports-updated` tick -- treat as `false`.
46
+ */
47
+ reachable?: boolean;
48
+ /**
49
+ * When a TCP forwarder fronts this dev port, the forwarder's OS-assigned
50
+ * listen port. The viewer reaches the dev server at
51
+ * `<page-host>:<reachablePort>`.
52
+ */
53
+ reachablePort?: number;
54
+ }
55
+ export interface Worktree {
56
+ path: string;
57
+ head: string;
58
+ branch: string;
59
+ /** Commits ahead of upstream (omitted when no upstream tracking). */
60
+ ahead?: number;
61
+ /** Commits behind upstream (omitted when no upstream tracking). */
62
+ behind?: number;
63
+ /** Tracked dirty + untracked file count for this worktree. */
64
+ dirtyCount?: number;
65
+ /**
66
+ * Provenance hint. `"agent"` is set when the path matches a well-known
67
+ * Agent Team isolation directory (`~/.parasor/worktrees/`,
68
+ * `~/.claude/teams/`, `/private/tmp/parasor-issue-*`, `/tmp/parasor-issue-*`).
69
+ * Surfaced as a sidebar pill so users can spot sub-agent checkouts.
70
+ */
71
+ origin?: "agent";
72
+ /**
73
+ * `true` when `git worktree list --porcelain` enumerates the path but the
74
+ * directory is missing on disk (`git status` returns `ENOENT`). Lets the
75
+ * sidebar default the remove-dialog to `--force` so users can prune a
76
+ * stranded entry in one click.
77
+ */
78
+ orphan?: boolean;
79
+ }
80
+ export interface GitState {
81
+ branch: string;
82
+ dirty: boolean;
83
+ pullRequestUrl?: string;
84
+ fileStatuses?: Record<string, string>;
85
+ /** Commits ahead of upstream. `undefined` when no upstream tracking. */
86
+ ahead?: number;
87
+ /** Commits behind upstream. `undefined` when no upstream tracking. */
88
+ behind?: number;
89
+ /**
90
+ * Tracked changes + untracked entries (rename pairs counted once). Mirrors
91
+ * the counter the sidebar/WorktreeTabBar surfaces; sourced from
92
+ * `git status --porcelain=v2`.
93
+ */
94
+ dirtyCount?: number;
95
+ /**
96
+ * `false` when the worktree path is not a git repository (no `.git`).
97
+ * Omitted (≡ `true`) for repos. Lets the Git pane render a `git init`
98
+ * empty-state instead of a transient-error placeholder.
99
+ */
100
+ isRepo?: boolean;
101
+ lastChecked: number;
102
+ }
103
+ /**
104
+ * Symbolic ref attached to a commit. Type drives how the renderer paints it
105
+ * (HEAD = solid badge, local/remote/tag = different outline colors).
106
+ */
107
+ export type GitRefType = "head" | "local" | "remote" | "tag";
108
+ export interface GitRef {
109
+ label: string;
110
+ type: GitRefType;
111
+ }
112
+ /**
113
+ * Snapshot of one swimlane (vertical column in the graph) at a row boundary.
114
+ * `expectingSha` is the next commit the lane will link to (= the commit's
115
+ * parent that travels down this lane). `colorId` is a stable 0..4 index the
116
+ * renderer maps to `--theme-graph-branch-{colorId+1}`; the value is allocated
117
+ * when the lane is first created and persists through every subsequent commit
118
+ * sharing the lane, so a single branch keeps one color across its history.
119
+ */
120
+ export interface SwimlaneSnapshot {
121
+ colorId: number;
122
+ expectingSha: string | null;
123
+ }
124
+ /**
125
+ * One commit row in the Git graph, server-computed so the web client never
126
+ * has to shell out. `inputSwimlanes` is the lane state immediately above this
127
+ * row, `outputSwimlanes` immediately below. The renderer reads both to draw
128
+ * connectors between rows. `lane` is the (post-compaction) horizontal index
129
+ * of this commit's dot.
130
+ */
131
+ export interface GitCommit {
132
+ sha: string;
133
+ parents: string[];
134
+ author: string;
135
+ /** Author timestamp (unix seconds). */
136
+ time: number;
137
+ subject: string;
138
+ refs: GitRef[];
139
+ /** Lane index (0-based) of this commit's dot in the rendered row. */
140
+ lane: number;
141
+ /** Branch color id (0..4). Stable across commits in the same branch. */
142
+ colorId: number;
143
+ /** Lane state above the row. Index = lane position. `null` = empty slot. */
144
+ inputSwimlanes: Array<SwimlaneSnapshot | null>;
145
+ /** Lane state below the row. Index = lane position. `null` = empty slot. */
146
+ outputSwimlanes: Array<SwimlaneSnapshot | null>;
147
+ }
148
+ export interface GitLogResponse {
149
+ commits: GitCommit[];
150
+ /**
151
+ * `true` when the worktree has uncommitted changes. The web Git graph
152
+ * prepends a virtual "Working tree" row above the first commit when set,
153
+ * which becomes the selectable target for the inline commit pane.
154
+ */
155
+ hasUncommitted: boolean;
156
+ }
157
+ /**
158
+ * Ephemeral server-lifetime notice surfaced to the web UI as a banner. The
159
+ * canonical case (daemon protocol mismatch recovery) is `daemon-auto-restarted`: the server detected a
160
+ * `version-mismatch` from an incompatible running daemon, terminated it,
161
+ * spawned a fresh daemon, and resumed boot. Active PTY sessions were lost
162
+ * -- the banner explains why the session list is empty after an upgrade.
163
+ *
164
+ * Notices are in-memory only (cleared on server restart) and dismissable
165
+ * per-kind via `DELETE /api/notices/:kind`.
166
+ */
167
+ export type ServerNoticeKind = "daemon-auto-restarted";
168
+ export interface ServerNotice {
169
+ kind: ServerNoticeKind;
170
+ /** ISO timestamp the notice was recorded. */
171
+ occurredAt: string;
172
+ /** Server-side PROTOCOL_VERSION at recovery time. */
173
+ serverProtocolVersion?: string;
174
+ /** Daemon-side PROTOCOL_VERSION the new server NACKed. */
175
+ daemonProtocolVersion?: string;
176
+ }
177
+ export interface ServerNoticesResponse {
178
+ notices: ServerNotice[];
179
+ }
180
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GACtB,SAAS,GACT,SAAS,GACT,WAAW,GACX,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE1E,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE9D,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,cAAc,CAAC;IAC1B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,UAAU,EAAE,qBAAqB,CAAC;IAClC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,eAAe,GAAG,eAAe,GAAG,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AM,CAAC;IAC/B,0DAA0D;IAC1D,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":""}
@@ -0,0 +1,192 @@
1
+ import type { IdeCommandConfig } from "./ide-commands.js";
2
+ import type { PaneCommandConfig } from "./pane-commands.js";
3
+ import type { WorktreePanes } from "./pane-model.js";
4
+ import type { PaneNode } from "./panes.js";
5
+ import type { WorktreeLocalFileCandidate } from "./worktree-local-files.js";
6
+ export interface AppState {
7
+ version: 1;
8
+ projects: Project[];
9
+ projectStates: Record<string, ProjectState>;
10
+ sessions: Session[];
11
+ /**
12
+ * Daemon-mode persisted PTY records. Owned by
13
+ * the `parasor-pty-host` daemon when it is the AppStateStore writer;
14
+ * the in-process host does not write here. Empty `[]` in the safe-side
15
+ * default deployment.
16
+ */
17
+ sessionRecords: SessionRecord[];
18
+ serviceConfig: ServiceConfig;
19
+ /**
20
+ * User-defined commands shown by the Open Container terminal launcher.
21
+ * The built-in empty-shell Terminal entry is client-owned UI behavior and
22
+ * is intentionally not persisted here.
23
+ */
24
+ paneCommands: PaneCommandConfig[];
25
+ /**
26
+ * User-defined local IDE launch commands shown by worktree Open in IDE.
27
+ * Executed server-side with fixed argv, never through a shell.
28
+ */
29
+ ideCommands: IdeCommandConfig[];
30
+ }
31
+ export type PortDetectionMode = "all-interfaces" | "off";
32
+ export interface ServiceConfig {
33
+ /**
34
+ * macOS only: spawn `caffeinate -i` while at least one WS client is
35
+ * attached so an idle host does not sleep mid-session. Ignored on
36
+ * other platforms.
37
+ */
38
+ preventIdleSleep: boolean;
39
+ /**
40
+ * Whether detected listening ports trigger a `port-detected` toast.
41
+ * - `all-interfaces`: notify when a port is bound to 0.0.0.0/:: (reachable from mobile/Tailscale)
42
+ * - `off`: no notification
43
+ *
44
+ * The previous `all` mode (every loopback port, including MCP/LSP/editor
45
+ * RPC) was removed in local notify-mode cleanup -- the noise outweighed the value.
46
+ */
47
+ portDetection: PortDetectionMode;
48
+ /**
49
+ * OS file-drop upload size cap, in bytes. Drops larger than this are
50
+ * rejected with 413. Default `DEFAULT_DROP_SIZE_MAX_BYTES`.
51
+ */
52
+ dropSizeMaxBytes: number;
53
+ /**
54
+ * Absolute upper bound for `dropSizeMaxBytes` the UI is allowed to set;
55
+ * the server enforces it independently as a belt-and-suspenders check
56
+ * against a hand-edited state.json. Default `DEFAULT_DROP_SIZE_HARD_MAX_BYTES`.
57
+ */
58
+ dropSizeHardMaxBytes: number;
59
+ }
60
+ /**
61
+ * Server default upload cap for OS file drops (10 MiB). Also used by the
62
+ * web client when `serviceConfig.dropSizeMaxBytes` is absent.
63
+ */
64
+ export declare const DEFAULT_DROP_SIZE_MAX_BYTES: number;
65
+ /**
66
+ * Absolute ceiling for user-configurable `dropSizeMaxBytes` (100 MiB).
67
+ */
68
+ export declare const DEFAULT_DROP_SIZE_HARD_MAX_BYTES: number;
69
+ export interface Project {
70
+ id: string;
71
+ name: string;
72
+ path: string;
73
+ createdAt: number;
74
+ lastAccessedAt: number;
75
+ pinned?: boolean;
76
+ readOnly?: boolean;
77
+ /**
78
+ * Manual sort index assigned via DnD reorder.
79
+ * When present, takes precedence over `lastAccessedAt`. Pinned-first still
80
+ * applies. Lower = earlier.
81
+ */
82
+ order?: number;
83
+ /**
84
+ * Project-local ignored regular files the user chose to copy into newly
85
+ * created linked worktrees. Paths are relative to the main checkout.
86
+ */
87
+ worktreeLocalFileAllowlist?: WorktreeLocalFileCandidate["path"][];
88
+ }
89
+ export interface ProjectState {
90
+ projectId: string;
91
+ /**
92
+ * Legacy split-tree layout. Kept so existing reducers compile while UI
93
+ * code moves to `worktrees`.
94
+ */
95
+ layout: PaneNode | null;
96
+ /**
97
+ * Worktree-scoped pane list. Empty until the server first reconciles git
98
+ * worktrees for the project.
99
+ */
100
+ worktrees: WorktreePanes[];
101
+ openFiles: string[];
102
+ /** Legacy focus pointer into `layout`. Removed in 1.4-f. */
103
+ lastFocusedPaneId: string | null;
104
+ /** New focus pointer into `worktrees[].panes[].id`. */
105
+ focusedPaneId: string | null;
106
+ lastAccessedAt: number;
107
+ }
108
+ export type SessionCommand = {
109
+ type: "shell";
110
+ } | {
111
+ type: "claude";
112
+ } | {
113
+ type: "custom";
114
+ command: string;
115
+ args: string[];
116
+ };
117
+ export type SessionEndReason = {
118
+ type: "exit";
119
+ code: number;
120
+ } | {
121
+ type: "signal";
122
+ signal: number;
123
+ } | {
124
+ type: "server-graceful";
125
+ } | {
126
+ type: "server-crash";
127
+ } | {
128
+ type: "daemon-graceful";
129
+ } | {
130
+ type: "daemon-crash";
131
+ };
132
+ export interface Session {
133
+ id: string;
134
+ projectId: string;
135
+ pid: number | null;
136
+ /**
137
+ * spawning = created, PTY not yet spawned (waiting for first WS init)
138
+ * running = PTY alive
139
+ * ended = process exited; scrollback preserved for restart
140
+ */
141
+ state: "spawning" | "running" | "ended";
142
+ generation: number;
143
+ title: string;
144
+ /** True when the user explicitly renamed the terminal title. */
145
+ titleManual?: boolean;
146
+ command: SessionCommand;
147
+ cwd: string;
148
+ shell: string;
149
+ createdAt: number;
150
+ endedAt?: number;
151
+ endReason?: SessionEndReason;
152
+ /** User-pinned terminal sessions surface in the Monitor global view. */
153
+ pinned?: boolean;
154
+ }
155
+ /**
156
+ * Persisted record describing a daemon-owned PTY session
157
+ *. The shape diverges from `Session` because
158
+ * the daemon needs richer process metadata for orphan cleanup and the
159
+ * `pty-host doctor` CLI: pid/pgid for `kill(0)` liveness and group
160
+ * teardown, argv for `ps -p` re-verification, daemonPid+startedAt to
161
+ * detect "different daemon than wrote this record".
162
+ *
163
+ * `state` is intentionally narrower than `Session.state`:
164
+ * - "running" : pid alive, owned by current daemon generation
165
+ * - "exited" : process exited cleanly (exitCode/exitSignal recorded)
166
+ * - "lost" : pid disappeared without a recorded exit (parent died,
167
+ * SIGKILL with no reaper, etc.) -- record is dead state
168
+ * - "orphaned" : pid alive, written by a previous daemon generation --
169
+ * reachable only via `pty-host doctor` reap
170
+ *
171
+ * `pid`/`pgid` are nullable to cover the create-stub stage (record
172
+ * inserted before the PTY is spawned by the first WS attach).
173
+ */
174
+ export interface SessionRecord {
175
+ id: string;
176
+ projectId: string;
177
+ command: SessionCommand;
178
+ cwd: string;
179
+ pid: number | null;
180
+ pgid: number | null;
181
+ argv: string[];
182
+ /** ISO8601 timestamp the underlying process was spawned (or stub created). */
183
+ startedAt: string;
184
+ state: "running" | "exited" | "lost" | "orphaned";
185
+ exitCode: number | null;
186
+ exitSignal: string | null;
187
+ /** PID of the daemon that wrote this record. */
188
+ daemonPid: number;
189
+ /** ISO8601 timestamp of that daemon's startup; together with daemonPid identifies the writer generation. */
190
+ daemonStartedAt: string;
191
+ }
192
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAE5E,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,CAAC,CAAC;IACX,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC5C,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB;;;;;OAKG;IACH,cAAc,EAAE,aAAa,EAA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EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAClD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,4GAA4G;IAC5G,eAAe,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Server default upload cap for OS file drops (10 MiB). Also used by the
3
+ * web client when `serviceConfig.dropSizeMaxBytes` is absent.
4
+ */
5
+ export const DEFAULT_DROP_SIZE_MAX_BYTES = 10 * 1024 * 1024;
6
+ /**
7
+ * Absolute ceiling for user-configurable `dropSizeMaxBytes` (100 MiB).
8
+ */
9
+ export const DEFAULT_DROP_SIZE_HARD_MAX_BYTES = 100 * 1024 * 1024;
10
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AA+DA;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5D;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC"}