@stigmer/cli 0.1.0-dev.20261017064309.g94d062a29f89 → 0.1.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 (760) hide show
  1. package/README.md +5 -4
  2. package/auth/auth0.js +1 -1
  3. package/auth/auth0.js.map +1 -1
  4. package/auth/token.d.ts +26 -4
  5. package/auth/token.d.ts.map +1 -1
  6. package/auth/token.js +120 -24
  7. package/auth/token.js.map +1 -1
  8. package/client/client.d.ts.map +1 -1
  9. package/client/client.js +21 -8
  10. package/client/client.js.map +1 -1
  11. package/command-tree.d.ts +63 -0
  12. package/command-tree.d.ts.map +1 -0
  13. package/command-tree.js +128 -0
  14. package/command-tree.js.map +1 -0
  15. package/commands/access-history/index.d.ts.map +1 -1
  16. package/commands/access-history/index.js +13 -1
  17. package/commands/access-history/index.js.map +1 -1
  18. package/commands/agent-exec-flags.d.ts +2 -0
  19. package/commands/agent-exec-flags.d.ts.map +1 -1
  20. package/commands/agent-exec-flags.js +9 -5
  21. package/commands/agent-exec-flags.js.map +1 -1
  22. package/commands/apikey/duration.d.ts.map +1 -1
  23. package/commands/apikey/duration.js +1 -2
  24. package/commands/apikey/duration.js.map +1 -1
  25. package/commands/apikey/index.d.ts.map +1 -1
  26. package/commands/apikey/index.js +3 -4
  27. package/commands/apikey/index.js.map +1 -1
  28. package/commands/apply.d.ts.map +1 -1
  29. package/commands/apply.js +2 -32
  30. package/commands/apply.js.map +1 -1
  31. package/commands/auth/index.d.ts.map +1 -1
  32. package/commands/auth/index.js +7 -5
  33. package/commands/auth/index.js.map +1 -1
  34. package/commands/auth/whoami.js +1 -1
  35. package/commands/config/index.js +3 -3
  36. package/commands/config/kv.d.ts.map +1 -1
  37. package/commands/config/kv.js +18 -14
  38. package/commands/config/kv.js.map +1 -1
  39. package/commands/connect.d.ts.map +1 -1
  40. package/commands/connect.js +18 -2
  41. package/commands/connect.js.map +1 -1
  42. package/commands/download.d.ts.map +1 -1
  43. package/commands/download.js +81 -54
  44. package/commands/download.js.map +1 -1
  45. package/commands/eval.d.ts.map +1 -1
  46. package/commands/eval.js +17 -19
  47. package/commands/eval.js.map +1 -1
  48. package/commands/file.d.ts +3 -0
  49. package/commands/file.d.ts.map +1 -0
  50. package/commands/file.js +64 -0
  51. package/commands/file.js.map +1 -0
  52. package/commands/get.d.ts.map +1 -1
  53. package/commands/get.js +20 -13
  54. package/commands/get.js.map +1 -1
  55. package/commands/help.d.ts +15 -0
  56. package/commands/help.d.ts.map +1 -0
  57. package/commands/help.js +175 -0
  58. package/commands/help.js.map +1 -0
  59. package/commands/internal-daemon.d.ts.map +1 -1
  60. package/commands/internal-daemon.js +9 -2
  61. package/commands/internal-daemon.js.map +1 -1
  62. package/commands/list.d.ts.map +1 -1
  63. package/commands/list.js +22 -1
  64. package/commands/list.js.map +1 -1
  65. package/commands/logs.js +1 -1
  66. package/commands/logs.js.map +1 -1
  67. package/commands/mcp-server.d.ts +16 -6
  68. package/commands/mcp-server.d.ts.map +1 -1
  69. package/commands/mcp-server.js +51 -26
  70. package/commands/mcp-server.js.map +1 -1
  71. package/commands/provider-key/index.d.ts +3 -0
  72. package/commands/provider-key/index.d.ts.map +1 -0
  73. package/commands/provider-key/index.js +156 -0
  74. package/commands/provider-key/index.js.map +1 -0
  75. package/commands/push.js +8 -8
  76. package/commands/push.js.map +1 -1
  77. package/commands/resume.d.ts.map +1 -1
  78. package/commands/resume.js +17 -11
  79. package/commands/resume.js.map +1 -1
  80. package/commands/routine.d.ts.map +1 -1
  81. package/commands/routine.js +42 -3
  82. package/commands/routine.js.map +1 -1
  83. package/commands/run.d.ts.map +1 -1
  84. package/commands/run.js +34 -15
  85. package/commands/run.js.map +1 -1
  86. package/commands/runs/approve.d.ts.map +1 -1
  87. package/commands/runs/approve.js +10 -2
  88. package/commands/runs/approve.js.map +1 -1
  89. package/commands/runs/control.d.ts.map +1 -1
  90. package/commands/runs/control.js +24 -16
  91. package/commands/runs/control.js.map +1 -1
  92. package/commands/runs/index.d.ts.map +1 -1
  93. package/commands/runs/index.js +1 -2
  94. package/commands/runs/index.js.map +1 -1
  95. package/commands/runs/logs.d.ts.map +1 -1
  96. package/commands/runs/logs.js +7 -4
  97. package/commands/runs/logs.js.map +1 -1
  98. package/commands/runs/to-eval-case.d.ts.map +1 -1
  99. package/commands/runs/to-eval-case.js +13 -4
  100. package/commands/runs/to-eval-case.js.map +1 -1
  101. package/commands/runs/trace.js +1 -1
  102. package/commands/runs/trace.js.map +1 -1
  103. package/commands/search.js +2 -3
  104. package/commands/search.js.map +1 -1
  105. package/commands/service-account/index.d.ts.map +1 -1
  106. package/commands/service-account/index.js +4 -2
  107. package/commands/service-account/index.js.map +1 -1
  108. package/commands/session-help.d.ts +5 -0
  109. package/commands/session-help.d.ts.map +1 -0
  110. package/commands/session-help.js +38 -0
  111. package/commands/session-help.js.map +1 -0
  112. package/commands/setup.js +5 -5
  113. package/commands/setup.js.map +1 -1
  114. package/commands/shared.d.ts +10 -2
  115. package/commands/shared.d.ts.map +1 -1
  116. package/commands/shared.js +30 -3
  117. package/commands/shared.js.map +1 -1
  118. package/commands/tag.d.ts.map +1 -1
  119. package/commands/tag.js +11 -6
  120. package/commands/tag.js.map +1 -1
  121. package/commands/up.d.ts.map +1 -1
  122. package/commands/up.js +51 -21
  123. package/commands/up.js.map +1 -1
  124. package/commands/validate.js +2 -2
  125. package/commands/validate.js.map +1 -1
  126. package/commands/version.d.ts.map +1 -1
  127. package/commands/version.js +8 -4
  128. package/commands/version.js.map +1 -1
  129. package/config/config.d.ts +5 -22
  130. package/config/config.d.ts.map +1 -1
  131. package/config/config.js +56 -47
  132. package/config/config.js.map +1 -1
  133. package/config/index.d.ts +2 -2
  134. package/config/index.d.ts.map +1 -1
  135. package/config/index.js +1 -1
  136. package/config/index.js.map +1 -1
  137. package/config/keys.js +4 -4
  138. package/config/keys.js.map +1 -1
  139. package/config/paths.js +2 -2
  140. package/config/paths.js.map +1 -1
  141. package/config/resolve.d.ts +12 -2
  142. package/config/resolve.d.ts.map +1 -1
  143. package/config/resolve.js +18 -8
  144. package/config/resolve.js.map +1 -1
  145. package/errors/classify.d.ts +20 -0
  146. package/errors/classify.d.ts.map +1 -1
  147. package/errors/classify.js +97 -21
  148. package/errors/classify.js.map +1 -1
  149. package/errors/command-line.d.ts +14 -0
  150. package/errors/command-line.d.ts.map +1 -0
  151. package/errors/command-line.js +90 -0
  152. package/errors/command-line.js.map +1 -0
  153. package/errors/handle.js +2 -2
  154. package/errors/handle.js.map +1 -1
  155. package/errors/index.d.ts +2 -2
  156. package/errors/index.d.ts.map +1 -1
  157. package/errors/index.js +12 -2
  158. package/errors/index.js.map +1 -1
  159. package/errors/usage-error.js +1 -1
  160. package/errors/usage-error.js.map +1 -1
  161. package/global-options.d.ts +35 -0
  162. package/global-options.d.ts.map +1 -0
  163. package/global-options.js +81 -0
  164. package/global-options.js.map +1 -0
  165. package/local/artifact.d.ts +1 -20
  166. package/local/artifact.d.ts.map +1 -1
  167. package/local/artifact.js +35 -117
  168. package/local/artifact.js.map +1 -1
  169. package/local/constants.d.ts +3 -9
  170. package/local/constants.d.ts.map +1 -1
  171. package/local/constants.js +3 -9
  172. package/local/constants.js.map +1 -1
  173. package/local/daemon/components.d.ts +18 -5
  174. package/local/daemon/components.d.ts.map +1 -1
  175. package/local/daemon/components.js +61 -23
  176. package/local/daemon/components.js.map +1 -1
  177. package/local/daemon/env.d.ts +1 -5
  178. package/local/daemon/env.d.ts.map +1 -1
  179. package/local/daemon/env.js +0 -2
  180. package/local/daemon/env.js.map +1 -1
  181. package/local/daemon/host.d.ts +5 -0
  182. package/local/daemon/host.d.ts.map +1 -1
  183. package/local/daemon/host.js +68 -21
  184. package/local/daemon/host.js.map +1 -1
  185. package/local/daemon/index.d.ts +2 -1
  186. package/local/daemon/index.d.ts.map +1 -1
  187. package/local/daemon/index.js +2 -1
  188. package/local/daemon/index.js.map +1 -1
  189. package/local/daemon/launch.d.ts +58 -9
  190. package/local/daemon/launch.d.ts.map +1 -1
  191. package/local/daemon/launch.js +210 -64
  192. package/local/daemon/launch.js.map +1 -1
  193. package/local/daemon/process.d.ts +11 -7
  194. package/local/daemon/process.d.ts.map +1 -1
  195. package/local/daemon/process.js +74 -38
  196. package/local/daemon/process.js.map +1 -1
  197. package/local/daemon/signals.d.ts +3 -0
  198. package/local/daemon/signals.d.ts.map +1 -0
  199. package/local/daemon/signals.js +19 -0
  200. package/local/daemon/signals.js.map +1 -0
  201. package/local/daemon/supervisor.d.ts +9 -2
  202. package/local/daemon/supervisor.d.ts.map +1 -1
  203. package/local/daemon/supervisor.js +81 -22
  204. package/local/daemon/supervisor.js.map +1 -1
  205. package/local/daemon/types.d.ts +6 -1
  206. package/local/daemon/types.d.ts.map +1 -1
  207. package/local/daemon/types.js +2 -3
  208. package/local/daemon/types.js.map +1 -1
  209. package/local/llm-config.d.ts +4 -2
  210. package/local/llm-config.d.ts.map +1 -1
  211. package/local/llm-config.js +15 -9
  212. package/local/llm-config.js.map +1 -1
  213. package/local/logs/view.d.ts.map +1 -1
  214. package/local/logs/view.js +5 -6
  215. package/local/logs/view.js.map +1 -1
  216. package/local/net/tcp.d.ts +8 -6
  217. package/local/net/tcp.d.ts.map +1 -1
  218. package/local/net/tcp.js +13 -8
  219. package/local/net/tcp.js.map +1 -1
  220. package/local/paths.d.ts +1 -1
  221. package/local/paths.d.ts.map +1 -1
  222. package/local/paths.js +2 -3
  223. package/local/paths.js.map +1 -1
  224. package/local/provider-reach.d.ts +18 -0
  225. package/local/provider-reach.d.ts.map +1 -0
  226. package/local/provider-reach.js +109 -0
  227. package/local/provider-reach.js.map +1 -0
  228. package/local/reset.d.ts.map +1 -1
  229. package/local/reset.js +1 -2
  230. package/local/reset.js.map +1 -1
  231. package/local/runtime/index.d.ts.map +1 -1
  232. package/local/runtime/index.js +1 -2
  233. package/local/runtime/index.js.map +1 -1
  234. package/local/runtime/node.js +1 -1
  235. package/local/runtime/runner.js +2 -2
  236. package/local/runtime/runner.js.map +1 -1
  237. package/local/runtime/runtimes-install.js +1 -1
  238. package/local/runtime/server.d.ts.map +1 -1
  239. package/local/runtime/server.js +2 -4
  240. package/local/runtime/server.js.map +1 -1
  241. package/local/runtime/which.js +1 -1
  242. package/local/runtime/which.js.map +1 -1
  243. package/local/setup/wizard.d.ts +1 -1
  244. package/local/setup/wizard.d.ts.map +1 -1
  245. package/local/setup/wizard.js +7 -5
  246. package/local/setup/wizard.js.map +1 -1
  247. package/local/state/health-state.d.ts +6 -0
  248. package/local/state/health-state.d.ts.map +1 -1
  249. package/local/state/health-state.js +6 -2
  250. package/local/state/health-state.js.map +1 -1
  251. package/local/state/lock.d.ts +3 -2
  252. package/local/state/lock.d.ts.map +1 -1
  253. package/local/state/lock.js +26 -28
  254. package/local/state/lock.js.map +1 -1
  255. package/local/state/log-rotation.d.ts.map +1 -1
  256. package/local/state/log-rotation.js +2 -3
  257. package/local/state/log-rotation.js.map +1 -1
  258. package/local/state/pidfile.d.ts +24 -1
  259. package/local/state/pidfile.d.ts.map +1 -1
  260. package/local/state/pidfile.js +54 -6
  261. package/local/state/pidfile.js.map +1 -1
  262. package/local/state/proc.d.ts +31 -0
  263. package/local/state/proc.d.ts.map +1 -1
  264. package/local/state/proc.js +98 -1
  265. package/local/state/proc.js.map +1 -1
  266. package/local/state/startup-config.d.ts +2 -2
  267. package/local/status.d.ts +2 -4
  268. package/local/status.d.ts.map +1 -1
  269. package/local/status.js +26 -41
  270. package/local/status.js.map +1 -1
  271. package/local/temporal/download.d.ts +9 -5
  272. package/local/temporal/download.d.ts.map +1 -1
  273. package/local/temporal/download.js +29 -8
  274. package/local/temporal/download.js.map +1 -1
  275. package/local/temporal/index.d.ts +1 -1
  276. package/local/temporal/index.d.ts.map +1 -1
  277. package/local/temporal/index.js +1 -1
  278. package/local/temporal/index.js.map +1 -1
  279. package/local/temporal/manager.d.ts +31 -5
  280. package/local/temporal/manager.d.ts.map +1 -1
  281. package/local/temporal/manager.js +74 -35
  282. package/local/temporal/manager.js.map +1 -1
  283. package/local/temporal/supervisor.js +1 -1
  284. package/local/temporal/supervisor.js.map +1 -1
  285. package/local/webconsole/index.d.ts +5 -2
  286. package/local/webconsole/index.d.ts.map +1 -1
  287. package/local/webconsole/index.js +8 -6
  288. package/local/webconsole/index.js.map +1 -1
  289. package/marketplace/github.js +1 -1
  290. package/marketplace/github.js.map +1 -1
  291. package/marketplace/official.js +1 -1
  292. package/marketplace/official.js.map +1 -1
  293. package/output/command-result.d.ts +6 -0
  294. package/output/command-result.d.ts.map +1 -1
  295. package/output/command-result.js +13 -2
  296. package/output/command-result.js.map +1 -1
  297. package/output/confirm.d.ts.map +1 -1
  298. package/output/confirm.js +2 -3
  299. package/output/confirm.js.map +1 -1
  300. package/output/format.d.ts.map +1 -1
  301. package/output/format.js +5 -6
  302. package/output/format.js.map +1 -1
  303. package/output/index.d.ts +2 -2
  304. package/output/index.d.ts.map +1 -1
  305. package/output/index.js +2 -2
  306. package/output/index.js.map +1 -1
  307. package/output/printable.d.ts +8 -0
  308. package/output/printable.d.ts.map +1 -0
  309. package/output/printable.js +24 -0
  310. package/output/printable.js.map +1 -0
  311. package/output/proto.d.ts.map +1 -1
  312. package/output/proto.js +3 -4
  313. package/output/proto.js.map +1 -1
  314. package/output/style.js +2 -2
  315. package/output/style.js.map +1 -1
  316. package/output/table.d.ts +20 -1
  317. package/output/table.d.ts.map +1 -1
  318. package/output/table.js +75 -17
  319. package/output/table.js.map +1 -1
  320. package/package.json +13 -10
  321. package/program.d.ts +0 -14
  322. package/program.d.ts.map +1 -1
  323. package/program.js +57 -119
  324. package/program.js.map +1 -1
  325. package/registry/aliases.d.ts.map +1 -1
  326. package/registry/aliases.js +0 -3
  327. package/registry/aliases.js.map +1 -1
  328. package/registry/index.d.ts +1 -1
  329. package/registry/index.d.ts.map +1 -1
  330. package/registry/index.js +1 -1
  331. package/registry/index.js.map +1 -1
  332. package/registry/metadata.d.ts +0 -15
  333. package/registry/metadata.d.ts.map +1 -1
  334. package/registry/metadata.js +16 -57
  335. package/registry/metadata.js.map +1 -1
  336. package/registry/registry.d.ts +1 -5
  337. package/registry/registry.d.ts.map +1 -1
  338. package/registry/registry.js +3 -11
  339. package/registry/registry.js.map +1 -1
  340. package/registry/verb-support.d.ts.map +1 -1
  341. package/registry/verb-support.js +28 -5
  342. package/registry/verb-support.js.map +1 -1
  343. package/resources/agent/quality.d.ts +10 -5
  344. package/resources/agent/quality.d.ts.map +1 -1
  345. package/resources/agent/quality.js +19 -9
  346. package/resources/agent/quality.js.map +1 -1
  347. package/resources/agent/resolve.js +3 -3
  348. package/resources/agent/resolve.js.map +1 -1
  349. package/resources/apply/apply.d.ts +4 -3
  350. package/resources/apply/apply.d.ts.map +1 -1
  351. package/resources/apply/apply.js +54 -41
  352. package/resources/apply/apply.js.map +1 -1
  353. package/resources/apply/handlers.d.ts.map +1 -1
  354. package/resources/apply/handlers.js +3 -4
  355. package/resources/apply/handlers.js.map +1 -1
  356. package/resources/channel.d.ts.map +1 -1
  357. package/resources/channel.js +3 -4
  358. package/resources/channel.js.map +1 -1
  359. package/resources/connect/connect.js +2 -2
  360. package/resources/connect/connect.js.map +1 -1
  361. package/resources/delete.d.ts.map +1 -1
  362. package/resources/delete.js +38 -4
  363. package/resources/delete.js.map +1 -1
  364. package/resources/documents.js +1 -1
  365. package/resources/documents.js.map +1 -1
  366. package/resources/download.d.ts +43 -3
  367. package/resources/download.d.ts.map +1 -1
  368. package/resources/download.js +169 -34
  369. package/resources/download.js.map +1 -1
  370. package/resources/eval-run/options.d.ts +3 -1
  371. package/resources/eval-run/options.d.ts.map +1 -1
  372. package/resources/eval-run/options.js +36 -18
  373. package/resources/eval-run/options.js.map +1 -1
  374. package/resources/eval-run/report.d.ts +4 -2
  375. package/resources/eval-run/report.d.ts.map +1 -1
  376. package/resources/eval-run/report.js +9 -7
  377. package/resources/eval-run/report.js.map +1 -1
  378. package/resources/eval-run/run.d.ts +2 -1
  379. package/resources/eval-run/run.d.ts.map +1 -1
  380. package/resources/eval-run/run.js +13 -7
  381. package/resources/eval-run/run.js.map +1 -1
  382. package/resources/file.d.ts +27 -0
  383. package/resources/file.d.ts.map +1 -0
  384. package/resources/file.js +82 -0
  385. package/resources/file.js.map +1 -0
  386. package/resources/get-bindings.d.ts.map +1 -1
  387. package/resources/get-bindings.js +18 -0
  388. package/resources/get-bindings.js.map +1 -1
  389. package/resources/git.d.ts +1 -1
  390. package/resources/git.js +1 -1
  391. package/resources/list.d.ts +21 -2
  392. package/resources/list.d.ts.map +1 -1
  393. package/resources/list.js +148 -31
  394. package/resources/list.js.map +1 -1
  395. package/resources/plugin.d.ts.map +1 -1
  396. package/resources/plugin.js +4 -0
  397. package/resources/plugin.js.map +1 -1
  398. package/resources/provider-key.d.ts +81 -0
  399. package/resources/provider-key.d.ts.map +1 -0
  400. package/resources/provider-key.js +261 -0
  401. package/resources/provider-key.js.map +1 -0
  402. package/resources/reference.d.ts +15 -21
  403. package/resources/reference.d.ts.map +1 -1
  404. package/resources/reference.js +42 -88
  405. package/resources/reference.js.map +1 -1
  406. package/resources/render.d.ts +31 -7
  407. package/resources/render.d.ts.map +1 -1
  408. package/resources/render.js +66 -38
  409. package/resources/render.js.map +1 -1
  410. package/resources/routine.d.ts +21 -5
  411. package/resources/routine.d.ts.map +1 -1
  412. package/resources/routine.js +104 -15
  413. package/resources/routine.js.map +1 -1
  414. package/resources/run/agent-exec.d.ts +12 -2
  415. package/resources/run/agent-exec.d.ts.map +1 -1
  416. package/resources/run/agent-exec.js +85 -38
  417. package/resources/run/agent-exec.js.map +1 -1
  418. package/resources/run/create.d.ts +16 -12
  419. package/resources/run/create.d.ts.map +1 -1
  420. package/resources/run/create.js +14 -15
  421. package/resources/run/create.js.map +1 -1
  422. package/resources/run/engines.d.ts +32 -0
  423. package/resources/run/engines.d.ts.map +1 -0
  424. package/resources/run/engines.js +39 -0
  425. package/resources/run/engines.js.map +1 -0
  426. package/resources/run/environment.d.ts +11 -0
  427. package/resources/run/environment.d.ts.map +1 -0
  428. package/resources/run/environment.js +30 -0
  429. package/resources/run/environment.js.map +1 -0
  430. package/resources/run/epilogue.d.ts +1 -1
  431. package/resources/run/epilogue.d.ts.map +1 -1
  432. package/resources/run/epilogue.js +18 -19
  433. package/resources/run/epilogue.js.map +1 -1
  434. package/resources/run/files.d.ts +104 -0
  435. package/resources/run/files.d.ts.map +1 -0
  436. package/resources/run/files.js +316 -0
  437. package/resources/run/files.js.map +1 -0
  438. package/resources/run/header.d.ts +11 -9
  439. package/resources/run/header.d.ts.map +1 -1
  440. package/resources/run/header.js +14 -14
  441. package/resources/run/header.js.map +1 -1
  442. package/resources/run/prepare.d.ts +31 -25
  443. package/resources/run/prepare.d.ts.map +1 -1
  444. package/resources/run/prepare.js +42 -51
  445. package/resources/run/prepare.js.map +1 -1
  446. package/resources/run/references.d.ts.map +1 -1
  447. package/resources/run/references.js +6 -5
  448. package/resources/run/references.js.map +1 -1
  449. package/resources/run/resolve.js +1 -1
  450. package/resources/run/resolve.js.map +1 -1
  451. package/resources/run/resume.d.ts +3 -1
  452. package/resources/run/resume.d.ts.map +1 -1
  453. package/resources/run/resume.js +25 -10
  454. package/resources/run/resume.js.map +1 -1
  455. package/resources/run/stream.d.ts +34 -2
  456. package/resources/run/stream.d.ts.map +1 -1
  457. package/resources/run/stream.js +92 -8
  458. package/resources/run/stream.js.map +1 -1
  459. package/resources/run/workspace.d.ts +9 -12
  460. package/resources/run/workspace.d.ts.map +1 -1
  461. package/resources/run/workspace.js +29 -36
  462. package/resources/run/workspace.js.map +1 -1
  463. package/resources/run-approve.d.ts.map +1 -1
  464. package/resources/run-approve.js +2 -11
  465. package/resources/run-approve.js.map +1 -1
  466. package/resources/run-control.d.ts +3 -3
  467. package/resources/run-control.d.ts.map +1 -1
  468. package/resources/run-control.js +4 -5
  469. package/resources/run-control.js.map +1 -1
  470. package/resources/run-format.d.ts +2 -2
  471. package/resources/run-format.d.ts.map +1 -1
  472. package/resources/run-format.js +3 -4
  473. package/resources/run-format.js.map +1 -1
  474. package/resources/run-logs.d.ts +2 -0
  475. package/resources/run-logs.d.ts.map +1 -1
  476. package/resources/run-logs.js +16 -6
  477. package/resources/run-logs.js.map +1 -1
  478. package/resources/run-scores.d.ts +6 -2
  479. package/resources/run-scores.d.ts.map +1 -1
  480. package/resources/run-scores.js +7 -4
  481. package/resources/run-scores.js.map +1 -1
  482. package/resources/run-to-eval-case.js +2 -2
  483. package/resources/run-to-eval-case.js.map +1 -1
  484. package/resources/runs.d.ts +3 -3
  485. package/resources/runs.d.ts.map +1 -1
  486. package/resources/runs.js +5 -5
  487. package/resources/runs.js.map +1 -1
  488. package/resources/search.d.ts.map +1 -1
  489. package/resources/search.js +1 -2
  490. package/resources/search.js.map +1 -1
  491. package/resources/service-account.d.ts +2 -0
  492. package/resources/service-account.d.ts.map +1 -1
  493. package/resources/service-account.js +3 -1
  494. package/resources/service-account.js.map +1 -1
  495. package/resources/session.d.ts +4 -3
  496. package/resources/session.d.ts.map +1 -1
  497. package/resources/session.js +10 -7
  498. package/resources/session.js.map +1 -1
  499. package/resources/skill.d.ts +1 -1
  500. package/resources/skill.d.ts.map +1 -1
  501. package/resources/skill.js +7 -8
  502. package/resources/skill.js.map +1 -1
  503. package/resources/stream/answer.d.ts +1 -2
  504. package/resources/stream/answer.d.ts.map +1 -1
  505. package/resources/stream/answer.js +3 -16
  506. package/resources/stream/answer.js.map +1 -1
  507. package/resources/stream/composer.d.ts +16 -0
  508. package/resources/stream/composer.d.ts.map +1 -0
  509. package/resources/stream/composer.js +171 -0
  510. package/resources/stream/composer.js.map +1 -0
  511. package/resources/stream/ink.d.ts +20 -4
  512. package/resources/stream/ink.d.ts.map +1 -1
  513. package/resources/stream/ink.js +34 -3
  514. package/resources/stream/ink.js.map +1 -1
  515. package/resources/stream/render-plaintext.d.ts +1 -0
  516. package/resources/stream/render-plaintext.d.ts.map +1 -1
  517. package/resources/stream/render-plaintext.js +21 -4
  518. package/resources/stream/render-plaintext.js.map +1 -1
  519. package/resources/stream/tty.js +1 -1
  520. package/resources/stream/tty.js.map +1 -1
  521. package/resources/tag.d.ts.map +1 -1
  522. package/resources/tag.js +7 -8
  523. package/resources/tag.js.map +1 -1
  524. package/resources/usage.d.ts +3 -2
  525. package/resources/usage.d.ts.map +1 -1
  526. package/resources/usage.js +19 -16
  527. package/resources/usage.js.map +1 -1
  528. package/resources/validate.d.ts.map +1 -1
  529. package/resources/validate.js +1 -12
  530. package/resources/validate.js.map +1 -1
  531. package/resources/version.d.ts +17 -3
  532. package/resources/version.d.ts.map +1 -1
  533. package/resources/version.js +105 -14
  534. package/resources/version.js.map +1 -1
  535. package/resources/views/agent.d.ts +3 -0
  536. package/resources/views/agent.d.ts.map +1 -0
  537. package/resources/views/agent.js +54 -0
  538. package/resources/views/agent.js.map +1 -0
  539. package/resources/views/environment.d.ts +3 -0
  540. package/resources/views/environment.d.ts.map +1 -0
  541. package/resources/views/environment.js +37 -0
  542. package/resources/views/environment.js.map +1 -0
  543. package/resources/views/index.d.ts +22 -0
  544. package/resources/views/index.d.ts.map +1 -0
  545. package/resources/views/index.js +70 -0
  546. package/resources/views/index.js.map +1 -0
  547. package/resources/views/organization.d.ts +3 -0
  548. package/resources/views/organization.d.ts.map +1 -0
  549. package/resources/views/organization.js +27 -0
  550. package/resources/views/organization.js.map +1 -0
  551. package/resources/views/routine.d.ts +3 -0
  552. package/resources/views/routine.d.ts.map +1 -0
  553. package/resources/views/routine.js +37 -0
  554. package/resources/views/routine.js.map +1 -0
  555. package/resources/views/run.d.ts +3 -0
  556. package/resources/views/run.d.ts.map +1 -0
  557. package/resources/views/run.js +45 -0
  558. package/resources/views/run.js.map +1 -0
  559. package/resources/views/session.d.ts +5 -0
  560. package/resources/views/session.d.ts.map +1 -0
  561. package/resources/views/session.js +85 -0
  562. package/resources/views/session.js.map +1 -0
  563. package/resources/views/skill.d.ts +5 -0
  564. package/resources/views/skill.d.ts.map +1 -0
  565. package/resources/views/skill.js +48 -0
  566. package/resources/views/skill.js.map +1 -0
  567. package/resources/views/view.d.ts +66 -0
  568. package/resources/views/view.d.ts.map +1 -0
  569. package/resources/views/view.js +130 -0
  570. package/resources/views/view.js.map +1 -0
  571. package/resources/views/words.d.ts +52 -0
  572. package/resources/views/words.d.ts.map +1 -0
  573. package/resources/views/words.js +190 -0
  574. package/resources/views/words.js.map +1 -0
  575. package/runtime.d.ts +22 -0
  576. package/runtime.d.ts.map +1 -1
  577. package/runtime.js +33 -2
  578. package/runtime.js.map +1 -1
  579. package/src/auth/auth0.ts +1 -1
  580. package/src/auth/token.ts +136 -26
  581. package/src/client/client.ts +23 -16
  582. package/src/command-tree.ts +152 -0
  583. package/src/commands/access-history/index.ts +15 -2
  584. package/src/commands/agent-exec-flags.ts +11 -5
  585. package/src/commands/apikey/duration.ts +1 -2
  586. package/src/commands/apikey/index.ts +3 -4
  587. package/src/commands/apply.ts +3 -22
  588. package/src/commands/auth/index.ts +7 -5
  589. package/src/commands/auth/whoami.ts +1 -1
  590. package/src/commands/config/index.ts +3 -3
  591. package/src/commands/config/kv.ts +18 -14
  592. package/src/commands/connect.ts +21 -3
  593. package/src/commands/download.ts +106 -62
  594. package/src/commands/eval.ts +22 -21
  595. package/src/commands/file.ts +80 -0
  596. package/src/commands/get.ts +19 -13
  597. package/src/commands/help.ts +182 -0
  598. package/src/commands/internal-daemon.ts +9 -2
  599. package/src/commands/list.ts +22 -1
  600. package/src/commands/logs.ts +1 -1
  601. package/src/commands/mcp-server.ts +57 -28
  602. package/src/commands/provider-key/index.ts +192 -0
  603. package/src/commands/push.ts +8 -8
  604. package/src/commands/resume.ts +20 -12
  605. package/src/commands/routine.ts +58 -5
  606. package/src/commands/run.ts +37 -17
  607. package/src/commands/runs/approve.ts +13 -4
  608. package/src/commands/runs/control.ts +50 -27
  609. package/src/commands/runs/index.ts +1 -2
  610. package/src/commands/runs/logs.ts +9 -5
  611. package/src/commands/runs/to-eval-case.ts +18 -6
  612. package/src/commands/runs/trace.ts +1 -1
  613. package/src/commands/search.ts +2 -3
  614. package/src/commands/service-account/index.ts +7 -2
  615. package/src/commands/session-help.ts +39 -0
  616. package/src/commands/setup.ts +5 -5
  617. package/src/commands/shared.ts +32 -3
  618. package/src/commands/tag.ts +13 -7
  619. package/src/commands/up.ts +55 -21
  620. package/src/commands/validate.ts +2 -2
  621. package/src/commands/version.ts +9 -4
  622. package/src/config/config.ts +66 -69
  623. package/src/config/index.ts +1 -2
  624. package/src/config/keys.ts +4 -4
  625. package/src/config/paths.ts +2 -2
  626. package/src/config/resolve.ts +20 -8
  627. package/src/errors/classify.ts +110 -21
  628. package/src/errors/command-line.ts +95 -0
  629. package/src/errors/handle.ts +2 -2
  630. package/src/errors/index.ts +12 -2
  631. package/src/errors/usage-error.ts +1 -1
  632. package/src/global-options.ts +100 -0
  633. package/src/local/artifact.ts +46 -140
  634. package/src/local/constants.ts +3 -9
  635. package/src/local/daemon/components.ts +78 -22
  636. package/src/local/daemon/env.ts +3 -8
  637. package/src/local/daemon/host.ts +64 -19
  638. package/src/local/daemon/index.ts +2 -1
  639. package/src/local/daemon/launch.ts +251 -72
  640. package/src/local/daemon/process.ts +78 -46
  641. package/src/local/daemon/signals.ts +19 -0
  642. package/src/local/daemon/supervisor.ts +84 -21
  643. package/src/local/daemon/types.ts +8 -4
  644. package/src/local/llm-config.ts +15 -9
  645. package/src/local/logs/view.ts +5 -6
  646. package/src/local/net/tcp.ts +18 -11
  647. package/src/local/paths.ts +2 -3
  648. package/src/local/provider-reach.ts +124 -0
  649. package/src/local/reset.ts +1 -2
  650. package/src/local/runtime/index.ts +1 -2
  651. package/src/local/runtime/node.ts +1 -1
  652. package/src/local/runtime/runner.ts +2 -2
  653. package/src/local/runtime/runtimes-install.ts +1 -1
  654. package/src/local/runtime/server.ts +2 -4
  655. package/src/local/runtime/which.ts +1 -1
  656. package/src/local/setup/wizard.ts +7 -5
  657. package/src/local/state/health-state.ts +10 -2
  658. package/src/local/state/lock.ts +26 -28
  659. package/src/local/state/log-rotation.ts +2 -3
  660. package/src/local/state/pidfile.ts +61 -6
  661. package/src/local/state/proc.ts +104 -1
  662. package/src/local/state/startup-config.ts +2 -2
  663. package/src/local/status.ts +30 -41
  664. package/src/local/temporal/download.ts +31 -9
  665. package/src/local/temporal/index.ts +1 -1
  666. package/src/local/temporal/manager.ts +94 -34
  667. package/src/local/temporal/supervisor.ts +1 -1
  668. package/src/local/webconsole/index.ts +8 -5
  669. package/src/marketplace/github.ts +1 -1
  670. package/src/marketplace/official.ts +1 -1
  671. package/src/output/command-result.ts +14 -2
  672. package/src/output/confirm.ts +2 -3
  673. package/src/output/format.ts +5 -6
  674. package/src/output/index.ts +8 -1
  675. package/src/output/printable.ts +26 -0
  676. package/src/output/proto.ts +3 -4
  677. package/src/output/style.ts +2 -2
  678. package/src/output/table.ts +118 -15
  679. package/src/program.ts +58 -128
  680. package/src/registry/aliases.ts +0 -3
  681. package/src/registry/index.ts +0 -1
  682. package/src/registry/metadata.ts +16 -64
  683. package/src/registry/registry.ts +3 -13
  684. package/src/registry/verb-support.ts +28 -5
  685. package/src/resources/agent/quality.ts +29 -8
  686. package/src/resources/agent/resolve.ts +3 -3
  687. package/src/resources/apply/apply.ts +58 -49
  688. package/src/resources/apply/handlers.ts +3 -4
  689. package/src/resources/channel.ts +3 -4
  690. package/src/resources/connect/connect.ts +2 -2
  691. package/src/resources/delete.ts +44 -4
  692. package/src/resources/documents.ts +1 -1
  693. package/src/resources/download.ts +239 -43
  694. package/src/resources/eval-run/options.ts +38 -17
  695. package/src/resources/eval-run/report.ts +11 -5
  696. package/src/resources/eval-run/run.ts +13 -9
  697. package/src/resources/file.ts +114 -0
  698. package/src/resources/get-bindings.ts +18 -0
  699. package/src/resources/git.ts +1 -1
  700. package/src/resources/list.ts +178 -34
  701. package/src/resources/plugin.ts +3 -0
  702. package/src/resources/provider-key.ts +327 -0
  703. package/src/resources/reference.ts +41 -85
  704. package/src/resources/render.ts +72 -38
  705. package/src/resources/routine.ts +152 -15
  706. package/src/resources/run/agent-exec.ts +95 -44
  707. package/src/resources/run/create.ts +27 -24
  708. package/src/resources/run/engines.ts +57 -0
  709. package/src/resources/run/environment.ts +43 -0
  710. package/src/resources/run/epilogue.ts +18 -17
  711. package/src/resources/run/files.ts +433 -0
  712. package/src/resources/run/header.ts +18 -18
  713. package/src/resources/run/prepare.ts +67 -74
  714. package/src/resources/run/references.ts +6 -5
  715. package/src/resources/run/resolve.ts +1 -1
  716. package/src/resources/run/resume.ts +28 -9
  717. package/src/resources/run/stream.ts +110 -9
  718. package/src/resources/run/workspace.ts +37 -47
  719. package/src/resources/run-approve.ts +2 -14
  720. package/src/resources/run-control.ts +4 -5
  721. package/src/resources/run-format.ts +3 -4
  722. package/src/resources/run-logs.ts +17 -6
  723. package/src/resources/run-scores.ts +14 -4
  724. package/src/resources/run-to-eval-case.ts +2 -2
  725. package/src/resources/runs.ts +5 -5
  726. package/src/resources/search.ts +1 -2
  727. package/src/resources/service-account.ts +4 -1
  728. package/src/resources/session.ts +10 -7
  729. package/src/resources/skill.ts +7 -8
  730. package/src/resources/stream/answer.ts +3 -19
  731. package/src/resources/stream/composer.ts +170 -0
  732. package/src/resources/stream/ink.tsx +74 -10
  733. package/src/resources/stream/render-plaintext.ts +22 -4
  734. package/src/resources/stream/tty.ts +1 -1
  735. package/src/resources/tag.ts +7 -9
  736. package/src/resources/usage.ts +19 -15
  737. package/src/resources/validate.ts +1 -10
  738. package/src/resources/version.ts +117 -15
  739. package/src/resources/views/agent.ts +60 -0
  740. package/src/resources/views/environment.ts +41 -0
  741. package/src/resources/views/index.ts +82 -0
  742. package/src/resources/views/organization.ts +29 -0
  743. package/src/resources/views/routine.ts +39 -0
  744. package/src/resources/views/run.ts +46 -0
  745. package/src/resources/views/session.ts +91 -0
  746. package/src/resources/views/skill.ts +49 -0
  747. package/src/resources/views/view.ts +188 -0
  748. package/src/resources/views/words.ts +191 -0
  749. package/src/runtime.ts +51 -2
  750. package/errors/exit-codes.d.ts +0 -10
  751. package/errors/exit-codes.d.ts.map +0 -1
  752. package/errors/exit-codes.js +0 -15
  753. package/errors/exit-codes.js.map +0 -1
  754. package/resources/run/attachments.d.ts +0 -24
  755. package/resources/run/attachments.d.ts.map +0 -1
  756. package/resources/run/attachments.js +0 -237
  757. package/resources/run/attachments.js.map +0 -1
  758. package/src/errors/exit-codes.ts +0 -17
  759. package/src/resources/run/attachments.ts +0 -300
  760. package/src/types/marked-terminal.d.ts +0 -31
