@burdenoff/cli-sdk 2026.928.1 → 2026.1021.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 (236) hide show
  1. package/dist/chunk-IZXPWPKX.js +32 -0
  2. package/dist/chunk-NLEVVDXR.js +1 -0
  3. package/dist/core/index.cjs +7 -7
  4. package/dist/core/index.d.cts +2 -2
  5. package/dist/core/index.d.ts +2 -2
  6. package/dist/core/index.js +1 -1
  7. package/dist/index.cjs +7 -7
  8. package/dist/index.d.cts +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js +1 -1
  11. package/dist/{module-DxCuik6L.d.cts → module-DOIiVaXQ.d.cts} +4 -1
  12. package/dist/{module-DxCuik6L.d.ts → module-DOIiVaXQ.d.ts} +4 -1
  13. package/dist/modules/adaptercloud/index.cjs +2 -2
  14. package/dist/modules/adaptercloud/index.d.cts +1 -1
  15. package/dist/modules/adaptercloud/index.d.ts +1 -1
  16. package/dist/modules/adaptercloud/index.js +1 -1
  17. package/dist/modules/artistrybase/index.cjs +6 -6
  18. package/dist/modules/artistrybase/index.d.cts +1 -1
  19. package/dist/modules/artistrybase/index.d.ts +1 -1
  20. package/dist/modules/artistrybase/index.js +1 -1
  21. package/dist/modules/assethandler/index.cjs +2 -2
  22. package/dist/modules/assethandler/index.d.cts +1 -1
  23. package/dist/modules/assethandler/index.d.ts +1 -1
  24. package/dist/modules/assethandler/index.js +1 -1
  25. package/dist/modules/atheletebridge/index.cjs +4 -4
  26. package/dist/modules/atheletebridge/index.d.cts +1 -1
  27. package/dist/modules/atheletebridge/index.d.ts +1 -1
  28. package/dist/modules/atheletebridge/index.js +1 -1
  29. package/dist/modules/auth/index.cjs +34 -34
  30. package/dist/modules/auth/index.d.cts +1 -1
  31. package/dist/modules/auth/index.d.ts +1 -1
  32. package/dist/modules/auth/index.js +30 -30
  33. package/dist/modules/billing/index.cjs +3 -3
  34. package/dist/modules/billing/index.d.cts +1 -1
  35. package/dist/modules/billing/index.d.ts +1 -1
  36. package/dist/modules/billing/index.js +1 -1
  37. package/dist/modules/brainyrich/index.cjs +4 -4
  38. package/dist/modules/brainyrich/index.d.cts +1 -1
  39. package/dist/modules/brainyrich/index.d.ts +1 -1
  40. package/dist/modules/brainyrich/index.js +1 -1
  41. package/dist/modules/buildmyiq/index.cjs +3 -3
  42. package/dist/modules/buildmyiq/index.d.cts +1 -1
  43. package/dist/modules/buildmyiq/index.d.ts +1 -1
  44. package/dist/modules/buildmyiq/index.js +1 -1
  45. package/dist/modules/channels/index.cjs +7 -7
  46. package/dist/modules/channels/index.d.cts +1 -1
  47. package/dist/modules/channels/index.d.ts +1 -1
  48. package/dist/modules/channels/index.js +1 -1
  49. package/dist/modules/collabkin/index.cjs +11 -11
  50. package/dist/modules/collabkin/index.d.cts +1 -1
  51. package/dist/modules/collabkin/index.d.ts +1 -1
  52. package/dist/modules/collabkin/index.js +1 -1
  53. package/dist/modules/comradecircle/index.cjs +5 -5
  54. package/dist/modules/comradecircle/index.d.cts +1 -1
  55. package/dist/modules/comradecircle/index.d.ts +1 -1
  56. package/dist/modules/comradecircle/index.js +1 -1
  57. package/dist/modules/conversations/index.cjs +8 -8
  58. package/dist/modules/conversations/index.d.cts +1 -1
  59. package/dist/modules/conversations/index.d.ts +1 -1
  60. package/dist/modules/conversations/index.js +1 -1
  61. package/dist/modules/coolandlovely/index.cjs +4 -4
  62. package/dist/modules/coolandlovely/index.d.cts +1 -1
  63. package/dist/modules/coolandlovely/index.d.ts +1 -1
  64. package/dist/modules/coolandlovely/index.js +1 -1
  65. package/dist/modules/cosmicintersection/index.cjs +4 -4
  66. package/dist/modules/cosmicintersection/index.d.cts +1 -1
  67. package/dist/modules/cosmicintersection/index.d.ts +1 -1
  68. package/dist/modules/cosmicintersection/index.js +1 -1
  69. package/dist/modules/crewfoundry/index.cjs +4 -4
  70. package/dist/modules/crewfoundry/index.d.cts +1 -1
  71. package/dist/modules/crewfoundry/index.d.ts +1 -1
  72. package/dist/modules/crewfoundry/index.js +1 -1
  73. package/dist/modules/devportal/index.cjs +5 -5
  74. package/dist/modules/devportal/index.d.cts +1 -1
  75. package/dist/modules/devportal/index.d.ts +1 -1
  76. package/dist/modules/devportal/index.js +1 -1
  77. package/dist/modules/ecoimpacthub/index.cjs +2 -2
  78. package/dist/modules/ecoimpacthub/index.d.cts +1 -1
  79. package/dist/modules/ecoimpacthub/index.d.ts +1 -1
  80. package/dist/modules/ecoimpacthub/index.js +1 -1
  81. package/dist/modules/eventfullymanaged/index.cjs +21 -21
  82. package/dist/modules/eventfullymanaged/index.d.cts +1 -1
  83. package/dist/modules/eventfullymanaged/index.d.ts +1 -1
  84. package/dist/modules/eventfullymanaged/index.js +1 -1
  85. package/dist/modules/export/index.cjs +3 -3
  86. package/dist/modules/export/index.d.cts +1 -1
  87. package/dist/modules/export/index.d.ts +1 -1
  88. package/dist/modules/export/index.js +1 -1
  89. package/dist/modules/files/index.cjs +9 -9
  90. package/dist/modules/files/index.d.cts +1 -1
  91. package/dist/modules/files/index.d.ts +1 -1
  92. package/dist/modules/files/index.js +1 -1
  93. package/dist/modules/fluidgrids/index.cjs +401 -0
  94. package/dist/modules/fluidgrids/index.d.cts +7 -0
  95. package/dist/modules/fluidgrids/index.d.ts +7 -0
  96. package/dist/modules/fluidgrids/index.js +401 -0
  97. package/dist/modules/ggnomad/index.cjs +5 -5
  98. package/dist/modules/ggnomad/index.d.cts +1 -1
  99. package/dist/modules/ggnomad/index.d.ts +1 -1
  100. package/dist/modules/ggnomad/index.js +1 -1
  101. package/dist/modules/govcitizenhub/index.cjs +4 -4
  102. package/dist/modules/govcitizenhub/index.d.cts +1 -1
  103. package/dist/modules/govcitizenhub/index.d.ts +1 -1
  104. package/dist/modules/govcitizenhub/index.js +1 -1
  105. package/dist/modules/groups/index.cjs +4 -4
  106. package/dist/modules/groups/index.d.cts +1 -1
  107. package/dist/modules/groups/index.d.ts +1 -1
  108. package/dist/modules/groups/index.js +1 -1
  109. package/dist/modules/headshotmarketing/index.cjs +1 -1
  110. package/dist/modules/headshotmarketing/index.d.cts +1 -1
  111. package/dist/modules/headshotmarketing/index.d.ts +1 -1
  112. package/dist/modules/headshotmarketing/index.js +1 -1
  113. package/dist/modules/health/index.d.cts +1 -1
  114. package/dist/modules/health/index.d.ts +1 -1
  115. package/dist/modules/hookmovies/index.cjs +7 -7
  116. package/dist/modules/hookmovies/index.d.cts +1 -1
  117. package/dist/modules/hookmovies/index.d.ts +1 -1
  118. package/dist/modules/hookmovies/index.js +1 -1
  119. package/dist/modules/housingvista/index.cjs +7 -7
  120. package/dist/modules/housingvista/index.d.cts +1 -1
  121. package/dist/modules/housingvista/index.d.ts +1 -1
  122. package/dist/modules/housingvista/index.js +1 -1
  123. package/dist/modules/integrations/index.cjs +5 -5
  124. package/dist/modules/integrations/index.d.cts +1 -1
  125. package/dist/modules/integrations/index.d.ts +1 -1
  126. package/dist/modules/integrations/index.js +1 -1
  127. package/dist/modules/intelwatchtower/index.cjs +4 -4
  128. package/dist/modules/intelwatchtower/index.d.cts +1 -1
  129. package/dist/modules/intelwatchtower/index.d.ts +1 -1
  130. package/dist/modules/intelwatchtower/index.js +1 -1
  131. package/dist/modules/kadaikodi/index.cjs +2 -2
  132. package/dist/modules/kadaikodi/index.d.cts +1 -1
  133. package/dist/modules/kadaikodi/index.d.ts +1 -1
  134. package/dist/modules/kadaikodi/index.js +1 -1
  135. package/dist/modules/labsofscience/index.cjs +4 -4
  136. package/dist/modules/labsofscience/index.d.cts +1 -1
  137. package/dist/modules/labsofscience/index.d.ts +1 -1
  138. package/dist/modules/labsofscience/index.js +1 -1
  139. package/dist/modules/manufacturedops/index.cjs +6 -6
  140. package/dist/modules/manufacturedops/index.d.cts +1 -1
  141. package/dist/modules/manufacturedops/index.d.ts +1 -1
  142. package/dist/modules/manufacturedops/index.js +1 -1
  143. package/dist/modules/movethewheels/index.cjs +1 -1
  144. package/dist/modules/movethewheels/index.d.cts +1 -1
  145. package/dist/modules/movethewheels/index.d.ts +1 -1
  146. package/dist/modules/movethewheels/index.js +1 -1
  147. package/dist/modules/mybodyshield/index.cjs +6 -6
  148. package/dist/modules/mybodyshield/index.d.cts +1 -1
  149. package/dist/modules/mybodyshield/index.d.ts +1 -1
  150. package/dist/modules/mybodyshield/index.js +1 -1
  151. package/dist/modules/notifications/index.cjs +5 -5
  152. package/dist/modules/notifications/index.d.cts +1 -1
  153. package/dist/modules/notifications/index.d.ts +1 -1
  154. package/dist/modules/notifications/index.js +1 -1
  155. package/dist/modules/organizations/index.d.cts +1 -1
  156. package/dist/modules/organizations/index.d.ts +1 -1
  157. package/dist/modules/organizations/index.js +1 -1
  158. package/dist/modules/planmagnet/index.cjs +23 -23
  159. package/dist/modules/planmagnet/index.d.cts +1 -1
  160. package/dist/modules/planmagnet/index.d.ts +1 -1
  161. package/dist/modules/planmagnet/index.js +1 -1
  162. package/dist/modules/products/index.cjs +4 -4
  163. package/dist/modules/products/index.d.cts +1 -1
  164. package/dist/modules/products/index.d.ts +1 -1
  165. package/dist/modules/products/index.js +1 -1
  166. package/dist/modules/proserviceworld/index.cjs +2 -2
  167. package/dist/modules/proserviceworld/index.d.cts +1 -1
  168. package/dist/modules/proserviceworld/index.d.ts +1 -1
  169. package/dist/modules/proserviceworld/index.js +1 -1
  170. package/dist/modules/rbac/index.cjs +2 -2
  171. package/dist/modules/rbac/index.d.cts +1 -1
  172. package/dist/modules/rbac/index.d.ts +1 -1
  173. package/dist/modules/rbac/index.js +1 -1
  174. package/dist/modules/sandbox/index.cjs +4 -4
  175. package/dist/modules/sandbox/index.d.cts +1 -1
  176. package/dist/modules/sandbox/index.d.ts +1 -1
  177. package/dist/modules/sandbox/index.js +1 -1
  178. package/dist/modules/scheduler/index.cjs +5 -5
  179. package/dist/modules/scheduler/index.d.cts +1 -1
  180. package/dist/modules/scheduler/index.d.ts +1 -1
  181. package/dist/modules/scheduler/index.js +1 -1
  182. package/dist/modules/security/index.cjs +7 -7
  183. package/dist/modules/security/index.d.cts +1 -1
  184. package/dist/modules/security/index.d.ts +1 -1
  185. package/dist/modules/security/index.js +1 -1
  186. package/dist/modules/semanticfed/index.cjs +7 -7
  187. package/dist/modules/semanticfed/index.d.cts +1 -1
  188. package/dist/modules/semanticfed/index.d.ts +1 -1
  189. package/dist/modules/semanticfed/index.js +1 -1
  190. package/dist/modules/store/index.cjs +7 -7
  191. package/dist/modules/store/index.d.cts +1 -1
  192. package/dist/modules/store/index.d.ts +1 -1
  193. package/dist/modules/store/index.js +1 -1
  194. package/dist/modules/subscriberbot/index.cjs +2 -2
  195. package/dist/modules/subscriberbot/index.d.cts +1 -1
  196. package/dist/modules/subscriberbot/index.d.ts +1 -1
  197. package/dist/modules/subscriberbot/index.js +1 -1
  198. package/dist/modules/support/index.cjs +2 -2
  199. package/dist/modules/support/index.d.cts +1 -1
  200. package/dist/modules/support/index.d.ts +1 -1
  201. package/dist/modules/support/index.js +1 -1
  202. package/dist/modules/tags/index.cjs +2 -2
  203. package/dist/modules/tags/index.d.cts +1 -1
  204. package/dist/modules/tags/index.d.ts +1 -1
  205. package/dist/modules/tags/index.js +1 -1
  206. package/dist/modules/technospam/index.cjs +4 -4
  207. package/dist/modules/technospam/index.d.cts +1 -1
  208. package/dist/modules/technospam/index.d.ts +1 -1
  209. package/dist/modules/technospam/index.js +1 -1
  210. package/dist/modules/theculturepost/index.cjs +3 -3
  211. package/dist/modules/theculturepost/index.d.cts +1 -1
  212. package/dist/modules/theculturepost/index.d.ts +1 -1
  213. package/dist/modules/theculturepost/index.js +1 -1
  214. package/dist/modules/theglobalfuel/index.cjs +3 -3
  215. package/dist/modules/theglobalfuel/index.d.cts +1 -1
  216. package/dist/modules/theglobalfuel/index.d.ts +1 -1
  217. package/dist/modules/theglobalfuel/index.js +1 -1
  218. package/dist/modules/timecampus/index.cjs +7 -7
  219. package/dist/modules/timecampus/index.d.cts +1 -1
  220. package/dist/modules/timecampus/index.d.ts +1 -1
  221. package/dist/modules/timecampus/index.js +1 -1
  222. package/dist/modules/tours/index.cjs +2 -2
  223. package/dist/modules/tours/index.d.cts +1 -1
  224. package/dist/modules/tours/index.d.ts +1 -1
  225. package/dist/modules/tours/index.js +1 -1
  226. package/dist/modules/vibecontrols/index.cjs +1 -1
  227. package/dist/modules/vibecontrols/index.d.cts +1 -1
  228. package/dist/modules/vibecontrols/index.d.ts +1 -1
  229. package/dist/modules/vibecontrols/index.js +1 -1
  230. package/dist/modules/workspaces/index.cjs +15 -15
  231. package/dist/modules/workspaces/index.d.cts +1 -1
  232. package/dist/modules/workspaces/index.d.ts +1 -1
  233. package/dist/modules/workspaces/index.js +11 -11
  234. package/package.json +1 -1
  235. package/dist/chunk-TCBALVP4.js +0 -32
  236. package/dist/chunk-WXDQ3S5J.js +0 -1
