@stigmer/cli 3.35.0 → 3.37.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,603 +0,0 @@
1
- // In-process integration test for the read verbs (get/list).
2
- //
3
- // Stands up a real Connect backend over h2c serving the query controllers the
4
- // CLI calls, points an SDK node client at it, and drives the resource layer
5
- // (fetchResource / listResources) end to end. Asserts the rendered JSON matches
6
- // the backend's protojson (the parity contract) and that backend RPC errors map
7
- // to the right CLI exit code via classify().
8
-
9
- import { create, toJson } from "@bufbuild/protobuf";
10
- import { timestampFromDate } from "@bufbuild/protobuf/wkt";
11
- import { Code, ConnectError, type ConnectRouter } from "@connectrpc/connect";
12
- import { connectNodeAdapter } from "@connectrpc/connect-node";
13
- import { AgentSchema } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
14
- import { AgentQueryController } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/query_pb";
15
- import { AgentChannelSchema } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/api_pb";
16
- import { AgentChannelQueryController } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/query_pb";
17
- import { AgentChannelInstallState } from "@stigmer/protos/ai/stigmer/agentic/agentchannel/v1/status_pb";
18
- import { AgentInstanceSchema } from "@stigmer/protos/ai/stigmer/agentic/agentinstance/v1/api_pb";
19
- import { AgentInstanceQueryController } from "@stigmer/protos/ai/stigmer/agentic/agentinstance/v1/query_pb";
20
- import { ChannelAppSchema } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/api_pb";
21
- import { ChannelAppQueryController } from "@stigmer/protos/ai/stigmer/agentic/channelapp/v1/query_pb";
22
- import { EnvironmentSchema } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/api_pb";
23
- import { EnvironmentQueryController } from "@stigmer/protos/ai/stigmer/agentic/environment/v1/query_pb";
24
- import { ScheduleSchema } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/api_pb";
25
- import { ScheduleQueryController } from "@stigmer/protos/ai/stigmer/agentic/schedule/v1/query_pb";
26
- import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
27
- import { ApiKeySchema } from "@stigmer/protos/ai/stigmer/iam/apikey/v1/api_pb";
28
- import { ApiKeyQueryController } from "@stigmer/protos/ai/stigmer/iam/apikey/v1/query_pb";
29
- import { SearchResultSchema } from "@stigmer/protos/ai/stigmer/search/v1/io_pb";
30
- import { SearchService } from "@stigmer/protos/ai/stigmer/search/v1/query_pb";
31
- import { OrganizationSchema } from "@stigmer/protos/ai/stigmer/tenancy/organization/v1/api_pb";
32
- import { OrganizationQueryController } from "@stigmer/protos/ai/stigmer/tenancy/organization/v1/query_pb";
33
- import { createNodeClient, normalizeEndpoint } from "@stigmer/sdk/node";
34
- import type { Stigmer } from "@stigmer/sdk";
35
- import { createServer as createHttp2Server, type Http2Server, type ServerHttp2Session } from "node:http2";
36
- import type { AddressInfo } from "node:net";
37
- import { afterAll, beforeAll, describe, expect, it } from "vitest";
38
- import { classify, ExitCode } from "../errors/index.js";
39
- import { fetchResource } from "./get.js";
40
- import { listResources } from "./list.js";
41
- import { renderResource } from "./render.js";
42
-
43
- const knownAgent = create(AgentSchema, {
44
- apiVersion: "agentic.stigmer.ai/v1",
45
- kind: "Agent",
46
- metadata: { name: "Reviewer", slug: "reviewer", org: "acme", id: "agt_1" },
47
- spec: { description: "reviews code" },
48
- });
49
-
50
- const knownInstance = create(AgentInstanceSchema, {
51
- apiVersion: "agentic.stigmer.ai/v1",
52
- kind: "AgentInstance",
53
- metadata: { name: "reviewer-default", slug: "reviewer-default", org: "acme", id: "ain_1" },
54
- spec: { agentId: "agt_1", description: "Default instance (auto-created, no custom configuration)" },
55
- });
56
-
57
- const knownOrg = create(OrganizationSchema, {
58
- apiVersion: "tenancy.stigmer.ai/v1",
59
- kind: "Organization",
60
- metadata: { name: "Acme", slug: "acme", org: "acme", id: "acme" },
61
- });
62
-
63
- const knownApiKey = create(ApiKeySchema, {
64
- apiVersion: "iam.stigmer.ai/v1",
65
- kind: "ApiKey",
66
- metadata: { name: "ci", org: "acme", id: "key_1" },
67
- spec: { fingerprint: "abcd", neverExpires: true },
68
- });
69
-
70
- // Second org/API-key entries so the list tests can pin the
71
- // dispatcher-applied --limit slice — both RPCs are unpaginated (Empty
72
- // request), the exact shape that shipped ignoring the flag when handlers
73
- // owned rendering (stigmer/stigmer#312).
74
- const secondOrg = create(OrganizationSchema, {
75
- apiVersion: "tenancy.stigmer.ai/v1",
76
- kind: "Organization",
77
- metadata: { name: "Beta Clinic", slug: "beta-clinic", org: "beta-clinic", id: "beta-clinic" },
78
- });
79
-
80
- const secondApiKey = create(ApiKeySchema, {
81
- apiVersion: "iam.stigmer.ai/v1",
82
- kind: "ApiKey",
83
- metadata: { name: "local-dev", org: "acme", id: "key_2" },
84
- spec: { fingerprint: "ef01", neverExpires: true },
85
- });
86
-
87
- const knownSearchResult = create(SearchResultSchema, {
88
- kind: ApiResourceKind.agent,
89
- id: "agt_1",
90
- name: "Reviewer",
91
- slug: "reviewer",
92
- qualifiedSlug: "acme/reviewer",
93
- org: "acme",
94
- description: "reviews code",
95
- });
96
-
97
- // The three T07 cutover kinds — wired into get-bindings and list alongside
98
- // this test. environment lists via the SearchService (it is search-indexed);
99
- // the two channel kinds list via their dedicated query RPCs.
100
- const knownEnvironment = create(EnvironmentSchema, {
101
- apiVersion: "agentic.stigmer.ai/v1",
102
- kind: "Environment",
103
- metadata: { name: "clinic-patient-db", slug: "clinic-patient-db", org: "acme", id: "env_1" },
104
- });
105
-
106
- const knownEnvironmentSearchResult = create(SearchResultSchema, {
107
- kind: ApiResourceKind.environment,
108
- id: "env_1",
109
- name: "clinic-patient-db",
110
- slug: "clinic-patient-db",
111
- qualifiedSlug: "acme/clinic-patient-db",
112
- org: "acme",
113
- description: "clinic patient database credentials",
114
- });
115
-
116
- // Spec/status populated to exercise every AGENT_CHANNEL_TABLE column:
117
- // agent_ref, the provider oneof, install_state, and enabled.
118
- const knownChannel = create(AgentChannelSchema, {
119
- apiVersion: "agentic.stigmer.ai/v1",
120
- kind: "AgentChannel",
121
- metadata: { name: "clinic-patient-whatsapp", slug: "clinic-patient-whatsapp", org: "acme", id: "ach_1" },
122
- spec: {
123
- enabled: true,
124
- agentRef: { kind: ApiResourceKind.agent, org: "acme", slug: "clinic-assistant" },
125
- providerConfig: { case: "whatsapp", value: { phoneNumberId: "106540352242922" } },
126
- },
127
- status: { installState: AgentChannelInstallState.installed },
128
- });
129
-
130
- // Secret fields carry the redaction marker, matching what the server's
131
- // RedactChannelApp pipeline returns on every list/get response.
132
- const knownChannelApp = create(ChannelAppSchema, {
133
- apiVersion: "agentic.stigmer.ai/v1",
134
- kind: "ChannelApp",
135
- metadata: { name: "clinic-meta-app", slug: "clinic-meta-app", org: "acme", id: "chapp_1" },
136
- spec: {
137
- providerConfig: {
138
- case: "whatsapp",
139
- value: {
140
- appId: "108954",
141
- appSecret: "***REDACTED***",
142
- accessToken: "***REDACTED***",
143
- verifyToken: "***REDACTED***",
144
- },
145
- },
146
- },
147
- status: { audit: { specAudit: { createdAt: timestampFromDate(new Date("2026-07-20T10:00:00Z")) } } },
148
- });
149
-
150
- // Second entry (slack arm) so the list tests cover both provider derivations
151
- // and the client-side --limit slice (listByOrg has no pagination).
152
- const secondChannelApp = create(ChannelAppSchema, {
153
- apiVersion: "agentic.stigmer.ai/v1",
154
- kind: "ChannelApp",
155
- metadata: { name: "clinic-slack-app", slug: "clinic-slack-app", org: "acme", id: "chapp_2" },
156
- spec: {
157
- providerConfig: {
158
- case: "slack",
159
- value: { clientId: "12.34", clientSecret: "***REDACTED***", signingSecret: "***REDACTED***" },
160
- },
161
- },
162
- });
163
-
164
- // Spec/status populated to exercise every SCHEDULE_TABLE column — and the
165
- // exact condition the table exists to surface (stigmer/stigmer#352): the
166
- // owner's switch is ON (spec.enabled) while the platform's failure latch is
167
- // SET (status.paused_reason), two different states with two different
168
- // remedies.
169
- const pausedSchedule = create(ScheduleSchema, {
170
- apiVersion: "agentic.stigmer.ai/v1",
171
- kind: "Schedule",
172
- metadata: { name: "daily-fee-reminders", slug: "daily-fee-reminders", org: "acme", id: "sch_1" },
173
- spec: {
174
- cron: "0 9 * * *",
175
- timeZone: "Asia/Kolkata",
176
- enabled: true,
177
- target: {
178
- case: "agent",
179
- value: { agentRef: { kind: ApiResourceKind.agent, org: "acme", slug: "clinic-assistant" } },
180
- },
181
- },
182
- status: { pausedReason: "5 consecutive failed runs", consecutiveFailures: 5 },
183
- });
184
-
185
- // Owner-disabled and never fired: empty status, so the row must derive
186
- // "active" from an absent paused_reason and print no bogus timestamps.
187
- const disabledSchedule = create(ScheduleSchema, {
188
- apiVersion: "agentic.stigmer.ai/v1",
189
- kind: "Schedule",
190
- metadata: { name: "weekly-digest", slug: "weekly-digest", org: "acme", id: "sch_2" },
191
- spec: {
192
- cron: "30 6 * * 1",
193
- timeZone: "UTC",
194
- enabled: false,
195
- target: {
196
- case: "agent",
197
- value: { agentRef: { kind: ApiResourceKind.agent, org: "acme", slug: "reviewer" } },
198
- },
199
- },
200
- });
201
-
202
- let backend: Http2Server;
203
- let client: Stigmer;
204
- const openSessions = new Set<ServerHttp2Session>();
205
-
206
- beforeAll(async () => {
207
- const routes = (router: ConnectRouter) => {
208
- router.service(AgentQueryController, {
209
- get: (req) => {
210
- if (req.value !== "agt_1") throw new ConnectError("agent not found", Code.NotFound);
211
- return knownAgent;
212
- },
213
- getByReference: (req) => {
214
- if (req.slug !== "reviewer") throw new ConnectError("agent not found", Code.NotFound);
215
- return knownAgent;
216
- },
217
- });
218
- router.service(AgentInstanceQueryController, {
219
- get: (req) => {
220
- if (req.value !== "ain_1") throw new ConnectError("agent instance not found", Code.NotFound);
221
- return knownInstance;
222
- },
223
- getByReference: (req) => {
224
- if (req.slug !== "reviewer-default") throw new ConnectError("agent instance not found", Code.NotFound);
225
- return knownInstance;
226
- },
227
- list: (req) => {
228
- if (req.org !== "acme") throw new ConnectError("org is required", Code.InvalidArgument);
229
- return { totalCount: 1, items: [knownInstance] };
230
- },
231
- });
232
- router.service(SearchService, {
233
- // Kind-aware: search-backed list sends a single-kind query, so the
234
- // environment arm proves the kind actually rode the request.
235
- search: (req) => {
236
- if (req.kinds.length === 1 && req.kinds[0] === ApiResourceKind.environment) {
237
- return { entries: [knownEnvironmentSearchResult], totalCount: 1, totalPages: 1 };
238
- }
239
- return { entries: [knownSearchResult], totalCount: 1, totalPages: 1 };
240
- },
241
- });
242
- router.service(OrganizationQueryController, {
243
- findMyOrganizations: () => ({ entries: [knownOrg, secondOrg] }),
244
- });
245
- router.service(ApiKeyQueryController, {
246
- findAll: () => ({ entries: [knownApiKey, secondApiKey] }),
247
- });
248
- router.service(EnvironmentQueryController, {
249
- get: (req) => {
250
- if (req.value !== "env_1") throw new ConnectError("environment not found", Code.NotFound);
251
- return knownEnvironment;
252
- },
253
- getByReference: (req) => {
254
- if (req.slug !== "clinic-patient-db") throw new ConnectError("environment not found", Code.NotFound);
255
- return knownEnvironment;
256
- },
257
- });
258
- router.service(AgentChannelQueryController, {
259
- get: (req) => {
260
- if (req.value !== "ach_1") throw new ConnectError("agent channel not found", Code.NotFound);
261
- return knownChannel;
262
- },
263
- getByReference: (req) => {
264
- if (req.slug !== "clinic-patient-whatsapp") throw new ConnectError("agent channel not found", Code.NotFound);
265
- return knownChannel;
266
- },
267
- list: (req) => {
268
- if (req.org !== "acme") throw new ConnectError("org is required", Code.InvalidArgument);
269
- return { totalCount: 1, items: [knownChannel] };
270
- },
271
- });
272
- router.service(ChannelAppQueryController, {
273
- get: (req) => {
274
- if (req.value !== "chapp_1") throw new ConnectError("channel app not found", Code.NotFound);
275
- return knownChannelApp;
276
- },
277
- getByReference: (req) => {
278
- if (req.slug !== "clinic-meta-app") throw new ConnectError("channel app not found", Code.NotFound);
279
- return knownChannelApp;
280
- },
281
- listByOrg: (req) => {
282
- if (req.org !== "acme") throw new ConnectError("org is required", Code.InvalidArgument);
283
- return { entries: [knownChannelApp, secondChannelApp] };
284
- },
285
- });
286
- router.service(ScheduleQueryController, {
287
- get: (req) => {
288
- if (req.value !== "sch_1") throw new ConnectError("schedule not found", Code.NotFound);
289
- return pausedSchedule;
290
- },
291
- getByReference: (req) => {
292
- if (req.slug !== "daily-fee-reminders") throw new ConnectError("schedule not found", Code.NotFound);
293
- return pausedSchedule;
294
- },
295
- list: (req) => {
296
- if (req.org !== "acme") throw new ConnectError("org is required", Code.InvalidArgument);
297
- return { totalCount: 2, items: [pausedSchedule, disabledSchedule] };
298
- },
299
- });
300
- };
301
- backend = createHttp2Server(connectNodeAdapter({ routes }));
302
- backend.on("session", (session) => {
303
- openSessions.add(session);
304
- session.on("close", () => openSessions.delete(session));
305
- });
306
- await new Promise<void>((resolve) => backend.listen(0, "127.0.0.1", resolve));
307
- const port = (backend.address() as AddressInfo).port;
308
- client = createNodeClient({ baseUrl: normalizeEndpoint(`127.0.0.1:${port}`) });
309
- });
310
-
311
- afterAll(async () => {
312
- for (const session of openSessions) session.destroy();
313
- await new Promise<void>((resolve) => backend.close(() => resolve()));
314
- });
315
-
316
- describe("get integration", () => {
317
- it("fetches an agent by org/slug and renders backend protojson", async () => {
318
- const { schema, message } = await fetchResource(client, ApiResourceKind.agent, {
319
- kind: "ref",
320
- org: "acme",
321
- slug: "reviewer",
322
- });
323
- const rendered = JSON.parse(renderResource(schema, message, "json"));
324
- expect(rendered).toEqual(toJson(AgentSchema, knownAgent, { useProtoFieldName: true }));
325
- });
326
-
327
- it("fetches an agent by ID", async () => {
328
- const { message } = await fetchResource(client, ApiResourceKind.agent, { kind: "id", id: "agt_1" });
329
- expect(JSON.parse(renderResource(AgentSchema, message, "json"))).toMatchObject({
330
- metadata: { id: "agt_1" },
331
- });
332
- });
333
-
334
- it("fetches an agent instance by org/slug and renders backend protojson", async () => {
335
- const { schema, message } = await fetchResource(client, ApiResourceKind.agent_instance, {
336
- kind: "ref",
337
- org: "acme",
338
- slug: "reviewer-default",
339
- });
340
- const rendered = JSON.parse(renderResource(schema, message, "json"));
341
- expect(rendered).toEqual(toJson(AgentInstanceSchema, knownInstance, { useProtoFieldName: true }));
342
- });
343
-
344
- it("fetches an agent instance by ID", async () => {
345
- const { message } = await fetchResource(client, ApiResourceKind.agent_instance, { kind: "id", id: "ain_1" });
346
- expect(JSON.parse(renderResource(AgentInstanceSchema, message, "json"))).toMatchObject({
347
- metadata: { id: "ain_1" },
348
- spec: { agent_id: "agt_1" },
349
- });
350
- });
351
-
352
- it("resolves an organization by slug through findMyOrganizations", async () => {
353
- const { message } = await fetchResource(client, ApiResourceKind.organization, {
354
- kind: "ref",
355
- org: "acme",
356
- slug: "acme",
357
- });
358
- expect(JSON.parse(renderResource(OrganizationSchema, message, "json"))).toMatchObject({
359
- metadata: { slug: "acme" },
360
- });
361
- });
362
-
363
- it("fetches an environment by org/slug and renders backend protojson", async () => {
364
- const { schema, message } = await fetchResource(client, ApiResourceKind.environment, {
365
- kind: "ref",
366
- org: "acme",
367
- slug: "clinic-patient-db",
368
- });
369
- const rendered = JSON.parse(renderResource(schema, message, "json"));
370
- expect(rendered).toEqual(toJson(EnvironmentSchema, knownEnvironment, { useProtoFieldName: true }));
371
- });
372
-
373
- it("fetches an environment by ID", async () => {
374
- const { message } = await fetchResource(client, ApiResourceKind.environment, { kind: "id", id: "env_1" });
375
- expect(JSON.parse(renderResource(EnvironmentSchema, message, "json"))).toMatchObject({
376
- metadata: { id: "env_1" },
377
- });
378
- });
379
-
380
- it("fetches an agent channel by org/slug and renders backend protojson", async () => {
381
- const { schema, message } = await fetchResource(client, ApiResourceKind.agent_channel, {
382
- kind: "ref",
383
- org: "acme",
384
- slug: "clinic-patient-whatsapp",
385
- });
386
- const rendered = JSON.parse(renderResource(schema, message, "json"));
387
- expect(rendered).toEqual(toJson(AgentChannelSchema, knownChannel, { useProtoFieldName: true }));
388
- });
389
-
390
- it("fetches an agent channel by ID", async () => {
391
- const { message } = await fetchResource(client, ApiResourceKind.agent_channel, { kind: "id", id: "ach_1" });
392
- expect(JSON.parse(renderResource(AgentChannelSchema, message, "json"))).toMatchObject({
393
- metadata: { id: "ach_1" },
394
- spec: { enabled: true },
395
- });
396
- });
397
-
398
- it("fetches a channel app by org/slug and renders backend protojson", async () => {
399
- const { schema, message } = await fetchResource(client, ApiResourceKind.channel_app, {
400
- kind: "ref",
401
- org: "acme",
402
- slug: "clinic-meta-app",
403
- });
404
- const rendered = JSON.parse(renderResource(schema, message, "json"));
405
- expect(rendered).toEqual(toJson(ChannelAppSchema, knownChannelApp, { useProtoFieldName: true }));
406
- });
407
-
408
- it("fetches a channel app by ID", async () => {
409
- const { message } = await fetchResource(client, ApiResourceKind.channel_app, { kind: "id", id: "chapp_1" });
410
- expect(JSON.parse(renderResource(ChannelAppSchema, message, "json"))).toMatchObject({
411
- metadata: { id: "chapp_1" },
412
- });
413
- });
414
-
415
- it("fetches a schedule by org/slug and renders backend protojson", async () => {
416
- const { schema, message } = await fetchResource(client, ApiResourceKind.schedule, {
417
- kind: "ref",
418
- org: "acme",
419
- slug: "daily-fee-reminders",
420
- });
421
- const rendered = JSON.parse(renderResource(schema, message, "json"));
422
- expect(rendered).toEqual(toJson(ScheduleSchema, pausedSchedule, { useProtoFieldName: true }));
423
- });
424
-
425
- it("fetches a schedule by ID, exposing the pause diagnosis get exists for", async () => {
426
- const { message } = await fetchResource(client, ApiResourceKind.schedule, { kind: "id", id: "sch_1" });
427
- // The full resource is where an operator reads WHY the platform paused
428
- // a schedule (paused_reason + the streak) — the list table only flags it.
429
- expect(JSON.parse(renderResource(ScheduleSchema, message, "json"))).toMatchObject({
430
- metadata: { id: "sch_1" },
431
- spec: { enabled: true },
432
- status: { paused_reason: "5 consecutive failed runs", consecutive_failures: 5 },
433
- });
434
- });
435
-
436
- it("maps a NotFound backend error to ExitCode.NotFound", async () => {
437
- const err = await fetchResource(client, ApiResourceKind.agent, { kind: "id", id: "missing" }).catch((e) => e);
438
- const classified = classify(err);
439
- expect(classified?.exitCode).toBe(ExitCode.NotFound);
440
- });
441
-
442
- it("rejects an unsupported kind with a usage error", async () => {
443
- // session's read verbs are narrowed out of the verb matrix
444
- // (stigmer/stigmer#354): the command layer refuses at the gate, and this
445
- // resource-layer fallback answers anyone bypassing the gate. Wiring
446
- // session get requires BOTH the binding and the matrix line — the
447
- // registry conformance test enforces the pairing.
448
- const err = await fetchResource(client, ApiResourceKind.session, { kind: "id", id: "x" }).catch((e) => e);
449
- expect(classify(err)?.exitCode).toBe(ExitCode.Usage);
450
- });
451
- });
452
-
453
- describe("list integration", () => {
454
- it("lists agents via the search service as JSON", async () => {
455
- const out = await listResources(client, ApiResourceKind.agent, "acme", 50, "json");
456
- expect(JSON.parse(out)).toEqual([toJson(SearchResultSchema, knownSearchResult, { useProtoFieldName: true })]);
457
- });
458
-
459
- it("lists organizations via findMyOrganizations as JSON", async () => {
460
- const out = await listResources(client, ApiResourceKind.organization, "acme", 50, "json");
461
- expect(JSON.parse(out)).toEqual([
462
- toJson(OrganizationSchema, knownOrg, { useProtoFieldName: true }),
463
- toJson(OrganizationSchema, secondOrg, { useProtoFieldName: true }),
464
- ]);
465
- });
466
-
467
- it("applies --limit to organizations (findMyOrganizations has no pagination)", async () => {
468
- const out = await listResources(client, ApiResourceKind.organization, "acme", 1, "json");
469
- expect(JSON.parse(out)).toEqual([toJson(OrganizationSchema, knownOrg, { useProtoFieldName: true })]);
470
- });
471
-
472
- it("lists API keys via findAll as JSON", async () => {
473
- const out = await listResources(client, ApiResourceKind.api_key, "acme", 50, "json");
474
- expect(JSON.parse(out)).toEqual([
475
- toJson(ApiKeySchema, knownApiKey, { useProtoFieldName: true }),
476
- toJson(ApiKeySchema, secondApiKey, { useProtoFieldName: true }),
477
- ]);
478
- });
479
-
480
- it("applies --limit to API keys (findAll has no pagination)", async () => {
481
- const out = await listResources(client, ApiResourceKind.api_key, "acme", 1, "json");
482
- expect(JSON.parse(out)).toEqual([toJson(ApiKeySchema, knownApiKey, { useProtoFieldName: true })]);
483
- });
484
-
485
- it("renders a human table for search-backed lists", async () => {
486
- const out = await listResources(client, ApiResourceKind.agent, "acme", 50, "table");
487
- expect(out).toContain("NAME");
488
- expect(out).toContain("acme/reviewer");
489
- });
490
-
491
- it("lists agent instances via the dedicated list RPC as JSON", async () => {
492
- const out = await listResources(client, ApiResourceKind.agent_instance, "acme", 50, "json");
493
- expect(JSON.parse(out)).toEqual([toJson(AgentInstanceSchema, knownInstance, { useProtoFieldName: true })]);
494
- });
495
-
496
- it("renders a human table for agent instances with their parent agent", async () => {
497
- const out = await listResources(client, ApiResourceKind.agent_instance, "acme", 50, "table");
498
- expect(out).toContain("AGENT");
499
- expect(out).toContain("reviewer-default");
500
- expect(out).toContain("agt_1");
501
- });
502
-
503
- it("lists environments via the search service as JSON", async () => {
504
- const out = await listResources(client, ApiResourceKind.environment, "acme", 50, "json");
505
- expect(JSON.parse(out)).toEqual([
506
- toJson(SearchResultSchema, knownEnvironmentSearchResult, { useProtoFieldName: true }),
507
- ]);
508
- });
509
-
510
- it("renders a human table for environment lists", async () => {
511
- const out = await listResources(client, ApiResourceKind.environment, "acme", 50, "table");
512
- expect(out).toContain("NAME");
513
- expect(out).toContain("acme/clinic-patient-db");
514
- });
515
-
516
- it("lists agent channels via the dedicated list RPC as JSON", async () => {
517
- const out = await listResources(client, ApiResourceKind.agent_channel, "acme", 50, "json");
518
- expect(JSON.parse(out)).toEqual([toJson(AgentChannelSchema, knownChannel, { useProtoFieldName: true })]);
519
- });
520
-
521
- it("renders a human table for agent channels with the serving signals", async () => {
522
- const out = await listResources(client, ApiResourceKind.agent_channel, "acme", 50, "table");
523
- expect(out).toContain("PROVIDER");
524
- expect(out).toContain("STATE");
525
- expect(out).toContain("ENABLED");
526
- expect(out).toContain("acme/clinic-assistant"); // agent_ref as org/slug
527
- expect(out).toContain("whatsapp"); // derived from the provider oneof
528
- expect(out).toContain("installed"); // status.install_state
529
- expect(out).toContain("true"); // spec.enabled
530
- });
531
-
532
- it("lists channel apps via listByOrg as JSON", async () => {
533
- const out = await listResources(client, ApiResourceKind.channel_app, "acme", 50, "json");
534
- expect(JSON.parse(out)).toEqual([
535
- toJson(ChannelAppSchema, knownChannelApp, { useProtoFieldName: true }),
536
- toJson(ChannelAppSchema, secondChannelApp, { useProtoFieldName: true }),
537
- ]);
538
- });
539
-
540
- it("renders a human table for channel apps with provider and created date", async () => {
541
- const out = await listResources(client, ApiResourceKind.channel_app, "acme", 50, "table");
542
- expect(out).toContain("PROVIDER");
543
- expect(out).toContain("whatsapp");
544
- expect(out).toContain("slack");
545
- expect(out).toContain("2026-07-20"); // status.audit.spec_audit.created_at
546
- // Secrets never reach the table (redaction markers stay in json/yaml only).
547
- expect(out).not.toContain("***REDACTED***");
548
- });
549
-
550
- it("applies --limit client-side for channel apps (listByOrg has no pagination)", async () => {
551
- const out = await listResources(client, ApiResourceKind.channel_app, "acme", 1, "json");
552
- expect(JSON.parse(out)).toEqual([toJson(ChannelAppSchema, knownChannelApp, { useProtoFieldName: true })]);
553
- });
554
-
555
- it("lists schedules as a table keeping the owner switch and the platform latch distinct", async () => {
556
- const out = await listResources(client, ApiResourceKind.schedule, "acme", 50, "table");
557
- for (const header of ["ID", "SLUG", "TARGET", "CRON", "TZ", "ENABLED", "STATE"]) {
558
- expect(out).toContain(header);
559
- }
560
- const rows = out.split("\n");
561
- // The stigmer/stigmer#352 condition: enabled by the owner, paused by the
562
- // platform. Collapsing these into one column would hide exactly this.
563
- const pausedRow = rows.find((line) => line.includes("sch_1"));
564
- expect(pausedRow).toContain("acme/clinic-assistant");
565
- expect(pausedRow).toContain("0 9 * * *");
566
- expect(pausedRow).toContain("Asia/Kolkata");
567
- expect(pausedRow).toContain("true");
568
- expect(pausedRow).toContain("paused");
569
- // Owner-disabled with an empty status: derived state is "active" (no
570
- // platform latch), and the absent timestamps render nothing bogus.
571
- const disabledRow = rows.find((line) => line.includes("sch_2"));
572
- expect(disabledRow).toContain("false");
573
- expect(disabledRow).toContain("active");
574
- expect(disabledRow).not.toContain("paused");
575
- });
576
-
577
- it("lists schedules as JSON matching backend protojson", async () => {
578
- const out = await listResources(client, ApiResourceKind.schedule, "acme", 50, "json");
579
- expect(JSON.parse(out)).toEqual([
580
- toJson(ScheduleSchema, pausedSchedule, { useProtoFieldName: true }),
581
- toJson(ScheduleSchema, disabledSchedule, { useProtoFieldName: true }),
582
- ]);
583
- });
584
-
585
- it("refuses to list schedules without an org context, before any RPC", async () => {
586
- // ListSchedulesRequest requires org (min_len 1); an unset cloud context
587
- // resolves to "". The branch refuses with actionable copy instead of
588
- // relaying the server's raw validation error.
589
- const err = await listResources(client, ApiResourceKind.schedule, "", 50, "table").catch((e) => e);
590
- expect(classify(err)?.exitCode).toBe(ExitCode.Usage);
591
- expect(String(err.message)).toContain("--org");
592
- });
593
-
594
- it("rejects a kind whose list is unwired with a usage error", async () => {
595
- // agent_share's read verbs are narrowed out of the verb matrix
596
- // (stigmer/stigmer#354): the command layer refuses at the gate, and this
597
- // resource-layer fallback answers anyone bypassing the gate. Wiring
598
- // agent_share list requires BOTH the LIST_HANDLERS entry and the matrix
599
- // line — the registry conformance test enforces the pairing.
600
- const err = await listResources(client, ApiResourceKind.agent_share, "acme", 50, "json").catch((e) => e);
601
- expect(classify(err)?.exitCode).toBe(ExitCode.Usage);
602
- });
603
- });