@stigmer/cli 3.35.0 → 3.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (514) hide show
  1. package/auth/auth0.d.ts.map +1 -1
  2. package/auth/auth0.js.map +1 -1
  3. package/auth/callback-server.d.ts.map +1 -1
  4. package/auth/callback-server.js.map +1 -1
  5. package/auth/index.d.ts.map +1 -1
  6. package/auth/index.js.map +1 -1
  7. package/auth/login.d.ts.map +1 -1
  8. package/auth/login.js.map +1 -1
  9. package/auth/pages.d.ts.map +1 -1
  10. package/auth/pages.js.map +1 -1
  11. package/auth/pkce.d.ts.map +1 -1
  12. package/auth/pkce.js.map +1 -1
  13. package/auth/token.d.ts.map +1 -1
  14. package/auth/token.js.map +1 -1
  15. package/backend.d.ts.map +1 -1
  16. package/backend.js.map +1 -1
  17. package/cli/stigmer.d.ts.map +1 -1
  18. package/cli/stigmer.js.map +1 -1
  19. package/client/client.d.ts.map +1 -1
  20. package/client/client.js.map +1 -1
  21. package/client/index.d.ts.map +1 -1
  22. package/client/index.js.map +1 -1
  23. package/commands/agent-exec-flags.d.ts.map +1 -1
  24. package/commands/agent-exec-flags.js.map +1 -1
  25. package/commands/apikey/duration.d.ts.map +1 -1
  26. package/commands/apikey/duration.js.map +1 -1
  27. package/commands/apikey/index.d.ts.map +1 -1
  28. package/commands/apikey/index.js.map +1 -1
  29. package/commands/apply.d.ts.map +1 -1
  30. package/commands/apply.js.map +1 -1
  31. package/commands/auth/index.d.ts.map +1 -1
  32. package/commands/auth/index.js.map +1 -1
  33. package/commands/auth/login.d.ts.map +1 -1
  34. package/commands/auth/login.js.map +1 -1
  35. package/commands/auth/whoami.d.ts.map +1 -1
  36. package/commands/auth/whoami.js.map +1 -1
  37. package/commands/bootstrap.d.ts.map +1 -1
  38. package/commands/bootstrap.js.map +1 -1
  39. package/commands/completion.d.ts.map +1 -1
  40. package/commands/completion.js.map +1 -1
  41. package/commands/config/backend.d.ts.map +1 -1
  42. package/commands/config/backend.js.map +1 -1
  43. package/commands/config/context.d.ts.map +1 -1
  44. package/commands/config/context.js.map +1 -1
  45. package/commands/config/index.d.ts.map +1 -1
  46. package/commands/config/index.js.map +1 -1
  47. package/commands/config/kv.d.ts.map +1 -1
  48. package/commands/config/kv.js.map +1 -1
  49. package/commands/connect.d.ts.map +1 -1
  50. package/commands/connect.js.map +1 -1
  51. package/commands/delete.d.ts.map +1 -1
  52. package/commands/delete.js.map +1 -1
  53. package/commands/diff.d.ts.map +1 -1
  54. package/commands/diff.js.map +1 -1
  55. package/commands/down.d.ts.map +1 -1
  56. package/commands/down.js.map +1 -1
  57. package/commands/download.d.ts.map +1 -1
  58. package/commands/download.js.map +1 -1
  59. package/commands/execution/approve.d.ts.map +1 -1
  60. package/commands/execution/approve.js.map +1 -1
  61. package/commands/execution/control.d.ts.map +1 -1
  62. package/commands/execution/control.js.map +1 -1
  63. package/commands/execution/index.d.ts.map +1 -1
  64. package/commands/execution/index.js.map +1 -1
  65. package/commands/execution/logs.d.ts.map +1 -1
  66. package/commands/execution/logs.js.map +1 -1
  67. package/commands/execution/trace.d.ts.map +1 -1
  68. package/commands/execution/trace.js.map +1 -1
  69. package/commands/get.d.ts.map +1 -1
  70. package/commands/get.js.map +1 -1
  71. package/commands/install.d.ts.map +1 -1
  72. package/commands/install.js.map +1 -1
  73. package/commands/internal-daemon.d.ts.map +1 -1
  74. package/commands/internal-daemon.js.map +1 -1
  75. package/commands/list.d.ts.map +1 -1
  76. package/commands/list.js.map +1 -1
  77. package/commands/logs.d.ts.map +1 -1
  78. package/commands/logs.js.map +1 -1
  79. package/commands/marketplace.d.ts.map +1 -1
  80. package/commands/marketplace.js.map +1 -1
  81. package/commands/mcp-server.d.ts.map +1 -1
  82. package/commands/mcp-server.js.map +1 -1
  83. package/commands/push.d.ts.map +1 -1
  84. package/commands/push.js.map +1 -1
  85. package/commands/reset.d.ts.map +1 -1
  86. package/commands/reset.js.map +1 -1
  87. package/commands/resume.d.ts.map +1 -1
  88. package/commands/resume.js.map +1 -1
  89. package/commands/run.d.ts.map +1 -1
  90. package/commands/run.js.map +1 -1
  91. package/commands/schedule.d.ts.map +1 -1
  92. package/commands/schedule.js.map +1 -1
  93. package/commands/search.d.ts.map +1 -1
  94. package/commands/search.js.map +1 -1
  95. package/commands/setup.d.ts.map +1 -1
  96. package/commands/setup.js.map +1 -1
  97. package/commands/share.d.ts.map +1 -1
  98. package/commands/share.js.map +1 -1
  99. package/commands/shared.d.ts.map +1 -1
  100. package/commands/shared.js.map +1 -1
  101. package/commands/status.d.ts.map +1 -1
  102. package/commands/status.js.map +1 -1
  103. package/commands/tag.d.ts.map +1 -1
  104. package/commands/tag.js.map +1 -1
  105. package/commands/up.d.ts.map +1 -1
  106. package/commands/up.js.map +1 -1
  107. package/commands/usage.d.ts.map +1 -1
  108. package/commands/usage.js.map +1 -1
  109. package/commands/validate.d.ts.map +1 -1
  110. package/commands/validate.js.map +1 -1
  111. package/commands/version.d.ts.map +1 -1
  112. package/commands/version.js.map +1 -1
  113. package/config/config.d.ts.map +1 -1
  114. package/config/config.js.map +1 -1
  115. package/config/index.d.ts.map +1 -1
  116. package/config/index.js.map +1 -1
  117. package/config/keys.d.ts.map +1 -1
  118. package/config/keys.js.map +1 -1
  119. package/config/paths.d.ts.map +1 -1
  120. package/config/paths.js.map +1 -1
  121. package/config/resolve.d.ts.map +1 -1
  122. package/config/resolve.js.map +1 -1
  123. package/errors/classify.d.ts.map +1 -1
  124. package/errors/classify.js.map +1 -1
  125. package/errors/cli-exit-error.d.ts.map +1 -1
  126. package/errors/cli-exit-error.js.map +1 -1
  127. package/errors/exit-codes.d.ts.map +1 -1
  128. package/errors/exit-codes.js.map +1 -1
  129. package/errors/handle.d.ts.map +1 -1
  130. package/errors/handle.js.map +1 -1
  131. package/errors/index.d.ts.map +1 -1
  132. package/errors/index.js.map +1 -1
  133. package/errors/usage-error.d.ts.map +1 -1
  134. package/errors/usage-error.js.map +1 -1
  135. package/index.d.ts.map +1 -1
  136. package/index.js.map +1 -1
  137. package/local/artifact.d.ts.map +1 -1
  138. package/local/artifact.js.map +1 -1
  139. package/local/bootstrap.d.ts.map +1 -1
  140. package/local/bootstrap.js.map +1 -1
  141. package/local/constants.d.ts.map +1 -1
  142. package/local/constants.js.map +1 -1
  143. package/local/daemon/components.d.ts.map +1 -1
  144. package/local/daemon/components.js.map +1 -1
  145. package/local/daemon/env.d.ts.map +1 -1
  146. package/local/daemon/env.js.map +1 -1
  147. package/local/daemon/host.d.ts.map +1 -1
  148. package/local/daemon/host.js.map +1 -1
  149. package/local/daemon/index.d.ts.map +1 -1
  150. package/local/daemon/index.js.map +1 -1
  151. package/local/daemon/launch.d.ts.map +1 -1
  152. package/local/daemon/launch.js.map +1 -1
  153. package/local/daemon/process.d.ts.map +1 -1
  154. package/local/daemon/process.js.map +1 -1
  155. package/local/daemon/supervisor.d.ts.map +1 -1
  156. package/local/daemon/supervisor.js.map +1 -1
  157. package/local/daemon/types.d.ts.map +1 -1
  158. package/local/daemon/types.js.map +1 -1
  159. package/local/llm-config.d.ts.map +1 -1
  160. package/local/llm-config.js.map +1 -1
  161. package/local/logs/tail.d.ts.map +1 -1
  162. package/local/logs/tail.js.map +1 -1
  163. package/local/logs/view.d.ts.map +1 -1
  164. package/local/logs/view.js.map +1 -1
  165. package/local/net/tcp.d.ts.map +1 -1
  166. package/local/net/tcp.js.map +1 -1
  167. package/local/operator-config.d.ts.map +1 -1
  168. package/local/operator-config.js.map +1 -1
  169. package/local/paths.d.ts.map +1 -1
  170. package/local/paths.js.map +1 -1
  171. package/local/reset.d.ts.map +1 -1
  172. package/local/reset.js.map +1 -1
  173. package/local/runtime/index.d.ts.map +1 -1
  174. package/local/runtime/index.js.map +1 -1
  175. package/local/runtime/node.d.ts.map +1 -1
  176. package/local/runtime/node.js.map +1 -1
  177. package/local/runtime/runner.d.ts.map +1 -1
  178. package/local/runtime/runner.js.map +1 -1
  179. package/local/runtime/runtimes-install.d.ts.map +1 -1
  180. package/local/runtime/runtimes-install.js.map +1 -1
  181. package/local/runtime/server.d.ts.map +1 -1
  182. package/local/runtime/server.js.map +1 -1
  183. package/local/runtime/which.d.ts.map +1 -1
  184. package/local/runtime/which.js.map +1 -1
  185. package/local/setup/prompt.d.ts.map +1 -1
  186. package/local/setup/prompt.js.map +1 -1
  187. package/local/setup/wizard.d.ts.map +1 -1
  188. package/local/setup/wizard.js.map +1 -1
  189. package/local/state/health-state.d.ts.map +1 -1
  190. package/local/state/health-state.js.map +1 -1
  191. package/local/state/index.d.ts.map +1 -1
  192. package/local/state/index.js.map +1 -1
  193. package/local/state/lock.d.ts.map +1 -1
  194. package/local/state/lock.js.map +1 -1
  195. package/local/state/log-rotation.d.ts.map +1 -1
  196. package/local/state/log-rotation.js.map +1 -1
  197. package/local/state/pidfile.d.ts.map +1 -1
  198. package/local/state/pidfile.js.map +1 -1
  199. package/local/state/proc.d.ts.map +1 -1
  200. package/local/state/proc.js.map +1 -1
  201. package/local/state/startup-config.d.ts.map +1 -1
  202. package/local/state/startup-config.js.map +1 -1
  203. package/local/status.d.ts.map +1 -1
  204. package/local/status.js.map +1 -1
  205. package/local/temporal/download.d.ts.map +1 -1
  206. package/local/temporal/download.js.map +1 -1
  207. package/local/temporal/index.d.ts.map +1 -1
  208. package/local/temporal/index.js.map +1 -1
  209. package/local/temporal/inspect.d.ts.map +1 -1
  210. package/local/temporal/inspect.js.map +1 -1
  211. package/local/temporal/manager.d.ts.map +1 -1
  212. package/local/temporal/manager.js.map +1 -1
  213. package/local/temporal/supervisor.d.ts.map +1 -1
  214. package/local/temporal/supervisor.js.map +1 -1
  215. package/local/webconsole/index.d.ts.map +1 -1
  216. package/local/webconsole/index.js.map +1 -1
  217. package/logger.d.ts.map +1 -1
  218. package/logger.js.map +1 -1
  219. package/marketplace/config.d.ts.map +1 -1
  220. package/marketplace/config.js.map +1 -1
  221. package/marketplace/github.d.ts.map +1 -1
  222. package/marketplace/github.js.map +1 -1
  223. package/marketplace/index.d.ts.map +1 -1
  224. package/marketplace/index.js.map +1 -1
  225. package/marketplace/install.d.ts.map +1 -1
  226. package/marketplace/install.js.map +1 -1
  227. package/marketplace/materialize.d.ts.map +1 -1
  228. package/marketplace/materialize.js.map +1 -1
  229. package/marketplace/official.d.ts.map +1 -1
  230. package/marketplace/official.js.map +1 -1
  231. package/marketplace/read.d.ts.map +1 -1
  232. package/marketplace/read.js.map +1 -1
  233. package/marketplace/ref.d.ts.map +1 -1
  234. package/marketplace/ref.js.map +1 -1
  235. package/marketplace/render.d.ts.map +1 -1
  236. package/marketplace/render.js.map +1 -1
  237. package/output/command-result.d.ts.map +1 -1
  238. package/output/command-result.js.map +1 -1
  239. package/output/confirm.d.ts.map +1 -1
  240. package/output/confirm.js.map +1 -1
  241. package/output/format.d.ts.map +1 -1
  242. package/output/format.js.map +1 -1
  243. package/output/index.d.ts.map +1 -1
  244. package/output/index.js.map +1 -1
  245. package/output/ndjson.d.ts.map +1 -1
  246. package/output/ndjson.js.map +1 -1
  247. package/output/proto.d.ts.map +1 -1
  248. package/output/proto.js.map +1 -1
  249. package/output/style.d.ts.map +1 -1
  250. package/output/style.js.map +1 -1
  251. package/output/table.d.ts.map +1 -1
  252. package/output/table.js.map +1 -1
  253. package/package.json +7 -7
  254. package/program.d.ts.map +1 -1
  255. package/program.js.map +1 -1
  256. package/registry/aliases.d.ts.map +1 -1
  257. package/registry/aliases.js.map +1 -1
  258. package/registry/index.d.ts.map +1 -1
  259. package/registry/index.js.map +1 -1
  260. package/registry/metadata.d.ts.map +1 -1
  261. package/registry/metadata.js.map +1 -1
  262. package/registry/registry.d.ts.map +1 -1
  263. package/registry/registry.js.map +1 -1
  264. package/registry/verb-support.d.ts.map +1 -1
  265. package/registry/verb-support.js.map +1 -1
  266. package/registry/verbs.d.ts.map +1 -1
  267. package/registry/verbs.js.map +1 -1
  268. package/resources/apply/apply.d.ts.map +1 -1
  269. package/resources/apply/apply.js.map +1 -1
  270. package/resources/apply/discovery.d.ts.map +1 -1
  271. package/resources/apply/discovery.js.map +1 -1
  272. package/resources/apply/handlers.d.ts.map +1 -1
  273. package/resources/apply/handlers.js.map +1 -1
  274. package/resources/connect/connect.d.ts.map +1 -1
  275. package/resources/connect/connect.js.map +1 -1
  276. package/resources/connect/discover.d.ts.map +1 -1
  277. package/resources/connect/discover.js.map +1 -1
  278. package/resources/connect/display.d.ts.map +1 -1
  279. package/resources/connect/display.js.map +1 -1
  280. package/resources/connect/oauth.d.ts.map +1 -1
  281. package/resources/connect/oauth.js.map +1 -1
  282. package/resources/cursor-pages.d.ts.map +1 -1
  283. package/resources/cursor-pages.js.map +1 -1
  284. package/resources/delete.d.ts.map +1 -1
  285. package/resources/delete.js.map +1 -1
  286. package/resources/diff.d.ts.map +1 -1
  287. package/resources/diff.js.map +1 -1
  288. package/resources/documents.d.ts.map +1 -1
  289. package/resources/documents.js.map +1 -1
  290. package/resources/download.d.ts.map +1 -1
  291. package/resources/download.js.map +1 -1
  292. package/resources/execution-approve.d.ts.map +1 -1
  293. package/resources/execution-approve.js.map +1 -1
  294. package/resources/execution-control.d.ts.map +1 -1
  295. package/resources/execution-control.js.map +1 -1
  296. package/resources/execution-format.d.ts.map +1 -1
  297. package/resources/execution-format.js.map +1 -1
  298. package/resources/execution-logs.d.ts.map +1 -1
  299. package/resources/execution-logs.js.map +1 -1
  300. package/resources/execution-trace.d.ts.map +1 -1
  301. package/resources/execution-trace.js.map +1 -1
  302. package/resources/execution.d.ts.map +1 -1
  303. package/resources/execution.js.map +1 -1
  304. package/resources/get-bindings.d.ts.map +1 -1
  305. package/resources/get-bindings.js.map +1 -1
  306. package/resources/get.d.ts.map +1 -1
  307. package/resources/get.js.map +1 -1
  308. package/resources/git.d.ts.map +1 -1
  309. package/resources/git.js.map +1 -1
  310. package/resources/ignore/index.d.ts.map +1 -1
  311. package/resources/ignore/index.js.map +1 -1
  312. package/resources/ignore/matcher.d.ts.map +1 -1
  313. package/resources/ignore/matcher.js.map +1 -1
  314. package/resources/list.d.ts.map +1 -1
  315. package/resources/list.js.map +1 -1
  316. package/resources/mcp/placeholder-resolver.d.ts.map +1 -1
  317. package/resources/mcp/placeholder-resolver.js.map +1 -1
  318. package/resources/mcp/runtime-env.d.ts.map +1 -1
  319. package/resources/mcp/runtime-env.js.map +1 -1
  320. package/resources/picker/ink.d.ts.map +1 -1
  321. package/resources/picker/ink.js.map +1 -1
  322. package/resources/picker/tty.d.ts.map +1 -1
  323. package/resources/picker/tty.js.map +1 -1
  324. package/resources/plugin.d.ts.map +1 -1
  325. package/resources/plugin.js.map +1 -1
  326. package/resources/reference.d.ts.map +1 -1
  327. package/resources/reference.js.map +1 -1
  328. package/resources/render.d.ts.map +1 -1
  329. package/resources/render.js.map +1 -1
  330. package/resources/run/agent-exec.d.ts.map +1 -1
  331. package/resources/run/agent-exec.js.map +1 -1
  332. package/resources/run/attachments.d.ts.map +1 -1
  333. package/resources/run/attachments.js.map +1 -1
  334. package/resources/run/create.d.ts.map +1 -1
  335. package/resources/run/create.js.map +1 -1
  336. package/resources/run/env.d.ts.map +1 -1
  337. package/resources/run/env.js.map +1 -1
  338. package/resources/run/epilogue.d.ts.map +1 -1
  339. package/resources/run/epilogue.js.map +1 -1
  340. package/resources/run/header.d.ts.map +1 -1
  341. package/resources/run/header.js.map +1 -1
  342. package/resources/run/prepare.d.ts.map +1 -1
  343. package/resources/run/prepare.js.map +1 -1
  344. package/resources/run/resolve.d.ts.map +1 -1
  345. package/resources/run/resolve.js.map +1 -1
  346. package/resources/run/resume.d.ts.map +1 -1
  347. package/resources/run/resume.js.map +1 -1
  348. package/resources/run/stream.d.ts.map +1 -1
  349. package/resources/run/stream.js.map +1 -1
  350. package/resources/run/workflow-stream.d.ts.map +1 -1
  351. package/resources/run/workflow-stream.js.map +1 -1
  352. package/resources/run/workspace.d.ts.map +1 -1
  353. package/resources/run/workspace.js.map +1 -1
  354. package/resources/schedule.d.ts.map +1 -1
  355. package/resources/schedule.js.map +1 -1
  356. package/resources/search.d.ts.map +1 -1
  357. package/resources/search.js.map +1 -1
  358. package/resources/session.d.ts.map +1 -1
  359. package/resources/session.js.map +1 -1
  360. package/resources/share.d.ts.map +1 -1
  361. package/resources/share.js.map +1 -1
  362. package/resources/skill.d.ts.map +1 -1
  363. package/resources/skill.js.map +1 -1
  364. package/resources/stream/approval-detect.d.ts.map +1 -1
  365. package/resources/stream/approval-detect.js.map +1 -1
  366. package/resources/stream/convert.d.ts.map +1 -1
  367. package/resources/stream/convert.js.map +1 -1
  368. package/resources/stream/diff.d.ts.map +1 -1
  369. package/resources/stream/diff.js.map +1 -1
  370. package/resources/stream/events.d.ts.map +1 -1
  371. package/resources/stream/events.js.map +1 -1
  372. package/resources/stream/headless.d.ts.map +1 -1
  373. package/resources/stream/headless.js.map +1 -1
  374. package/resources/stream/ink.d.ts.map +1 -1
  375. package/resources/stream/ink.js.map +1 -1
  376. package/resources/stream/render-ndjson.d.ts.map +1 -1
  377. package/resources/stream/render-ndjson.js.map +1 -1
  378. package/resources/stream/render-plaintext.d.ts.map +1 -1
  379. package/resources/stream/render-plaintext.js.map +1 -1
  380. package/resources/stream/snapshot.d.ts.map +1 -1
  381. package/resources/stream/snapshot.js.map +1 -1
  382. package/resources/stream/subagent.d.ts.map +1 -1
  383. package/resources/stream/subagent.js.map +1 -1
  384. package/resources/stream/submit.d.ts.map +1 -1
  385. package/resources/stream/submit.js.map +1 -1
  386. package/resources/stream/todo.d.ts.map +1 -1
  387. package/resources/stream/todo.js.map +1 -1
  388. package/resources/stream/tool-state.d.ts.map +1 -1
  389. package/resources/stream/tool-state.js.map +1 -1
  390. package/resources/stream/tty.d.ts.map +1 -1
  391. package/resources/stream/tty.js.map +1 -1
  392. package/resources/stream/workflow-event-view.d.ts.map +1 -1
  393. package/resources/stream/workflow-event-view.js.map +1 -1
  394. package/resources/stream/workflow-render-ndjson.d.ts.map +1 -1
  395. package/resources/stream/workflow-render-ndjson.js.map +1 -1
  396. package/resources/stream/workflow-render-plaintext.d.ts.map +1 -1
  397. package/resources/stream/workflow-render-plaintext.js.map +1 -1
  398. package/resources/tag.d.ts.map +1 -1
  399. package/resources/tag.js.map +1 -1
  400. package/resources/task-configs.d.ts.map +1 -1
  401. package/resources/task-configs.js.map +1 -1
  402. package/resources/usage.d.ts.map +1 -1
  403. package/resources/usage.js.map +1 -1
  404. package/resources/validate.d.ts.map +1 -1
  405. package/resources/validate.js.map +1 -1
  406. package/resources/version.d.ts.map +1 -1
  407. package/resources/version.js.map +1 -1
  408. package/runtime.d.ts.map +1 -1
  409. package/runtime.js.map +1 -1
  410. package/version.d.ts.map +1 -1
  411. package/version.js.map +1 -1
  412. package/src/auth/pkce.test.ts +0 -37
  413. package/src/auth/token.test.ts +0 -151
  414. package/src/client/client.test.ts +0 -142
  415. package/src/commands/apikey/duration.test.ts +0 -23
  416. package/src/commands/auth/login.test.ts +0 -52
  417. package/src/commands/auth/whoami.test.ts +0 -96
  418. package/src/commands/bootstrap.test.ts +0 -178
  419. package/src/commands/config/backend.test.ts +0 -122
  420. package/src/commands/config/context.test.ts +0 -171
  421. package/src/commands/connect.test.ts +0 -113
  422. package/src/commands/install.test.ts +0 -307
  423. package/src/commands/marketplace.test.ts +0 -205
  424. package/src/commands/mcp-server.test.ts +0 -65
  425. package/src/commands/validate.test.ts +0 -168
  426. package/src/config/config.test.ts +0 -132
  427. package/src/config/keys.test.ts +0 -61
  428. package/src/config/resolve.test.ts +0 -242
  429. package/src/errors/clierr.test.ts +0 -172
  430. package/src/local/artifact.test.ts +0 -54
  431. package/src/local/bootstrap.test.ts +0 -166
  432. package/src/local/daemon/components.test.ts +0 -148
  433. package/src/local/daemon/daemon.integration.test.ts +0 -216
  434. package/src/local/daemon/env.test.ts +0 -108
  435. package/src/local/daemon/launch.test.ts +0 -136
  436. package/src/local/daemon/supervisor.test.ts +0 -260
  437. package/src/local/llm-config.test.ts +0 -66
  438. package/src/local/logs/tail.test.ts +0 -70
  439. package/src/local/logs/view.test.ts +0 -46
  440. package/src/local/operator-config.test.ts +0 -72
  441. package/src/local/reset.test.ts +0 -53
  442. package/src/local/runtime/runtime.test.ts +0 -240
  443. package/src/local/runtime/runtimes-install.test.ts +0 -58
  444. package/src/local/runtime/server.test.ts +0 -253
  445. package/src/local/setup/wizard.test.ts +0 -94
  446. package/src/local/state/state.test.ts +0 -210
  447. package/src/local/status.test.ts +0 -108
  448. package/src/local/temporal/download.test.ts +0 -248
  449. package/src/local/temporal/inspect.test.ts +0 -83
  450. package/src/local/temporal/manager.test.ts +0 -64
  451. package/src/local/temporal/supervisor.test.ts +0 -77
  452. package/src/marketplace/__fixtures__/cursor-marketplace.ts +0 -69
  453. package/src/marketplace/config.test.ts +0 -254
  454. package/src/marketplace/github.test.ts +0 -394
  455. package/src/marketplace/install.test.ts +0 -261
  456. package/src/marketplace/official.test.ts +0 -107
  457. package/src/marketplace/read.test.ts +0 -93
  458. package/src/marketplace/ref.test.ts +0 -179
  459. package/src/output/command-result.test.ts +0 -73
  460. package/src/output/confirm.test.ts +0 -43
  461. package/src/output/format.test.ts +0 -65
  462. package/src/output/proto.test.ts +0 -72
  463. package/src/output/table.test.ts +0 -37
  464. package/src/program.test.ts +0 -62
  465. package/src/registry/aliases.test.ts +0 -142
  466. package/src/registry/registry.test.ts +0 -355
  467. package/src/resources/apply/apply.integration.test.ts +0 -353
  468. package/src/resources/apply/apply.test.ts +0 -134
  469. package/src/resources/apply/discovery.integration.test.ts +0 -99
  470. package/src/resources/connect/__fixtures__/stdio-crash.mjs +0 -6
  471. package/src/resources/connect/__fixtures__/stdio-server.mjs +0 -48
  472. package/src/resources/connect/connect.integration.test.ts +0 -383
  473. package/src/resources/connect/discover.test.ts +0 -84
  474. package/src/resources/connect/oauth.test.ts +0 -158
  475. package/src/resources/cursor-pages.test.ts +0 -55
  476. package/src/resources/diff.integration.test.ts +0 -103
  477. package/src/resources/diff.test.ts +0 -34
  478. package/src/resources/documents.test.ts +0 -67
  479. package/src/resources/execution-approve.test.ts +0 -50
  480. package/src/resources/execution-format.test.ts +0 -48
  481. package/src/resources/execution.integration.test.ts +0 -285
  482. package/src/resources/execution.test.ts +0 -138
  483. package/src/resources/ignore/ignore.test.ts +0 -62
  484. package/src/resources/mcp/placeholder-resolver.test.ts +0 -71
  485. package/src/resources/mcp/runtime-env.test.ts +0 -102
  486. package/src/resources/mutate-verbs.integration.test.ts +0 -455
  487. package/src/resources/picker/tty.test.ts +0 -37
  488. package/src/resources/plugin.test.ts +0 -379
  489. package/src/resources/push-download.integration.test.ts +0 -175
  490. package/src/resources/read-completion.integration.test.ts +0 -164
  491. package/src/resources/read-verbs.integration.test.ts +0 -603
  492. package/src/resources/reference.test.ts +0 -107
  493. package/src/resources/run/agent-exec.test.ts +0 -179
  494. package/src/resources/run/attachments.test.ts +0 -135
  495. package/src/resources/run/create.test.ts +0 -336
  496. package/src/resources/run/env.test.ts +0 -131
  497. package/src/resources/run/header.test.ts +0 -79
  498. package/src/resources/run/prepare.test.ts +0 -428
  499. package/src/resources/run/workflow-stream.integration.test.ts +0 -157
  500. package/src/resources/run/workspace.test.ts +0 -93
  501. package/src/resources/share.test.ts +0 -523
  502. package/src/resources/skill.test.ts +0 -364
  503. package/src/resources/stream/diff.test.ts +0 -338
  504. package/src/resources/stream/headless.test.ts +0 -119
  505. package/src/resources/stream/lazy-import.test.ts +0 -63
  506. package/src/resources/stream/render-ndjson.test.ts +0 -126
  507. package/src/resources/stream/render-plaintext.test.ts +0 -127
  508. package/src/resources/stream/snapshot.test.ts +0 -111
  509. package/src/resources/stream/submit.test.ts +0 -77
  510. package/src/resources/stream/workflow-event-view.test.ts +0 -116
  511. package/src/resources/stream/workflow-render.test.ts +0 -81
  512. package/src/resources/task-configs.test.ts +0 -98
  513. package/src/resources/usage.test.ts +0 -94
  514. package/src/resources/validate.test.ts +0 -79
