@burdenoff/cli-sdk 2026.1108.1 → 2026.1110.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-N5KCAJXG.js → chunk-6HSWVWQW.js} +3 -3
  2. package/dist/chunk-MT2F54AC.js +34 -0
  3. package/dist/chunk-WTNQ5PEC.js +1 -0
  4. package/dist/core/index.cjs +8 -8
  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 +8 -8
  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-BwJmqefL.d.ts → module-CLaW1ycq.d.cts} +17 -1
  13. package/dist/{module-BwJmqefL.d.cts → module-CLaW1ycq.d.ts} +17 -1
  14. package/dist/modules/adaptercloud/index.cjs +8 -8
  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 +10 -10
  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 +6 -6
  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 +8 -8
  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 +5 -5
  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 +5 -5
  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 +10 -10
  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 +6 -6
  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 +11 -11
  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 +7 -7
  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 +8 -8
  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 +9 -9
  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 +7 -7
  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 +4 -4
  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 +19 -19
  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 +5 -5
  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 +7 -7
  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 +24 -24
  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 +9 -9
  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 +4 -4
  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 +8 -8
  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 +7 -7
  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 +4 -4
  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 +8 -8
  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 +1 -1
  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 +10 -10
  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 +8 -8
  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 +7 -7
  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 +7 -7
  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 +6 -6
  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 +4 -4
  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 +3 -3
  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 +8 -8
  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 +5 -5
  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 +2 -2
  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 +17 -17
  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 +5 -5
  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 +6 -6
  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 +4 -4
  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 +11 -11
  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 +14 -14
  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 +9 -9
  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 +8 -8
  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 +7 -7
  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 +1 -1
  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 +2 -2
  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 +7 -7
  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 +4 -4
  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 +10 -10
  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 +7 -7
  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 +8 -8
  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 +2 -2
  228. package/dist/modules/tours/index.cjs +3 -3
  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 +27 -27
  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 +6 -6
  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 +3 -3
  241. package/dist/chunk-2OISIPE6.js +0 -34
  242. package/dist/chunk-VL67DTWH.js +0 -1
@@ -11,7 +11,7 @@
11
11
  items { id name slug tenantId organizationId }
12
12
  }
13
13
  }