@@ -1,33 +1,33 @@
1
- import {a,t,k,h,w,l,u,f,i,g as g$1,c,b,p,n,o as o$1}from'../../chunk-WXDQ3S5J.js';import {q as q$1,o,h as h$1,g}from'../../chunk-TCBALVP4.js';function P(i$1){let d=i$1.command("workspace").description("Workspace context");d.command("current").description("Show current workspace").option("-f, --format <format>","Output format").action(a=>{let r=t(),t$1=r?.workspaceId??null;if(!t$1){k("No workspace set. Run: vibecontrols workspace set <id>");return}h(a,{workspaceId:t$1,organizationId:r?.organizationId??"-",hasWorkspaceToken:!!r?.workspaceToken},{headers:["Key","Value"],rows:[["Workspace ID",t$1],["Organization ID",r?.organizationId??"-"],["Has Workspace Token",String(!!r?.workspaceToken)]]});}),d.command("set").description("Set workspace ID and issue workspace token").argument("<id>","Workspace ID").action(async a=>{try{let r=t();if(!r?.accessToken)throw new o("Not authenticated. Run: vibecontrols auth login");let t$1=w(),e;k("Looking up workspace details...");try{let m=(await h$1(t$1.globalEndpoint,r.accessToken)).find(N=>N.id===a);m?e=m.organizationId:(l("Workspace not in your accessible list \u2014 using stored organization id as fallback"),e=r.organizationId);}catch{l("Could not fetch workspace details \u2014 using stored organization id"),e=r.organizationId;}if(r.accessToken&&e){k("Issuing workspace token...");try{let o=await g(t$1.workspaceEndpoint,r.accessToken,a,e);u({...r,workspaceId:a,organizationId:e,workspaceToken:o.token,workspaceTokenExpiresAt:new Date(o.expiresAt).getTime()}),f(),i(`Workspace set to: ${a} (token issued)`);return}catch(o){l(`Workspace token failed: ${o instanceof Error?o.message:String(o)}`);}}u({...r,workspaceId:a,organizationId:e}),f(),i(`Workspace set to: ${a}`);}catch(r){g$1(r);}}),d.command("list").description("List available workspaces").option("-f, --format <format>","Output format").action(async a=>{try{let r=t();if(!r?.accessToken)throw new o("Not authenticated. Run: vibecontrols auth login");let t$1=w(),e=await h$1(t$1.globalEndpoint,r.accessToken);h(a,e,{headers:["ID","Name","Slug","Organization ID"],rows:e.map(o=>[o.id,o.name,o.slug,o.organizationId])});}catch(r){g$1(r);}});}var T=`
1
+ import {a,t,k,s,h,w,l,u,f,i,g as g$1,c,b as b$1,p,n,o as o$1}from'../../chunk-NLEVVDXR.js';import {q as q$1,o,h as h$1,g}from'../../chunk-IZXPWPKX.js';function b(i$1){let d=i$1.command("workspace").description("Workspace context");d.command("current").description("Show current workspace").option("-f, --format <format>","Output format").action(a=>{let r=t(),t$1=r?.workspaceId??null;if(!t$1){k(`No workspace set. Run: ${s().productName} workspace set <id>`);return}h(a,{workspaceId:t$1,organizationId:r?.organizationId??"-",hasWorkspaceToken:!!r?.workspaceToken},{headers:["Key","Value"],rows:[["Workspace ID",t$1],["Organization ID",r?.organizationId??"-"],["Has Workspace Token",String(!!r?.workspaceToken)]]});}),d.command("set").description("Set workspace ID and issue workspace token").argument("<id>","Workspace ID").action(async a=>{try{let r=t();if(!r?.accessToken)throw new o(`Not authenticated. Run: ${s().productName} auth login`);let t$1=w(),e;k("Looking up workspace details...");try{let m=(await h$1(t$1.globalEndpoint,r.accessToken)).find(J=>J.id===a);m?e=m.organizationId:(l("Workspace not in your accessible list \u2014 using stored organization id as fallback"),e=r.organizationId);}catch{l("Could not fetch workspace details \u2014 using stored organization id"),e=r.organizationId;}if(r.accessToken&&e){k("Issuing workspace token...");try{let o=await g(t$1.workspaceEndpoint,r.accessToken,a,e);u({...r,workspaceId:a,organizationId:e,workspaceToken:o.token,workspaceTokenExpiresAt:new Date(o.expiresAt).getTime()}),f(),i(`Workspace set to: ${a} (token issued)`);return}catch(o){l(`Workspace token failed: ${o instanceof Error?o.message:String(o)}`);}}u({...r,workspaceId:a,organizationId:e}),f(),i(`Workspace set to: ${a}`);}catch(r){g$1(r);}}),d.command("list").description("List available workspaces").option("-f, --format <format>","Output format").action(async a=>{try{let r=t();if(!r?.accessToken)throw new o(`Not authenticated. Run: ${s().productName} auth login`);let t$1=w(),e=await h$1(t$1.globalEndpoint,r.accessToken);h(a,e,{headers:["ID","Name","Slug","Organization ID"],rows:e.map(o=>[o.id,o.name,o.slug,o.organizationId])});}catch(r){g$1(r);}});}var $=`
2
2
  query GetWorkspace($id: ID!) {
3
3
  workspace(id: $id) {
4
4
  id name slug description tenantId organizationId status createdAt updatedAt
5
5
  }
6
6
  }
