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,341 +0,0 @@
1
- import { mergeStoredPassword, redactDatabaseError } from "../../core/db-peek.js";
2
- import { writeDatabaseExport, } from "../../core/db/export.js";
3
- import { optionalFormValue, readForm, requiredFormValue, sendJson, } from "../http-utils.js";
4
- import { patternRoute, route } from "./context.js";
5
- const ENGINES = ["postgres", "mysql", "sqlite"];
6
- function parseRowBrowseQuery(url) {
7
- const rawFilters = url.searchParams.get("filters");
8
- let filters;
9
- if (rawFilters) {
10
- const parsed = JSON.parse(rawFilters);
11
- if (!Array.isArray(parsed))
12
- throw new Error("filters must be a JSON array");
13
- filters = parsed;
14
- }
15
- const sortColumn = url.searchParams.get("sortColumn");
16
- const sortDirection = url.searchParams.get("sortDirection");
17
- if (sortDirection && sortDirection !== "asc" && sortDirection !== "desc") {
18
- throw new Error("sortDirection must be asc or desc");
19
- }
20
- return {
21
- filters,
22
- sort: sortColumn
23
- ? { column: sortColumn, direction: sortDirection === "desc" ? "desc" : "asc" }
24
- : undefined,
25
- };
26
- }
27
- function parseEngine(value) {
28
- if (!ENGINES.includes(value)) {
29
- throw new Error(`Unsupported engine "${value}". Use one of: ${ENGINES.join(", ")}.`);
30
- }
31
- return value;
32
- }
33
- /** DB Peek: read-only browser for registered Postgres / MySQL / SQLite connections. */
34
- export const databaseRoutes = [
35
- route("GET", "/api/databases", async ({ response, dbPeek }) => {
36
- sendJson(response, { ok: true, connections: await dbPeek.listConnections() });
37
- }),
38
- route("GET", "/api/databases/detect", async ({ response, dbPeek }) => {
39
- sendJson(response, { ok: true, detected: await dbPeek.detectFromEnv() });
40
- }),
41
- route("POST", "/api/databases", async ({ request, response, configStore }) => {
42
- const form = await readForm(request);
43
- const name = requiredFormValue(form, "name");
44
- const engine = parseEngine(requiredFormValue(form, "engine"));
45
- let url = requiredFormValue(form, "url");
46
- // Editing an existing connection: keep the stored password if this save
47
- // didn't include one (the client only ever has the masked URL).
48
- const existing = (await configStore.load()).databases.find((db) => db.name === name);
49
- if (existing) {
50
- url = mergeStoredPassword(engine, url, existing.url);
51
- }
52
- const config = await configStore.registerDatabase({
53
- name,
54
- engine,
55
- url,
56
- // Re-registering replaces the entry, so carry the unlock state forward.
57
- writeUnlocked: existing?.writeUnlocked,
58
- // Unlike the password, the client always knows the project assignment,
59
- // so the submitted value (or its absence) is authoritative.
60
- projectPath: optionalFormValue(form, "projectPath")?.trim() || undefined,
61
- });
62
- sendJson(response, {
63
- ok: true,
64
- databases: config.databases.map((db) => ({
65
- name: db.name,
66
- engine: db.engine,
67
- })),
68
- });
69
- }),
70
- route("POST", "/api/databases/test", async ({ request, response, dbPeek }) => {
71
- const form = await readForm(request);
72
- const engine = parseEngine(requiredFormValue(form, "engine"));
73
- const url = requiredFormValue(form, "url");
74
- try {
75
- await dbPeek.test(engine, url);
76
- sendJson(response, { ok: true });
77
- }
78
- catch (error) {
79
- sendJson(response, { ok: false, error: redactDatabaseError(engine, url, error) }, 200);
80
- }
81
- }),
82
- patternRoute(/^\/api\/databases\/([^/]+)$/, ["name"], async ({ request, response, params, configStore }) => {
83
- if (request.method !== "DELETE") {
84
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
85
- return;
86
- }
87
- await configStore.removeDatabase(decodeURIComponent(params.name));
88
- sendJson(response, { ok: true });
89
- }),
90
- patternRoute(/^\/api\/databases\/([^/]+)\/catalog\/capabilities$/, ["name"], async ({ request, response, params, dbPeek }) => {
91
- if (request.method !== "GET") {
92
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
93
- return;
94
- }
95
- const capabilities = await dbPeek.capabilities(decodeURIComponent(params.name));
96
- sendJson(response, { ok: true, capabilities });
97
- }),
98
- patternRoute(/^\/api\/databases\/([^/]+)\/catalog\/schemas$/, ["name"], async ({ request, response, params, dbPeek }) => {
99
- if (request.method !== "GET") {
100
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
101
- return;
102
- }
103
- const schemas = await dbPeek.listSchemas(decodeURIComponent(params.name));
104
- sendJson(response, { ok: true, schemas });
105
- }),
106
- patternRoute(/^\/api\/databases\/([^/]+)\/catalog\/objects$/, ["name"], async ({ request, response, params, url, dbPeek }) => {
107
- if (request.method !== "GET") {
108
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
109
- return;
110
- }
111
- const schema = url.searchParams.get("schema");
112
- if (!schema) {
113
- sendJson(response, { ok: false, error: "schema query param is required" }, 400);
114
- return;
115
- }
116
- const objects = await dbPeek.listObjects(decodeURIComponent(params.name), schema);
117
- sendJson(response, { ok: true, objects });
118
- }),
119
- patternRoute(/^\/api\/databases\/([^/]+)\/catalog\/details$/, ["name"], async ({ request, response, params, url, dbPeek }) => {
120
- if (request.method !== "GET") {
121
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
122
- return;
123
- }
124
- const key = url.searchParams.get("key");
125
- if (!key) {
126
- sendJson(response, { ok: false, error: "key query param is required" }, 400);
127
- return;
128
- }
129
- const details = await dbPeek.objectDetails(decodeURIComponent(params.name), key);
130
- sendJson(response, { ok: true, details });
131
- }),
132
- patternRoute(/^\/api\/databases\/([^/]+)\/catalog\/rows$/, ["name"], async ({ request, response, params, url, dbPeek }) => {
133
- if (request.method !== "GET") {
134
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
135
- return;
136
- }
137
- const key = url.searchParams.get("key");
138
- if (!key) {
139
- sendJson(response, { ok: false, error: "key query param is required" }, 400);
140
- return;
141
- }
142
- const limit = Number(url.searchParams.get("limit")) || 100;
143
- const offset = Number(url.searchParams.get("offset")) || 0;
144
- const query = parseRowBrowseQuery(url);
145
- const sample = await dbPeek.sampleObject(decodeURIComponent(params.name), key, limit, offset, query);
146
- sendJson(response, { ok: true, ...sample });
147
- }),
148
- patternRoute(/^\/api\/databases\/([^/]+)\/catalog\/export$/, ["name"], async ({ request, response, params, url, dbPeek }) => {
149
- if (request.method !== "GET") {
150
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
151
- return;
152
- }
153
- const key = url.searchParams.get("key");
154
- if (!key) {
155
- sendJson(response, { ok: false, error: "key query param is required" }, 400);
156
- return;
157
- }
158
- const format = parseExportFormat(url.searchParams.get("format"));
159
- if (!format) {
160
- sendJson(response, { ok: false, error: "format must be csv or json" }, 400);
161
- return;
162
- }
163
- const controller = new AbortController();
164
- const abort = () => controller.abort();
165
- request.once("aborted", abort);
166
- response.once("close", () => {
167
- if (!response.writableEnded)
168
- abort();
169
- });
170
- try {
171
- const name = decodeURIComponent(params.name);
172
- const source = await dbPeek.exportObjectSource(name, key, {
173
- signal: controller.signal,
174
- });
175
- const filename = exportFilename(name, source.object.qualifiedName, format);
176
- response.writeHead(200, {
177
- "cache-control": "no-store",
178
- "content-disposition": contentDisposition(filename),
179
- "content-type": format === "csv"
180
- ? "text/csv; charset=utf-8"
181
- : "application/json; charset=utf-8",
182
- "x-content-type-options": "nosniff",
183
- });
184
- await writeDatabaseExport({
185
- async write(chunk) {
186
- if (!response.write(chunk)) {
187
- await new Promise((resolve, reject) => {
188
- const cleanup = () => {
189
- response.off("drain", onDrain);
190
- response.off("close", onClose);
191
- };
192
- const onDrain = () => {
193
- cleanup();
194
- resolve();
195
- };
196
- const onClose = () => {
197
- cleanup();
198
- reject(new Error("Database export download closed"));
199
- };
200
- response.once("drain", onDrain);
201
- response.once("close", onClose);
202
- });
203
- }
204
- },
205
- }, format, source.columns, source.rows, { signal: controller.signal });
206
- response.end();
207
- }
208
- catch (error) {
209
- if (response.headersSent)
210
- response.destroy(error instanceof Error ? error : undefined);
211
- else {
212
- sendJson(response, { ok: false, error: error instanceof Error ? error.message : String(error) }, 400);
213
- }
214
- }
215
- }),
216
- // Delete rows by exact live-catalog primary-key tuples. This remains a
217
- // human-only write route and is gated by DbWrite's existing unlock flag.
218
- patternRoute(/^\/api\/databases\/([^/]+)\/catalog\/rows\/delete$/, ["name"], async ({ request, response, params, dbWrite }) => {
219
- if (request.method !== "POST") {
220
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
221
- return;
222
- }
223
- try {
224
- const form = await readForm(request);
225
- const key = requiredFormValue(form, "key");
226
- const mode = requiredFormValue(form, "mode");
227
- if (mode !== "preview" && mode !== "commit") {
228
- throw new Error('mode must be either "preview" or "commit"');
229
- }
230
- const tuples = parseDeleteTuples(requiredFormValue(form, "tuples"));
231
- const expectedRaw = optionalFormValue(form, "expectedAffectedRows");
232
- const expectedAffectedRows = expectedRaw === undefined
233
- ? undefined
234
- : Number(expectedRaw);
235
- const outcome = await dbWrite.deleteRows(decodeURIComponent(params.name), key, tuples, mode === "commit", expectedAffectedRows);
236
- sendJson(response, { ok: true, ...outcome });
237
- }
238
- catch (error) {
239
- sendJson(response, { ok: false, error: error instanceof Error ? error.message : String(error) }, 400);
240
- }
241
- }),
242
- patternRoute(/^\/api\/databases\/([^/]+)\/tables$/, ["name"], async ({ request, response, params, dbPeek }) => {
243
- if (request.method !== "GET") {
244
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
245
- return;
246
- }
247
- const tables = await dbPeek.listTables(decodeURIComponent(params.name));
248
- sendJson(response, { ok: true, tables });
249
- }),
250
- // Lock / unlock write access for a connection (human-only; never the agent).
251
- patternRoute(/^\/api\/databases\/([^/]+)\/write-access$/, ["name"], async ({ request, response, params, configStore }) => {
252
- if (request.method !== "POST") {
253
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
254
- return;
255
- }
256
- const form = await readForm(request);
257
- const unlocked = requiredFormValue(form, "unlocked") === "true";
258
- await configStore.setDatabaseWriteAccess(decodeURIComponent(params.name), unlocked);
259
- sendJson(response, { ok: true, writeUnlocked: unlocked });
260
- }),
261
- // Run a write (preview = rolled-back dry run, commit = persisted). Gated by
262
- // the connection's unlock flag inside DbWrite.
263
- patternRoute(/^\/api\/databases\/([^/]+)\/execute$/, ["name"], async ({ request, response, params, dbWrite }) => {
264
- if (request.method !== "POST") {
265
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
266
- return;
267
- }
268
- const form = await readForm(request);
269
- const sql = requiredFormValue(form, "sql");
270
- const commit = optionalFormValue(form, "mode") === "commit";
271
- try {
272
- const outcome = await dbWrite.execute(decodeURIComponent(params.name), sql, commit);
273
- sendJson(response, { ok: true, ...outcome });
274
- }
275
- catch (error) {
276
- sendJson(response, { ok: false, error: error instanceof Error ? error.message : String(error) }, 400);
277
- }
278
- }),
279
- patternRoute(/^\/api\/databases\/([^/]+)\/query$/, ["name"], async ({ request, response, params, dbPeek }) => {
280
- if (request.method !== "POST") {
281
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
282
- return;
283
- }
284
- const form = await readForm(request);
285
- const sql = requiredFormValue(form, "sql");
286
- const limitRaw = optionalFormValue(form, "limit");
287
- const limitParam = Number(limitRaw);
288
- const limit = Number.isFinite(limitParam) && limitParam > 0 ? limitParam : 100;
289
- try {
290
- const result = await dbPeek.runQuery(decodeURIComponent(params.name), sql, limit);
291
- sendJson(response, { ok: true, ...result });
292
- }
293
- catch (error) {
294
- // Bad SQL / read-only violations are user errors — surface the message
295
- // inline rather than as a 500.
296
- sendJson(response, { ok: false, error: error instanceof Error ? error.message : String(error) }, 400);
297
- }
298
- }),
299
- patternRoute(/^\/api\/databases\/([^/]+)\/rows$/, ["name"], async ({ request, response, params, url, dbPeek }) => {
300
- if (request.method !== "GET") {
301
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
302
- return;
303
- }
304
- const table = url.searchParams.get("table");
305
- if (!table) {
306
- sendJson(response, { ok: false, error: "table query param is required" }, 400);
307
- return;
308
- }
309
- const limitParam = Number(url.searchParams.get("limit"));
310
- const limit = Number.isFinite(limitParam) && limitParam > 0 ? limitParam : 100;
311
- const offsetParam = Number(url.searchParams.get("offset"));
312
- const offset = Number.isFinite(offsetParam) && offsetParam > 0 ? offsetParam : 0;
313
- const sample = await dbPeek.sampleRows(decodeURIComponent(params.name), table, limit, offset);
314
- sendJson(response, { ok: true, ...sample });
315
- }),
316
- ];
317
- function parseExportFormat(value) {
318
- return value === "csv" || value === "json" ? value : null;
319
- }
320
- function exportFilename(connection, object, format) {
321
- const date = new Date().toISOString().slice(0, 10);
322
- const stem = `${connection}-${object}-${date}`
323
- .normalize("NFKD")
324
- .replace(/[^A-Za-z0-9._-]+/g, "-")
325
- .replace(/^-+|-+$/g, "")
326
- .slice(0, 120) || "database-export";
327
- return `${stem}.${format}`;
328
- }
329
- function contentDisposition(filename) {
330
- const ascii = filename.replace(/["\\\r\n]/g, "_");
331
- return `attachment; filename="${ascii}"; filename*=UTF-8''${encodeURIComponent(filename)}`;
332
- }
333
- function parseDeleteTuples(value) {
334
- try {
335
- return JSON.parse(value);
336
- }
337
- catch {
338
- throw new Error("tuples must be a valid JSON array");
339
- }
340
- }
341
- //# sourceMappingURL=database-routes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"database-routes.js","sourceRoot":"","sources":["../../../src/web/routes/database-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAEL,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,iBAAiB,EACjB,QAAQ,GACT,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,KAAK,EAAc,MAAM,cAAc,CAAC;AAE/D,MAAM,OAAO,GAAqB,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;AAElE,SAAS,mBAAmB,CAAC,GAAQ;IACnC,MAAM,UAAU,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACnD,IAAI,OAAgC,CAAC;IACrC,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAC5E,OAAO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KAAK,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5D,CAAC;AAED,SAAS,cAAc,CACrB,UAAkB,EAClB,MAAc,EACd,MAA4B;IAE5B,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACnD,MAAM,IAAI,GAAG,GAAG,UAAU,IAAI,MAAM,IAAI,IAAI,EAAE;SAC3C,SAAS,CAAC,MAAM,CAAC;SACjB,OAAO,CAAC,mBAAmB,EAAE,GAAG,CAAC;SACjC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,iBAAiB,CAAC;IACtC,OAAO,GAAG,IAAI,IAAI,MAAM,EAAE,CAAC;AAC7B,CAAC;AAED,SAAS,kBAAkB,CAAC,QAAgB;IAC1C,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;IAClD,OAAO,yBAAyB,KAAK,uBAAuB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC7F,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAa;IACtC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACvD,CAAC;AACH,CAAC"}
@@ -1,7 +0,0 @@
1
- import { type Route } from "./context.js";
2
- /**
3
- * Read-mostly Docker visibility: whatever's running on the host, registered
4
- * as a nomoreide service or not. `status` and `containers` are read-on-mount
5
- * (mirrored in `apps/website/src/mock-api.ts`); actions/logs are click-driven.
6
- */
7
- export declare const dockerRoutes: Route[];
@@ -1,122 +0,0 @@
1
- import { getDockerStatus, listDockerContainers, performDockerContainerAction, readDockerContainerDirectory, readDockerContainerFile, readDockerContainerLogs, startDockerDesktop, } from "../../core/docker.js";
2
- import { inspectDockerContainer } from "../../core/docker-inspect.js";
3
- import { listDockerImages, listDockerNetworks, listDockerVolumes, } from "../../core/docker-resources.js";
4
- import { listDockerStats } from "../../core/docker-stats.js";
5
- import { sendJson } from "../http-utils.js";
6
- import { errorMessage, patternRoute, route } from "./context.js";
7
- const CONTAINER_ACTIONS = new Set(["start", "stop", "restart"]);
8
- /**
9
- * Every Docker read has the same shape: shell out, 500 with the CLI's message
10
- * on failure. `field` is the response key the client's API seam reads back.
11
- */
12
- function dockerReadRoute(path, field, read) {
13
- return route("GET", path, async ({ response }) => {
14
- try {
15
- sendJson(response, { ok: true, [field]: await read() });
16
- }
17
- catch (error) {
18
- sendJson(response, { ok: false, error: errorMessage(error) }, 500);
19
- }
20
- });
21
- }
22
- /**
23
- * Read-mostly Docker visibility: whatever's running on the host, registered
24
- * as a nomoreide service or not. `status` and `containers` are read-on-mount
25
- * (mirrored in `apps/website/src/mock-api.ts`); actions/logs are click-driven.
26
- */
27
- export const dockerRoutes = [
28
- route("GET", "/api/docker/status", async ({ response }) => {
29
- sendJson(response, { ok: true, status: await getDockerStatus() });
30
- }),
31
- route("POST", "/api/docker/start", async ({ response }) => {
32
- try {
33
- await startDockerDesktop();
34
- sendJson(response, { ok: true }, 202);
35
- }
36
- catch (error) {
37
- sendJson(response, { ok: false, error: errorMessage(error) }, 500);
38
- }
39
- }),
40
- dockerReadRoute("/api/docker/containers", "containers", listDockerContainers),
41
- dockerReadRoute("/api/docker/stats", "stats", listDockerStats),
42
- dockerReadRoute("/api/docker/images", "images", listDockerImages),
43
- dockerReadRoute("/api/docker/volumes", "volumes", listDockerVolumes),
44
- dockerReadRoute("/api/docker/networks", "networks", listDockerNetworks),
45
- patternRoute(/^\/api\/docker\/containers\/([^/]+)\/files$/, ["id"], async ({ request, response, params, url }) => {
46
- if (request.method !== "GET") {
47
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
48
- return;
49
- }
50
- try {
51
- const directory = await readDockerContainerDirectory(decodeURIComponent(params.id), url.searchParams.get("path") || ".", url.searchParams.get("hidden") === "1");
52
- sendJson(response, { ok: true, directory });
53
- }
54
- catch (error) {
55
- sendJson(response, { ok: false, error: errorMessage(error) }, 500);
56
- }
57
- }),
58
- patternRoute(/^\/api\/docker\/containers\/([^/]+)\/file$/, ["id"], async ({ request, response, params, url }) => {
59
- if (request.method !== "GET") {
60
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
61
- return;
62
- }
63
- const path = url.searchParams.get("path");
64
- if (!path) {
65
- sendJson(response, { ok: false, error: "path is required" }, 400);
66
- return;
67
- }
68
- try {
69
- const file = await readDockerContainerFile(decodeURIComponent(params.id), path);
70
- sendJson(response, { ok: true, file });
71
- }
72
- catch (error) {
73
- sendJson(response, { ok: false, error: errorMessage(error) }, 500);
74
- }
75
- }),
76
- patternRoute(/^\/api\/docker\/containers\/([^/]+)\/inspect$/, ["id"], async ({ request, response, params }) => {
77
- if (request.method !== "GET") {
78
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
79
- return;
80
- }
81
- try {
82
- const detail = await inspectDockerContainer(decodeURIComponent(params.id));
83
- sendJson(response, { ok: true, detail });
84
- }
85
- catch (error) {
86
- sendJson(response, { ok: false, error: errorMessage(error) }, 500);
87
- }
88
- }),
89
- patternRoute(/^\/api\/docker\/containers\/([^/]+)\/(start|stop|restart)$/, ["id", "action"], async ({ request, response, params }) => {
90
- if (request.method !== "POST") {
91
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
92
- return;
93
- }
94
- const action = params.action;
95
- if (!CONTAINER_ACTIONS.has(action)) {
96
- sendJson(response, { ok: false, error: `Unknown action "${action}"` }, 400);
97
- return;
98
- }
99
- try {
100
- await performDockerContainerAction(decodeURIComponent(params.id), action);
101
- sendJson(response, { ok: true });
102
- }
103
- catch (error) {
104
- sendJson(response, { ok: false, error: errorMessage(error) }, 500);
105
- }
106
- }),
107
- patternRoute(/^\/api\/docker\/containers\/([^/]+)\/logs$/, ["id"], async ({ request, response, params, url }) => {
108
- if (request.method !== "GET") {
109
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
110
- return;
111
- }
112
- const tailParam = Number(url.searchParams.get("tail"));
113
- try {
114
- const logs = await readDockerContainerLogs(decodeURIComponent(params.id), Number.isFinite(tailParam) && tailParam > 0 ? tailParam : undefined);
115
- sendJson(response, { ok: true, logs });
116
- }
117
- catch (error) {
118
- sendJson(response, { ok: false, error: errorMessage(error) }, 500);
119
- }
120
- }),
121
- ];
122
- //# sourceMappingURL=docker-routes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"docker-routes.js","sourceRoot":"","sources":["../../../src/web/routes/docker-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,4BAA4B,EAC5B,4BAA4B,EAC5B,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,GAEnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAc,MAAM,cAAc,CAAC;AAE7E,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;AAEvF;;;GAGG;AACH,SAAS,eAAe,CACtB,IAAY,EACZ,KAAa,EACb,IAAsB;IAEtB,OAAO,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC/C,IAAI,CAAC;YACH,QAAQ,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,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE;QAC3C,IAAI,OAAO,CAAC,MAAM,KAAK,KAAK,EAAE,CAAC;YAC7B,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,GAAG,CAAC,CAAC;YACpE,OAAO;QACT,CAAC;QACD,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;QACvD,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,uBAAuB,CACxC,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,EAC7B,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CACpE,CAAC;YACF,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACzC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QACrE,CAAC;IACH,CAAC,CACF;CACF,CAAC"}
@@ -1,3 +0,0 @@
1
- import { type Route } from "./context.js";
2
- /** Error Inbox: deduped error/stack-trace incidents + copy-to-agent prompts. */
3
- export declare const errorRoutes: Route[];
@@ -1,77 +0,0 @@
1
- import { sendJson } from "../http-utils.js";
2
- import { errorMessage, patternRoute, route } from "./context.js";
3
- /** Error Inbox: deduped error/stack-trace incidents + copy-to-agent prompts. */
4
- export const errorRoutes = [
5
- route("GET", "/api/errors", ({ response, url, errorInbox }) => {
6
- const limitParam = Number(url.searchParams.get("limit"));
7
- const limit = Number.isFinite(limitParam) && limitParam > 0 ? Math.min(limitParam, 200) : 100;
8
- sendJson(response, { ok: true, incidents: errorInbox.list(limit) });
9
- }),
10
- route("GET", "/api/errors/stream", ({ request, response, errorInbox }) => {
11
- response.writeHead(200, {
12
- "content-type": "text/event-stream",
13
- "cache-control": "no-cache, no-transform",
14
- connection: "keep-alive",
15
- });
16
- response.write(`retry: 2000\n\n`);
17
- for (const incident of errorInbox.list(50)) {
18
- response.write(`event: incident\ndata: ${JSON.stringify(incident)}\n\n`);
19
- }
20
- const heartbeat = setInterval(() => {
21
- response.write(`: ping\n\n`);
22
- }, 15000);
23
- const unsubscribe = errorInbox.subscribe((incident) => {
24
- response.write(`event: incident\ndata: ${JSON.stringify(incident)}\n\n`);
25
- });
26
- request.on("close", () => {
27
- clearInterval(heartbeat);
28
- unsubscribe();
29
- });
30
- }),
31
- patternRoute(/^\/api\/errors\/(\d+)\/prompt$/, ["id"], async ({ request, response, params, errorInbox }) => {
32
- if (request.method !== "GET") {
33
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
34
- return;
35
- }
36
- const payload = await errorInbox.buildPrompt(Number(params.id));
37
- if (!payload) {
38
- sendJson(response, { ok: false, error: "Incident not found" }, 404);
39
- return;
40
- }
41
- sendJson(response, { ok: true, ...payload });
42
- }),
43
- patternRoute(/^\/api\/errors\/(\d+)\/bundle$/, ["id"], async ({ request, response, params, url, reproBundle }) => {
44
- if (request.method !== "GET") {
45
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
46
- return;
47
- }
48
- const save = url.searchParams.get("save") === "1";
49
- const payload = await reproBundle.build(Number(params.id), { save });
50
- if (!payload) {
51
- sendJson(response, { ok: false, error: "Incident not found" }, 404);
52
- return;
53
- }
54
- sendJson(response, { ok: true, ...payload });
55
- }),
56
- // Error → Fix loop: snapshot the working tree, record an agent session, and
57
- // return the repro-bundle fix prompt. The client then runs the prompt in the
58
- // dock; the agent's edits surface as the recorded session's change-set.
59
- patternRoute(/^\/api\/errors\/(\d+)\/fix$/, ["id"], async ({ request, response, params, fixLoop }) => {
60
- if (request.method !== "POST") {
61
- sendJson(response, { ok: false, error: "Method not allowed" }, 405);
62
- return;
63
- }
64
- try {
65
- const prep = await fixLoop.prepare(Number(params.id));
66
- if (!prep) {
67
- sendJson(response, { ok: false, error: "Incident not found" }, 404);
68
- return;
69
- }
70
- sendJson(response, { ok: true, ...prep });
71
- }
72
- catch (error) {
73
- sendJson(response, { ok: false, error: errorMessage(error) }, 400);
74
- }
75
- }),
76
- ];
77
- //# sourceMappingURL=errors-routes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors-routes.js","sourceRoot":"","sources":["../../../src/web/routes/errors-routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,KAAK,EAAc,MAAM,cAAc,CAAC;AAE7E,gFAAgF;AAChF,MAAM,CAAC,MAAM,WAAW,GAAY;IAClC,KAAK,CAAC,KAAK,EAAE,aAAa,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE;QAC5D,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;QACzD,MAAM,KAAK,GACT,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAClF,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACtE,CAAC,CAAC;IAEF,KAAK,CAAC,KAAK,EAAE,oBAAoB,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE;QACvE,QAAQ,CAAC,SAAS,CAA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N,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;QAC/C,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC9B,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,GAAG,CAAC,CAAC;YACpE,OAAO;QACT,CAAC;QACD,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;YACtD,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,GAAG,CAAC,CAAC;gBACpE,OAAO;YACT,CAAC;YACD,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;QAC5C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,QAAQ,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;QACrE,CAAC;IACH,CAAC,CACF;CACF,CAAC"}
@@ -1,14 +0,0 @@
1
- import { type Route } from "./context.js";
2
- /**
3
- * The Extensions section's data — what is installed.
4
- *
5
- * One route, and it will stay small for a while: stage 2 of §12 deliberately
6
- * ships no install, remove or browse, because every extension is built-in and
7
- * those controls would be decoration. When the marketplace opens, `POST
8
- * /api/extensions/install` and `DELETE /api/extensions/:id` join this file
9
- * rather than the dispatcher.
10
- *
11
- * Nothing here names a provider — the rows come from the registries, so a
12
- * fourth provider appears on the page without this file changing.
13
- */
14
- export declare const extensionsRoutes: Route[];
@@ -1,21 +0,0 @@
1
- import { listInstalledExtensions } from "../../core/extensions.js";
2
- import { sendJson } from "../http-utils.js";
3
- import { route } from "./context.js";
4
- /**
5
- * The Extensions section's data — what is installed.
6
- *
7
- * One route, and it will stay small for a while: stage 2 of §12 deliberately
8
- * ships no install, remove or browse, because every extension is built-in and
9
- * those controls would be decoration. When the marketplace opens, `POST
10
- * /api/extensions/install` and `DELETE /api/extensions/:id` join this file
11
- * rather than the dispatcher.
12
- *
13
- * Nothing here names a provider — the rows come from the registries, so a
14
- * fourth provider appears on the page without this file changing.
15
- */
16
- export const extensionsRoutes = [
17
- route("GET", "/api/extensions", async ({ response }) => {
18
- sendJson(response, { ok: true, extensions: listInstalledExtensions() });
19
- }),
20
- ];
21
- //# sourceMappingURL=extensions-routes.js.map