@@ -1,307 +0,0 @@
1
- // Command-level contract for `stigmer install`: a ref resolves through the
2
- // configured marketplaces to one entry, whose folder is pushed exactly as
3
- // `push plugin` would push it (the archive the backend receives is the one
4
- // the folder prepares to); --dry-run pushes nothing; a version pin, a path,
5
- // an unknown name and an ambiguous name refuse with their sentences. A real
6
- // Connect backend over h2c serves the plugin controllers; the config file
7
- // (HOME redirected) points a selfhost backend at it. The global fetch is
8
- // stubbed: the built-in vendor sources are asked through their marketplace
9
- // files (answered 404, so they declare nothing) and any download would fail
10
- // loudly, which pins that a bare install never fetches a vendor's zipball.
11
-
12
- import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
13
- import {
14
- createServer as createHttp2Server,
15
- type Http2Server,
16
- type ServerHttp2Session,
17
- } from "node:http2";
18
- import type { AddressInfo } from "node:net";
19
- import { tmpdir } from "node:os";
20
- import { join } from "node:path";
21
- import { create } from "@bufbuild/protobuf";
22
- import type { ConnectRouter } from "@connectrpc/connect";
23
- import { connectNodeAdapter } from "@connectrpc/connect-node";
24
- import { PluginSchema } from "@stigmer/protos/ai/stigmer/agentic/plugin/v1/api_pb";
25
- import { PluginCommandController } from "@stigmer/protos/ai/stigmer/agentic/plugin/v1/command_pb";
26
- import {
27
- ListPluginMembersResponseSchema,
28
- type PushPluginRequest,
29
- } from "@stigmer/protos/ai/stigmer/agentic/plugin/v1/io_pb";
30
- import { PluginQueryController } from "@stigmer/protos/ai/stigmer/agentic/plugin/v1/query_pb";
31
- import { PluginState } from "@stigmer/protos/ai/stigmer/agentic/plugin/v1/status_pb";
32
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
33
- import {
34
- afterAll,
35
- afterEach,
36
- beforeAll,
37
- beforeEach,
38
- describe,
39
- expect,
40
- it,
41
- vi,
42
- } from "vitest";
43
- import { classify, ExitCode } from "../errors/index.js";
44
- import { writeCursorMarketplace } from "../marketplace/__fixtures__/cursor-marketplace.js";
45
- import { preparePluginPush } from "../resources/plugin.js";
46
- import { buildProgram } from "../program.js";
47
-
48
- let backend: Http2Server;
49
- let port: number;
50
- const openSessions = new Set<ServerHttp2Session>();
51
- let pushes: PushPluginRequest[] = [];
52
-
53
- let home: string;
54
- let fixture: string;
55
- let originalHome: string | undefined;
56
-
57
- beforeAll(async () => {
58
- const routes = (router: ConnectRouter) => {
59
- router.service(PluginCommandController, {
60
- push: (req) => {
61
- pushes.push(req);
62
- return create(PluginSchema, {
63
- metadata: { id: "plg_1", slug: "warmer", org: "acme" },
64
- spec: { name: "warmer", version: "1.0.0" },
65
- status: {
66
- digest: "a".repeat(64),
67
- state: PluginState.READY,
68
- materialized: { skills: 1, agents: 1 },
69
- },
70
- });
71
- },
72
- });
73
- router.service(PluginQueryController, {
74
- listMembers: () =>
75
- create(ListPluginMembersResponseSchema, {
76
- members: [
77
- {
78
- kind: ApiResourceKind.skill,
79
- id: "skl_1",
80
- slug: "warm",
81
- name: "warm",
82
- },
83
- {
84
- kind: ApiResourceKind.agent,
85
- id: "agt_1",
86
- slug: "warmer",
87
- name: "warmer",
88
- },
89
- ],
90
- }),
91
- });
92
- };
93
- backend = createHttp2Server(connectNodeAdapter({ routes }));
94
- backend.on("session", (session) => {
95
- openSessions.add(session);
96
- session.on("close", () => openSessions.delete(session));
97
- });
98
- await new Promise<void>((resolve) => backend.listen(0, "127.0.0.1", resolve));
99
- port = (backend.address() as AddressInfo).port;
100
- });
101
-
102
- afterAll(async () => {
103
- for (const session of openSessions) session.destroy();
104
- await new Promise<void>((resolve) => backend.close(() => resolve()));
105
- });
106
-
107
- /** Every URL the stubbed fetch was asked; raw files answer 404, anything else refuses. */
108
- let fetched: string[] = [];
109
-
110
- beforeEach(() => {
111
- pushes = [];
112
- fetched = [];
113
- vi.stubGlobal("fetch", async (input: RequestInfo | URL) => {
114
- const url = String(input);
115
- fetched.push(url);
116
- if (url.startsWith("https://raw.githubusercontent.com/")) {
117
- return new Response("Not Found", { status: 404 });
118
- }
119
- throw new Error(`unexpected network request in test: ${url}`);
120
- });
121
- originalHome = process.env.HOME;
122
- home = mkdtempSync(join(tmpdir(), "stigmer-install-cmd-"));
123
- fixture = mkdtempSync(join(tmpdir(), "stigmer-install-cmd-fixture-"));
124
- writeCursorMarketplace(fixture);
125
- process.env.HOME = home;
126
- mkdirSync(join(home, ".stigmer"), { recursive: true });
127
- writeFileSync(
128
- join(home, ".stigmer", "config.yaml"),
129
- [
130
- "backend:",
131
- " type: cloud",
132
- "backends:",
133
- " test:",
134
- " type: selfhost",
135
- ` endpoint: 127.0.0.1:${port}`,
136
- "current_backend: test",
137
- "context:",
138
- " organization: acme",
139
- "marketplaces:",
140
- " acme-plugins:",
141
- " type: local",
142
- ` path: ${fixture}`,
143
- "",
144
- ].join("\n"),
145
- );
146
- });
147
-
148
- afterEach(() => {
149
- vi.unstubAllGlobals();
150
- if (originalHome === undefined) delete process.env.HOME;
151
- else process.env.HOME = originalHome;
152
- rmSync(home, { recursive: true, force: true });
153
- rmSync(fixture, { recursive: true, force: true });
154
- });
155
-
156
- interface RunOutcome {
157
- readonly exitCode: number;
158
- readonly message: string;
159
- readonly stdout: string;
160
- }
161
-
162
- /** `stigmer [globals] install <args>`: the program's own flags (`--org`) go before the verb. */
163
- async function run(
164
- args: string[] | string,
165
- ...rest: string[]
166
- ): Promise<RunOutcome> {
167
- const [globals, local] = Array.isArray(args)
168
- ? [args, rest]
169
- : [[], [args, ...rest]];
170
- const program = buildProgram();
171
- program.exitOverride();
172
- let stdout = "";
173
- const outSpy = vi
174
- .spyOn(process.stdout, "write")
175
- .mockImplementation((chunk) => {
176
- stdout += String(chunk);
177
- return true;
178
- });
179
- const errSpy = vi.spyOn(process.stderr, "write").mockReturnValue(true);
180
- try {
181
- await program.parseAsync([
182
- "node",
183
- "stigmer",
184
- ...globals,
185
- "install",
186
- ...local,
187
- ]);
188
- return { exitCode: ExitCode.Success, message: "", stdout };
189
- } catch (err) {
190
- return {
191
- exitCode: classify(err)?.exitCode ?? -1,
192
- message: err instanceof Error ? err.message : String(err),
193
- stdout,
194
- };
195
- } finally {
196
- outSpy.mockRestore();
197
- errSpy.mockRestore();
198
- }
199
- }
200
-
201
- describe("install", () => {
202
- it("pushes the entry's folder as push plugin would, into the context org, and renders the install", async () => {
203
- const outcome = await run("acme-plugins/warmer", "--json");
204
- expect(outcome.exitCode).toBe(ExitCode.Success);
205
- expect(pushes).toHaveLength(1);
206
- const expected = await preparePluginPush(join(fixture, "warmer"));
207
- expect(pushes[0]?.org).toBe("acme");
208
- expect(
209
- Buffer.from(pushes[0]?.artifact ?? []).equals(
210
- Buffer.from(expected.archive),
211
- ),
212
- ).toBe(true);
213
- expect(pushes[0]?.message).toBe(
214
- "installed from marketplace 'acme-plugins'",
215
- );
216
-
217
- const payload = JSON.parse(outcome.stdout);
218
- expect(payload.message).toMatch(
219
- /^Installed plugin 'warmer' \(1 skill, 1 agent\)/,
220
- );
221
- const about = payload.sections.find(
222
- (s: { title: string }) => s.title === "Plugin",
223
- );
224
- expect(about.fields).toContainEqual({
225
- key: "Marketplace",
226
- value: `acme-plugins (${fixture})`,
227
- });
228
- expect(payload.data.members).toHaveLength(2);
229
- });
230
-
231
- it("finds a bare name across the configured marketplaces and honours --org, --visibility and --message", async () => {
232
- const outcome = await run(
233
- ["--org", "other"],
234
- "codeforge",
235
- "--visibility",
236
- "org",
237
- "-m",
238
- "hello",
239
- );
240
- expect(outcome.exitCode).toBe(ExitCode.Success);
241
- expect(pushes[0]?.org).toBe("other");
242
- expect(pushes[0]?.message).toBe("hello");
243
- expect(pushes[0]?.visibility).toBeGreaterThan(0);
244
- });
245
-
246
- it("--dry-run reads the marketplace and describes the plugin without pushing", async () => {
247
- const outcome = await run(
248
- "acme-plugins/warmer@1.0.0",
249
- "--dry-run",
250
- "--json",
251
- );
252
- expect(outcome.exitCode).toBe(ExitCode.Success);
253
- expect(pushes).toHaveLength(0);
254
- const payload = JSON.parse(outcome.stdout);
255
- expect(payload.message).toBe(
256
- "Dry run: 'acme-plugins/warmer' would install plugin 'warmer'",
257
- );
258
- expect(payload.data.plugin.name).toBe("warmer");
259
- });
260
-
261
- it("refuses a version the marketplace does not offer, naming the one it does", async () => {
262
- const outcome = await run("acme-plugins/warmer@9.9.9");
263
- expect(outcome.exitCode).toBe(ExitCode.Usage);
264
- expect(outcome.message).toMatch(
265
- /pins version 9\.9\.9, but the marketplace offers 'warmer' at 1\.0\.0/,
266
- );
267
- expect(pushes).toHaveLength(0);
268
- });
269
-
270
- it("refuses a path toward push plugin, an unknown name, and an unknown marketplace", async () => {
271
- expect((await run("./warmer")).message).toMatch(
272
- /is a path.*stigmer push plugin \.\/warmer/s,
273
- );
274
- expect((await run("nope")).message).toMatch(
275
- /no configured marketplace offers a plugin named 'nope'/,
276
- );
277
- expect((await run("nowhere/warmer")).message).toMatch(
278
- /no marketplace named 'nowhere' is configured/,
279
- );
280
- expect(pushes).toHaveLength(0);
281
- });
282
-
283
- it("refuses a bare name two marketplaces offer, naming each qualified ref", async () => {
284
- const second = mkdtempSync(join(tmpdir(), "stigmer-install-cmd-second-"));
285
- try {
286
- writeCursorMarketplace(second);
287
- const { load, save } = await import("../config/index.js");
288
- const config = load();
289
- save({
290
- ...config,
291
- marketplaces: {
292
- ...config.marketplaces,
293
- second: { type: "local", path: second },
294
- },
295
- });
296
- const outcome = await run("warmer");
297
- expect(outcome.exitCode).toBe(ExitCode.Usage);
298
- expect(outcome.message).toMatch(
299
- /offered by more than one marketplace: acme-plugins, second\n\nName the one you mean: acme-plugins\/warmer or second\/warmer/,
300
- );
301
- // Only the official catalogue is built in, read from the checkout here; no GitHub host was asked.
302
- expect(fetched.filter((url) => url.includes("github"))).toEqual([]);
303
- } finally {
304
- rmSync(second, { recursive: true, force: true });
305
- }
306
- });
307
- });
@@ -1,205 +0,0 @@
1
- // Command-level contract for `stigmer marketplace`: add reads the source once
2
- // and records it under the file's own name (or --name), list is offline and
3
- // names an unreadable entry, show lists what a marketplace offers with each
4
- // entry's version, remove refuses the built-in name. Over the real config
5
- // file (HOME redirected) and a local marketplace fixture; no network.
6
-
7
- import { mkdtempSync, rmSync } from "node:fs";
8
- import { tmpdir } from "node:os";
9
- import { join } from "node:path";
10
- import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
11
- import { load } from "../config/index.js";
12
- import { classify, ExitCode } from "../errors/index.js";
13
- import { writeCursorMarketplace } from "../marketplace/__fixtures__/cursor-marketplace.js";
14
- import { buildProgram } from "../program.js";
15
-
16
- let home: string;
17
- let fixture: string;
18
- let originalHome: string | undefined;
19
-
20
- beforeEach(() => {
21
- originalHome = process.env.HOME;
22
- home = mkdtempSync(join(tmpdir(), "stigmer-marketplace-cmd-"));
23
- fixture = mkdtempSync(join(tmpdir(), "stigmer-marketplace-cmd-fixture-"));
24
- writeCursorMarketplace(fixture);
25
- process.env.HOME = home;
26
- });
27
-
28
- afterEach(() => {
29
- if (originalHome === undefined) delete process.env.HOME;
30
- else process.env.HOME = originalHome;
31
- rmSync(home, { recursive: true, force: true });
32
- rmSync(fixture, { recursive: true, force: true });
33
- });
34
-
35
- interface RunOutcome {
36
- readonly exitCode: number;
37
- readonly message: string;
38
- readonly stdout: string;
39
- readonly stderr: string;
40
- }
41
-
42
- async function run(...args: string[]): Promise<RunOutcome> {
43
- const program = buildProgram();
44
- program.exitOverride();
45
- let stdout = "";
46
- let stderr = "";
47
- const outSpy = vi
48
- .spyOn(process.stdout, "write")
49
- .mockImplementation((chunk) => {
50
- stdout += String(chunk);
51
- return true;
52
- });
53
- const errSpy = vi
54
- .spyOn(process.stderr, "write")
55
- .mockImplementation((chunk) => {
56
- stderr += String(chunk);
57
- return true;
58
- });
59
- try {
60
- await program.parseAsync(["node", "stigmer", "marketplace", ...args]);
61
- return { exitCode: ExitCode.Success, message: "", stdout, stderr };
62
- } catch (err) {
63
- return {
64
- exitCode: classify(err)?.exitCode ?? -1,
65
- message: err instanceof Error ? err.message : String(err),
66
- stdout,
67
- stderr,
68
- };
69
- } finally {
70
- outSpy.mockRestore();
71
- errSpy.mockRestore();
72
- }
73
- }
74
-
75
- describe("marketplace add", () => {
76
- it("reads the source, records it under the file's own name, and says what it offers", async () => {
77
- const outcome = await run("add", fixture, "--json");
78
- expect(outcome.exitCode).toBe(ExitCode.Success);
79
- const payload = JSON.parse(outcome.stdout);
80
- expect(payload.message).toBe(
81
- `Added source 'acme-plugins' (${fixture}), offering 2 plugins`,
82
- );
83
- expect(payload.data).toEqual({
84
- name: "acme-plugins",
85
- source: { type: "local", path: fixture },
86
- plugins: 2,
87
- });
88
- expect(load().marketplaces?.["acme-plugins"]).toEqual({
89
- type: "local",
90
- path: fixture,
91
- });
92
- });
93
-
94
- it("records it under --name instead, and refuses a name outside the grammar", async () => {
95
- expect((await run("add", fixture, "--name", "cursor")).exitCode).toBe(
96
- ExitCode.Success,
97
- );
98
- expect(Object.keys(load().marketplaces ?? {})).toEqual(["cursor"]);
99
- const bad = await run("add", fixture, "--name", "Not Valid");
100
- expect(bad.exitCode).toBe(ExitCode.Usage);
101
- expect(bad.message).toMatch(/'Not Valid' is not a marketplace name/);
102
- });
103
-
104
- it("refuses a directory that is not a marketplace before recording anything", async () => {
105
- const outcome = await run("add", home);
106
- expect(outcome.exitCode).toBe(ExitCode.Usage);
107
- expect(outcome.message).toMatch(/not a marketplace this CLI can read/);
108
- expect(load().marketplaces).toBeUndefined();
109
- });
110
-
111
- it("refuses the built-in name toward --name, takes a vendor's name, and refuses a duplicate", async () => {
112
- expect((await run("add", fixture, "--name", "stigmer")).message).toMatch(
113
- /'stigmer' is a built-in source and cannot be added or replaced[\s\S]*--name/,
114
- );
115
- // A vendor's catalogue is a source the user adds; its name is his to take.
116
- expect((await run("add", fixture, "--name", "cursor-plugins")).exitCode).toBe(
117
- ExitCode.Success,
118
- );
119
- expect(load().marketplaces?.["cursor-plugins"]).toBeDefined();
120
- await run("add", fixture);
121
- expect((await run("add", fixture)).message).toMatch(/already configured/);
122
- });
123
- });
124
-
125
- describe("marketplace list", () => {
126
- it("is offline, the built-in first, and names an entry it cannot read", async () => {
127
- await run("add", fixture);
128
- const { save } = await import("../config/index.js");
129
- const config = load();
130
- save({
131
- ...config,
132
- marketplaces: { ...config.marketplaces, broken: { type: "gitlab" } },
133
- });
134
-
135
- const outcome = await run("list", "--json");
136
- expect(outcome.exitCode).toBe(ExitCode.Success);
137
- const payload = JSON.parse(outcome.stdout);
138
- expect(payload.status).toBe("warning");
139
- expect(payload.data.marketplaces).toEqual([
140
- { name: "stigmer", source: { type: "official" } },
141
- { name: "acme-plugins", source: { type: "local", path: fixture } },
142
- {
143
- name: "broken",
144
- unreadable: "unknown type 'gitlab' (expected 'github' or 'local')",
145
- },
146
- ]);
147
- });
148
- });
149
-
150
- describe("marketplace show", () => {
151
- it("lists the offered plugins with their manifest versions and the entries it could not offer", async () => {
152
- await run("add", fixture);
153
- const outcome = await run("show", "acme-plugins", "--json");
154
- expect(outcome.exitCode).toBe(ExitCode.Success);
155
- const payload = JSON.parse(outcome.stdout);
156
- expect(payload.message).toBe(
157
- "Marketplace 'acme-plugins' offers 2 plugins, with 1 warning",
158
- );
159
- expect(payload.data.plugins).toEqual([
160
- {
161
- name: "warmer",
162
- dir: "warmer",
163
- version: "1.0.0",
164
- description: "The warmer plugin.",
165
- },
166
- { name: "codeforge", dir: "third_party/codeforge", version: "2.1.0" },
167
- ]);
168
- expect(payload.data.warnings).toHaveLength(1);
169
- expect(payload.data.warnings[0].subject).toBe("ghost");
170
- });
171
-
172
- it("shows the built-in marketplace", async () => {
173
- const outcome = await run("show", "stigmer", "--json");
174
- expect(outcome.exitCode).toBe(ExitCode.Success);
175
- const payload = JSON.parse(outcome.stdout);
176
- expect(payload.data.marketplace.name).toBe("stigmer");
177
- expect(payload.data.plugins.map((p: { name: string }) => p.name)).toContain(
178
- "linear",
179
- );
180
- });
181
-
182
- it("refuses an unknown name toward list", async () => {
183
- const outcome = await run("show", "nope");
184
- expect(outcome.exitCode).toBe(ExitCode.Usage);
185
- expect(outcome.message).toMatch(
186
- /no marketplace named 'nope'.*stigmer marketplace list/s,
187
- );
188
- });
189
- });
190
-
191
- describe("marketplace remove", () => {
192
- it("removes an added source and refuses a built-in and an unknown one", async () => {
193
- await run("add", fixture);
194
- expect((await run("remove", "acme-plugins")).exitCode).toBe(
195
- ExitCode.Success,
196
- );
197
- expect(load().marketplaces).toBeUndefined();
198
- expect((await run("remove", "stigmer")).message).toMatch(
199
- /'stigmer' is a built-in source and cannot be removed/,
200
- );
201
- expect((await run("remove", "acme-plugins")).message).toMatch(
202
- /no marketplace named 'acme-plugins'/,
203
- );
204
- });
205
- });
@@ -1,65 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import type { Config } from "../config/config.js";
3
- import { applyConfigEnv, applyFlagsEnv } from "./mcp-server.js";
4
-
5
- describe("applyConfigEnv", () => {
6
- it("points a local backend at the local server", () => {
7
- const env: NodeJS.ProcessEnv = {};
8
- applyConfigEnv({ backend: { type: "local" } }, env);
9
- expect(env.STIGMER_SERVER_ADDRESS).toBe("localhost:7234");
10
- expect(env.STIGMER_API_KEY).toBeUndefined();
11
- });
12
-
13
- it("contributes the cloud endpoint and token", () => {
14
- const env: NodeJS.ProcessEnv = {};
15
- const config: Config = {
16
- backend: { type: "cloud", cloud: { endpoint: "api.stigmer.ai:443", token: "tok-123" } },
17
- };
18
- applyConfigEnv(config, env);
19
- expect(env.STIGMER_SERVER_ADDRESS).toBe("api.stigmer.ai:443");
20
- expect(env.STIGMER_API_KEY).toBe("tok-123");
21
- });
22
-
23
- it("never overrides a value already present in the environment", () => {
24
- const env: NodeJS.ProcessEnv = { STIGMER_SERVER_ADDRESS: "preset:7234" };
25
- applyConfigEnv({ backend: { type: "local" } }, env);
26
- expect(env.STIGMER_SERVER_ADDRESS).toBe("preset:7234");
27
- });
28
- });
29
-
30
- describe("applyFlagsEnv", () => {
31
- it("maps every set flag to its environment variable", () => {
32
- const env: NodeJS.ProcessEnv = {};
33
- applyFlagsEnv(
34
- {
35
- transport: "http",
36
- port: "9090",
37
- serverAddress: "host:7234",
38
- apiKey: "key",
39
- logFormat: "json",
40
- logLevel: "debug",
41
- },
42
- env,
43
- );
44
- expect(env).toMatchObject({
45
- STIGMER_MCP_TRANSPORT: "http",
46
- STIGMER_MCP_HTTP_PORT: "9090",
47
- STIGMER_SERVER_ADDRESS: "host:7234",
48
- STIGMER_API_KEY: "key",
49
- STIGMER_MCP_LOG_FORMAT: "json",
50
- STIGMER_MCP_LOG_LEVEL: "debug",
51
- });
52
- });
53
-
54
- it("overrides config-derived values (flags win)", () => {
55
- const env: NodeJS.ProcessEnv = { STIGMER_SERVER_ADDRESS: "from-config:7234" };
56
- applyFlagsEnv({ serverAddress: "from-flag:7234" }, env);
57
- expect(env.STIGMER_SERVER_ADDRESS).toBe("from-flag:7234");
58
- });
59
-
60
- it("ignores unset flags", () => {
61
- const env: NodeJS.ProcessEnv = {};
62
- applyFlagsEnv({}, env);
63
- expect(Object.keys(env)).toHaveLength(0);
64
- });
65
- });