14
- `,variables:{limit:50}})});if(!s.ok){let t=await s.text().catch(()=>"Unknown error");throw new Error(`Failed to fetch workspaces (${s.status}): ${t}`)}let e=await s.json();if(e.errors?.length)throw new Error(`Failed to fetch workspaces: ${e.errors[0]?.message??"unknown error"}`);return e.data?.myWorkspaces?.items??[]}var u=class extends Error{exitCode;hint;constructor(i,o){super(i),this.name="CliUserError",this.exitCode=o?.exitCode??1,this.hint=o?.hint;}},k=class extends u{constructor(i,o){super(i,{exitCode:2,hint:o?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},m=class extends Error{cause;constructor(i,o){super(i),this.name="CliInternalError",this.cause=o;}};var A=null;function D(n){A=n;}function d(){if(!A)throw new m("vibecontrols module helpers used before setHelpersContext was called");return A}function se(){let n=d();if(!n.auth.isAuthenticated())throw new k("Authentication required.",{hint:`Run \`${n.productName} auth login\` to authenticate.`})}async function f(n,i){return se(),d().gql.workspace.request(n,i)}async function y(n,i){return d().gql.global.request(n,i)}function v(){d().gql.reset();}function c(n){let i=n instanceof Error?n.message:String(n);throw new u(i)}function l(n,i,o){d().output.formatAndOutput(n,i,o);}function g(n){d().output.printSuccess(n);}function I(n){d().output.printInfo(n);}function E(n){d().output.printWarning(n);}function O(n){return d().output.formatStatus(n)}function R(n){return d().output.formatDate(n)}function x(n,i){return d().output.truncate(n,i)}function b(){return d()}function T(){return d().auth.read()}function S(n){d().auth.write(n);}function P(){return d().config.read()}function q(n){let i=n.command("workspace").description("Workspace context");i.command("current").description("Show current workspace").option("-f, --format <format>","Output format").action(o=>{let s=T(),e=s?.workspaceId??null;if(!e){I(`No workspace set. Run: ${b().productName} workspace set <id>`);return}l(o,{workspaceId:e,organizationId:s?.organizationId??"-",hasWorkspaceToken:!!s?.workspaceToken},{headers:["Key","Value"],rows:[["Workspace ID",e],["Organization ID",s?.organizationId??"-"],["Has Workspace Token",String(!!s?.workspaceToken)]]});}),i.command("set").description("Set workspace ID and issue workspace token").argument("<id>","Workspace ID").action(async o=>{try{let s=T();if(!s?.accessToken)throw new u(`Not authenticated. Run: ${b().productName} auth login`);let e=P(),t;I("Looking up workspace details...");try{let a=(await C(e.globalEndpoint,s.accessToken)).find(w=>w.id===o);a?t=a.organizationId:(E("Workspace not in your accessible list \u2014 using stored organization id as fallback"),t=s.organizationId);}catch{E("Could not fetch workspace details \u2014 using stored organization id"),t=s.organizationId;}if(s.accessToken&&t){I("Issuing workspace token...");try{let r=await h(e.workspaceEndpoint,s.accessToken,o,t);S({...s,workspaceId:o,organizationId:t,workspaceToken:r.token,workspaceTokenExpiresAt:new Date(r.expiresAt).getTime()}),v(),g(`Workspace set to: ${o} (token issued)`);return}catch(r){E(`Workspace token failed: ${r instanceof Error?r.message:String(r)}`);}}S({...s,workspaceId:o,organizationId:t}),v(),g(`Workspace set to: ${o}`);}catch(s){c(s);}}),i.command("list").description("List available workspaces").option("-f, --format <format>","Output format").action(async o=>{try{let s=T();if(!s?.accessToken)throw new u(`Not authenticated. Run: ${b().productName} auth login`);let e=P(),t=await C(e.globalEndpoint,s.accessToken);l(o,t,{headers:["ID","Name","Slug","Organization ID"],rows:t.map(r=>[r.id,r.name,r.slug,r.organizationId])});}catch(s){c(s);}});}var _=`
14
+ `,variables:{limit:50}})});if(!s.ok){let t=await s.text().catch(()=>"Unknown error");throw new Error(`Failed to fetch workspaces (${s.status}): ${t}`)}let e=await s.json();if(e.errors?.length)throw new Error(`Failed to fetch workspaces: ${e.errors[0]?.message??"unknown error"}`);return e.data?.myWorkspaces?.items??[]}var u=class extends Error{exitCode;hint;constructor(i,o){super(i),this.name="CliUserError",this.exitCode=o?.exitCode??1,this.hint=o?.hint;}},k=class extends u{constructor(i,o){super(i,{exitCode:2,hint:o?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},m=class extends Error{cause;constructor(i,o){super(i),this.name="CliInternalError",this.cause=o;}};var A=null;function D(n){A=n;}function d(){if(!A)throw new m("vibecontrols module helpers used before setHelpersContext was called");return A}function se(){let n=d();if(!n.auth.isAuthenticated())throw new k("Authentication required.",{hint:`Run \`${n.productName} auth login\` to authenticate.`})}async function f(n,i){return se(),d().gql.workspace.request(n,i)}async function y(n,i){return d().gql.global.request(n,i)}function v(){d().gql.reset();}function c(n){let i=n instanceof Error?n.message:String(n);throw new u(i)}function l(n,i,o){d().output.formatAndOutput(n,i,o);}function g(n){d().output.printSuccess(n);}function E(n){d().output.printInfo(n);}function b(n){d().output.printWarning(n);}function O(n){return d().output.formatStatus(n)}function R(n){return d().output.formatDate(n)}function x(n,i){return d().output.truncate(n,i)}function I(){return d()}function T(){return d().auth.read()}function S(n){d().auth.write(n);}function P(){return d().config.read()}function q(n){let i=n.command("workspace").description("Workspace context");i.command("current").description("Show current workspace").option("-f, --format <format>","Output format").action(o=>{let s=T(),e=s?.workspaceId??null;if(!e){E(`No workspace set. Run: ${I().productName} workspace set <id>`);return}l(o,{workspaceId:e,organizationId:s?.organizationId??"-",hasWorkspaceToken:!!s?.workspaceToken},{headers:["Key","Value"],rows:[["Workspace ID",e],["Organization ID",s?.organizationId??"-"],["Has Workspace Token",String(!!s?.workspaceToken)]]});}),i.command("set").description("Set workspace ID and issue workspace token").argument("<id>","Workspace ID").action(async o=>{try{let s=T();if(!s?.accessToken)throw new u(`Not authenticated. Run: ${I().productName} auth login`);let e=P(),t;E("Looking up workspace details...");try{let a=(await C(e.globalEndpoint,s.accessToken)).find(w=>w.id===o);a?t=a.organizationId:(b("Workspace not in your accessible list \u2014 using stored organization id as fallback"),t=s.organizationId);}catch{b("Could not fetch workspace details \u2014 using stored organization id"),t=s.organizationId;}if(s.accessToken&&t){E("Issuing workspace token...");try{let r=await h(e.workspaceEndpoint,s.accessToken,o,t);S({...s,workspaceId:o,organizationId:t,workspaceToken:r.token,workspaceTokenExpiresAt:new Date(r.expiresAt).getTime()}),v(),g(`Workspace set to: ${o} (token issued)`);return}catch(r){b(`Workspace token failed: ${r instanceof Error?r.message:String(r)}`);}}S({...s,workspaceId:o,organizationId:t}),v(),g(`Workspace set to: ${o}`);}catch(s){c(s);}}),i.command("list").description("List available workspaces").option("-f, --format <format>","Output format").action(async o=>{try{let s=T();if(!s?.accessToken)throw new u(`Not authenticated. Run: ${I().productName} auth login`);let e=P(),t=await C(e.globalEndpoint,s.accessToken);l(o,t,{headers:["ID","Name","Slug","Organization ID"],rows:t.map(r=>[r.id,r.name,r.slug,r.organizationId])});}catch(s){c(s);}});}var _=`
15
15
  query GetWorkspace($id: ID!) {
16
16
  workspace(id: $id) {
17
17
  id name slug type tenantId organizationId region status memberCount createdAt updatedAt
@@ -40,23 +40,23 @@
40
40
  total hasMore
41
41
  }
42
42
  }
43
- `,F=`
43
+ `,G=`
44
44
  mutation AddWorkspaceMember($input: AddWorkspaceMemberInput!) {
45
45
  addWorkspaceMember(input: $input) {
46
46
  id userId role status
47
47
  }
48
48
  }
49
- `,U=`
49
+ `,F=`
50
50
  mutation RemoveWorkspaceMember($id: ID!) {
51
51
  removeWorkspaceMember(id: $id)
52
52
  }
53
- `,z=`
53
+ `,U=`
54
54
  mutation UpdateWorkspaceMemberRoles($input: UpdateWorkspaceMemberRolesInput!) {
55
55
  updateWorkspaceMemberRoles(input: $input) {
56
56
  id userId role
57
57
  }
58
58
  }
59
- `,G=`
59
+ `,z=`
60
60
  query ListProjects($filter: ProjectFilterInput, $pagination: PaginationInput) {
61
61
  projects(filter: $filter, pagination: $pagination) {
62
62
  items { id name workspaceId status createdAt }
@@ -87,4 +87,4 @@
87
87
  id action userId actorType resourceType resourceId description timestamp
88
88
  }
89
89
  }
90
- `;function ce(n,i){let o;try{o=JSON.parse(i);}catch{throw new u(`${n} must be valid JSON`)}if(!o||typeof o!="object"||Array.isArray(o))throw new u(`${n} must be a JSON object`);return o}function H(n){n.command("get").description("Get a workspace by id").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let r=await y(_,{id:e});if(!r.workspace)throw new u(`Workspace ${e} not found`);l(t,r.workspace);}catch(r){c(r);}}),n.command("create").description("Create a workspace (global layer)").requiredOption("--name <name>").requiredOption("--slug <slug>","URL-safe workspace identifier").option("--tenant <id>","Target tenant id (defaults to the organization tenant)").option("--organization <id>","Owning organization id").option("-f, --format <format>").action(async e=>{try{let t={name:e.name,tenantId:e.tenant,organizationId:e.organization,slug:e.slug},r=await y(L,{input:t});g(`Workspace created: ${r.createWorkspace.name}`),l(e,r.createWorkspace);}catch(t){c(t);}}),n.command("update").description("Update a workspace").argument("<id>").option("--name <s>").option("--metadata <json>","Replace the workspace metadata (JSON object)").option("-f, --format <format>").action(async(e,t)=>{try{let r={};if(t.name&&(r.name=t.name),t.metadata!==void 0&&(r.metadata=ce("--metadata",t.metadata)),!Object.keys(r).length)throw new u("No updates specified");let a=await y(M,{id:e,input:r});g("Workspace updated"),l(t,a.updateWorkspace);}catch(r){c(r);}}),n.command("delete").description("Delete a workspace (workspace layer)").argument("<id>").action(async e=>{try{await f(j,{id:e}),g("Workspace deleted");}catch(t){c(t);}});let i=n.command("members").description("Workspace member management");i.command("list").description("List members of a workspace").requiredOption("--workspace <id>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t=await f(N,{workspaceId:e.workspace,pagination:{limit:e.limit,offset:0}});l(e,t.workspaceMembers.items,{headers:["ID","UserID","Role","Status","Joined"],rows:t.workspaceMembers.items.map(r=>[x(r.id,12),x(r.userId,12),r.role??"-",O(r.status),R(r.createdAt)])});}catch(t){c(t);}}),i.command("add").description("Add a member to a workspace").requiredOption("--workspace <id>").requiredOption("--user <userId>").option("--role <r>","MEMBER|ADMIN|OWNER","MEMBER").option("-f, --format <format>").action(async e=>{try{let t={workspaceId:e.workspace,userId:e.user,role:(e.role??"MEMBER").toUpperCase()},r=await f(F,{input:t});g("Member added"),l(e,r.addWorkspaceMember);}catch(t){c(t);}}),i.command("remove").description("Remove a member by membership id").argument("<membershipId>").action(async e=>{try{await f(U,{id:e}),g("Member removed");}catch(t){c(t);}}),i.command("role").description("Update member role").requiredOption("--workspace <id>").requiredOption("--user <userId>").requiredOption("--role <r>").action(async e=>{try{let t={workspaceId:e.workspace,userId:e.user,roles:[e.role.toUpperCase()]};await f(z,{input:t}),g("Member role updated");}catch(t){c(t);}});let o=n.command("projects").description("Workspace projects");o.command("list").description("List projects").option("--workspace <id>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t={};e.workspace&&(t.workspaceId=e.workspace);let r=await f(G,{filter:Object.keys(t).length?t:void 0,pagination:{limit:e.limit,offset:0}});l(e,r.projects.items,{headers:["ID","Name","Workspace","Status","Created"],rows:r.projects.items.map(a=>[x(a.id,12),a.name,x(a.workspaceId,12),O(a.status),R(a.createdAt)])});}catch(t){c(t);}}),o.command("get").description("Get a project").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let r=await f(B,{id:e});if(!r.project)throw new u(`Project ${e} not found`);l(t,r.project);}catch(r){c(r);}}),o.command("create").description("Create a project").requiredOption("--workspace <id>").requiredOption("--name <name>").option("--description <s>").option("-f, --format <format>").action(async e=>{try{let t={workspaceId:e.workspace,name:e.name,description:e.description},r=await f(K,{input:t});g("Project created"),l(e,r.createProject);}catch(t){c(t);}}),n.command("invite").description("Workspace invitations").command("accept").description("Accept a workspace invitation").argument("<invitationId>").action(async e=>{try{await f(V,{id:e}),g("Invitation accepted");}catch(t){c(t);}}),n.command("activity").description("Workspace activity log").requiredOption("--workspace <id>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t=await f(J,{workspaceId:e.workspace,limit:e.limit,offset:0});l(e,t.getWorkspaceActivities);}catch(t){c(t);}});}var ue={id:"workspaces",version:"1.0.0",displayName:"Workspaces",dependsOn:["auth"],register(n,i){D(i),q(n);let o=n.commands.find(s=>s.name()==="workspace");if(!o)throw new m("workspace command group missing after registerWorkspaceCommands");H(o);}},Rt=ue;module.exports=Rt;
90
+ `;function ce(n,i){let o;try{o=JSON.parse(i);}catch{throw new u(`${n} must be valid JSON`)}if(!o||typeof o!="object"||Array.isArray(o))throw new u(`${n} must be a JSON object`);return o}function H(n){n.command("get").description("Get a workspace by id").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let r=await y(_,{id:e});if(!r.workspace)throw new u(`Workspace ${e} not found`);l(t,r.workspace);}catch(r){c(r);}}),n.command("create").description("Create a workspace (global layer)").requiredOption("--name <name>").requiredOption("--slug <slug>","URL-safe workspace identifier").option("--tenant <id>","Target tenant id (defaults to the organization tenant)").option("--organization <id>","Owning organization id").option("-f, --format <format>").action(async e=>{try{let t={name:e.name,tenantId:e.tenant,organizationId:e.organization,slug:e.slug},r=await y(L,{input:t});g(`Workspace created: ${r.createWorkspace.name}`),l(e,r.createWorkspace);}catch(t){c(t);}}),n.command("update").description("Update a workspace").argument("<id>").option("--name <s>").option("--metadata <json>","Replace the workspace metadata (JSON object)").option("-f, --format <format>").action(async(e,t)=>{try{let r={};if(t.name&&(r.name=t.name),t.metadata!==void 0&&(r.metadata=ce("--metadata",t.metadata)),!Object.keys(r).length)throw new u("No updates specified");let a=await y(M,{id:e,input:r});g("Workspace updated"),l(t,a.updateWorkspace);}catch(r){c(r);}}),n.command("delete").description("Delete a workspace (workspace layer)").argument("<id>").action(async e=>{try{await f(j,{id:e}),g("Workspace deleted");}catch(t){c(t);}});let i=n.command("members").description("Workspace member management");i.command("list").description("List members of a workspace").requiredOption("--workspace <id>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t=await f(N,{workspaceId:e.workspace,pagination:{limit:e.limit,offset:0}});l(e,t.workspaceMembers.items,{headers:["ID","UserID","Role","Status","Joined"],rows:t.workspaceMembers.items.map(r=>[x(r.id,12),x(r.userId,12),r.role??"-",O(r.status),R(r.createdAt)])});}catch(t){c(t);}}),i.command("add").description("Add a member to a workspace").requiredOption("--workspace <id>").requiredOption("--user <userId>").option("--role <r>","MEMBER|ADMIN|OWNER","MEMBER").option("-f, --format <format>").action(async e=>{try{let t={workspaceId:e.workspace,userId:e.user,role:(e.role??"MEMBER").toUpperCase()},r=await f(G,{input:t});g("Member added"),l(e,r.addWorkspaceMember);}catch(t){c(t);}}),i.command("remove").description("Remove a member by membership id").argument("<membershipId>").action(async e=>{try{await f(F,{id:e}),g("Member removed");}catch(t){c(t);}}),i.command("role").description("Update member role").requiredOption("--workspace <id>").requiredOption("--user <userId>").requiredOption("--role <r>").action(async e=>{try{let t={workspaceId:e.workspace,userId:e.user,roles:[e.role.toUpperCase()]};await f(U,{input:t}),g("Member role updated");}catch(t){c(t);}});let o=n.command("projects").description("Workspace projects");o.command("list").description("List projects").option("--workspace <id>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t={};e.workspace&&(t.workspaceId=e.workspace);let r=await f(z,{filter:Object.keys(t).length?t:void 0,pagination:{limit:e.limit,offset:0}});l(e,r.projects.items,{headers:["ID","Name","Workspace","Status","Created"],rows:r.projects.items.map(a=>[x(a.id,12),a.name,x(a.workspaceId,12),O(a.status),R(a.createdAt)])});}catch(t){c(t);}}),o.command("get").description("Get a project").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let r=await f(B,{id:e});if(!r.project)throw new u(`Project ${e} not found`);l(t,r.project);}catch(r){c(r);}}),o.command("create").description("Create a project").requiredOption("--workspace <id>").requiredOption("--name <name>").option("--description <s>").option("-f, --format <format>").action(async e=>{try{let t={workspaceId:e.workspace,name:e.name,description:e.description},r=await f(K,{input:t});g("Project created"),l(e,r.createProject);}catch(t){c(t);}}),n.command("invite").description("Workspace invitations").command("accept").description("Accept a workspace invitation").argument("<invitationId>").action(async e=>{try{await f(V,{id:e}),g("Invitation accepted");}catch(t){c(t);}}),n.command("activity").description("Workspace activity log").requiredOption("--workspace <id>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t=await f(J,{workspaceId:e.workspace,limit:e.limit,offset:0});l(e,t.getWorkspaceActivities);}catch(t){c(t);}});}var ue={id:"workspaces",version:"1.0.0",displayName:"Workspaces",dependsOn:["auth"],register(n,i){D(i),q(n);let o=n.commands.find(s=>s.name()==="workspace");if(!o)throw new m("workspace command group missing after registerWorkspaceCommands");H(o);}},Pt=ue;module.exports=Pt;
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-BwJmqefL.cjs';
1
+ import { C as CliModule } from '../../module-CLaW1ycq.cjs';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-BwJmqefL.js';
1
+ import { C as CliModule } from '../../module-CLaW1ycq.js';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import {a,v as v$1,m,u,i,y,n,w,f,k,h as h$1,c,b,r,p,q as q$2}from'../../chunk-VL67DTWH.js';import {q as q$1,o,h,g}from'../../chunk-2OISIPE6.js';function P(i$1){let c=i$1.command("workspace").description("Workspace context");c.command("current").description("Show current workspace").option("-f, --format <format>","Output format").action(a=>{let r=v$1(),t=r?.workspaceId??null;if(!t){m(`No workspace set. Run: ${u().productName} workspace set <id>`);return}i(a,{workspaceId:t,organizationId:r?.organizationId??"-",hasWorkspaceToken:!!r?.workspaceToken},{headers:["Key","Value"],rows:[["Workspace ID",t],["Organization ID",r?.organizationId??"-"],["Has Workspace Token",String(!!r?.workspaceToken)]]});}),c.command("set").description("Set workspace ID and issue workspace token").argument("<id>","Workspace ID").action(async a=>{try{let r=v$1();if(!r?.accessToken)throw new o(`Not authenticated. Run: ${u().productName} auth login`);let t=y(),e;m("Looking up workspace details...");try{let m=(await h(t.globalEndpoint,r.accessToken)).find(J=>J.id===a);m?e=m.organizationId:(n("Workspace not in your accessible list \u2014 using stored organization id as fallback"),e=r.organizationId);}catch{n("Could not fetch workspace details \u2014 using stored organization id"),e=r.organizationId;}if(r.accessToken&&e){m("Issuing workspace token...");try{let o=await g(t.workspaceEndpoint,r.accessToken,a,e);w({...r,workspaceId:a,organizationId:e,workspaceToken:o.token,workspaceTokenExpiresAt:new Date(o.expiresAt).getTime()}),f(),k(`Workspace set to: ${a} (token issued)`);return}catch(o){n(`Workspace token failed: ${o instanceof Error?o.message:String(o)}`);}}w({...r,workspaceId:a,organizationId:e}),f(),k(`Workspace set to: ${a}`);}catch(r){h$1(r);}}),c.command("list").description("List available workspaces").option("-f, --format <format>","Output format").action(async a=>{try{let r=v$1();if(!r?.accessToken)throw new o(`Not authenticated. Run: ${u().productName} auth login`);let t=y(),e=await h(t.globalEndpoint,r.accessToken);i(a,e,{headers:["ID","Name","Slug","Organization ID"],rows:e.map(o=>[o.id,o.name,o.slug,o.organizationId])});}catch(r){h$1(r);}});}var $=`
1
+ import {a,v as v$1,m,u,i,y,n,w,f,k,h as h$1,c,b,r,p,q as q$2}from'../../chunk-WTNQ5PEC.js';import {s,q as q$1,h,g}from'../../chunk-MT2F54AC.js';function P(i$1){let c=i$1.command("workspace").description("Workspace context");c.command("current").description("Show current workspace").option("-f, --format <format>","Output format").action(a=>{let r=v$1(),t=r?.workspaceId??null;if(!t){m(`No workspace set. Run: ${u().productName} workspace set <id>`);return}i(a,{workspaceId:t,organizationId:r?.organizationId??"-",hasWorkspaceToken:!!r?.workspaceToken},{headers:["Key","Value"],rows:[["Workspace ID",t],["Organization ID",r?.organizationId??"-"],["Has Workspace Token",String(!!r?.workspaceToken)]]});}),c.command("set").description("Set workspace ID and issue workspace token").argument("<id>","Workspace ID").action(async a=>{try{let r=v$1();if(!r?.accessToken)throw new q$1(`Not authenticated. Run: ${u().productName} auth login`);let t=y(),e;m("Looking up workspace details...");try{let m=(await h(t.globalEndpoint,r.accessToken)).find(J=>J.id===a);m?e=m.organizationId:(n("Workspace not in your accessible list \u2014 using stored organization id as fallback"),e=r.organizationId);}catch{n("Could not fetch workspace details \u2014 using stored organization id"),e=r.organizationId;}if(r.accessToken&&e){m("Issuing workspace token...");try{let o=await g(t.workspaceEndpoint,r.accessToken,a,e);w({...r,workspaceId:a,organizationId:e,workspaceToken:o.token,workspaceTokenExpiresAt:new Date(o.expiresAt).getTime()}),f(),k(`Workspace set to: ${a} (token issued)`);return}catch(o){n(`Workspace token failed: ${o instanceof Error?o.message:String(o)}`);}}w({...r,workspaceId:a,organizationId:e}),f(),k(`Workspace set to: ${a}`);}catch(r){h$1(r);}}),c.command("list").description("List available workspaces").option("-f, --format <format>","Output format").action(async a=>{try{let r=v$1();if(!r?.accessToken)throw new q$1(`Not authenticated. Run: ${u().productName} auth login`);let t=y(),e=await h(t.globalEndpoint,r.accessToken);i(a,e,{headers:["ID","Name","Slug","Organization ID"],rows:e.map(o=>[o.id,o.name,o.slug,o.organizationId])});}catch(r){h$1(r);}});}var $=`
2
2
  query GetWorkspace($id: ID!) {
3
3
  workspace(id: $id) {
4
4
  id name slug type tenantId organizationId region status memberCount createdAt updatedAt
@@ -74,4 +74,4 @@ import {a,v as v$1,m,u,i,y,n,w,f,k,h as h$1,c,b,r,p,q as q$2}from'../../chunk-VL
74
74
  id action userId actorType resourceType resourceId description timestamp
75
75
  }
76
76
  }
77
- `;function G(i,c){let a;try{a=JSON.parse(c);}catch{throw new o(`${i} must be valid JSON`)}if(!a||typeof a!="object"||Array.isArray(a))throw new o(`${i} must be a JSON object`);return a}function B(i$1){i$1.command("get").description("Get a workspace by id").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o$1=await c($,{id:t});if(!o$1.workspace)throw new o(`Workspace ${t} not found`);i(e,o$1.workspace);}catch(o){h$1(o);}}),i$1.command("create").description("Create a workspace (global layer)").requiredOption("--name <name>").requiredOption("--slug <slug>","URL-safe workspace identifier").option("--tenant <id>","Target tenant id (defaults to the organization tenant)").option("--organization <id>","Owning organization id").option("-f, --format <format>").action(async t=>{try{let e={name:t.name,tenantId:t.tenant,organizationId:t.organization,slug:t.slug},o=await c(S,{input:e});k(`Workspace created: ${o.createWorkspace.name}`),i(t,o.createWorkspace);}catch(e){h$1(e);}}),i$1.command("update").description("Update a workspace").argument("<id>").option("--name <s>").option("--metadata <json>","Replace the workspace metadata (JSON object)").option("-f, --format <format>").action(async(t,e)=>{try{let o$1={};if(e.name&&(o$1.name=e.name),e.metadata!==void 0&&(o$1.metadata=G("--metadata",e.metadata)),!Object.keys(o$1).length)throw new o("No updates specified");let m=await c(j,{id:t,input:o$1});k("Workspace updated"),i(e,m.updateWorkspace);}catch(o){h$1(o);}}),i$1.command("delete").description("Delete a workspace (workspace layer)").argument("<id>").action(async t=>{try{await b(_,{id:t}),k("Workspace deleted");}catch(e){h$1(e);}});let c$1=i$1.command("members").description("Workspace member management");c$1.command("list").description("List members of a workspace").requiredOption("--workspace <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e=await b(D,{workspaceId:t.workspace,pagination:{limit:t.limit,offset:0}});i(t,e.workspaceMembers.items,{headers:["ID","UserID","Role","Status","Joined"],rows:e.workspaceMembers.items.map(o=>[r(o.id,12),r(o.userId,12),o.role??"-",p(o.status),q$2(o.createdAt)])});}catch(e){h$1(e);}}),c$1.command("add").description("Add a member to a workspace").requiredOption("--workspace <id>").requiredOption("--user <userId>").option("--role <r>","MEMBER|ADMIN|OWNER","MEMBER").option("-f, --format <format>").action(async t=>{try{let e={workspaceId:t.workspace,userId:t.user,role:(t.role??"MEMBER").toUpperCase()},o=await b(x,{input:e});k("Member added"),i(t,o.addWorkspaceMember);}catch(e){h$1(e);}}),c$1.command("remove").description("Remove a member by membership id").argument("<membershipId>").action(async t=>{try{await b(v,{id:t}),k("Member removed");}catch(e){h$1(e);}}),c$1.command("role").description("Update member role").requiredOption("--workspace <id>").requiredOption("--user <userId>").requiredOption("--role <r>").action(async t=>{try{let e={workspaceId:t.workspace,userId:t.user,roles:[t.role.toUpperCase()]};await b(z,{input:e}),k("Member role updated");}catch(e){h$1(e);}});let a=i$1.command("projects").description("Workspace projects");a.command("list").description("List projects").option("--workspace <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e={};t.workspace&&(e.workspaceId=t.workspace);let o=await b(N,{filter:Object.keys(e).length?e:void 0,pagination:{limit:t.limit,offset:0}});i(t,o.projects.items,{headers:["ID","Name","Workspace","Status","Created"],rows:o.projects.items.map(m=>[r(m.id,12),m.name,r(m.workspaceId,12),p(m.status),q$2(m.createdAt)])});}catch(e){h$1(e);}}),a.command("get").description("Get a project").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o$1=await b(K,{id:t});if(!o$1.project)throw new o(`Project ${t} not found`);i(e,o$1.project);}catch(o){h$1(o);}}),a.command("create").description("Create a project").requiredOption("--workspace <id>").requiredOption("--name <name>").option("--description <s>").option("-f, --format <format>").action(async t=>{try{let e={workspaceId:t.workspace,name:t.name,description:t.description},o=await b(L,{input:e});k("Project created"),i(t,o.createProject);}catch(e){h$1(e);}}),i$1.command("invite").description("Workspace invitations").command("accept").description("Accept a workspace invitation").argument("<invitationId>").action(async t=>{try{await b(q,{id:t}),k("Invitation accepted");}catch(e){h$1(e);}}),i$1.command("activity").description("Workspace activity log").requiredOption("--workspace <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e=await b(U,{workspaceId:t.workspace,limit:t.limit,offset:0});i(t,e.getWorkspaceActivities);}catch(e){h$1(e);}});}var H={id:"workspaces",version:"1.0.0",displayName:"Workspaces",dependsOn:["auth"],register(i,c){a(c),P(i);let a$1=i.commands.find(r=>r.name()==="workspace");if(!a$1)throw new q$1("workspace command group missing after registerWorkspaceCommands");B(a$1);}},ut=H;export{ut as default};
77
+ `;function G(i,c){let a;try{a=JSON.parse(c);}catch{throw new q$1(`${i} must be valid JSON`)}if(!a||typeof a!="object"||Array.isArray(a))throw new q$1(`${i} must be a JSON object`);return a}function B(i$1){i$1.command("get").description("Get a workspace by id").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await c($,{id:t});if(!o.workspace)throw new q$1(`Workspace ${t} not found`);i(e,o.workspace);}catch(o){h$1(o);}}),i$1.command("create").description("Create a workspace (global layer)").requiredOption("--name <name>").requiredOption("--slug <slug>","URL-safe workspace identifier").option("--tenant <id>","Target tenant id (defaults to the organization tenant)").option("--organization <id>","Owning organization id").option("-f, --format <format>").action(async t=>{try{let e={name:t.name,tenantId:t.tenant,organizationId:t.organization,slug:t.slug},o=await c(S,{input:e});k(`Workspace created: ${o.createWorkspace.name}`),i(t,o.createWorkspace);}catch(e){h$1(e);}}),i$1.command("update").description("Update a workspace").argument("<id>").option("--name <s>").option("--metadata <json>","Replace the workspace metadata (JSON object)").option("-f, --format <format>").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.metadata!==void 0&&(o.metadata=G("--metadata",e.metadata)),!Object.keys(o).length)throw new q$1("No updates specified");let m=await c(j,{id:t,input:o});k("Workspace updated"),i(e,m.updateWorkspace);}catch(o){h$1(o);}}),i$1.command("delete").description("Delete a workspace (workspace layer)").argument("<id>").action(async t=>{try{await b(_,{id:t}),k("Workspace deleted");}catch(e){h$1(e);}});let c$1=i$1.command("members").description("Workspace member management");c$1.command("list").description("List members of a workspace").requiredOption("--workspace <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e=await b(D,{workspaceId:t.workspace,pagination:{limit:t.limit,offset:0}});i(t,e.workspaceMembers.items,{headers:["ID","UserID","Role","Status","Joined"],rows:e.workspaceMembers.items.map(o=>[r(o.id,12),r(o.userId,12),o.role??"-",p(o.status),q$2(o.createdAt)])});}catch(e){h$1(e);}}),c$1.command("add").description("Add a member to a workspace").requiredOption("--workspace <id>").requiredOption("--user <userId>").option("--role <r>","MEMBER|ADMIN|OWNER","MEMBER").option("-f, --format <format>").action(async t=>{try{let e={workspaceId:t.workspace,userId:t.user,role:(t.role??"MEMBER").toUpperCase()},o=await b(x,{input:e});k("Member added"),i(t,o.addWorkspaceMember);}catch(e){h$1(e);}}),c$1.command("remove").description("Remove a member by membership id").argument("<membershipId>").action(async t=>{try{await b(v,{id:t}),k("Member removed");}catch(e){h$1(e);}}),c$1.command("role").description("Update member role").requiredOption("--workspace <id>").requiredOption("--user <userId>").requiredOption("--role <r>").action(async t=>{try{let e={workspaceId:t.workspace,userId:t.user,roles:[t.role.toUpperCase()]};await b(z,{input:e}),k("Member role updated");}catch(e){h$1(e);}});let a=i$1.command("projects").description("Workspace projects");a.command("list").description("List projects").option("--workspace <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e={};t.workspace&&(e.workspaceId=t.workspace);let o=await b(N,{filter:Object.keys(e).length?e:void 0,pagination:{limit:t.limit,offset:0}});i(t,o.projects.items,{headers:["ID","Name","Workspace","Status","Created"],rows:o.projects.items.map(m=>[r(m.id,12),m.name,r(m.workspaceId,12),p(m.status),q$2(m.createdAt)])});}catch(e){h$1(e);}}),a.command("get").description("Get a project").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await b(K,{id:t});if(!o.project)throw new q$1(`Project ${t} not found`);i(e,o.project);}catch(o){h$1(o);}}),a.command("create").description("Create a project").requiredOption("--workspace <id>").requiredOption("--name <name>").option("--description <s>").option("-f, --format <format>").action(async t=>{try{let e={workspaceId:t.workspace,name:t.name,description:t.description},o=await b(L,{input:e});k("Project created"),i(t,o.createProject);}catch(e){h$1(e);}}),i$1.command("invite").description("Workspace invitations").command("accept").description("Accept a workspace invitation").argument("<invitationId>").action(async t=>{try{await b(q,{id:t}),k("Invitation accepted");}catch(e){h$1(e);}}),i$1.command("activity").description("Workspace activity log").requiredOption("--workspace <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e=await b(U,{workspaceId:t.workspace,limit:t.limit,offset:0});i(t,e.getWorkspaceActivities);}catch(e){h$1(e);}});}var H={id:"workspaces",version:"1.0.0",displayName:"Workspaces",dependsOn:["auth"],register(i,c){a(c),P(i);let a$1=i.commands.find(r=>r.name()==="workspace");if(!a$1)throw new s("workspace command group missing after registerWorkspaceCommands");B(a$1);}},ut=H;export{ut as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/cli-sdk",
3
- "version": "2026.1108.1",
3
+ "version": "2026.1110.1",
4
4
  "description": "Modular CLI SDK shared across all Burdenoff product CLIs (vibecontrols, botlit, fluidgrids, bigconsole, healthybowl, devportal, workspaces). Each module exports CliModule contract; product CLIs become thin shells that pick which modules to mount.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -64,9 +64,9 @@
64
64
  "url": "git+https://github.com/Algoshred/cli-sdk.git"
65
65
  },
66
66
  "bugs": {
67
- "url": "https://github.com/algoshred/cli-sdk/issues"
67
+ "url": "https://github.com/Algoshred/cli-sdk/issues"
68
68
  },
69
- "homepage": "https://github.com/algoshred/cli-sdk#readme",
69
+ "homepage": "https://github.com/Algoshred/cli-sdk#readme",
70
70
  "publishConfig": {
71
71
  "access": "public",
72
72
  "registry": "https://registry.npmjs.org/"
@@ -1,34 +0,0 @@
1
- import {existsSync,readFileSync,writeFileSync,chmodSync,unlinkSync,mkdirSync}from'fs';import {join}from'path';import {homedir}from'os';import {GraphQLClient}from'graphql-request';import x from'cross-fetch';import {Command}from'commander';var W=300*1e3;function O(e){let n=join(e,"auth.json");function r(){existsSync(e)||mkdirSync(e,{recursive:true,mode:448});}function t(){try{if(!existsSync(n))return null;let a=readFileSync(n,"utf8");return JSON.parse(a)}catch{return null}}function i(a){r(),writeFileSync(n,JSON.stringify(a,null,2),{encoding:"utf8",mode:384});try{chmodSync(n,384);}catch{}}function s(){try{existsSync(n)&&unlinkSync(n);}catch{}}function o(){let a=t();return a?.expiresAt?Date.now()>=a.expiresAt:false}function u(){let a=t();return a?.expiresAt?Date.now()+W>=a.expiresAt:false}function l(){let a=t();return a?.workspaceTokenExpiresAt?Date.now()>=a.workspaceTokenExpiresAt:false}function m(){let a=t();return a?.workspaceTokenExpiresAt?Date.now()+W>=a.workspaceTokenExpiresAt:false}function y(){return t()?.accessToken?!o():false}return {read:t,write:i,clear:s,isTokenExpired:o,isTokenExpiringSoon:u,isWorkspaceTokenExpired:l,isWorkspaceTokenExpiringSoon:m,isAuthenticated:y}}var ce=["workspaceEndpoint","globalEndpoint","oidcIssuer","clientId","defaultFormat","verbose","authServiceEndpoint","productOrigin"];function S(e){let n=join(homedir(),".config",e.configDirName),r=join(n,"config.json"),t={workspaceEndpoint:e.workspaceEndpointDefault,globalEndpoint:e.globalEndpointDefault};function i(){existsSync(n)||mkdirSync(n,{recursive:true,mode:448});}function s(c){if(e.envPrefix){let d=process.env[`${e.envPrefix}_${c}`];if(d)return d}let p=process.env[c];return p&&p.length>0?p:void 0}function o(c){if(!e.envPrefix)return;let p=process.env[`${e.envPrefix}_${c}`];return p&&p.length>0?p:void 0}function u(){let c={};try{existsSync(r)&&(c=JSON.parse(readFileSync(r,"utf8")));}catch{}return {...t,...c,workspaceEndpoint:s("WORKSPACE_ENDPOINT")??c.workspaceEndpoint??t.workspaceEndpoint,globalEndpoint:s("GLOBAL_ENDPOINT")??c.globalEndpoint??t.globalEndpoint,oidcIssuer:s("OIDC_ISSUER")??c.oidcIssuer,clientId:s("CLIENT_ID")??c.clientId,productOrigin:o("ORIGIN")??c.productOrigin}}function l(c){i(),writeFileSync(r,JSON.stringify(c,null,2),{encoding:"utf8"});try{chmodSync(r,384);}catch{}}function m(c){return u()[c]}function y(c,p){let d=u();d[c]=p,l(d);}function a(){let c=u(),p=c.clientId||e.oidcClientId,d=c.oidcIssuer;if(!d){let f=c.globalEndpoint;f.includes("localhost")||f.includes("127.0.0.1")?d=f.replace(/\/graphql$/,"").replace(/\/global\/graphql$/,"/global"):d=e.oidcIssuerProd??"https://graphql.burdenoff.com/global";}return {oidcIssuer:d,clientId:p}}function g(){let c=u();if(c.productOrigin)return c.productOrigin;if(e.productOrigins)try{let p=new URL(c.workspaceEndpoint).hostname.toLowerCase();return e.productOrigins[p]}catch{return}}return {read:u,write:l,get:m,set:y,path:()=>r,dir:()=>n,resolveOIDC:a,resolveProductOrigin:g}}async function ue(e){let n=`${e.oidcIssuer}/oidc/device/code`,r=new URLSearchParams({client_id:e.clientId,scope:"openid profile email offline_access"}),t=await x(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});if(!t.ok){let s=await t.text().catch(()=>"Unknown error");throw new Error(`Device code request failed (${t.status}): ${s}`)}let i=await t.json();return {deviceCode:i.device_code,userCode:i.user_code,verificationUri:i.verification_uri,verificationUriComplete:i.verification_uri_complete??null,expiresIn:i.expires_in,interval:i.interval??5}}async function le(e,n,r){let t=`${r.oidcIssuer}/oauth/device/token`,i=n;for(;;){await new Promise(l=>setTimeout(l,i*1e3));let s=await x(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"urn:ietf:params:oauth:grant-type:device_code",device_code:e,client_id:r.clientId}).toString()}),o=await s.json();if(s.ok&&o.access_token)return {accessToken:o.access_token,refreshToken:o.refresh_token??"",expiresIn:o.expires_in??3600};let u=o.error;switch(u){case "authorization_pending":continue;case "slow_down":i+=5;continue;case "expired_token":throw new Error("Device code has expired. Please try again.");case "access_denied":throw new Error("Authorization was denied by the user.");default:throw new Error(`Device code polling failed: ${o.error_description??u??"Unknown error"}`)}}}async function $(e,n,r,t){let s=await x(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:`
2
- mutation AuthenticateApp($input: AuthenticateAppInput!) {
3
- authenticateApp(input: $input) {
4
- accessToken tokenType expiresIn scopes
5
- }
6
- }
7
- `,variables:{input:{clientId:n,clientSecret:r,scopes:t}}})});if(!s.ok){let u=await s.text().catch(()=>"Unknown error");throw new Error(`App authentication failed (${s.status}): ${u}`)}let o=await s.json();if(o.errors?.length)throw new Error(`App authentication failed: ${o.errors[0]?.message??"unknown error"}`);if(!o.data?.authenticateApp?.accessToken)throw new Error("App authentication failed: no access token returned");return o.data.authenticateApp}async function P(e,n,r,t){let s=await x(e,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify({query:`
8
- mutation IssueWorkspaceToken($input: IssueWorkspaceTokenInput!) {
9
- issueWorkspaceToken(input: $input) {
10
- success token expiresAt scopes
11
- error { code message }
12
- }
13
- }
14
- `,variables:{input:{workspaceId:r,organizationId:t}}})});if(!s.ok){let l=await s.text().catch(()=>"Unknown error");throw new Error(`Workspace token request failed (${s.status}): ${l}`)}let o=await s.json();if(o.errors?.length)throw new Error(`Workspace token failed: ${o.errors[0]?.message??"unknown error"}`);let u=o.data?.issueWorkspaceToken;if(!u?.success||!u.token){let l=u?.error?.message??"Unknown error";throw new Error(`Workspace token failed: ${l}`)}return {token:u.token,expiresAt:u.expiresAt??"",scopes:u.scopes??[]}}async function pe(e,n){let t=await x(e,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify({query:`
15
- query MyWorkspaces($limit: Int) {
16
- myWorkspaces(limit: $limit) {
17
- items { id name slug tenantId organizationId }
18
- }
19
- }
20
- `,variables:{limit:50}})});if(!t.ok){let s=await t.text().catch(()=>"Unknown error");throw new Error(`Failed to fetch workspaces (${t.status}): ${s}`)}let i=await t.json();if(i.errors?.length)throw new Error(`Failed to fetch workspaces: ${i.errors[0]?.message??"unknown error"}`);return i.data?.myWorkspaces?.items??[]}function de(e){try{let n=new URL(e);return n.protocol==="http:"||n.protocol==="https:"}catch{return false}}async function ge(e){try{if(!de(e))return !1;let{execFile:n}=await import('child_process'),r=process.platform,t,i;return r==="darwin"?(t="open",i=[e]):r==="win32"?(t="cmd",i=["/c","start","",e]):(t="xdg-open",i=[e]),new Promise(s=>{n(t,i,o=>{s(!o);});})}catch{return false}}var fe=3e4,z=3,me=1e3;function we(e){return new Promise(n=>setTimeout(n,e))}function he(e){if(e instanceof TypeError)return true;if(e&&typeof e=="object"&&"response"in e){let n=e.response;if(n&&typeof n.status=="number"&&n.status>=500)return true}return false}function V(e){if(e&&typeof e=="object"&&"response"in e){let n=e,r=n.response?.errors?.[0],t=r?.extensions?.originalError?.message;if(t)return t;if(r?.message)return r.message;let i=n.response?.status;return typeof i=="number"&&Number.isInteger(i)?`GraphQL request failed (HTTP ${i})`:"GraphQL request failed"}return e instanceof Error?e.message:String(e)}function T(e){let n={};return e?.accessToken&&(n.Authorization=`Bearer ${e.accessToken}`),e?.organizationId&&(n["x-org-id"]=e.organizationId),n}function H(e,n){let r=T(e);return n&&(r.Origin=n),e?.workspaceToken&&(r["X-Workspace-Authorization"]=`Bearer ${e.workspaceToken}`),e?.organizationId&&(r["x-org-id"]=e.organizationId),r}async function R(e,n,r){let t;for(let i=0;i<z;i++)try{let s=new AbortController,o=setTimeout(()=>s.abort(),fe);try{return await e.request({document:n,variables:r,signal:s.signal})}finally{clearTimeout(o);}}catch(s){if(t=s,s&&typeof s=="object"&&"response"in s){let o=s.response;if(o&&typeof o.status=="number"&&o.status>=400&&o.status<500)break}if(he(s)&&i<z-1){let o=me*Math.pow(2,i);await we(o);continue}break}throw new Error(V(t))}function L(e,n){let r=null,t=null;function i(){let a=e.read(),g=n.read();return r=new GraphQLClient(a.workspaceEndpoint),r.setHeaders(H(g,e.resolveProductOrigin())),t=new GraphQLClient(a.globalEndpoint),t.setHeaders(T(g)),{workspace:r,global:t}}async function s(){let a=n.read();if(!a)return;if(a.authMethod==="client_credentials"&&a.clientId&&a.clientSecret){let d=e.read();try{let f=await $(d.globalEndpoint,a.clientId,a.clientSecret);n.write({...a,accessToken:f.accessToken,expiresAt:Date.now()+f.expiresIn*1e3}),r=null,t=null;}catch{}return}if(!a.refreshToken)return;let g=e.read(),c=new GraphQLClient(g.globalEndpoint);c.setHeaders({Authorization:`Bearer ${a.accessToken}`});let p=`
21
- mutation RefreshToken($token: String!) {
22
- refreshToken(token: $token) {
23
- accessToken
24
- refreshToken
25
- expiresIn
26
- }
27
- }
28
- `;try{let f=(await c.request(p,{token:a.refreshToken})).refreshToken;n.write({...a,accessToken:f.accessToken,refreshToken:f.refreshToken,expiresAt:Date.now()+f.expiresIn*1e3}),r=null,t=null;}catch{}}async function o(){let a=n.read();if(!a?.accessToken||!a.workspaceId||!a.organizationId)return;let g=e.read();try{let c=await P(g.workspaceEndpoint,a.accessToken,a.workspaceId,a.organizationId);n.write({...a,workspaceToken:c.token,workspaceTokenExpiresAt:new Date(c.expiresAt).getTime()}),r=null;}catch{}}async function u(){n.isTokenExpiringSoon()&&await s(),n.read()?.workspaceToken&&n.isWorkspaceTokenExpiringSoon()&&await o();}return {workspace:{async request(a,g){await u();let{workspace:c}=r?{workspace:r}:i();return c.setHeaders(H(n.read(),e.resolveProductOrigin())),R(c,a,g)}},global:{async request(a,g){let{global:c}=t?{global:t}:i();return c.setHeaders(T(n.read())),R(c,a,g)}},workspaceAuthOnly:{async request(a,g){let c=e.read(),p=n.read(),d=new GraphQLClient(c.workspaceEndpoint),f=T(p),G=e.resolveProductOrigin();return G&&(f.Origin=G),d.setHeaders(f),R(d,a,g)}},reset(){r=null,t=null;}}}function _(){return !!(process.stdout.isTTY&&process.stdin.isTTY)}function B(e){if(e.format){let n=e.format.toLowerCase();if(n==="json"||n==="table"||n==="yaml")return n}return _()?"table":"json"}function D(e){console.log(JSON.stringify(e,null,2));}function J(e,n){if(e.length===0)return;let r=e.map((s,o)=>{let u=s.length;for(let l of n){let m=l[o]??"";m.length>u&&(u=m.length);}return Math.min(u,50)}),t=r.map(s=>"-".repeat(s+2)).join("+"),i=s=>s.map((o,u)=>` ${(o??"").padEnd(r[u]??0)} `).join("|");console.log(i(e)),console.log(t);for(let s of n)console.log(i(s));}function q(e,n){let r=" ".repeat(n),t=[];for(let[i,s]of Object.entries(e))if(s==null)t.push(`${r}${i}: null`);else if(Array.isArray(s)){t.push(`${r}${i}:`);for(let o of s)typeof o=="object"&&o!==null?(t.push(`${r} -`),t.push(q(o,n+2))):t.push(`${r} - ${String(o)}`);}else typeof s=="object"?(t.push(`${r}${i}:`),t.push(q(s,n+1))):t.push(`${r}${i}: ${String(s)}`);return t.join(`
29
- `)}function Y(e){if(typeof e!="object"||e===null){console.log(String(e));return}console.log(q(e,0));}function ke(e){process.stdout.write(e.endsWith(`
30
- `)?e:`${e}
31
- `);}function ye(e){console.log(`\u2713 ${e}`);}function Q(e){console.error(`\u2717 ${e}`);}function Ce(e){console.warn(`! ${e}`);}function xe(e){console.log(`\u2139 ${e}`);}function be(e){if(!e)return "-";try{return new Date(e).toLocaleString()}catch{return e}}function ve(e){if(!e)return "-";switch(e.toUpperCase()){case "ACTIVE":case "RUNNING":case "HEALTHY":return `\u2713 ${e}`;case "INACTIVE":case "STOPPED":case "PENDING":return `\u25CB ${e}`;case "ERROR":return `\u2717 ${e}`;case "ARCHIVED":return `\u2192 ${e}`;case "STARTING":return `\u25B6 ${e}`;case "TERMINATED":return `\u25A0 ${e}`;default:return e}}function Te(e,n){return e?e.length<=n?e:e.substring(0,n-3)+"...":"-"}function Ie(e,n,r){switch(B(e)){case "json":D(n);break;case "yaml":Y(n);break;case "table":r?J(r.headers,r.rows):D(n);break}}async function Ee(e,n){return n?true:_()?new Promise(r=>{process.stdout.write(`${e} [y/N] `),process.stdin.setEncoding("utf8"),process.stdin.once("data",t=>{let i=t.trim().toLowerCase();r(i==="y"||i==="yes");}),process.stdin.resume();}):(Q(`${e} Use --force to skip confirmation.`),false)}var N={isInteractive:_,getFormat:B,formatAndOutput:Ie,printJson:D,printTable:J,printYaml:Y,printRaw:ke,printSuccess:ye,printError:Q,printWarning:Ce,printInfo:xe,formatDate:be,formatStatus:ve,truncate:Te,confirm:Ee};function j(e={}){let{verbose:n=false,quiet:r=false}=e;return {debug(t,...i){n&&console.error(`[debug] ${t}`,...i);},info(t,...i){r||console.error(`[info] ${t}`,...i);},warn(t,...i){console.error(`[warn] ${t}`,...i);},error(t,...i){console.error(`[error] ${t}`,...i);}}}function Ae(e){return e.includes("localhost")||e.includes("127.0.0.1")?"local":e.includes("alpha")||e.includes("staging")?"staging":"prod"}function Oe(e){return !!e&&typeof e.debug=="function"&&typeof e.info=="function"}function Se(e){let n=S(e.defaults),r=O(n.dir()),t=L(n,r),i=e.output??N,s=Oe(e.logger)?e.logger:j(e.logger),o=e.env??Ae(n.read().workspaceEndpoint);return {productName:e.productName,productVersion:e.productVersion,defaults:e.defaults,config:n,auth:r,gql:t,output:i,logger:s,env:o}}var C=class extends Error{exitCode;hint;constructor(n,r){super(n),this.name="CliUserError",this.exitCode=r?.exitCode??1,this.hint=r?.hint;}},b=class extends C{constructor(n,r){super(n,{exitCode:2,hint:r?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},k=class extends Error{cause;constructor(n,r){super(n),this.name="CliInternalError",this.cause=r;}};var I=class extends k{constructor(n,r){super(`Module '${n}' declares dependency on '${r}', but '${r}' is not in the module list.`),this.name="MissingDependencyError";}},E=class extends k{constructor(n){super(`Circular dependency detected among modules: ${n.join(" -> ")}`),this.name="CircularDependencyError";}};function F(e){let n=new Map;for(let o of e){if(n.has(o.id))throw new k(`Duplicate module id: '${o.id}'`);n.set(o.id,o);}for(let o of e)for(let u of o.dependsOn??[])if(!n.has(u))throw new I(o.id,u);let r=[],t=new Set,i=new Set;function s(o,u){if(!i.has(o.id)){if(t.has(o.id))throw new E([...u,o.id]);t.add(o.id);for(let l of o.dependsOn??[]){let m=n.get(l);m&&s(m,[...u,o.id]);}t.delete(o.id),i.add(o.id),r.push(o);}}for(let o of e)s(o,[]);return r}function Pe(e,n,r){let t=new Command;t.name(r.name).description(r.description??"").version(r.version,"-v, --version").option("-f, --format <format>","Output format (json, table, yaml)").option("--verbose","Enable verbose logging").option("--no-color","Disable colored output"),t.hook("preAction",(o,u)=>{let l=t.opts().format;if(typeof l!="string")return;u.options.some(y=>y.attributeName()==="format")&&u.getOptionValue("format")===void 0&&u.setOptionValue("format",l);});let i=F(n);for(let o of i)o.register(t,e);r.helpExamples?.length&&t.addHelpText("after",`
32
- Examples:
33
- `+r.helpExamples.map(o=>" "+o).join(`
34
- `)),t.on("command:*",()=>{e.output.printError(`Invalid command: ${t.args.join(" ")}`),e.output.printInfo(`Run \`${r.name} --help\` for available commands.`),process.exit(1);});async function s(o=process.argv){try{await t.parseAsync(o),o.length<=2&&t.outputHelp();}catch(u){Re(e,u);}}return {program:t,run:s}}function Re(e,n){if(n instanceof b&&(e.output.printError(n.message),n.hint&&e.output.printInfo(n.hint),process.exit(n.exitCode)),n instanceof C&&(e.output.printError(n.message),n.hint&&e.output.printInfo(n.hint),process.exit(n.exitCode)),n instanceof k&&(e.output.printError(`Internal error: ${n.message}`),n.cause&&e.logger.debug("caused by:",n.cause),process.exit(70)),n&&typeof n=="object"&&"code"in n&&"exitCode"in n){let t=n.exitCode;process.exit(typeof t=="number"?t:0);}let r=n instanceof Error?n.message:String(n);e.output.printError(r),process.exit(1);}export{O as a,ce as b,S as c,ue as d,le as e,$ as f,P as g,pe as h,ge as i,V as j,L as k,N as l,j as m,Se as n,C as o,b as p,k as q,I as r,E as s,F as t,Pe as u};
@@ -1 +0,0 @@
1
- import {b as b$1,o as o$1,p as p$1,q as q$1}from'./chunk-2OISIPE6.js';var o=null;function b(t){o=t;}function e(){if(!o)throw new q$1("vibecontrols module helpers used before setHelpersContext was called");return o}function p(){let t=e();if(!t.auth.isAuthenticated())throw new p$1("Authentication required.",{hint:`Run \`${t.productName} auth login\` to authenticate.`})}async function w(t,n){return p(),e().gql.workspace.request(t,n)}async function T(t,n){return e().gql.global.request(t,n)}async function q(t,n){return e().gql.workspaceAuthOnly.request(t,n)}async function A(t,n){return e().gql.global.request(t,n)}function k(){e().gql.reset();}function v(t){return /^(error|fail|failed|failure|timeout|cancel)/i.test(t.status)||t.exitCode!==null&&t.exitCode!==void 0&&t.exitCode!==0?true:t.webhookStatusCode!==null&&t.webhookStatusCode!==void 0&&t.webhookStatusCode>=400}function S(t){let n=t instanceof Error?t.message:String(t);throw new o$1(n)}function E(t,n,a){e().output.formatAndOutput(t,n,a);}function I(){return e().output}function O(t){e().output.printSuccess(t);}function D(t){e().output.printError(t);}function y(t){e().output.printInfo(t);}function N(t){e().output.printWarning(t);}function R(t){e().output.printJson(t);}function F(t){return e().output.formatStatus(t)}function W(t){return e().output.formatDate(t)}function L(t,n){return e().output.truncate(t,n)}function V(t,n){return e().output.confirm(t,n)}function P(t,n){e().output.printTable(t,n);}function _(){return e()}function K(){return e().auth.read()}function G(t){e().auth.write(t);}function B(){e().auth.clear();}function Y(){return e().config.read()}function j(t){return e().config.get(t)}function H(t,n){e().config.set(t,n);}function J(){return e().config.path()}var U=b$1;function $(){return e().config.resolveOIDC()}function z(t){return t?t.expiresAt?Date.now()>=t.expiresAt:false:e().auth.isTokenExpired()}export{H as A,J as B,U as C,$ as D,z as E,b as a,w as b,T as c,q as d,A as e,k as f,v as g,S as h,E as i,I as j,O as k,D as l,y as m,N as n,R as o,F as p,W as q,L as r,V as s,P as t,_ as u,K as v,G as w,B as x,Y as y,j as z};