runwork 0.15.1 → 0.16.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 (404) hide show
  1. package/bundled-types/task-delegation/task-delegation/types.d.ts +6 -0
  2. package/dist/index.js +20237 -116
  3. package/package.json +4 -4
  4. package/dist/__tests__/curl-parser.test.d.ts +0 -1
  5. package/dist/__tests__/curl-parser.test.js +0 -250
  6. package/dist/__tests__/install-scripts.test.d.ts +0 -1
  7. package/dist/__tests__/install-scripts.test.js +0 -280
  8. package/dist/__tests__/types-manager.test.d.ts +0 -1
  9. package/dist/__tests__/types-manager.test.js +0 -89
  10. package/dist/agents/__tests__/chatgpt-registry.test.d.ts +0 -1
  11. package/dist/agents/__tests__/chatgpt-registry.test.js +0 -61
  12. package/dist/agents/__tests__/claude-code-managed-block.test.d.ts +0 -1
  13. package/dist/agents/__tests__/claude-code-managed-block.test.js +0 -105
  14. package/dist/agents/__tests__/claude-code-plugin.test.d.ts +0 -1
  15. package/dist/agents/__tests__/claude-code-plugin.test.js +0 -47
  16. package/dist/agents/__tests__/claude-code-stats.test.d.ts +0 -1
  17. package/dist/agents/__tests__/claude-code-stats.test.js +0 -390
  18. package/dist/agents/__tests__/claude-desktop-memory.test.d.ts +0 -1
  19. package/dist/agents/__tests__/claude-desktop-memory.test.js +0 -154
  20. package/dist/agents/__tests__/claude-desktop-plugin-tree.test.d.ts +0 -1
  21. package/dist/agents/__tests__/claude-desktop-plugin-tree.test.js +0 -161
  22. package/dist/agents/__tests__/claude-desktop-plugin.test.d.ts +0 -1
  23. package/dist/agents/__tests__/claude-desktop-plugin.test.js +0 -117
  24. package/dist/agents/__tests__/claude-desktop-rpm.test.d.ts +0 -1
  25. package/dist/agents/__tests__/claude-desktop-rpm.test.js +0 -126
  26. package/dist/agents/__tests__/claude-desktop-stats.test.d.ts +0 -1
  27. package/dist/agents/__tests__/claude-desktop-stats.test.js +0 -280
  28. package/dist/agents/__tests__/codex-instructions.test.d.ts +0 -1
  29. package/dist/agents/__tests__/codex-instructions.test.js +0 -57
  30. package/dist/agents/__tests__/codex-minimum-permissions.test.d.ts +0 -1
  31. package/dist/agents/__tests__/codex-minimum-permissions.test.js +0 -82
  32. package/dist/agents/__tests__/codex-stats.test.d.ts +0 -1
  33. package/dist/agents/__tests__/codex-stats.test.js +0 -370
  34. package/dist/agents/__tests__/cursor-merge.test.d.ts +0 -1
  35. package/dist/agents/__tests__/cursor-merge.test.js +0 -66
  36. package/dist/agents/__tests__/cursor-stats.test.d.ts +0 -1
  37. package/dist/agents/__tests__/cursor-stats.test.js +0 -183
  38. package/dist/agents/__tests__/defaults-merge.test.d.ts +0 -1
  39. package/dist/agents/__tests__/defaults-merge.test.js +0 -268
  40. package/dist/agents/__tests__/detection.test.d.ts +0 -1
  41. package/dist/agents/__tests__/detection.test.js +0 -89
  42. package/dist/agents/__tests__/graceful-degradation.test.d.ts +0 -1
  43. package/dist/agents/__tests__/graceful-degradation.test.js +0 -129
  44. package/dist/agents/__tests__/instruction-hint.test.d.ts +0 -1
  45. package/dist/agents/__tests__/instruction-hint.test.js +0 -69
  46. package/dist/agents/__tests__/intro-skill.test.d.ts +0 -1
  47. package/dist/agents/__tests__/intro-skill.test.js +0 -193
  48. package/dist/agents/__tests__/schema-validation.test.d.ts +0 -1
  49. package/dist/agents/__tests__/schema-validation.test.js +0 -212
  50. package/dist/agents/__tests__/skill-slug.test.d.ts +0 -1
  51. package/dist/agents/__tests__/skill-slug.test.js +0 -77
  52. package/dist/agents/claude-code.d.ts +0 -59
  53. package/dist/agents/claude-code.js +0 -753
  54. package/dist/agents/claude-desktop-plugin-tree.d.ts +0 -59
  55. package/dist/agents/claude-desktop-plugin-tree.js +0 -143
  56. package/dist/agents/claude-desktop.d.ts +0 -47
  57. package/dist/agents/claude-desktop.js +0 -684
  58. package/dist/agents/cline.d.ts +0 -15
  59. package/dist/agents/cline.js +0 -130
  60. package/dist/agents/codex.d.ts +0 -44
  61. package/dist/agents/codex.js +0 -453
  62. package/dist/agents/conversation-skills.d.ts +0 -18
  63. package/dist/agents/conversation-skills.js +0 -229
  64. package/dist/agents/cursor.d.ts +0 -35
  65. package/dist/agents/cursor.js +0 -294
  66. package/dist/agents/default-config.d.ts +0 -30
  67. package/dist/agents/default-config.js +0 -67
  68. package/dist/agents/defaults-merge.d.ts +0 -87
  69. package/dist/agents/defaults-merge.js +0 -150
  70. package/dist/agents/detect.d.ts +0 -4
  71. package/dist/agents/detect.js +0 -67
  72. package/dist/agents/detection.d.ts +0 -18
  73. package/dist/agents/detection.js +0 -94
  74. package/dist/agents/gemini.d.ts +0 -15
  75. package/dist/agents/gemini.js +0 -122
  76. package/dist/agents/generic-adapter.d.ts +0 -25
  77. package/dist/agents/generic-adapter.js +0 -151
  78. package/dist/agents/intro-skill.d.ts +0 -45
  79. package/dist/agents/intro-skill.js +0 -447
  80. package/dist/agents/registry-data.d.ts +0 -192
  81. package/dist/agents/registry-data.js +0 -669
  82. package/dist/agents/registry.d.ts +0 -13
  83. package/dist/agents/registry.js +0 -36
  84. package/dist/agents/runtime-detection.d.ts +0 -82
  85. package/dist/agents/runtime-detection.js +0 -271
  86. package/dist/agents/session-start-hook.d.ts +0 -37
  87. package/dist/agents/session-start-hook.js +0 -159
  88. package/dist/agents/types.d.ts +0 -171
  89. package/dist/agents/types.js +0 -75
  90. package/dist/agents/utils/instruction-hint.d.ts +0 -21
  91. package/dist/agents/utils/instruction-hint.js +0 -108
  92. package/dist/agents/utils/json-config.d.ts +0 -19
  93. package/dist/agents/utils/json-config.js +0 -69
  94. package/dist/agents/utils/toml-config.d.ts +0 -8
  95. package/dist/agents/utils/toml-config.js +0 -27
  96. package/dist/agents/windsurf.d.ts +0 -14
  97. package/dist/agents/windsurf.js +0 -102
  98. package/dist/api/__tests__/client.test.d.ts +0 -1
  99. package/dist/api/__tests__/client.test.js +0 -272
  100. package/dist/api/client.d.ts +0 -326
  101. package/dist/api/client.js +0 -427
  102. package/dist/auth/__tests__/login-flow.test.d.ts +0 -1
  103. package/dist/auth/__tests__/login-flow.test.js +0 -101
  104. package/dist/auth/__tests__/store.test.d.ts +0 -1
  105. package/dist/auth/__tests__/store.test.js +0 -132
  106. package/dist/auth/login-flow.d.ts +0 -26
  107. package/dist/auth/login-flow.js +0 -137
  108. package/dist/auth/store.d.ts +0 -5
  109. package/dist/auth/store.js +0 -62
  110. package/dist/commands/__tests__/clone-args.test.d.ts +0 -1
  111. package/dist/commands/__tests__/clone-args.test.js +0 -51
  112. package/dist/commands/__tests__/clone-source-result.test.d.ts +0 -1
  113. package/dist/commands/__tests__/clone-source-result.test.js +0 -45
  114. package/dist/commands/__tests__/info-merge.test.d.ts +0 -1
  115. package/dist/commands/__tests__/info-merge.test.js +0 -55
  116. package/dist/commands/__tests__/mcp-entries.test.d.ts +0 -1
  117. package/dist/commands/__tests__/mcp-entries.test.js +0 -48
  118. package/dist/commands/__tests__/setup-persona.test.d.ts +0 -1
  119. package/dist/commands/__tests__/setup-persona.test.js +0 -31
  120. package/dist/commands/__tests__/setup.test.d.ts +0 -1
  121. package/dist/commands/__tests__/setup.test.js +0 -81
  122. package/dist/commands/__tests__/sync-redetect.test.d.ts +0 -1
  123. package/dist/commands/__tests__/sync-redetect.test.js +0 -96
  124. package/dist/commands/__tests__/sync-telemetry.test.d.ts +0 -1
  125. package/dist/commands/__tests__/sync-telemetry.test.js +0 -281
  126. package/dist/commands/__tests__/upgrade.test.d.ts +0 -1
  127. package/dist/commands/__tests__/upgrade.test.js +0 -157
  128. package/dist/commands/agents.d.ts +0 -2
  129. package/dist/commands/agents.js +0 -160
  130. package/dist/commands/api-keys.d.ts +0 -2
  131. package/dist/commands/api-keys.js +0 -95
  132. package/dist/commands/apps.d.ts +0 -2
  133. package/dist/commands/apps.js +0 -82
  134. package/dist/commands/build-plugin.d.ts +0 -2
  135. package/dist/commands/build-plugin.js +0 -135
  136. package/dist/commands/clone.d.ts +0 -60
  137. package/dist/commands/clone.js +0 -271
  138. package/dist/commands/components.d.ts +0 -2
  139. package/dist/commands/components.js +0 -43
  140. package/dist/commands/deploy.d.ts +0 -2
  141. package/dist/commands/deploy.js +0 -279
  142. package/dist/commands/dev.d.ts +0 -11
  143. package/dist/commands/dev.js +0 -1011
  144. package/dist/commands/doctor.d.ts +0 -2
  145. package/dist/commands/doctor.js +0 -230
  146. package/dist/commands/endpoints.d.ts +0 -2
  147. package/dist/commands/endpoints.js +0 -189
  148. package/dist/commands/entities.d.ts +0 -2
  149. package/dist/commands/entities.js +0 -198
  150. package/dist/commands/files.d.ts +0 -2
  151. package/dist/commands/files.js +0 -193
  152. package/dist/commands/inbox.d.ts +0 -11
  153. package/dist/commands/inbox.js +0 -60
  154. package/dist/commands/info.d.ts +0 -178
  155. package/dist/commands/info.js +0 -455
  156. package/dist/commands/init.d.ts +0 -21
  157. package/dist/commands/init.js +0 -185
  158. package/dist/commands/integrations.d.ts +0 -2
  159. package/dist/commands/integrations.js +0 -233
  160. package/dist/commands/login.d.ts +0 -2
  161. package/dist/commands/login.js +0 -44
  162. package/dist/commands/logout.d.ts +0 -2
  163. package/dist/commands/logout.js +0 -13
  164. package/dist/commands/logs.d.ts +0 -2
  165. package/dist/commands/logs.js +0 -232
  166. package/dist/commands/mcp-entries.d.ts +0 -13
  167. package/dist/commands/mcp-entries.js +0 -26
  168. package/dist/commands/mcp.d.ts +0 -2
  169. package/dist/commands/mcp.js +0 -245
  170. package/dist/commands/open.d.ts +0 -2
  171. package/dist/commands/open.js +0 -53
  172. package/dist/commands/resume.d.ts +0 -2
  173. package/dist/commands/resume.js +0 -289
  174. package/dist/commands/save-convo.d.ts +0 -8
  175. package/dist/commands/save-convo.js +0 -20
  176. package/dist/commands/schedules.d.ts +0 -2
  177. package/dist/commands/schedules.js +0 -221
  178. package/dist/commands/setup.d.ts +0 -27
  179. package/dist/commands/setup.js +0 -177
  180. package/dist/commands/share-convo.d.ts +0 -24
  181. package/dist/commands/share-convo.js +0 -167
  182. package/dist/commands/skills.d.ts +0 -2
  183. package/dist/commands/skills.js +0 -352
  184. package/dist/commands/sync-telemetry.d.ts +0 -33
  185. package/dist/commands/sync-telemetry.js +0 -186
  186. package/dist/commands/sync.d.ts +0 -37
  187. package/dist/commands/sync.js +0 -702
  188. package/dist/commands/uninstall.d.ts +0 -2
  189. package/dist/commands/uninstall.js +0 -145
  190. package/dist/commands/upgrade.d.ts +0 -14
  191. package/dist/commands/upgrade.js +0 -217
  192. package/dist/commands/validate.d.ts +0 -2
  193. package/dist/commands/validate.js +0 -89
  194. package/dist/commands/welcome.d.ts +0 -1
  195. package/dist/commands/welcome.js +0 -86
  196. package/dist/commands/workflows.d.ts +0 -2
  197. package/dist/commands/workflows.js +0 -187
  198. package/dist/deploy/__tests__/deploy-state.test.d.ts +0 -1
  199. package/dist/deploy/__tests__/deploy-state.test.js +0 -80
  200. package/dist/deploy/__tests__/deploy-status.test.d.ts +0 -1
  201. package/dist/deploy/__tests__/deploy-status.test.js +0 -41
  202. package/dist/deploy/__tests__/detach-args.test.d.ts +0 -1
  203. package/dist/deploy/__tests__/detach-args.test.js +0 -30
  204. package/dist/deploy/deploy-state.d.ts +0 -36
  205. package/dist/deploy/deploy-state.js +0 -63
  206. package/dist/deploy/deploy-status.d.ts +0 -21
  207. package/dist/deploy/deploy-status.js +0 -36
  208. package/dist/deploy/detach.d.ts +0 -32
  209. package/dist/deploy/detach.js +0 -71
  210. package/dist/dev/__tests__/attach.test.d.ts +0 -1
  211. package/dist/dev/__tests__/attach.test.js +0 -296
  212. package/dist/dev/__tests__/detach.test.d.ts +0 -1
  213. package/dist/dev/__tests__/detach.test.js +0 -404
  214. package/dist/dev/__tests__/preview-url-poller.test.d.ts +0 -1
  215. package/dist/dev/__tests__/preview-url-poller.test.js +0 -149
  216. package/dist/dev/__tests__/session.test.d.ts +0 -1
  217. package/dist/dev/__tests__/session.test.js +0 -446
  218. package/dist/dev/__tests__/startup-sync.test.d.ts +0 -1
  219. package/dist/dev/__tests__/startup-sync.test.js +0 -32
  220. package/dist/dev/__tests__/stop.test.d.ts +0 -1
  221. package/dist/dev/__tests__/stop.test.js +0 -172
  222. package/dist/dev/attach.d.ts +0 -120
  223. package/dist/dev/attach.js +0 -269
  224. package/dist/dev/detach.d.ts +0 -187
  225. package/dist/dev/detach.js +0 -292
  226. package/dist/dev/preview-url-poller.d.ts +0 -35
  227. package/dist/dev/preview-url-poller.js +0 -50
  228. package/dist/dev/session.d.ts +0 -175
  229. package/dist/dev/session.js +0 -258
  230. package/dist/dev/startup-sync.d.ts +0 -23
  231. package/dist/dev/startup-sync.js +0 -14
  232. package/dist/dev/stop.d.ts +0 -52
  233. package/dist/dev/stop.js +0 -101
  234. package/dist/devtools/registry-data.d.ts +0 -46
  235. package/dist/devtools/registry-data.js +0 -40
  236. package/dist/generated/bundled-types.d.ts +0 -1
  237. package/dist/generated/bundled-types.js +0 -46
  238. package/dist/generated/version.d.ts +0 -1
  239. package/dist/generated/version.js +0 -2
  240. package/dist/git/__tests__/auto-commit.test.d.ts +0 -1
  241. package/dist/git/__tests__/auto-commit.test.js +0 -431
  242. package/dist/git/__tests__/classify-sync-error.test.d.ts +0 -1
  243. package/dist/git/__tests__/classify-sync-error.test.js +0 -57
  244. package/dist/git/__tests__/credential-helper-e2e.test.d.ts +0 -21
  245. package/dist/git/__tests__/credential-helper-e2e.test.js +0 -195
  246. package/dist/git/__tests__/credentials.test.d.ts +0 -1
  247. package/dist/git/__tests__/credentials.test.js +0 -141
  248. package/dist/git/__tests__/deploy-guard.test.d.ts +0 -1
  249. package/dist/git/__tests__/deploy-guard.test.js +0 -61
  250. package/dist/git/__tests__/ensure-git-credential-helper.test.d.ts +0 -1
  251. package/dist/git/__tests__/ensure-git-credential-helper.test.js +0 -133
  252. package/dist/git/__tests__/ensure-runwork-remote.test.d.ts +0 -1
  253. package/dist/git/__tests__/ensure-runwork-remote.test.js +0 -109
  254. package/dist/git/__tests__/identity.test.d.ts +0 -1
  255. package/dist/git/__tests__/identity.test.js +0 -146
  256. package/dist/git/__tests__/manifest.test.d.ts +0 -1
  257. package/dist/git/__tests__/manifest.test.js +0 -446
  258. package/dist/git/__tests__/preflight-resolution.test.d.ts +0 -1
  259. package/dist/git/__tests__/preflight-resolution.test.js +0 -366
  260. package/dist/git/__tests__/preflight.test.d.ts +0 -1
  261. package/dist/git/__tests__/preflight.test.js +0 -36
  262. package/dist/git/__tests__/repo-config.test.d.ts +0 -1
  263. package/dist/git/__tests__/repo-config.test.js +0 -26
  264. package/dist/git/__tests__/sync.test.d.ts +0 -1
  265. package/dist/git/__tests__/sync.test.js +0 -405
  266. package/dist/git/auto-commit.d.ts +0 -35
  267. package/dist/git/auto-commit.js +0 -293
  268. package/dist/git/classify-sync-error.d.ts +0 -21
  269. package/dist/git/classify-sync-error.js +0 -111
  270. package/dist/git/credentials.d.ts +0 -75
  271. package/dist/git/credentials.js +0 -164
  272. package/dist/git/critical-files.d.ts +0 -20
  273. package/dist/git/critical-files.js +0 -68
  274. package/dist/git/deploy-guard.d.ts +0 -53
  275. package/dist/git/deploy-guard.js +0 -78
  276. package/dist/git/identity.d.ts +0 -44
  277. package/dist/git/identity.js +0 -133
  278. package/dist/git/preflight.d.ts +0 -57
  279. package/dist/git/preflight.js +0 -276
  280. package/dist/git/remote.d.ts +0 -37
  281. package/dist/git/remote.js +0 -75
  282. package/dist/git/repo-config.d.ts +0 -8
  283. package/dist/git/repo-config.js +0 -29
  284. package/dist/git/sync.d.ts +0 -15
  285. package/dist/git/sync.js +0 -159
  286. package/dist/health/__tests__/checks.test.d.ts +0 -1
  287. package/dist/health/__tests__/checks.test.js +0 -357
  288. package/dist/health/__tests__/cli-distribution-checks.test.d.ts +0 -1
  289. package/dist/health/__tests__/cli-distribution-checks.test.js +0 -196
  290. package/dist/health/__tests__/fix.test.d.ts +0 -1
  291. package/dist/health/__tests__/fix.test.js +0 -72
  292. package/dist/health/__tests__/runner-filter.test.d.ts +0 -1
  293. package/dist/health/__tests__/runner-filter.test.js +0 -61
  294. package/dist/health/checks.d.ts +0 -42
  295. package/dist/health/checks.js +0 -636
  296. package/dist/health/fix.d.ts +0 -22
  297. package/dist/health/fix.js +0 -62
  298. package/dist/health/runner.d.ts +0 -8
  299. package/dist/health/runner.js +0 -47
  300. package/dist/health/types.d.ts +0 -12
  301. package/dist/health/types.js +0 -1
  302. package/dist/index.d.ts +0 -1
  303. package/dist/logs/__tests__/tailer-format.test.d.ts +0 -1
  304. package/dist/logs/__tests__/tailer-format.test.js +0 -43
  305. package/dist/logs/tailer.d.ts +0 -17
  306. package/dist/logs/tailer.js +0 -217
  307. package/dist/sync/__tests__/change-detect.test.d.ts +0 -1
  308. package/dist/sync/__tests__/change-detect.test.js +0 -123
  309. package/dist/sync/__tests__/hash.test.d.ts +0 -1
  310. package/dist/sync/__tests__/hash.test.js +0 -18
  311. package/dist/sync/change-detect.d.ts +0 -19
  312. package/dist/sync/change-detect.js +0 -136
  313. package/dist/sync/conflict-ui.d.ts +0 -5
  314. package/dist/sync/conflict-ui.js +0 -78
  315. package/dist/sync/executor.d.ts +0 -23
  316. package/dist/sync/executor.js +0 -102
  317. package/dist/sync/hash.d.ts +0 -1
  318. package/dist/sync/hash.js +0 -4
  319. package/dist/sync/types.d.ts +0 -24
  320. package/dist/sync/types.js +0 -1
  321. package/dist/template/manifest.d.ts +0 -17
  322. package/dist/template/manifest.js +0 -145
  323. package/dist/tools/types.d.ts +0 -52
  324. package/dist/tools/types.js +0 -8
  325. package/dist/types-manager.d.ts +0 -1
  326. package/dist/types-manager.js +0 -35
  327. package/dist/types.d.ts +0 -349
  328. package/dist/types.js +0 -1
  329. package/dist/ui/__tests__/banner.test.d.ts +0 -1
  330. package/dist/ui/__tests__/banner.test.js +0 -98
  331. package/dist/ui/__tests__/colors.test.d.ts +0 -1
  332. package/dist/ui/__tests__/colors.test.js +0 -22
  333. package/dist/ui/__tests__/keyboard.test.d.ts +0 -1
  334. package/dist/ui/__tests__/keyboard.test.js +0 -34
  335. package/dist/ui/__tests__/status-line.test.d.ts +0 -1
  336. package/dist/ui/__tests__/status-line.test.js +0 -54
  337. package/dist/ui/banner.d.ts +0 -29
  338. package/dist/ui/banner.js +0 -153
  339. package/dist/ui/colors.d.ts +0 -4
  340. package/dist/ui/colors.js +0 -7
  341. package/dist/ui/keyboard.d.ts +0 -12
  342. package/dist/ui/keyboard.js +0 -61
  343. package/dist/ui/status-line.d.ts +0 -6
  344. package/dist/ui/status-line.js +0 -53
  345. package/dist/utils/__tests__/format-error.test.d.ts +0 -1
  346. package/dist/utils/__tests__/format-error.test.js +0 -43
  347. package/dist/utils/__tests__/help-json.test.d.ts +0 -1
  348. package/dist/utils/__tests__/help-json.test.js +0 -39
  349. package/dist/utils/__tests__/http.test.d.ts +0 -1
  350. package/dist/utils/__tests__/http.test.js +0 -381
  351. package/dist/utils/__tests__/ignore-matcher.test.d.ts +0 -1
  352. package/dist/utils/__tests__/ignore-matcher.test.js +0 -205
  353. package/dist/utils/__tests__/output.test.d.ts +0 -1
  354. package/dist/utils/__tests__/output.test.js +0 -38
  355. package/dist/utils/__tests__/prompt.test.d.ts +0 -1
  356. package/dist/utils/__tests__/prompt.test.js +0 -27
  357. package/dist/utils/__tests__/resolve.test.d.ts +0 -1
  358. package/dist/utils/__tests__/resolve.test.js +0 -95
  359. package/dist/utils/__tests__/sqlite.test.d.ts +0 -1
  360. package/dist/utils/__tests__/sqlite.test.js +0 -89
  361. package/dist/utils/agent-guidance.d.ts +0 -47
  362. package/dist/utils/agent-guidance.js +0 -128
  363. package/dist/utils/app-info.d.ts +0 -70
  364. package/dist/utils/app-info.js +0 -167
  365. package/dist/utils/curl-parser.d.ts +0 -12
  366. package/dist/utils/curl-parser.js +0 -162
  367. package/dist/utils/data-input.d.ts +0 -1
  368. package/dist/utils/data-input.js +0 -38
  369. package/dist/utils/format-error.d.ts +0 -10
  370. package/dist/utils/format-error.js +0 -38
  371. package/dist/utils/fs.d.ts +0 -5
  372. package/dist/utils/fs.js +0 -23
  373. package/dist/utils/help-json.d.ts +0 -70
  374. package/dist/utils/help-json.js +0 -88
  375. package/dist/utils/http.d.ts +0 -46
  376. package/dist/utils/http.js +0 -421
  377. package/dist/utils/ignore-matcher.d.ts +0 -47
  378. package/dist/utils/ignore-matcher.js +0 -132
  379. package/dist/utils/output.d.ts +0 -17
  380. package/dist/utils/output.js +0 -27
  381. package/dist/utils/prompt.d.ts +0 -5
  382. package/dist/utils/prompt.js +0 -42
  383. package/dist/utils/resolve.d.ts +0 -12
  384. package/dist/utils/resolve.js +0 -52
  385. package/dist/utils/setup-state.d.ts +0 -3
  386. package/dist/utils/setup-state.js +0 -19
  387. package/dist/utils/sqlite-adapter.d.ts +0 -48
  388. package/dist/utils/sqlite-adapter.js +0 -147
  389. package/dist/utils/sqlite.d.ts +0 -14
  390. package/dist/utils/sqlite.js +0 -14
  391. package/dist/utils/subprocess.d.ts +0 -19
  392. package/dist/utils/subprocess.js +0 -27
  393. package/dist/utils/which.d.ts +0 -14
  394. package/dist/utils/which.js +0 -47
  395. package/dist/utils/zip.d.ts +0 -7
  396. package/dist/utils/zip.js +0 -42
  397. package/dist/validate/__tests__/validate.test.d.ts +0 -1
  398. package/dist/validate/__tests__/validate.test.js +0 -42
  399. package/dist/validate/freshness.d.ts +0 -28
  400. package/dist/validate/freshness.js +0 -48
  401. package/dist/validate/preview.d.ts +0 -21
  402. package/dist/validate/preview.js +0 -39
  403. package/dist/workspace/resolve.d.ts +0 -19
  404. package/dist/workspace/resolve.js +0 -100