@@ -0,0 +1,38 @@
1
+ // The keys and commands of the live session `stigmer run` and `stigmer
2
+ // resume` open on a terminal, as both commands' help prints them (and the
3
+ // generated command pages with it). The commands themselves are the
4
+ // composer's (resources/stream/composer.ts); this is their words, kept light
5
+ // so `--help` loads no part of the session view.
6
+ /** What `--help` says about how a run returns and the code it exits with. */
7
+ export const UNTIL_HELP = `
8
+ How it ends:
9
+ On a terminal the session stays open for follow-ups until you leave
10
+ (--until exit, the default); --until turn returns when the turn ends.
11
+ Off a terminal, and with -o json, it returns when the turn ends.
12
+
13
+ Exit codes (the newest turn's):
14
+ 0 the turn completed
15
+ 1 the turn failed, was cancelled or was stopped
16
+ 130 you left while the turn still works
17
+ `;
18
+ /** What `--help` says about the session a terminal opens. */
19
+ export const SESSION_HELP = `
20
+ In the session (on a terminal):
21
+ Enter send the message
22
+ \\ Enter, Ctrl+J, Alt+Enter start a new line (Shift+Enter where the terminal reports it)
23
+ Up, Down earlier messages, kept per directory
24
+ Esc stop the agent's turn; twice while it stops, end it now
25
+ Ctrl+C clear the message; on an empty one, twice to leave
26
+ (the agent keeps working: come back with stigmer resume)
27
+ Shift+Tab, Ctrl+T switch plan and agent mode
28
+ Ctrl+O expand tool calls and thinking
29
+ ? list the keys and commands
30
+
31
+ Commands:
32
+ /help list the commands and keys
33
+ /mode plan|agent switch the mode
34
+ /stop stop the agent's turn
35
+ /exit leave; the agent keeps working
36
+ @<path> mention a file in the session's folder
37
+ `;
38
+ //# sourceMappingURL=session-help.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-help.js","sourceRoot":"","sources":["../src/commands/session-help.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,0EAA0E;AAC1E,oEAAoE;AACpE,6EAA6E;AAC7E,iDAAiD;AAEjD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;CAUzB,CAAC;AAEF,6DAA6D;AAC7D,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;CAkB3B,CAAC"}
package/commands/setup.js CHANGED
@@ -8,13 +8,13 @@
8
8
  // the LLM section untouched, and vice versa. Writes land under
