runwork 0.15.0 → 0.15.2

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 (403) hide show
  1. package/dist/index.js +19272 -116
  2. package/package.json +4 -4
  3. package/dist/__tests__/curl-parser.test.d.ts +0 -1
  4. package/dist/__tests__/curl-parser.test.js +0 -250
  5. package/dist/__tests__/install-scripts.test.d.ts +0 -1
  6. package/dist/__tests__/install-scripts.test.js +0 -280
  7. package/dist/__tests__/types-manager.test.d.ts +0 -1
  8. package/dist/__tests__/types-manager.test.js +0 -89
  9. package/dist/agents/__tests__/chatgpt-registry.test.d.ts +0 -1
  10. package/dist/agents/__tests__/chatgpt-registry.test.js +0 -61
  11. package/dist/agents/__tests__/claude-code-managed-block.test.d.ts +0 -1
  12. package/dist/agents/__tests__/claude-code-managed-block.test.js +0 -97
  13. package/dist/agents/__tests__/claude-code-plugin.test.d.ts +0 -1
  14. package/dist/agents/__tests__/claude-code-plugin.test.js +0 -47
  15. package/dist/agents/__tests__/claude-code-stats.test.d.ts +0 -1
  16. package/dist/agents/__tests__/claude-code-stats.test.js +0 -390
  17. package/dist/agents/__tests__/claude-desktop-memory.test.d.ts +0 -1
  18. package/dist/agents/__tests__/claude-desktop-memory.test.js +0 -154
  19. package/dist/agents/__tests__/claude-desktop-plugin-tree.test.d.ts +0 -1
  20. package/dist/agents/__tests__/claude-desktop-plugin-tree.test.js +0 -161
  21. package/dist/agents/__tests__/claude-desktop-plugin.test.d.ts +0 -1
  22. package/dist/agents/__tests__/claude-desktop-plugin.test.js +0 -117
  23. package/dist/agents/__tests__/claude-desktop-rpm.test.d.ts +0 -1
  24. package/dist/agents/__tests__/claude-desktop-rpm.test.js +0 -126
  25. package/dist/agents/__tests__/claude-desktop-stats.test.d.ts +0 -1
  26. package/dist/agents/__tests__/claude-desktop-stats.test.js +0 -280
  27. package/dist/agents/__tests__/codex-instructions.test.d.ts +0 -1
  28. package/dist/agents/__tests__/codex-instructions.test.js +0 -57
  29. package/dist/agents/__tests__/codex-minimum-permissions.test.d.ts +0 -1
  30. package/dist/agents/__tests__/codex-minimum-permissions.test.js +0 -82
  31. package/dist/agents/__tests__/codex-stats.test.d.ts +0 -1
  32. package/dist/agents/__tests__/codex-stats.test.js +0 -370
  33. package/dist/agents/__tests__/cursor-merge.test.d.ts +0 -1
  34. package/dist/agents/__tests__/cursor-merge.test.js +0 -66
  35. package/dist/agents/__tests__/cursor-stats.test.d.ts +0 -1
  36. package/dist/agents/__tests__/cursor-stats.test.js +0 -183
  37. package/dist/agents/__tests__/defaults-merge.test.d.ts +0 -1
  38. package/dist/agents/__tests__/defaults-merge.test.js +0 -268
  39. package/dist/agents/__tests__/detection.test.d.ts +0 -1
  40. package/dist/agents/__tests__/detection.test.js +0 -89
  41. package/dist/agents/__tests__/graceful-degradation.test.d.ts +0 -1
  42. package/dist/agents/__tests__/graceful-degradation.test.js +0 -129
  43. package/dist/agents/__tests__/instruction-hint.test.d.ts +0 -1
  44. package/dist/agents/__tests__/instruction-hint.test.js +0 -69
  45. package/dist/agents/__tests__/intro-skill.test.d.ts +0 -1
  46. package/dist/agents/__tests__/intro-skill.test.js +0 -193
  47. package/dist/agents/__tests__/schema-validation.test.d.ts +0 -1
  48. package/dist/agents/__tests__/schema-validation.test.js +0 -212
  49. package/dist/agents/__tests__/skill-slug.test.d.ts +0 -1
  50. package/dist/agents/__tests__/skill-slug.test.js +0 -77
  51. package/dist/agents/claude-code.d.ts +0 -53
  52. package/dist/agents/claude-code.js +0 -754
  53. package/dist/agents/claude-desktop-plugin-tree.d.ts +0 -59
  54. package/dist/agents/claude-desktop-plugin-tree.js +0 -143
  55. package/dist/agents/claude-desktop.d.ts +0 -47
  56. package/dist/agents/claude-desktop.js +0 -684
  57. package/dist/agents/cline.d.ts +0 -15
  58. package/dist/agents/cline.js +0 -130
  59. package/dist/agents/codex.d.ts +0 -44
  60. package/dist/agents/codex.js +0 -453
  61. package/dist/agents/conversation-skills.d.ts +0 -18
  62. package/dist/agents/conversation-skills.js +0 -229
  63. package/dist/agents/cursor.d.ts +0 -48
  64. package/dist/agents/cursor.js +0 -324
  65. package/dist/agents/default-config.d.ts +0 -30
  66. package/dist/agents/default-config.js +0 -67
  67. package/dist/agents/defaults-merge.d.ts +0 -72
  68. package/dist/agents/defaults-merge.js +0 -131
  69. package/dist/agents/detect.d.ts +0 -4
  70. package/dist/agents/detect.js +0 -67
  71. package/dist/agents/detection.d.ts +0 -18
  72. package/dist/agents/detection.js +0 -94
  73. package/dist/agents/gemini.d.ts +0 -15
  74. package/dist/agents/gemini.js +0 -122
  75. package/dist/agents/generic-adapter.d.ts +0 -25
  76. package/dist/agents/generic-adapter.js +0 -151
  77. package/dist/agents/intro-skill.d.ts +0 -45
  78. package/dist/agents/intro-skill.js +0 -447
  79. package/dist/agents/registry-data.d.ts +0 -192
  80. package/dist/agents/registry-data.js +0 -669
  81. package/dist/agents/registry.d.ts +0 -13
  82. package/dist/agents/registry.js +0 -36
  83. package/dist/agents/runtime-detection.d.ts +0 -82
  84. package/dist/agents/runtime-detection.js +0 -271
  85. package/dist/agents/session-start-hook.d.ts +0 -37
  86. package/dist/agents/session-start-hook.js +0 -159
  87. package/dist/agents/types.d.ts +0 -171
  88. package/dist/agents/types.js +0 -75
  89. package/dist/agents/utils/instruction-hint.d.ts +0 -21
  90. package/dist/agents/utils/instruction-hint.js +0 -108
  91. package/dist/agents/utils/json-config.d.ts +0 -19
  92. package/dist/agents/utils/json-config.js +0 -69
  93. package/dist/agents/utils/toml-config.d.ts +0 -8
  94. package/dist/agents/utils/toml-config.js +0 -27
  95. package/dist/agents/windsurf.d.ts +0 -14
  96. package/dist/agents/windsurf.js +0 -102
  97. package/dist/api/__tests__/client.test.d.ts +0 -1
  98. package/dist/api/__tests__/client.test.js +0 -272
  99. package/dist/api/client.d.ts +0 -326
  100. package/dist/api/client.js +0 -427
  101. package/dist/auth/__tests__/login-flow.test.d.ts +0 -1
  102. package/dist/auth/__tests__/login-flow.test.js +0 -101
  103. package/dist/auth/__tests__/store.test.d.ts +0 -1
  104. package/dist/auth/__tests__/store.test.js +0 -132
  105. package/dist/auth/login-flow.d.ts +0 -26
  106. package/dist/auth/login-flow.js +0 -137
  107. package/dist/auth/store.d.ts +0 -5
  108. package/dist/auth/store.js +0 -62
  109. package/dist/commands/__tests__/clone-args.test.d.ts +0 -1
  110. package/dist/commands/__tests__/clone-args.test.js +0 -51
  111. package/dist/commands/__tests__/clone-source-result.test.d.ts +0 -1
  112. package/dist/commands/__tests__/clone-source-result.test.js +0 -45
  113. package/dist/commands/__tests__/info-merge.test.d.ts +0 -1
  114. package/dist/commands/__tests__/info-merge.test.js +0 -55
  115. package/dist/commands/__tests__/mcp-entries.test.d.ts +0 -1
  116. package/dist/commands/__tests__/mcp-entries.test.js +0 -48
  117. package/dist/commands/__tests__/setup-persona.test.d.ts +0 -1
  118. package/dist/commands/__tests__/setup-persona.test.js +0 -31
  119. package/dist/commands/__tests__/setup.test.d.ts +0 -1
  120. package/dist/commands/__tests__/setup.test.js +0 -81
  121. package/dist/commands/__tests__/sync-redetect.test.d.ts +0 -1
  122. package/dist/commands/__tests__/sync-redetect.test.js +0 -96
  123. package/dist/commands/__tests__/sync-telemetry.test.d.ts +0 -1
  124. package/dist/commands/__tests__/sync-telemetry.test.js +0 -281
  125. package/dist/commands/__tests__/upgrade.test.d.ts +0 -1
  126. package/dist/commands/__tests__/upgrade.test.js +0 -157
  127. package/dist/commands/agents.d.ts +0 -2
  128. package/dist/commands/agents.js +0 -160
  129. package/dist/commands/api-keys.d.ts +0 -2
  130. package/dist/commands/api-keys.js +0 -95
  131. package/dist/commands/apps.d.ts +0 -2
  132. package/dist/commands/apps.js +0 -82
  133. package/dist/commands/build-plugin.d.ts +0 -2
  134. package/dist/commands/build-plugin.js +0 -135
  135. package/dist/commands/clone.d.ts +0 -60
  136. package/dist/commands/clone.js +0 -271
  137. package/dist/commands/components.d.ts +0 -2
  138. package/dist/commands/components.js +0 -43
  139. package/dist/commands/deploy.d.ts +0 -2
  140. package/dist/commands/deploy.js +0 -279
  141. package/dist/commands/dev.d.ts +0 -11
  142. package/dist/commands/dev.js +0 -1011
  143. package/dist/commands/doctor.d.ts +0 -2
  144. package/dist/commands/doctor.js +0 -230
  145. package/dist/commands/endpoints.d.ts +0 -2
  146. package/dist/commands/endpoints.js +0 -189
  147. package/dist/commands/entities.d.ts +0 -2
  148. package/dist/commands/entities.js +0 -198
  149. package/dist/commands/files.d.ts +0 -2
  150. package/dist/commands/files.js +0 -193
  151. package/dist/commands/inbox.d.ts +0 -11
  152. package/dist/commands/inbox.js +0 -60
  153. package/dist/commands/info.d.ts +0 -178
  154. package/dist/commands/info.js +0 -455
  155. package/dist/commands/init.d.ts +0 -21
  156. package/dist/commands/init.js +0 -185
  157. package/dist/commands/integrations.d.ts +0 -2
  158. package/dist/commands/integrations.js +0 -233
  159. package/dist/commands/login.d.ts +0 -2
  160. package/dist/commands/login.js +0 -44
  161. package/dist/commands/logout.d.ts +0 -2
  162. package/dist/commands/logout.js +0 -13
  163. package/dist/commands/logs.d.ts +0 -2
  164. package/dist/commands/logs.js +0 -232
  165. package/dist/commands/mcp-entries.d.ts +0 -13
  166. package/dist/commands/mcp-entries.js +0 -26
  167. package/dist/commands/mcp.d.ts +0 -2
  168. package/dist/commands/mcp.js +0 -245
  169. package/dist/commands/open.d.ts +0 -2
  170. package/dist/commands/open.js +0 -53
  171. package/dist/commands/resume.d.ts +0 -2
  172. package/dist/commands/resume.js +0 -289
  173. package/dist/commands/save-convo.d.ts +0 -8
  174. package/dist/commands/save-convo.js +0 -20
  175. package/dist/commands/schedules.d.ts +0 -2
  176. package/dist/commands/schedules.js +0 -221
  177. package/dist/commands/setup.d.ts +0 -27
  178. package/dist/commands/setup.js +0 -177
  179. package/dist/commands/share-convo.d.ts +0 -24
  180. package/dist/commands/share-convo.js +0 -167
  181. package/dist/commands/skills.d.ts +0 -2
  182. package/dist/commands/skills.js +0 -352
  183. package/dist/commands/sync-telemetry.d.ts +0 -33
  184. package/dist/commands/sync-telemetry.js +0 -186
  185. package/dist/commands/sync.d.ts +0 -37
  186. package/dist/commands/sync.js +0 -702
  187. package/dist/commands/uninstall.d.ts +0 -2
  188. package/dist/commands/uninstall.js +0 -145
  189. package/dist/commands/upgrade.d.ts +0 -14
  190. package/dist/commands/upgrade.js +0 -217
  191. package/dist/commands/validate.d.ts +0 -2
  192. package/dist/commands/validate.js +0 -89
  193. package/dist/commands/welcome.d.ts +0 -1
  194. package/dist/commands/welcome.js +0 -86
  195. package/dist/commands/workflows.d.ts +0 -2
  196. package/dist/commands/workflows.js +0 -187
  197. package/dist/deploy/__tests__/deploy-state.test.d.ts +0 -1
  198. package/dist/deploy/__tests__/deploy-state.test.js +0 -80
  199. package/dist/deploy/__tests__/deploy-status.test.d.ts +0 -1
  200. package/dist/deploy/__tests__/deploy-status.test.js +0 -41
  201. package/dist/deploy/__tests__/detach-args.test.d.ts +0 -1
  202. package/dist/deploy/__tests__/detach-args.test.js +0 -30
  203. package/dist/deploy/deploy-state.d.ts +0 -36
  204. package/dist/deploy/deploy-state.js +0 -63
  205. package/dist/deploy/deploy-status.d.ts +0 -21
  206. package/dist/deploy/deploy-status.js +0 -36
  207. package/dist/deploy/detach.d.ts +0 -32
  208. package/dist/deploy/detach.js +0 -71
  209. package/dist/dev/__tests__/attach.test.d.ts +0 -1
  210. package/dist/dev/__tests__/attach.test.js +0 -296
  211. package/dist/dev/__tests__/detach.test.d.ts +0 -1
  212. package/dist/dev/__tests__/detach.test.js +0 -404
  213. package/dist/dev/__tests__/preview-url-poller.test.d.ts +0 -1
  214. package/dist/dev/__tests__/preview-url-poller.test.js +0 -149
  215. package/dist/dev/__tests__/session.test.d.ts +0 -1
  216. package/dist/dev/__tests__/session.test.js +0 -446
  217. package/dist/dev/__tests__/startup-sync.test.d.ts +0 -1
  218. package/dist/dev/__tests__/startup-sync.test.js +0 -32
  219. package/dist/dev/__tests__/stop.test.d.ts +0 -1
  220. package/dist/dev/__tests__/stop.test.js +0 -172
  221. package/dist/dev/attach.d.ts +0 -120
  222. package/dist/dev/attach.js +0 -269
  223. package/dist/dev/detach.d.ts +0 -187
  224. package/dist/dev/detach.js +0 -292
  225. package/dist/dev/preview-url-poller.d.ts +0 -35
  226. package/dist/dev/preview-url-poller.js +0 -50
  227. package/dist/dev/session.d.ts +0 -175
  228. package/dist/dev/session.js +0 -258
  229. package/dist/dev/startup-sync.d.ts +0 -23
  230. package/dist/dev/startup-sync.js +0 -14
  231. package/dist/dev/stop.d.ts +0 -52
  232. package/dist/dev/stop.js +0 -101
  233. package/dist/devtools/registry-data.d.ts +0 -46
  234. package/dist/devtools/registry-data.js +0 -40
  235. package/dist/generated/bundled-types.d.ts +0 -1
  236. package/dist/generated/bundled-types.js +0 -46
  237. package/dist/generated/version.d.ts +0 -1
  238. package/dist/generated/version.js +0 -2
  239. package/dist/git/__tests__/auto-commit.test.d.ts +0 -1
  240. package/dist/git/__tests__/auto-commit.test.js +0 -431
  241. package/dist/git/__tests__/classify-sync-error.test.d.ts +0 -1
  242. package/dist/git/__tests__/classify-sync-error.test.js +0 -57
  243. package/dist/git/__tests__/credential-helper-e2e.test.d.ts +0 -21
  244. package/dist/git/__tests__/credential-helper-e2e.test.js +0 -195
  245. package/dist/git/__tests__/credentials.test.d.ts +0 -1
  246. package/dist/git/__tests__/credentials.test.js +0 -141
  247. package/dist/git/__tests__/deploy-guard.test.d.ts +0 -1
  248. package/dist/git/__tests__/deploy-guard.test.js +0 -61
  249. package/dist/git/__tests__/ensure-git-credential-helper.test.d.ts +0 -1
  250. package/dist/git/__tests__/ensure-git-credential-helper.test.js +0 -133
  251. package/dist/git/__tests__/ensure-runwork-remote.test.d.ts +0 -1
  252. package/dist/git/__tests__/ensure-runwork-remote.test.js +0 -109
  253. package/dist/git/__tests__/identity.test.d.ts +0 -1
  254. package/dist/git/__tests__/identity.test.js +0 -146
  255. package/dist/git/__tests__/manifest.test.d.ts +0 -1
  256. package/dist/git/__tests__/manifest.test.js +0 -446
  257. package/dist/git/__tests__/preflight-resolution.test.d.ts +0 -1
  258. package/dist/git/__tests__/preflight-resolution.test.js +0 -366
  259. package/dist/git/__tests__/preflight.test.d.ts +0 -1
  260. package/dist/git/__tests__/preflight.test.js +0 -36
  261. package/dist/git/__tests__/repo-config.test.d.ts +0 -1
  262. package/dist/git/__tests__/repo-config.test.js +0 -26
  263. package/dist/git/__tests__/sync.test.d.ts +0 -1
  264. package/dist/git/__tests__/sync.test.js +0 -405
  265. package/dist/git/auto-commit.d.ts +0 -35
  266. package/dist/git/auto-commit.js +0 -293
  267. package/dist/git/classify-sync-error.d.ts +0 -21
  268. package/dist/git/classify-sync-error.js +0 -111
  269. package/dist/git/credentials.d.ts +0 -75
  270. package/dist/git/credentials.js +0 -164
  271. package/dist/git/critical-files.d.ts +0 -20
  272. package/dist/git/critical-files.js +0 -68
  273. package/dist/git/deploy-guard.d.ts +0 -53
  274. package/dist/git/deploy-guard.js +0 -78
  275. package/dist/git/identity.d.ts +0 -44
  276. package/dist/git/identity.js +0 -133
  277. package/dist/git/preflight.d.ts +0 -57
  278. package/dist/git/preflight.js +0 -276
  279. package/dist/git/remote.d.ts +0 -37
  280. package/dist/git/remote.js +0 -75
  281. package/dist/git/repo-config.d.ts +0 -8
  282. package/dist/git/repo-config.js +0 -29
  283. package/dist/git/sync.d.ts +0 -15
  284. package/dist/git/sync.js +0 -159
  285. package/dist/health/__tests__/checks.test.d.ts +0 -1
  286. package/dist/health/__tests__/checks.test.js +0 -357
  287. package/dist/health/__tests__/cli-distribution-checks.test.d.ts +0 -1
  288. package/dist/health/__tests__/cli-distribution-checks.test.js +0 -196
  289. package/dist/health/__tests__/fix.test.d.ts +0 -1
  290. package/dist/health/__tests__/fix.test.js +0 -72
  291. package/dist/health/__tests__/runner-filter.test.d.ts +0 -1
  292. package/dist/health/__tests__/runner-filter.test.js +0 -61
  293. package/dist/health/checks.d.ts +0 -42
  294. package/dist/health/checks.js +0 -636
  295. package/dist/health/fix.d.ts +0 -22
  296. package/dist/health/fix.js +0 -62
  297. package/dist/health/runner.d.ts +0 -8
  298. package/dist/health/runner.js +0 -47
  299. package/dist/health/types.d.ts +0 -12
  300. package/dist/health/types.js +0 -1
  301. package/dist/index.d.ts +0 -1
  302. package/dist/logs/__tests__/tailer-format.test.d.ts +0 -1
  303. package/dist/logs/__tests__/tailer-format.test.js +0 -43
  304. package/dist/logs/tailer.d.ts +0 -17
  305. package/dist/logs/tailer.js +0 -217
  306. package/dist/sync/__tests__/change-detect.test.d.ts +0 -1
  307. package/dist/sync/__tests__/change-detect.test.js +0 -123
  308. package/dist/sync/__tests__/hash.test.d.ts +0 -1
  309. package/dist/sync/__tests__/hash.test.js +0 -18
  310. package/dist/sync/change-detect.d.ts +0 -19
  311. package/dist/sync/change-detect.js +0 -136
  312. package/dist/sync/conflict-ui.d.ts +0 -5
  313. package/dist/sync/conflict-ui.js +0 -78
  314. package/dist/sync/executor.d.ts +0 -23
  315. package/dist/sync/executor.js +0 -102
  316. package/dist/sync/hash.d.ts +0 -1
  317. package/dist/sync/hash.js +0 -4
  318. package/dist/sync/types.d.ts +0 -24
  319. package/dist/sync/types.js +0 -1
  320. package/dist/template/manifest.d.ts +0 -17
  321. package/dist/template/manifest.js +0 -145
  322. package/dist/tools/types.d.ts +0 -52
  323. package/dist/tools/types.js +0 -8
  324. package/dist/types-manager.d.ts +0 -1
  325. package/dist/types-manager.js +0 -35
  326. package/dist/types.d.ts +0 -349
  327. package/dist/types.js +0 -1
  328. package/dist/ui/__tests__/banner.test.d.ts +0 -1
  329. package/dist/ui/__tests__/banner.test.js +0 -98
  330. package/dist/ui/__tests__/colors.test.d.ts +0 -1
  331. package/dist/ui/__tests__/colors.test.js +0 -22
  332. package/dist/ui/__tests__/keyboard.test.d.ts +0 -1
  333. package/dist/ui/__tests__/keyboard.test.js +0 -34
  334. package/dist/ui/__tests__/status-line.test.d.ts +0 -1
  335. package/dist/ui/__tests__/status-line.test.js +0 -54
  336. package/dist/ui/banner.d.ts +0 -29
  337. package/dist/ui/banner.js +0 -153
  338. package/dist/ui/colors.d.ts +0 -4
  339. package/dist/ui/colors.js +0 -7
  340. package/dist/ui/keyboard.d.ts +0 -12
  341. package/dist/ui/keyboard.js +0 -61
  342. package/dist/ui/status-line.d.ts +0 -6
  343. package/dist/ui/status-line.js +0 -53
  344. package/dist/utils/__tests__/format-error.test.d.ts +0 -1
  345. package/dist/utils/__tests__/format-error.test.js +0 -43
  346. package/dist/utils/__tests__/help-json.test.d.ts +0 -1
  347. package/dist/utils/__tests__/help-json.test.js +0 -39
  348. package/dist/utils/__tests__/http.test.d.ts +0 -1
  349. package/dist/utils/__tests__/http.test.js +0 -381
  350. package/dist/utils/__tests__/ignore-matcher.test.d.ts +0 -1
  351. package/dist/utils/__tests__/ignore-matcher.test.js +0 -205
  352. package/dist/utils/__tests__/output.test.d.ts +0 -1
  353. package/dist/utils/__tests__/output.test.js +0 -38
  354. package/dist/utils/__tests__/prompt.test.d.ts +0 -1
  355. package/dist/utils/__tests__/prompt.test.js +0 -27
  356. package/dist/utils/__tests__/resolve.test.d.ts +0 -1
  357. package/dist/utils/__tests__/resolve.test.js +0 -95
  358. package/dist/utils/__tests__/sqlite.test.d.ts +0 -1
  359. package/dist/utils/__tests__/sqlite.test.js +0 -89
  360. package/dist/utils/agent-guidance.d.ts +0 -47
  361. package/dist/utils/agent-guidance.js +0 -128
  362. package/dist/utils/app-info.d.ts +0 -70
  363. package/dist/utils/app-info.js +0 -167
  364. package/dist/utils/curl-parser.d.ts +0 -12
  365. package/dist/utils/curl-parser.js +0 -162
  366. package/dist/utils/data-input.d.ts +0 -1
  367. package/dist/utils/data-input.js +0 -38
  368. package/dist/utils/format-error.d.ts +0 -10
  369. package/dist/utils/format-error.js +0 -38
  370. package/dist/utils/fs.d.ts +0 -5
  371. package/dist/utils/fs.js +0 -23
  372. package/dist/utils/help-json.d.ts +0 -70
  373. package/dist/utils/help-json.js +0 -88
  374. package/dist/utils/http.d.ts +0 -46
  375. package/dist/utils/http.js +0 -421
  376. package/dist/utils/ignore-matcher.d.ts +0 -47
  377. package/dist/utils/ignore-matcher.js +0 -132
  378. package/dist/utils/output.d.ts +0 -17
  379. package/dist/utils/output.js +0 -27
  380. package/dist/utils/prompt.d.ts +0 -5
  381. package/dist/utils/prompt.js +0 -42
  382. package/dist/utils/resolve.d.ts +0 -12
  383. package/dist/utils/resolve.js +0 -52
  384. package/dist/utils/setup-state.d.ts +0 -3
  385. package/dist/utils/setup-state.js +0 -19
  386. package/dist/utils/sqlite-adapter.d.ts +0 -48
  387. package/dist/utils/sqlite-adapter.js +0 -147
  388. package/dist/utils/sqlite.d.ts +0 -14
  389. package/dist/utils/sqlite.js +0 -14
  390. package/dist/utils/subprocess.d.ts +0 -19
  391. package/dist/utils/subprocess.js +0 -27
  392. package/dist/utils/which.d.ts +0 -14
  393. package/dist/utils/which.js +0 -47
  394. package/dist/utils/zip.d.ts +0 -7
  395. package/dist/utils/zip.js +0 -42
  396. package/dist/validate/__tests__/validate.test.d.ts +0 -1
  397. package/dist/validate/__tests__/validate.test.js +0 -42
  398. package/dist/validate/freshness.d.ts +0 -28
  399. package/dist/validate/freshness.js +0 -48
  400. package/dist/validate/preview.d.ts +0 -21
  401. package/dist/validate/preview.js +0 -39
  402. package/dist/workspace/resolve.d.ts +0 -19
  403. package/dist/workspace/resolve.js +0 -100