7
- `,$=`
7
+ `,S=`
8
8
  mutation CreateWorkspace($input: CreateWorkspaceInput!) {
9
9
  createWorkspace(input: $input) {
10
10
  id name slug status createdAt
11
11
  }
12
12
  }
13
- `,S=`
13
+ `,_=`
14
14
  mutation UpdateWorkspace($id: ID!, $input: UpdateWorkspaceInput!) {
15
15
  updateWorkspace(id: $id, input: $input) {
16
16
  id name description status updatedAt
17
17
  }
18
18
  }
19
- `,_=`
19
+ `,j=`
20
20
  mutation DeleteWorkspace($id: ID!) {
21
21
  deleteWorkspace(id: $id)
22
22
  }
23
- `,j=`
23
+ `,D=`
24
24
  query ListWorkspaceMembers($workspaceId: ID!, $pagination: PaginationInput) {
25
25
  workspaceMembers(workspaceId: $workspaceId, pagination: $pagination) {
26
26
  items { id userId role status createdAt }
27
27
  total hasMore
28
28
  }
29
29
  }
30
- `,D=`
30
+ `,x=`
31
31
  mutation AddWorkspaceMember($input: AddWorkspaceMemberInput!) {
32
32
  addWorkspaceMember(input: $input) {
33
33
  id userId role status
@@ -37,26 +37,26 @@ import {a,t,k,h,w,l,u,f,i,g as g$1,c,b,p,n,o as o$1}from'../../chunk-WXDQ3S5J.js
37
37
  mutation RemoveWorkspaceMember($id: ID!) {
38
38
  removeWorkspaceMember(id: $id)
39
39
  }
40
- `,x=`
40
+ `,z=`
41
41
  mutation UpdateWorkspaceMemberRoles($input: UpdateWorkspaceMemberRolesInput!) {
42
42
  updateWorkspaceMemberRoles(input: $input) {
43
43
  id userId role
44
44
  }
45
45
  }
46
- `,z=`
46
+ `,K=`
47
47
  query ListProjects($filter: ProjectFilterInput, $pagination: PaginationInput) {
48
48
  projects(filter: $filter, pagination: $pagination) {
49
49
  items { id name workspaceId status createdAt }
50
50
  total hasMore
51
51
  }
52
52
  }
53
- `,K=`
53
+ `,L=`
54
54
  query GetProject($id: ID!) {
55
55
  project(id: $id) {
56
56
  id name description workspaceId status createdAt updatedAt
57
57
  }
58
58
  }
59
- `,L=`
59
+ `,N=`
60
60
  mutation CreateProject($input: CreateProjectInput!) {
61
61
  createProject(input: $input) {
62
62
  id name workspaceId status
@@ -74,4 +74,4 @@ import {a,t,k,h,w,l,u,f,i,g as g$1,c,b,p,n,o as o$1}from'../../chunk-WXDQ3S5J.js
74
74
  id action actorId summary createdAt
75
75
  }
76
76
  }
77
- `;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(T,{id:t});if(!o$1.workspace)throw new o(`Workspace ${t} not found`);h(e,o$1.workspace);}catch(o){g$1(o);}}),i$1.command("create").description("Create a workspace (global layer)").requiredOption("--name <name>").option("--description <s>").option("--tenant <id>","Target tenant id").option("--organization <id>","Owning organization id").option("--slug <slug>").option("-f, --format <format>").action(async t=>{try{let e={name:t.name,description:t.description,tenantId:t.tenant,organizationId:t.organization,slug:t.slug},o=await c($,{input:e});i(`Workspace created: ${o.createWorkspace.name}`),h(t,o.createWorkspace);}catch(e){g$1(e);}}),i$1.command("update").description("Update a workspace").argument("<id>").option("--name <s>").option("--description <s>").option("--status <s>").option("-f, --format <format>").action(async(t,e)=>{try{let o$1={};if(e.name&&(o$1.name=e.name),e.description!==void 0&&(o$1.description=e.description),e.status&&(o$1.status=e.status.toUpperCase()),!Object.keys(o$1).length)throw new o("No updates specified");let m=await c(S,{id:t,input:o$1});i("Workspace updated"),h(e,m.updateWorkspace);}catch(o){g$1(o);}}),i$1.command("delete").description("Delete a workspace (workspace layer)").argument("<id>").action(async t=>{try{await b(_,{id:t}),i("Workspace deleted");}catch(e){g$1(e);}});let d=i$1.command("members").description("Workspace member management");d.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(j,{workspaceId:t.workspace,pagination:{limit:t.limit,offset:0}});h(t,e.workspaceMembers.items,{headers:["ID","UserID","Role","Status","Joined"],rows:e.workspaceMembers.items.map(o=>[p(o.id,12),p(o.userId,12),o.role??"-",n(o.status),o$1(o.createdAt)])});}catch(e){g$1(e);}}),d.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(D,{input:e});i("Member added"),h(t,o.addWorkspaceMember);}catch(e){g$1(e);}}),d.command("remove").description("Remove a member by membership id").argument("<membershipId>").action(async t=>{try{await b(v,{id:t}),i("Member removed");}catch(e){g$1(e);}}),d.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(x,{input:e}),i("Member role updated");}catch(e){g$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(z,{filter:Object.keys(e).length?e:void 0,pagination:{limit:t.limit,offset:0}});h(t,o.projects.items,{headers:["ID","Name","Workspace","Status","Created"],rows:o.projects.items.map(m=>[p(m.id,12),m.name,p(m.workspaceId,12),n(m.status),o$1(m.createdAt)])});}catch(e){g$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`);h(e,o$1.project);}catch(o){g$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});i("Project created"),h(t,o.createProject);}catch(e){g$1(e);}}),i$1.command("invite").description("Workspace invitations").command("accept").description("Accept a workspace invitation").argument("<invitationId>").action(async t=>{try{await b(U,{id:t}),i("Invitation accepted");}catch(e){g$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(q,{workspaceId:t.workspace,limit:t.limit,offset:0});h(t,e.getWorkspaceActivities);}catch(e){g$1(e);}});}var V={id:"workspaces",version:"1.0.0",displayName:"Workspaces",dependsOn:["auth"],register(i,d){a(d),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);}},pt=V;export{pt as default};
77
+ `;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`);h(e,o$1.workspace);}catch(o){g$1(o);}}),i$1.command("create").description("Create a workspace (global layer)").requiredOption("--name <name>").option("--description <s>").option("--tenant <id>","Target tenant id").option("--organization <id>","Owning organization id").option("--slug <slug>").option("-f, --format <format>").action(async t=>{try{let e={name:t.name,description:t.description,tenantId:t.tenant,organizationId:t.organization,slug:t.slug},o=await c(S,{input:e});i(`Workspace created: ${o.createWorkspace.name}`),h(t,o.createWorkspace);}catch(e){g$1(e);}}),i$1.command("update").description("Update a workspace").argument("<id>").option("--name <s>").option("--description <s>").option("--status <s>").option("-f, --format <format>").action(async(t,e)=>{try{let o$1={};if(e.name&&(o$1.name=e.name),e.description!==void 0&&(o$1.description=e.description),e.status&&(o$1.status=e.status.toUpperCase()),!Object.keys(o$1).length)throw new o("No updates specified");let m=await c(_,{id:t,input:o$1});i("Workspace updated"),h(e,m.updateWorkspace);}catch(o){g$1(o);}}),i$1.command("delete").description("Delete a workspace (workspace layer)").argument("<id>").action(async t=>{try{await b$1(j,{id:t}),i("Workspace deleted");}catch(e){g$1(e);}});let d=i$1.command("members").description("Workspace member management");d.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$1(D,{workspaceId:t.workspace,pagination:{limit:t.limit,offset:0}});h(t,e.workspaceMembers.items,{headers:["ID","UserID","Role","Status","Joined"],rows:e.workspaceMembers.items.map(o=>[p(o.id,12),p(o.userId,12),o.role??"-",n(o.status),o$1(o.createdAt)])});}catch(e){g$1(e);}}),d.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$1(x,{input:e});i("Member added"),h(t,o.addWorkspaceMember);}catch(e){g$1(e);}}),d.command("remove").description("Remove a member by membership id").argument("<membershipId>").action(async t=>{try{await b$1(v,{id:t}),i("Member removed");}catch(e){g$1(e);}}),d.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$1(z,{input:e}),i("Member role updated");}catch(e){g$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$1(K,{filter:Object.keys(e).length?e:void 0,pagination:{limit:t.limit,offset:0}});h(t,o.projects.items,{headers:["ID","Name","Workspace","Status","Created"],rows:o.projects.items.map(m=>[p(m.id,12),m.name,p(m.workspaceId,12),n(m.status),o$1(m.createdAt)])});}catch(e){g$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$1(L,{id:t});if(!o$1.project)throw new o(`Project ${t} not found`);h(e,o$1.project);}catch(o){g$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$1(N,{input:e});i("Project created"),h(t,o.createProject);}catch(e){g$1(e);}}),i$1.command("invite").description("Workspace invitations").command("accept").description("Accept a workspace invitation").argument("<invitationId>").action(async t=>{try{await b$1(U,{id:t}),i("Invitation accepted");}catch(e){g$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$1(q,{workspaceId:t.workspace,limit:t.limit,offset:0});h(t,e.getWorkspaceActivities);}catch(e){g$1(e);}});}var G={id:"workspaces",version:"1.0.0",displayName:"Workspaces",dependsOn:["auth"],register(i,d){a(d),b(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);}},mt=G;export{mt as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/cli-sdk",
3
- "version": "2026.928.1",
3
+ "version": "2026.1021.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",
@@ -1,32 +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 C from'cross-fetch';import {Command}from'commander';var W=300*1e3;function S(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 s=readFileSync(n,"utf8");return JSON.parse(s)}catch{return null}}function a(s){r(),writeFileSync(n,JSON.stringify(s,null,2),{encoding:"utf8",mode:384});try{chmodSync(n,384);}catch{}}function i(){try{existsSync(n)&&unlinkSync(n);}catch{}}function o(){let s=t();return s?.expiresAt?Date.now()>=s.expiresAt:false}function c(){let s=t();return s?.expiresAt?Date.now()+W>=s.expiresAt:false}function p(){let s=t();return s?.workspaceTokenExpiresAt?Date.now()>=s.workspaceTokenExpiresAt:false}function d(){let s=t();return s?.workspaceTokenExpiresAt?Date.now()+W>=s.workspaceTokenExpiresAt:false}function b(){return t()?.accessToken?!o():false}return {read:t,write:a,clear:i,isTokenExpired:o,isTokenExpiringSoon:c,isWorkspaceTokenExpired:p,isWorkspaceTokenExpiringSoon:d,isAuthenticated:b}}var ae=["workspaceEndpoint","globalEndpoint","oidcIssuer","clientId","defaultFormat","verbose","authServiceEndpoint"];function O(e){let n=join(homedir(),".config",e.configDirName),r=join(n,"config.json"),t={workspaceEndpoint:e.workspaceEndpointDefault,globalEndpoint:e.globalEndpointDefault};function a(){existsSync(n)||mkdirSync(n,{recursive:true,mode:448});}function i(s){if(e.envPrefix){let u=process.env[`${e.envPrefix}_${s}`];if(u)return u}let l=process.env[s];return l&&l.length>0?l:void 0}function o(){let s={};try{existsSync(r)&&(s=JSON.parse(readFileSync(r,"utf8")));}catch{}return {...t,...s,workspaceEndpoint:i("WORKSPACE_ENDPOINT")??s.workspaceEndpoint??t.workspaceEndpoint,globalEndpoint:i("GLOBAL_ENDPOINT")??s.globalEndpoint??t.globalEndpoint,oidcIssuer:i("OIDC_ISSUER")??s.oidcIssuer,clientId:i("CLIENT_ID")??s.clientId}}function c(s){a(),writeFileSync(r,JSON.stringify(s,null,2),{encoding:"utf8"});try{chmodSync(r,384);}catch{}}function p(s){return o()[s]}function d(s,l){let u=o();u[s]=l,c(u);}function b(){let s=o(),l=s.clientId||e.oidcClientId,u=s.oidcIssuer;if(!u){let k=s.globalEndpoint;k.includes("localhost")||k.includes("127.0.0.1")?u=k.replace(/\/graphql$/,"").replace(/\/global\/graphql$/,"/global"):u=e.oidcIssuerProd??"https://graphql.burdenoff.com/global";}return {oidcIssuer:u,clientId:l}}return {read:o,write:c,get:p,set:d,path:()=>r,dir:()=>n,resolveOIDC:b}}async function ce(e){let n=`${e.oidcIssuer}/oidc/device/code`,r=new URLSearchParams({client_id:e.clientId,scope:"openid profile email offline_access"}),t=await C(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r.toString()});if(!t.ok){let i=await t.text().catch(()=>"Unknown error");throw new Error(`Device code request failed (${t.status}): ${i}`)}let a=await t.json();return {deviceCode:a.device_code,userCode:a.user_code,verificationUri:a.verification_uri,verificationUriComplete:a.verification_uri_complete??null,expiresIn:a.expires_in,interval:a.interval??5}}async function ue(e,n,r){let t=`${r.oidcIssuer}/oauth/device/token`,a=n;for(;;){await new Promise(p=>setTimeout(p,a*1e3));let i=await C(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 i.json();if(i.ok&&o.access_token)return {accessToken:o.access_token,refreshToken:o.refresh_token??"",expiresIn:o.expires_in??3600};let c=o.error;switch(c){case "authorization_pending":continue;case "slow_down":a+=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??c??"Unknown error"}`)}}}async function $(e,n,r,t){let i=await C(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(!i.ok){let c=await i.text().catch(()=>"Unknown error");throw new Error(`App authentication failed (${i.status}): ${c}`)}let o=await i.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 D(e,n,r,t){let i=await C(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(!i.ok){let p=await i.text().catch(()=>"Unknown error");throw new Error(`Workspace token request failed (${i.status}): ${p}`)}let o=await i.json();if(o.errors?.length)throw new Error(`Workspace token failed: ${o.errors[0]?.message??"unknown error"}`);let c=o.data?.issueWorkspaceToken;if(!c?.success||!c.token){let p=c?.error?.message??"Unknown error";throw new Error(`Workspace token failed: ${p}`)}return {token:c.token,expiresAt:c.expiresAt??"",scopes:c.scopes??[]}}async function le(e,n){let t=await C(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 i=await t.text().catch(()=>"Unknown error");throw new Error(`Failed to fetch workspaces (${t.status}): ${i}`)}let a=await t.json();if(a.errors?.length)throw new Error(`Failed to fetch workspaces: ${a.errors[0]?.message??"unknown error"}`);return a.data?.myWorkspaces?.items??[]}function pe(e){try{let n=new URL(e);return n.protocol==="http:"||n.protocol==="https:"}catch{return false}}async function de(e){try{if(!pe(e))return !1;let{execFile:n}=await import('child_process'),r=process.platform,t,a;return r==="darwin"?(t="open",a=[e]):r==="win32"?(t="cmd",a=["/c","start","",e]):(t="xdg-open",a=[e]),new Promise(i=>{n(t,a,o=>{i(!o);});})}catch{return false}}var ge=3e4,U=3,fe=1e3;function me(e){return new Promise(n=>setTimeout(n,e))}function ke(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 B(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;if(n.message)return n.message}return e instanceof Error?e.message:String(e)}function v(e){let n={};return e?.accessToken&&(n.Authorization=`Bearer ${e.accessToken}`),e?.organizationId&&(n["x-org-id"]=e.organizationId),n}function z(e){let n=v(e);return e?.workspaceToken&&(n["X-Workspace-Authorization"]=`Bearer ${e.workspaceToken}`),e?.organizationId&&(n["x-org-id"]=e.organizationId),n}async function P(e,n,r){let t;for(let a=0;a<U;a++)try{let i=new AbortController,o=setTimeout(()=>i.abort(),ge);try{return await e.request({document:n,variables:r,signal:i.signal})}finally{clearTimeout(o);}}catch(i){if(t=i,i&&typeof i=="object"&&"response"in i){let o=i.response;if(o&&typeof o.status=="number"&&o.status>=400&&o.status<500)break}if(ke(i)&&a<U-1){let o=fe*Math.pow(2,a);await me(o);continue}break}throw new Error(B(t))}function L(e,n){let r=null,t=null;function a(){let s=e.read(),l=n.read();return r=new GraphQLClient(s.workspaceEndpoint),r.setHeaders(z(l)),t=new GraphQLClient(s.globalEndpoint),t.setHeaders(v(l)),{workspace:r,global:t}}async function i(){let s=n.read();if(!s)return;if(s.authMethod==="client_credentials"&&s.clientId&&s.clientSecret){let y=e.read();try{let w=await $(y.globalEndpoint,s.clientId,s.clientSecret);n.write({...s,accessToken:w.accessToken,expiresAt:Date.now()+w.expiresIn*1e3}),r=null,t=null;}catch{}return}if(!s.refreshToken)return;let l=e.read(),u=new GraphQLClient(l.globalEndpoint);u.setHeaders({Authorization:`Bearer ${s.accessToken}`});let k=`
21
- mutation RefreshToken($token: String!) {
22
- refreshToken(token: $token) {
23
- accessToken
24
- refreshToken
25
- expiresIn
26
- }
27
- }
28
- `;try{let w=(await u.request(k,{token:s.refreshToken})).refreshToken;n.write({...s,accessToken:w.accessToken,refreshToken:w.refreshToken,expiresAt:Date.now()+w.expiresIn*1e3}),r=null,t=null;}catch{}}async function o(){let s=n.read();if(!s?.accessToken||!s.workspaceId||!s.organizationId)return;let l=e.read();try{let u=await D(l.workspaceEndpoint,s.accessToken,s.workspaceId,s.organizationId);n.write({...s,workspaceToken:u.token,workspaceTokenExpiresAt:new Date(u.expiresAt).getTime()}),r=null;}catch{}}async function c(){n.isTokenExpiringSoon()&&await i(),n.read()?.workspaceToken&&n.isWorkspaceTokenExpiringSoon()&&await o();}return {workspace:{async request(s,l){await c();let{workspace:u}=r?{workspace:r}:a();return u.setHeaders(z(n.read())),P(u,s,l)}},global:{async request(s,l){let{global:u}=t?{global:t}:a();return u.setHeaders(v(n.read())),P(u,s,l)}},workspaceAuthOnly:{async request(s,l){let u=e.read(),k=n.read(),y=new GraphQLClient(u.workspaceEndpoint);return y.setHeaders(v(k)),P(y,s,l)}},reset(){r=null,t=null;}}}function _(){return !!(process.stdout.isTTY&&process.stdin.isTTY)}function H(e){if(e.format){let n=e.format.toLowerCase();if(n==="json"||n==="table"||n==="yaml")return n}return _()?"table":"json"}function R(e){console.log(JSON.stringify(e,null,2));}function V(e,n){if(e.length===0)return;let r=e.map((i,o)=>{let c=i.length;for(let p of n){let d=p[o]??"";d.length>c&&(c=d.length);}return Math.min(c,50)}),t=r.map(i=>"-".repeat(i+2)).join("+"),a=i=>i.map((o,c)=>` ${(o??"").padEnd(r[c]??0)} `).join("|");console.log(a(e)),console.log(t);for(let i of n)console.log(a(i));}function q(e,n){let r=" ".repeat(n),t=[];for(let[a,i]of Object.entries(e))if(i==null)t.push(`${r}${a}: null`);else if(Array.isArray(i)){t.push(`${r}${a}:`);for(let o of i)typeof o=="object"&&o!==null?(t.push(`${r} -`),t.push(q(o,n+2))):t.push(`${r} - ${String(o)}`);}else typeof i=="object"?(t.push(`${r}${a}:`),t.push(q(i,n+1))):t.push(`${r}${a}: ${String(i)}`);return t.join(`
29
- `)}function J(e){if(typeof e!="object"||e===null){console.log(String(e));return}console.log(q(e,0));}function we(e){console.log(`\u2713 ${e}`);}function Y(e){console.error(`\u2717 ${e}`);}function he(e){console.warn(`! ${e}`);}function ye(e){console.log(`\u2139 ${e}`);}function Ce(e){if(!e)return "-";try{return new Date(e).toLocaleString()}catch{return e}}function xe(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 be(e,n){return e?e.length<=n?e:e.substring(0,n-3)+"...":"-"}function Te(e,n,r){switch(H(e)){case "json":R(n);break;case "yaml":J(n);break;case "table":r?V(r.headers,r.rows):R(n);break}}async function ve(e,n){return n?true:_()?new Promise(r=>{process.stdout.write(`${e} [y/N] `),process.stdin.setEncoding("utf8"),process.stdin.once("data",t=>{let a=t.trim().toLowerCase();r(a==="y"||a==="yes");}),process.stdin.resume();}):(Y(`${e} Use --force to skip confirmation.`),false)}var N={isInteractive:_,getFormat:H,formatAndOutput:Te,printJson:R,printTable:V,printYaml:J,printSuccess:we,printError:Y,printWarning:he,printInfo:ye,formatDate:Ce,formatStatus:xe,truncate:be,confirm:ve};function j(e={}){let{verbose:n=false,quiet:r=false}=e;return {debug(t,...a){n&&console.error(`[debug] ${t}`,...a);},info(t,...a){r||console.error(`[info] ${t}`,...a);},warn(t,...a){console.error(`[warn] ${t}`,...a);},error(t,...a){console.error(`[error] ${t}`,...a);}}}function Ee(e){return e.includes("localhost")||e.includes("127.0.0.1")?"local":e.includes("alpha")||e.includes("staging")?"staging":"prod"}function Ie(e){return !!e&&typeof e.debug=="function"&&typeof e.info=="function"}function Ae(e){let n=O(e.defaults),r=S(n.dir()),t=L(n,r),a=e.output??N,i=Ie(e.logger)?e.logger:j(e.logger),o=e.env??Ee(n.read().workspaceEndpoint);return {productName:e.productName,productVersion:e.productVersion,defaults:e.defaults,config:n,auth:r,gql:t,output:a,logger:i,env:o}}var h=class extends Error{exitCode;hint;constructor(n,r){super(n),this.name="CliUserError",this.exitCode=r?.exitCode??1,this.hint=r?.hint;}},x=class extends h{constructor(n,r){super(n,{exitCode:2,hint:r?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},m=class extends Error{cause;constructor(n,r){super(n),this.name="CliInternalError",this.cause=r;}};var E=class extends m{constructor(n,r){super(`Module '${n}' declares dependency on '${r}', but '${r}' is not in the module list.`),this.name="MissingDependencyError";}},I=class extends m{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 m(`Duplicate module id: '${o.id}'`);n.set(o.id,o);}for(let o of e)for(let c of o.dependsOn??[])if(!n.has(c))throw new E(o.id,c);let r=[],t=new Set,a=new Set;function i(o,c){if(!a.has(o.id)){if(t.has(o.id))throw new I([...c,o.id]);t.add(o.id);for(let p of o.dependsOn??[]){let d=n.get(p);d&&i(d,[...c,o.id]);}t.delete(o.id),a.add(o.id),r.push(o);}}for(let o of e)i(o,[]);return r}function Oe(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");let a=F(n);for(let o of a)o.register(t,e);r.helpExamples?.length&&t.addHelpText("after",`
30
- Examples:
31
- `+r.helpExamples.map(o=>" "+o).join(`
32
- `)),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 i(o=process.argv){try{await t.parseAsync(o),o.length<=2&&t.outputHelp();}catch(c){$e(e,c);}}return {program:t,run:i}}function $e(e,n){if(n instanceof x&&(e.output.printError(n.message),n.hint&&e.output.printInfo(n.hint),process.exit(n.exitCode)),n instanceof h&&(e.output.printError(n.message),n.hint&&e.output.printInfo(n.hint),process.exit(n.exitCode)),n instanceof m&&(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{S as a,ae as b,O as c,ce as d,ue as e,$ as f,D as g,le as h,de as i,B as j,L as k,N as l,j as m,Ae as n,h as o,x as p,m as q,E as r,I as s,F as t,Oe as u};
@@ -1 +0,0 @@
1
- import {b as b$1,o,p,q as q$1}from'./chunk-TCBALVP4.js';var r=null;function T(t){r=t;}function e(){if(!r)throw new q$1("vibecontrols module helpers used before setHelpersContext was called");return r}function c(){let t=e();if(!t.auth.isAuthenticated())throw new p(`Authentication required. Run \`${t.productName} auth login\`.`)}async function q(t,n){return c(),e().gql.workspace.request(t,n)}async function w(t,n){return e().gql.global.request(t,n)}async function b(t,n){return e().gql.workspaceAuthOnly.request(t,n)}async function A(t,n){return e().gql.global.request(t,n)}function v(){e().gql.reset();}function I(t){let n=t instanceof Error?t.message:String(t);throw new o(n)}function k(t,n,p){e().output.formatAndOutput(t,n,p);}function E(t){e().output.printSuccess(t);}function O(t){e().output.printError(t);}function S(t){e().output.printInfo(t);}function D(t){e().output.printWarning(t);}function y(t){e().output.printJson(t);}function N(t){return e().output.formatStatus(t)}function R(t){return e().output.formatDate(t)}function W(t,n){return e().output.truncate(t,n)}function F(t,n){return e().output.confirm(t,n)}function L(t,n){e().output.printTable(t,n);}function V(){return e()}function P(){return e().auth.read()}function _(t){e().auth.write(t);}function K(){e().auth.clear();}function G(){return e().config.read()}function Y(t){return e().config.get(t)}function j(t,n){e().config.set(t,n);}function H(){return e().config.path()}var J=b$1;function B(){return e().config.resolveOIDC()}function U(t){return t?t.expiresAt?Date.now()>=t.expiresAt:false:e().auth.isTokenExpired()}export{J as A,B,U as C,T as a,q as b,w as c,b as d,A as e,v as f,I as g,k as h,E as i,O as j,S as k,D as l,y as m,N as n,R as o,W as p,F as q,L as r,V as s,P as t,_ as u,K as v,G as w,Y as x,j as y,H as z};