9
9
  // backend.local.llm / backend.local.operator, preserving every other config
10
10
  // field. The valid provider set is owned by wizard.ts's PROVIDER_CHOICES
11
- // (Anthropic-only + skip — the only story the native runner serves).
11
+ // (Anthropic + skip: the key setup saves; the runner reaches other providers
12
+ // by keys exported in the shell, local/provider-reach.ts).
12
13
  //
13
14
  // Setup deliberately has NO model concept: the platform model registry owns
14
15
  // the execution default, and per-run overrides belong to `stigmer run
15
- // --model`. A setup-level pin used to exist but never reached execution
16
- // (oss#314) — config that looks authoritative but is dead invites exactly
17
- // that bug class, so it is structurally gone rather than wired up.
16
+ // --model`. A setup-level pin would look authoritative and reach no
17
+ // execution (oss#314), so setup has none.
18
18
  import { homedir } from "node:os";
19
19
  import { CommandResult, renderResult } from "../output/index.js";
20
20
  import { addResultFlags, resultFormat } from "./shared.js";
@@ -34,7 +34,7 @@ async function runSetup(options) {
34
34
  const { PROVIDER_CHOICES, applyChoice, applyOperatorIdentity, runInteractiveWizard } = await import("../local/setup/wizard.js");
35
35
  const { isRunning } = await import("../local/daemon/launch.js");
36
36
  const { CliExitError } = await import("../errors/cli-exit-error.js");
37
- const { ExitCode } = await import("../errors/exit-codes.js");
37
+ const { ExitCode } = await import("@stigmer/client/exit-codes");
38
38
  const config = load();
39
39
  const nonInteractive = options.provider !== undefined ||
40
40
  options.operatorEmail !== undefined ||
@@ -1 +1 @@
1
- {"version":3,"file":"setup.js","sourceRoot":"","sources":["../src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index.js";
3
3
  /** Add read-verb output flags: `-o/--output {table,json,yaml}` plus `--json`. */
4
4
  export declare function addReadFlags(command: Command): Command;
5
- /** Add mutating-command output flags: `--json` and `--quiet`. */
5
+ /** Add mutating-command output flags: `-o/--output {table,json}`, `--json` and `--quiet`. */
6
6
  export declare function addResultFlags(command: Command): Command;
7
+ /** Add output flags for a command whose answer is a bare value: `-o/--output {table,json}` and `--json`. */
8
+ export declare function addValueFlags(command: Command): Command;
9
+ /** Add streaming-command output flags: `-o/--output {table,json,ndjson}` and `--json`. */
10
+ export declare function addStreamFlags(command: Command, json?: string): Command;
11
+ /** Resolve the output format for a streaming command from parsed options. */
12
+ export declare function streamFormat(options: OutputFlags): OutputFormat;
7
13
  /** Resolve the output format for a read verb from parsed options. */
8
14
  export declare function readFormat(options: OutputFlags): OutputFormat;
9
15
  /** Resolve the output format for a mutating command from parsed options. */
10
16
  export declare function resultFormat(options: OutputFlags): OutputFormat;
11
17
  /** Resolve any command class's format (escape hatch for non-standard verbs). */
12
18
  export declare function formatFor(options: OutputFlags, commandClass: CommandClass): OutputFormat;
13
- /** Read the inherited global `--org` flag from within a subcommand action. */
19
+ /** Read the global `--org` flag from within a subcommand action, written before or after the command. */
14
20
  export declare function globalOrg(command: Command): string | undefined;
21
+ /** `--until`'s value for `run` and `resume`: "exit" when absent; anything but turn or exit is refused. */
22
+ export declare function untilOf(raw: string | undefined): "turn" | "exit";
15
23
  //# sourceMappingURL=shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/commands/shared.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAiB,MAAM,oBAAoB,CAAC;AAE3G,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAItD;AAED,iEAAiE;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AAC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,GAAG,YAAY,CAExF;AAED,yGAAyG;AACzG,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAG9D;AAED,0GAA0G;AAC1G,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAIhE"}
@@ -1,6 +1,8 @@
1
1
  // Shared commander wiring for output flags. Keeps the unified output model
2
2
  // (src/output/format.ts) consistent across every command and out of the
3
3
  // individual handlers.
4
+ import { UsageError } from "../errors/usage-error.js";
5
+ import { nearestOption } from "../global-options.js";
4
6
  import { resolveFormat } from "../output/index.js";
5
7
  /** Add read-verb output flags: `-o/--output {table,json,yaml}` plus `--json`. */
6
8
  export function addReadFlags(command) {
@@ -8,12 +10,29 @@ export function addReadFlags(command) {
8
10
  .option("-o, --output <format>", "output format: table, json, or yaml")
9
11
  .option("--json", "shorthand for --output json");
10
12
  }
11
- /** Add mutating-command output flags: `--json` and `--quiet`. */
13
+ /** Add mutating-command output flags: `-o/--output {table,json}`, `--json` and `--quiet`. */
12
14
  export function addResultFlags(command) {
13
15
  return command
16
+ .option("-o, --output <format>", "output format: table or json")
14
17
  .option("--json", "emit the result as JSON")
15
18
  .option("--quiet", "print only the status line");
16
19
  }
20
+ /** Add output flags for a command whose answer is a bare value: `-o/--output {table,json}` and `--json`. */
21
+ export function addValueFlags(command) {
22
+ return command
23
+ .option("-o, --output <format>", "output format: table (the bare value) or json")
24
+ .option("--json", "shorthand for --output json");
25
+ }
26
+ /** Add streaming-command output flags: `-o/--output {table,json,ndjson}` and `--json`. */
27
+ export function addStreamFlags(command, json = "stream events as newline-delimited JSON") {
28
+ return command
29
+ .option("-o, --output <format>", "output format: table (the live view), json or ndjson (newline-delimited JSON events)")
30
+ .option("--json", json);
31
+ }
32
+ /** Resolve the output format for a streaming command from parsed options. */
33
+ export function streamFormat(options) {
34
+ return resolveFormat(options, "streaming");
35
+ }
17
36
  /** Resolve the output format for a read verb from parsed options. */
18
37
  export function readFormat(options) {
19
38
  return resolveFormat(options, "read");
@@ -26,9 +45,17 @@ export function resultFormat(options) {
26
45
  export function formatFor(options, commandClass) {
27
46
  return resolveFormat(options, commandClass);
28
47
  }
29
- /** Read the inherited global `--org` flag from within a subcommand action. */
48
+ /** Read the global `--org` flag from within a subcommand action, written before or after the command. */
30
49
  export function globalOrg(command) {
31
- const value = command.optsWithGlobals().org;
50
+ const value = nearestOption(command, "org");
32
51
  return typeof value === "string" && value !== "" ? value : undefined;
33
52
  }
53
+ /** `--until`'s value for `run` and `resume`: "exit" when absent; anything but turn or exit is refused. */
54
+ export function untilOf(raw) {
55
+ if (raw === undefined || raw === "exit")
56
+ return "exit";
57
+ if (raw === "turn")
58
+ return "turn";
59
+ throw new UsageError(`invalid --until value "${raw}" (expected turn or exit)`);
60
+ }
34
61
  //# sourceMappingURL=shared.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/commands/shared.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,wEAAwE;AACxE,uBAAuB;AAGvB,OAAO,EAA0D,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE3G,iFAAiF;AACjF,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,OAAO,OAAO;SACX,MAAM,CAAC,uBAAuB,EAAE,qCAAqC,CAAC;SACtE,MAAM,CAAC,QAAQ,EAAE,6BAA6B,CAAC,CAAC;AACrD,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO,OAAO;SACX,MAAM,CAAC,QAAQ,EAAE,yBAAyB,CAAC;SAC3C,MAAM,CAAC,SAAS,EAAE,4BAA4B,CAAC,CAAC;AACrD,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,UAAU,CAAC,OAAoB;IAC7C,OAAO,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAA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K,MAAM;QAAE,OAAO,MAAM,CAAC;IAClC,MAAM,IAAI,UAAU,CAAC,0BAA0B,GAAG,2BAA2B,CAAC,CAAC;AACjF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../src/commands/tag.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAOlD"}
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../src/commands/tag.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAYlD"}
package/commands/tag.js CHANGED
@@ -2,14 +2,19 @@
2
2
  // version. Thin handler: resolve credentials/org, delegate to the resource
3
3
  // layer, render the result. Heavy modules are lazy-imported.
4
4
  import { ensureAuthenticated, resolveOrganization } from "../config/index.js";
5
- import { globalOrg } from "./shared.js";
5
+ import { addResultFlags, globalOrg, resultFormat } from "./shared.js";
6
6
  export function registerTag(program) {
7
- program
8
- .command("tag <type> <org/slug> <hash> <tag>")
7
+ const tag = program
8
+ .command("tag")
9
9
  .description("assign a tag to a resource version (supported types: agent)")
10
- .action((type, ref, hash, tag, _options, command) => runTag(type, ref, hash, tag, command));
10
+ .argument("<type>", "the resource type")
11
+ .argument("<org/slug>", "the resource")
12
+ .argument("<hash>", "the version's hash, or a unique prefix of it as `get agent --version-history` prints it")
13
+ .argument("<tag>", "the tag to assign; it moves off any version that held it")
14
+ .action((type, ref, hash, tag, options, command) => runTag(type, ref, hash, tag, options, command));
15
+ addResultFlags(tag);
11
16
  }
12
- async function runTag(type, ref, hash, tag, command) {
17
+ async function runTag(type, ref, hash, tag, options, command) {
13
18
  const [{ connectBackend }, { tagVersion }, { renderResult }] = await Promise.all([
14
19
  import("../backend.js"),
15
20
  import("../resources/tag.js"),
@@ -19,6 +24,6 @@ async function runTag(type, ref, hash, tag, command) {
19
24
  ensureAuthenticated(client.config);
20
25
  const org = resolveOrganization(client.config, globalOrg(command));
21
26
  const result = await tagVersion(client.stigmer, type, ref, hash, tag, org);
22
- renderResult(result, "human");
27
+ renderResult(result, resultFormat(options));
23
28
  }
24
29
  //# sourceMappingURL=tag.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tag.js","sourceRoot":"","sources":["../src/commands/tag.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,2EAA2E;AAC3E,6DAA6D;AAG7D,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,OAAO;SACJ,OAAO,CAAC,oCAAoC,CAAC;SAC7C,WAAW,CAAC,6DAA6D,CAAC;SAC1E,MAAM,CAAC,CAAC,IAAY,EAAE,GAAW,EAAE,IAAY,EAAE,GAAW,EAAE,QAAiB,EAAE,OAAgB,EAAE,EAAE,CACpG,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CACtC,CAAC;AACN,CAAC;AAED,KAAK,UAAU,MAAM,CAAC,IAAY,EAAE,GAAW,EAAE,IAAY,EAAE,GAAW,EAAE,OAAgB;IAC1F,MAAM,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC/E,MAAM,CAAC,eAAe,CAAC;QACvB,MAAM,CAAC,qBAAqB,CAAC;QAC7B,MAAM,CAAC,6BAA6B,CAAC;KACtC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,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H,MAAM,CAAC,EAAE,cAAc,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC/E,MAAM,CAAC,eAAe,CAAC;QACvB,MAAM,CAAC,qBAAqB,CAAC;QAC7B,MAAM,CAAC,6BAA6B,CAAC;KACtC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;IAChC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,GAAG,GAAG,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAEnE,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAC3E,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;AAC9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../src/commands/up.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA6BzC,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAwBjD"}
1
+ {"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../src/commands/up.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+BzC,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAwBjD"}
package/commands/up.js CHANGED
@@ -6,12 +6,19 @@
6
6
  // Thin handler: parse flags, delegate to the local daemon launcher, render the
7
7
  // outcome. The launcher (and the heavy resolvers it pulls in) load lazily so
8
8
  // `--help` stays fast.
9
+ //
10
+ // The card says where the console is and whether agents can run, the two
11
+ // things a person needs next: the console line comes from probing the server
12
+ // once it answers (stigmer#2649), and the agents line from the providers the
13
+ // started runner reaches, the same answer the server was handed (stigmer#1084).
14
+ // A stack that does not start ends with why, in either shape: the failed
15
+ // component, how it ended and its last stderr lines (stigmer#1845).
9
16
  import { homedir } from "node:os";
10
- import { join } from "node:path";
11
17
  import { CliExitError } from "../errors/cli-exit-error.js";
12
- import { ExitCode } from "../errors/exit-codes.js";
18
+ import { ExitCode } from "@stigmer/client/exit-codes";
13
19
  import { CommandResult, renderResult } from "../output/index.js";
14
- import { HEALTH_STATE_FILE, SERVER_PORT } from "../local/constants.js";
20
+ import { SERVER_PORT } from "../local/constants.js";
21
+ import { describeReach } from "../local/provider-reach.js";
15
22
  import { addResultFlags, resultFormat } from "./shared.js";
16
23
  // The server serves the web console from its unified port; the
17
24
  // flag suppresses probing/reporting it, not the serving itself (one
@@ -42,43 +49,66 @@ async function runUp(run, flags) {
42
49
  process.stderr.write("Starting Stigmer local stack… (first run may take a moment)\n");
43
50
  const launch = await import("../local/daemon/launch.js");
44
51
  if (!run.foreground) {
45
- await launch.up(run);
46
- await renderUpCard(run, flags);
52
+ const report = await launch.up(run);
53
+ await renderUpCard(run, flags, report);
47
54
  return;
48
55
  }
49
56
  // The card renders when the stack is serving — the moment the
50
57
  // detached shape would have returned — and the process then stays up,
51
58
  // mirroring the server's and runner's output, until a shutdown signal.
52
59
  const code = await launch.upForeground(run, homedir(), {
53
- onReady: () => renderUpCard(run, flags),
60
+ onReady: (report) => renderUpCard(run, flags, report),
54
61
  });
55
62
  if (code !== 0) {
56
- // The daemon body has already logged which component failed and why.
57
- const { logDir } = await import("../local/paths.js");
58
- throw new CliExitError("the local stack did not start", ExitCode.General, [
59
- `Check the component logs under ${logDir(homedir())}.`,
60
- ]);
63
+ // The daemon body ran as this process, so its record carries our PID; the
64
+ // last words a container's log shows are then the reason, not a pointer.
65
+ const { dataDir, logDir } = await import("../local/paths.js");
66
+ throw (launch.startupFailure(dataDir(homedir()), process.pid) ??
67
+ new CliExitError("the local stack did not start", ExitCode.General, [
68
+ `Check the component logs under ${logDir(homedir())}.`,
69
+ ]));
61
70
  }
62
71
  }
63
- async function renderUpCard(run, flags) {
72
+ async function renderUpCard(run, flags, report) {
64
73
  const result = CommandResult.success(run.serverOnly ? "Stigmer control plane is up" : "Stigmer local stack is up");
65
74
  const section = result.addSection("Endpoints");
66
75
  section.field("server", `http://localhost:${SERVER_PORT}`);
67
- if (await consoleReported()) {
76
+ if (!run.noWeb && (await consoleServed())) {
68
77
  // Same origin as the API: the server serves the console. Only
69
- // printed when the daemon's probe found a bundled export — a dev-tree
70
- // server without one must not advertise a dead URL.
78
+ // printed when the server answers the console probe — a dev-tree
79
+ // server without a bundled export must not advertise a dead URL.
71
80
  section.field("console", `http://localhost:${SERVER_PORT}`);
72
81
  }
82
+ addAgentsSection(result, report);
73
83
  result.hint("Check status with: stigmer status");
74
84
  result.hint(run.foreground ? "Stop it with: Ctrl-C (or stigmer down from another shell)" : "Stop it with: stigmer down");
75
85
  renderResult(result, resultFormat(flags));
76
86
  }
77
- /** Whether the daemon recorded the web console as running (its own probe). */
78
- async function consoleReported() {
79
- const { dataDir } = await import("../local/paths.js");
80
- const { loadHealthState } = await import("../local/state/health-state.js");
81
- const health = loadHealthState(join(dataDir(homedir()), HEALTH_STATE_FILE));
82
- return health?.components["web-console"]?.state === "running";
87
+ /**
88
+ * Whether the server serves the web console. The card renders once the
89
+ * server's port answers, and the server binds its port only after every lane
90
+ * is mounted, so the probe here reads what a browser would find. The daemon's
91
+ * own record of the same probe lands seconds later (after its settle delay),
92
+ * too late for a card that read it to see it (stigmer#2649).
93
+ */
94
+ async function consoleServed() {
95
+ const { isWebConsoleAvailable } = await import("../local/webconsole/index.js");
96
+ return isWebConsoleAvailable();
97
+ }
98
+ /** Whether agents can run on this stack, and through which providers. */
99
+ function addAgentsSection(result, report) {
100
+ const section = result.addSection("Agents");
101
+ if (report.runnerReach === undefined) {
102
+ section.field("not ready", "no local runner (control plane only)");
103
+ return;
104
+ }
105
+ if (report.runnerReach.length === 0) {
106
+ section.field("not ready", "no model provider");
107
+ // The daemon hands its runner the key only at start, so a key saved
108
+ // while the stack runs needs a restart to reach it.
109
+ result.hint("Add a model provider: stigmer setup, then stigmer down && stigmer up");
110
+ return;
111
+ }
112
+ section.field("ready", describeReach(report.runnerReach));
83
113
  }
84
114
  //# sourceMappingURL=up.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"up.js","sourceRoot":"","sources":["../src/commands/up.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,2EAA2E;AAC3E,6EAA6E;AAC7E,0BAA0B;AAC1B,EAAE;AACF,+EAA+E;AAC/E,6EAA6E;AAC7E,uBAAuB;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAoB,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAc3D,+DAA+D;AAC/D,oEAAoE;AACpE,oEAAoE;AACpE,MAAM,WAAW,GAAG,kCAAkC,CAAC;AAEvD,yEAAyE;AACzE,4EAA4E;AAC5E,0EAA0E;AAC1E,MAAM,eAAe,GAAG,6FAA6F,CAAC;AAEtH,MAAM,UAAU,UAAU,CAAC,OAAgB;IACzC,MAAM,EAAE,GAAG,OAAO;SACf,OAAO,CAAC,IAAI,CAAC;SACb,WAAW,CAAC,0DAA0D,CAAC;SACvE,MAAM,CAAC,eAAe,EAAE,2CAA2C,CAAC;SACpE,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC;SAC/B,MAAM,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9D,CAAC;IACD,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;IACjD,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,8DAA8D,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC;IAC/H,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED;;;;;;GAMG;AACH,KAAK,UAAU,aAAa;IAC1B,MAAM,EAAE,qBAAqB,EAAE,GAAG,MAAM,MAAM,CAAC,8BAA8B,CAAC,CAAC;IAC/E,OAAO,qBAAqB,EAAE,CAAC;AACjC,CAAC;AAED,yEAAyE;AACzE,SAAS,gBAAgB,CAAC,MAAqB,EAAE,MAAgB;IAC/D,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC5C,IAAI,MAAM,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QACrC,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,sCAAsC,CAAC,CAAC;QACnE,OAAO;IACT,CAAC;IACD,IAAI,MAAM,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;QAChD,oEAAoE;QACpE,oDAAoD;QACpD,MAAM,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAC;QACpF,OAAO;IACT,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;AAC5D,CAAC"}
@@ -8,8 +8,8 @@
8
8
  // `.codex-plugin/plugin.json`) is read with `@stigmer/plugin-package`, the
9
9
  // same reader the server installs with, so what validates here installs
10
10
  // there and what is refused here is refused there with the same sentence.
11
- // The plugin check runs BEFORE the YAML walk: a plugin's `ai.stigmer/*.yaml`
12
- // documents would otherwise be validated as loose resources.
11
+ // The plugin check runs BEFORE the YAML walk: a plugin's YAML documents
12
+ // would otherwise be validated as loose resources.
13
13
  //
14
14
  // A plugin refusal is a `UsageError` (exit 2) listing every problem at once;
15
15
  // an accepted plugin renders as `success`, or `warning` when the reader had
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/commands/validate.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,yBAAyB;AACzB,EAAE;AACF,2EAA2E;AAC3E,wEAAwE;AACxE,iEAAiE;AACjE,gEAAgE;AAChE,2EAA2E;AAC3E,wEAAwE;AACxE,0EAA0E;AAC1E,6EAA6E;AAC7E,6DAA6D;AAC7D,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,4EAA4E;AAC5E,uBAAuB;AAGvB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACL,aAAa,EAEb,YAAY,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAM3D,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,MAAM,QAAQ,GAAG,OAAO;SACrB,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,4DAA4D,CAAC;SACzE,cAAc,CACb,mBAAmB,EACnB,uEAAuE,CACxE;SACA,MAAM,CAAC,KAAK,EAAE,OAAsB,EAAE,EAAE;QACvC,YAAY,CAAC,MAAM,WAAW,CAAC,OAAO,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;IACL,cAAc,CAAC,QAAQ,CAAC,CAAC;AAC3B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,EAAE,OAAO,GAAG,IAAI,CAOtD"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/commands/version.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAQtD"}
@@ -1,11 +1,15 @@
1
- // `stigmer version` — print the CLI version. No backend, no flags.
1
+ // `stigmer version` — print the CLI version. No backend; `-o json` prints
2
+ // it as `{"version": ...}`.
3
+ import { renderValue } from "../output/command-result.js";
2
4
  import { VERSION } from "../version.js";
5
+ import { addValueFlags, resultFormat } from "./shared.js";
3
6
  export function registerVersion(program) {
4
- program
7
+ const version = program
5
8
  .command("version")
6
9
  .description("print the CLI version")
7
- .action(() => {
8
- process.stdout.write(`${VERSION}\n`);
10
+ .action((options) => {
11
+ renderValue(VERSION, { version: VERSION }, resultFormat(options));
9
12
  });
13
+ addValueFlags(version);
10
14
  }
11
15
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/commands/version.ts"],"names":[],"mappings":"AAAA,mEAAmE;AAGnE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,MAAM,UAAU,eAAe,CAAC,OAAgB;IAC9C,OAAO;SACJ,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,uBAAuB,CAAC;SACpC,MAAM,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACP,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/commands/version.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,4BAA4B;AAG5B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,UAAU,eAAe,CAAC,OAAgB;IAC9C,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,uBAAuB,CAAC;SACpC,MAAM,CAAC,CAAC,OAAoB,EAAE,EAAE;QAC/B,WAAW,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IACL,aAAa,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"}
@@ -1,5 +1,3 @@
1
- /** The legacy binary switch, still written as a mirror for older readers. */
2
- export type BackendType = "local" | "cloud";
3
1
  /** The two named-backend families: Stigmer Cloud, or any OSS server. */
4
2
  export type NamedBackendType = "cloud" | "selfhost";
5
3
  /** The reserved name of the managed local daemon backend. */
@@ -28,22 +26,10 @@ export interface NamedBackendConfig {
28
26
  token_expiry?: string;
29
27
  api_key?: string;
30
28
  }
31
- /** Cloud backend connection — the LEGACY single-slot shape (older files). */
32
- export interface CloudBackendConfig {
33
- endpoint?: string;
34
- token?: string;
35
- org_id?: string;
36
- env_id?: string;
37
- refresh_token?: string;
38
- token_expiry?: string;
39
- }
40
29
  export interface BackendConfig {
41
- type: BackendType;
42
- /** Local daemon/LLM/Temporal settings — opaque to this CLI,
43
- * preserved verbatim across save so coexisting tools keep their config. */
30
+ /** Local daemon/LLM/Temporal settings — opaque to this module,
31
+ * preserved verbatim across save so the local-mode modules keep their config. */
44
32
  local?: unknown;
45
- /** Legacy cloud slot — read for migration, never written back. */
46
- cloud?: CloudBackendConfig;
47
33
  }
48
34
  export interface ContextConfig {
49
35
  /** The context organization's id (or, set by hand, whatever value was given). */
@@ -81,16 +67,13 @@ export declare function getDefault(): Config;
81
67
  /**
82
68
  * Load the config from disk. In standalone mode the file is ignored and the
83
69
  * default is returned, isolating sidecar/automation invocations from ambient
84
- * user config (matches the Go CLI). A missing file also yields the default.
70
+ * user config. A missing file also yields the default.
85
71
  */
86
72
  export declare function load(path?: string): Config;
87
73
  /**
88
74
  * Persist the config to disk (0600 file in a 0755 directory), with the
89
- * documentation header the file has always carried. Writes the NAMED shape
90
- * (the one-time migration): the legacy cloud slot is dropped — its content
91
- * lives in `backends.cloud` — and `backend.type` is written as the
92
- * local-vs-not mirror. A pristine local config (no named backends) writes
93
- * exactly the legacy bytes.
75
+ * documentation header, replacing the file in one step. A pristine local config
76
+ * (no named backends) writes no backend keys at all.
94
77
  */
95
78
  export declare function save(config: Config, path?: string): void;
96
79
  /** The active backend's name (normalize always stamps current_backend). */
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config/config.ts"],"names":[],"mappings":"AA2BA,6EAA6E;AAC7E,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5C,wEAAwE;AACxE,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,UAAU,CAAC;AAEpD,6DAA6D;AAC7D,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C,sEAAsE;AACtE,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAE1C;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,6EAA6E;AAC7E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAA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