@@ -1,245 +0,0 @@
1
- import { Command } from 'commander';
2
- import { requireAuth } from '../auth/store.js';
3
- import { ApiClient } from '../api/client.js';
4
- import { resolveWorkspace } from '../workspace/resolve.js';
5
- import { promptConfirm } from '../utils/prompt.js';
6
- import { shouldOutputJson, jsonOut } from '../utils/output.js';
7
- const listCommand = new Command('list')
8
- .description('List workspace MCP servers')
9
- .option('--workspace <id>', 'Workspace ID')
10
- .action(async (opts, command) => {
11
- const useJson = shouldOutputJson(command.optsWithGlobals().json);
12
- const credentials = requireAuth();
13
- const client = new ApiClient(credentials);
14
- const { workspaceId, workspaceName } = await resolveWorkspace(client, opts);
15
- try {
16
- const baseUrl = credentials.baseUrl || 'https://runwork.ai';
17
- const [servers, apps] = await Promise.all([
18
- client.listMcpServers(workspaceId),
19
- client.listApps(workspaceId).catch(() => []),
20
- ]);
21
- // Build the workspace MCP entry
22
- const workspaceMcpUrl = `${baseUrl}/api/workspaces/${workspaceId}/mcp`;
23
- // Build per-app MCP entries
24
- const appMcpEntries = apps.map(app => ({
25
- name: app.name,
26
- url: `${baseUrl}/api/workspaces/${workspaceId}/apps/${app.id}/mcp`,
27
- }));
28
- if (useJson) {
29
- jsonOut({
30
- workspace: { name: 'Workspace', url: workspaceMcpUrl },
31
- apps: appMcpEntries,
32
- external: servers,
33
- });
34
- return;
35
- }
36
- console.log(`\nWorkspace: ${workspaceName || workspaceId}\n`);
37
- // Workspace MCP
38
- console.log(' Workspace MCP (all tools across apps)');
39
- console.log(' ' + '-'.repeat(75));
40
- console.log(` ${workspaceMcpUrl}`);
41
- console.log('');
42
- // App MCPs
43
- if (appMcpEntries.length > 0) {
44
- console.log(' App MCP Servers (per-app scope)');
45
- console.log(' ' + '-'.repeat(75));
46
- for (const app of appMcpEntries) {
47
- console.log(` ${app.name.padEnd(20)} ${app.url}`);
48
- }
49
- console.log('');
50
- }
51
- // External MCPs
52
- if (servers.length > 0) {
53
- console.log(' External MCP Servers');
54
- console.log(' ' + '-'.repeat(75));
55
- for (const s of servers) {
56
- const status = s.enabled
57
- ? (s.toolCount ? `connected (${s.toolCount} tools)` : 'enabled')
58
- : 'disabled';
59
- console.log(` ${s.name.padEnd(20)} ${s.url.padEnd(45)} ${status}`);
60
- }
61
- console.log('');
62
- }
63
- else {
64
- console.log(' No external MCP servers. Add one with: runwork mcp add <name> <url>');
65
- console.log('');
66
- }
67
- }
68
- catch (err) {
69
- console.error('Failed to list MCP servers:', err instanceof Error ? err.message : err);
70
- process.exit(1);
71
- }
72
- });
73
- const addCommand = new Command('add')
74
- .description('Add an MCP server to workspace')
75
- .argument('<name>', 'Server name')
76
- .argument('<url>', 'Server URL (Streamable HTTP or SSE endpoint)')
77
- .option('--transport <type>', 'Transport type: streamable-http or sse', 'streamable-http')
78
- .option('--workspace <id>', 'Workspace ID')
79
- .action(async (name, url, opts, command) => {
80
- const useJson = shouldOutputJson(command.optsWithGlobals().json);
81
- const credentials = requireAuth();
82
- const client = new ApiClient(credentials);
83
- const { workspaceId } = await resolveWorkspace(client, opts);
84
- try {
85
- new URL(url);
86
- }
87
- catch {
88
- console.error(`Invalid URL: ${url}`);
89
- process.exit(1);
90
- }
91
- try {
92
- const server = await client.addMcpServer(workspaceId, {
93
- name,
94
- url,
95
- transport: opts.transport,
96
- });
97
- if (useJson) {
98
- jsonOut({ server });
99
- return;
100
- }
101
- console.log(`Added MCP server "${name}" (${url})`);
102
- console.log('Run `runwork sync` to update your local agent configs.');
103
- }
104
- catch (err) {
105
- console.error('Failed to add MCP server:', err instanceof Error ? err.message : err);
106
- process.exit(1);
107
- }
108
- });
109
- const removeCommand = new Command('remove')
110
- .description('Remove an MCP server from workspace')
111
- .argument('<name>', 'Server name')
112
- .option('--yes', 'Skip confirmation')
113
- .option('--workspace <id>', 'Workspace ID')
114
- .action(async (name, opts, command) => {
115
- const useJson = shouldOutputJson(command.optsWithGlobals().json);
116
- const credentials = requireAuth();
117
- const client = new ApiClient(credentials);
118
- const { workspaceId } = await resolveWorkspace(client, opts);
119
- try {
120
- const servers = await client.listMcpServers(workspaceId);
121
- const match = servers.find(s => s.name === name);
122
- if (!match) {
123
- console.error(`MCP server "${name}" not found in workspace.`);
124
- process.exit(1);
125
- }
126
- if (!opts.yes && !useJson) {
127
- const confirmed = await promptConfirm(`Remove MCP server "${name}" (${match.url})?`);
128
- if (!confirmed)
129
- return;
130
- }
131
- await client.removeMcpServer(workspaceId, match.id);
132
- if (useJson) {
133
- jsonOut({ removed: true, name });
134
- return;
135
- }
136
- console.log(`Removed MCP server "${name}".`);
137
- console.log('Run `runwork sync` to update your local agent configs.');
138
- }
139
- catch (err) {
140
- console.error('Failed to remove MCP server:', err instanceof Error ? err.message : err);
141
- process.exit(1);
142
- }
143
- });
144
- const searchCommand = new Command('search')
145
- .description('Search community MCP servers from the MCP Registry')
146
- .argument('<query>', 'Search query')
147
- .option('--limit <n>', 'Max results (1-50)', '10')
148
- .action(async (query, opts, command) => {
149
- const useJson = shouldOutputJson(command.optsWithGlobals().json);
150
- const credentials = requireAuth();
151
- const client = new ApiClient(credentials);
152
- try {
153
- const results = await client.searchCommunityMcpServers(query, Number(opts.limit));
154
- if (useJson) {
155
- jsonOut(results);
156
- return;
157
- }
158
- if (results.servers.length === 0) {
159
- console.log(`No remote-capable MCP servers found for "${query}".`);
160
- return;
161
- }
162
- console.log(`\n ${results.count} remote-capable server${results.count !== 1 ? 's' : ''} for "${query}"\n`);
163
- console.log(` ${'Name'.padEnd(35)} ${'Type'.padEnd(18)} URL`);
164
- console.log(' ' + '-'.repeat(90));
165
- for (const s of results.servers) {
166
- const name = s.title || s.name.split('/').pop() || s.name;
167
- const remote = s.remotes[0];
168
- const transport = remote ? remote.type : 'N/A';
169
- const url = remote ? truncateUrl(remote.url, 40) : 'N/A';
170
- console.log(` ${name.padEnd(35)} ${transport.padEnd(18)} ${url}`);
171
- }
172
- console.log(`\n Connect with: runwork mcp install <name>`);
173
- console.log('');
174
- }
175
- catch (err) {
176
- console.error('Search failed:', err instanceof Error ? err.message : err);
177
- process.exit(1);
178
- }
179
- });
180
- const installCommand = new Command('install')
181
- .description('Install a community MCP server from the MCP Registry into your workspace')
182
- .argument('<query>', 'Server name or search query')
183
- .option('--workspace <id>', 'Workspace ID')
184
- .action(async (query, opts, command) => {
185
- const useJson = shouldOutputJson(command.optsWithGlobals().json);
186
- const credentials = requireAuth();
187
- const client = new ApiClient(credentials);
188
- const { workspaceId } = await resolveWorkspace(client, opts);
189
- try {
190
- const results = await client.searchCommunityMcpServers(query, 5);
191
- if (results.servers.length === 0) {
192
- console.error(`No remote-capable MCP servers found for "${query}".`);
193
- process.exit(1);
194
- }
195
- // Pick best match (first result)
196
- const server = results.servers[0];
197
- const remote = server.remotes[0];
198
- if (!remote) {
199
- console.error(`Server "${server.name}" has no remote endpoint.`);
200
- process.exit(1);
201
- }
202
- if (remote.url.includes('{') && remote.url.includes('}')) {
203
- console.error(`Server "${server.name}" requires configuration variables in its URL.`);
204
- console.error(`URL template: ${remote.url}`);
205
- console.error('Use `runwork mcp add <name> <url>` to add it manually with the correct URL.');
206
- process.exit(1);
207
- }
208
- const displayName = server.title || server.name.split('/').pop() || server.name;
209
- if (!opts.yes && !useJson) {
210
- console.log(`\n Found: ${displayName}`);
211
- console.log(` URL: ${remote.url}`);
212
- console.log(` Type: ${remote.type}\n`);
213
- const confirmed = await promptConfirm(`Connect "${displayName}" to your workspace?`);
214
- if (!confirmed)
215
- return;
216
- }
217
- const added = await client.addMcpServer(workspaceId, {
218
- name: displayName,
219
- url: remote.url,
220
- transport: remote.type,
221
- });
222
- if (useJson) {
223
- jsonOut({ server: added, source: server.name });
224
- return;
225
- }
226
- console.log(`Connected "${displayName}" (${remote.url})`);
227
- console.log('Run `runwork sync` to update your local agent configs.');
228
- }
229
- catch (err) {
230
- console.error('Install failed:', err instanceof Error ? err.message : err);
231
- process.exit(1);
232
- }
233
- });
234
- function truncateUrl(url, max) {
235
- if (url.length <= max)
236
- return url;
237
- return url.slice(0, max - 3) + '...';
238
- }
239
- export const mcpCommand = new Command('mcp')
240
- .description('Manage workspace MCP servers')
241
- .addCommand(listCommand)
242
- .addCommand(addCommand)
243
- .addCommand(removeCommand)
244
- .addCommand(searchCommand)
245
- .addCommand(installCommand);
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare const openCommand: Command;
@@ -1,53 +0,0 @@
1
- import { Command } from 'commander';
2
- import { readFileSync, existsSync } from 'fs';
3
- import { requireAuth } from '../auth/store.js';
4
- import { ApiClient } from '../api/client.js';
5
- import { cyan } from '../ui/colors.js';
6
- import { shouldOutputJson, jsonOut } from '../utils/output.js';
7
- export const openCommand = new Command('open')
8
- .description('Open app preview or dashboard in browser')
9
- .argument('[target]', 'What to open: preview (default), dashboard', 'preview')
10
- .action(async (target, _opts, command) => {
11
- const useJson = shouldOutputJson(command.optsWithGlobals().json);
12
- if (!existsSync('.runwork.json')) {
13
- console.error('No .runwork.json found. Run `runwork init` first.');
14
- process.exit(1);
15
- }
16
- const config = JSON.parse(readFileSync('.runwork.json', 'utf-8'));
17
- const creds = requireAuth();
18
- const client = new ApiClient(creds);
19
- const open = await import('open');
20
- switch (target) {
21
- case 'preview': {
22
- let previewUrl;
23
- try {
24
- const status = await client.getDevStatus(config.appId);
25
- previewUrl = status.previewUrl;
26
- }
27
- catch {
28
- const session = await client.startDevSession(config.appId);
29
- previewUrl = session.previewUrl;
30
- }
31
- if (useJson) {
32
- jsonOut({ target: 'preview', url: previewUrl });
33
- return;
34
- }
35
- console.log(`Opening preview: ${cyan(previewUrl)}`);
36
- await open.default(previewUrl);
37
- break;
38
- }
39
- case 'dashboard': {
40
- const url = `${creds.baseUrl}/apps/${config.appId}`;
41
- if (useJson) {
42
- jsonOut({ target: 'dashboard', url });
43
- return;
44
- }
45
- console.log(`Opening dashboard: ${cyan(url)}`);
46
- await open.default(url);
47
- break;
48
- }
49
- default:
50
- console.error(`Unknown target: ${target}. Use "preview" or "dashboard".`);
51
- process.exit(1);
52
- }
53
- });
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare const resumeCommand: Command;
@@ -1,289 +0,0 @@
1
- import { Command } from 'commander';
2
- import { writeFileSync, mkdirSync, realpathSync } from 'fs';
3
- import { homedir } from 'os';
4
- import { join } from 'path';
5
- import { spawn } from 'child_process';
6
- import { requireAuth } from '../auth/store.js';
7
- import { ApiClient } from '../api/client.js';
8
- import { resolveWorkspace } from '../workspace/resolve.js';
9
- import { shouldOutputJson, jsonOut } from '../utils/output.js';
10
- import { getAgent } from '../agents/registry-data.js';
11
- import { detectCurrentAgent } from '../agents/runtime-detection.js';
12
- import { whichBinary } from '../utils/which.js';
13
- /**
14
- * Mirror of Claude Code's cwd encoding rule: replace every non-alphanumeric
15
- * character with '-'. The canonical (realpath-resolved) cwd is encoded so
16
- * /tmp/foo on macOS encodes the same as /private/tmp/foo (which is how
17
- * Claude Code itself resolves the cwd).
18
- */
19
- function encodeClaudeCodeCwd(cwd) {
20
- let canonical;
21
- try {
22
- canonical = realpathSync(cwd);
23
- }
24
- catch {
25
- canonical = cwd;
26
- }
27
- return canonical.replace(/[^a-zA-Z0-9]/g, '-');
28
- }
29
- /**
30
- * Extract the original Claude Code session UUID from the first event of a
31
- * JSONL bundle. Claude Code's `--resume <uuid>` expects this UUID; the
32
- * filename on disk must match `<uuid>.jsonl`.
33
- */
34
- function extractClaudeCodeUuid(jsonlContent) {
35
- const firstLine = jsonlContent.split('\n').find(l => l.trim().length > 0);
36
- if (!firstLine)
37
- return null;
38
- try {
39
- const event = JSON.parse(firstLine);
40
- return event.sessionId ?? null;
41
- }
42
- catch {
43
- return null;
44
- }
45
- }
46
- /**
47
- * Extract the original Codex thread UUID from the first event of a rollout
48
- * file. `codex resume <UUID>` accepts this id; the file's filename embeds it.
49
- */
50
- function extractCodexUuid(rolloutContent) {
51
- const firstLine = rolloutContent.split('\n').find(l => l.trim().length > 0);
52
- if (!firstLine)
53
- return null;
54
- try {
55
- const event = JSON.parse(firstLine);
56
- return event.payload?.id ?? null;
57
- }
58
- catch {
59
- return null;
60
- }
61
- }
62
- function placeClaudeJsonl(uuid, content, recipientCwd) {
63
- const encoded = encodeClaudeCodeCwd(recipientCwd);
64
- const projectDir = join(homedir(), '.claude', 'projects', encoded);
65
- mkdirSync(projectDir, { recursive: true });
66
- const placedAt = join(projectDir, `${uuid}.jsonl`);
67
- writeFileSync(placedAt, content);
68
- return { placedAt, runFromCwd: recipientCwd };
69
- }
70
- function placeCodexRollout(uuid, content) {
71
- const now = new Date();
72
- const yyyy = String(now.getUTCFullYear());
73
- const mm = String(now.getUTCMonth() + 1).padStart(2, '0');
74
- const dd = String(now.getUTCDate()).padStart(2, '0');
75
- const dir = join(homedir(), '.codex', 'sessions', yyyy, mm, dd);
76
- mkdirSync(dir, { recursive: true });
77
- // Filename pattern Codex itself uses: rollout-YYYY-MM-DDThh-mm-ss-<uuid>.jsonl
78
- const ts = now.toISOString().replace(/\.\d+Z$/, '').replace(/:/g, '-');
79
- const placedAt = join(dir, `rollout-${ts}-${uuid}.jsonl`);
80
- writeFileSync(placedAt, content);
81
- return { placedAt };
82
- }
83
- /**
84
- * Pick the target agent based on flag overrides, the share's sourceAgent,
85
- * and what's installed locally.
86
- */
87
- function pickTargetAgent(opts, sourceAgent) {
88
- if (opts.agent) {
89
- return getAgent(opts.agent) ?? null;
90
- }
91
- // Prefer the same agent the sender used, if installed
92
- const source = getAgent(sourceAgent);
93
- if (source && isAgentInstalled(source)) {
94
- return source;
95
- }
96
- // Fall back to the sender's agent registry entry even if not detectably installed
97
- // (the user may have it; better to print accurate instructions than abort)
98
- return source ?? null;
99
- }
100
- function isAgentInstalled(agent) {
101
- // Lightweight check: just look for the launch binary on PATH.
102
- // More comprehensive detection lives in agents/detection.ts but requires
103
- // async resolution; this synchronous check is good enough for resume.
104
- if (agent.launch?.cli) {
105
- return !!whichBinary(agent.launch.cli);
106
- }
107
- return false;
108
- }
109
- export const resumeCommand = new Command('resume')
110
- .description('Resume a shared conversation locally in your agent of choice')
111
- .argument('<share-id>', 'The share ID (sc_*) returned by share-convo or save-convo')
112
- .option('--agent <slug>', 'Override target agent (e.g. claude-code, codex)')
113
- .option('--into <path>', 'Override target cwd (defaults to current $PWD)')
114
- .option('--dry-run', 'Print the resume command instead of executing it')
115
- .option('--pick', 'Show interactive picker (requires TTY) - not yet implemented')
116
- .option('--workspace <id>', 'Workspace ID')
117
- .action(async (shareId, opts, command) => {
118
- const useJson = shouldOutputJson(command.optsWithGlobals().json);
119
- const credentials = requireAuth();
120
- const client = new ApiClient(credentials);
121
- const { workspaceId } = await resolveWorkspace(client, { workspace: opts.workspace });
122
- let share;
123
- try {
124
- const { share: raw } = await client.getSharedConversation(workspaceId, shareId);
125
- share = raw;
126
- }
127
- catch (err) {
128
- console.error(`Failed to fetch share ${shareId}: ${err instanceof Error ? err.message : err}`);
129
- process.exit(1);
130
- }
131
- // If --agent not provided, detect what the user is currently in - that's
132
- // often the best default ("share to me, resume in same agent")
133
- if (!opts.agent) {
134
- const detected = detectCurrentAgent();
135
- if (detected) {
136
- opts.agent = detected.slug;
137
- }
138
- }
139
- const target = pickTargetAgent(opts, share.sourceAgent);
140
- if (!target) {
141
- console.error(`No target agent could be determined. Pass --agent <slug> or install the source agent (${share.sourceAgent}).`);
142
- process.exit(1);
143
- }
144
- const cap = target.resumeCapability;
145
- // Tier 3 fallback: no native resume - print a paste-prompt
146
- if (!cap || cap.mode === 'unsupported' || !cap.nativeBundleFormat) {
147
- const promptText = buildPastePrompt(shareId, share.title);
148
- if (useJson) {
149
- jsonOut({ mode: 'paste-prompt', shareId, prompt: promptText });
150
- return;
151
- }
152
- console.log(`\n${target.name} does not support native resume. Paste this prompt into your agent:\n`);
153
- console.log('---');
154
- console.log(promptText);
155
- console.log('---\n');
156
- return;
157
- }
158
- // Need a matching native bundle on the share
159
- const hasNative = (share.bundles ?? []).some(b => b.format === cap.nativeBundleFormat);
160
- if (!hasNative) {
161
- console.error(`This share has no ${cap.nativeBundleFormat} bundle (sourceAgent was ${share.sourceAgent}). ` +
162
- `Falling back to paste-prompt.`);
163
- const promptText = buildPastePrompt(shareId, share.title);
164
- console.log('\n---');
165
- console.log(promptText);
166
- console.log('---\n');
167
- return;
168
- }
169
- // Download the native bundle content
170
- const bundle = await client.downloadSharedConversationBundle(workspaceId, shareId, cap.nativeBundleFormat);
171
- // Extract the ORIGINAL session UUID from the bundle content - that's
172
- // what the native resume command expects, not our share ID.
173
- let nativeUuid;
174
- if (cap.nativeBundleFormat === 'claude-jsonl') {
175
- nativeUuid = extractClaudeCodeUuid(bundle.content);
176
- }
177
- else if (cap.nativeBundleFormat === 'codex-rollout') {
178
- nativeUuid = extractCodexUuid(bundle.content);
179
- }
180
- else {
181
- console.error(`No UUID extraction strategy for native bundle format ${cap.nativeBundleFormat}`);
182
- process.exit(1);
183
- }
184
- if (!nativeUuid) {
185
- console.error(`Could not extract native session UUID from ${cap.nativeBundleFormat} bundle. ` +
186
- `The bundle may be malformed.`);
187
- process.exit(1);
188
- }
189
- // Place the file per-agent using the original UUID
190
- let placement;
191
- const recipientCwd = opts.into ?? process.cwd();
192
- if (cap.nativeBundleFormat === 'claude-jsonl') {
193
- placement = placeClaudeJsonl(nativeUuid, bundle.content, recipientCwd);
194
- }
195
- else if (cap.nativeBundleFormat === 'codex-rollout') {
196
- placement = placeCodexRollout(nativeUuid, bundle.content);
197
- }
198
- else {
199
- console.error(`No placement strategy for native bundle format ${cap.nativeBundleFormat}`);
200
- process.exit(1);
201
- }
202
- // Tell the server we resumed it (best-effort)
203
- client.markSharedConversationResumed(workspaceId, shareId).catch(() => {
204
- // Non-fatal; the user is already up and resuming
205
- });
206
- if (cap.mode === 'file-drop-only') {
207
- const result = {
208
- mode: 'file-drop-only',
209
- agent: target.slug,
210
- placedAt: placement.placedAt,
211
- hint: cap.manualOpenHint ?? `Open ${target.name} to find this session in your history.`,
212
- };
213
- if (useJson) {
214
- jsonOut(result);
215
- return;
216
- }
217
- console.log(`\nBundle placed at: ${placement.placedAt}`);
218
- console.log(`${result.hint}\n`);
219
- return;
220
- }
221
- if (cap.mode === 'cli-resume') {
222
- // Substitute {uuid} in the resume command template with the original
223
- // session UUID we extracted from the bundle content.
224
- const cmd = (cap.cliResumeCommand ?? '').replace(/\{uuid\}/g, nativeUuid);
225
- // If we're running inside the SAME agent we'd resume into (very common
226
- // when an LLM in claude-code invokes `runwork resume` to pick up a
227
- // saved claude-code conversation), exec'ing `claude --resume <uuid>`
228
- // from inside that session is broken: the child claude process can't
229
- // attach to the parent's TTY and the resume hits agent-specific edge
230
- // cases ("No deferred tool marker found in the resumed session..."
231
- // for Claude Code). Detect this and degrade to print-the-command mode
232
- // so the user can copy/paste into a fresh terminal -- AND tell the
233
- // caller agent that the in-session continuation path is via the
234
- // `get_shared_conversation` MCP tool, which inlines the transcript.
235
- const detected = detectCurrentAgent();
236
- const insideSameAgent = detected && detected.slug === target.slug;
237
- const shouldPrintOnly = opts.dryRun || insideSameAgent;
238
- if (shouldPrintOnly) {
239
- const fullCmd = placement.runFromCwd
240
- ? `cd "${placement.runFromCwd}" && ${cmd}`
241
- : cmd;
242
- const result = {
243
- mode: 'cli-resume',
244
- agent: target.slug,
245
- placedAt: placement.placedAt,
246
- command: fullCmd,
247
- insideSameAgent: !!insideSameAgent,
248
- };
249
- if (useJson) {
250
- jsonOut(result);
251
- return;
252
- }
253
- console.log(`\nBundle placed at: ${placement.placedAt}`);
254
- if (insideSameAgent) {
255
- console.log(`\nYou are already inside ${target.name}, so I can't auto-launch a new session in this terminal.`);
256
- console.log(`To resume natively, exit this session and run in a fresh terminal:`);
257
- console.log(` ${fullCmd}`);
258
- console.log(`\nOr ask the assistant to continue the conversation in THIS session by ` +
259
- `fetching the transcript via the Runwork MCP \`get_shared_conversation\` tool ` +
260
- `(share ID: ${shareId}).`);
261
- }
262
- else {
263
- console.log(`Run: ${fullCmd}\n`);
264
- }
265
- return;
266
- }
267
- // Exec the resume command (fresh-shell case)
268
- const parts = cmd.split(' ');
269
- const child = spawn(parts[0], parts.slice(1), {
270
- cwd: placement.runFromCwd ?? recipientCwd,
271
- stdio: 'inherit',
272
- });
273
- child.on('exit', (code) => {
274
- process.exit(code ?? 0);
275
- });
276
- return;
277
- }
278
- console.error(`Unexpected resumeCapability.mode: ${cap.mode}`);
279
- process.exit(1);
280
- });
281
- function buildPastePrompt(shareId, title) {
282
- return `Continue the conversation that a teammate shared with me. The share ID is ${shareId} (title: "${title}").
283
-
284
- PREFERRED: if the \`runwork\` CLI is installed locally, run:
285
- runwork resume ${shareId}
286
- That auto-detects your active agent and resumes natively if possible.
287
-
288
- FALLBACK: use the Runwork MCP tool \`get_shared_conversation\` with this share ID to fetch the full transcript, then continue from where the conversation left off.`;
289
- }
@@ -1,8 +0,0 @@
1
- import { Command } from 'commander';
2
- /**
3
- * `runwork save-convo` - personal checkpoint of the current AI conversation.
4
- *
5
- * Thin alias over `share-convo` with isPersonal=true. The recipient is always
6
- * the sender; no notifications are sent. Same capture mechanics otherwise.
7
- */
8
- export declare const saveConvoCommand: Command;
@@ -1,20 +0,0 @@
1
- import { Command } from 'commander';
2
- import { runShareConvo } from './share-convo.js';
3
- /**
4
- * `runwork save-convo` - personal checkpoint of the current AI conversation.
5
- *
6
- * Thin alias over `share-convo` with isPersonal=true. The recipient is always
7
- * the sender; no notifications are sent. Same capture mechanics otherwise.
8
- */
9
- export const saveConvoCommand = new Command('save-convo')
10
- .description('Save the current AI conversation as a personal checkpoint')
11
- .option('--transcript-file <path>', 'Path to the LLM-emitted markdown transcript (required)')
12
- .option('--native-file <path>', 'Path to the native session file (optional; auto-detected from env vars)')
13
- .option('--source-agent <slug>', 'Override host-agent detection')
14
- .option('--title <string>', 'Short title for the conversation (required)')
15
- .option('--note <string>', 'Optional note to your future self')
16
- .option('--ttl-days <n>', 'Days until expiration (1-30, default 7)')
17
- .option('--metadata-json <json>', 'Inline JSON object with workMode, openQuestions, etc.')
18
- .option('--metadata-file <path>', 'Path to a JSON file with metadata fields')
19
- .option('--workspace <id>', 'Workspace ID')
20
- .action((opts, command) => runShareConvo({ ...opts, personal: true }, command, true));
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare const schedulesCommand: Command;