@burdenoff/cli-sdk 2026.1201.1 → 2026.1202.1

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 (242) hide show
  1. package/dist/chunk-BGNPGKJM.js +1 -0
  2. package/dist/{chunk-ASSY2L5R.js → chunk-E6F56R4K.js} +3 -3
  3. package/dist/chunk-N7EXKGE2.js +34 -0
  4. package/dist/core/index.cjs +9 -9
  5. package/dist/core/index.d.cts +2 -2
  6. package/dist/core/index.d.ts +2 -2
  7. package/dist/core/index.js +1 -1
  8. package/dist/index.cjs +9 -9
  9. package/dist/index.d.cts +1 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/{module-BNVKV_pI.d.ts → module-DWSAfs3k.d.cts} +20 -19
  13. package/dist/{module-BNVKV_pI.d.cts → module-DWSAfs3k.d.ts} +20 -19
  14. package/dist/modules/adaptercloud/index.cjs +38 -38
  15. package/dist/modules/adaptercloud/index.d.cts +1 -1
  16. package/dist/modules/adaptercloud/index.d.ts +1 -1
  17. package/dist/modules/adaptercloud/index.js +2 -2
  18. package/dist/modules/artistrybase/index.cjs +50 -50
  19. package/dist/modules/artistrybase/index.d.cts +1 -1
  20. package/dist/modules/artistrybase/index.d.ts +1 -1
  21. package/dist/modules/artistrybase/index.js +2 -2
  22. package/dist/modules/assethandler/index.cjs +32 -32
  23. package/dist/modules/assethandler/index.d.cts +1 -1
  24. package/dist/modules/assethandler/index.d.ts +1 -1
  25. package/dist/modules/assethandler/index.js +2 -2
  26. package/dist/modules/atheletebridge/index.cjs +34 -34
  27. package/dist/modules/atheletebridge/index.d.cts +1 -1
  28. package/dist/modules/atheletebridge/index.d.ts +1 -1
  29. package/dist/modules/atheletebridge/index.js +2 -2
  30. package/dist/modules/auth/index.cjs +34 -34
  31. package/dist/modules/auth/index.d.cts +1 -1
  32. package/dist/modules/auth/index.d.ts +1 -1
  33. package/dist/modules/auth/index.js +4 -4
  34. package/dist/modules/billing/index.cjs +18 -18
  35. package/dist/modules/billing/index.d.cts +1 -1
  36. package/dist/modules/billing/index.d.ts +1 -1
  37. package/dist/modules/billing/index.js +2 -2
  38. package/dist/modules/brainyrich/index.cjs +45 -45
  39. package/dist/modules/brainyrich/index.d.cts +1 -1
  40. package/dist/modules/brainyrich/index.d.ts +1 -1
  41. package/dist/modules/brainyrich/index.js +2 -2
  42. package/dist/modules/buildmyiq/index.cjs +32 -32
  43. package/dist/modules/buildmyiq/index.d.cts +1 -1
  44. package/dist/modules/buildmyiq/index.d.ts +1 -1
  45. package/dist/modules/buildmyiq/index.js +2 -2
  46. package/dist/modules/channels/index.cjs +12 -12
  47. package/dist/modules/channels/index.d.cts +1 -1
  48. package/dist/modules/channels/index.d.ts +1 -1
  49. package/dist/modules/channels/index.js +2 -2
  50. package/dist/modules/collabkin/index.cjs +34 -34
  51. package/dist/modules/collabkin/index.d.cts +1 -1
  52. package/dist/modules/collabkin/index.d.ts +1 -1
  53. package/dist/modules/collabkin/index.js +2 -2
  54. package/dist/modules/comradecircle/index.cjs +41 -41
  55. package/dist/modules/comradecircle/index.d.cts +1 -1
  56. package/dist/modules/comradecircle/index.d.ts +1 -1
  57. package/dist/modules/comradecircle/index.js +2 -2
  58. package/dist/modules/conversations/index.cjs +32 -32
  59. package/dist/modules/conversations/index.d.cts +1 -1
  60. package/dist/modules/conversations/index.d.ts +1 -1
  61. package/dist/modules/conversations/index.js +2 -2
  62. package/dist/modules/coolandlovely/index.cjs +41 -41
  63. package/dist/modules/coolandlovely/index.d.cts +1 -1
  64. package/dist/modules/coolandlovely/index.d.ts +1 -1
  65. package/dist/modules/coolandlovely/index.js +2 -2
  66. package/dist/modules/cosmicintersection/index.cjs +43 -43
  67. package/dist/modules/cosmicintersection/index.d.cts +1 -1
  68. package/dist/modules/cosmicintersection/index.d.ts +1 -1
  69. package/dist/modules/cosmicintersection/index.js +2 -2
  70. package/dist/modules/crewfoundry/index.cjs +70 -70
  71. package/dist/modules/crewfoundry/index.d.cts +1 -1
  72. package/dist/modules/crewfoundry/index.d.ts +1 -1
  73. package/dist/modules/crewfoundry/index.js +2 -2
  74. package/dist/modules/devportal/index.cjs +23 -23
  75. package/dist/modules/devportal/index.d.cts +1 -1
  76. package/dist/modules/devportal/index.d.ts +1 -1
  77. package/dist/modules/devportal/index.js +2 -2
  78. package/dist/modules/ecoimpacthub/index.cjs +41 -41
  79. package/dist/modules/ecoimpacthub/index.d.cts +1 -1
  80. package/dist/modules/ecoimpacthub/index.d.ts +1 -1
  81. package/dist/modules/ecoimpacthub/index.js +2 -2
  82. package/dist/modules/eventfullymanaged/index.cjs +92 -92
  83. package/dist/modules/eventfullymanaged/index.d.cts +1 -1
  84. package/dist/modules/eventfullymanaged/index.d.ts +1 -1
  85. package/dist/modules/eventfullymanaged/index.js +2 -2
  86. package/dist/modules/export/index.cjs +14 -14
  87. package/dist/modules/export/index.d.cts +1 -1
  88. package/dist/modules/export/index.d.ts +1 -1
  89. package/dist/modules/export/index.js +2 -2
  90. package/dist/modules/files/index.cjs +11 -11
  91. package/dist/modules/files/index.d.cts +1 -1
  92. package/dist/modules/files/index.d.ts +1 -1
  93. package/dist/modules/files/index.js +2 -2
  94. package/dist/modules/fluidgrids/index.cjs +29 -29
  95. package/dist/modules/fluidgrids/index.d.cts +1 -1
  96. package/dist/modules/fluidgrids/index.d.ts +1 -1
  97. package/dist/modules/fluidgrids/index.js +3 -3
  98. package/dist/modules/ggnomad/index.cjs +21 -21
  99. package/dist/modules/ggnomad/index.d.cts +1 -1
  100. package/dist/modules/ggnomad/index.d.ts +1 -1
  101. package/dist/modules/ggnomad/index.js +2 -2
  102. package/dist/modules/govcitizenhub/index.cjs +35 -35
  103. package/dist/modules/govcitizenhub/index.d.cts +1 -1
  104. package/dist/modules/govcitizenhub/index.d.ts +1 -1
  105. package/dist/modules/govcitizenhub/index.js +2 -2
  106. package/dist/modules/groups/index.cjs +12 -12
  107. package/dist/modules/groups/index.d.cts +1 -1
  108. package/dist/modules/groups/index.d.ts +1 -1
  109. package/dist/modules/groups/index.js +2 -2
  110. package/dist/modules/headshotmarketing/index.cjs +165 -165
  111. package/dist/modules/headshotmarketing/index.d.cts +1 -1
  112. package/dist/modules/headshotmarketing/index.d.ts +1 -1
  113. package/dist/modules/headshotmarketing/index.js +2 -2
  114. package/dist/modules/health/index.d.cts +1 -1
  115. package/dist/modules/health/index.d.ts +1 -1
  116. package/dist/modules/hookmovies/index.cjs +43 -43
  117. package/dist/modules/hookmovies/index.d.cts +1 -1
  118. package/dist/modules/hookmovies/index.d.ts +1 -1
  119. package/dist/modules/hookmovies/index.js +2 -2
  120. package/dist/modules/housingvista/index.cjs +24 -24
  121. package/dist/modules/housingvista/index.d.cts +1 -1
  122. package/dist/modules/housingvista/index.d.ts +1 -1
  123. package/dist/modules/housingvista/index.js +2 -2
  124. package/dist/modules/integrations/index.cjs +27 -27
  125. package/dist/modules/integrations/index.d.cts +1 -1
  126. package/dist/modules/integrations/index.d.ts +1 -1
  127. package/dist/modules/integrations/index.js +2 -2
  128. package/dist/modules/intelwatchtower/index.cjs +37 -37
  129. package/dist/modules/intelwatchtower/index.d.cts +1 -1
  130. package/dist/modules/intelwatchtower/index.d.ts +1 -1
  131. package/dist/modules/intelwatchtower/index.js +2 -2
  132. package/dist/modules/kadaikodi/index.cjs +26 -26
  133. package/dist/modules/kadaikodi/index.d.cts +1 -1
  134. package/dist/modules/kadaikodi/index.d.ts +1 -1
  135. package/dist/modules/kadaikodi/index.js +2 -2
  136. package/dist/modules/labsofscience/index.cjs +44 -44
  137. package/dist/modules/labsofscience/index.d.cts +1 -1
  138. package/dist/modules/labsofscience/index.d.ts +1 -1
  139. package/dist/modules/labsofscience/index.js +2 -2
  140. package/dist/modules/manufacturedops/index.cjs +36 -36
  141. package/dist/modules/manufacturedops/index.d.cts +1 -1
  142. package/dist/modules/manufacturedops/index.d.ts +1 -1
  143. package/dist/modules/manufacturedops/index.js +2 -2
  144. package/dist/modules/movethewheels/index.cjs +78 -78
  145. package/dist/modules/movethewheels/index.d.cts +1 -1
  146. package/dist/modules/movethewheels/index.d.ts +1 -1
  147. package/dist/modules/movethewheels/index.js +2 -2
  148. package/dist/modules/mybodyshield/index.cjs +36 -36
  149. package/dist/modules/mybodyshield/index.d.cts +1 -1
  150. package/dist/modules/mybodyshield/index.d.ts +1 -1
  151. package/dist/modules/mybodyshield/index.js +2 -2
  152. package/dist/modules/notifications/index.cjs +5 -5
  153. package/dist/modules/notifications/index.d.cts +1 -1
  154. package/dist/modules/notifications/index.d.ts +1 -1
  155. package/dist/modules/notifications/index.js +1 -1
  156. package/dist/modules/organizations/index.cjs +5 -5
  157. package/dist/modules/organizations/index.d.cts +1 -1
  158. package/dist/modules/organizations/index.d.ts +1 -1
  159. package/dist/modules/organizations/index.js +1 -1
  160. package/dist/modules/planmagnet/index.cjs +272 -272
  161. package/dist/modules/planmagnet/index.d.cts +1 -1
  162. package/dist/modules/planmagnet/index.d.ts +1 -1
  163. package/dist/modules/planmagnet/index.js +2 -2
  164. package/dist/modules/products/index.cjs +19 -19
  165. package/dist/modules/products/index.d.cts +1 -1
  166. package/dist/modules/products/index.d.ts +1 -1
  167. package/dist/modules/products/index.js +2 -2
  168. package/dist/modules/proserviceworld/index.cjs +24 -24
  169. package/dist/modules/proserviceworld/index.d.cts +1 -1
  170. package/dist/modules/proserviceworld/index.d.ts +1 -1
  171. package/dist/modules/proserviceworld/index.js +2 -2
  172. package/dist/modules/rbac/index.cjs +8 -8
  173. package/dist/modules/rbac/index.d.cts +1 -1
  174. package/dist/modules/rbac/index.d.ts +1 -1
  175. package/dist/modules/rbac/index.js +2 -2
  176. package/dist/modules/sandbox/index.cjs +39 -39
  177. package/dist/modules/sandbox/index.d.cts +1 -1
  178. package/dist/modules/sandbox/index.d.ts +1 -1
  179. package/dist/modules/sandbox/index.js +1 -1
  180. package/dist/modules/scheduler/index.cjs +25 -25
  181. package/dist/modules/scheduler/index.d.cts +1 -1
  182. package/dist/modules/scheduler/index.d.ts +1 -1
  183. package/dist/modules/scheduler/index.js +2 -2
  184. package/dist/modules/security/index.cjs +14 -14
  185. package/dist/modules/security/index.d.cts +1 -1
  186. package/dist/modules/security/index.d.ts +1 -1
  187. package/dist/modules/security/index.js +2 -2
  188. package/dist/modules/semanticfed/index.cjs +44 -44
  189. package/dist/modules/semanticfed/index.d.cts +1 -1
  190. package/dist/modules/semanticfed/index.d.ts +1 -1
  191. package/dist/modules/semanticfed/index.js +1 -1
  192. package/dist/modules/semanticfed-sql/index.cjs +4 -4
  193. package/dist/modules/semanticfed-sql/index.d.cts +1 -1
  194. package/dist/modules/semanticfed-sql/index.d.ts +1 -1
  195. package/dist/modules/semanticfed-sql/index.js +1 -1
  196. package/dist/modules/store/index.cjs +21 -21
  197. package/dist/modules/store/index.d.cts +1 -1
  198. package/dist/modules/store/index.d.ts +1 -1
  199. package/dist/modules/store/index.js +2 -2
  200. package/dist/modules/subscriberbot/index.cjs +41 -41
  201. package/dist/modules/subscriberbot/index.d.cts +1 -1
  202. package/dist/modules/subscriberbot/index.d.ts +1 -1
  203. package/dist/modules/subscriberbot/index.js +2 -2
  204. package/dist/modules/support/index.cjs +8 -8
  205. package/dist/modules/support/index.d.cts +1 -1
  206. package/dist/modules/support/index.d.ts +1 -1
  207. package/dist/modules/support/index.js +2 -2
  208. package/dist/modules/tags/index.cjs +10 -10
  209. package/dist/modules/tags/index.d.cts +1 -1
  210. package/dist/modules/tags/index.d.ts +1 -1
  211. package/dist/modules/tags/index.js +2 -2
  212. package/dist/modules/technospam/index.cjs +44 -44
  213. package/dist/modules/technospam/index.d.cts +1 -1
  214. package/dist/modules/technospam/index.d.ts +1 -1
  215. package/dist/modules/technospam/index.js +2 -2
  216. package/dist/modules/theculturepost/index.cjs +32 -32
  217. package/dist/modules/theculturepost/index.d.cts +1 -1
  218. package/dist/modules/theculturepost/index.d.ts +1 -1
  219. package/dist/modules/theculturepost/index.js +2 -2
  220. package/dist/modules/theglobalfuel/index.cjs +30 -30
  221. package/dist/modules/theglobalfuel/index.d.cts +1 -1
  222. package/dist/modules/theglobalfuel/index.d.ts +1 -1
  223. package/dist/modules/theglobalfuel/index.js +2 -2
  224. package/dist/modules/timecampus/index.cjs +69 -69
  225. package/dist/modules/timecampus/index.d.cts +1 -1
  226. package/dist/modules/timecampus/index.d.ts +1 -1
  227. package/dist/modules/timecampus/index.js +4 -4
  228. package/dist/modules/tours/index.cjs +4 -4
  229. package/dist/modules/tours/index.d.cts +1 -1
  230. package/dist/modules/tours/index.d.ts +1 -1
  231. package/dist/modules/tours/index.js +2 -2
  232. package/dist/modules/vibecontrols/index.cjs +460 -460
  233. package/dist/modules/vibecontrols/index.d.cts +1 -1
  234. package/dist/modules/vibecontrols/index.d.ts +1 -1
  235. package/dist/modules/vibecontrols/index.js +5 -5
  236. package/dist/modules/workspaces/index.cjs +16 -16
  237. package/dist/modules/workspaces/index.d.cts +1 -1
  238. package/dist/modules/workspaces/index.d.ts +1 -1
  239. package/dist/modules/workspaces/index.js +2 -2
  240. package/package.json +6 -1
  241. package/dist/chunk-3ZVMC2AF.js +0 -1
  242. package/dist/chunk-ZT6KOG7N.js +0 -34