@@ -1,120 +0,0 @@
1
- /**
2
- * `runwork dev attach` -- read-only join on a running dev session.
3
- *
4
- * Attach is the handover affordance: an agent starts `runwork dev --detach`,
5
- * a human (or another agent) later runs `runwork dev attach` to see the
6
- * URL and the live log feed without disturbing the running session.
7
- *
8
- * Hard rule: attach NEVER kills the session except in response to an
9
- * explicit `s` keypress (or `runwork dev stop` in another terminal).
10
- * Ctrl+C and `q` exit attach but leave the session running. This is the
11
- * inverted cleanup contract from foreground `runwork dev`, so we keep
12
- * the keyboard switch local to this module rather than reusing dev.ts's
13
- * dispatcher.
14
- */
15
- import { type SessionFile } from './session.js';
16
- export interface RenderedEvent {
17
- /** Pre-styled human-readable line ready to print to a TTY. */
18
- text: string;
19
- /** Severity hint, useful for filtering or color. */
20
- level: 'info' | 'warn' | 'error';
21
- }
22
- interface ColorFns {
23
- dim: (s: string) => string;
24
- green: (s: string) => string;
25
- yellow: (s: string) => string;
26
- red: (s: string) => string;
27
- cyan: (s: string) => string;
28
- }
29
- /**
30
- * Turn one raw log-file line into a rendered `RenderedEvent`. The line
31
- * may be NDJSON (the format the detached child writes) or plain text.
32
- *
33
- * - Known NDJSON `event` types get a friendly one-line summary.
34
- * - Unknown JSON shapes pass through as compact JSON with dim styling.
35
- * - Non-JSON text passes through verbatim, with stderr lines reddened.
36
- *
37
- * Pure function: no I/O, no globals, no color env. Tests pass identity
38
- * color fns to assert exact output without ANSI noise.
39
- */
40
- export declare function renderLogLine(line: string, source: 'stdout' | 'stderr', colors?: ColorFns): RenderedEvent;
41
- export interface LogTailOptions {
42
- /** Number of trailing lines to replay on attach. Default 50. */
43
- initialLines?: number;
44
- /** Poll interval. Default 500ms. */
45
- intervalMs?: number;
46
- /** Called for each new line. */
47
- onLine: (line: string, source: 'stdout' | 'stderr') => void;
48
- /**
49
- * Called when we detect file truncation (size shrunk) on either file.
50
- * The orchestrator decides whether this is a "session restarted -- exit
51
- * attach" or "spurious -- reset and continue."
52
- */
53
- onTruncated?: () => void;
54
- onError?: (err: unknown) => void;
55
- }
56
- export interface LogTail {
57
- stop(): void;
58
- }
59
- /**
60
- * Poll-based tail of stdout/stderr log files. Cross-platform by design
61
- * (no `fs.watch`, no native deps, identical behavior on macOS/Linux/
62
- * Windows). Reads the last `initialLines` lines on start to give the
63
- * attaching user immediate context, then watches for appends.
64
- */
65
- export declare function startLogTail(stdoutPath: string, stderrPath: string, opts: LogTailOptions): LogTail;
66
- /**
67
- * Format a "started X ago" string for human display. Pure function, no
68
- * locale handling -- this is a developer tool, not a UI.
69
- */
70
- export declare function formatStartedAgo(startedAt: number, now?: number): string;
71
- /**
72
- * Watch the session file for `previewUrl` rotations or for the file
73
- * disappearing (the session ended). Polls instead of `fs.watch` for
74
- * cross-platform consistency.
75
- */
76
- export interface SessionWatchOptions {
77
- intervalMs?: number;
78
- expectedAppId: string;
79
- onUrlChanged?: (next: string, prev: string) => void;
80
- onSessionGone?: () => void;
81
- onError?: (err: unknown) => void;
82
- }
83
- export interface SessionWatch {
84
- stop(): void;
85
- }
86
- export declare function startSessionFileWatch(appDir: string, initial: SessionFile, opts: SessionWatchOptions): SessionWatch;
87
- /**
88
- * Result returned to `dev.ts` so it can pick a top-level message + exit
89
- * code. The orchestrator function never calls `process.exit` itself --
90
- * tests can drive it without spawning a child.
91
- */
92
- export type AttachResult = {
93
- result: 'no-session';
94
- } | {
95
- result: 'stale-cleaned';
96
- reason: string;
97
- } | {
98
- result: 'attached';
99
- file: SessionFile;
100
- };
101
- /**
102
- * Resolve what attach can/should do based on the session file alone.
103
- * Pure logic; the caller decides what to render and whether to keep
104
- * running. Split out so the resolution can be unit-tested separately
105
- * from the long-running tail loop.
106
- */
107
- export declare function resolveAttachTarget(appDir: string, expectedAppId: string): AttachResult;
108
- /**
109
- * Helper exposed for the orchestrator: returns the current preview URL
110
- * the user should "open" if they press `o`. We re-read the session file
111
- * each time so URL rotations are honored without plumbing watchers
112
- * through the keyboard handler.
113
- */
114
- export declare function getCurrentPreviewUrl(appDir: string, fallback: string): string;
115
- /** Convenience: the log file paths for the given app dir. */
116
- export declare function getAttachLogPaths(appDir: string): {
117
- stdout: string;
118
- stderr: string;
119
- };
120
- export {};
@@ -1,269 +0,0 @@
1
- /**
2
- * `runwork dev attach` -- read-only join on a running dev session.
3
- *
4
- * Attach is the handover affordance: an agent starts `runwork dev --detach`,
5
- * a human (or another agent) later runs `runwork dev attach` to see the
6
- * URL and the live log feed without disturbing the running session.
7
- *
8
- * Hard rule: attach NEVER kills the session except in response to an
9
- * explicit `s` keypress (or `runwork dev stop` in another terminal).
10
- * Ctrl+C and `q` exit attach but leave the session running. This is the
11
- * inverted cleanup contract from foreground `runwork dev`, so we keep
12
- * the keyboard switch local to this module rather than reusing dev.ts's
13
- * dispatcher.
14
- */
15
- import * as fs from 'fs';
16
- import { getSessionPaths, getSessionState, readSessionFile, removeSessionFile, } from './session.js';
17
- const identityColors = {
18
- dim: (s) => s,
19
- green: (s) => s,
20
- yellow: (s) => s,
21
- red: (s) => s,
22
- cyan: (s) => s,
23
- };
24
- /**
25
- * Turn one raw log-file line into a rendered `RenderedEvent`. The line
26
- * may be NDJSON (the format the detached child writes) or plain text.
27
- *
28
- * - Known NDJSON `event` types get a friendly one-line summary.
29
- * - Unknown JSON shapes pass through as compact JSON with dim styling.
30
- * - Non-JSON text passes through verbatim, with stderr lines reddened.
31
- *
32
- * Pure function: no I/O, no globals, no color env. Tests pass identity
33
- * color fns to assert exact output without ANSI noise.
34
- */
35
- export function renderLogLine(line, source, colors = identityColors) {
36
- const trimmed = line.trim();
37
- if (!trimmed)
38
- return { text: line, level: 'info' };
39
- let parsed;
40
- try {
41
- parsed = JSON.parse(trimmed);
42
- }
43
- catch {
44
- return {
45
- text: source === 'stderr' ? colors.red(line) : line,
46
- level: source === 'stderr' ? 'error' : 'info',
47
- };
48
- }
49
- if (!parsed || typeof parsed !== 'object') {
50
- return { text: colors.dim(JSON.stringify(parsed)), level: 'info' };
51
- }
52
- const ev = parsed.event;
53
- if (typeof ev !== 'string') {
54
- return { text: colors.dim(JSON.stringify(parsed)), level: 'info' };
55
- }
56
- const obj = parsed;
57
- switch (ev) {
58
- case 'session_started': {
59
- const url = typeof obj.previewUrl === 'string' ? obj.previewUrl : '';
60
- return {
61
- text: colors.green('Dev session started') + (url ? ' ' + colors.dim(`(preview ${url})`) : ''),
62
- level: 'info',
63
- };
64
- }
65
- case 'preview_url_changed': {
66
- const next = typeof obj.previewUrl === 'string' ? obj.previewUrl : '?';
67
- const prev = typeof obj.previousUrl === 'string' ? obj.previousUrl : '?';
68
- return {
69
- text: colors.yellow('Preview URL changed') + ' ' + colors.dim(`${prev} -> ${next}`),
70
- level: 'warn',
71
- };
72
- }
73
- case 'files_synced': {
74
- const count = typeof obj.count === 'number' ? obj.count : 0;
75
- const target = typeof obj.target === 'string' ? obj.target : 'preview';
76
- return { text: colors.cyan(`Synced ${count} file(s) -> ${target}`), level: 'info' };
77
- }
78
- case 'files_pushed': {
79
- const count = typeof obj.count === 'number' ? obj.count : 0;
80
- return { text: colors.cyan(`Pushed ${count} file(s) -> git`), level: 'info' };
81
- }
82
- case 'startup': {
83
- const phase = typeof obj.phase === 'string' ? obj.phase : '';
84
- return { text: colors.dim(`[startup] ${phase}`), level: 'info' };
85
- }
86
- case 'sync_restored_critical_files': {
87
- const files = Array.isArray(obj.files) ? obj.files.filter((f) => typeof f === 'string').join(', ') : '';
88
- return { text: colors.yellow(`Restored critical files: ${files}`), level: 'warn' };
89
- }
90
- case 'error': {
91
- const errObj = obj.error;
92
- const msg = typeof errObj?.message === 'string' ? errObj.message : 'unknown error';
93
- const phase = typeof obj.phase === 'string' ? obj.phase : 'unknown';
94
- const diag = typeof errObj?.diagnosis === 'string' ? `\n ${colors.dim(errObj.diagnosis)}` : '';
95
- return { text: colors.red(`ERROR (${phase}): ${msg}${diag}`), level: 'error' };
96
- }
97
- default:
98
- return { text: colors.dim(JSON.stringify(parsed)), level: 'info' };
99
- }
100
- }
101
- /**
102
- * Poll-based tail of stdout/stderr log files. Cross-platform by design
103
- * (no `fs.watch`, no native deps, identical behavior on macOS/Linux/
104
- * Windows). Reads the last `initialLines` lines on start to give the
105
- * attaching user immediate context, then watches for appends.
106
- */
107
- export function startLogTail(stdoutPath, stderrPath, opts) {
108
- const intervalMs = opts.intervalMs ?? 500;
109
- const initialLines = opts.initialLines ?? 50;
110
- let stopped = false;
111
- const offsets = { stdout: 0, stderr: 0 };
112
- const paths = { stdout: stdoutPath, stderr: stderrPath };
113
- // Initial replay: last N lines from each file (most recent at the bottom).
114
- for (const source of ['stdout', 'stderr']) {
115
- const p = paths[source];
116
- if (!fs.existsSync(p))
117
- continue;
118
- try {
119
- const stat = fs.statSync(p);
120
- const buf = fs.readFileSync(p, 'utf-8');
121
- const lines = buf.split('\n');
122
- // Strip the trailing empty entry from a final `\n`.
123
- const cleaned = lines[lines.length - 1] === '' ? lines.slice(0, -1) : lines;
124
- const tail = cleaned.slice(-initialLines);
125
- for (const line of tail) {
126
- opts.onLine(line, source);
127
- }
128
- offsets[source] = stat.size;
129
- }
130
- catch (err) {
131
- opts.onError?.(err);
132
- }
133
- }
134
- const tickOne = (source) => {
135
- const p = paths[source];
136
- if (!fs.existsSync(p))
137
- return;
138
- let stat;
139
- try {
140
- stat = fs.statSync(p);
141
- }
142
- catch (err) {
143
- opts.onError?.(err);
144
- return;
145
- }
146
- if (stat.size < offsets[source]) {
147
- // Truncation: a new dev session started and re-opened the log file
148
- // in 'w' mode. Tell the caller; they decide whether to exit or
149
- // reset offsets and continue.
150
- opts.onTruncated?.();
151
- offsets[source] = 0;
152
- return;
153
- }
154
- if (stat.size === offsets[source])
155
- return;
156
- try {
157
- const fd = fs.openSync(p, 'r');
158
- try {
159
- const length = stat.size - offsets[source];
160
- const buf = Buffer.alloc(length);
161
- fs.readSync(fd, buf, 0, length, offsets[source]);
162
- offsets[source] = stat.size;
163
- const text = buf.toString('utf-8');
164
- const lines = text.split('\n');
165
- const cleaned = lines[lines.length - 1] === '' ? lines.slice(0, -1) : lines;
166
- for (const line of cleaned) {
167
- opts.onLine(line, source);
168
- }
169
- }
170
- finally {
171
- fs.closeSync(fd);
172
- }
173
- }
174
- catch (err) {
175
- opts.onError?.(err);
176
- }
177
- };
178
- const handle = setInterval(() => {
179
- if (stopped)
180
- return;
181
- tickOne('stdout');
182
- tickOne('stderr');
183
- }, intervalMs);
184
- return {
185
- stop: () => {
186
- stopped = true;
187
- clearInterval(handle);
188
- },
189
- };
190
- }
191
- /**
192
- * Format a "started X ago" string for human display. Pure function, no
193
- * locale handling -- this is a developer tool, not a UI.
194
- */
195
- export function formatStartedAgo(startedAt, now = Date.now()) {
196
- const sec = Math.max(0, Math.round((now - startedAt) / 1000));
197
- if (sec < 60)
198
- return `${sec}s ago`;
199
- if (sec < 3600)
200
- return `${Math.floor(sec / 60)}m ago`;
201
- return `${Math.floor(sec / 3600)}h ago`;
202
- }
203
- export function startSessionFileWatch(appDir, initial, opts) {
204
- const intervalMs = opts.intervalMs ?? 2_000;
205
- let stopped = false;
206
- let lastUrl = initial.previewUrl;
207
- const lastPid = initial.pid;
208
- const handle = setInterval(() => {
209
- if (stopped)
210
- return;
211
- const file = readSessionFile(appDir);
212
- if (!file) {
213
- // The file disappeared. Either the session ended cleanly (its
214
- // cleanup handler removed it) or someone called `dev stop`. Either
215
- // way, the session this attach was tracking is gone.
216
- opts.onSessionGone?.();
217
- return;
218
- }
219
- if (file.appId !== opts.expectedAppId || file.pid !== lastPid) {
220
- // A different session took over (e.g., user did `dev --restart`
221
- // somewhere). Treat the original session as gone -- attach was
222
- // following a specific PID, not the whole app.
223
- opts.onSessionGone?.();
224
- return;
225
- }
226
- if (file.previewUrl && file.previewUrl !== lastUrl) {
227
- const prev = lastUrl;
228
- lastUrl = file.previewUrl;
229
- opts.onUrlChanged?.(file.previewUrl, prev);
230
- }
231
- }, intervalMs);
232
- return {
233
- stop: () => {
234
- stopped = true;
235
- clearInterval(handle);
236
- },
237
- };
238
- }
239
- /**
240
- * Resolve what attach can/should do based on the session file alone.
241
- * Pure logic; the caller decides what to render and whether to keep
242
- * running. Split out so the resolution can be unit-tested separately
243
- * from the long-running tail loop.
244
- */
245
- export function resolveAttachTarget(appDir, expectedAppId) {
246
- const state = getSessionState(appDir, expectedAppId);
247
- if (state.state === 'none')
248
- return { result: 'no-session' };
249
- if (state.state === 'stale') {
250
- removeSessionFile(appDir);
251
- return { result: 'stale-cleaned', reason: state.reason };
252
- }
253
- return { result: 'attached', file: state.file };
254
- }
255
- /**
256
- * Helper exposed for the orchestrator: returns the current preview URL
257
- * the user should "open" if they press `o`. We re-read the session file
258
- * each time so URL rotations are honored without plumbing watchers
259
- * through the keyboard handler.
260
- */
261
- export function getCurrentPreviewUrl(appDir, fallback) {
262
- const file = readSessionFile(appDir);
263
- return file?.previewUrl || fallback;
264
- }
265
- /** Convenience: the log file paths for the given app dir. */
266
- export function getAttachLogPaths(appDir) {
267
- const paths = getSessionPaths(appDir);
268
- return { stdout: paths.stdoutLog, stderr: paths.stderrLog };
269
- }
@@ -1,187 +0,0 @@
1
- /**
2
- * `runwork dev --detach` orchestration.
3
- *
4
- * The detach contract:
5
- *
6
- * 1. Parent spawns the child via `process.execPath` with the same args
7
- * plus `--internal-detached-child`. Child stdout/stderr are routed to
8
- * log files in `.runwork/`. Parent calls `child.unref()` and exits as
9
- * soon as the rendezvous signal arrives.
10
- *
11
- * 2. Child runs the same `runwork dev` code path as foreground, but in
12
- * "detached" mode: no TUI, no keypress listener, JSON event stream
13
- * to stdout (which is the log file).
14
- *
15
- * 3. Rendezvous channel is the session file, NOT a pipe. The child
16
- * writes `.runwork/dev-session.json` once it has a `previewUrl`. The
17
- * parent polls. When the parent observes a file whose `pid` matches
18
- * the spawned child AND `previewUrl` is non-empty, parent prints +
19
- * emits the URL and exits 0.
20
- *
21
- * 4. On timeout, parent attempts a single kill of the child, removes
22
- * any partial session file, and exits 1 with a structured error.
23
- *
24
- * The file-as-IPC choice is intentional: pipes don't survive parent exit,
25
- * and Node IPC has historical Bun-on-Windows quirks. The session file is
26
- * already our durable lifecycle truth; reusing it for the handshake is
27
- * free.
28
- */
29
- import { type SessionDeps, type SessionFile } from './session.js';
30
- /**
31
- * Internal flag passed to the child. Hidden from `--help`. The child uses
32
- * its presence to skip the parent-spawn branch and run the actual dev
33
- * work in detached mode.
34
- */
35
- export declare const INTERNAL_DETACHED_CHILD_FLAG = "--internal-detached-child";
36
- export type PollOutcome = {
37
- result: 'ready';
38
- file: SessionFile;
39
- } | {
40
- result: 'timeout';
41
- } | {
42
- result: 'wrong-pid';
43
- file: SessionFile;
44
- } | {
45
- result: 'child-exited';
46
- };
47
- export interface PollDeps extends SessionDeps {
48
- now?: () => number;
49
- sleep?: (ms: number) => Promise<void>;
50
- }
51
- /**
52
- * Poll the session file until either:
53
- * - a file appears whose pid matches `expectedPid` AND has a non-empty
54
- * `previewUrl` -> `ready`
55
- * - the timeout elapses -> `timeout`
56
- *
57
- * If a file appears with a different pid (some other process won a write
58
- * race), we treat it as the user's intent being satisfied and return
59
- * `wrong-pid` so the caller can decide how to handle it -- usually that's
60
- * "another `runwork dev` invocation already had a session running, fine."
61
- *
62
- * The function does not validate `bootTime` or `appId` -- those are the
63
- * caller's job once they know which file matters. We only care about the
64
- * shape of the file and the pid match here.
65
- */
66
- export declare function pollForSession(appDir: string, expectedPid: number, expectedAppId: string, opts?: {
67
- intervalMs?: number;
68
- timeoutMs?: number;
69
- deps?: PollDeps;
70
- /**
71
- * Optional: probe whether the spawned child is still running. If
72
- * provided and it ever returns false, polling aborts immediately
73
- * with `child-exited`. Lets the caller distinguish "child died
74
- * before writing the file" (fast fail, ~one tick) from "child is
75
- * just slow" (wait for timeout). Without this hook the parent
76
- * would hang for the full timeout on a fast-failing child.
77
- */
78
- isChildAlive?: () => boolean;
79
- }): Promise<PollOutcome>;
80
- /**
81
- * Open the stdout/stderr log files in truncating mode and return their
82
- * descriptors. We truncate (not append) so each new dev session starts
83
- * fresh -- log rotation across sessions is out of scope.
84
- *
85
- * The descriptors must be closed by the caller after `spawn` so the
86
- * parent process doesn't keep them open (which would prevent the child
87
- * from being the sole owner).
88
- */
89
- export declare function openLogFds(appDir: string): {
90
- stdoutFd: number;
91
- stderrFd: number;
92
- };
93
- export interface SpawnedChildHandle {
94
- pid: number;
95
- kill: (signal?: NodeJS.Signals) => boolean;
96
- /**
97
- * Returns false once the child has exited. Lets `pollForSession`
98
- * abort early instead of waiting the full timeout when the child
99
- * fails fast (missing auth, sync conflict, sandbox-boot error).
100
- */
101
- isAlive: () => boolean;
102
- }
103
- export interface DetachParentOptions {
104
- appDir: string;
105
- expectedAppId: string;
106
- childArgs: string[];
107
- intervalMs?: number;
108
- timeoutMs?: number;
109
- /**
110
- * Optional spawn override for tests. Real callers pass nothing and get
111
- * the cross-platform spawn defined below.
112
- */
113
- spawn?: (args: string[]) => SpawnedChildHandle;
114
- pollDeps?: PollDeps;
115
- }
116
- export type DetachParentOutcome = {
117
- result: 'started';
118
- file: SessionFile;
119
- } | {
120
- result: 'wrong-pid';
121
- file: SessionFile;
122
- ourPid: number;
123
- } | {
124
- result: 'timeout';
125
- ourPid: number;
126
- childLogTail?: string;
127
- } | {
128
- result: 'child-exited';
129
- ourPid: number;
130
- childLogTail?: string;
131
- } | {
132
- result: 'spawn-failed';
133
- error: unknown;
134
- };
135
- /**
136
- * The parent half of `runwork dev --detach`. Returns a structured outcome
137
- * the caller can translate into stdout text and an exit code.
138
- *
139
- * IMPORTANT: this function does NOT print anything. It only orchestrates.
140
- * The caller (in `dev.ts`) decides how to render the outcome -- human
141
- * banner vs. JSON event vs. error stream.
142
- */
143
- export declare function runAsDetachedParent(opts: DetachParentOptions): Promise<DetachParentOutcome>;
144
- /**
145
- * Cross-platform detached self-spawn. Uses `process.execPath` so we never
146
- * depend on PATH lookup -- a known failure mode for Bun standalone on
147
- * Windows. The child gets the user-supplied args plus the internal child
148
- * marker.
149
- */
150
- export declare function defaultSpawnDetachedChild(childArgs: string[]): SpawnedChildHandle;
151
- /**
152
- * Detect whether the current `runwork dev` invocation is the detached
153
- * child. Used by `dev.ts` to pick between the parent-spawn branch and
154
- * the actual dev work.
155
- */
156
- export declare function isInternalDetachedChild(argv?: readonly string[]): boolean;
157
- /**
158
- * Strip the internal marker from a list of args. Used when constructing
159
- * the child's args from the parent's own args -- the parent already has
160
- * the marker, the child needs it, but we want to avoid duplicates if for
161
- * any reason the parent was itself launched with the marker (e.g., a
162
- * misconfigured wrapper).
163
- */
164
- export declare function stripInternalChildFlag(args: readonly string[]): string[];
165
- /**
166
- * Detect a Bun standalone virtual-filesystem path. Bun's compile mode
167
- * on Windows injects the in-bundle script path as `process.argv[1]`
168
- * (e.g., `B:/~BUN/root/runwork-windows-x64.exe`). When we self-spawn,
169
- * the child Bun runtime re-injects an equivalent entry on its own --
170
- * forwarding ours causes a duplicate that downstream parsers (commander
171
- * here) misread as a stray positional command. macOS and Linux Bun
172
- * standalone do NOT inject this entry, but the prefix is documented in
173
- * Bun source as `/$bunfs/` if it ever appears, so we detect that too
174
- * defensively.
175
- */
176
- export declare function looksLikeBunStandaloneArtifact(p: string): boolean;
177
- /**
178
- * Construct the args we should forward to the spawned child so it
179
- * re-runs the same `runwork dev` invocation as the parent. Drops
180
- * elements that the child runtime will re-inject on its own (notably
181
- * the Bun-on-Windows virtual-FS path) and drops any pre-existing copy
182
- * of the internal-child marker before we re-add exactly one.
183
- *
184
- * Pure function for testability -- accepts the parent's argv and returns
185
- * what to hand to `spawn`. Real callers pass `process.argv`.
186
- */
187
- export declare function buildChildArgs(parentArgv: readonly string[]): string[];