nomoreide 0.2.0 → 0.3.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 (624) hide show
  1. package/README.md +12 -9
  2. package/bin/nomoreide.js +82 -0
  3. package/package.json +24 -132
  4. package/dist/cli/agents.d.ts +0 -2
  5. package/dist/cli/agents.js +0 -43
  6. package/dist/cli/agents.js.map +0 -1
  7. package/dist/cli/commands.d.ts +0 -11
  8. package/dist/cli/commands.js +0 -235
  9. package/dist/cli/commands.js.map +0 -1
  10. package/dist/cli/daemon.d.ts +0 -15
  11. package/dist/cli/daemon.js +0 -139
  12. package/dist/cli/daemon.js.map +0 -1
  13. package/dist/cli/database.d.ts +0 -2
  14. package/dist/cli/database.js +0 -145
  15. package/dist/cli/database.js.map +0 -1
  16. package/dist/cli/errors.d.ts +0 -2
  17. package/dist/cli/errors.js +0 -3
  18. package/dist/cli/errors.js.map +0 -1
  19. package/dist/cli/flags.d.ts +0 -1
  20. package/dist/cli/flags.js +0 -19
  21. package/dist/cli/flags.js.map +0 -1
  22. package/dist/cli/git.d.ts +0 -2
  23. package/dist/cli/git.js +0 -113
  24. package/dist/cli/git.js.map +0 -1
  25. package/dist/cli/profile.d.ts +0 -2
  26. package/dist/cli/profile.js +0 -171
  27. package/dist/cli/profile.js.map +0 -1
  28. package/dist/core/agent-context.d.ts +0 -9
  29. package/dist/core/agent-context.js +0 -43
  30. package/dist/core/agent-context.js.map +0 -1
  31. package/dist/core/agent-env/antigravity-reader.d.ts +0 -7
  32. package/dist/core/agent-env/antigravity-reader.js +0 -86
  33. package/dist/core/agent-env/antigravity-reader.js.map +0 -1
  34. package/dist/core/agent-env/availability.d.ts +0 -6
  35. package/dist/core/agent-env/availability.js +0 -79
  36. package/dist/core/agent-env/availability.js.map +0 -1
  37. package/dist/core/agent-env/claude-reader.d.ts +0 -7
  38. package/dist/core/agent-env/claude-reader.js +0 -101
  39. package/dist/core/agent-env/claude-reader.js.map +0 -1
  40. package/dist/core/agent-env/codex-reader.d.ts +0 -11
  41. package/dist/core/agent-env/codex-reader.js +0 -164
  42. package/dist/core/agent-env/codex-reader.js.map +0 -1
  43. package/dist/core/agent-env/index.d.ts +0 -9
  44. package/dist/core/agent-env/index.js +0 -29
  45. package/dist/core/agent-env/index.js.map +0 -1
  46. package/dist/core/agent-env/managed-plugins.d.ts +0 -18
  47. package/dist/core/agent-env/managed-plugins.js +0 -68
  48. package/dist/core/agent-env/managed-plugins.js.map +0 -1
  49. package/dist/core/agent-env/plugin-reader.d.ts +0 -9
  50. package/dist/core/agent-env/plugin-reader.js +0 -174
  51. package/dist/core/agent-env/plugin-reader.js.map +0 -1
  52. package/dist/core/agent-env/shared.d.ts +0 -26
  53. package/dist/core/agent-env/shared.js +0 -116
  54. package/dist/core/agent-env/shared.js.map +0 -1
  55. package/dist/core/agent-env/types.d.ts +0 -66
  56. package/dist/core/agent-env/types.js +0 -7
  57. package/dist/core/agent-env/types.js.map +0 -1
  58. package/dist/core/agent-env-actions.d.ts +0 -117
  59. package/dist/core/agent-env-actions.js +0 -273
  60. package/dist/core/agent-env-actions.js.map +0 -1
  61. package/dist/core/agent-env-plugin-uninstall.d.ts +0 -11
  62. package/dist/core/agent-env-plugin-uninstall.js +0 -189
  63. package/dist/core/agent-env-plugin-uninstall.js.map +0 -1
  64. package/dist/core/agent-env-writers.d.ts +0 -71
  65. package/dist/core/agent-env-writers.js +0 -632
  66. package/dist/core/agent-env-writers.js.map +0 -1
  67. package/dist/core/agent-profiles/apply.d.ts +0 -57
  68. package/dist/core/agent-profiles/apply.js +0 -209
  69. package/dist/core/agent-profiles/apply.js.map +0 -1
  70. package/dist/core/agent-profiles/builtin.d.ts +0 -8
  71. package/dist/core/agent-profiles/builtin.js +0 -33
  72. package/dist/core/agent-profiles/builtin.js.map +0 -1
  73. package/dist/core/agent-profiles/credentials.d.ts +0 -26
  74. package/dist/core/agent-profiles/credentials.js +0 -151
  75. package/dist/core/agent-profiles/credentials.js.map +0 -1
  76. package/dist/core/agent-profiles/debug-setup.d.ts +0 -18
  77. package/dist/core/agent-profiles/debug-setup.js +0 -237
  78. package/dist/core/agent-profiles/debug-setup.js.map +0 -1
  79. package/dist/core/agent-profiles/index.d.ts +0 -18
  80. package/dist/core/agent-profiles/index.js +0 -19
  81. package/dist/core/agent-profiles/index.js.map +0 -1
  82. package/dist/core/agent-profiles/plugin-apply.d.ts +0 -16
  83. package/dist/core/agent-profiles/plugin-apply.js +0 -383
  84. package/dist/core/agent-profiles/plugin-apply.js.map +0 -1
  85. package/dist/core/agent-profiles/plugin-bundle.d.ts +0 -6
  86. package/dist/core/agent-profiles/plugin-bundle.js +0 -32
  87. package/dist/core/agent-profiles/plugin-bundle.js.map +0 -1
  88. package/dist/core/agent-profiles/publication.d.ts +0 -105
  89. package/dist/core/agent-profiles/publication.js +0 -126
  90. package/dist/core/agent-profiles/publication.js.map +0 -1
  91. package/dist/core/agent-profiles/registry-auth.d.ts +0 -25
  92. package/dist/core/agent-profiles/registry-auth.js +0 -78
  93. package/dist/core/agent-profiles/registry-auth.js.map +0 -1
  94. package/dist/core/agent-profiles/registry-client.d.ts +0 -98
  95. package/dist/core/agent-profiles/registry-client.js +0 -109
  96. package/dist/core/agent-profiles/registry-client.js.map +0 -1
  97. package/dist/core/agent-profiles/registry-config.d.ts +0 -62
  98. package/dist/core/agent-profiles/registry-config.js +0 -221
  99. package/dist/core/agent-profiles/registry-config.js.map +0 -1
  100. package/dist/core/agent-profiles/registry-transfer.d.ts +0 -42
  101. package/dist/core/agent-profiles/registry-transfer.js +0 -133
  102. package/dist/core/agent-profiles/registry-transfer.js.map +0 -1
  103. package/dist/core/agent-profiles/store.d.ts +0 -62
  104. package/dist/core/agent-profiles/store.js +0 -479
  105. package/dist/core/agent-profiles/store.js.map +0 -1
  106. package/dist/core/agent-profiles/transfer.d.ts +0 -27
  107. package/dist/core/agent-profiles/transfer.js +0 -359
  108. package/dist/core/agent-profiles/transfer.js.map +0 -1
  109. package/dist/core/agent-profiles/types.d.ts +0 -364
  110. package/dist/core/agent-profiles/types.js +0 -79
  111. package/dist/core/agent-profiles/types.js.map +0 -1
  112. package/dist/core/agent-runtime.d.ts +0 -114
  113. package/dist/core/agent-runtime.js +0 -494
  114. package/dist/core/agent-runtime.js.map +0 -1
  115. package/dist/core/agent-sessions.d.ts +0 -46
  116. package/dist/core/agent-sessions.js +0 -109
  117. package/dist/core/agent-sessions.js.map +0 -1
  118. package/dist/core/agent-settings.d.ts +0 -31
  119. package/dist/core/agent-settings.js +0 -129
  120. package/dist/core/agent-settings.js.map +0 -1
  121. package/dist/core/agent-terminal.d.ts +0 -22
  122. package/dist/core/agent-terminal.js +0 -62
  123. package/dist/core/agent-terminal.js.map +0 -1
  124. package/dist/core/agent-transcripts.d.ts +0 -29
  125. package/dist/core/agent-transcripts.js +0 -281
  126. package/dist/core/agent-transcripts.js.map +0 -1
  127. package/dist/core/app-settings.d.ts +0 -74
  128. package/dist/core/app-settings.js +0 -118
  129. package/dist/core/app-settings.js.map +0 -1
  130. package/dist/core/app-version.d.ts +0 -2
  131. package/dist/core/app-version.js +0 -16
  132. package/dist/core/app-version.js.map +0 -1
  133. package/dist/core/approval-broker.d.ts +0 -29
  134. package/dist/core/approval-broker.js +0 -48
  135. package/dist/core/approval-broker.js.map +0 -1
  136. package/dist/core/claude-settings.d.ts +0 -18
  137. package/dist/core/claude-settings.js +0 -48
  138. package/dist/core/claude-settings.js.map +0 -1
  139. package/dist/core/cloudflare-actions.d.ts +0 -90
  140. package/dist/core/cloudflare-actions.js +0 -178
  141. package/dist/core/cloudflare-actions.js.map +0 -1
  142. package/dist/core/cloudflare-auth.d.ts +0 -61
  143. package/dist/core/cloudflare-auth.js +0 -149
  144. package/dist/core/cloudflare-auth.js.map +0 -1
  145. package/dist/core/cloudflare-context.d.ts +0 -2
  146. package/dist/core/cloudflare-context.js +0 -106
  147. package/dist/core/cloudflare-context.js.map +0 -1
  148. package/dist/core/cloudflare-manager.d.ts +0 -258
  149. package/dist/core/cloudflare-manager.js +0 -414
  150. package/dist/core/cloudflare-manager.js.map +0 -1
  151. package/dist/core/cloudflare-provider.d.ts +0 -64
  152. package/dist/core/cloudflare-provider.js +0 -348
  153. package/dist/core/cloudflare-provider.js.map +0 -1
  154. package/dist/core/config-files.d.ts +0 -27
  155. package/dist/core/config-files.js +0 -154
  156. package/dist/core/config-files.js.map +0 -1
  157. package/dist/core/config-store.d.ts +0 -181
  158. package/dist/core/config-store.js +0 -1026
  159. package/dist/core/config-store.js.map +0 -1
  160. package/dist/core/context-library.d.ts +0 -53
  161. package/dist/core/context-library.js +0 -605
  162. package/dist/core/context-library.js.map +0 -1
  163. package/dist/core/context-types.d.ts +0 -83
  164. package/dist/core/context-types.js +0 -9
  165. package/dist/core/context-types.js.map +0 -1
  166. package/dist/core/daemon-client.d.ts +0 -84
  167. package/dist/core/daemon-client.js +0 -156
  168. package/dist/core/daemon-client.js.map +0 -1
  169. package/dist/core/daemon-lifecycle.d.ts +0 -59
  170. package/dist/core/daemon-lifecycle.js +0 -147
  171. package/dist/core/daemon-lifecycle.js.map +0 -1
  172. package/dist/core/db/catalog.d.ts +0 -57
  173. package/dist/core/db/catalog.js +0 -38
  174. package/dist/core/db/catalog.js.map +0 -1
  175. package/dist/core/db/data-masking.d.ts +0 -3
  176. package/dist/core/db/data-masking.js +0 -14
  177. package/dist/core/db/data-masking.js.map +0 -1
  178. package/dist/core/db/driver.d.ts +0 -151
  179. package/dist/core/db/driver.js +0 -209
  180. package/dist/core/db/driver.js.map +0 -1
  181. package/dist/core/db/export.d.ts +0 -17
  182. package/dist/core/db/export.js +0 -67
  183. package/dist/core/db/export.js.map +0 -1
  184. package/dist/core/db/mysql-driver.d.ts +0 -33
  185. package/dist/core/db/mysql-driver.js +0 -364
  186. package/dist/core/db/mysql-driver.js.map +0 -1
  187. package/dist/core/db/postgres-driver.d.ts +0 -34
  188. package/dist/core/db/postgres-driver.js +0 -430
  189. package/dist/core/db/postgres-driver.js.map +0 -1
  190. package/dist/core/db/sqlite-driver.d.ts +0 -30
  191. package/dist/core/db/sqlite-driver.js +0 -301
  192. package/dist/core/db/sqlite-driver.js.map +0 -1
  193. package/dist/core/db-peek.d.ts +0 -99
  194. package/dist/core/db-peek.js +0 -322
  195. package/dist/core/db-peek.js.map +0 -1
  196. package/dist/core/db-write.d.ts +0 -45
  197. package/dist/core/db-write.js +0 -190
  198. package/dist/core/db-write.js.map +0 -1
  199. package/dist/core/docker-inspect.d.ts +0 -34
  200. package/dist/core/docker-inspect.js +0 -108
  201. package/dist/core/docker-inspect.js.map +0 -1
  202. package/dist/core/docker-resources.d.ts +0 -28
  203. package/dist/core/docker-resources.js +0 -59
  204. package/dist/core/docker-resources.js.map +0 -1
  205. package/dist/core/docker-service-runner.d.ts +0 -21
  206. package/dist/core/docker-service-runner.js +0 -80
  207. package/dist/core/docker-service-runner.js.map +0 -1
  208. package/dist/core/docker-stats.d.ts +0 -24
  209. package/dist/core/docker-stats.js +0 -76
  210. package/dist/core/docker-stats.js.map +0 -1
  211. package/dist/core/docker.d.ts +0 -75
  212. package/dist/core/docker.js +0 -219
  213. package/dist/core/docker.js.map +0 -1
  214. package/dist/core/env-file.d.ts +0 -24
  215. package/dist/core/env-file.js +0 -123
  216. package/dist/core/env-file.js.map +0 -1
  217. package/dist/core/env-runtime.d.ts +0 -32
  218. package/dist/core/env-runtime.js +0 -42
  219. package/dist/core/env-runtime.js.map +0 -1
  220. package/dist/core/error-inbox.d.ts +0 -91
  221. package/dist/core/error-inbox.js +0 -292
  222. package/dist/core/error-inbox.js.map +0 -1
  223. package/dist/core/extensions.d.ts +0 -78
  224. package/dist/core/extensions.js +0 -41
  225. package/dist/core/extensions.js.map +0 -1
  226. package/dist/core/external-terminal.d.ts +0 -60
  227. package/dist/core/external-terminal.js +0 -429
  228. package/dist/core/external-terminal.js.map +0 -1
  229. package/dist/core/fix-loop.d.ts +0 -55
  230. package/dist/core/fix-loop.js +0 -73
  231. package/dist/core/fix-loop.js.map +0 -1
  232. package/dist/core/git-actions.d.ts +0 -69
  233. package/dist/core/git-actions.js +0 -161
  234. package/dist/core/git-actions.js.map +0 -1
  235. package/dist/core/git-graph-layout.d.ts +0 -34
  236. package/dist/core/git-graph-layout.js +0 -94
  237. package/dist/core/git-graph-layout.js.map +0 -1
  238. package/dist/core/git-identity.d.ts +0 -78
  239. package/dist/core/git-identity.js +0 -178
  240. package/dist/core/git-identity.js.map +0 -1
  241. package/dist/core/git-manager.d.ts +0 -129
  242. package/dist/core/git-manager.js +0 -509
  243. package/dist/core/git-manager.js.map +0 -1
  244. package/dist/core/git-worktrees.d.ts +0 -35
  245. package/dist/core/git-worktrees.js +0 -142
  246. package/dist/core/git-worktrees.js.map +0 -1
  247. package/dist/core/github-auth.d.ts +0 -28
  248. package/dist/core/github-auth.js +0 -134
  249. package/dist/core/github-auth.js.map +0 -1
  250. package/dist/core/github-context.d.ts +0 -12
  251. package/dist/core/github-context.js +0 -36
  252. package/dist/core/github-context.js.map +0 -1
  253. package/dist/core/github-manager.d.ts +0 -230
  254. package/dist/core/github-manager.js +0 -324
  255. package/dist/core/github-manager.js.map +0 -1
  256. package/dist/core/host-metrics.d.ts +0 -41
  257. package/dist/core/host-metrics.js +0 -93
  258. package/dist/core/host-metrics.js.map +0 -1
  259. package/dist/core/http-inspector.d.ts +0 -20
  260. package/dist/core/http-inspector.js +0 -106
  261. package/dist/core/http-inspector.js.map +0 -1
  262. package/dist/core/jetbrains-import.d.ts +0 -85
  263. package/dist/core/jetbrains-import.js +0 -599
  264. package/dist/core/jetbrains-import.js.map +0 -1
  265. package/dist/core/log-sources.d.ts +0 -21
  266. package/dist/core/log-sources.js +0 -219
  267. package/dist/core/log-sources.js.map +0 -1
  268. package/dist/core/log-store.d.ts +0 -33
  269. package/dist/core/log-store.js +0 -94
  270. package/dist/core/log-store.js.map +0 -1
  271. package/dist/core/log-volume.d.ts +0 -41
  272. package/dist/core/log-volume.js +0 -81
  273. package/dist/core/log-volume.js.map +0 -1
  274. package/dist/core/mcp-auth.d.ts +0 -27
  275. package/dist/core/mcp-auth.js +0 -90
  276. package/dist/core/mcp-auth.js.map +0 -1
  277. package/dist/core/metrics-store.d.ts +0 -74
  278. package/dist/core/metrics-store.js +0 -187
  279. package/dist/core/metrics-store.js.map +0 -1
  280. package/dist/core/one-time-skills.d.ts +0 -27
  281. package/dist/core/one-time-skills.js +0 -185
  282. package/dist/core/one-time-skills.js.map +0 -1
  283. package/dist/core/port-utils.d.ts +0 -23
  284. package/dist/core/port-utils.js +0 -83
  285. package/dist/core/port-utils.js.map +0 -1
  286. package/dist/core/process-manager.d.ts +0 -99
  287. package/dist/core/process-manager.js +0 -738
  288. package/dist/core/process-manager.js.map +0 -1
  289. package/dist/core/process-tree.d.ts +0 -17
  290. package/dist/core/process-tree.js +0 -64
  291. package/dist/core/process-tree.js.map +0 -1
  292. package/dist/core/project-overview.d.ts +0 -52
  293. package/dist/core/project-overview.js +0 -122
  294. package/dist/core/project-overview.js.map +0 -1
  295. package/dist/core/providers/api-base.d.ts +0 -24
  296. package/dist/core/providers/api-base.js +0 -44
  297. package/dist/core/providers/api-base.js.map +0 -1
  298. package/dist/core/providers/credentials.d.ts +0 -93
  299. package/dist/core/providers/credentials.js +0 -88
  300. package/dist/core/providers/credentials.js.map +0 -1
  301. package/dist/core/providers/deploy-provider.d.ts +0 -327
  302. package/dist/core/providers/deploy-provider.js +0 -25
  303. package/dist/core/providers/deploy-provider.js.map +0 -1
  304. package/dist/core/providers/egress.d.ts +0 -58
  305. package/dist/core/providers/egress.js +0 -124
  306. package/dist/core/providers/egress.js.map +0 -1
  307. package/dist/core/providers/host-bridge.d.ts +0 -20
  308. package/dist/core/providers/host-bridge.js +0 -57
  309. package/dist/core/providers/host-bridge.js.map +0 -1
  310. package/dist/core/providers/host-provider.d.ts +0 -160
  311. package/dist/core/providers/host-provider.js +0 -2
  312. package/dist/core/providers/host-provider.js.map +0 -1
  313. package/dist/core/providers/oauth.d.ts +0 -97
  314. package/dist/core/providers/oauth.js +0 -238
  315. package/dist/core/providers/oauth.js.map +0 -1
  316. package/dist/core/providers/project-resolution.d.ts +0 -81
  317. package/dist/core/providers/project-resolution.js +0 -101
  318. package/dist/core/providers/project-resolution.js.map +0 -1
  319. package/dist/core/providers/registry.d.ts +0 -73
  320. package/dist/core/providers/registry.js +0 -53
  321. package/dist/core/providers/registry.js.map +0 -1
  322. package/dist/core/providers/strings.d.ts +0 -95
  323. package/dist/core/providers/strings.js +0 -59
  324. package/dist/core/providers/strings.js.map +0 -1
  325. package/dist/core/public-config.d.ts +0 -18
  326. package/dist/core/public-config.js +0 -76
  327. package/dist/core/public-config.js.map +0 -1
  328. package/dist/core/read-only-files.d.ts +0 -28
  329. package/dist/core/read-only-files.js +0 -93
  330. package/dist/core/read-only-files.js.map +0 -1
  331. package/dist/core/repo-create.d.ts +0 -11
  332. package/dist/core/repo-create.js +0 -54
  333. package/dist/core/repo-create.js.map +0 -1
  334. package/dist/core/repo-match.d.ts +0 -12
  335. package/dist/core/repo-match.js +0 -40
  336. package/dist/core/repo-match.js.map +0 -1
  337. package/dist/core/repo-onboard.d.ts +0 -297
  338. package/dist/core/repo-onboard.js +0 -667
  339. package/dist/core/repo-onboard.js.map +0 -1
  340. package/dist/core/repro-bundle.d.ts +0 -30
  341. package/dist/core/repro-bundle.js +0 -116
  342. package/dist/core/repro-bundle.js.map +0 -1
  343. package/dist/core/service-graph.d.ts +0 -50
  344. package/dist/core/service-graph.js +0 -143
  345. package/dist/core/service-graph.js.map +0 -1
  346. package/dist/core/service-health.d.ts +0 -10
  347. package/dist/core/service-health.js +0 -46
  348. package/dist/core/service-health.js.map +0 -1
  349. package/dist/core/service-log-source.d.ts +0 -9
  350. package/dist/core/service-log-source.js +0 -49
  351. package/dist/core/service-log-source.js.map +0 -1
  352. package/dist/core/service-registry.d.ts +0 -52
  353. package/dist/core/service-registry.js +0 -101
  354. package/dist/core/service-registry.js.map +0 -1
  355. package/dist/core/snapshot-manager.d.ts +0 -62
  356. package/dist/core/snapshot-manager.js +0 -219
  357. package/dist/core/snapshot-manager.js.map +0 -1
  358. package/dist/core/ssh-servers.d.ts +0 -89
  359. package/dist/core/ssh-servers.js +0 -251
  360. package/dist/core/ssh-servers.js.map +0 -1
  361. package/dist/core/ssh-service-runner.d.ts +0 -7
  362. package/dist/core/ssh-service-runner.js +0 -36
  363. package/dist/core/ssh-service-runner.js.map +0 -1
  364. package/dist/core/ssh-setup.d.ts +0 -11
  365. package/dist/core/ssh-setup.js +0 -49
  366. package/dist/core/ssh-setup.js.map +0 -1
  367. package/dist/core/system-processes.d.ts +0 -29
  368. package/dist/core/system-processes.js +0 -119
  369. package/dist/core/system-processes.js.map +0 -1
  370. package/dist/core/terminal-manager.d.ts +0 -123
  371. package/dist/core/terminal-manager.js +0 -470
  372. package/dist/core/terminal-manager.js.map +0 -1
  373. package/dist/core/terminal-session.d.ts +0 -122
  374. package/dist/core/terminal-session.js +0 -242
  375. package/dist/core/terminal-session.js.map +0 -1
  376. package/dist/core/terminal-spawn.d.ts +0 -26
  377. package/dist/core/terminal-spawn.js +0 -63
  378. package/dist/core/terminal-spawn.js.map +0 -1
  379. package/dist/core/test-runner.d.ts +0 -69
  380. package/dist/core/test-runner.js +0 -199
  381. package/dist/core/test-runner.js.map +0 -1
  382. package/dist/core/timeline-store.d.ts +0 -20
  383. package/dist/core/timeline-store.js +0 -36
  384. package/dist/core/timeline-store.js.map +0 -1
  385. package/dist/core/tool-call-store.d.ts +0 -25
  386. package/dist/core/tool-call-store.js +0 -62
  387. package/dist/core/tool-call-store.js.map +0 -1
  388. package/dist/core/types.d.ts +0 -312
  389. package/dist/core/types.js +0 -2
  390. package/dist/core/types.js.map +0 -1
  391. package/dist/core/usage-history.d.ts +0 -81
  392. package/dist/core/usage-history.js +0 -149
  393. package/dist/core/usage-history.js.map +0 -1
  394. package/dist/core/vercel-actions.d.ts +0 -71
  395. package/dist/core/vercel-actions.js +0 -109
  396. package/dist/core/vercel-actions.js.map +0 -1
  397. package/dist/core/vercel-auth.d.ts +0 -40
  398. package/dist/core/vercel-auth.js +0 -88
  399. package/dist/core/vercel-auth.js.map +0 -1
  400. package/dist/core/vercel-context.d.ts +0 -2
  401. package/dist/core/vercel-context.js +0 -97
  402. package/dist/core/vercel-context.js.map +0 -1
  403. package/dist/core/vercel-manager.d.ts +0 -268
  404. package/dist/core/vercel-manager.js +0 -401
  405. package/dist/core/vercel-manager.js.map +0 -1
  406. package/dist/core/vercel-oauth.d.ts +0 -37
  407. package/dist/core/vercel-oauth.js +0 -57
  408. package/dist/core/vercel-oauth.js.map +0 -1
  409. package/dist/core/vercel-provider.d.ts +0 -23
  410. package/dist/core/vercel-provider.js +0 -276
  411. package/dist/core/vercel-provider.js.map +0 -1
  412. package/dist/core/vultr-actions.d.ts +0 -52
  413. package/dist/core/vultr-actions.js +0 -62
  414. package/dist/core/vultr-actions.js.map +0 -1
  415. package/dist/core/vultr-auth.d.ts +0 -32
  416. package/dist/core/vultr-auth.js +0 -54
  417. package/dist/core/vultr-auth.js.map +0 -1
  418. package/dist/core/vultr-context.d.ts +0 -2
  419. package/dist/core/vultr-context.js +0 -55
  420. package/dist/core/vultr-context.js.map +0 -1
  421. package/dist/core/vultr-manager.d.ts +0 -113
  422. package/dist/core/vultr-manager.js +0 -170
  423. package/dist/core/vultr-manager.js.map +0 -1
  424. package/dist/core/vultr-provider.d.ts +0 -69
  425. package/dist/core/vultr-provider.js +0 -226
  426. package/dist/core/vultr-provider.js.map +0 -1
  427. package/dist/core/workflow-triggers.d.ts +0 -139
  428. package/dist/core/workflow-triggers.js +0 -208
  429. package/dist/core/workflow-triggers.js.map +0 -1
  430. package/dist/core/workflows.d.ts +0 -290
  431. package/dist/core/workflows.js +0 -190
  432. package/dist/core/workflows.js.map +0 -1
  433. package/dist/index.d.ts +0 -2
  434. package/dist/index.js +0 -66
  435. package/dist/index.js.map +0 -1
  436. package/dist/mcp/server.d.ts +0 -37
  437. package/dist/mcp/server.js +0 -84
  438. package/dist/mcp/server.js.map +0 -1
  439. package/dist/mcp/tools/agent-env.d.ts +0 -9
  440. package/dist/mcp/tools/agent-env.js +0 -160
  441. package/dist/mcp/tools/agent-env.js.map +0 -1
  442. package/dist/mcp/tools/agent-profiles.d.ts +0 -9
  443. package/dist/mcp/tools/agent-profiles.js +0 -197
  444. package/dist/mcp/tools/agent-profiles.js.map +0 -1
  445. package/dist/mcp/tools/agent-registry.d.ts +0 -9
  446. package/dist/mcp/tools/agent-registry.js +0 -81
  447. package/dist/mcp/tools/agent-registry.js.map +0 -1
  448. package/dist/mcp/tools/agent.d.ts +0 -4
  449. package/dist/mcp/tools/agent.js +0 -29
  450. package/dist/mcp/tools/agent.js.map +0 -1
  451. package/dist/mcp/tools/context.d.ts +0 -36
  452. package/dist/mcp/tools/context.js +0 -69
  453. package/dist/mcp/tools/context.js.map +0 -1
  454. package/dist/mcp/tools/database.d.ts +0 -9
  455. package/dist/mcp/tools/database.js +0 -166
  456. package/dist/mcp/tools/database.js.map +0 -1
  457. package/dist/mcp/tools/docs.d.ts +0 -29
  458. package/dist/mcp/tools/docs.js +0 -134
  459. package/dist/mcp/tools/docs.js.map +0 -1
  460. package/dist/mcp/tools/errors.d.ts +0 -12
  461. package/dist/mcp/tools/errors.js +0 -47
  462. package/dist/mcp/tools/errors.js.map +0 -1
  463. package/dist/mcp/tools/git.d.ts +0 -4
  464. package/dist/mcp/tools/git.js +0 -209
  465. package/dist/mcp/tools/git.js.map +0 -1
  466. package/dist/mcp/tools/github.d.ts +0 -4
  467. package/dist/mcp/tools/github.js +0 -196
  468. package/dist/mcp/tools/github.js.map +0 -1
  469. package/dist/mcp/tools/index.d.ts +0 -36
  470. package/dist/mcp/tools/index.js +0 -61
  471. package/dist/mcp/tools/index.js.map +0 -1
  472. package/dist/mcp/tools/onboard.d.ts +0 -10
  473. package/dist/mcp/tools/onboard.js +0 -30
  474. package/dist/mcp/tools/onboard.js.map +0 -1
  475. package/dist/mcp/tools/provider.d.ts +0 -16
  476. package/dist/mcp/tools/provider.js +0 -110
  477. package/dist/mcp/tools/provider.js.map +0 -1
  478. package/dist/mcp/tools/services.d.ts +0 -13
  479. package/dist/mcp/tools/services.js +0 -204
  480. package/dist/mcp/tools/services.js.map +0 -1
  481. package/dist/mcp/tools/snapshots.d.ts +0 -8
  482. package/dist/mcp/tools/snapshots.js +0 -37
  483. package/dist/mcp/tools/snapshots.js.map +0 -1
  484. package/dist/mcp/tools/terminal.d.ts +0 -4
  485. package/dist/mcp/tools/terminal.js +0 -38
  486. package/dist/mcp/tools/terminal.js.map +0 -1
  487. package/dist/tui/app.d.ts +0 -22
  488. package/dist/tui/app.js +0 -138
  489. package/dist/tui/app.js.map +0 -1
  490. package/dist/web/agent-info.d.ts +0 -82
  491. package/dist/web/agent-info.js +0 -775
  492. package/dist/web/agent-info.js.map +0 -1
  493. package/dist/web/client/assets/SymbolsNerdFontMono-Regular-DDncdh2F.ttf +0 -0
  494. package/dist/web/client/assets/code-editor-TE0sjFGO.js +0 -30
  495. package/dist/web/client/assets/context-graph-B9MnBpp6.js +0 -7
  496. package/dist/web/client/assets/core-DhEqZVGG.js +0 -1
  497. package/dist/web/client/assets/event-BK_86lmQ.js +0 -1
  498. package/dist/web/client/assets/index-BhDAhmA1.js +0 -1
  499. package/dist/web/client/assets/index-CSo__8A6.css +0 -1
  500. package/dist/web/client/assets/index-DAJvBqn9.js +0 -352
  501. package/dist/web/client/assets/nomoreide-favicon-Ds7Tgj9p.svg +0 -24
  502. package/dist/web/client/assets/system-process-table-DetWu0Gj.js +0 -1
  503. package/dist/web/client/assets/window-DlR023_X.js +0 -1
  504. package/dist/web/client/index.html +0 -44
  505. package/dist/web/dashboard.d.ts +0 -61
  506. package/dist/web/dashboard.js +0 -221
  507. package/dist/web/dashboard.js.map +0 -1
  508. package/dist/web/directories.d.ts +0 -27
  509. package/dist/web/directories.js +0 -81
  510. package/dist/web/directories.js.map +0 -1
  511. package/dist/web/http-utils.d.ts +0 -13
  512. package/dist/web/http-utils.js +0 -72
  513. package/dist/web/http-utils.js.map +0 -1
  514. package/dist/web/routes/agent-chat-routes.d.ts +0 -3
  515. package/dist/web/routes/agent-chat-routes.js +0 -186
  516. package/dist/web/routes/agent-chat-routes.js.map +0 -1
  517. package/dist/web/routes/agent-env-routes.d.ts +0 -9
  518. package/dist/web/routes/agent-env-routes.js +0 -86
  519. package/dist/web/routes/agent-env-routes.js.map +0 -1
  520. package/dist/web/routes/agent-profile-routes.d.ts +0 -8
  521. package/dist/web/routes/agent-profile-routes.js +0 -211
  522. package/dist/web/routes/agent-profile-routes.js.map +0 -1
  523. package/dist/web/routes/agent-registry-routes.d.ts +0 -2
  524. package/dist/web/routes/agent-registry-routes.js +0 -375
  525. package/dist/web/routes/agent-registry-routes.js.map +0 -1
  526. package/dist/web/routes/agent-routes.d.ts +0 -3
  527. package/dist/web/routes/agent-routes.js +0 -73
  528. package/dist/web/routes/agent-routes.js.map +0 -1
  529. package/dist/web/routes/agent-settings-routes.d.ts +0 -8
  530. package/dist/web/routes/agent-settings-routes.js +0 -67
  531. package/dist/web/routes/agent-settings-routes.js.map +0 -1
  532. package/dist/web/routes/context-library-routes.d.ts +0 -2
  533. package/dist/web/routes/context-library-routes.js +0 -139
  534. package/dist/web/routes/context-library-routes.js.map +0 -1
  535. package/dist/web/routes/context.d.ts +0 -73
  536. package/dist/web/routes/context.js +0 -48
  537. package/dist/web/routes/context.js.map +0 -1
  538. package/dist/web/routes/dashboard-routes.d.ts +0 -3
  539. package/dist/web/routes/dashboard-routes.js +0 -47
  540. package/dist/web/routes/dashboard-routes.js.map +0 -1
  541. package/dist/web/routes/database-routes.d.ts +0 -3
  542. package/dist/web/routes/database-routes.js +0 -341
  543. package/dist/web/routes/database-routes.js.map +0 -1
  544. package/dist/web/routes/docker-routes.d.ts +0 -7
  545. package/dist/web/routes/docker-routes.js +0 -122
  546. package/dist/web/routes/docker-routes.js.map +0 -1
  547. package/dist/web/routes/errors-routes.d.ts +0 -3
  548. package/dist/web/routes/errors-routes.js +0 -77
  549. package/dist/web/routes/errors-routes.js.map +0 -1
  550. package/dist/web/routes/extensions-routes.d.ts +0 -14
  551. package/dist/web/routes/extensions-routes.js +0 -21
  552. package/dist/web/routes/extensions-routes.js.map +0 -1
  553. package/dist/web/routes/git-routes.d.ts +0 -3
  554. package/dist/web/routes/git-routes.js +0 -598
  555. package/dist/web/routes/git-routes.js.map +0 -1
  556. package/dist/web/routes/github-context.d.ts +0 -11
  557. package/dist/web/routes/github-context.js +0 -34
  558. package/dist/web/routes/github-context.js.map +0 -1
  559. package/dist/web/routes/github-routes.d.ts +0 -2
  560. package/dist/web/routes/github-routes.js +0 -699
  561. package/dist/web/routes/github-routes.js.map +0 -1
  562. package/dist/web/routes/host-routes.d.ts +0 -2
  563. package/dist/web/routes/host-routes.js +0 -188
  564. package/dist/web/routes/host-routes.js.map +0 -1
  565. package/dist/web/routes/index.d.ts +0 -10
  566. package/dist/web/routes/index.js +0 -72
  567. package/dist/web/routes/index.js.map +0 -1
  568. package/dist/web/routes/jetbrains-import-routes.d.ts +0 -2
  569. package/dist/web/routes/jetbrains-import-routes.js +0 -121
  570. package/dist/web/routes/jetbrains-import-routes.js.map +0 -1
  571. package/dist/web/routes/log-sources-routes.d.ts +0 -6
  572. package/dist/web/routes/log-sources-routes.js +0 -102
  573. package/dist/web/routes/log-sources-routes.js.map +0 -1
  574. package/dist/web/routes/metrics-routes.d.ts +0 -3
  575. package/dist/web/routes/metrics-routes.js +0 -60
  576. package/dist/web/routes/metrics-routes.js.map +0 -1
  577. package/dist/web/routes/onboard-routes.d.ts +0 -9
  578. package/dist/web/routes/onboard-routes.js +0 -146
  579. package/dist/web/routes/onboard-routes.js.map +0 -1
  580. package/dist/web/routes/overview-routes.d.ts +0 -2
  581. package/dist/web/routes/overview-routes.js +0 -36
  582. package/dist/web/routes/overview-routes.js.map +0 -1
  583. package/dist/web/routes/provider-routes.d.ts +0 -2
  584. package/dist/web/routes/provider-routes.js +0 -558
  585. package/dist/web/routes/provider-routes.js.map +0 -1
  586. package/dist/web/routes/service-routes.d.ts +0 -3
  587. package/dist/web/routes/service-routes.js +0 -511
  588. package/dist/web/routes/service-routes.js.map +0 -1
  589. package/dist/web/routes/settings-routes.d.ts +0 -2
  590. package/dist/web/routes/settings-routes.js +0 -151
  591. package/dist/web/routes/settings-routes.js.map +0 -1
  592. package/dist/web/routes/shell-routes.d.ts +0 -22
  593. package/dist/web/routes/shell-routes.js +0 -75
  594. package/dist/web/routes/shell-routes.js.map +0 -1
  595. package/dist/web/routes/skills-routes.d.ts +0 -2
  596. package/dist/web/routes/skills-routes.js +0 -49
  597. package/dist/web/routes/skills-routes.js.map +0 -1
  598. package/dist/web/routes/snapshot-routes.d.ts +0 -8
  599. package/dist/web/routes/snapshot-routes.js +0 -194
  600. package/dist/web/routes/snapshot-routes.js.map +0 -1
  601. package/dist/web/routes/ssh-server-routes.d.ts +0 -10
  602. package/dist/web/routes/ssh-server-routes.js +0 -163
  603. package/dist/web/routes/ssh-server-routes.js.map +0 -1
  604. package/dist/web/routes/terminal-routes.d.ts +0 -7
  605. package/dist/web/routes/terminal-routes.js +0 -313
  606. package/dist/web/routes/terminal-routes.js.map +0 -1
  607. package/dist/web/routes/workflow-routes.d.ts +0 -8
  608. package/dist/web/routes/workflow-routes.js +0 -45
  609. package/dist/web/routes/workflow-routes.js.map +0 -1
  610. package/dist/web/routes/workflow-trigger-routes.d.ts +0 -9
  611. package/dist/web/routes/workflow-trigger-routes.js +0 -78
  612. package/dist/web/routes/workflow-trigger-routes.js.map +0 -1
  613. package/dist/web/server.d.ts +0 -31
  614. package/dist/web/server.js +0 -325
  615. package/dist/web/server.js.map +0 -1
  616. package/dist/web/service-tester.d.ts +0 -16
  617. package/dist/web/service-tester.js +0 -107
  618. package/dist/web/service-tester.js.map +0 -1
  619. package/dist/web/static-assets.d.ts +0 -9
  620. package/dist/web/static-assets.js +0 -77
  621. package/dist/web/static-assets.js.map +0 -1
  622. package/dist/web/usage-info.d.ts +0 -56
  623. package/dist/web/usage-info.js +0 -265
  624. package/dist/web/usage-info.js.map +0 -1