@@ -1 +1 @@
1
- import {Kc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Sc,Tc,Uc,Vc,Xc,Yc,Zc,Wc,_c,ad,$c,bd,cd,dd,ed,fd,gd}from'../../chunk-ZGT7IIOP.js';import {a,b,i,r,p,q,h,k,s as s$1,u}from'../../chunk-3ZVMC2AF.js';import {q as q$1}from'../../chunk-ZT6KOG7N.js';function s(){let p=u().auth.read();if(!p?.workspaceId)throw new q$1("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:p.workspaceId}}function $(p$1){let d=p$1.command("sandbox").description("Manage sandboxes");d.command("list").description("List sandboxes").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.status&&(t.status=n.status.toUpperCase()),n.template&&(t.template=n.template.toUpperCase());let u=(await b(Kc,{context:s(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n.limit,offset:0}})).listSandboxes.items;i(n,u,{headers:["ID","Name","Template","Mode","Status","TTL","Created"],rows:u.map(c=>[r(c.id,12),c.name,c.template,c.mode,p(c.status),c.ttlSeconds?`${c.ttlSeconds}s`:"-",q(c.createdAt)])});}catch(t){h(t);}}),d.command("get").description("Get sandbox details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Lc,{context:s(),id:n});if(!e.getSandbox)throw new q$1("Sandbox not found");i(t,e.getSandbox);}catch(e){h(e);}}),d.command("create").description("Create sandbox").requiredOption("--name <name>","Sandbox name").option("--template <template>","Template type","VIBECONTROLS").option("--mode <mode>","Mode (DEPLOYMENT or JOB)","DEPLOYMENT").option("--ttl <seconds>","TTL in seconds",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Mc,{input:{name:n.name,template:n.template.toUpperCase(),mode:n.mode.toUpperCase(),ttlSeconds:n.ttl,context:s()}});k("Sandbox created"),i(n,t.createSandbox);}catch(t){h(t);}}),d.command("stop").description("Stop sandbox").argument("<id>").action(async n=>{try{await b(Nc,{context:s(),id:n}),k("Sandbox stopped");}catch(t){h(t);}}),d.command("delete").description("Delete sandbox").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await s$1("Delete this sandbox?",t.force))return;await b(Oc,{context:s(),id:n}),k("Sandbox deleted");}catch(e){h(e);}}),d.command("extend").description("Extend sandbox TTL").argument("<id>").option("--seconds <n>","Extend by seconds",parseInt).option("--minutes <n>","Extend by minutes",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e;if(t.seconds?e=t.seconds:t.minutes&&(e=t.minutes*60),!e)throw new q$1("Either --seconds or --minutes is required");let u=await b(Pc,{context:s(),id:n,additionalSeconds:e});k(`Sandbox extended by ${e}s`),i(t,u.extendSandboxTTL);}catch(e){h(e);}});let f=d.command("templates").description("Manage sandbox templates");f.command("list").description("List sandbox templates").option("--template <kind>","Filter by template kind").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Qc,{context:s(),template:n.template?.toUpperCase(),pagination:{limit:n.limit,offset:0}});i(n,t.listSandboxTemplates.items);}catch(t){h(t);}}),f.command("get").description("Get template details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Rc,{context:s(),id:n});if(!e.getSandboxTemplate)throw new q$1("Template not found");i(t,e.getSandboxTemplate);}catch(e){h(e);}}),f.command("create").description("Create sandbox template").requiredOption("--name <name>","Template name").requiredOption("--template <kind>","Template kind").option("--description <desc>","Description").option("--default","Mark as default").option("--ttl <seconds>","Default TTL",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t={name:n.name,template:n.template.toUpperCase(),context:s()};n.description&&(t.description=n.description),n.default&&(t.isDefault=!0),n.ttl!==void 0&&(t.ttlSeconds=n.ttl);let e=await b(Sc,{input:t});k("Template created"),i(n,e.createSandboxTemplate);}catch(t){h(t);}}),f.command("update").description("Update sandbox template").argument("<id>").option("--name <name>","New name").option("--description <desc>","New description").option("--default","Mark as default").option("--ttl <seconds>","New default TTL",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={id:n,context:s()};t.name&&(e.name=t.name),t.description&&(e.description=t.description),t.default!==void 0&&(e.isDefault=t.default),t.ttl!==void 0&&(e.ttlSeconds=t.ttl);let u=await b(Tc,{input:e});k("Template updated"),i(t,u.updateSandboxTemplate);}catch(e){h(e);}}),f.command("delete").description("Delete sandbox template").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await s$1("Delete this template?",t.force))return;await b(Uc,{context:s(),id:n}),k("Template deleted");}catch(e){h(e);}});let l=d.command("tags").description("Manage sandbox tags");l.command("list").description("List available sandbox tags").option("--query <q>","Search query").option("--limit <n>","Page size",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Vc,{query:n.query,limit:n.limit});i(n,t.availableSandboxTags);}catch(t){h(t);}}),l.command("create").description("Create a new sandbox tag").requiredOption("--label <label>","Tag label").option("--color <color>","Tag color").option("-f, --format <format>","Output format").action(async n=>{try{let t={label:n.label};n.color&&(t.color=n.color);let e=await b(Xc,{input:t});k("Tag created"),i(n,e.createSandboxTag);}catch(t){h(t);}}),l.command("attach").description("Attach a tag to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Yc,{input:{sandboxId:n.sandbox,tagId:n.tag}});k("Tag attached"),i(n,t.tagSandbox);}catch(t){h(t);}}),l.command("detach").description("Detach a tag from a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").action(async n=>{try{await b(Zc,{input:{sandboxId:n.sandbox,tagId:n.tag}}),k("Tag detached");}catch(t){h(t);}}),l.command("get").description("Get tags assigned to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Wc,{input:{sandboxId:n.sandbox}});i(n,t.getSandboxTags);}catch(t){h(t);}}),l.command("replace").description("Replace all tags on a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tags <ids...>","Tag IDs (space separated)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(_c,{input:{sandboxId:n.sandbox,tagIds:n.tags}});k("Tags replaced"),i(n,t.replaceSandboxTags);}catch(t){h(t);}});let m=d.command("admin").description("Admin / observability ops");m.command("nodes").description("List sandbox nodes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(ad,{context:s()});i(n,t.listSandboxNodes);}catch(t){h(t);}}),m.command("all").description("List all sandboxes (admin)").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.status&&(t.status=n.status.toUpperCase()),n.template&&(t.template=n.template.toUpperCase());let e=await b($c,{context:s(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n.limit,offset:0}});i(n,e.listAllSandboxes.items);}catch(t){h(t);}}),m.command("active").description("Get active sandboxes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(bd,{context:s()});i(n,t.getActiveSandboxes);}catch(t){h(t);}}),m.command("activity").description("Get recent sandbox activity").option("--limit <n>","Max items",parseInt,20).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(cd,{context:s(),limit:n.limit});i(n,t.getRecentSandboxActivity.items);}catch(t){h(t);}}),m.command("stats").description("Get sandbox stats").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(dd,{context:s()});i(n,t.getSandboxStats);}catch(t){h(t);}}),m.command("logs").description("Get logs for a sandbox container").argument("<id>").requiredOption("--container <name>","Container name").option("--tail <n>","Tail lines",parseInt,100).action(async(n,t)=>{try{let e=await b(ed,{context:s(),id:n,containerName:t.container,tailLines:t.tail});process.stdout.write(e.getSandboxLogs);}catch(e){h(e);}});let b$1=m.command("config").description("Sandbox config");b$1.command("get").description("Get sandbox config").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(fd,{context:s()});i(n,t.getSandboxConfig);}catch(t){h(t);}}),b$1.command("set").description("Update sandbox config").option("--default-ttl <seconds>","Default TTL",parseInt).option("--max-ttl <seconds>","Max TTL",parseInt).option("--max-per-user <n>","Max concurrent per user",parseInt).option("--max-per-workspace <n>","Max concurrent per workspace",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t={context:s()};n.defaultTtl!==void 0&&(t.defaultTtlSeconds=n.defaultTtl),n.maxTtl!==void 0&&(t.maxTtlSeconds=n.maxTtl),n.maxPerUser!==void 0&&(t.maxConcurrentPerUser=n.maxPerUser),n.maxPerWorkspace!==void 0&&(t.maxConcurrentPerWorkspace=n.maxPerWorkspace);let e=await b(gd,{input:t});k("Config updated"),i(n,e.updateSandboxConfig);}catch(t){h(t);}});}var K={id:"sandbox",version:"1.0.0",displayName:"Sandbox",dependsOn:["auth","workspaces"],register(p,d){a(d),$(p);}},it=K;export{it as default};
1
+ import {Kc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Sc,Tc,Uc,Vc,Xc,Yc,Zc,Wc,_c,ad,$c,bd,cd,dd,ed,fd,gd}from'../../chunk-ZGT7IIOP.js';import {a,b,i,r,p,q,h,k,s as s$1,u}from'../../chunk-BGNPGKJM.js';import {j}from'../../chunk-N7EXKGE2.js';function s(){let p=u().auth.read();if(!p?.workspaceId)throw new j("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:p.workspaceId}}function $(p$1){let d=p$1.command("sandbox").description("Manage sandboxes");d.command("list").description("List sandboxes").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.status&&(t.status=n.status.toUpperCase()),n.template&&(t.template=n.template.toUpperCase());let u=(await b(Kc,{context:s(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n.limit,offset:0}})).listSandboxes.items;i(n,u,{headers:["ID","Name","Template","Mode","Status","TTL","Created"],rows:u.map(c=>[r(c.id,12),c.name,c.template,c.mode,p(c.status),c.ttlSeconds?`${c.ttlSeconds}s`:"-",q(c.createdAt)])});}catch(t){h(t);}}),d.command("get").description("Get sandbox details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Lc,{context:s(),id:n});if(!e.getSandbox)throw new j("Sandbox not found");i(t,e.getSandbox);}catch(e){h(e);}}),d.command("create").description("Create sandbox").requiredOption("--name <name>","Sandbox name").option("--template <template>","Template type","VIBECONTROLS").option("--mode <mode>","Mode (DEPLOYMENT or JOB)","DEPLOYMENT").option("--ttl <seconds>","TTL in seconds",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Mc,{input:{name:n.name,template:n.template.toUpperCase(),mode:n.mode.toUpperCase(),ttlSeconds:n.ttl,context:s()}});k("Sandbox created"),i(n,t.createSandbox);}catch(t){h(t);}}),d.command("stop").description("Stop sandbox").argument("<id>").action(async n=>{try{await b(Nc,{context:s(),id:n}),k("Sandbox stopped");}catch(t){h(t);}}),d.command("delete").description("Delete sandbox").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await s$1("Delete this sandbox?",t.force))return;await b(Oc,{context:s(),id:n}),k("Sandbox deleted");}catch(e){h(e);}}),d.command("extend").description("Extend sandbox TTL").argument("<id>").option("--seconds <n>","Extend by seconds",parseInt).option("--minutes <n>","Extend by minutes",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e;if(t.seconds?e=t.seconds:t.minutes&&(e=t.minutes*60),!e)throw new j("Either --seconds or --minutes is required");let u=await b(Pc,{context:s(),id:n,additionalSeconds:e});k(`Sandbox extended by ${e}s`),i(t,u.extendSandboxTTL);}catch(e){h(e);}});let f=d.command("templates").description("Manage sandbox templates");f.command("list").description("List sandbox templates").option("--template <kind>","Filter by template kind").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Qc,{context:s(),template:n.template?.toUpperCase(),pagination:{limit:n.limit,offset:0}});i(n,t.listSandboxTemplates.items);}catch(t){h(t);}}),f.command("get").description("Get template details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Rc,{context:s(),id:n});if(!e.getSandboxTemplate)throw new j("Template not found");i(t,e.getSandboxTemplate);}catch(e){h(e);}}),f.command("create").description("Create sandbox template").requiredOption("--name <name>","Template name").requiredOption("--template <kind>","Template kind").option("--description <desc>","Description").option("--default","Mark as default").option("--ttl <seconds>","Default TTL",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t={name:n.name,template:n.template.toUpperCase(),context:s()};n.description&&(t.description=n.description),n.default&&(t.isDefault=!0),n.ttl!==void 0&&(t.ttlSeconds=n.ttl);let e=await b(Sc,{input:t});k("Template created"),i(n,e.createSandboxTemplate);}catch(t){h(t);}}),f.command("update").description("Update sandbox template").argument("<id>").option("--name <name>","New name").option("--description <desc>","New description").option("--default","Mark as default").option("--ttl <seconds>","New default TTL",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={id:n,context:s()};t.name&&(e.name=t.name),t.description&&(e.description=t.description),t.default!==void 0&&(e.isDefault=t.default),t.ttl!==void 0&&(e.ttlSeconds=t.ttl);let u=await b(Tc,{input:e});k("Template updated"),i(t,u.updateSandboxTemplate);}catch(e){h(e);}}),f.command("delete").description("Delete sandbox template").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await s$1("Delete this template?",t.force))return;await b(Uc,{context:s(),id:n}),k("Template deleted");}catch(e){h(e);}});let l=d.command("tags").description("Manage sandbox tags");l.command("list").description("List available sandbox tags").option("--query <q>","Search query").option("--limit <n>","Page size",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Vc,{query:n.query,limit:n.limit});i(n,t.availableSandboxTags);}catch(t){h(t);}}),l.command("create").description("Create a new sandbox tag").requiredOption("--label <label>","Tag label").option("--color <color>","Tag color").option("-f, --format <format>","Output format").action(async n=>{try{let t={label:n.label};n.color&&(t.color=n.color);let e=await b(Xc,{input:t});k("Tag created"),i(n,e.createSandboxTag);}catch(t){h(t);}}),l.command("attach").description("Attach a tag to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Yc,{input:{sandboxId:n.sandbox,tagId:n.tag}});k("Tag attached"),i(n,t.tagSandbox);}catch(t){h(t);}}),l.command("detach").description("Detach a tag from a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").action(async n=>{try{await b(Zc,{input:{sandboxId:n.sandbox,tagId:n.tag}}),k("Tag detached");}catch(t){h(t);}}),l.command("get").description("Get tags assigned to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Wc,{input:{sandboxId:n.sandbox}});i(n,t.getSandboxTags);}catch(t){h(t);}}),l.command("replace").description("Replace all tags on a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tags <ids...>","Tag IDs (space separated)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(_c,{input:{sandboxId:n.sandbox,tagIds:n.tags}});k("Tags replaced"),i(n,t.replaceSandboxTags);}catch(t){h(t);}});let m=d.command("admin").description("Admin / observability ops");m.command("nodes").description("List sandbox nodes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(ad,{context:s()});i(n,t.listSandboxNodes);}catch(t){h(t);}}),m.command("all").description("List all sandboxes (admin)").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.status&&(t.status=n.status.toUpperCase()),n.template&&(t.template=n.template.toUpperCase());let e=await b($c,{context:s(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n.limit,offset:0}});i(n,e.listAllSandboxes.items);}catch(t){h(t);}}),m.command("active").description("Get active sandboxes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(bd,{context:s()});i(n,t.getActiveSandboxes);}catch(t){h(t);}}),m.command("activity").description("Get recent sandbox activity").option("--limit <n>","Max items",parseInt,20).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(cd,{context:s(),limit:n.limit});i(n,t.getRecentSandboxActivity.items);}catch(t){h(t);}}),m.command("stats").description("Get sandbox stats").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(dd,{context:s()});i(n,t.getSandboxStats);}catch(t){h(t);}}),m.command("logs").description("Get logs for a sandbox container").argument("<id>").requiredOption("--container <name>","Container name").option("--tail <n>","Tail lines",parseInt,100).action(async(n,t)=>{try{let e=await b(ed,{context:s(),id:n,containerName:t.container,tailLines:t.tail});process.stdout.write(e.getSandboxLogs);}catch(e){h(e);}});let b$1=m.command("config").description("Sandbox config");b$1.command("get").description("Get sandbox config").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(fd,{context:s()});i(n,t.getSandboxConfig);}catch(t){h(t);}}),b$1.command("set").description("Update sandbox config").option("--default-ttl <seconds>","Default TTL",parseInt).option("--max-ttl <seconds>","Max TTL",parseInt).option("--max-per-user <n>","Max concurrent per user",parseInt).option("--max-per-workspace <n>","Max concurrent per workspace",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t={context:s()};n.defaultTtl!==void 0&&(t.defaultTtlSeconds=n.defaultTtl),n.maxTtl!==void 0&&(t.maxTtlSeconds=n.maxTtl),n.maxPerUser!==void 0&&(t.maxConcurrentPerUser=n.maxPerUser),n.maxPerWorkspace!==void 0&&(t.maxConcurrentPerWorkspace=n.maxPerWorkspace);let e=await b(gd,{input:t});k("Config updated"),i(n,e.updateSandboxConfig);}catch(t){h(t);}});}var K={id:"sandbox",version:"1.0.0",displayName:"Sandbox",dependsOn:["auth","workspaces"],register(p,d){a(d),$(p);}},it=K;export{it as default};
@@ -1,65 +1,65 @@
1
- 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var l=class extends Error{exitCode;hint;constructor(c,s){super(c),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}},m=class extends l{constructor(c,s){super(c,{exitCode:2,hint:s?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},f=class extends Error{cause;constructor(c,s){super(c),this.name="CliInternalError",this.cause=s;}};var C=null;function v(r){C=r;}function g(){if(!C)throw new f("vibecontrols module helpers used before setHelpersContext was called");return C}function le(){let r=g();if(!r.auth.isAuthenticated())throw new m("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function o(r,c){return le(),g().gql.workspace.request(r,c)}function i(r){let c=r instanceof Error?r.message:String(r);throw new l(c)}function d(r,c,s){g().output.formatAndOutput(r,c,s);}function u(r){g().output.printSuccess(r);}function b(r){return g().output.formatStatus(r)}function E(r){return g().output.formatDate(r)}function y(r,c){return g().output.truncate(r,c)}function A(){return g()}var O=`
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var u=class extends Error{exitCode;hint;constructor(a,o){super(a),this.name="CliUserError",this.exitCode=o?.exitCode??1,this.hint=o?.hint;}},m=class extends u{constructor(a,o){super(a,{exitCode:2,hint:o?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},f=class extends Error{cause;constructor(a,o){super(a),this.name="CliInternalError",this.cause=o;}};function I(r){if(r instanceof m||r instanceof u)return r;let a=b(r)&&b(r.response)?r.response:void 0,o=a?.errors,w=Array.isArray(o)?o[0]:void 0,g=(b(w)&&b(w.extensions)?w.extensions:void 0)?.code,h=a?.status;return g==="UNAUTHENTICATED"||h===401?new m("Authentication required."):g==="FORBIDDEN"||h===403?new u("Permission denied."):g==="BAD_USER_INPUT"||g==="GRAPHQL_VALIDATION_FAILED"||h===400?new u("Invalid request. Check the command arguments."):g==="NOT_FOUND"||h===404?new u("Requested resource was not found."):g==="RATE_LIMITED"||g==="TOO_MANY_REQUESTS"||h===429?new u("Request limit reached. Try again later."):new f("The request could not be completed. Try again later.")}var x=class extends Error{response;constructor(a,o){super(a),this.name="GqlRequestError",this.response=o;}};function b(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}var S=null;function R(r){S=r;}function E(){if(!S)throw new f("vibecontrols module helpers used before setHelpersContext was called");return S}function me(){let r=E();if(!r.auth.isAuthenticated())throw new m("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function i(r,a){return me(),E().gql.workspace.request(r,a)}function s(r){throw r instanceof m||r instanceof u||r instanceof f?r:r instanceof x||r!==null&&typeof r=="object"&&"response"in r?I(r):new f("The command could not be completed. Try again later.")}function p(r,a,o){E().output.formatAndOutput(r,a,o);}function d(r){E().output.printSuccess(r);}function A(r){return E().output.formatStatus(r)}function C(r){return E().output.formatDate(r)}function T(r,a){return E().output.truncate(r,a)}function $(){return E()}var L=`
2
2
  query ListScheduledJobs($workspaceId: ID!, $filter: JobFilterInput, $pagination: SchedulerPaginationInput) {
3
3
  scheduledJobs(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
4
4
  jobs { id name status scheduleType nextExecutionAt createdAt }
5
5
  total nextCursor
6
6
  }
7
7
  }
8
- `,D=`
8
+ `,_=`
9
9
  query GetScheduledJob($id: ID!) {
10
10
  scheduledJob(id: $id) {
11
11
  id name status scheduleType cronExpression executorType
12
12
  nextExecutionAt lastExecutionAt
13
13
  }
14
14
  }
15
- `,R=`
15
+ `,q=`
16
16
  mutation CreateScheduledJob($workspaceId: ID!, $input: CreateScheduledJobInput!) {
17
17
  createScheduledJob(workspaceId: $workspaceId, input: $input) {
18
18
  id name status scheduleType
19
19
  }
20
20
  }
21
- `,$=`
21
+ `,P=`
22
22
  mutation DeleteScheduledJob($id: ID!) {
23
23
  deleteScheduledJob(id: $id)
24
24
  }
25
- `,L=`
25
+ `,N=`
26
26
  query JobExecutions($jobId: ID!, $pagination: SchedulerPaginationInput) {
27
27
  jobExecutions(jobId: $jobId, pagination: $pagination) {
28
28
  executions { id status startedAt completedAt duration errorMessage success }
29
29
  total nextCursor
30
30
  }
31
31
  }
32
- `,_=`
32
+ `,U=`
33
33
  mutation PauseScheduledJob($id: ID!) {
34
34
  pauseScheduledJob(id: $id) { id name status }
35
35
  }
36
- `,q=`
36
+ `,J=`
37
37
  mutation ResumeScheduledJob($id: ID!) {
38
38
  resumeScheduledJob(id: $id) { id name status }
39
39
  }
40
- `,P=`
40
+ `,H=`
41
41
  mutation ActivateSchedule($id: ID!) {
42
42
  activateSchedule(id: $id) { id name status }
43
43
  }
44
- `,N=`
44
+ `,j=`
45
45
  mutation ArchiveSchedule($id: ID!) {
46
46
  archiveSchedule(id: $id) { id name status }
47
47
  }
48
- `,J=`
48
+ `,G=`
49
49
  mutation DisableSchedule($id: ID!, $reason: String) {
50
50
  disableSchedule(id: $id, reason: $reason) { id name status }
51
51
  }
52
- `,U=`
52
+ `,W=`
53
53
  mutation CloneSchedule($sourceId: ID!, $newWorkspaceId: ID, $overrides: CreateScheduledJobInput) {
54
54
  cloneSchedule(sourceId: $sourceId, newWorkspaceId: $newWorkspaceId, overrides: $overrides) {
55
55
  id name status
56
56
  }
57
57
  }
58
- `,j=`
58
+ `,M=`
59
59
  mutation ExecuteJobNow($id: ID!) {
60
60
  executeJobNow(id: $id) { id scheduledJobId status }
61
61
  }
62
- `,H=`
62
+ `,B=`
63
63
  query PreviewSchedule(
64
64
  $scheduleType: ScheduleType!
65
65
  $cronExpression: String
@@ -85,7 +85,7 @@
85
85
  count startDate endDate nextExecutions
86
86
  }
87
87
  }
88
- `,W=`
88
+ `,F=`
89
89
  query ScheduleTemplates(
90
90
  $workspaceId: ID!
91
91
  $filter: ScheduleTemplateFilterInput
@@ -96,47 +96,47 @@
96
96
  total nextCursor
97
97
  }
98
98
  }
99
- `,G=`
99
+ `,V=`
100
100
  query ScheduleTemplate($id: ID!) {
101
101
  scheduleTemplate(id: $id) {
102
102
  id name description category isPublic scheduleType executorType
103
103
  scheduleConfig executorConfig usageCount
104
104
  }
105
105
  }
106
- `,M=`
106
+ `,z=`
107
107
  mutation CreateScheduleTemplate($input: CreateScheduleTemplateInput!, $workspaceId: ID!) {
108
108
  createScheduleTemplate(input: $input, workspaceId: $workspaceId) { id name scheduleType }
109
109
  }
110
- `,B=`
110
+ `,K=`
111
111
  mutation UpdateScheduleTemplate($id: ID!, $input: UpdateScheduleTemplateInput!) {
112
112
  updateScheduleTemplate(id: $id, input: $input) { id name }
113
113
  }
114
- `,V=`
114
+ `,Y=`
115
115
  mutation DeleteScheduleTemplate($id: ID!) { deleteScheduleTemplate(id: $id) }
116
- `,F=`
116
+ `,Q=`
117
117
  query ScheduleVersionHistory($scheduleId: ID!) {
118
118
  scheduleVersionHistory(scheduleId: $scheduleId) {
119
119
  id scheduleId version changedBy changedFields changeReason createdAt
120
120
  }
121
121
  }
122
- `,z=`
122
+ `,X=`
123
123
  mutation RestoreScheduleVersion($scheduleId: ID!, $versionId: ID!) {
124
124
  restoreScheduleVersion(scheduleId: $scheduleId, versionId: $versionId) { id name version }
125
125
  }
126
- `,K=`
126
+ `,Z=`
127
127
  mutation TagScheduledJob($input: TagScheduledJobInput!) {
128
128
  tagScheduledJob(input: $input) { id entityId tagId source }
129
129
  }
130
- `,Y=`
130
+ `,ee=`
131
131
  mutation UntagScheduledJob($input: UntagScheduledJobInput!) {
132
132
  untagScheduledJob(input: $input)
133
133
  }
134
- `,Q=`
134
+ `,te=`
135
135
  mutation ReplaceScheduledJobTags($input: ReplaceScheduledJobTagsInput!) {
136
136
  replaceScheduledJobTags(input: $input) { id entityId tagId source }
137
137
  }
138
- `,X=`
138
+ `,ne=`
139
139
  query GetScheduledJobTags($input: GetScheduledJobTagsInput!) {
140
140
  getScheduledJobTags(input: $input) { id entityId tagId source }
141
141
  }
142
- `;function x(){let r=A().auth.read();if(!r?.workspaceId)throw new l("No workspace set. Run: vibecontrols workspace set <id>");return r.workspaceId}function Z(r){let c=r.command("scheduler").description("Scheduled jobs & executions"),s=c.command("jobs").description("Manage scheduled jobs");s.command("list").description("List scheduled jobs").option("--status <s>").option("--type <t>","CRON|INTERVAL|ONCE").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.type&&(t.scheduleType=e.type.toUpperCase());let n=await o(O,{workspaceId:x(),filter:Object.keys(t).length?t:void 0,pagination:{first:e.limit}});d(e,n.scheduledJobs.jobs,{headers:["ID","Name","Status","Type","NextRun","Created"],rows:n.scheduledJobs.jobs.map(a=>[y(a.id,12),a.name,b(a.status),a.scheduleType??"-",E(a.nextExecutionAt),E(a.createdAt)])});}catch(t){i(t);}}),s.command("get").description("Get a scheduled job").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await o(D,{id:e});if(!n.scheduledJob)throw new l(`Job ${e} not found`);d(t,n.scheduledJob);}catch(n){i(n);}}),s.command("create").description("Create a scheduled job").requiredOption("--name <name>").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").option("--cron <expr>","Cron expression (for CRON)").option("--interval-seconds <n>","",e=>parseInt(e,10)).option("--executor <e>","WEBHOOK|GRAPHQL|INTERNAL_API|NATS_TOPIC","WEBHOOK").option("--executor-config <json>","Executor config JSON","{}").option("-f, --format <format>").action(async e=>{try{let t={INTERVAL:"FIXED_INTERVAL",ONCE:"ONE_TIME"},n=e.type.toUpperCase(),a={name:e.name,scheduleType:t[n]??n,cronExpression:e.cron,intervalSeconds:e.intervalSeconds,executorType:(e.executor??"WEBHOOK").toUpperCase(),executorConfig:JSON.parse(e.executorConfig??"{}")},k=await o(R,{workspaceId:x(),input:a});u(`Job created: ${k.createScheduledJob.name}`),d(e,k.createScheduledJob);}catch(t){i(t);}}),s.command("delete").description("Delete a scheduled job").argument("<id>").action(async e=>{try{await o($,{id:e}),u("Job deleted");}catch(t){i(t);}});let ee=c.command("executions").description("Job execution history");s.command("pause").description("Pause a scheduled job").argument("<id>").action(async e=>{try{await o(_,{id:e}),u("Job paused");}catch(t){i(t);}}),s.command("resume").description("Resume a paused scheduled job").argument("<id>").action(async e=>{try{await o(q,{id:e}),u("Job resumed");}catch(t){i(t);}}),s.command("activate").description("Activate a draft or disabled schedule").argument("<id>").action(async e=>{try{await o(P,{id:e}),u("Schedule activated");}catch(t){i(t);}}),s.command("archive").description("Archive a scheduled job").argument("<id>").action(async e=>{try{await o(N,{id:e}),u("Schedule archived");}catch(t){i(t);}}),s.command("disable").description("Disable a schedule (with optional reason)").argument("<id>").option("--reason <r>").action(async(e,t)=>{try{await o(J,{id:e,reason:t.reason??null}),u("Schedule disabled");}catch(n){i(n);}}),s.command("clone").description("Clone a schedule (optionally to another workspace; overrides JSON)").argument("<sourceId>").option("--workspace <id>").option("--overrides <json>","Overrides JSON for CreateScheduledJobInput").option("-f, --format <format>").action(async(e,t)=>{try{let n=await o(U,{sourceId:e,newWorkspaceId:t.workspace??null,overrides:t.overrides?JSON.parse(t.overrides):null});u(`Cloned: ${n.cloneSchedule.id}`),d(t,n.cloneSchedule);}catch(n){i(n);}}),s.command("execute-now").description("Execute a scheduled job immediately").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await o(j,{id:e});u("Execution dispatched"),d(t,n.executeJobNow);}catch(n){i(n);}}),s.command("preview").description("Preview upcoming execution times without creating a job").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").option("--cron <expr>").option("--rrule <r>").option("--interval <n>","",e=>parseInt(e,10)).option("--interval-unit <u>","SECONDS|MINUTES|HOURS|DAYS").option("--count <n>","",e=>parseInt(e,10),5).option("--start <iso>").option("--end <iso>").option("--timezone <tz>").option("-f, --format <format>").action(async e=>{try{let t=await o(H,{scheduleType:e.type.toUpperCase(),cronExpression:e.cron??null,rrule:e.rrule??null,interval:e.interval??null,intervalUnit:e.intervalUnit??null,count:e.count??null,startDate:e.start??null,endDate:e.end??null,timezone:e.timezone??null});d(e,t.previewSchedule);}catch(t){i(t);}});let w=s.command("tags").description("Scheduled-job tag assignments");w.command("add").description("Tag a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").option("--source <s>").action(async e=>{try{let t={entityId:e.entity,tagId:e.tag};e.source&&(t.source=e.source),await o(K,{input:t}),u("Tagged");}catch(t){i(t);}}),w.command("remove").description("Remove a tag from a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").action(async e=>{try{await o(Y,{input:{entityId:e.entity,tagId:e.tag}}),u("Tag removed");}catch(t){i(t);}}),w.command("replace").description("Replace all tags on a scheduled job").requiredOption("--entity <id>").requiredOption("--tags <ids>","Comma-separated tag IDs").option("-f, --format <format>").action(async e=>{try{let t=await o(Q,{input:{entityId:e.entity,tagIds:e.tags.split(",")}});u("Tags replaced"),d(e,t.replaceScheduledJobTags);}catch(t){i(t);}}),w.command("list").description("List tags on a scheduled job").requiredOption("--entity <id>").option("-f, --format <format>").action(async e=>{try{let t=await o(X,{input:{entityId:e.entity}});d(e,t.getScheduledJobTags);}catch(t){i(t);}});let h=c.command("templates").description("Schedule templates");h.command("list").description("List schedule templates in the active workspace").option("--category <c>").option("--public","Only public templates").option("-f, --format <format>").action(async e=>{try{let t={};e.category&&(t.category=e.category),e.public!==void 0&&(t.isPublic=e.public);let n=await o(W,{workspaceId:x(),filter:Object.keys(t).length?t:void 0,pagination:{first:100}});d(e,n.scheduleTemplates.templates);}catch(t){i(t);}}),h.command("get").description("Get a schedule template").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await o(G,{id:e});if(!n.scheduleTemplate)throw new l(`Template ${e} not found`);d(t,n.scheduleTemplate);}catch(n){i(n);}}),h.command("create").description("Create a schedule template").requiredOption("--name <name>").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").requiredOption("--executor <e>","WEBHOOK|INTERNAL_API|NATS_TOPIC|GRAPHQL").requiredOption("--schedule-config <json>").requiredOption("--executor-config <json>").option("--description <d>").option("--category <c>").option("--public","Make template public").option("-f, --format <format>").action(async e=>{try{let t={name:e.name,scheduleType:e.type.toUpperCase(),executorType:e.executor.toUpperCase(),scheduleConfig:JSON.parse(e.scheduleConfig),executorConfig:JSON.parse(e.executorConfig)};e.description&&(t.description=e.description),e.category&&(t.category=e.category),e.public!==void 0&&(t.isPublic=e.public);let n=await o(M,{workspaceId:x(),input:t});u("Template created"),d(e,n.createScheduleTemplate);}catch(t){i(t);}}),h.command("update").description("Update a schedule template").argument("<id>").option("--name <name>").option("--description <d>").option("--category <c>").option("--public","Toggle public").option("-f, --format <format>").action(async(e,t)=>{try{let n={};if(t.name!==void 0&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.category!==void 0&&(n.category=t.category),t.public!==void 0&&(n.isPublic=t.public),Object.keys(n).length===0)throw new l("Provide at least one field to update");let a=await o(B,{id:e,input:n});u("Template updated"),d(t,a.updateScheduleTemplate);}catch(n){i(n);}}),h.command("delete").description("Delete a schedule template").argument("<id>").action(async e=>{try{await o(V,{id:e}),u("Template deleted");}catch(t){i(t);}});let T=c.command("versions").description("Schedule version history");T.command("list").description("List version history for a schedule").argument("<scheduleId>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await o(F,{scheduleId:e});d(t,n.scheduleVersionHistory,{headers:["ID","Version","ChangedBy","Reason","CreatedAt"],rows:n.scheduleVersionHistory.map(a=>[y(a.id,12),String(a.version),a.changedBy,a.changeReason??"-",E(a.createdAt)])});}catch(n){i(n);}}),T.command("restore").description("Restore a schedule to a prior version").requiredOption("--schedule <id>").requiredOption("--version <id>").option("-f, --format <format>").action(async e=>{try{let t=await o(z,{scheduleId:e.schedule,versionId:e.version});u("Version restored"),d(e,t.restoreScheduleVersion);}catch(t){i(t);}}),ee.command("list").description("List executions for a job").argument("<jobId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let n=await o(L,{jobId:e,pagination:{first:t.limit}});d(t,n.jobExecutions.executions,{headers:["ID","Status","Started","Duration","Success"],rows:n.jobExecutions.executions.map(a=>[y(a.id,12),b(a.status),E(a.startedAt),String(a.duration??"-"),String(!!a.success)])});}catch(n){i(n);}});}var fe={id:"scheduler",version:"1.0.0",displayName:"Scheduler",dependsOn:["auth","workspaces"],register(r,c){v(c),Z(r);}},St=fe;module.exports=St;
142
+ `;function k(){let r=$().auth.read();if(!r?.workspaceId)throw new u("No workspace set. Run: vibecontrols workspace set <id>");return r.workspaceId}function re(r){let a=r.command("scheduler").description("Scheduled jobs & executions"),o=a.command("jobs").description("Manage scheduled jobs");o.command("list").description("List scheduled jobs").option("--status <s>").option("--type <t>","CRON|INTERVAL|ONCE").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.type&&(t.scheduleType=e.type.toUpperCase());let n=await i(L,{workspaceId:k(),filter:Object.keys(t).length?t:void 0,pagination:{first:e.limit}});p(e,n.scheduledJobs.jobs,{headers:["ID","Name","Status","Type","NextRun","Created"],rows:n.scheduledJobs.jobs.map(c=>[T(c.id,12),c.name,A(c.status),c.scheduleType??"-",C(c.nextExecutionAt),C(c.createdAt)])});}catch(t){s(t);}}),o.command("get").description("Get a scheduled job").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await i(_,{id:e});if(!n.scheduledJob)throw new u(`Job ${e} not found`);p(t,n.scheduledJob);}catch(n){s(n);}}),o.command("create").description("Create a scheduled job").requiredOption("--name <name>").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").option("--cron <expr>","Cron expression (for CRON)").option("--interval-seconds <n>","",e=>parseInt(e,10)).option("--executor <e>","WEBHOOK|GRAPHQL|INTERNAL_API|NATS_TOPIC","WEBHOOK").option("--executor-config <json>","Executor config JSON","{}").option("-f, --format <format>").action(async e=>{try{let t={INTERVAL:"FIXED_INTERVAL",ONCE:"ONE_TIME"},n=e.type.toUpperCase(),c={name:e.name,scheduleType:t[n]??n,cronExpression:e.cron,intervalSeconds:e.intervalSeconds,executorType:(e.executor??"WEBHOOK").toUpperCase(),executorConfig:JSON.parse(e.executorConfig??"{}")},v=await i(q,{workspaceId:k(),input:c});d(`Job created: ${v.createScheduledJob.name}`),p(e,v.createScheduledJob);}catch(t){s(t);}}),o.command("delete").description("Delete a scheduled job").argument("<id>").action(async e=>{try{await i(P,{id:e}),d("Job deleted");}catch(t){s(t);}});let w=a.command("executions").description("Job execution history");o.command("pause").description("Pause a scheduled job").argument("<id>").action(async e=>{try{await i(U,{id:e}),d("Job paused");}catch(t){s(t);}}),o.command("resume").description("Resume a paused scheduled job").argument("<id>").action(async e=>{try{await i(J,{id:e}),d("Job resumed");}catch(t){s(t);}}),o.command("activate").description("Activate a draft or disabled schedule").argument("<id>").action(async e=>{try{await i(H,{id:e}),d("Schedule activated");}catch(t){s(t);}}),o.command("archive").description("Archive a scheduled job").argument("<id>").action(async e=>{try{await i(j,{id:e}),d("Schedule archived");}catch(t){s(t);}}),o.command("disable").description("Disable a schedule (with optional reason)").argument("<id>").option("--reason <r>").action(async(e,t)=>{try{await i(G,{id:e,reason:t.reason??null}),d("Schedule disabled");}catch(n){s(n);}}),o.command("clone").description("Clone a schedule (optionally to another workspace; overrides JSON)").argument("<sourceId>").option("--workspace <id>").option("--overrides <json>","Overrides JSON for CreateScheduledJobInput").option("-f, --format <format>").action(async(e,t)=>{try{let n=await i(W,{sourceId:e,newWorkspaceId:t.workspace??null,overrides:t.overrides?JSON.parse(t.overrides):null});d(`Cloned: ${n.cloneSchedule.id}`),p(t,n.cloneSchedule);}catch(n){s(n);}}),o.command("execute-now").description("Execute a scheduled job immediately").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await i(M,{id:e});d("Execution dispatched"),p(t,n.executeJobNow);}catch(n){s(n);}}),o.command("preview").description("Preview upcoming execution times without creating a job").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").option("--cron <expr>").option("--rrule <r>").option("--interval <n>","",e=>parseInt(e,10)).option("--interval-unit <u>","SECONDS|MINUTES|HOURS|DAYS").option("--count <n>","",e=>parseInt(e,10),5).option("--start <iso>").option("--end <iso>").option("--timezone <tz>").option("-f, --format <format>").action(async e=>{try{let t=await i(B,{scheduleType:e.type.toUpperCase(),cronExpression:e.cron??null,rrule:e.rrule??null,interval:e.interval??null,intervalUnit:e.intervalUnit??null,count:e.count??null,startDate:e.start??null,endDate:e.end??null,timezone:e.timezone??null});p(e,t.previewSchedule);}catch(t){s(t);}});let y=o.command("tags").description("Scheduled-job tag assignments");y.command("add").description("Tag a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").option("--source <s>").action(async e=>{try{let t={entityId:e.entity,tagId:e.tag};e.source&&(t.source=e.source),await i(Z,{input:t}),d("Tagged");}catch(t){s(t);}}),y.command("remove").description("Remove a tag from a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").action(async e=>{try{await i(ee,{input:{entityId:e.entity,tagId:e.tag}}),d("Tag removed");}catch(t){s(t);}}),y.command("replace").description("Replace all tags on a scheduled job").requiredOption("--entity <id>").requiredOption("--tags <ids>","Comma-separated tag IDs").option("-f, --format <format>").action(async e=>{try{let t=await i(te,{input:{entityId:e.entity,tagIds:e.tags.split(",")}});d("Tags replaced"),p(e,t.replaceScheduledJobTags);}catch(t){s(t);}}),y.command("list").description("List tags on a scheduled job").requiredOption("--entity <id>").option("-f, --format <format>").action(async e=>{try{let t=await i(ne,{input:{entityId:e.entity}});p(e,t.getScheduledJobTags);}catch(t){s(t);}});let g=a.command("templates").description("Schedule templates");g.command("list").description("List schedule templates in the active workspace").option("--category <c>").option("--public","Only public templates").option("-f, --format <format>").action(async e=>{try{let t={};e.category&&(t.category=e.category),e.public!==void 0&&(t.isPublic=e.public);let n=await i(F,{workspaceId:k(),filter:Object.keys(t).length?t:void 0,pagination:{first:100}});p(e,n.scheduleTemplates.templates);}catch(t){s(t);}}),g.command("get").description("Get a schedule template").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await i(V,{id:e});if(!n.scheduleTemplate)throw new u(`Template ${e} not found`);p(t,n.scheduleTemplate);}catch(n){s(n);}}),g.command("create").description("Create a schedule template").requiredOption("--name <name>").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").requiredOption("--executor <e>","WEBHOOK|INTERNAL_API|NATS_TOPIC|GRAPHQL").requiredOption("--schedule-config <json>").requiredOption("--executor-config <json>").option("--description <d>").option("--category <c>").option("--public","Make template public").option("-f, --format <format>").action(async e=>{try{let t={name:e.name,scheduleType:e.type.toUpperCase(),executorType:e.executor.toUpperCase(),scheduleConfig:JSON.parse(e.scheduleConfig),executorConfig:JSON.parse(e.executorConfig)};e.description&&(t.description=e.description),e.category&&(t.category=e.category),e.public!==void 0&&(t.isPublic=e.public);let n=await i(z,{workspaceId:k(),input:t});d("Template created"),p(e,n.createScheduleTemplate);}catch(t){s(t);}}),g.command("update").description("Update a schedule template").argument("<id>").option("--name <name>").option("--description <d>").option("--category <c>").option("--public","Toggle public").option("-f, --format <format>").action(async(e,t)=>{try{let n={};if(t.name!==void 0&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.category!==void 0&&(n.category=t.category),t.public!==void 0&&(n.isPublic=t.public),Object.keys(n).length===0)throw new u("Provide at least one field to update");let c=await i(K,{id:e,input:n});d("Template updated"),p(t,c.updateScheduleTemplate);}catch(n){s(n);}}),g.command("delete").description("Delete a schedule template").argument("<id>").action(async e=>{try{await i(Y,{id:e}),d("Template deleted");}catch(t){s(t);}});let h=a.command("versions").description("Schedule version history");h.command("list").description("List version history for a schedule").argument("<scheduleId>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await i(Q,{scheduleId:e});p(t,n.scheduleVersionHistory,{headers:["ID","Version","ChangedBy","Reason","CreatedAt"],rows:n.scheduleVersionHistory.map(c=>[T(c.id,12),String(c.version),c.changedBy,c.changeReason??"-",C(c.createdAt)])});}catch(n){s(n);}}),h.command("restore").description("Restore a schedule to a prior version").requiredOption("--schedule <id>").requiredOption("--version <id>").option("-f, --format <format>").action(async e=>{try{let t=await i(X,{scheduleId:e.schedule,versionId:e.version});d("Version restored"),p(e,t.restoreScheduleVersion);}catch(t){s(t);}}),w.command("list").description("List executions for a job").argument("<jobId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let n=await i(N,{jobId:e,pagination:{first:t.limit}});p(t,n.jobExecutions.executions,{headers:["ID","Status","Started","Duration","Success"],rows:n.jobExecutions.executions.map(c=>[T(c.id,12),A(c.status),C(c.startedAt),String(c.duration??"-"),String(!!c.success)])});}catch(n){s(n);}});}var Ee={id:"scheduler",version:"1.0.0",displayName:"Scheduler",dependsOn:["auth","workspaces"],register(r,a){R(a),re(r);}},Ot=Ee;module.exports=Ot;
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-BNVKV_pI.cjs';
1
+ import { C as CliModule } from '../../module-DWSAfs3k.cjs';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-BNVKV_pI.js';
1
+ import { C as CliModule } from '../../module-DWSAfs3k.js';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import {a,b,i,r,p,q as q$1,h as h$1,k as k$1,u}from'../../chunk-3ZVMC2AF.js';import {q as q$2}from'../../chunk-ZT6KOG7N.js';var C=`
1
+ import {a,b,i,r,p,q as q$1,h as h$1,k as k$1,u}from'../../chunk-BGNPGKJM.js';import {j as j$1}from'../../chunk-N7EXKGE2.js';var C=`
2
2
  query ListScheduledJobs($workspaceId: ID!, $filter: JobFilterInput, $pagination: SchedulerPaginationInput) {
3
3
  scheduledJobs(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
4
4
  jobs { id name status scheduleType nextExecutionAt createdAt }
@@ -139,4 +139,4 @@ import {a,b,i,r,p,q as q$1,h as h$1,k as k$1,u}from'../../chunk-3ZVMC2AF.js';imp
139
139
  query GetScheduledJobTags($input: GetScheduledJobTagsInput!) {
140
140
  getScheduledJobTags(input: $input) { id entityId tagId source }
141
141
  }
142
- `;function h(){let d=u().auth.read();if(!d?.workspaceId)throw new q$2("No workspace set. Run: vibecontrols workspace set <id>");return d.workspaceId}function X(d){let u=d.command("scheduler").description("Scheduled jobs & executions"),c=u.command("jobs").description("Manage scheduled jobs");c.command("list").description("List scheduled jobs").option("--status <s>").option("--type <t>","CRON|INTERVAL|ONCE").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.type&&(t.scheduleType=e.type.toUpperCase());let n=await b(C,{workspaceId:h(),filter:Object.keys(t).length?t:void 0,pagination:{first:e.limit}});i(e,n.scheduledJobs.jobs,{headers:["ID","Name","Status","Type","NextRun","Created"],rows:n.scheduledJobs.jobs.map(r$1=>[r(r$1.id,12),r$1.name,p(r$1.status),r$1.scheduleType??"-",q$1(r$1.nextExecutionAt),q$1(r$1.createdAt)])});}catch(t){h$1(t);}}),c.command("get").description("Get a scheduled job").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(x,{id:e});if(!n.scheduledJob)throw new q$2(`Job ${e} not found`);i(t,n.scheduledJob);}catch(n){h$1(n);}}),c.command("create").description("Create a scheduled job").requiredOption("--name <name>").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").option("--cron <expr>","Cron expression (for CRON)").option("--interval-seconds <n>","",e=>parseInt(e,10)).option("--executor <e>","WEBHOOK|GRAPHQL|INTERNAL_API|NATS_TOPIC","WEBHOOK").option("--executor-config <json>","Executor config JSON","{}").option("-f, --format <format>").action(async e=>{try{let t={INTERVAL:"FIXED_INTERVAL",ONCE:"ONE_TIME"},n=e.type.toUpperCase(),r={name:e.name,scheduleType:t[n]??n,cronExpression:e.cron,intervalSeconds:e.intervalSeconds,executorType:(e.executor??"WEBHOOK").toUpperCase(),executorConfig:JSON.parse(e.executorConfig??"{}")},I=await b(w,{workspaceId:h(),input:r});k$1(`Job created: ${I.createScheduledJob.name}`),i(e,I.createScheduledJob);}catch(t){h$1(t);}}),c.command("delete").description("Delete a scheduled job").argument("<id>").action(async e=>{try{await b(_,{id:e}),k$1("Job deleted");}catch(t){h$1(t);}});let F=u.command("executions").description("Job execution history");c.command("pause").description("Pause a scheduled job").argument("<id>").action(async e=>{try{await b($,{id:e}),k$1("Job paused");}catch(t){h$1(t);}}),c.command("resume").description("Resume a paused scheduled job").argument("<id>").action(async e=>{try{await b(J,{id:e}),k$1("Job resumed");}catch(t){h$1(t);}}),c.command("activate").description("Activate a draft or disabled schedule").argument("<id>").action(async e=>{try{await b(L,{id:e}),k$1("Schedule activated");}catch(t){h$1(t);}}),c.command("archive").description("Archive a scheduled job").argument("<id>").action(async e=>{try{await b(R,{id:e}),k$1("Schedule archived");}catch(t){h$1(t);}}),c.command("disable").description("Disable a schedule (with optional reason)").argument("<id>").option("--reason <r>").action(async(e,t)=>{try{await b(U,{id:e,reason:t.reason??null}),k$1("Schedule disabled");}catch(n){h$1(n);}}),c.command("clone").description("Clone a schedule (optionally to another workspace; overrides JSON)").argument("<sourceId>").option("--workspace <id>").option("--overrides <json>","Overrides JSON for CreateScheduledJobInput").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(A,{sourceId:e,newWorkspaceId:t.workspace??null,overrides:t.overrides?JSON.parse(t.overrides):null});k$1(`Cloned: ${n.cloneSchedule.id}`),i(t,n.cloneSchedule);}catch(n){h$1(n);}}),c.command("execute-now").description("Execute a scheduled job immediately").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(v,{id:e});k$1("Execution dispatched"),i(t,n.executeJobNow);}catch(n){h$1(n);}}),c.command("preview").description("Preview upcoming execution times without creating a job").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").option("--cron <expr>").option("--rrule <r>").option("--interval <n>","",e=>parseInt(e,10)).option("--interval-unit <u>","SECONDS|MINUTES|HOURS|DAYS").option("--count <n>","",e=>parseInt(e,10),5).option("--start <iso>").option("--end <iso>").option("--timezone <tz>").option("-f, --format <format>").action(async e=>{try{let t=await b(H,{scheduleType:e.type.toUpperCase(),cronExpression:e.cron??null,rrule:e.rrule??null,interval:e.interval??null,intervalUnit:e.intervalUnit??null,count:e.count??null,startDate:e.start??null,endDate:e.end??null,timezone:e.timezone??null});i(e,t.previewSchedule);}catch(t){h$1(t);}});let g=c.command("tags").description("Scheduled-job tag assignments");g.command("add").description("Tag a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").option("--source <s>").action(async e=>{try{let t={entityId:e.entity,tagId:e.tag};e.source&&(t.source=e.source),await b(M,{input:t}),k$1("Tagged");}catch(t){h$1(t);}}),g.command("remove").description("Remove a tag from a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").action(async e=>{try{await b(G,{input:{entityId:e.entity,tagId:e.tag}}),k$1("Tag removed");}catch(t){h$1(t);}}),g.command("replace").description("Replace all tags on a scheduled job").requiredOption("--entity <id>").requiredOption("--tags <ids>","Comma-separated tag IDs").option("-f, --format <format>").action(async e=>{try{let t=await b(W,{input:{entityId:e.entity,tagIds:e.tags.split(",")}});k$1("Tags replaced"),i(e,t.replaceScheduledJobTags);}catch(t){h$1(t);}}),g.command("list").description("List tags on a scheduled job").requiredOption("--entity <id>").option("-f, --format <format>").action(async e=>{try{let t=await b(z,{input:{entityId:e.entity}});i(e,t.getScheduledJobTags);}catch(t){h$1(t);}});let p$1=u.command("templates").description("Schedule templates");p$1.command("list").description("List schedule templates in the active workspace").option("--category <c>").option("--public","Only public templates").option("-f, --format <format>").action(async e=>{try{let t={};e.category&&(t.category=e.category),e.public!==void 0&&(t.isPublic=e.public);let n=await b(N,{workspaceId:h(),filter:Object.keys(t).length?t:void 0,pagination:{first:100}});i(e,n.scheduleTemplates.templates);}catch(t){h$1(t);}}),p$1.command("get").description("Get a schedule template").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(k,{id:e});if(!n.scheduleTemplate)throw new q$2(`Template ${e} not found`);i(t,n.scheduleTemplate);}catch(n){h$1(n);}}),p$1.command("create").description("Create a schedule template").requiredOption("--name <name>").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").requiredOption("--executor <e>","WEBHOOK|INTERNAL_API|NATS_TOPIC|GRAPHQL").requiredOption("--schedule-config <json>").requiredOption("--executor-config <json>").option("--description <d>").option("--category <c>").option("--public","Make template public").option("-f, --format <format>").action(async e=>{try{let t={name:e.name,scheduleType:e.type.toUpperCase(),executorType:e.executor.toUpperCase(),scheduleConfig:JSON.parse(e.scheduleConfig),executorConfig:JSON.parse(e.executorConfig)};e.description&&(t.description=e.description),e.category&&(t.category=e.category),e.public!==void 0&&(t.isPublic=e.public);let n=await b(P,{workspaceId:h(),input:t});k$1("Template created"),i(e,n.createScheduleTemplate);}catch(t){h$1(t);}}),p$1.command("update").description("Update a schedule template").argument("<id>").option("--name <name>").option("--description <d>").option("--category <c>").option("--public","Toggle public").option("-f, --format <format>").action(async(e,t)=>{try{let n={};if(t.name!==void 0&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.category!==void 0&&(n.category=t.category),t.public!==void 0&&(n.isPublic=t.public),Object.keys(n).length===0)throw new q$2("Provide at least one field to update");let r=await b(j,{id:e,input:n});k$1("Template updated"),i(t,r.updateScheduleTemplate);}catch(n){h$1(n);}}),p$1.command("delete").description("Delete a schedule template").argument("<id>").action(async e=>{try{await b(B,{id:e}),k$1("Template deleted");}catch(t){h$1(t);}});let y=u.command("versions").description("Schedule version history");y.command("list").description("List version history for a schedule").argument("<scheduleId>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(V,{scheduleId:e});i(t,n.scheduleVersionHistory,{headers:["ID","Version","ChangedBy","Reason","CreatedAt"],rows:n.scheduleVersionHistory.map(r$1=>[r(r$1.id,12),String(r$1.version),r$1.changedBy,r$1.changeReason??"-",q$1(r$1.createdAt)])});}catch(n){h$1(n);}}),y.command("restore").description("Restore a schedule to a prior version").requiredOption("--schedule <id>").requiredOption("--version <id>").option("-f, --format <format>").action(async e=>{try{let t=await b(q,{scheduleId:e.schedule,versionId:e.version});k$1("Version restored"),i(e,t.restoreScheduleVersion);}catch(t){h$1(t);}}),F.command("list").description("List executions for a job").argument("<jobId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(O,{jobId:e,pagination:{first:t.limit}});i(t,n.jobExecutions.executions,{headers:["ID","Status","Started","Duration","Success"],rows:n.jobExecutions.executions.map(r$1=>[r(r$1.id,12),p(r$1.status),q$1(r$1.startedAt),String(r$1.duration??"-"),String(!!r$1.success)])});}catch(n){h$1(n);}});}var Y={id:"scheduler",version:"1.0.0",displayName:"Scheduler",dependsOn:["auth","workspaces"],register(d,u){a(u),X(d);}},ie=Y;export{ie as default};
142
+ `;function h(){let d=u().auth.read();if(!d?.workspaceId)throw new j$1("No workspace set. Run: vibecontrols workspace set <id>");return d.workspaceId}function X(d){let u=d.command("scheduler").description("Scheduled jobs & executions"),c=u.command("jobs").description("Manage scheduled jobs");c.command("list").description("List scheduled jobs").option("--status <s>").option("--type <t>","CRON|INTERVAL|ONCE").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.type&&(t.scheduleType=e.type.toUpperCase());let n=await b(C,{workspaceId:h(),filter:Object.keys(t).length?t:void 0,pagination:{first:e.limit}});i(e,n.scheduledJobs.jobs,{headers:["ID","Name","Status","Type","NextRun","Created"],rows:n.scheduledJobs.jobs.map(r$1=>[r(r$1.id,12),r$1.name,p(r$1.status),r$1.scheduleType??"-",q$1(r$1.nextExecutionAt),q$1(r$1.createdAt)])});}catch(t){h$1(t);}}),c.command("get").description("Get a scheduled job").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(x,{id:e});if(!n.scheduledJob)throw new j$1(`Job ${e} not found`);i(t,n.scheduledJob);}catch(n){h$1(n);}}),c.command("create").description("Create a scheduled job").requiredOption("--name <name>").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").option("--cron <expr>","Cron expression (for CRON)").option("--interval-seconds <n>","",e=>parseInt(e,10)).option("--executor <e>","WEBHOOK|GRAPHQL|INTERNAL_API|NATS_TOPIC","WEBHOOK").option("--executor-config <json>","Executor config JSON","{}").option("-f, --format <format>").action(async e=>{try{let t={INTERVAL:"FIXED_INTERVAL",ONCE:"ONE_TIME"},n=e.type.toUpperCase(),r={name:e.name,scheduleType:t[n]??n,cronExpression:e.cron,intervalSeconds:e.intervalSeconds,executorType:(e.executor??"WEBHOOK").toUpperCase(),executorConfig:JSON.parse(e.executorConfig??"{}")},I=await b(w,{workspaceId:h(),input:r});k$1(`Job created: ${I.createScheduledJob.name}`),i(e,I.createScheduledJob);}catch(t){h$1(t);}}),c.command("delete").description("Delete a scheduled job").argument("<id>").action(async e=>{try{await b(_,{id:e}),k$1("Job deleted");}catch(t){h$1(t);}});let F=u.command("executions").description("Job execution history");c.command("pause").description("Pause a scheduled job").argument("<id>").action(async e=>{try{await b($,{id:e}),k$1("Job paused");}catch(t){h$1(t);}}),c.command("resume").description("Resume a paused scheduled job").argument("<id>").action(async e=>{try{await b(J,{id:e}),k$1("Job resumed");}catch(t){h$1(t);}}),c.command("activate").description("Activate a draft or disabled schedule").argument("<id>").action(async e=>{try{await b(L,{id:e}),k$1("Schedule activated");}catch(t){h$1(t);}}),c.command("archive").description("Archive a scheduled job").argument("<id>").action(async e=>{try{await b(R,{id:e}),k$1("Schedule archived");}catch(t){h$1(t);}}),c.command("disable").description("Disable a schedule (with optional reason)").argument("<id>").option("--reason <r>").action(async(e,t)=>{try{await b(U,{id:e,reason:t.reason??null}),k$1("Schedule disabled");}catch(n){h$1(n);}}),c.command("clone").description("Clone a schedule (optionally to another workspace; overrides JSON)").argument("<sourceId>").option("--workspace <id>").option("--overrides <json>","Overrides JSON for CreateScheduledJobInput").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(A,{sourceId:e,newWorkspaceId:t.workspace??null,overrides:t.overrides?JSON.parse(t.overrides):null});k$1(`Cloned: ${n.cloneSchedule.id}`),i(t,n.cloneSchedule);}catch(n){h$1(n);}}),c.command("execute-now").description("Execute a scheduled job immediately").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(v,{id:e});k$1("Execution dispatched"),i(t,n.executeJobNow);}catch(n){h$1(n);}}),c.command("preview").description("Preview upcoming execution times without creating a job").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").option("--cron <expr>").option("--rrule <r>").option("--interval <n>","",e=>parseInt(e,10)).option("--interval-unit <u>","SECONDS|MINUTES|HOURS|DAYS").option("--count <n>","",e=>parseInt(e,10),5).option("--start <iso>").option("--end <iso>").option("--timezone <tz>").option("-f, --format <format>").action(async e=>{try{let t=await b(H,{scheduleType:e.type.toUpperCase(),cronExpression:e.cron??null,rrule:e.rrule??null,interval:e.interval??null,intervalUnit:e.intervalUnit??null,count:e.count??null,startDate:e.start??null,endDate:e.end??null,timezone:e.timezone??null});i(e,t.previewSchedule);}catch(t){h$1(t);}});let g=c.command("tags").description("Scheduled-job tag assignments");g.command("add").description("Tag a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").option("--source <s>").action(async e=>{try{let t={entityId:e.entity,tagId:e.tag};e.source&&(t.source=e.source),await b(M,{input:t}),k$1("Tagged");}catch(t){h$1(t);}}),g.command("remove").description("Remove a tag from a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").action(async e=>{try{await b(G,{input:{entityId:e.entity,tagId:e.tag}}),k$1("Tag removed");}catch(t){h$1(t);}}),g.command("replace").description("Replace all tags on a scheduled job").requiredOption("--entity <id>").requiredOption("--tags <ids>","Comma-separated tag IDs").option("-f, --format <format>").action(async e=>{try{let t=await b(W,{input:{entityId:e.entity,tagIds:e.tags.split(",")}});k$1("Tags replaced"),i(e,t.replaceScheduledJobTags);}catch(t){h$1(t);}}),g.command("list").description("List tags on a scheduled job").requiredOption("--entity <id>").option("-f, --format <format>").action(async e=>{try{let t=await b(z,{input:{entityId:e.entity}});i(e,t.getScheduledJobTags);}catch(t){h$1(t);}});let p$1=u.command("templates").description("Schedule templates");p$1.command("list").description("List schedule templates in the active workspace").option("--category <c>").option("--public","Only public templates").option("-f, --format <format>").action(async e=>{try{let t={};e.category&&(t.category=e.category),e.public!==void 0&&(t.isPublic=e.public);let n=await b(N,{workspaceId:h(),filter:Object.keys(t).length?t:void 0,pagination:{first:100}});i(e,n.scheduleTemplates.templates);}catch(t){h$1(t);}}),p$1.command("get").description("Get a schedule template").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(k,{id:e});if(!n.scheduleTemplate)throw new j$1(`Template ${e} not found`);i(t,n.scheduleTemplate);}catch(n){h$1(n);}}),p$1.command("create").description("Create a schedule template").requiredOption("--name <name>").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").requiredOption("--executor <e>","WEBHOOK|INTERNAL_API|NATS_TOPIC|GRAPHQL").requiredOption("--schedule-config <json>").requiredOption("--executor-config <json>").option("--description <d>").option("--category <c>").option("--public","Make template public").option("-f, --format <format>").action(async e=>{try{let t={name:e.name,scheduleType:e.type.toUpperCase(),executorType:e.executor.toUpperCase(),scheduleConfig:JSON.parse(e.scheduleConfig),executorConfig:JSON.parse(e.executorConfig)};e.description&&(t.description=e.description),e.category&&(t.category=e.category),e.public!==void 0&&(t.isPublic=e.public);let n=await b(P,{workspaceId:h(),input:t});k$1("Template created"),i(e,n.createScheduleTemplate);}catch(t){h$1(t);}}),p$1.command("update").description("Update a schedule template").argument("<id>").option("--name <name>").option("--description <d>").option("--category <c>").option("--public","Toggle public").option("-f, --format <format>").action(async(e,t)=>{try{let n={};if(t.name!==void 0&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.category!==void 0&&(n.category=t.category),t.public!==void 0&&(n.isPublic=t.public),Object.keys(n).length===0)throw new j$1("Provide at least one field to update");let r=await b(j,{id:e,input:n});k$1("Template updated"),i(t,r.updateScheduleTemplate);}catch(n){h$1(n);}}),p$1.command("delete").description("Delete a schedule template").argument("<id>").action(async e=>{try{await b(B,{id:e}),k$1("Template deleted");}catch(t){h$1(t);}});let y=u.command("versions").description("Schedule version history");y.command("list").description("List version history for a schedule").argument("<scheduleId>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(V,{scheduleId:e});i(t,n.scheduleVersionHistory,{headers:["ID","Version","ChangedBy","Reason","CreatedAt"],rows:n.scheduleVersionHistory.map(r$1=>[r(r$1.id,12),String(r$1.version),r$1.changedBy,r$1.changeReason??"-",q$1(r$1.createdAt)])});}catch(n){h$1(n);}}),y.command("restore").description("Restore a schedule to a prior version").requiredOption("--schedule <id>").requiredOption("--version <id>").option("-f, --format <format>").action(async e=>{try{let t=await b(q,{scheduleId:e.schedule,versionId:e.version});k$1("Version restored"),i(e,t.restoreScheduleVersion);}catch(t){h$1(t);}}),F.command("list").description("List executions for a job").argument("<jobId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(O,{jobId:e,pagination:{first:t.limit}});i(t,n.jobExecutions.executions,{headers:["ID","Status","Started","Duration","Success"],rows:n.jobExecutions.executions.map(r$1=>[r(r$1.id,12),p(r$1.status),q$1(r$1.startedAt),String(r$1.duration??"-"),String(!!r$1.success)])});}catch(n){h$1(n);}});}var Y={id:"scheduler",version:"1.0.0",displayName:"Scheduler",dependsOn:["auth","workspaces"],register(d,u){a(u),X(d);}},ie=Y;export{ie as default};
@@ -1,75 +1,75 @@
1
- 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var c=class extends Error{exitCode;hint;constructor(o,s){super(o),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}},w=class extends c{constructor(o,s){super(o,{exitCode:2,hint:s?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},g=class extends Error{cause;constructor(o,s){super(o),this.name="CliInternalError",this.cause=s;}};var k=null;function b(r){k=r;}function f(){if(!k)throw new g("vibecontrols module helpers used before setHelpersContext was called");return k}function ee(){let r=f();if(!r.auth.isAuthenticated())throw new w("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function u(r,o){return ee(),f().gql.workspace.request(r,o)}function p(r){let o=r instanceof Error?r.message:String(r);throw new c(o)}function d(r,o,s){f().output.formatAndOutput(r,o,s);}function l(r){f().output.printSuccess(r);}function y(r){return f().output.formatStatus(r)}function C(r){return f().output.formatDate(r)}function x(r,o){return f().output.truncate(r,o)}function v(){return f()}var I=`
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var s=class extends Error{exitCode;hint;constructor(o,a){super(o),this.name="CliUserError",this.exitCode=a?.exitCode??1,this.hint=a?.hint;}},f=class extends s{constructor(o,a){super(o,{exitCode:2,hint:a?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},d=class extends Error{cause;constructor(o,a){super(o),this.name="CliInternalError",this.cause=a;}};function C(n){if(n instanceof f||n instanceof s)return n;let o=y(n)&&y(n.response)?n.response:void 0,a=o?.errors,l=Array.isArray(a)?a[0]:void 0,t=(y(l)&&y(l.extensions)?l.extensions:void 0)?.code,r=o?.status;return t==="UNAUTHENTICATED"||r===401?new f("Authentication required."):t==="FORBIDDEN"||r===403?new s("Permission denied."):t==="BAD_USER_INPUT"||t==="GRAPHQL_VALIDATION_FAILED"||r===400?new s("Invalid request. Check the command arguments."):t==="NOT_FOUND"||r===404?new s("Requested resource was not found."):t==="RATE_LIMITED"||t==="TOO_MANY_REQUESTS"||r===429?new s("Request limit reached. Try again later."):new d("The request could not be completed. Try again later.")}var h=class extends Error{response;constructor(o,a){super(o),this.name="GqlRequestError",this.response=a;}};function y(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}var x=null;function v(n){x=n;}function w(){if(!x)throw new d("vibecontrols module helpers used before setHelpersContext was called");return x}function re(){let n=w();if(!n.auth.isAuthenticated())throw new f("Authentication required.",{hint:`Run \`${n.productName} auth login\` to authenticate.`})}async function u(n,o){return re(),w().gql.workspace.request(n,o)}function p(n){throw n instanceof f||n instanceof s||n instanceof d?n:n instanceof h||n!==null&&typeof n=="object"&&"response"in n?C(n):new d("The command could not be completed. Try again later.")}function g(n,o,a){w().output.formatAndOutput(n,o,a);}function m(n){w().output.printSuccess(n);}function E(n){return w().output.formatStatus(n)}function T(n){return w().output.formatDate(n)}function b(n,o){return w().output.truncate(n,o)}function S(){return w()}var R=`
2
2
  query GetVaults($filter: VaultFilterInput, $pagination: SecurityPaginationInput) {
3
3
  getVaults(filter: $filter, pagination: $pagination) {
4
4
  items { id name description scope status createdAt }
5
5
  total hasMore
6
6
  }
7
7
  }
8
- `,A=`
8
+ `,O=`
9
9
  query GetVault($id: ID!) {
10
10
  getVault(id: $id) {
11
11
  id name description scope scopeId status lockAfterMinutes createdAt updatedAt
12
12
  }
13
13
  }
14
- `,S=`
14
+ `,q=`
15
15
  mutation CreateVault($input: CreateVaultInput!) {
16
16
  createVault(input: $input) {
17
17
  id name scope scopeId status
18
18
  }
19
19
  }
20
- `,R=`
20
+ `,$=`
21
21
  mutation UpdateVault($id: ID!, $input: UpdateVaultInput!) {
22
22
  updateVault(id: $id, input: $input) {
23
23
  id name scope scopeId status
24
24
  }
25
25
  }
26
- `,O=`
26
+ `,D=`
27
27
  mutation DeleteVault($id: ID!) {
28
28
  deleteVault(id: $id)
29
29
  }
30
- `,$=`
30
+ `,P=`
31
31
  mutation ArchiveVault($id: ID!) {
32
32
  archiveVault(id: $id) { id status }
33
33
  }
34
- `,q=`
34
+ `,L=`
35
35
  query GetSecrets($vaultId: ID!, $filter: SecretFilterInput, $pagination: SecurityPaginationInput) {
36
36
  getSecrets(vaultId: $vaultId, filter: $filter, pagination: $pagination) {
37
37
  items { id key name description type status isEphemeral createdAt }
38
38
  total hasMore
39
39
  }
40
40
  }
41
- `,D=`
41
+ `,_=`
42
42
  query GetSecret($id: ID!) {
43
43
  getSecret(id: $id) {
44
44
  id key name description type status isEphemeral expiresAt createdAt updatedAt
45
45
  }
46
46
  }
47
- `,P=`
47
+ `,V=`
48
48
  query DecryptSecret($id: ID!) {
49
49
  decryptSecret(id: $id) {
50
50
  id key value
51
51
  }
52
52
  }
53
- `,L=`
53
+ `,N=`
54
54
  mutation CreateSecret($input: CreateSecretInput!) {
55
55
  createSecret(input: $input) {
56
56
  id key name type status
57
57
  }
58
58
  }
59
- `,V=`
59
+ `,G=`
60
60
  mutation UpdateSecret($id: ID!, $input: UpdateSecretInput!) {
61
61
  updateSecret(id: $id, input: $input) {
62
62
  id key name status updatedAt
63
63
  }
64
64
  }
65
- `,_=`
65
+ `,U=`
66
66
  mutation DeleteSecret($id: ID!) {
67
67
  deleteSecret(id: $id)
68
68
  }
69
- `,G=`
69
+ `,W=`
70
70
  mutation RotateSecret($id: ID!, $newValue: String!) {
71
71
  rotateSecret(id: $id, newValue: $newValue) {
72
72
  id key updatedAt
73
73
  }
74
74
  }
75
- `;function h(){let r=v().auth.read();if(!r?.workspaceId)throw new c("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:r.workspaceId}}async function N(){if(process.stdin.isTTY)throw new c('Pipe the secret value via stdin (e.g. `echo -n "value" | vibecontrols security secrets set ...`).');let r=[];for await(let o of process.stdin)r.push(Buffer.isBuffer(o)?o:Buffer.from(o));return Buffer.concat(r).toString("utf8")}function W(r){let o=r.command("security").description("Security: vaults & secrets"),s=o.command("vaults").description("Vault management");s.command("list").description("List vaults").option("--scope <s>","WORKSPACE|GLOBAL|VIBE").option("--status <s>").option("--search <q>").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={context:h()};e.scope&&(t.scope=e.scope.toUpperCase()),e.status&&(t.status=e.status.toUpperCase()),e.search&&(t.search=e.search);let n=await u(I,{filter:t,pagination:{limit:e.limit,offset:0}});d(e,n.getVaults.items,{headers:["ID","Name","Scope","Status","Created"],rows:n.getVaults.items.map(i=>[x(i.id,12),i.name,i.scope??"-",y(i.status),C(i.createdAt)])});}catch(t){p(t);}}),s.command("get").description("Get a vault").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await u(A,{id:e});if(!n.getVault)throw new c(`Vault ${e} not found`);d(t,n.getVault);}catch(n){p(n);}}),s.command("create").description("Create a vault").requiredOption("--name <name>").option("--description <s>").option("--scope <s>","WORKSPACE|GLOBAL|VIBE","WORKSPACE").option("--scope-id <id>","Scope id (defaults to current workspace)").option("--lock-after <minutes>","Auto-lock after N minutes",e=>parseInt(e,10)).option("-f, --format <format>").action(async e=>{try{let t=h(),n={context:t,name:e.name,description:e.description,scope:(e.scope??"WORKSPACE").toUpperCase(),scopeId:e.scopeId??t.workspaceId,lockAfterMinutes:e.lockAfter},i=await u(S,{input:n});l(`Vault created: ${i.createVault.name}`),d(e,i.createVault);}catch(t){p(t);}}),s.command("update").description("Update a vault").argument("<id>").option("--name <s>").option("--description <s>").option("--lock-after <minutes>","Auto-lock after N minutes",e=>parseInt(e,10)).option("-f, --format <format>").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.lockAfter!==void 0&&(n.lockAfterMinutes=t.lockAfter),!Object.keys(n).length)throw new c("No updates specified");let i=await u(R,{id:e,input:n});l("Vault updated"),d(t,i.updateVault);}catch(n){p(n);}}),s.command("delete").description("Delete a vault").argument("<id>").option("--archive","Archive instead of hard delete",false).action(async(e,t)=>{try{t.archive?(await u($,{id:e}),l("Vault archived")):(await u(O,{id:e}),l("Vault deleted"));}catch(n){p(n);}});let m=o.command("secrets").description("Secret management");m.command("list").description("List secrets in a vault").requiredOption("--vault <id>").option("--type <t>","Filter by secret type").option("--search <q>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t={context:h()};e.type&&(t.type=e.type.toUpperCase()),e.search&&(t.search=e.search);let n=await u(q,{vaultId:e.vault,filter:t,pagination:{limit:e.limit,offset:0}});d(e,n.getSecrets.items,{headers:["ID","Key","Name","Type","Status","Created"],rows:n.getSecrets.items.map(i=>[x(i.id,12),i.key,i.name,i.type??"-",y(i.status),C(i.createdAt)])});}catch(t){p(t);}}),m.command("get").description("Get secret metadata (does NOT decrypt)").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await u(D,{id:e});if(!n.getSecret)throw new c(`Secret ${e} not found`);d(t,n.getSecret);}catch(n){p(n);}}),m.command("show").description("Decrypt and print a secret value (audited)").argument("<id>").action(async e=>{try{let t=await u(P,{id:e});process.stdout.write(t.decryptSecret.value);}catch(t){p(t);}}),m.command("set").description("Create a secret. Reads the value from stdin.").requiredOption("--vault <id>").requiredOption("--key <key>","Secret key (unique within vault)").requiredOption("--name <name>").option("--description <s>").option("--type <t>","API_KEY|PASSWORD|CERTIFICATE|TOKEN|OTHER","OTHER").option("--ephemeral","Mark as ephemeral").option("--expires <iso>").option("-f, --format <format>").action(async e=>{try{let t=await N(),n={context:h(),vaultId:e.vault,key:e.key,name:e.name,description:e.description,type:(e.type??"OTHER").toUpperCase(),isEphemeral:!!e.ephemeral,expiresAt:e.expires,value:t},i=await u(L,{input:n});l(`Secret created: ${i.createSecret.key}`),d(e,i.createSecret);}catch(t){p(t);}}),m.command("update").description("Update a secret. Pass --value via stdin to rotate.").argument("<id>").option("--name <s>").option("--description <s>").option("--rotate","Rotate value (reads new value from stdin)").option("--status <s>").option("-f, --format <format>").action(async(e,t)=>{try{if(t.rotate){let U=await N(),F=await u(G,{id:e,newValue:U});l("Secret rotated"),d(t,F.rotateSecret);return}let n={context:h()};if(t.name&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.status&&(n.status=t.status.toUpperCase()),Object.keys(n).length===1)throw new c("No updates specified (use --rotate to change value)");let i=await u(V,{id:e,input:n});l("Secret updated"),d(t,i.updateSecret);}catch(n){p(n);}}),m.command("delete").description("Delete a secret").argument("<id>").action(async e=>{try{await u(_,{id:e}),l("Secret deleted");}catch(t){p(t);}});}var ne={id:"security",version:"1.0.0",displayName:"Security",dependsOn:["auth","workspaces"],register(r,o){b(o),W(r);}},gt=ne;module.exports=gt;
75
+ `;function k(){let n=S().auth.read();if(!n?.workspaceId)throw new s("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:n.workspaceId}}async function F(){if(process.stdin.isTTY)throw new s('Pipe the secret value via stdin (e.g. `echo -n "value" | vibecontrols security secrets set ...`).');let n=[];for await(let o of process.stdin)n.push(Buffer.isBuffer(o)?o:Buffer.from(o));return Buffer.concat(n).toString("utf8")}function j(n){let o=n.command("security").description("Security: vaults & secrets"),a=o.command("vaults").description("Vault management");a.command("list").description("List vaults").option("--scope <s>","WORKSPACE|GLOBAL|VIBE").option("--status <s>").option("--search <q>").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={context:k()};e.scope&&(t.scope=e.scope.toUpperCase()),e.status&&(t.status=e.status.toUpperCase()),e.search&&(t.search=e.search);let r=await u(R,{filter:t,pagination:{limit:e.limit,offset:0}});g(e,r.getVaults.items,{headers:["ID","Name","Scope","Status","Created"],rows:r.getVaults.items.map(i=>[b(i.id,12),i.name,i.scope??"-",E(i.status),T(i.createdAt)])});}catch(t){p(t);}}),a.command("get").description("Get a vault").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let r=await u(O,{id:e});if(!r.getVault)throw new s(`Vault ${e} not found`);g(t,r.getVault);}catch(r){p(r);}}),a.command("create").description("Create a vault").requiredOption("--name <name>").option("--description <s>").option("--scope <s>","WORKSPACE|GLOBAL|VIBE","WORKSPACE").option("--scope-id <id>","Scope id (defaults to current workspace)").option("--lock-after <minutes>","Auto-lock after N minutes",e=>parseInt(e,10)).option("-f, --format <format>").action(async e=>{try{let t=k(),r={context:t,name:e.name,description:e.description,scope:(e.scope??"WORKSPACE").toUpperCase(),scopeId:e.scopeId??t.workspaceId,lockAfterMinutes:e.lockAfter},i=await u(q,{input:r});m(`Vault created: ${i.createVault.name}`),g(e,i.createVault);}catch(t){p(t);}}),a.command("update").description("Update a vault").argument("<id>").option("--name <s>").option("--description <s>").option("--lock-after <minutes>","Auto-lock after N minutes",e=>parseInt(e,10)).option("-f, --format <format>").action(async(e,t)=>{try{let r={};if(t.name&&(r.name=t.name),t.description!==void 0&&(r.description=t.description),t.lockAfter!==void 0&&(r.lockAfterMinutes=t.lockAfter),!Object.keys(r).length)throw new s("No updates specified");let i=await u($,{id:e,input:r});m("Vault updated"),g(t,i.updateVault);}catch(r){p(r);}}),a.command("delete").description("Delete a vault").argument("<id>").option("--archive","Archive instead of hard delete",false).action(async(e,t)=>{try{t.archive?(await u(P,{id:e}),m("Vault archived")):(await u(D,{id:e}),m("Vault deleted"));}catch(r){p(r);}});let l=o.command("secrets").description("Secret management");l.command("list").description("List secrets in a vault").requiredOption("--vault <id>").option("--type <t>","Filter by secret type").option("--search <q>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t={context:k()};e.type&&(t.type=e.type.toUpperCase()),e.search&&(t.search=e.search);let r=await u(L,{vaultId:e.vault,filter:t,pagination:{limit:e.limit,offset:0}});g(e,r.getSecrets.items,{headers:["ID","Key","Name","Type","Status","Created"],rows:r.getSecrets.items.map(i=>[b(i.id,12),i.key,i.name,i.type??"-",E(i.status),T(i.createdAt)])});}catch(t){p(t);}}),l.command("get").description("Get secret metadata (does NOT decrypt)").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let r=await u(_,{id:e});if(!r.getSecret)throw new s(`Secret ${e} not found`);g(t,r.getSecret);}catch(r){p(r);}}),l.command("show").description("Decrypt and print a secret value (audited)").argument("<id>").action(async e=>{try{let t=await u(V,{id:e});process.stdout.write(t.decryptSecret.value);}catch(t){p(t);}}),l.command("set").description("Create a secret. Reads the value from stdin.").requiredOption("--vault <id>").requiredOption("--key <key>","Secret key (unique within vault)").requiredOption("--name <name>").option("--description <s>").option("--type <t>","API_KEY|PASSWORD|CERTIFICATE|TOKEN|OTHER","OTHER").option("--ephemeral","Mark as ephemeral").option("--expires <iso>").option("-f, --format <format>").action(async e=>{try{let t=await F(),r={context:k(),vaultId:e.vault,key:e.key,name:e.name,description:e.description,type:(e.type??"OTHER").toUpperCase(),isEphemeral:!!e.ephemeral,expiresAt:e.expires,value:t},i=await u(N,{input:r});m(`Secret created: ${i.createSecret.key}`),g(e,i.createSecret);}catch(t){p(t);}}),l.command("update").description("Update a secret. Pass --value via stdin to rotate.").argument("<id>").option("--name <s>").option("--description <s>").option("--rotate","Rotate value (reads new value from stdin)").option("--status <s>").option("-f, --format <format>").action(async(e,t)=>{try{if(t.rotate){let M=await F(),B=await u(W,{id:e,newValue:M});m("Secret rotated"),g(t,B.rotateSecret);return}let r={context:k()};if(t.name&&(r.name=t.name),t.description!==void 0&&(r.description=t.description),t.status&&(r.status=t.status.toUpperCase()),Object.keys(r).length===1)throw new s("No updates specified (use --rotate to change value)");let i=await u(G,{id:e,input:r});m("Secret updated"),g(t,i.updateSecret);}catch(r){p(r);}}),l.command("delete").description("Delete a secret").argument("<id>").action(async e=>{try{await u(U,{id:e}),m("Secret deleted");}catch(t){p(t);}});}var ie={id:"security",version:"1.0.0",displayName:"Security",dependsOn:["auth","workspaces"],register(n,o){v(o),j(n);}},ht=ie;module.exports=ht;
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-BNVKV_pI.cjs';
1
+ import { C as CliModule } from '../../module-DWSAfs3k.cjs';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-BNVKV_pI.js';
1
+ import { C as CliModule } from '../../module-DWSAfs3k.js';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import {a,b,i,r,p,q as q$1,h,k as k$1,u}from'../../chunk-3ZVMC2AF.js';import {q as q$2}from'../../chunk-ZT6KOG7N.js';var T=`
1
+ import {a,b,i,r,p,q as q$1,h,k as k$1,u}from'../../chunk-BGNPGKJM.js';import {j as j$1}from'../../chunk-N7EXKGE2.js';var T=`
2
2
  query GetVaults($filter: VaultFilterInput, $pagination: SecurityPaginationInput) {
3
3
  getVaults(filter: $filter, pagination: $pagination) {
4
4
  items { id name description scope status createdAt }
@@ -72,4 +72,4 @@ import {a,b,i,r,p,q as q$1,h,k as k$1,u}from'../../chunk-3ZVMC2AF.js';import {q
72
72
  id key updatedAt
73
73
  }
74
74
  }
75
- `;function l(){let o=u().auth.read();if(!o?.workspaceId)throw new q$2("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:o.workspaceId}}async function L(){if(process.stdin.isTTY)throw new q$2('Pipe the secret value via stdin (e.g. `echo -n "value" | vibecontrols security secrets set ...`).');let o=[];for await(let p of process.stdin)o.push(Buffer.isBuffer(p)?p:Buffer.from(p));return Buffer.concat(o).toString("utf8")}function O(o){let p$1=o.command("security").description("Security: vaults & secrets"),m=p$1.command("vaults").description("Vault management");m.command("list").description("List vaults").option("--scope <s>","WORKSPACE|GLOBAL|VIBE").option("--status <s>").option("--search <q>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e={context:l()};t.scope&&(e.scope=t.scope.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.search&&(e.search=t.search);let a=await b(T,{filter:e,pagination:{limit:t.limit,offset:0}});i(t,a.getVaults.items,{headers:["ID","Name","Scope","Status","Created"],rows:a.getVaults.items.map(r$1=>[r(r$1.id,12),r$1.name,r$1.scope??"-",p(r$1.status),q$1(r$1.createdAt)])});}catch(e){h(e);}}),m.command("get").description("Get a vault").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let a=await b(A,{id:t});if(!a.getVault)throw new q$2(`Vault ${t} not found`);i(e,a.getVault);}catch(a){h(a);}}),m.command("create").description("Create a vault").requiredOption("--name <name>").option("--description <s>").option("--scope <s>","WORKSPACE|GLOBAL|VIBE","WORKSPACE").option("--scope-id <id>","Scope id (defaults to current workspace)").option("--lock-after <minutes>","Auto-lock after N minutes",t=>parseInt(t,10)).option("-f, --format <format>").action(async t=>{try{let e=l(),a={context:e,name:t.name,description:t.description,scope:(t.scope??"WORKSPACE").toUpperCase(),scopeId:t.scopeId??e.workspaceId,lockAfterMinutes:t.lockAfter},r=await b(C,{input:a});k$1(`Vault created: ${r.createVault.name}`),i(t,r.createVault);}catch(e){h(e);}}),m.command("update").description("Update a vault").argument("<id>").option("--name <s>").option("--description <s>").option("--lock-after <minutes>","Auto-lock after N minutes",t=>parseInt(t,10)).option("-f, --format <format>").action(async(t,e)=>{try{let a={};if(e.name&&(a.name=e.name),e.description!==void 0&&(a.description=e.description),e.lockAfter!==void 0&&(a.lockAfterMinutes=e.lockAfter),!Object.keys(a).length)throw new q$2("No updates specified");let r=await b(V,{id:t,input:a});k$1("Vault updated"),i(e,r.updateVault);}catch(a){h(a);}}),m.command("delete").description("Delete a vault").argument("<id>").option("--archive","Archive instead of hard delete",false).action(async(t,e)=>{try{e.archive?(await b(I,{id:t}),k$1("Vault archived")):(await b(R,{id:t}),k$1("Vault deleted"));}catch(a){h(a);}});let u=p$1.command("secrets").description("Secret management");u.command("list").description("List secrets in a vault").requiredOption("--vault <id>").option("--type <t>","Filter by secret type").option("--search <q>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e={context:l()};t.type&&(e.type=t.type.toUpperCase()),t.search&&(e.search=t.search);let a=await b(k,{vaultId:t.vault,filter:e,pagination:{limit:t.limit,offset:0}});i(t,a.getSecrets.items,{headers:["ID","Key","Name","Type","Status","Created"],rows:a.getSecrets.items.map(r$1=>[r(r$1.id,12),r$1.key,r$1.name,r$1.type??"-",p(r$1.status),q$1(r$1.createdAt)])});}catch(e){h(e);}}),u.command("get").description("Get secret metadata (does NOT decrypt)").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let a=await b(v,{id:t});if(!a.getSecret)throw new q$2(`Secret ${t} not found`);i(e,a.getSecret);}catch(a){h(a);}}),u.command("show").description("Decrypt and print a secret value (audited)").argument("<id>").action(async t=>{try{let e=await b($,{id:t});process.stdout.write(e.decryptSecret.value);}catch(e){h(e);}}),u.command("set").description("Create a secret. Reads the value from stdin.").requiredOption("--vault <id>").requiredOption("--key <key>","Secret key (unique within vault)").requiredOption("--name <name>").option("--description <s>").option("--type <t>","API_KEY|PASSWORD|CERTIFICATE|TOKEN|OTHER","OTHER").option("--ephemeral","Mark as ephemeral").option("--expires <iso>").option("-f, --format <format>").action(async t=>{try{let e=await L(),a={context:l(),vaultId:t.vault,key:t.key,name:t.name,description:t.description,type:(t.type??"OTHER").toUpperCase(),isEphemeral:!!t.ephemeral,expiresAt:t.expires,value:e},r=await b(x,{input:a});k$1(`Secret created: ${r.createSecret.key}`),i(t,r.createSecret);}catch(e){h(e);}}),u.command("update").description("Update a secret. Pass --value via stdin to rotate.").argument("<id>").option("--name <s>").option("--description <s>").option("--rotate","Rotate value (reads new value from stdin)").option("--status <s>").option("-f, --format <format>").action(async(t,e)=>{try{if(e.rotate){let P=await L(),b$1=await b(_,{id:t,newValue:P});k$1("Secret rotated"),i(e,b$1.rotateSecret);return}let a={context:l()};if(e.name&&(a.name=e.name),e.description!==void 0&&(a.description=e.description),e.status&&(a.status=e.status.toUpperCase()),Object.keys(a).length===1)throw new q$2("No updates specified (use --rotate to change value)");let r=await b(D,{id:t,input:a});k$1("Secret updated"),i(e,r.updateSecret);}catch(a){h(a);}}),u.command("delete").description("Delete a secret").argument("<id>").action(async t=>{try{await b(U,{id:t}),k$1("Secret deleted");}catch(e){h(e);}});}var q={id:"security",version:"1.0.0",displayName:"Security",dependsOn:["auth","workspaces"],register(o,p){a(p),O(o);}},j=q;export{j as default};
75
+ `;function l(){let o=u().auth.read();if(!o?.workspaceId)throw new j$1("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:o.workspaceId}}async function L(){if(process.stdin.isTTY)throw new j$1('Pipe the secret value via stdin (e.g. `echo -n "value" | vibecontrols security secrets set ...`).');let o=[];for await(let p of process.stdin)o.push(Buffer.isBuffer(p)?p:Buffer.from(p));return Buffer.concat(o).toString("utf8")}function O(o){let p$1=o.command("security").description("Security: vaults & secrets"),m=p$1.command("vaults").description("Vault management");m.command("list").description("List vaults").option("--scope <s>","WORKSPACE|GLOBAL|VIBE").option("--status <s>").option("--search <q>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e={context:l()};t.scope&&(e.scope=t.scope.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.search&&(e.search=t.search);let a=await b(T,{filter:e,pagination:{limit:t.limit,offset:0}});i(t,a.getVaults.items,{headers:["ID","Name","Scope","Status","Created"],rows:a.getVaults.items.map(r$1=>[r(r$1.id,12),r$1.name,r$1.scope??"-",p(r$1.status),q$1(r$1.createdAt)])});}catch(e){h(e);}}),m.command("get").description("Get a vault").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let a=await b(A,{id:t});if(!a.getVault)throw new j$1(`Vault ${t} not found`);i(e,a.getVault);}catch(a){h(a);}}),m.command("create").description("Create a vault").requiredOption("--name <name>").option("--description <s>").option("--scope <s>","WORKSPACE|GLOBAL|VIBE","WORKSPACE").option("--scope-id <id>","Scope id (defaults to current workspace)").option("--lock-after <minutes>","Auto-lock after N minutes",t=>parseInt(t,10)).option("-f, --format <format>").action(async t=>{try{let e=l(),a={context:e,name:t.name,description:t.description,scope:(t.scope??"WORKSPACE").toUpperCase(),scopeId:t.scopeId??e.workspaceId,lockAfterMinutes:t.lockAfter},r=await b(C,{input:a});k$1(`Vault created: ${r.createVault.name}`),i(t,r.createVault);}catch(e){h(e);}}),m.command("update").description("Update a vault").argument("<id>").option("--name <s>").option("--description <s>").option("--lock-after <minutes>","Auto-lock after N minutes",t=>parseInt(t,10)).option("-f, --format <format>").action(async(t,e)=>{try{let a={};if(e.name&&(a.name=e.name),e.description!==void 0&&(a.description=e.description),e.lockAfter!==void 0&&(a.lockAfterMinutes=e.lockAfter),!Object.keys(a).length)throw new j$1("No updates specified");let r=await b(V,{id:t,input:a});k$1("Vault updated"),i(e,r.updateVault);}catch(a){h(a);}}),m.command("delete").description("Delete a vault").argument("<id>").option("--archive","Archive instead of hard delete",false).action(async(t,e)=>{try{e.archive?(await b(I,{id:t}),k$1("Vault archived")):(await b(R,{id:t}),k$1("Vault deleted"));}catch(a){h(a);}});let u=p$1.command("secrets").description("Secret management");u.command("list").description("List secrets in a vault").requiredOption("--vault <id>").option("--type <t>","Filter by secret type").option("--search <q>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e={context:l()};t.type&&(e.type=t.type.toUpperCase()),t.search&&(e.search=t.search);let a=await b(k,{vaultId:t.vault,filter:e,pagination:{limit:t.limit,offset:0}});i(t,a.getSecrets.items,{headers:["ID","Key","Name","Type","Status","Created"],rows:a.getSecrets.items.map(r$1=>[r(r$1.id,12),r$1.key,r$1.name,r$1.type??"-",p(r$1.status),q$1(r$1.createdAt)])});}catch(e){h(e);}}),u.command("get").description("Get secret metadata (does NOT decrypt)").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let a=await b(v,{id:t});if(!a.getSecret)throw new j$1(`Secret ${t} not found`);i(e,a.getSecret);}catch(a){h(a);}}),u.command("show").description("Decrypt and print a secret value (audited)").argument("<id>").action(async t=>{try{let e=await b($,{id:t});process.stdout.write(e.decryptSecret.value);}catch(e){h(e);}}),u.command("set").description("Create a secret. Reads the value from stdin.").requiredOption("--vault <id>").requiredOption("--key <key>","Secret key (unique within vault)").requiredOption("--name <name>").option("--description <s>").option("--type <t>","API_KEY|PASSWORD|CERTIFICATE|TOKEN|OTHER","OTHER").option("--ephemeral","Mark as ephemeral").option("--expires <iso>").option("-f, --format <format>").action(async t=>{try{let e=await L(),a={context:l(),vaultId:t.vault,key:t.key,name:t.name,description:t.description,type:(t.type??"OTHER").toUpperCase(),isEphemeral:!!t.ephemeral,expiresAt:t.expires,value:e},r=await b(x,{input:a});k$1(`Secret created: ${r.createSecret.key}`),i(t,r.createSecret);}catch(e){h(e);}}),u.command("update").description("Update a secret. Pass --value via stdin to rotate.").argument("<id>").option("--name <s>").option("--description <s>").option("--rotate","Rotate value (reads new value from stdin)").option("--status <s>").option("-f, --format <format>").action(async(t,e)=>{try{if(e.rotate){let P=await L(),b$1=await b(_,{id:t,newValue:P});k$1("Secret rotated"),i(e,b$1.rotateSecret);return}let a={context:l()};if(e.name&&(a.name=e.name),e.description!==void 0&&(a.description=e.description),e.status&&(a.status=e.status.toUpperCase()),Object.keys(a).length===1)throw new j$1("No updates specified (use --rotate to change value)");let r=await b(D,{id:t,input:a});k$1("Secret updated"),i(e,r.updateSecret);}catch(a){h(a);}}),u.command("delete").description("Delete a secret").argument("<id>").action(async t=>{try{await b(U,{id:t}),k$1("Secret deleted");}catch(e){h(e);}});}var q={id:"security",version:"1.0.0",displayName:"Security",dependsOn:["auth","workspaces"],register(o,p){a(p),O(o);}},j=q;export{j as default};