@@ -1,161 +0,0 @@
1
- import { execFile } from "node:child_process";
2
- import { promisify } from "node:util";
3
- const execFileAsync = promisify(execFile);
4
- /**
5
- * A credential helper that echoes the two values git asks for and nothing else.
6
- * The empty `credential.helper=` that precedes it resets the inherited helper
7
- * chain, so the machine's keychain cannot answer first and quietly push as the
8
- * account the user did not select.
9
- */
10
- // The `$NAME` reads are expanded by the helper's own shell, not by JavaScript —
11
- // interpolating them here would put the token in `argv`, which is what this avoids.
12
- const CREDENTIAL_HELPER = '!f() { echo "username=$NOMOREIDE_GIT_USERNAME"; echo "password=$NOMOREIDE_GIT_PASSWORD"; }; f';
13
- /**
14
- * Write-capable Git operations, kept deliberately separate from the read-safe
15
- * {@link GitManager}. These reach outward (push) or move refs, so they live in
16
- * their own module and callers are expected to confirm before invoking them.
17
- *
18
- * Still intentionally excludes the irreversible footguns (`reset --hard`,
19
- * `clean -f`, `push --force`, `branch -D`) — those would need their own
20
- * explicit, separately-guarded surface.
21
- */
22
- export class GitActions {
23
- cwd;
24
- constructor(cwd = process.cwd()) {
25
- this.cwd = cwd;
26
- }
27
- /**
28
- * Push the current branch to its remote. When the branch has no upstream yet
29
- * (a freshly created local branch), this sets one with `-u origin <branch>`
30
- * so subsequent pushes and ahead/behind tracking work.
31
- */
32
- async push(options = {}) {
33
- const remote = options.remote ?? "origin";
34
- const branch = (await this.git(["branch", "--show-current"])).trim();
35
- if (!branch) {
36
- throw new Error("cannot push in a detached HEAD state");
37
- }
38
- const upstream = (await this.git([
39
- "rev-parse",
40
- "--abbrev-ref",
41
- "--symbolic-full-name",
42
- "@{upstream}",
43
- ]).catch(() => "")).trim();
44
- const setUpstream = !upstream;
45
- const args = setUpstream
46
- ? ["push", "--set-upstream", remote, branch]
47
- : ["push"];
48
- const credential = options.credential;
49
- const output = await this.git(credential ? [...credentialConfigArgs(), ...args] : args, credential
50
- ? {
51
- NOMOREIDE_GIT_USERNAME: credential.username ?? "x-access-token",
52
- NOMOREIDE_GIT_PASSWORD: credential.token,
53
- }
54
- : undefined);
55
- return { output, branch, setUpstream };
56
- }
57
- /** Fast-forward the current branch from its configured upstream. */
58
- async pull() {
59
- return this.git(["pull", "--ff-only"]);
60
- }
61
- /**
62
- * Merge a branch into the current branch without opening an editor. The
63
- * header command surface must not leave a repository half-merged, so a
64
- * conflict is automatically aborted and returned as an error.
65
- */
66
- async merge(branch) {
67
- const target = await this.validBranchRef(branch);
68
- await this.assertCleanWorkingTree("merge");
69
- try {
70
- return await this.git(["merge", "--no-edit", target]);
71
- }
72
- catch (error) {
73
- await this.git(["merge", "--abort"]).catch(() => undefined);
74
- throw new Error(`Merge failed and was aborted.\n${errorMessage(error)}`);
75
- }
76
- }
77
- /** Rebase the current branch onto another branch, aborting on conflicts. */
78
- async rebase(branch) {
79
- const target = await this.validBranchRef(branch);
80
- await this.assertCleanWorkingTree("rebase");
81
- try {
82
- return await this.git(["rebase", target]);
83
- }
84
- catch (error) {
85
- await this.git(["rebase", "--abort"]).catch(() => undefined);
86
- throw new Error(`Rebase failed and was aborted.\n${errorMessage(error)}`);
87
- }
88
- }
89
- async checkoutDefaultAndPull(options = {}) {
90
- const remote = options.remote ?? "origin";
91
- const branch = await this.defaultBranch(remote);
92
- const switchOutput = await this.git(["switch", branch]);
93
- const pullOutput = await this.git(["pull", "--ff-only"]);
94
- return {
95
- branch,
96
- output: [`Switched to ${branch}.`, switchOutput, pullOutput].filter(Boolean).join("\n").trim(),
97
- };
98
- }
99
- async defaultBranch(remote) {
100
- const remoteHead = (await this.git(["symbolic-ref", "--short", `refs/remotes/${remote}/HEAD`]).catch(() => "")).trim();
101
- const fromRemoteHead = remoteHead.startsWith(`${remote}/`) ? remoteHead.slice(remote.length + 1) : remoteHead;
102
- if (fromRemoteHead)
103
- return fromRemoteHead;
104
- const branches = await this.git(["branch", "--format=%(refname:short)"]);
105
- const names = branches.split("\n").map((line) => line.trim()).filter(Boolean);
106
- if (names.includes("main"))
107
- return "main";
108
- if (names.includes("master"))
109
- return "master";
110
- throw new Error(`Could not determine default branch for ${remote}.`);
111
- }
112
- async validBranchRef(branch) {
113
- const target = branch.trim();
114
- if (!target)
115
- throw new Error("branch is required");
116
- await this.git(["check-ref-format", "--branch", target]);
117
- return target;
118
- }
119
- async assertCleanWorkingTree(operation) {
120
- const status = await this.git(["status", "--porcelain=v1", "--untracked-files=all"]);
121
- if (status.trim()) {
122
- throw new Error(`Commit or stash local changes before ${operation}.`);
123
- }
124
- }
125
- async git(args, env) {
126
- const secret = env?.NOMOREIDE_GIT_PASSWORD;
127
- try {
128
- const { stdout, stderr } = await execFileAsync("git", args, {
129
- cwd: this.cwd,
130
- env: env ? { ...process.env, ...env } : undefined,
131
- maxBuffer: 16 * 1024 * 1024,
132
- });
133
- return redact(stdout || stderr, secret);
134
- }
135
- catch (error) {
136
- if (error instanceof Error) {
137
- const withStreams = error;
138
- throw new Error(redact((withStreams.stderr || withStreams.stdout || error.message).trim(), secret));
139
- }
140
- throw error;
141
- }
142
- }
143
- }
144
- /** Exported so tests can drive `git credential fill` through the real helper. */
145
- export function credentialConfigArgs() {
146
- return ["-c", "credential.helper=", "-c", `credential.helper=${CREDENTIAL_HELPER}`];
147
- }
148
- /**
149
- * Push output and git's error text are surfaced verbatim in the UI and written
150
- * to the timeline, so scrub the token on the way out even though the helper
151
- * keeps it off the command line.
152
- */
153
- export function redact(text, secret) {
154
- if (!secret)
155
- return text;
156
- return text.split(secret).join("***");
157
- }
158
- function errorMessage(error) {
159
- return error instanceof Error ? error.message : String(error);
160
- }
161
- //# sourceMappingURL=git-actions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-actions.js","sourceRoot":"","sources":["../../src/core/git-actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,aAAa,GAAG,SAAS,CAAC,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1,34 +0,0 @@
1
- export interface GitGraphCommitInput {
2
- hash: string;
3
- parents: string[];
4
- }
5
- export type GitGraphEdgeKind = "straight" | "branch" | "merge";
6
- export interface GitGraphEdge {
7
- fromLane: number;
8
- toLane: number;
9
- parentHash: string;
10
- kind: GitGraphEdgeKind;
11
- }
12
- export interface GitGraphLayoutRow {
13
- hash: string;
14
- lane: number;
15
- laneCount: number;
16
- edges: GitGraphEdge[];
17
- /** Lanes (other than this commit's lane) that continue past this row — they need a vertical pass-through line. */
18
- throughLanes: number[];
19
- }
20
- /**
21
- * Assigns lanes and edges to a topologically ordered list of commits
22
- * (newest first, as `git log` emits). Pure function — no git access.
23
- *
24
- * Algorithm: maintain an array of "active lanes". Each slot holds the hash
25
- * of the commit expected to appear next in that lane (i.e. a child waiting
26
- * for its parent). For each commit we:
27
- * 1. Pick the leftmost lane reserving this commit's hash (else allocate one).
28
- * 2. Replace that slot with the commit's first parent (or null if root).
29
- * 3. For additional parents, try to reuse an existing slot already
30
- * reserving that parent; otherwise allocate a new lane.
31
- * 4. Emit edges from this row down to each parent's lane.
32
- * 5. Compact trailing nulls so lane count doesn't grow unbounded.
33
- */
34
- export declare function assignLanes(commits: GitGraphCommitInput[]): GitGraphLayoutRow[];
@@ -1,94 +0,0 @@
1
- /**
2
- * Assigns lanes and edges to a topologically ordered list of commits
3
- * (newest first, as `git log` emits). Pure function — no git access.
4
- *
5
- * Algorithm: maintain an array of "active lanes". Each slot holds the hash
6
- * of the commit expected to appear next in that lane (i.e. a child waiting
7
- * for its parent). For each commit we:
8
- * 1. Pick the leftmost lane reserving this commit's hash (else allocate one).
9
- * 2. Replace that slot with the commit's first parent (or null if root).
10
- * 3. For additional parents, try to reuse an existing slot already
11
- * reserving that parent; otherwise allocate a new lane.
12
- * 4. Emit edges from this row down to each parent's lane.
13
- * 5. Compact trailing nulls so lane count doesn't grow unbounded.
14
- */
15
- export function assignLanes(commits) {
16
- const rows = [];
17
- const active = [];
18
- for (const commit of commits) {
19
- let lane = active.indexOf(commit.hash);
20
- if (lane === -1) {
21
- lane = firstFreeLane(active);
22
- if (lane === active.length) {
23
- active.push(null);
24
- }
25
- }
26
- // Clear every reservation for this commit hash (a commit can have
27
- // multiple children waiting on it — they all converge here).
28
- for (let i = 0; i < active.length; i++) {
29
- if (active[i] === commit.hash) {
30
- active[i] = null;
31
- }
32
- }
33
- const edges = [];
34
- const [firstParent, ...rest] = commit.parents;
35
- if (firstParent) {
36
- const existing = active.indexOf(firstParent);
37
- let parentLane;
38
- if (existing !== -1) {
39
- parentLane = existing;
40
- }
41
- else {
42
- parentLane = lane;
43
- active[parentLane] = firstParent;
44
- }
45
- edges.push({
46
- fromLane: lane,
47
- toLane: parentLane,
48
- parentHash: firstParent,
49
- kind: parentLane === lane ? "straight" : "merge",
50
- });
51
- }
52
- for (const parent of rest) {
53
- let parentLane = active.indexOf(parent);
54
- if (parentLane === -1) {
55
- parentLane = firstFreeLane(active);
56
- if (parentLane === active.length) {
57
- active.push(null);
58
- }
59
- active[parentLane] = parent;
60
- }
61
- edges.push({
62
- fromLane: lane,
63
- toLane: parentLane,
64
- parentHash: parent,
65
- kind: parentLane === lane ? "straight" : "merge",
66
- });
67
- }
68
- const throughLanes = [];
69
- for (let i = 0; i < active.length; i++) {
70
- if (i !== lane && active[i] !== null) {
71
- throughLanes.push(i);
72
- }
73
- }
74
- rows.push({
75
- hash: commit.hash,
76
- lane,
77
- laneCount: Math.max(lane + 1, active.length),
78
- edges,
79
- throughLanes,
80
- });
81
- compactTrailingNulls(active);
82
- }
83
- return rows;
84
- }
85
- function firstFreeLane(active) {
86
- const idx = active.indexOf(null);
87
- return idx === -1 ? active.length : idx;
88
- }
89
- function compactTrailingNulls(active) {
90
- while (active.length > 0 && active[active.length - 1] === null) {
91
- active.pop();
92
- }
93
- }
94
- //# sourceMappingURL=git-graph-layout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-graph-layout.js","sourceRoot":"","sources":["../../src/core/git-graph-layout.ts"],"names":[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CAAC,EAAE,MAAM,CAAC,MAAM,CAAC;YAC5C,KAAK;YACL,YAAY;SACb,CAAC,CAAC;QAEH,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,aAAa,CAAC,MAAyB;IAC9C,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;AAC1C,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAyB;IACrD,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC/D,MAAM,CAAC,GAAG,EAAE,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -1,78 +0,0 @@
1
- import { type ConfigStore } from "./config-store.js";
2
- import type { GitHubIdentity, GitRepositoryDefinition, NoMoreIdeConfig } from "./types.js";
3
- /** Author/committer NoMoreIDE stamps on the commits it creates. */
4
- export type GitIdentity = GitHubIdentity;
5
- /** What `git config user.*` resolves to in a working tree. */
6
- export interface MachineIdentity {
7
- name?: string;
8
- email?: string;
9
- }
10
- export interface GitIdentityState {
11
- /**
12
- * Identity NoMoreIDE will commit as, or null when it defers to whatever the
13
- * machine is configured with.
14
- */
15
- selected: GitIdentity | null;
16
- machine: MachineIdentity;
17
- /** True when a commit made here would carry an author the machine doesn't use. */
18
- diverged: boolean;
19
- /** Why `selected` is null — the UI explains the fallback rather than hiding it. */
20
- reason?: string;
21
- }
22
- /**
23
- * Commit identity derived from the GitHub account selected for a repository.
24
- *
25
- * The account switcher has always governed the GitHub *API* (pull requests,
26
- * issues, CI) while `git commit` quietly used the machine's `user.email`. That
27
- * split let a commit be authored by one account and its pull request opened by
28
- * another, with nothing in the UI saying so. This module closes the gap for
29
- * commits and reports the mismatch when it can't.
30
- *
31
- * Deliberately scoped to the repository: the alternative — `gh auth switch` —
32
- * changes identity for every terminal and every other repo on the machine, and
33
- * NoMoreIDE does not reach outside what it owns.
34
- */
35
- export declare function resolveGitIdentityState(configStore: ConfigStore, repository: GitRepositoryDefinition | undefined, cwd: string): Promise<GitIdentityState>;
36
- /**
37
- * Same as {@link resolveGitIdentityState}, for callers that only know a working
38
- * directory — the MCP tools and the CLI, which take a `cwd` rather than a
39
- * repository name. An unregistered or ambiguous directory resolves to "no
40
- * selection", which keeps today's machine-identity behaviour.
41
- */
42
- export declare function resolveGitIdentityForCwd(configStore: ConfigStore, cwd: string): Promise<GitIdentityState>;
43
- /** The registered repository owning `cwd`, or undefined when there isn't a clear one. */
44
- export declare function repositoryForCwd(configStore: ConfigStore, cwd: string): Promise<GitRepositoryDefinition | undefined>;
45
- /**
46
- * Identity for the repository's selected account, from the config cache when
47
- * possible and the GitHub API otherwise. Cached because every commit would
48
- * otherwise spend an API call resolving an answer that changes ~never.
49
- */
50
- export declare function resolveSelectedIdentity(configStore: ConfigStore, config: NoMoreIdeConfig, repository: GitRepositoryDefinition): Promise<GitIdentity>;
51
- /**
52
- * Environment that pins a commit's author and committer. Passed per command
53
- * rather than written to `git config`, so nothing about the machine's setup
54
- * changes and concurrent commits in other repos are unaffected.
55
- */
56
- /**
57
- * Token to push the repository's selected account with, or null to leave the
58
- * machine's credential helper in charge.
59
- *
60
- * Returns null for SSH remotes on purpose: authentication there comes from a
61
- * key, and no token NoMoreIDE holds can change which key `ssh` offers. Callers
62
- * that care about the mismatch surface it through {@link resolveGitIdentityState}
63
- * instead of pretending the push was re-attributed.
64
- */
65
- export declare function resolvePushCredential(configStore: ConfigStore, repository: GitRepositoryDefinition | undefined, remoteUrl: string | null): Promise<{
66
- token: string;
67
- login?: string;
68
- } | null>;
69
- /** Host of an HTTPS git remote, or null when the remote is SSH or unparseable. */
70
- export declare function httpsRemoteHost(remoteUrl: string | null): string | null;
71
- export declare function identityEnv(identity: GitIdentity): Record<string, string>;
72
- export declare function readMachineIdentity(cwd: string): Promise<MachineIdentity>;
73
- /**
74
- * The address a commit should carry. GitHub's own address is preferred over a
75
- * guess, and the id-qualified `noreply` form is used when the account keeps its
76
- * email private — that form still attributes the commit to the account.
77
- */
78
- export declare function commitEmail(publicEmail: string | null | undefined, id: number | undefined, login: string): string;
@@ -1,178 +0,0 @@
1
- import { execFile } from "node:child_process";
2
- import { promisify } from "node:util";
3
- import { gitToplevel } from "./config-store.js";
4
- import { resolveGitHubCredential } from "./github-auth.js";
5
- import { GitHubManager } from "./github-manager.js";
6
- import { matchRegisteredRepository } from "./repo-match.js";
7
- const execFileAsync = promisify(execFile);
8
- const GIT_CONFIG_TIMEOUT_MS = 5_000;
9
- /**
10
- * Commit identity derived from the GitHub account selected for a repository.
11
- *
12
- * The account switcher has always governed the GitHub *API* (pull requests,
13
- * issues, CI) while `git commit` quietly used the machine's `user.email`. That
14
- * split let a commit be authored by one account and its pull request opened by
15
- * another, with nothing in the UI saying so. This module closes the gap for
16
- * commits and reports the mismatch when it can't.
17
- *
18
- * Deliberately scoped to the repository: the alternative — `gh auth switch` —
19
- * changes identity for every terminal and every other repo on the machine, and
20
- * NoMoreIDE does not reach outside what it owns.
21
- */
22
- export async function resolveGitIdentityState(configStore, repository, cwd) {
23
- const machine = await readMachineIdentity(cwd);
24
- const config = await configStore.load();
25
- if (!repository?.githubCredential) {
26
- return {
27
- selected: null,
28
- machine,
29
- diverged: false,
30
- reason: "No GitHub account is selected for this repository.",
31
- };
32
- }
33
- try {
34
- const selected = await resolveSelectedIdentity(configStore, config, repository);
35
- return { selected, machine, diverged: isDiverged(selected, machine) };
36
- }
37
- catch (error) {
38
- return {
39
- selected: null,
40
- machine,
41
- diverged: false,
42
- reason: error instanceof Error ? error.message : String(error),
43
- };
44
- }
45
- }
46
- /**
47
- * Same as {@link resolveGitIdentityState}, for callers that only know a working
48
- * directory — the MCP tools and the CLI, which take a `cwd` rather than a
49
- * repository name. An unregistered or ambiguous directory resolves to "no
50
- * selection", which keeps today's machine-identity behaviour.
51
- */
52
- export async function resolveGitIdentityForCwd(configStore, cwd) {
53
- return resolveGitIdentityState(configStore, await repositoryForCwd(configStore, cwd), cwd);
54
- }
55
- /** The registered repository owning `cwd`, or undefined when there isn't a clear one. */
56
- export async function repositoryForCwd(configStore, cwd) {
57
- const config = await configStore.load();
58
- const topLevel = await gitToplevel(cwd);
59
- if (!topLevel)
60
- return undefined;
61
- return matchRegisteredRepository(config, topLevel).catch(() => undefined);
62
- }
63
- /**
64
- * Identity for the repository's selected account, from the config cache when
65
- * possible and the GitHub API otherwise. Cached because every commit would
66
- * otherwise spend an API call resolving an answer that changes ~never.
67
- */
68
- export async function resolveSelectedIdentity(configStore, config, repository) {
69
- const selection = repository.githubCredential;
70
- if (!selection)
71
- throw new Error("No GitHub account is selected for this repository.");
72
- const host = selection.host;
73
- const knownLogin = selection.source === "gh"
74
- ? selection.login
75
- : config.githubTokens.find((entry) => entry.host === host)?.login;
76
- const cached = knownLogin ? configStore.getGithubIdentity(config, host, knownLogin) : undefined;
77
- if (cached)
78
- return cached;
79
- const credential = await resolveGitHubCredential(config, repository, host);
80
- const viewer = await new GitHubManager(credential.token, "", "").viewer();
81
- const login = viewer.login || knownLogin;
82
- if (!login)
83
- throw new Error("GitHub did not report an account login for the selected credential.");
84
- const identity = {
85
- host,
86
- login,
87
- name: viewer.name?.trim() || login,
88
- email: commitEmail(viewer.email, viewer.id, login),
89
- };
90
- await configStore.setGithubIdentity(identity);
91
- return identity;
92
- }
93
- /**
94
- * Environment that pins a commit's author and committer. Passed per command
95
- * rather than written to `git config`, so nothing about the machine's setup
96
- * changes and concurrent commits in other repos are unaffected.
97
- */
98
- /**
99
- * Token to push the repository's selected account with, or null to leave the
100
- * machine's credential helper in charge.
101
- *
102
- * Returns null for SSH remotes on purpose: authentication there comes from a
103
- * key, and no token NoMoreIDE holds can change which key `ssh` offers. Callers
104
- * that care about the mismatch surface it through {@link resolveGitIdentityState}
105
- * instead of pretending the push was re-attributed.
106
- */
107
- export async function resolvePushCredential(configStore, repository, remoteUrl) {
108
- if (!repository?.githubCredential)
109
- return null;
110
- const host = httpsRemoteHost(remoteUrl);
111
- if (!host || host !== repository.githubCredential.host)
112
- return null;
113
- const config = await configStore.load();
114
- const credential = await resolveGitHubCredential(config, repository, host);
115
- return { token: credential.token, login: credential.login };
116
- }
117
- /** Host of an HTTPS git remote, or null when the remote is SSH or unparseable. */
118
- export function httpsRemoteHost(remoteUrl) {
119
- if (!remoteUrl)
120
- return null;
121
- try {
122
- const parsed = new URL(remoteUrl.trim());
123
- if (parsed.protocol !== "https:" && parsed.protocol !== "http:")
124
- return null;
125
- return parsed.hostname || null;
126
- }
127
- catch {
128
- return null;
129
- }
130
- }
131
- export function identityEnv(identity) {
132
- return {
133
- GIT_AUTHOR_NAME: identity.name,
134
- GIT_AUTHOR_EMAIL: identity.email,
135
- GIT_COMMITTER_NAME: identity.name,
136
- GIT_COMMITTER_EMAIL: identity.email,
137
- };
138
- }
139
- export async function readMachineIdentity(cwd) {
140
- const [name, email] = await Promise.all([
141
- gitConfigValue(cwd, "user.name"),
142
- gitConfigValue(cwd, "user.email"),
143
- ]);
144
- return { name, email };
145
- }
146
- /**
147
- * The address a commit should carry. GitHub's own address is preferred over a
148
- * guess, and the id-qualified `noreply` form is used when the account keeps its
149
- * email private — that form still attributes the commit to the account.
150
- */
151
- export function commitEmail(publicEmail, id, login) {
152
- const explicit = publicEmail?.trim();
153
- if (explicit)
154
- return explicit;
155
- return id ? `${id}+${login}@users.noreply.github.com` : `${login}@users.noreply.github.com`;
156
- }
157
- function isDiverged(selected, machine) {
158
- const configured = machine.email?.trim().toLowerCase();
159
- if (!configured)
160
- return true;
161
- return configured !== selected.email.trim().toLowerCase();
162
- }
163
- async function gitConfigValue(cwd, key) {
164
- try {
165
- const { stdout } = await execFileAsync("git", ["config", "--get", key], {
166
- cwd,
167
- encoding: "utf8",
168
- timeout: GIT_CONFIG_TIMEOUT_MS,
169
- });
170
- return stdout.trim() || undefined;
171
- }
172
- catch {
173
- // `git config --get` exits non-zero when the key is unset — an unconfigured
174
- // machine identity is a normal state here, not a failure.
175
- return undefined;
176
- }
177
- }
178
- //# sourceMappingURL=git-identity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-identity.js","sourceRoot":"","sources":["../../src/core/git-identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,WAAW,EAAoB,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAO5D,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC1C,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAwBpC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,WAAwB,EACxB,UAA+C,EAC/C,GAAW;IAEX,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAC/C,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC;IAExC,IAAI,CAAC,UAAU,EAAE,gBAAgB,EAAE,CAAC;QAClC,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO;YACP,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,oDAAoD;SAC7D,CAAC;IACJ,CAAC;IAED,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;QAChF,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,E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