@burdenoff/cli-sdk 2026.1110.1 → 2026.1123.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 (238) hide show
  1. package/dist/{chunk-WTNQ5PEC.js → chunk-3ZVMC2AF.js} +1 -1
  2. package/dist/{chunk-6HSWVWQW.js → chunk-ASSY2L5R.js} +1 -1
  3. package/dist/chunk-ZT6KOG7N.js +34 -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-CLaW1ycq.d.ts → module-BNVKV_pI.d.cts} +11 -1
  13. package/dist/{module-CLaW1ycq.d.cts → module-BNVKV_pI.d.ts} +11 -1
  14. package/dist/modules/adaptercloud/index.cjs +4 -4
  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 +1 -1
  18. package/dist/modules/artistrybase/index.cjs +3 -3
  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 +1 -1
  22. package/dist/modules/assethandler/index.cjs +7 -7
  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 +1 -1
  26. package/dist/modules/atheletebridge/index.cjs +4 -4
  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 +1 -1
  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 +1 -1
  33. package/dist/modules/billing/index.cjs +8 -8
  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 +8 -8
  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.d.cts +1 -1
  42. package/dist/modules/buildmyiq/index.d.ts +1 -1
  43. package/dist/modules/buildmyiq/index.js +1 -1
  44. package/dist/modules/channels/index.cjs +8 -8
  45. package/dist/modules/channels/index.d.cts +1 -1
  46. package/dist/modules/channels/index.d.ts +1 -1
  47. package/dist/modules/channels/index.js +1 -1
  48. package/dist/modules/collabkin/index.cjs +3 -3
  49. package/dist/modules/collabkin/index.d.cts +1 -1
  50. package/dist/modules/collabkin/index.d.ts +1 -1
  51. package/dist/modules/collabkin/index.js +1 -1
  52. package/dist/modules/comradecircle/index.cjs +10 -10
  53. package/dist/modules/comradecircle/index.d.cts +1 -1
  54. package/dist/modules/comradecircle/index.d.ts +1 -1
  55. package/dist/modules/comradecircle/index.js +1 -1
  56. package/dist/modules/conversations/index.cjs +4 -4
  57. package/dist/modules/conversations/index.d.cts +1 -1
  58. package/dist/modules/conversations/index.d.ts +1 -1
  59. package/dist/modules/conversations/index.js +1 -1
  60. package/dist/modules/coolandlovely/index.cjs +3 -3
  61. package/dist/modules/coolandlovely/index.d.cts +1 -1
  62. package/dist/modules/coolandlovely/index.d.ts +1 -1
  63. package/dist/modules/coolandlovely/index.js +1 -1
  64. package/dist/modules/cosmicintersection/index.cjs +4 -4
  65. package/dist/modules/cosmicintersection/index.d.cts +1 -1
  66. package/dist/modules/cosmicintersection/index.d.ts +1 -1
  67. package/dist/modules/cosmicintersection/index.js +1 -1
  68. package/dist/modules/crewfoundry/index.cjs +7 -7
  69. package/dist/modules/crewfoundry/index.d.cts +1 -1
  70. package/dist/modules/crewfoundry/index.d.ts +1 -1
  71. package/dist/modules/crewfoundry/index.js +1 -1
  72. package/dist/modules/devportal/index.cjs +6 -6
  73. package/dist/modules/devportal/index.d.cts +1 -1
  74. package/dist/modules/devportal/index.d.ts +1 -1
  75. package/dist/modules/devportal/index.js +1 -1
  76. package/dist/modules/ecoimpacthub/index.cjs +3 -3
  77. package/dist/modules/ecoimpacthub/index.d.cts +1 -1
  78. package/dist/modules/ecoimpacthub/index.d.ts +1 -1
  79. package/dist/modules/ecoimpacthub/index.js +1 -1
  80. package/dist/modules/eventfullymanaged/index.cjs +13 -13
  81. package/dist/modules/eventfullymanaged/index.d.cts +1 -1
  82. package/dist/modules/eventfullymanaged/index.d.ts +1 -1
  83. package/dist/modules/eventfullymanaged/index.js +1 -1
  84. package/dist/modules/export/index.cjs +5 -5
  85. package/dist/modules/export/index.d.cts +1 -1
  86. package/dist/modules/export/index.d.ts +1 -1
  87. package/dist/modules/export/index.js +1 -1
  88. package/dist/modules/files/index.cjs +7 -7
  89. package/dist/modules/files/index.d.cts +1 -1
  90. package/dist/modules/files/index.d.ts +1 -1
  91. package/dist/modules/files/index.js +1 -1
  92. package/dist/modules/fluidgrids/index.cjs +5 -5
  93. package/dist/modules/fluidgrids/index.d.cts +1 -1
  94. package/dist/modules/fluidgrids/index.d.ts +1 -1
  95. package/dist/modules/fluidgrids/index.js +1 -1
  96. package/dist/modules/ggnomad/index.cjs +6 -6
  97. package/dist/modules/ggnomad/index.d.cts +1 -1
  98. package/dist/modules/ggnomad/index.d.ts +1 -1
  99. package/dist/modules/ggnomad/index.js +1 -1
  100. package/dist/modules/govcitizenhub/index.cjs +6 -6
  101. package/dist/modules/govcitizenhub/index.d.cts +1 -1
  102. package/dist/modules/govcitizenhub/index.d.ts +1 -1
  103. package/dist/modules/govcitizenhub/index.js +1 -1
  104. package/dist/modules/groups/index.cjs +2 -2
  105. package/dist/modules/groups/index.d.cts +1 -1
  106. package/dist/modules/groups/index.d.ts +1 -1
  107. package/dist/modules/groups/index.js +1 -1
  108. package/dist/modules/headshotmarketing/index.d.cts +1 -1
  109. package/dist/modules/headshotmarketing/index.d.ts +1 -1
  110. package/dist/modules/headshotmarketing/index.js +1 -1
  111. package/dist/modules/health/index.d.cts +1 -1
  112. package/dist/modules/health/index.d.ts +1 -1
  113. package/dist/modules/hookmovies/index.cjs +4 -4
  114. package/dist/modules/hookmovies/index.d.cts +1 -1
  115. package/dist/modules/hookmovies/index.d.ts +1 -1
  116. package/dist/modules/hookmovies/index.js +1 -1
  117. package/dist/modules/housingvista/index.cjs +13 -13
  118. package/dist/modules/housingvista/index.d.cts +1 -1
  119. package/dist/modules/housingvista/index.d.ts +1 -1
  120. package/dist/modules/housingvista/index.js +1 -1
  121. package/dist/modules/integrations/index.cjs +7 -7
  122. package/dist/modules/integrations/index.d.cts +1 -1
  123. package/dist/modules/integrations/index.d.ts +1 -1
  124. package/dist/modules/integrations/index.js +1 -1
  125. package/dist/modules/intelwatchtower/index.cjs +6 -6
  126. package/dist/modules/intelwatchtower/index.d.cts +1 -1
  127. package/dist/modules/intelwatchtower/index.d.ts +1 -1
  128. package/dist/modules/intelwatchtower/index.js +1 -1
  129. package/dist/modules/kadaikodi/index.cjs +5 -5
  130. package/dist/modules/kadaikodi/index.d.cts +1 -1
  131. package/dist/modules/kadaikodi/index.d.ts +1 -1
  132. package/dist/modules/kadaikodi/index.js +1 -1
  133. package/dist/modules/labsofscience/index.cjs +6 -6
  134. package/dist/modules/labsofscience/index.d.cts +1 -1
  135. package/dist/modules/labsofscience/index.d.ts +1 -1
  136. package/dist/modules/labsofscience/index.js +1 -1
  137. package/dist/modules/manufacturedops/index.cjs +8 -8
  138. package/dist/modules/manufacturedops/index.d.cts +1 -1
  139. package/dist/modules/manufacturedops/index.d.ts +1 -1
  140. package/dist/modules/manufacturedops/index.js +1 -1
  141. package/dist/modules/movethewheels/index.cjs +18 -18
  142. package/dist/modules/movethewheels/index.d.cts +1 -1
  143. package/dist/modules/movethewheels/index.d.ts +1 -1
  144. package/dist/modules/movethewheels/index.js +1 -1
  145. package/dist/modules/mybodyshield/index.cjs +5 -5
  146. package/dist/modules/mybodyshield/index.d.cts +1 -1
  147. package/dist/modules/mybodyshield/index.d.ts +1 -1
  148. package/dist/modules/mybodyshield/index.js +1 -1
  149. package/dist/modules/notifications/index.cjs +4 -4
  150. package/dist/modules/notifications/index.d.cts +1 -1
  151. package/dist/modules/notifications/index.d.ts +1 -1
  152. package/dist/modules/notifications/index.js +1 -1
  153. package/dist/modules/organizations/index.cjs +2 -2
  154. package/dist/modules/organizations/index.d.cts +1 -1
  155. package/dist/modules/organizations/index.d.ts +1 -1
  156. package/dist/modules/organizations/index.js +1 -1
  157. package/dist/modules/planmagnet/index.cjs +17 -17
  158. package/dist/modules/planmagnet/index.d.cts +1 -1
  159. package/dist/modules/planmagnet/index.d.ts +1 -1
  160. package/dist/modules/planmagnet/index.js +1 -1
  161. package/dist/modules/products/index.cjs +8 -8
  162. package/dist/modules/products/index.d.cts +1 -1
  163. package/dist/modules/products/index.d.ts +1 -1
  164. package/dist/modules/products/index.js +1 -1
  165. package/dist/modules/proserviceworld/index.cjs +4 -4
  166. package/dist/modules/proserviceworld/index.d.cts +1 -1
  167. package/dist/modules/proserviceworld/index.d.ts +1 -1
  168. package/dist/modules/proserviceworld/index.js +1 -1
  169. package/dist/modules/rbac/index.cjs +5 -5
  170. package/dist/modules/rbac/index.d.cts +1 -1
  171. package/dist/modules/rbac/index.d.ts +1 -1
  172. package/dist/modules/rbac/index.js +1 -1
  173. package/dist/modules/sandbox/index.cjs +1 -1
  174. package/dist/modules/sandbox/index.d.cts +1 -1
  175. package/dist/modules/sandbox/index.d.ts +1 -1
  176. package/dist/modules/sandbox/index.js +1 -1
  177. package/dist/modules/scheduler/index.cjs +6 -6
  178. package/dist/modules/scheduler/index.d.cts +1 -1
  179. package/dist/modules/scheduler/index.d.ts +1 -1
  180. package/dist/modules/scheduler/index.js +1 -1
  181. package/dist/modules/security/index.cjs +7 -7
  182. package/dist/modules/security/index.d.cts +1 -1
  183. package/dist/modules/security/index.d.ts +1 -1
  184. package/dist/modules/security/index.js +1 -1
  185. package/dist/modules/semanticfed/index.cjs +7 -7
  186. package/dist/modules/semanticfed/index.d.cts +1 -1
  187. package/dist/modules/semanticfed/index.d.ts +1 -1
  188. package/dist/modules/semanticfed/index.js +1 -1
  189. package/dist/modules/semanticfed-sql/index.cjs +4 -4
  190. package/dist/modules/semanticfed-sql/index.d.cts +1 -1
  191. package/dist/modules/semanticfed-sql/index.d.ts +1 -1
  192. package/dist/modules/semanticfed-sql/index.js +1 -1
  193. package/dist/modules/store/index.cjs +7 -7
  194. package/dist/modules/store/index.d.cts +1 -1
  195. package/dist/modules/store/index.d.ts +1 -1
  196. package/dist/modules/store/index.js +1 -1
  197. package/dist/modules/subscriberbot/index.cjs +4 -4
  198. package/dist/modules/subscriberbot/index.d.cts +1 -1
  199. package/dist/modules/subscriberbot/index.d.ts +1 -1
  200. package/dist/modules/subscriberbot/index.js +1 -1
  201. package/dist/modules/support/index.cjs +2 -2
  202. package/dist/modules/support/index.d.cts +1 -1
  203. package/dist/modules/support/index.d.ts +1 -1
  204. package/dist/modules/support/index.js +1 -1
  205. package/dist/modules/tags/index.cjs +2 -2
  206. package/dist/modules/tags/index.d.cts +1 -1
  207. package/dist/modules/tags/index.d.ts +1 -1
  208. package/dist/modules/tags/index.js +1 -1
  209. package/dist/modules/technospam/index.cjs +10 -10
  210. package/dist/modules/technospam/index.d.cts +1 -1
  211. package/dist/modules/technospam/index.d.ts +1 -1
  212. package/dist/modules/technospam/index.js +1 -1
  213. package/dist/modules/theculturepost/index.cjs +8 -8
  214. package/dist/modules/theculturepost/index.d.cts +1 -1
  215. package/dist/modules/theculturepost/index.d.ts +1 -1
  216. package/dist/modules/theculturepost/index.js +1 -1
  217. package/dist/modules/theglobalfuel/index.cjs +4 -4
  218. package/dist/modules/theglobalfuel/index.d.cts +1 -1
  219. package/dist/modules/theglobalfuel/index.d.ts +1 -1
  220. package/dist/modules/theglobalfuel/index.js +1 -1
  221. package/dist/modules/timecampus/index.cjs +72 -61
  222. package/dist/modules/timecampus/index.d.cts +7 -3
  223. package/dist/modules/timecampus/index.d.ts +7 -3
  224. package/dist/modules/timecampus/index.js +72 -61
  225. package/dist/modules/tours/index.cjs +2 -2
  226. package/dist/modules/tours/index.d.cts +1 -1
  227. package/dist/modules/tours/index.d.ts +1 -1
  228. package/dist/modules/tours/index.js +1 -1
  229. package/dist/modules/vibecontrols/index.cjs +32 -32
  230. package/dist/modules/vibecontrols/index.d.cts +1 -1
  231. package/dist/modules/vibecontrols/index.d.ts +1 -1
  232. package/dist/modules/vibecontrols/index.js +1 -1
  233. package/dist/modules/workspaces/index.cjs +7 -7
  234. package/dist/modules/workspaces/index.d.cts +1 -1
  235. package/dist/modules/workspaces/index.d.ts +1 -1
  236. package/dist/modules/workspaces/index.js +1 -1
  237. package/package.json +2 -2
  238. package/dist/chunk-MT2F54AC.js +0 -34
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.cjs';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.cjs';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.js';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.js';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import {a,b as b$1,i,r,h as h$1,k as k$1,q as q$2,d}from'../../chunk-WTNQ5PEC.js';import {q as q$1}from'../../chunk-MT2F54AC.js';var R=`
1
+ import {a,b as b$1,i,r,h as h$1,k as k$1,q as q$2,d}from'../../chunk-3ZVMC2AF.js';import {q as q$1}from'../../chunk-ZT6KOG7N.js';var R=`
2
2
  query BuiGetCourse($id: ID!) {
3
3
  buiCourse(id: $id) {
4
4
  id workspaceId slug title summary description level status language
@@ -1,4 +1,4 @@
1
- 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var l=class extends Error{exitCode;hint;constructor(o,d){super(o),this.name="CliUserError",this.exitCode=d?.exitCode??1,this.hint=d?.hint;}};var g=class extends Error{cause;constructor(o,d){super(o),this.name="CliInternalError",this.cause=d;}};var h=null;function b(r){h=r;}function p(){if(!h)throw new g("vibecontrols module helpers used before setHelpersContext was called");return h}async function a(r,o){return p().gql.global.request(r,o)}function c(r){let o=r instanceof Error?r.message:String(r);throw new l(o)}function u(r,o,d){p().output.formatAndOutput(r,o,d);}function f(r){p().output.printSuccess(r);}function C(r){p().output.printWarning(r);}function y(r){return p().output.formatStatus(r)}function I(r){return p().output.formatDate(r)}function w(r,o){return p().output.truncate(r,o)}function T(){return p()}var A=`
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var l=class extends Error{exitCode;hint;constructor(o,d){super(o),this.name="CliUserError",this.exitCode=d?.exitCode??1,this.hint=d?.hint;}};var g=class extends Error{cause;constructor(o,d){super(o),this.name="CliInternalError",this.cause=d;}};var h=null;function b(r){h=r;}function p(){if(!h)throw new g("vibecontrols module helpers used before setHelpersContext was called");return h}async function a(r,o){return p().gql.global.request(r,o)}function c(r){let o=r instanceof Error?r.message:String(r);throw new l(o)}function u(r,o,d){p().output.formatAndOutput(r,o,d);}function f(r){p().output.printSuccess(r);}function C(r){p().output.printWarning(r);}function w(r){return p().output.formatStatus(r)}function T(r){return p().output.formatDate(r)}function y(r,o){return p().output.truncate(r,o)}function I(){return p()}var A=`
2
2
  query GetChannels($filter: ChannelFilterInput, $pagination: ChannelPaginationInput) {
3
3
  getChannels(filter: $filter, pagination: $pagination) {
4
4
  items { id name platform adapterType status connectionHealth priority createdAt }
@@ -22,13 +22,13 @@
22
22
  mutation DeleteChannel($id: ID!) {
23
23
  deleteChannel(id: $id)
24
24
  }
25
- `,N=`
25
+ `,R=`
26
26
  mutation SendChannelMessage($input: SendMessageInput!) {
27
27
  sendMessage(input: $input) {
28
28
  success messageId attemptId willRetry nextRetryAt error
29
29
  }
30
30
  }
31
- `,R=`
31
+ `,N=`
32
32
  query GetChannelDeliveryAttempts($channelId: ID!, $cursor: String, $limit: Int) {
33
33
  getChannelDeliveryAttempts(channelId: $channelId, cursor: $cursor, limit: $limit) {
34
34
  items { id channelId status sentAt retryCount errorMessage }
@@ -42,28 +42,28 @@
42
42
  total hasMore
43
43
  }
44
44
  }
45
- `,D=`
45
+ `,q=`
46
46
  query GetChannelWebhookEvents($channelId: ID!, $cursor: String, $limit: Int) {
47
47
  getChannelWebhookEvents(channelId: $channelId, cursor: $cursor, limit: $limit) {
48
48
  items { id eventType status createdAt }
49
49
  total hasMore
50
50
  }
51
51
  }
52
- `,L=`
52
+ `,D=`
53
53
  query GetConnectionsByOrg($organizationId: ID!, $pagination: ChannelPaginationInput) {
54
54
  getConnectionsByOrganization(organizationId: $organizationId, pagination: $pagination) {
55
55
  items { id channelId authType tokenExpiresAt isActive isHealthy }
56
56
  total hasMore
57
57
  }
58
58
  }
59
- `,q=`
59
+ `,L=`
60
60
  mutation CreateChannelConnection($input: CreateConnectionInput!) {
61
61
  createConnection(input: $input) {
62
62
  id channelId authType isActive
63
63
  }
64
64
  }
65
- `,_=`
65
+ `,P=`
66
66
  mutation DeleteChannelConnection($id: ID!) {
67
67
  deleteConnection(id: $id)
68
68
  }
69
- `;function P(r){let o=r.command("channels").description("Multi-platform message channels (email/SMS/Slack/etc.)");o.command("list").description("List channels").option("--platform <p>").option("--status <s>").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={};e.platform&&(t.platform=e.platform.toUpperCase()),e.status&&(t.status=e.status.toUpperCase());let n=await a(A,{filter:Object.keys(t).length?t:void 0,pagination:{limit:e.limit,offset:0}});u(e,n.getChannels.items,{headers:["ID","Name","Platform","Status","Priority"],rows:n.getChannels.items.map(i=>[w(i.id,12),i.name,i.platform,y(i.status),String(i.priority??"-")])});}catch(t){c(t);}}),o.command("get").description("Get a channel").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await a(v,{id:e});if(!n.getChannel)throw new l(`Channel ${e} not found`);u(t,n.getChannel);}catch(n){c(n);}}),o.command("create").description("Create a channel").requiredOption("--name <s>").requiredOption("--platform <p>","EMAIL|SMS|SLACK|TEAMS|DISCORD|WHATSAPP|WEBHOOK").option("--organization <id>","Organization id (defaults to current actor org)").option("--adapter <t>").option("-f, --format <format>").action(async e=>{try{let t=e.organization??T().auth.read()?.organizationId;if(!t)throw new l("No organization context. Pass --organization <id> or set auth.organizationId.");let n={name:e.name,platform:e.platform.toUpperCase(),organizationId:t,adapterType:e.adapter?e.adapter.toUpperCase():void 0},i=await a(O,{input:n});f("Channel created"),u(e,i.createChannel);}catch(t){c(t);}}),o.command("delete").description("Delete a channel").argument("<id>").action(async e=>{try{await a(S,{id:e}),f("Channel deleted");}catch(t){c(t);}}),o.command("send").description("Send a message via a channel").argument("<channelId>").requiredOption("--content <s>").option("--recipient <id>","External recipient id (e.g. email)").option("--subject <s>").option("-f, --format <format>").action(async(e,t)=>{try{let n={channelId:e,content:t.content,recipientId:t.recipient,subject:t.subject},i=await a(N,{input:n});i.sendMessage.success?f(`Sent: ${i.sendMessage.messageId??"(no id)"}`):i.sendMessage.willRetry?C(`Delivery failed, will retry: ${i.sendMessage.error??"unknown error"}`):C(`Delivery failed: ${i.sendMessage.error??"unknown error"}`),u(t,i.sendMessage);}catch(n){c(n);}}),o.command("deliveries").description("Recent delivery attempts for a channel").argument("<channelId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let n=await a(R,{channelId:e,limit:t.limit});u(t,n.getChannelDeliveryAttempts.items);}catch(n){c(n);}}),o.command("users").description("Users connected to this channel").argument("<channelId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let n=await a($,{channelId:e,pagination:{limit:t.limit,offset:0}});u(t,n.listUserPlatformConnectionsByChannel.items);}catch(n){c(n);}}),o.command("webhooks").description("Channel webhook events").command("list").description("List webhook events for a channel").argument("<channelId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let n=await a(D,{channelId:e,limit:t.limit});u(t,n.getChannelWebhookEvents.items,{headers:["ID","Event","Status","When"],rows:n.getChannelWebhookEvents.items.map(i=>[w(i.id,12),i.eventType,y(i.status),I(i.createdAt)])});}catch(n){c(n);}});let m=o.command("connections").description("Channel connections (OAuth/API keys)");m.command("list").description("List connections for an organization").requiredOption("--organization <id>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t=await a(L,{organizationId:e.organization,pagination:{limit:e.limit,offset:0}});u(e,t.getConnectionsByOrganization.items);}catch(t){c(t);}}),m.command("create").description("Create a channel connection").requiredOption("--channel <id>").requiredOption("--auth-type <t>","OAUTH|API_KEY|WEBHOOK").option("-f, --format <format>").action(async e=>{try{let t={channelId:e.channel,authType:e.authType.toUpperCase()},n=await a(q,{input:t});f("Connection created"),u(e,n.createConnection);}catch(t){c(t);}}),m.command("delete").description("Delete a connection").argument("<id>").action(async e=>{try{await a(_,{id:e}),f("Connection deleted");}catch(t){c(t);}});}var J={id:"channels",version:"1.0.0",displayName:"Channels",dependsOn:["auth"],register(r,o){b(o),P(r);}},ct=J;module.exports=ct;
69
+ `;function _(r){let o=r.command("channels").description("Multi-platform message channels (email/SMS/Slack/etc.)");o.command("list").description("List channels").option("--platform <p>").option("--status <s>").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={};e.platform&&(t.platform=e.platform.toUpperCase()),e.status&&(t.status=e.status.toUpperCase());let n=await a(A,{filter:Object.keys(t).length?t:void 0,pagination:{limit:e.limit,offset:0}});u(e,n.getChannels.items,{headers:["ID","Name","Platform","Status","Priority"],rows:n.getChannels.items.map(i=>[y(i.id,12),i.name,i.platform,w(i.status),String(i.priority??"-")])});}catch(t){c(t);}}),o.command("get").description("Get a channel").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await a(v,{id:e});if(!n.getChannel)throw new l(`Channel ${e} not found`);u(t,n.getChannel);}catch(n){c(n);}}),o.command("create").description("Create a channel").requiredOption("--name <s>").requiredOption("--platform <p>","EMAIL|SMS|SLACK|TEAMS|DISCORD|WHATSAPP|WEBHOOK").option("--organization <id>","Organization id (defaults to current actor org)").option("--adapter <t>").option("-f, --format <format>").action(async e=>{try{let t=e.organization??I().auth.read()?.organizationId;if(!t)throw new l("No organization context. Pass --organization <id> or set auth.organizationId.");let n={name:e.name,platform:e.platform.toUpperCase(),organizationId:t,adapterType:e.adapter?e.adapter.toUpperCase():void 0},i=await a(O,{input:n});f("Channel created"),u(e,i.createChannel);}catch(t){c(t);}}),o.command("delete").description("Delete a channel").argument("<id>").action(async e=>{try{await a(S,{id:e}),f("Channel deleted");}catch(t){c(t);}}),o.command("send").description("Send a message via a channel").argument("<channelId>").requiredOption("--content <s>").option("--recipient <id>","External recipient id (e.g. email)").option("--subject <s>").option("-f, --format <format>").action(async(e,t)=>{try{let n={channelId:e,content:t.content,recipientId:t.recipient,subject:t.subject},i=await a(R,{input:n});i.sendMessage.success?f(`Sent: ${i.sendMessage.messageId??"(no id)"}`):i.sendMessage.willRetry?C(`Delivery failed, will retry: ${i.sendMessage.error??"unknown error"}`):C(`Delivery failed: ${i.sendMessage.error??"unknown error"}`),u(t,i.sendMessage);}catch(n){c(n);}}),o.command("deliveries").description("Recent delivery attempts for a channel").argument("<channelId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let n=await a(N,{channelId:e,limit:t.limit});u(t,n.getChannelDeliveryAttempts.items);}catch(n){c(n);}}),o.command("users").description("Users connected to this channel").argument("<channelId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let n=await a($,{channelId:e,pagination:{limit:t.limit,offset:0}});u(t,n.listUserPlatformConnectionsByChannel.items);}catch(n){c(n);}}),o.command("webhooks").description("Channel webhook events").command("list").description("List webhook events for a channel").argument("<channelId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let n=await a(q,{channelId:e,limit:t.limit});u(t,n.getChannelWebhookEvents.items,{headers:["ID","Event","Status","When"],rows:n.getChannelWebhookEvents.items.map(i=>[y(i.id,12),i.eventType,w(i.status),T(i.createdAt)])});}catch(n){c(n);}});let m=o.command("connections").description("Channel connections (OAuth/API keys)");m.command("list").description("List connections for an organization").requiredOption("--organization <id>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t=await a(D,{organizationId:e.organization,pagination:{limit:e.limit,offset:0}});u(e,t.getConnectionsByOrganization.items);}catch(t){c(t);}}),m.command("create").description("Create a channel connection").requiredOption("--channel <id>").requiredOption("--auth-type <t>","OAUTH|API_KEY|WEBHOOK").option("-f, --format <format>").action(async e=>{try{let t={channelId:e.channel,authType:e.authType.toUpperCase()},n=await a(L,{input:t});f("Connection created"),u(e,n.createConnection);}catch(t){c(t);}}),m.command("delete").description("Delete a connection").argument("<id>").action(async e=>{try{await a(P,{id:e}),f("Connection deleted");}catch(t){c(t);}});}var J={id:"channels",version:"1.0.0",displayName:"Channels",dependsOn:["auth"],register(r,o){b(o),_(r);}},ct=J;module.exports=ct;
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.cjs';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.cjs';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.js';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.js';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import {a,c,i,r,p,h,u,k,n,q as q$1}from'../../chunk-WTNQ5PEC.js';import {q}from'../../chunk-MT2F54AC.js';var I=`
1
+ import {a,c,i,r,p,h,u,k,n,q as q$1}from'../../chunk-3ZVMC2AF.js';import {q}from'../../chunk-ZT6KOG7N.js';var I=`
2
2
  query GetChannels($filter: ChannelFilterInput, $pagination: ChannelPaginationInput) {
3
3
  getChannels(filter: $filter, pagination: $pagination) {
4
4
  items { id name platform adapterType status connectionHealth priority createdAt }
@@ -1,11 +1,11 @@
1
- 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var u=class extends Error{exitCode;hint;constructor(r,e){super(r),this.name="CliUserError",this.exitCode=e?.exitCode??1,this.hint=e?.hint;}},E=class extends u{constructor(r,e){super(r,{exitCode:2,hint:e?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},y=class extends Error{cause;constructor(r,e){super(r),this.name="CliInternalError",this.cause=e;}};var b=null;function x(o){b=o;}function I(){if(!b)throw new y("vibecontrols module helpers used before setHelpersContext was called");return b}function Oe(){let o=I();if(!o.auth.isAuthenticated())throw new E("Authentication required.",{hint:`Run \`${o.productName} auth login\` to authenticate.`})}async function a(o,r){return Oe(),I().gql.workspace.request(o,r)}async function k(o,r){return I().gql.workspaceAuthOnly.request(o,r)}function i(o){let r=o instanceof Error?o.message:String(o);throw new u(r)}function s(o,r,e){I().output.formatAndOutput(o,r,e);}function c(o){I().output.printSuccess(o);}function C(o){return I().output.formatDate(o)}function d(o,r){return I().output.truncate(o,r)}var v=`
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var u=class extends Error{exitCode;hint;constructor(r,e){super(r),this.name="CliUserError",this.exitCode=e?.exitCode??1,this.hint=e?.hint;}},E=class extends u{constructor(r,e){super(r,{exitCode:2,hint:e?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},y=class extends Error{cause;constructor(r,e){super(r),this.name="CliInternalError",this.cause=e;}};var b=null;function x(o){b=o;}function I(){if(!b)throw new y("vibecontrols module helpers used before setHelpersContext was called");return b}function Oe(){let o=I();if(!o.auth.isAuthenticated())throw new E("Authentication required.",{hint:`Run \`${o.productName} auth login\` to authenticate.`})}async function a(o,r){return Oe(),I().gql.workspace.request(o,r)}async function k(o,r){return I().gql.workspaceAuthOnly.request(o,r)}function i(o){let r=o instanceof Error?o.message:String(o);throw new u(r)}function s(o,r,e){I().output.formatAndOutput(o,r,e);}function c(o){I().output.printSuccess(o);}function C(o){return I().output.formatDate(o)}function d(o,r){return I().output.truncate(o,r)}var A=`
2
2
  query ColGetFamilyTree($id: ID!) {
3
3
  colFamilyTree(id: $id) {
4
4
  id name surname description status tags createdAt updatedAt workspaceId
5
5
  coverFile { id }
6
6
  }
7
7
  }
8
- `,A=`
8
+ `,v=`
9
9
  query ColListFamilyTrees($pagination: PaginationInput, $status: ColTreeStatus) {
10
10
  colListFamilyTrees(pagination: $pagination, status: $status) {
11
11
  items { id name surname status tags createdAt }
@@ -220,4 +220,4 @@
220
220
  query ColHealth {
221
221
  colHealth
222
222
  }
223
- `;function l(o){let r=Number.parseInt(o,10);if(Number.isNaN(r))throw new u(`Expected an integer but got "${o}"`);return r}function f(o){return o.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function ie(o){let r=o.command("trees").description("Collabkin family trees");r.command("list").description("List family trees").option("--status <s>","ACTIVE|ARCHIVED").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(A,{status:e.status?e.status.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});s(e,t.colListFamilyTrees.items,{headers:["ID","Name","Surname","Status","Tags"],rows:t.colListFamilyTrees.items.map(n=>[d(n.id,12),n.name,n.surname??"-",n.status,(n.tags??[]).join(", ")])});}catch(t){i(t);}}),r.command("get").description("Get a family tree by id").argument("<id>","Family tree ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(v,{id:e});if(!n.colFamilyTree)throw new u(`Family tree ${e} not found`);s(t,n.colFamilyTree);}catch(n){i(n);}}),r.command("create").description("Create a family tree").requiredOption("--name <name>","Tree name").option("--surname <s>","Family surname").option("--description <s>","Description").option("--cover-file <id>","Cover file ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name};e.surname&&(t.surname=e.surname),e.description&&(t.description=e.description),e.coverFile&&(t.coverFileId=e.coverFile),e.tags&&(t.tags=f(e.tags));let n=await a(D,{input:t});c(`Family tree created: ${n.colCreateFamilyTree.name}`),s(e,n.colCreateFamilyTree);}catch(t){i(t);}}),r.command("update").description("Update a family tree").argument("<id>","Family tree ID").option("--name <name>","Tree name").option("--surname <s>","Family surname").option("--description <s>","Description").option("--cover-file <id>","Cover file ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.surname!==void 0&&(n.surname=t.surname),t.description!==void 0&&(n.description=t.description),t.coverFile&&(n.coverFileId=t.coverFile),t.tags&&(n.tags=f(t.tags)),!Object.keys(n).length)throw new u("No updates specified");let p=await a(O,{id:e,input:n});c("Family tree updated"),s(t,p.colUpdateFamilyTree);}catch(n){i(n);}}),r.command("archive").description("Archive a family tree").argument("<id>","Family tree ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(R,{id:e});c(`Family tree archived: ${n.colArchiveFamilyTree}`),s(t,{archived:n.colArchiveFamilyTree});}catch(n){i(n);}});}function se(o){let r=o.command("people").description("Collabkin people");r.command("list").description("List people in a tree").option("--tree <id>","Filter by family tree ID").option("--life-status <s>","LIVING|DECEASED|UNKNOWN").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(M,{treeId:e.tree,lifeStatus:e.lifeStatus?e.lifeStatus.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});s(e,t.colListPeople.items,{headers:["ID","Given","Family","Gender","Life","Born"],rows:t.colListPeople.items.map(n=>[d(n.id,12),n.givenName,n.familyName??"-",n.gender,n.lifeStatus,C(n.birthDate)])});}catch(t){i(t);}}),r.command("get").description("Get a person by id").argument("<id>","Person ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(S,{id:e});if(!n.colPerson)throw new u(`Person ${e} not found`);s(t,n.colPerson);}catch(n){i(n);}}),r.command("create").description("Create a person").requiredOption("--tree <id>","Family tree ID").requiredOption("--given-name <name>","Given name").option("--family-name <name>","Family name").option("--maiden-name <name>","Maiden name").option("--nickname <name>","Nickname").option("--gender <g>","MALE|FEMALE|OTHER|UNKNOWN").option("--life-status <s>","LIVING|DECEASED|UNKNOWN").option("--birth-date <iso>","Birth date (ISO)").option("--birth-place <s>","Birth place").option("--death-date <iso>","Death date (ISO)").option("--bio <s>","Biography").option("--linked-user <id>","Linked user ID").option("--photo-file <id>","Photo file ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={treeId:e.tree,givenName:e.givenName};e.familyName&&(t.familyName=e.familyName),e.maidenName&&(t.maidenName=e.maidenName),e.nickname&&(t.nickname=e.nickname),e.gender&&(t.gender=e.gender.toUpperCase()),e.lifeStatus&&(t.lifeStatus=e.lifeStatus.toUpperCase()),e.birthDate&&(t.birthDate=e.birthDate),e.birthPlace&&(t.birthPlace=e.birthPlace),e.deathDate&&(t.deathDate=e.deathDate),e.bio&&(t.bio=e.bio),e.linkedUser&&(t.linkedUserId=e.linkedUser),e.photoFile&&(t.photoFileId=e.photoFile),e.tags&&(t.tags=f(e.tags));let n=await a(P,{input:t});c(`Person created: ${n.colCreatePerson.givenName}`),s(e,n.colCreatePerson);}catch(t){i(t);}}),r.command("update").description("Update a person").argument("<id>","Person ID").option("--given-name <name>","Given name").option("--family-name <name>","Family name").option("--maiden-name <name>","Maiden name").option("--nickname <name>","Nickname").option("--gender <g>","MALE|FEMALE|OTHER|UNKNOWN").option("--life-status <s>","LIVING|DECEASED|UNKNOWN").option("--birth-date <iso>","Birth date (ISO)").option("--birth-place <s>","Birth place").option("--death-date <iso>","Death date (ISO)").option("--bio <s>","Biography").option("--linked-user <id>","Linked user ID").option("--photo-file <id>","Photo file ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.givenName&&(n.givenName=t.givenName),t.familyName!==void 0&&(n.familyName=t.familyName),t.maidenName!==void 0&&(n.maidenName=t.maidenName),t.nickname!==void 0&&(n.nickname=t.nickname),t.gender&&(n.gender=t.gender.toUpperCase()),t.lifeStatus&&(n.lifeStatus=t.lifeStatus.toUpperCase()),t.birthDate&&(n.birthDate=t.birthDate),t.birthPlace!==void 0&&(n.birthPlace=t.birthPlace),t.deathDate&&(n.deathDate=t.deathDate),t.bio!==void 0&&(n.bio=t.bio),t.linkedUser&&(n.linkedUserId=t.linkedUser),t.photoFile&&(n.photoFileId=t.photoFile),t.tags&&(n.tags=f(t.tags)),!Object.keys(n).length)throw new u("No updates specified");let p=await a($,{id:e,input:n});c("Person updated"),s(t,p.colUpdatePerson);}catch(n){i(n);}}),r.command("remove").description("Delete a person").argument("<id>","Person ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(L,{id:e});c(`Person deleted: ${n.colDeletePerson}`),s(t,{deleted:n.colDeletePerson});}catch(n){i(n);}});}function ae(o){let r=o.command("relationships").description("Collabkin relationships between people");r.command("list").description("List relationships in a tree (optionally for one person)").option("--tree <id>","Filter by family tree ID").option("--person <id>","Filter by person ID").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(N,{treeId:e.tree,personId:e.person,pagination:{limit:e.limit,offset:e.offset}})).colListRelationships.items;s(e,n,{headers:["ID","From","To","Type","Certainty"],rows:n.map(p=>[d(p.id,12),d(p.fromPersonId,12),d(p.toPersonId,12),p.type,p.certainty])});}catch(t){i(t);}}),r.command("create").description("Create a relationship between two people").requiredOption("--tree <id>","Family tree ID").requiredOption("--from <id>","From person ID").requiredOption("--to <id>","To person ID").requiredOption("--type <t>","PARENT|CHILD|SPOUSE|PARTNER|SIBLING|GRANDPARENT|GRANDCHILD|GUARDIAN").option("--certainty <c>","CONFIRMED|PROBABLE|DISPUTED|UNVERIFIED").option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async e=>{try{let t={treeId:e.tree,fromPersonId:e.from,toPersonId:e.to,type:e.type.toUpperCase()};e.certainty&&(t.certainty=e.certainty.toUpperCase()),e.startDate&&(t.startDate=e.startDate),e.endDate&&(t.endDate=e.endDate),e.notes&&(t.notes=e.notes);let n=await a(F,{input:t});c(`Relationship created: ${n.colCreateRelationship.type}`),s(e,n.colCreateRelationship);}catch(t){i(t);}}),r.command("remove").description("Delete a relationship").argument("<id>","Relationship ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(_,{id:e});c(`Relationship deleted: ${n.colDeleteRelationship}`),s(t,{deleted:n.colDeleteRelationship});}catch(n){i(n);}});}function ce(o){let r=o.command("events").description("Collabkin timeline events");r.command("timeline").description("Show the family timeline (dated events) for a tree").requiredOption("--tree <id>","Family tree ID").option("--person <id>","Filter by person ID").option("--type <t>","Filter by event type").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(q,{treeId:e.tree,personId:e.person,type:e.type?e.type.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}})).colTimeline.items;s(e,n,{headers:["ID","Title","Type","Date","Place","Approx"],rows:n.map(p=>[d(p.id,12),p.title,p.type,C(p.date),p.place??"-",p.isApproximate?"yes":"no"])});}catch(t){i(t);}}),r.command("create").description("Create a timeline event").requiredOption("--tree <id>","Family tree ID").requiredOption("--title <t>","Event title").requiredOption("--date <iso>","Event date (ISO)").option("--type <t>","BIRTH|DEATH|MARRIAGE|DIVORCE|EDUCATION|MILITARY|IMMIGRATION|RESIDENCE|MILESTONE|OTHER").option("--description <s>","Description").option("--place <s>","Place").option("--person <id>","Associated person ID").option("--approximate","Mark the date as approximate").option("-f, --format <format>","Output format").action(async e=>{try{let t={treeId:e.tree,title:e.title,date:e.date};e.type&&(t.type=e.type.toUpperCase()),e.description&&(t.description=e.description),e.place&&(t.place=e.place),e.person&&(t.personId=e.person),e.approximate&&(t.isApproximate=!0);let n=await a(U,{input:t});c(`Event created: ${n.colCreateEvent.title}`),s(e,n.colCreateEvent);}catch(t){i(t);}}),r.command("remove").description("Delete a timeline event").argument("<id>","Event ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(G,{id:e});c(`Event deleted: ${n.colDeleteEvent}`),s(t,{deleted:n.colDeleteEvent});}catch(n){i(n);}});}function pe(o){let r=o.command("memories").description("Collabkin memories (media)");r.command("list").description("List memories").option("--tree <id>","Filter by family tree ID").option("--person <id>","Filter by person ID").option("--kind <k>","PHOTO|VIDEO|AUDIO|DOCUMENT|ARTIFACT").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(H,{treeId:e.tree,personId:e.person,kind:e.kind?e.kind.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});s(e,t.colListMemories.items,{headers:["ID","Title","Kind","Place","Taken","Visibility"],rows:t.colListMemories.items.map(n=>[d(n.id,12),n.title,n.kind,n.place??"-",C(n.takenAt),n.visibility])});}catch(t){i(t);}}),r.command("get").description("Get a memory by id").argument("<id>","Memory ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(W,{id:e});if(!n.colMemory)throw new u(`Memory ${e} not found`);s(t,n.colMemory);}catch(n){i(n);}}),r.command("create").description("Create a memory").requiredOption("--tree <id>","Family tree ID").requiredOption("--title <t>","Memory title").option("--kind <k>","PHOTO|VIDEO|AUDIO|DOCUMENT|ARTIFACT").option("--description <s>","Description").option("--place <s>","Place").option("--taken-at <iso>","Taken at (ISO)").option("--person <id>","Associated person ID").option("--file <id>","File ID (media blob)").option("--visibility <v>","TREE|STEWARDS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={treeId:e.tree,title:e.title};e.kind&&(t.kind=e.kind.toUpperCase()),e.description&&(t.description=e.description),e.place&&(t.place=e.place),e.takenAt&&(t.takenAt=e.takenAt),e.person&&(t.personId=e.person),e.file&&(t.fileId=e.file),e.visibility&&(t.visibility=e.visibility.toUpperCase()),e.tags&&(t.tags=f(e.tags));let n=await a(V,{input:t});c(`Memory created: ${n.colCreateMemory.title}`),s(e,n.colCreateMemory);}catch(t){i(t);}}),r.command("update").description("Update a memory").argument("<id>","Memory ID").option("--title <t>","Memory title").option("--kind <k>","PHOTO|VIDEO|AUDIO|DOCUMENT|ARTIFACT").option("--description <s>","Description").option("--place <s>","Place").option("--taken-at <iso>","Taken at (ISO)").option("--person <id>","Associated person ID").option("--file <id>","File ID (media blob)").option("--visibility <v>","TREE|STEWARDS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.title&&(n.title=t.title),t.kind&&(n.kind=t.kind.toUpperCase()),t.description!==void 0&&(n.description=t.description),t.place!==void 0&&(n.place=t.place),t.takenAt&&(n.takenAt=t.takenAt),t.person&&(n.personId=t.person),t.file&&(n.fileId=t.file),t.visibility&&(n.visibility=t.visibility.toUpperCase()),t.tags&&(n.tags=f(t.tags)),!Object.keys(n).length)throw new u("No updates specified");let p=await a(j,{id:e,input:n});c("Memory updated"),s(t,p.colUpdateMemory);}catch(n){i(n);}}),r.command("remove").description("Delete a memory").argument("<id>","Memory ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(B,{id:e});c(`Memory deleted: ${n.colDeleteMemory}`),s(t,{deleted:n.colDeleteMemory});}catch(n){i(n);}});}function de(o){let r=o.command("stories").description("Collabkin stories");r.command("list").description("List stories").option("--tree <id>","Filter by family tree ID").option("--person <id>","Filter by person ID").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(z,{treeId:e.tree,personId:e.person,pagination:{limit:e.limit,offset:e.offset}});s(e,t.colListStories.items,{headers:["ID","Title","Format","Narrator","Visibility"],rows:t.colListStories.items.map(n=>[d(n.id,12),n.title,n.format,n.narrator??"-",n.visibility])});}catch(t){i(t);}}),r.command("get").description("Get a story by id").argument("<id>","Story ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(Y,{id:e});if(!n.colStory)throw new u(`Story ${e} not found`);s(t,n.colStory);}catch(n){i(n);}}),r.command("create").description("Create a story").requiredOption("--tree <id>","Family tree ID").requiredOption("--title <t>","Story title").option("--body <s>","Story body").option("--story-format <f>","WRITTEN|AUDIO|VIDEO").option("--narrator <s>","Narrator").option("--person <id>","Associated person ID").option("--recording-file <id>","Recording file ID").option("--visibility <v>","TREE|STEWARDS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={treeId:e.tree,title:e.title};e.body&&(t.body=e.body),e.storyFormat&&(t.format=e.storyFormat.toUpperCase()),e.narrator&&(t.narrator=e.narrator),e.person&&(t.personId=e.person),e.recordingFile&&(t.recordingFileId=e.recordingFile),e.visibility&&(t.visibility=e.visibility.toUpperCase()),e.tags&&(t.tags=f(e.tags));let n=await a(K,{input:t});c(`Story created: ${n.colCreateStory.title}`),s(e,n.colCreateStory);}catch(t){i(t);}}),r.command("remove").description("Delete a story").argument("<id>","Story ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(J,{id:e});c(`Story deleted: ${n.colDeleteStory}`),s(t,{deleted:n.colDeleteStory});}catch(n){i(n);}});}var ue="collabkin_memory",fe="collabkin_story";function le(o){if(o.memory&&!o.story)return {entityType:ue,entityId:o.memory};if(o.story&&!o.memory)return {entityType:fe,entityId:o.story};throw new u("Specify exactly one of --memory or --story")}function me(o){return {id:o.id,body:o.content.text??"",authorId:o.authorId,memoryId:o.entityType===ue?o.entityId:null,storyId:o.entityType===fe?o.entityId:null,createdAt:o.createdAt}}function ge(o){let r=o.command("comments").description("Collabkin comments on memories & stories");r.command("list").description("List comments for a memory or a story (oldest first)").option("--memory <id>","Memory ID").option("--story <id>","Story ID").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=le(e),p=(await a(Q,{input:{...t,skip:e.offset,take:e.limit,sortBy:"createdAt",sortOrder:"asc"}})).getEntityComments.items.map(me);s(e,p,{headers:["ID","Body","Memory","Story"],rows:p.map(h=>[d(h.id,12),d(h.body,40),h.memoryId?d(h.memoryId,12):"-",h.storyId?d(h.storyId,12):"-"])});}catch(t){i(t);}}),r.command("add").description("Add a comment to a memory or a story").requiredOption("--body <text>","Comment body").option("--memory <id>","Memory ID").option("--story <id>","Story ID").option("-f, --format <format>","Output format").action(async e=>{try{let t={...le(e),content:{text:e.body}},n=await a(X,{input:t});c("Comment added"),s(e,me(n.createEntityComment));}catch(t){i(t);}}),r.command("remove").description("Delete a comment").argument("<id>","Comment ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(Z,{input:{id:e,soft:!0}});c(`Comment deleted: ${n.deleteEntityComment}`),s(t,{deleted:n.deleteEntityComment});}catch(n){i(n);}});}function ye(o){let r=o.command("memberships").description("Collabkin family-tree memberships");r.command("list").description("List memberships for a tree").requiredOption("--tree <id>","Family tree ID").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(ee,{treeId:e.tree,pagination:{limit:e.limit,offset:e.offset}})).colListMemberships.items;s(e,n,{headers:["ID","Member","Person","Role","Status"],rows:n.map(p=>[d(p.id,12),d(p.memberUserId,12),p.personId?d(p.personId,12):"-",p.role,p.status])});}catch(t){i(t);}}),r.command("invite").description("Invite a member to a family tree").requiredOption("--tree <id>","Family tree ID").requiredOption("--member <id>","Member user ID").option("--person <id>","Linked person ID").option("--role <r>","OWNER|STEWARD|CONTRIBUTOR|VIEWER").option("-f, --format <format>","Output format").action(async e=>{try{let t={treeId:e.tree,memberUserId:e.member};e.person&&(t.personId=e.person),e.role&&(t.role=e.role.toUpperCase());let n=await a(te,{input:t});c(`Member invited: ${n.colInviteMember.memberUserId}`),s(e,n.colInviteMember);}catch(t){i(t);}}),r.command("accept").description("Accept a membership invitation").argument("<id>","Membership ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(ne,{id:e});c(`Membership accepted: ${n.colAcceptMembership.status}`),s(t,n.colAcceptMembership);}catch(n){i(n);}}),r.command("remove").description("Remove a member from a family tree").argument("<id>","Membership ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(re,{id:e});c(`Member removed: ${n.colRemoveMember}`),s(t,{removed:n.colRemoveMember});}catch(n){i(n);}});}function Ie(o){o.command("health").description("Collabkin service health check (public)").option("-f, --format <format>","Output format").action(async r=>{try{let e=await k(oe);c(e.colHealth),s(r,{health:e.colHealth});}catch(e){i(e);}});}var Re={id:"collabkin",version:"1.0.0",displayName:"Collabkin",dependsOn:["auth","workspaces"],register(o,r){x(r);let e=o.command("collabkin").description("Collabkin collaborative family history");ie(e),se(e),ae(e),ce(e),pe(e),de(e),ge(e),ye(e),Ie(e);}},xn=Re;module.exports=xn;
223
+ `;function l(o){let r=Number.parseInt(o,10);if(Number.isNaN(r))throw new u(`Expected an integer but got "${o}"`);return r}function f(o){return o.split(",").map(r=>r.trim()).filter(r=>r.length>0)}function ie(o){let r=o.command("trees").description("Collabkin family trees");r.command("list").description("List family trees").option("--status <s>","ACTIVE|ARCHIVED").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(v,{status:e.status?e.status.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});s(e,t.colListFamilyTrees.items,{headers:["ID","Name","Surname","Status","Tags"],rows:t.colListFamilyTrees.items.map(n=>[d(n.id,12),n.name,n.surname??"-",n.status,(n.tags??[]).join(", ")])});}catch(t){i(t);}}),r.command("get").description("Get a family tree by id").argument("<id>","Family tree ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(A,{id:e});if(!n.colFamilyTree)throw new u(`Family tree ${e} not found`);s(t,n.colFamilyTree);}catch(n){i(n);}}),r.command("create").description("Create a family tree").requiredOption("--name <name>","Tree name").option("--surname <s>","Family surname").option("--description <s>","Description").option("--cover-file <id>","Cover file ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name};e.surname&&(t.surname=e.surname),e.description&&(t.description=e.description),e.coverFile&&(t.coverFileId=e.coverFile),e.tags&&(t.tags=f(e.tags));let n=await a(D,{input:t});c(`Family tree created: ${n.colCreateFamilyTree.name}`),s(e,n.colCreateFamilyTree);}catch(t){i(t);}}),r.command("update").description("Update a family tree").argument("<id>","Family tree ID").option("--name <name>","Tree name").option("--surname <s>","Family surname").option("--description <s>","Description").option("--cover-file <id>","Cover file ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.surname!==void 0&&(n.surname=t.surname),t.description!==void 0&&(n.description=t.description),t.coverFile&&(n.coverFileId=t.coverFile),t.tags&&(n.tags=f(t.tags)),!Object.keys(n).length)throw new u("No updates specified");let p=await a(O,{id:e,input:n});c("Family tree updated"),s(t,p.colUpdateFamilyTree);}catch(n){i(n);}}),r.command("archive").description("Archive a family tree").argument("<id>","Family tree ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(R,{id:e});c(`Family tree archived: ${n.colArchiveFamilyTree}`),s(t,{archived:n.colArchiveFamilyTree});}catch(n){i(n);}});}function se(o){let r=o.command("people").description("Collabkin people");r.command("list").description("List people in a tree").option("--tree <id>","Filter by family tree ID").option("--life-status <s>","LIVING|DECEASED|UNKNOWN").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(M,{treeId:e.tree,lifeStatus:e.lifeStatus?e.lifeStatus.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});s(e,t.colListPeople.items,{headers:["ID","Given","Family","Gender","Life","Born"],rows:t.colListPeople.items.map(n=>[d(n.id,12),n.givenName,n.familyName??"-",n.gender,n.lifeStatus,C(n.birthDate)])});}catch(t){i(t);}}),r.command("get").description("Get a person by id").argument("<id>","Person ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(S,{id:e});if(!n.colPerson)throw new u(`Person ${e} not found`);s(t,n.colPerson);}catch(n){i(n);}}),r.command("create").description("Create a person").requiredOption("--tree <id>","Family tree ID").requiredOption("--given-name <name>","Given name").option("--family-name <name>","Family name").option("--maiden-name <name>","Maiden name").option("--nickname <name>","Nickname").option("--gender <g>","MALE|FEMALE|OTHER|UNKNOWN").option("--life-status <s>","LIVING|DECEASED|UNKNOWN").option("--birth-date <iso>","Birth date (ISO)").option("--birth-place <s>","Birth place").option("--death-date <iso>","Death date (ISO)").option("--bio <s>","Biography").option("--linked-user <id>","Linked user ID").option("--photo-file <id>","Photo file ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={treeId:e.tree,givenName:e.givenName};e.familyName&&(t.familyName=e.familyName),e.maidenName&&(t.maidenName=e.maidenName),e.nickname&&(t.nickname=e.nickname),e.gender&&(t.gender=e.gender.toUpperCase()),e.lifeStatus&&(t.lifeStatus=e.lifeStatus.toUpperCase()),e.birthDate&&(t.birthDate=e.birthDate),e.birthPlace&&(t.birthPlace=e.birthPlace),e.deathDate&&(t.deathDate=e.deathDate),e.bio&&(t.bio=e.bio),e.linkedUser&&(t.linkedUserId=e.linkedUser),e.photoFile&&(t.photoFileId=e.photoFile),e.tags&&(t.tags=f(e.tags));let n=await a(P,{input:t});c(`Person created: ${n.colCreatePerson.givenName}`),s(e,n.colCreatePerson);}catch(t){i(t);}}),r.command("update").description("Update a person").argument("<id>","Person ID").option("--given-name <name>","Given name").option("--family-name <name>","Family name").option("--maiden-name <name>","Maiden name").option("--nickname <name>","Nickname").option("--gender <g>","MALE|FEMALE|OTHER|UNKNOWN").option("--life-status <s>","LIVING|DECEASED|UNKNOWN").option("--birth-date <iso>","Birth date (ISO)").option("--birth-place <s>","Birth place").option("--death-date <iso>","Death date (ISO)").option("--bio <s>","Biography").option("--linked-user <id>","Linked user ID").option("--photo-file <id>","Photo file ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.givenName&&(n.givenName=t.givenName),t.familyName!==void 0&&(n.familyName=t.familyName),t.maidenName!==void 0&&(n.maidenName=t.maidenName),t.nickname!==void 0&&(n.nickname=t.nickname),t.gender&&(n.gender=t.gender.toUpperCase()),t.lifeStatus&&(n.lifeStatus=t.lifeStatus.toUpperCase()),t.birthDate&&(n.birthDate=t.birthDate),t.birthPlace!==void 0&&(n.birthPlace=t.birthPlace),t.deathDate&&(n.deathDate=t.deathDate),t.bio!==void 0&&(n.bio=t.bio),t.linkedUser&&(n.linkedUserId=t.linkedUser),t.photoFile&&(n.photoFileId=t.photoFile),t.tags&&(n.tags=f(t.tags)),!Object.keys(n).length)throw new u("No updates specified");let p=await a($,{id:e,input:n});c("Person updated"),s(t,p.colUpdatePerson);}catch(n){i(n);}}),r.command("remove").description("Delete a person").argument("<id>","Person ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(L,{id:e});c(`Person deleted: ${n.colDeletePerson}`),s(t,{deleted:n.colDeletePerson});}catch(n){i(n);}});}function ae(o){let r=o.command("relationships").description("Collabkin relationships between people");r.command("list").description("List relationships in a tree (optionally for one person)").option("--tree <id>","Filter by family tree ID").option("--person <id>","Filter by person ID").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(N,{treeId:e.tree,personId:e.person,pagination:{limit:e.limit,offset:e.offset}})).colListRelationships.items;s(e,n,{headers:["ID","From","To","Type","Certainty"],rows:n.map(p=>[d(p.id,12),d(p.fromPersonId,12),d(p.toPersonId,12),p.type,p.certainty])});}catch(t){i(t);}}),r.command("create").description("Create a relationship between two people").requiredOption("--tree <id>","Family tree ID").requiredOption("--from <id>","From person ID").requiredOption("--to <id>","To person ID").requiredOption("--type <t>","PARENT|CHILD|SPOUSE|PARTNER|SIBLING|GRANDPARENT|GRANDCHILD|GUARDIAN").option("--certainty <c>","CONFIRMED|PROBABLE|DISPUTED|UNVERIFIED").option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async e=>{try{let t={treeId:e.tree,fromPersonId:e.from,toPersonId:e.to,type:e.type.toUpperCase()};e.certainty&&(t.certainty=e.certainty.toUpperCase()),e.startDate&&(t.startDate=e.startDate),e.endDate&&(t.endDate=e.endDate),e.notes&&(t.notes=e.notes);let n=await a(F,{input:t});c(`Relationship created: ${n.colCreateRelationship.type}`),s(e,n.colCreateRelationship);}catch(t){i(t);}}),r.command("remove").description("Delete a relationship").argument("<id>","Relationship ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(_,{id:e});c(`Relationship deleted: ${n.colDeleteRelationship}`),s(t,{deleted:n.colDeleteRelationship});}catch(n){i(n);}});}function ce(o){let r=o.command("events").description("Collabkin timeline events");r.command("timeline").description("Show the family timeline (dated events) for a tree").requiredOption("--tree <id>","Family tree ID").option("--person <id>","Filter by person ID").option("--type <t>","Filter by event type").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(q,{treeId:e.tree,personId:e.person,type:e.type?e.type.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}})).colTimeline.items;s(e,n,{headers:["ID","Title","Type","Date","Place","Approx"],rows:n.map(p=>[d(p.id,12),p.title,p.type,C(p.date),p.place??"-",p.isApproximate?"yes":"no"])});}catch(t){i(t);}}),r.command("create").description("Create a timeline event").requiredOption("--tree <id>","Family tree ID").requiredOption("--title <t>","Event title").requiredOption("--date <iso>","Event date (ISO)").option("--type <t>","BIRTH|DEATH|MARRIAGE|DIVORCE|EDUCATION|MILITARY|IMMIGRATION|RESIDENCE|MILESTONE|OTHER").option("--description <s>","Description").option("--place <s>","Place").option("--person <id>","Associated person ID").option("--approximate","Mark the date as approximate").option("-f, --format <format>","Output format").action(async e=>{try{let t={treeId:e.tree,title:e.title,date:e.date};e.type&&(t.type=e.type.toUpperCase()),e.description&&(t.description=e.description),e.place&&(t.place=e.place),e.person&&(t.personId=e.person),e.approximate&&(t.isApproximate=!0);let n=await a(U,{input:t});c(`Event created: ${n.colCreateEvent.title}`),s(e,n.colCreateEvent);}catch(t){i(t);}}),r.command("remove").description("Delete a timeline event").argument("<id>","Event ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(G,{id:e});c(`Event deleted: ${n.colDeleteEvent}`),s(t,{deleted:n.colDeleteEvent});}catch(n){i(n);}});}function pe(o){let r=o.command("memories").description("Collabkin memories (media)");r.command("list").description("List memories").option("--tree <id>","Filter by family tree ID").option("--person <id>","Filter by person ID").option("--kind <k>","PHOTO|VIDEO|AUDIO|DOCUMENT|ARTIFACT").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(H,{treeId:e.tree,personId:e.person,kind:e.kind?e.kind.toUpperCase():void 0,pagination:{limit:e.limit,offset:e.offset}});s(e,t.colListMemories.items,{headers:["ID","Title","Kind","Place","Taken","Visibility"],rows:t.colListMemories.items.map(n=>[d(n.id,12),n.title,n.kind,n.place??"-",C(n.takenAt),n.visibility])});}catch(t){i(t);}}),r.command("get").description("Get a memory by id").argument("<id>","Memory ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(W,{id:e});if(!n.colMemory)throw new u(`Memory ${e} not found`);s(t,n.colMemory);}catch(n){i(n);}}),r.command("create").description("Create a memory").requiredOption("--tree <id>","Family tree ID").requiredOption("--title <t>","Memory title").option("--kind <k>","PHOTO|VIDEO|AUDIO|DOCUMENT|ARTIFACT").option("--description <s>","Description").option("--place <s>","Place").option("--taken-at <iso>","Taken at (ISO)").option("--person <id>","Associated person ID").option("--file <id>","File ID (media blob)").option("--visibility <v>","TREE|STEWARDS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={treeId:e.tree,title:e.title};e.kind&&(t.kind=e.kind.toUpperCase()),e.description&&(t.description=e.description),e.place&&(t.place=e.place),e.takenAt&&(t.takenAt=e.takenAt),e.person&&(t.personId=e.person),e.file&&(t.fileId=e.file),e.visibility&&(t.visibility=e.visibility.toUpperCase()),e.tags&&(t.tags=f(e.tags));let n=await a(V,{input:t});c(`Memory created: ${n.colCreateMemory.title}`),s(e,n.colCreateMemory);}catch(t){i(t);}}),r.command("update").description("Update a memory").argument("<id>","Memory ID").option("--title <t>","Memory title").option("--kind <k>","PHOTO|VIDEO|AUDIO|DOCUMENT|ARTIFACT").option("--description <s>","Description").option("--place <s>","Place").option("--taken-at <iso>","Taken at (ISO)").option("--person <id>","Associated person ID").option("--file <id>","File ID (media blob)").option("--visibility <v>","TREE|STEWARDS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.title&&(n.title=t.title),t.kind&&(n.kind=t.kind.toUpperCase()),t.description!==void 0&&(n.description=t.description),t.place!==void 0&&(n.place=t.place),t.takenAt&&(n.takenAt=t.takenAt),t.person&&(n.personId=t.person),t.file&&(n.fileId=t.file),t.visibility&&(n.visibility=t.visibility.toUpperCase()),t.tags&&(n.tags=f(t.tags)),!Object.keys(n).length)throw new u("No updates specified");let p=await a(j,{id:e,input:n});c("Memory updated"),s(t,p.colUpdateMemory);}catch(n){i(n);}}),r.command("remove").description("Delete a memory").argument("<id>","Memory ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(B,{id:e});c(`Memory deleted: ${n.colDeleteMemory}`),s(t,{deleted:n.colDeleteMemory});}catch(n){i(n);}});}function de(o){let r=o.command("stories").description("Collabkin stories");r.command("list").description("List stories").option("--tree <id>","Filter by family tree ID").option("--person <id>","Filter by person ID").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(z,{treeId:e.tree,personId:e.person,pagination:{limit:e.limit,offset:e.offset}});s(e,t.colListStories.items,{headers:["ID","Title","Format","Narrator","Visibility"],rows:t.colListStories.items.map(n=>[d(n.id,12),n.title,n.format,n.narrator??"-",n.visibility])});}catch(t){i(t);}}),r.command("get").description("Get a story by id").argument("<id>","Story ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(Y,{id:e});if(!n.colStory)throw new u(`Story ${e} not found`);s(t,n.colStory);}catch(n){i(n);}}),r.command("create").description("Create a story").requiredOption("--tree <id>","Family tree ID").requiredOption("--title <t>","Story title").option("--body <s>","Story body").option("--story-format <f>","WRITTEN|AUDIO|VIDEO").option("--narrator <s>","Narrator").option("--person <id>","Associated person ID").option("--recording-file <id>","Recording file ID").option("--visibility <v>","TREE|STEWARDS|PRIVATE").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={treeId:e.tree,title:e.title};e.body&&(t.body=e.body),e.storyFormat&&(t.format=e.storyFormat.toUpperCase()),e.narrator&&(t.narrator=e.narrator),e.person&&(t.personId=e.person),e.recordingFile&&(t.recordingFileId=e.recordingFile),e.visibility&&(t.visibility=e.visibility.toUpperCase()),e.tags&&(t.tags=f(e.tags));let n=await a(K,{input:t});c(`Story created: ${n.colCreateStory.title}`),s(e,n.colCreateStory);}catch(t){i(t);}}),r.command("remove").description("Delete a story").argument("<id>","Story ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(J,{id:e});c(`Story deleted: ${n.colDeleteStory}`),s(t,{deleted:n.colDeleteStory});}catch(n){i(n);}});}var ue="collabkin_memory",fe="collabkin_story";function le(o){if(o.memory&&!o.story)return {entityType:ue,entityId:o.memory};if(o.story&&!o.memory)return {entityType:fe,entityId:o.story};throw new u("Specify exactly one of --memory or --story")}function me(o){return {id:o.id,body:o.content.text??"",authorId:o.authorId,memoryId:o.entityType===ue?o.entityId:null,storyId:o.entityType===fe?o.entityId:null,createdAt:o.createdAt}}function ge(o){let r=o.command("comments").description("Collabkin comments on memories & stories");r.command("list").description("List comments for a memory or a story (oldest first)").option("--memory <id>","Memory ID").option("--story <id>","Story ID").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let t=le(e),p=(await a(Q,{input:{...t,skip:e.offset,take:e.limit,sortBy:"createdAt",sortOrder:"asc"}})).getEntityComments.items.map(me);s(e,p,{headers:["ID","Body","Memory","Story"],rows:p.map(h=>[d(h.id,12),d(h.body,40),h.memoryId?d(h.memoryId,12):"-",h.storyId?d(h.storyId,12):"-"])});}catch(t){i(t);}}),r.command("add").description("Add a comment to a memory or a story").requiredOption("--body <text>","Comment body").option("--memory <id>","Memory ID").option("--story <id>","Story ID").option("-f, --format <format>","Output format").action(async e=>{try{let t={...le(e),content:{text:e.body}},n=await a(X,{input:t});c("Comment added"),s(e,me(n.createEntityComment));}catch(t){i(t);}}),r.command("remove").description("Delete a comment").argument("<id>","Comment ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(Z,{input:{id:e,soft:!0}});c(`Comment deleted: ${n.deleteEntityComment}`),s(t,{deleted:n.deleteEntityComment});}catch(n){i(n);}});}function ye(o){let r=o.command("memberships").description("Collabkin family-tree memberships");r.command("list").description("List memberships for a tree").requiredOption("--tree <id>","Family tree ID").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(ee,{treeId:e.tree,pagination:{limit:e.limit,offset:e.offset}})).colListMemberships.items;s(e,n,{headers:["ID","Member","Person","Role","Status"],rows:n.map(p=>[d(p.id,12),d(p.memberUserId,12),p.personId?d(p.personId,12):"-",p.role,p.status])});}catch(t){i(t);}}),r.command("invite").description("Invite a member to a family tree").requiredOption("--tree <id>","Family tree ID").requiredOption("--member <id>","Member user ID").option("--person <id>","Linked person ID").option("--role <r>","OWNER|STEWARD|CONTRIBUTOR|VIEWER").option("-f, --format <format>","Output format").action(async e=>{try{let t={treeId:e.tree,memberUserId:e.member};e.person&&(t.personId=e.person),e.role&&(t.role=e.role.toUpperCase());let n=await a(te,{input:t});c(`Member invited: ${n.colInviteMember.memberUserId}`),s(e,n.colInviteMember);}catch(t){i(t);}}),r.command("accept").description("Accept a membership invitation").argument("<id>","Membership ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(ne,{id:e});c(`Membership accepted: ${n.colAcceptMembership.status}`),s(t,n.colAcceptMembership);}catch(n){i(n);}}),r.command("remove").description("Remove a member from a family tree").argument("<id>","Membership ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(re,{id:e});c(`Member removed: ${n.colRemoveMember}`),s(t,{removed:n.colRemoveMember});}catch(n){i(n);}});}function Ie(o){o.command("health").description("Collabkin service health check (public)").option("-f, --format <format>","Output format").action(async r=>{try{let e=await k(oe);c(e.colHealth),s(r,{health:e.colHealth});}catch(e){i(e);}});}var Re={id:"collabkin",version:"1.0.0",displayName:"Collabkin",dependsOn:["auth","workspaces"],register(o,r){x(r);let e=o.command("collabkin").description("Collabkin collaborative family history");ie(e),se(e),ae(e),ce(e),pe(e),de(e),ge(e),ye(e),Ie(e);}},xn=Re;module.exports=xn;
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.cjs';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.cjs';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.js';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.js';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import {a,b as b$1,i,r,h,k as k$1,q as q$2,d}from'../../chunk-WTNQ5PEC.js';import {q as q$1}from'../../chunk-MT2F54AC.js';var D=`
1
+ import {a,b as b$1,i,r,h,k as k$1,q as q$2,d}from'../../chunk-3ZVMC2AF.js';import {q as q$1}from'../../chunk-ZT6KOG7N.js';var D=`
2
2
  query ColGetFamilyTree($id: ID!) {
3
3
  colFamilyTree(id: $id) {
4
4
  id name surname description status tags createdAt updatedAt workspaceId
@@ -1,4 +1,4 @@
1
- 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var p=class extends Error{exitCode;hint;constructor(n,t){super(n),this.name="CliUserError",this.exitCode=t?.exitCode??1,this.hint=t?.hint;}},h=class extends p{constructor(n,t){super(n,{exitCode:2,hint:t?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},C=class extends Error{cause;constructor(n,t){super(n),this.name="CliInternalError",this.cause=t;}};var y=null;function T(s){y=s;}function I(){if(!y)throw new C("vibecontrols module helpers used before setHelpersContext was called");return y}function St(){let s=I();if(!s.auth.isAuthenticated())throw new h("Authentication required.",{hint:`Run \`${s.productName} auth login\` to authenticate.`})}async function a(s,n){return St(),I().gql.workspace.request(s,n)}async function w(s,n){return I().gql.workspaceAuthOnly.request(s,n)}function r(s){let n=s instanceof Error?s.message:String(s);throw new p(n)}function i(s,n,t){I().output.formatAndOutput(s,n,t);}function c(s){I().output.printSuccess(s);}function E(s){return I().output.formatDate(s)}function d(s,n){return I().output.truncate(s,n)}var A=`
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var p=class extends Error{exitCode;hint;constructor(n,t){super(n),this.name="CliUserError",this.exitCode=t?.exitCode??1,this.hint=t?.hint;}},h=class extends p{constructor(n,t){super(n,{exitCode:2,hint:t?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},C=class extends Error{cause;constructor(n,t){super(n),this.name="CliInternalError",this.cause=t;}};var y=null;function k(s){y=s;}function I(){if(!y)throw new C("vibecontrols module helpers used before setHelpersContext was called");return y}function St(){let s=I();if(!s.auth.isAuthenticated())throw new h("Authentication required.",{hint:`Run \`${s.productName} auth login\` to authenticate.`})}async function a(s,n){return St(),I().gql.workspace.request(s,n)}async function w(s,n){return I().gql.workspaceAuthOnly.request(s,n)}function r(s){let n=s instanceof Error?s.message:String(s);throw new p(n)}function i(s,n,t){I().output.formatAndOutput(s,n,t);}function c(s){I().output.printSuccess(s);}function E(s){return I().output.formatDate(s)}function d(s,n){return I().output.truncate(s,n)}var T=`
2
2
  query ComradecircleCircle($id: ID!) {
3
3
  comCircle(id: $id) {
4
4
  id name slug description topic status visibility tags memberCount
@@ -6,7 +6,7 @@
6
6
  avatar { id }
7
7
  }
8
8
  }
9
- `,k=`
9
+ `,A=`
10
10
  query ComradecircleListCircles(
11
11
  $pagination: PaginationInput
12
12
  $status: ComCircleStatus
@@ -35,7 +35,7 @@
35
35
  mutation ComradecircleArchiveCircle($id: ID!) {
36
36
  comArchiveCircle(id: $id)
37
37
  }
38
- `,L=`
38
+ `,R=`
39
39
  query ComradecircleListChannels($circleId: ID!) {
40
40
  comListChannels(circleId: $circleId) {
41
41
  items {
@@ -45,7 +45,7 @@
45
45
  pageInfo { cursor hasMore }
46
46
  }
47
47
  }
48
- `,R=`
48
+ `,L=`
49
49
  mutation ComradecircleCreateChannel($input: ComCreateChannelInput!) {
50
50
  comCreateChannel(input: $input) {
51
51
  id circleId name slug description type visibility position isArchived createdAt
@@ -80,13 +80,13 @@
80
80
  mutation ComradecircleLeaveCircle($circleId: ID!) {
81
81
  comLeaveCircle(circleId: $circleId)
82
82
  }
83
- `,M=`
83
+ `,q=`
84
84
  mutation ComradecircleSetMemberRole($membershipId: ID!, $role: ComMemberRole!) {
85
85
  comSetMemberRole(membershipId: $membershipId, role: $role) {
86
86
  id circleId memberId role status updatedAt
87
87
  }
88
88
  }
89
- `,q=`
89
+ `,M=`
90
90
  query ComradecirclePost($id: ID!) {
91
91
  comPost(id: $id) {
92
92
  id channelId authorId body status tags attachmentFileIds isPinned
@@ -123,20 +123,20 @@
123
123
  mutation ComradecircleRemovePost($id: ID!) {
124
124
  comRemovePost(id: $id)
125
125
  }
126
- `,G=`
126
+ `,W=`
127
127
  mutation ComradecircleReactToPost($postId: ID!, $type: ComReactionType!) {
128
128
  comReactToPost(postId: $postId, type: $type) {
129
129
  id channelId reactionCount status updatedAt
130
130
  }
131
131
  }
132
- `,H=`
132
+ `,G=`
133
133
  query ComradecircleListComments($postId: ID!) {
134
134
  comListComments(postId: $postId) {
135
135
  items { id postId parentId authorId body isHidden createdAt updatedAt workspaceId }
136
136
  pageInfo { cursor hasMore }
137
137
  }
138
138
  }
139
- `,W=`
139
+ `,H=`
140
140
  mutation ComradecircleAddComment($input: ComCreateCommentInput!) {
141
141
  comAddComment(input: $input) {
142
142
  id postId parentId authorId body isHidden createdAt
@@ -286,4 +286,4 @@
286
286
  query ComradecircleHealth {
287
287
  comHealth
288
288
  }
289
- `;function u(s){let n=Number.parseInt(s,10);if(Number.isNaN(n))throw new p(`Expected an integer but got "${s}"`);return n}function m(s){return s.split(",").map(n=>n.trim()).filter(n=>n.length>0)}function lt(s){let n=s.command("circles").description("Comradecircle circles");n.command("list").description("List circles").option("--status <s>","ACTIVE|ARCHIVED|SUSPENDED").option("--visibility <v>","PUBLIC|PRIVATE|SECRET").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(k,{pagination:{limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0,visibility:t.visibility?t.visibility.toUpperCase():void 0});i(t,e.comListCircles.items,{headers:["ID","Name","Slug","Status","Visibility","Members"],rows:e.comListCircles.items.map(o=>[d(o.id,12),o.name,o.slug,o.status,o.visibility,String(o.memberCount??0)])});}catch(e){r(e);}}),n.command("get").description("Get a circle by id").argument("<id>","Circle ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(A,{id:t});if(!o.comCircle)throw new p(`Circle ${t} not found`);i(e,o.comCircle);}catch(o){r(o);}}),n.command("create").description("Create a circle").requiredOption("--name <name>","Circle name").requiredOption("--slug <slug>","URL slug").option("--description <s>","Description").option("--topic <s>","Topic").option("--visibility <v>","PUBLIC|PRIVATE|SECRET","PUBLIC").option("--tags <csv>","Comma-separated tags").option("--avatar-file-id <id>","Avatar file ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,slug:t.slug,visibility:(t.visibility??"PUBLIC").toUpperCase()};t.description&&(e.description=t.description),t.topic&&(e.topic=t.topic),t.tags&&(e.tags=m(t.tags)),t.avatarFileId&&(e.avatarFileId=t.avatarFileId);let o=await a(x,{input:e});c(`Circle created: ${o.comCreateCircle.name}`),i(t,o.comCreateCircle);}catch(e){r(e);}}),n.command("update").description("Update a circle").argument("<id>","Circle ID").option("--name <name>","Circle name").option("--description <s>","Description").option("--topic <s>","Topic").option("--visibility <v>","PUBLIC|PRIVATE|SECRET").option("--tags <csv>","Comma-separated tags").option("--avatar-file-id <id>","Avatar file ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.description!==void 0&&(o.description=e.description),e.topic!==void 0&&(o.topic=e.topic),e.visibility&&(o.visibility=e.visibility.toUpperCase()),e.tags&&(o.tags=m(e.tags)),e.avatarFileId&&(o.avatarFileId=e.avatarFileId),!Object.keys(o).length)throw new p("No updates specified");let f=await a(O,{id:t,input:o});c("Circle updated"),i(e,f.comUpdateCircle);}catch(o){r(o);}}),n.command("archive").description("Archive a circle").argument("<id>","Circle ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(P,{id:t});c(`Circle archived: ${o.comArchiveCircle}`),i(e,{archived:o.comArchiveCircle});}catch(o){r(o);}});}function ut(s){let n=s.command("channels").description("Comradecircle channels");n.command("list").description("List channels in a circle").requiredOption("--circle <id>","Circle ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(L,{circleId:t.circle});i(t,e.comListChannels.items,{headers:["ID","Name","Slug","Type","Visibility","Position"],rows:e.comListChannels.items.map(o=>[d(o.id,12),o.name,o.slug,o.type,o.visibility,String(o.position??0)])});}catch(e){r(e);}}),n.command("create").description("Create a channel").requiredOption("--circle <id>","Circle ID").requiredOption("--name <name>","Channel name").requiredOption("--slug <slug>","URL slug").option("--description <s>","Description").option("--type <t>","TEXT|VOICE|FORUM|ANNOUNCEMENT","TEXT").option("--visibility <v>","CIRCLE|PRIVATE","CIRCLE").option("--position <n>","Position",u).option("-f, --format <format>","Output format").action(async t=>{try{let e={circleId:t.circle,name:t.name,slug:t.slug,type:(t.type??"TEXT").toUpperCase(),visibility:(t.visibility??"CIRCLE").toUpperCase()};t.description&&(e.description=t.description),t.position!==void 0&&(e.position=t.position);let o=await a(R,{input:e});c(`Channel created: ${o.comCreateChannel.name}`),i(t,o.comCreateChannel);}catch(e){r(e);}}),n.command("update").description("Update a channel").argument("<id>","Channel ID").option("--name <name>","Channel name").option("--description <s>","Description").option("--type <t>","TEXT|VOICE|FORUM|ANNOUNCEMENT").option("--visibility <v>","CIRCLE|PRIVATE").option("--position <n>","Position",u).option("--archived <bool>","true|false",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.description!==void 0&&(o.description=e.description),e.type&&(o.type=e.type.toUpperCase()),e.visibility&&(o.visibility=e.visibility.toUpperCase()),e.position!==void 0&&(o.position=e.position),e.archived!==void 0&&(o.isArchived=e.archived),!Object.keys(o).length)throw new p("No updates specified");let f=await a(S,{id:t,input:o});c("Channel updated"),i(e,f.comUpdateChannel);}catch(o){r(o);}});}function mt(s){let n=s.command("memberships").description("Comradecircle circle memberships");n.command("list").description("List memberships").option("--circle <id>","Filter by circle ID").option("--status <s>","ACTIVE|PENDING|LEFT|BANNED").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a($,{circleId:t.circle,pagination:{limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0});i(t,e.comListMemberships.items,{headers:["ID","Circle","Member","Role","Status"],rows:e.comListMemberships.items.map(o=>[d(o.id,12),d(o.circleId,12),d(o.memberId,12),o.role,o.status])});}catch(e){r(e);}}),n.command("join").description("Join a circle as the calling member").requiredOption("--circle <id>","Circle ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(D,{circleId:t.circle});c(`Joined circle ${e.comJoinCircle.circleId}`),i(t,e.comJoinCircle);}catch(e){r(e);}}),n.command("leave").description("Leave a circle").requiredOption("--circle <id>","Circle ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(N,{circleId:t.circle});c(`Left circle: ${e.comLeaveCircle}`),i(t,{left:e.comLeaveCircle});}catch(e){r(e);}}),n.command("set-role").description("Set a member role").argument("<membershipId>","Membership ID").requiredOption("--role <r>","OWNER|ADMIN|MODERATOR|MEMBER").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(M,{membershipId:t,role:e.role.toUpperCase()});c(`Role set to ${o.comSetMemberRole.role}`),i(e,o.comSetMemberRole);}catch(o){r(o);}});}function ft(s){let n=s.command("posts").description("Comradecircle posts");n.command("list").description("List posts").option("--channel <id>","Filter by channel ID").option("--status <s>","DRAFT|PUBLISHED|HIDDEN|REMOVED").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(U,{channelId:t.channel,pagination:{limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0});i(t,e.comListPosts.items,{headers:["ID","Channel","Author","Status","Pinned","Comments","Reactions"],rows:e.comListPosts.items.map(o=>[d(o.id,12),d(o.channelId,12),d(o.authorId,12),o.status,o.isPinned?"yes":"no",String(o.commentCount??0),String(o.reactionCount??0)])});}catch(e){r(e);}}),n.command("get").description("Get a post by id").argument("<id>","Post ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(q,{id:t});if(!o.comPost)throw new p(`Post ${t} not found`);i(e,o.comPost);}catch(o){r(o);}}),n.command("create").description("Create a post").requiredOption("--channel <id>","Channel ID").requiredOption("--body <text>","Post body").option("--status <s>","DRAFT|PUBLISHED|HIDDEN|REMOVED","PUBLISHED").option("--tags <csv>","Comma-separated tags").option("--attachments <csv>","Comma-separated attachment file IDs").option("-f, --format <format>","Output format").action(async t=>{try{let e={channelId:t.channel,body:t.body,status:(t.status??"PUBLISHED").toUpperCase()};t.tags&&(e.tags=m(t.tags)),t.attachments&&(e.attachmentFileIds=m(t.attachments));let o=await a(_,{input:e});c(`Post created: ${o.comCreatePost.id}`),i(t,o.comCreatePost);}catch(e){r(e);}}),n.command("update").description("Update a post").argument("<id>","Post ID").option("--body <text>","Post body").option("--status <s>","DRAFT|PUBLISHED|HIDDEN|REMOVED").option("--pinned <bool>","true|false",t=>t==="true").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.body&&(o.body=e.body),e.status&&(o.status=e.status.toUpperCase()),e.pinned!==void 0&&(o.isPinned=e.pinned),e.tags&&(o.tags=m(e.tags)),!Object.keys(o).length)throw new p("No updates specified");let f=await a(F,{id:t,input:o});c("Post updated"),i(e,f.comUpdatePost);}catch(o){r(o);}}),n.command("remove").description("Remove a post").argument("<id>","Post ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(V,{id:t});c(`Post removed: ${o.comRemovePost}`),i(e,{removed:o.comRemovePost});}catch(o){r(o);}}),n.command("react").description("Toggle a reaction on a post").argument("<postId>","Post ID").requiredOption("--type <t>","LIKE|LOVE|CELEBRATE|INSIGHTFUL|SUPPORT|LAUGH").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(G,{postId:t,type:e.type.toUpperCase()});c(`Reaction toggled on post ${o.comReactToPost.id}`),i(e,o.comReactToPost);}catch(o){r(o);}});}function gt(s){let n=s.command("comments").description("Comradecircle post comments");n.command("list").description("List comments on a post").requiredOption("--post <id>","Post ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(H,{postId:t.post});i(t,e.comListComments.items,{headers:["ID","Author","Body","Parent","Hidden"],rows:e.comListComments.items.map(o=>[d(o.id,12),d(o.authorId,12),d(o.body,40),o.parentId?d(o.parentId,12):"-",o.isHidden?"yes":"no"])});}catch(e){r(e);}}),n.command("add").description("Add a comment to a post").requiredOption("--post <id>","Post ID").requiredOption("--body <text>","Comment body").option("--parent <id>","Parent comment ID (for replies)").option("-f, --format <format>","Output format").action(async t=>{try{let e={postId:t.post,body:t.body};t.parent&&(e.parentId=t.parent);let o=await a(W,{input:e});c(`Comment added: ${o.comAddComment.id}`),i(t,o.comAddComment);}catch(e){r(e);}});}function Ct(s){let n=s.command("events").description("Comradecircle events");n.command("list").description("List events").option("--circle <id>","Filter by circle ID").option("--status <s>","SCHEDULED|LIVE|COMPLETED|CANCELLED").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(B,{circleId:t.circle,pagination:{limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0});i(t,e.comListEvents.items,{headers:["ID","Title","Mode","Status","Starts","RSVPs"],rows:e.comListEvents.items.map(o=>[d(o.id,12),o.title,o.mode,o.status,E(o.startsAt),String(o.rsvpCount??0)])});}catch(e){r(e);}}),n.command("get").description("Get an event by id").argument("<id>","Event ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(j,{id:t});if(!o.comEvent)throw new p(`Event ${t} not found`);i(e,o.comEvent);}catch(o){r(o);}}),n.command("create").description("Create an event").requiredOption("--circle <id>","Circle ID").requiredOption("--title <t>","Event title").requiredOption("--starts-at <iso>","Start time (ISO date)").option("--description <s>","Description").option("--mode <m>","ONLINE|IN_PERSON|HYBRID","ONLINE").option("--location <s>","Location").option("--join-url <url>","Join URL").option("--capacity <n>","Capacity",u).option("--ends-at <iso>","End time (ISO date)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={circleId:t.circle,title:t.title,startsAt:t.startsAt,mode:(t.mode??"ONLINE").toUpperCase()};t.description&&(e.description=t.description),t.location&&(e.location=t.location),t.joinUrl&&(e.joinUrl=t.joinUrl),t.capacity!==void 0&&(e.capacity=t.capacity),t.endsAt&&(e.endsAt=t.endsAt),t.tags&&(e.tags=m(t.tags));let o=await a(J,{input:e});c(`Event created: ${o.comCreateEvent.title}`),i(t,o.comCreateEvent);}catch(e){r(e);}}),n.command("update").description("Update an event").argument("<id>","Event ID").option("--title <t>","Event title").option("--description <s>","Description").option("--mode <m>","ONLINE|IN_PERSON|HYBRID").option("--location <s>","Location").option("--join-url <url>","Join URL").option("--capacity <n>","Capacity",u).option("--starts-at <iso>","Start time (ISO date)").option("--ends-at <iso>","End time (ISO date)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.title&&(o.title=e.title),e.description!==void 0&&(o.description=e.description),e.mode&&(o.mode=e.mode.toUpperCase()),e.location!==void 0&&(o.location=e.location),e.joinUrl!==void 0&&(o.joinUrl=e.joinUrl),e.capacity!==void 0&&(o.capacity=e.capacity),e.startsAt&&(o.startsAt=e.startsAt),e.endsAt&&(o.endsAt=e.endsAt),e.tags&&(o.tags=m(e.tags)),!Object.keys(o).length)throw new p("No updates specified");let f=await a(z,{id:t,input:o});c("Event updated"),i(e,f.comUpdateEvent);}catch(o){r(o);}}),n.command("transition").description("Advance an event through its lifecycle").argument("<id>","Event ID").requiredOption("--status <s>","SCHEDULED|LIVE|COMPLETED|CANCELLED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(Y,{id:t,status:e.status.toUpperCase()});c(`Event transitioned to ${o.comTransitionEvent.status}`),i(e,o.comTransitionEvent);}catch(o){r(o);}}),n.command("rsvp").description("RSVP to an event as the calling member").argument("<eventId>","Event ID").requiredOption("--status <s>","GOING|INTERESTED|NOT_GOING|WAITLISTED").option("--note <s>","RSVP note").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(K,{eventId:t,status:e.status.toUpperCase(),note:e.note});c(`RSVP saved: ${o.comRsvpEvent.status}`),i(e,o.comRsvpEvent);}catch(o){r(o);}});}function It(s){let n=s.command("polls").description("Comradecircle polls");n.command("list").description("List polls in a circle").requiredOption("--circle <id>","Circle ID").option("--status <s>","OPEN|CLOSED").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(X,{circleId:t.circle,status:t.status?t.status.toUpperCase():void 0});i(t,e.comListPolls.items,{headers:["ID","Question","Status","Anonymous","Multiple"],rows:e.comListPolls.items.map(o=>[d(o.id,12),d(o.question,40),o.status,o.isAnonymous?"yes":"no",o.allowMultiple?"yes":"no"])});}catch(e){r(e);}}),n.command("get").description("Get a poll by id").argument("<id>","Poll ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(Q,{id:t});if(!o.comPoll)throw new p(`Poll ${t} not found`);i(e,o.comPoll);}catch(o){r(o);}}),n.command("create").description("Create a poll").requiredOption("--circle <id>","Circle ID").requiredOption("--question <q>","Poll question").requiredOption("--options <csv>","Comma-separated option labels").option("--allow-multiple","Allow multiple selections").option("--anonymous","Anonymous voting").option("--closes-at <iso>","Close time (ISO date)").option("-f, --format <format>","Output format").action(async t=>{try{let e=m(t.options);if(e.length===0)throw new p("--options must contain at least one option");let o={circleId:t.circle,question:t.question,options:e,allowMultiple:t.allowMultiple??!1,isAnonymous:t.anonymous??!1};t.closesAt&&(o.closesAt=t.closesAt);let f=await a(Z,{input:o});c(`Poll created: ${f.comCreatePoll.id}`),i(t,f.comCreatePoll);}catch(e){r(e);}}),n.command("close").description("Close a poll").argument("<id>","Poll ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(tt,{id:t});c(`Poll closed: ${o.comClosePoll.status}`),i(e,o.comClosePoll);}catch(o){r(o);}}),n.command("vote").description("Cast a vote for a poll option").argument("<pollId>","Poll ID").requiredOption("--option <id>","Option ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(et,{pollId:t,optionId:e.option});c(`Voted: ${o.comVotePoll.label} (${o.comVotePoll.voteCount})`),i(e,o.comVotePoll);}catch(o){r(o);}});}function ht(s){let n=s.command("profiles").description("Comradecircle member profiles");n.command("list").description("List member profiles").option("--discoverable <bool>","true|false",t=>t==="true").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(nt,{discoverable:t.discoverable,pagination:{limit:t.limit,offset:t.offset}});i(t,e.comListProfiles.items,{headers:["ID","Member","Display Name","Headline","Presence","Discoverable"],rows:e.comListProfiles.items.map(o=>[d(o.id,12),d(o.memberId,12),o.displayName,d(o.headline??"-",30),o.presence??"-",o.discoverable?"yes":"no"])});}catch(e){r(e);}}),n.command("get").description("Get a member profile by member id").argument("<memberId>","Member ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(ot,{memberId:t});if(!o.comProfile)throw new p(`Profile for member ${t} not found`);i(e,o.comProfile);}catch(o){r(o);}}),n.command("upsert").description("Create or update the calling member's profile").requiredOption("--display-name <name>","Display name").option("--headline <s>","Headline").option("--bio <s>","Bio").option("--presence <p>","ONLINE|AWAY|BUSY|OFFLINE").option("--discoverable <bool>","true|false",t=>t==="true").option("--interests <csv>","Comma-separated interests").option("--skills <csv>","Comma-separated skills").option("--avatar-file-id <id>","Avatar file ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={displayName:t.displayName};t.headline&&(e.headline=t.headline),t.bio&&(e.bio=t.bio),t.presence&&(e.presence=t.presence.toUpperCase()),t.discoverable!==void 0&&(e.discoverable=t.discoverable),t.interests&&(e.interests=m(t.interests)),t.skills&&(e.skills=m(t.skills)),t.avatarFileId&&(e.avatarFileId=t.avatarFileId);let o=await a(rt,{input:e});c(`Profile saved: ${o.comUpsertProfile.displayName}`),i(t,o.comUpsertProfile);}catch(e){r(e);}});}function yt(s){let n=s.command("feed").description("Comradecircle home feed & follows");n.command("home").description("The calling member's unified home feed").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(it,{pagination:{limit:t.limit,offset:t.offset}});i(t,e.comMyFeed.items,{headers:["ID","Channel","Author","Status","Comments","Reactions"],rows:e.comMyFeed.items.map(o=>[d(o.id,12),d(o.channelId,12),d(o.authorId,12),o.status,String(o.commentCount??0),String(o.reactionCount??0)])});}catch(e){r(e);}}),n.command("follows").description("List the calling member's follows").option("--target-type <t>","CIRCLE|CHANNEL|MEMBER").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(st,{targetType:t.targetType?t.targetType.toUpperCase():void 0});i(t,e.comMyFollows.items,{headers:["ID","Target","Target Type","Muted"],rows:e.comMyFollows.items.map(o=>[d(o.id,12),d(o.targetId,12),o.targetType,o.muted?"yes":"no"])});}catch(e){r(e);}}),n.command("follow").description("Follow a target (circle, channel, or member)").requiredOption("--target-id <id>","Target ID").requiredOption("--target-type <t>","CIRCLE|CHANNEL|MEMBER").option("-f, --format <format>","Output format").action(async t=>{try{let e={targetId:t.targetId,targetType:t.targetType.toUpperCase()},o=await a(at,{input:e});c(`Following ${o.comFollow.targetType} ${o.comFollow.targetId}`),i(t,o.comFollow);}catch(e){r(e);}}),n.command("unfollow").description("Unfollow a target").requiredOption("--target-id <id>","Target ID").requiredOption("--target-type <t>","CIRCLE|CHANNEL|MEMBER").option("-f, --format <format>","Output format").action(async t=>{try{let e={targetId:t.targetId,targetType:t.targetType.toUpperCase()},o=await a(ct,{input:e});c(`Unfollowed: ${o.comUnfollow}`),i(t,{unfollowed:o.comUnfollow});}catch(e){r(e);}}),n.command("mute").description("Mute or unmute a follow").argument("<id>","Follow ID").requiredOption("--muted <bool>","true|false",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(dt,{id:t,muted:e.muted});c(`Follow ${o.comMuteFollow.muted?"muted":"unmuted"}`),i(e,o.comMuteFollow);}catch(o){r(o);}});}function wt(s){s.command("health").description("Comradecircle service health check (public)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await w(pt);c(t.comHealth),i(n,{health:t.comHealth});}catch(t){r(t);}});}var $t={id:"comradecircle",version:"1.0.0",displayName:"Comradecircle",dependsOn:["auth","workspaces"],register(s,n){T(n);let t=s.command("comradecircle").description("Comradecircle community circles");lt(t),ut(t),mt(t),ft(t),gt(t),Ct(t),It(t),ht(t),yt(t),wt(t);}},So=$t;module.exports=So;
289
+ `;function u(s){let n=Number.parseInt(s,10);if(Number.isNaN(n))throw new p(`Expected an integer but got "${s}"`);return n}function m(s){return s.split(",").map(n=>n.trim()).filter(n=>n.length>0)}function lt(s){let n=s.command("circles").description("Comradecircle circles");n.command("list").description("List circles").option("--status <s>","ACTIVE|ARCHIVED|SUSPENDED").option("--visibility <v>","PUBLIC|PRIVATE|SECRET").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(A,{pagination:{limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0,visibility:t.visibility?t.visibility.toUpperCase():void 0});i(t,e.comListCircles.items,{headers:["ID","Name","Slug","Status","Visibility","Members"],rows:e.comListCircles.items.map(o=>[d(o.id,12),o.name,o.slug,o.status,o.visibility,String(o.memberCount??0)])});}catch(e){r(e);}}),n.command("get").description("Get a circle by id").argument("<id>","Circle ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(T,{id:t});if(!o.comCircle)throw new p(`Circle ${t} not found`);i(e,o.comCircle);}catch(o){r(o);}}),n.command("create").description("Create a circle").requiredOption("--name <name>","Circle name").requiredOption("--slug <slug>","URL slug").option("--description <s>","Description").option("--topic <s>","Topic").option("--visibility <v>","PUBLIC|PRIVATE|SECRET","PUBLIC").option("--tags <csv>","Comma-separated tags").option("--avatar-file-id <id>","Avatar file ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,slug:t.slug,visibility:(t.visibility??"PUBLIC").toUpperCase()};t.description&&(e.description=t.description),t.topic&&(e.topic=t.topic),t.tags&&(e.tags=m(t.tags)),t.avatarFileId&&(e.avatarFileId=t.avatarFileId);let o=await a(x,{input:e});c(`Circle created: ${o.comCreateCircle.name}`),i(t,o.comCreateCircle);}catch(e){r(e);}}),n.command("update").description("Update a circle").argument("<id>","Circle ID").option("--name <name>","Circle name").option("--description <s>","Description").option("--topic <s>","Topic").option("--visibility <v>","PUBLIC|PRIVATE|SECRET").option("--tags <csv>","Comma-separated tags").option("--avatar-file-id <id>","Avatar file ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.description!==void 0&&(o.description=e.description),e.topic!==void 0&&(o.topic=e.topic),e.visibility&&(o.visibility=e.visibility.toUpperCase()),e.tags&&(o.tags=m(e.tags)),e.avatarFileId&&(o.avatarFileId=e.avatarFileId),!Object.keys(o).length)throw new p("No updates specified");let f=await a(O,{id:t,input:o});c("Circle updated"),i(e,f.comUpdateCircle);}catch(o){r(o);}}),n.command("archive").description("Archive a circle").argument("<id>","Circle ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(P,{id:t});c(`Circle archived: ${o.comArchiveCircle}`),i(e,{archived:o.comArchiveCircle});}catch(o){r(o);}});}function ut(s){let n=s.command("channels").description("Comradecircle channels");n.command("list").description("List channels in a circle").requiredOption("--circle <id>","Circle ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(R,{circleId:t.circle});i(t,e.comListChannels.items,{headers:["ID","Name","Slug","Type","Visibility","Position"],rows:e.comListChannels.items.map(o=>[d(o.id,12),o.name,o.slug,o.type,o.visibility,String(o.position??0)])});}catch(e){r(e);}}),n.command("create").description("Create a channel").requiredOption("--circle <id>","Circle ID").requiredOption("--name <name>","Channel name").requiredOption("--slug <slug>","URL slug").option("--description <s>","Description").option("--type <t>","TEXT|VOICE|FORUM|ANNOUNCEMENT","TEXT").option("--visibility <v>","CIRCLE|PRIVATE","CIRCLE").option("--position <n>","Position",u).option("-f, --format <format>","Output format").action(async t=>{try{let e={circleId:t.circle,name:t.name,slug:t.slug,type:(t.type??"TEXT").toUpperCase(),visibility:(t.visibility??"CIRCLE").toUpperCase()};t.description&&(e.description=t.description),t.position!==void 0&&(e.position=t.position);let o=await a(L,{input:e});c(`Channel created: ${o.comCreateChannel.name}`),i(t,o.comCreateChannel);}catch(e){r(e);}}),n.command("update").description("Update a channel").argument("<id>","Channel ID").option("--name <name>","Channel name").option("--description <s>","Description").option("--type <t>","TEXT|VOICE|FORUM|ANNOUNCEMENT").option("--visibility <v>","CIRCLE|PRIVATE").option("--position <n>","Position",u).option("--archived <bool>","true|false",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.name&&(o.name=e.name),e.description!==void 0&&(o.description=e.description),e.type&&(o.type=e.type.toUpperCase()),e.visibility&&(o.visibility=e.visibility.toUpperCase()),e.position!==void 0&&(o.position=e.position),e.archived!==void 0&&(o.isArchived=e.archived),!Object.keys(o).length)throw new p("No updates specified");let f=await a(S,{id:t,input:o});c("Channel updated"),i(e,f.comUpdateChannel);}catch(o){r(o);}});}function mt(s){let n=s.command("memberships").description("Comradecircle circle memberships");n.command("list").description("List memberships").option("--circle <id>","Filter by circle ID").option("--status <s>","ACTIVE|PENDING|LEFT|BANNED").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a($,{circleId:t.circle,pagination:{limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0});i(t,e.comListMemberships.items,{headers:["ID","Circle","Member","Role","Status"],rows:e.comListMemberships.items.map(o=>[d(o.id,12),d(o.circleId,12),d(o.memberId,12),o.role,o.status])});}catch(e){r(e);}}),n.command("join").description("Join a circle as the calling member").requiredOption("--circle <id>","Circle ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(D,{circleId:t.circle});c(`Joined circle ${e.comJoinCircle.circleId}`),i(t,e.comJoinCircle);}catch(e){r(e);}}),n.command("leave").description("Leave a circle").requiredOption("--circle <id>","Circle ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(N,{circleId:t.circle});c(`Left circle: ${e.comLeaveCircle}`),i(t,{left:e.comLeaveCircle});}catch(e){r(e);}}),n.command("set-role").description("Set a member role").argument("<membershipId>","Membership ID").requiredOption("--role <r>","OWNER|ADMIN|MODERATOR|MEMBER").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(q,{membershipId:t,role:e.role.toUpperCase()});c(`Role set to ${o.comSetMemberRole.role}`),i(e,o.comSetMemberRole);}catch(o){r(o);}});}function ft(s){let n=s.command("posts").description("Comradecircle posts");n.command("list").description("List posts").option("--channel <id>","Filter by channel ID").option("--status <s>","DRAFT|PUBLISHED|HIDDEN|REMOVED").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(U,{channelId:t.channel,pagination:{limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0});i(t,e.comListPosts.items,{headers:["ID","Channel","Author","Status","Pinned","Comments","Reactions"],rows:e.comListPosts.items.map(o=>[d(o.id,12),d(o.channelId,12),d(o.authorId,12),o.status,o.isPinned?"yes":"no",String(o.commentCount??0),String(o.reactionCount??0)])});}catch(e){r(e);}}),n.command("get").description("Get a post by id").argument("<id>","Post ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(M,{id:t});if(!o.comPost)throw new p(`Post ${t} not found`);i(e,o.comPost);}catch(o){r(o);}}),n.command("create").description("Create a post").requiredOption("--channel <id>","Channel ID").requiredOption("--body <text>","Post body").option("--status <s>","DRAFT|PUBLISHED|HIDDEN|REMOVED","PUBLISHED").option("--tags <csv>","Comma-separated tags").option("--attachments <csv>","Comma-separated attachment file IDs").option("-f, --format <format>","Output format").action(async t=>{try{let e={channelId:t.channel,body:t.body,status:(t.status??"PUBLISHED").toUpperCase()};t.tags&&(e.tags=m(t.tags)),t.attachments&&(e.attachmentFileIds=m(t.attachments));let o=await a(_,{input:e});c(`Post created: ${o.comCreatePost.id}`),i(t,o.comCreatePost);}catch(e){r(e);}}),n.command("update").description("Update a post").argument("<id>","Post ID").option("--body <text>","Post body").option("--status <s>","DRAFT|PUBLISHED|HIDDEN|REMOVED").option("--pinned <bool>","true|false",t=>t==="true").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.body&&(o.body=e.body),e.status&&(o.status=e.status.toUpperCase()),e.pinned!==void 0&&(o.isPinned=e.pinned),e.tags&&(o.tags=m(e.tags)),!Object.keys(o).length)throw new p("No updates specified");let f=await a(F,{id:t,input:o});c("Post updated"),i(e,f.comUpdatePost);}catch(o){r(o);}}),n.command("remove").description("Remove a post").argument("<id>","Post ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(V,{id:t});c(`Post removed: ${o.comRemovePost}`),i(e,{removed:o.comRemovePost});}catch(o){r(o);}}),n.command("react").description("Toggle a reaction on a post").argument("<postId>","Post ID").requiredOption("--type <t>","LIKE|LOVE|CELEBRATE|INSIGHTFUL|SUPPORT|LAUGH").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(W,{postId:t,type:e.type.toUpperCase()});c(`Reaction toggled on post ${o.comReactToPost.id}`),i(e,o.comReactToPost);}catch(o){r(o);}});}function gt(s){let n=s.command("comments").description("Comradecircle post comments");n.command("list").description("List comments on a post").requiredOption("--post <id>","Post ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(G,{postId:t.post});i(t,e.comListComments.items,{headers:["ID","Author","Body","Parent","Hidden"],rows:e.comListComments.items.map(o=>[d(o.id,12),d(o.authorId,12),d(o.body,40),o.parentId?d(o.parentId,12):"-",o.isHidden?"yes":"no"])});}catch(e){r(e);}}),n.command("add").description("Add a comment to a post").requiredOption("--post <id>","Post ID").requiredOption("--body <text>","Comment body").option("--parent <id>","Parent comment ID (for replies)").option("-f, --format <format>","Output format").action(async t=>{try{let e={postId:t.post,body:t.body};t.parent&&(e.parentId=t.parent);let o=await a(H,{input:e});c(`Comment added: ${o.comAddComment.id}`),i(t,o.comAddComment);}catch(e){r(e);}});}function Ct(s){let n=s.command("events").description("Comradecircle events");n.command("list").description("List events").option("--circle <id>","Filter by circle ID").option("--status <s>","SCHEDULED|LIVE|COMPLETED|CANCELLED").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(B,{circleId:t.circle,pagination:{limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0});i(t,e.comListEvents.items,{headers:["ID","Title","Mode","Status","Starts","RSVPs"],rows:e.comListEvents.items.map(o=>[d(o.id,12),o.title,o.mode,o.status,E(o.startsAt),String(o.rsvpCount??0)])});}catch(e){r(e);}}),n.command("get").description("Get an event by id").argument("<id>","Event ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(j,{id:t});if(!o.comEvent)throw new p(`Event ${t} not found`);i(e,o.comEvent);}catch(o){r(o);}}),n.command("create").description("Create an event").requiredOption("--circle <id>","Circle ID").requiredOption("--title <t>","Event title").requiredOption("--starts-at <iso>","Start time (ISO date)").option("--description <s>","Description").option("--mode <m>","ONLINE|IN_PERSON|HYBRID","ONLINE").option("--location <s>","Location").option("--join-url <url>","Join URL").option("--capacity <n>","Capacity",u).option("--ends-at <iso>","End time (ISO date)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={circleId:t.circle,title:t.title,startsAt:t.startsAt,mode:(t.mode??"ONLINE").toUpperCase()};t.description&&(e.description=t.description),t.location&&(e.location=t.location),t.joinUrl&&(e.joinUrl=t.joinUrl),t.capacity!==void 0&&(e.capacity=t.capacity),t.endsAt&&(e.endsAt=t.endsAt),t.tags&&(e.tags=m(t.tags));let o=await a(J,{input:e});c(`Event created: ${o.comCreateEvent.title}`),i(t,o.comCreateEvent);}catch(e){r(e);}}),n.command("update").description("Update an event").argument("<id>","Event ID").option("--title <t>","Event title").option("--description <s>","Description").option("--mode <m>","ONLINE|IN_PERSON|HYBRID").option("--location <s>","Location").option("--join-url <url>","Join URL").option("--capacity <n>","Capacity",u).option("--starts-at <iso>","Start time (ISO date)").option("--ends-at <iso>","End time (ISO date)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o={};if(e.title&&(o.title=e.title),e.description!==void 0&&(o.description=e.description),e.mode&&(o.mode=e.mode.toUpperCase()),e.location!==void 0&&(o.location=e.location),e.joinUrl!==void 0&&(o.joinUrl=e.joinUrl),e.capacity!==void 0&&(o.capacity=e.capacity),e.startsAt&&(o.startsAt=e.startsAt),e.endsAt&&(o.endsAt=e.endsAt),e.tags&&(o.tags=m(e.tags)),!Object.keys(o).length)throw new p("No updates specified");let f=await a(z,{id:t,input:o});c("Event updated"),i(e,f.comUpdateEvent);}catch(o){r(o);}}),n.command("transition").description("Advance an event through its lifecycle").argument("<id>","Event ID").requiredOption("--status <s>","SCHEDULED|LIVE|COMPLETED|CANCELLED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(Y,{id:t,status:e.status.toUpperCase()});c(`Event transitioned to ${o.comTransitionEvent.status}`),i(e,o.comTransitionEvent);}catch(o){r(o);}}),n.command("rsvp").description("RSVP to an event as the calling member").argument("<eventId>","Event ID").requiredOption("--status <s>","GOING|INTERESTED|NOT_GOING|WAITLISTED").option("--note <s>","RSVP note").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(K,{eventId:t,status:e.status.toUpperCase(),note:e.note});c(`RSVP saved: ${o.comRsvpEvent.status}`),i(e,o.comRsvpEvent);}catch(o){r(o);}});}function It(s){let n=s.command("polls").description("Comradecircle polls");n.command("list").description("List polls in a circle").requiredOption("--circle <id>","Circle ID").option("--status <s>","OPEN|CLOSED").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(X,{circleId:t.circle,status:t.status?t.status.toUpperCase():void 0});i(t,e.comListPolls.items,{headers:["ID","Question","Status","Anonymous","Multiple"],rows:e.comListPolls.items.map(o=>[d(o.id,12),d(o.question,40),o.status,o.isAnonymous?"yes":"no",o.allowMultiple?"yes":"no"])});}catch(e){r(e);}}),n.command("get").description("Get a poll by id").argument("<id>","Poll ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(Q,{id:t});if(!o.comPoll)throw new p(`Poll ${t} not found`);i(e,o.comPoll);}catch(o){r(o);}}),n.command("create").description("Create a poll").requiredOption("--circle <id>","Circle ID").requiredOption("--question <q>","Poll question").requiredOption("--options <csv>","Comma-separated option labels").option("--allow-multiple","Allow multiple selections").option("--anonymous","Anonymous voting").option("--closes-at <iso>","Close time (ISO date)").option("-f, --format <format>","Output format").action(async t=>{try{let e=m(t.options);if(e.length===0)throw new p("--options must contain at least one option");let o={circleId:t.circle,question:t.question,options:e,allowMultiple:t.allowMultiple??!1,isAnonymous:t.anonymous??!1};t.closesAt&&(o.closesAt=t.closesAt);let f=await a(Z,{input:o});c(`Poll created: ${f.comCreatePoll.id}`),i(t,f.comCreatePoll);}catch(e){r(e);}}),n.command("close").description("Close a poll").argument("<id>","Poll ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(tt,{id:t});c(`Poll closed: ${o.comClosePoll.status}`),i(e,o.comClosePoll);}catch(o){r(o);}}),n.command("vote").description("Cast a vote for a poll option").argument("<pollId>","Poll ID").requiredOption("--option <id>","Option ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(et,{pollId:t,optionId:e.option});c(`Voted: ${o.comVotePoll.label} (${o.comVotePoll.voteCount})`),i(e,o.comVotePoll);}catch(o){r(o);}});}function ht(s){let n=s.command("profiles").description("Comradecircle member profiles");n.command("list").description("List member profiles").option("--discoverable <bool>","true|false",t=>t==="true").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(nt,{discoverable:t.discoverable,pagination:{limit:t.limit,offset:t.offset}});i(t,e.comListProfiles.items,{headers:["ID","Member","Display Name","Headline","Presence","Discoverable"],rows:e.comListProfiles.items.map(o=>[d(o.id,12),d(o.memberId,12),o.displayName,d(o.headline??"-",30),o.presence??"-",o.discoverable?"yes":"no"])});}catch(e){r(e);}}),n.command("get").description("Get a member profile by member id").argument("<memberId>","Member ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(ot,{memberId:t});if(!o.comProfile)throw new p(`Profile for member ${t} not found`);i(e,o.comProfile);}catch(o){r(o);}}),n.command("upsert").description("Create or update the calling member's profile").requiredOption("--display-name <name>","Display name").option("--headline <s>","Headline").option("--bio <s>","Bio").option("--presence <p>","ONLINE|AWAY|BUSY|OFFLINE").option("--discoverable <bool>","true|false",t=>t==="true").option("--interests <csv>","Comma-separated interests").option("--skills <csv>","Comma-separated skills").option("--avatar-file-id <id>","Avatar file ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={displayName:t.displayName};t.headline&&(e.headline=t.headline),t.bio&&(e.bio=t.bio),t.presence&&(e.presence=t.presence.toUpperCase()),t.discoverable!==void 0&&(e.discoverable=t.discoverable),t.interests&&(e.interests=m(t.interests)),t.skills&&(e.skills=m(t.skills)),t.avatarFileId&&(e.avatarFileId=t.avatarFileId);let o=await a(rt,{input:e});c(`Profile saved: ${o.comUpsertProfile.displayName}`),i(t,o.comUpsertProfile);}catch(e){r(e);}});}function yt(s){let n=s.command("feed").description("Comradecircle home feed & follows");n.command("home").description("The calling member's unified home feed").option("--limit <n>","Page size",u,50).option("--offset <n>","Offset",u,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(it,{pagination:{limit:t.limit,offset:t.offset}});i(t,e.comMyFeed.items,{headers:["ID","Channel","Author","Status","Comments","Reactions"],rows:e.comMyFeed.items.map(o=>[d(o.id,12),d(o.channelId,12),d(o.authorId,12),o.status,String(o.commentCount??0),String(o.reactionCount??0)])});}catch(e){r(e);}}),n.command("follows").description("List the calling member's follows").option("--target-type <t>","CIRCLE|CHANNEL|MEMBER").option("-f, --format <format>","Output format").action(async t=>{try{let e=await a(st,{targetType:t.targetType?t.targetType.toUpperCase():void 0});i(t,e.comMyFollows.items,{headers:["ID","Target","Target Type","Muted"],rows:e.comMyFollows.items.map(o=>[d(o.id,12),d(o.targetId,12),o.targetType,o.muted?"yes":"no"])});}catch(e){r(e);}}),n.command("follow").description("Follow a target (circle, channel, or member)").requiredOption("--target-id <id>","Target ID").requiredOption("--target-type <t>","CIRCLE|CHANNEL|MEMBER").option("-f, --format <format>","Output format").action(async t=>{try{let e={targetId:t.targetId,targetType:t.targetType.toUpperCase()},o=await a(at,{input:e});c(`Following ${o.comFollow.targetType} ${o.comFollow.targetId}`),i(t,o.comFollow);}catch(e){r(e);}}),n.command("unfollow").description("Unfollow a target").requiredOption("--target-id <id>","Target ID").requiredOption("--target-type <t>","CIRCLE|CHANNEL|MEMBER").option("-f, --format <format>","Output format").action(async t=>{try{let e={targetId:t.targetId,targetType:t.targetType.toUpperCase()},o=await a(ct,{input:e});c(`Unfollowed: ${o.comUnfollow}`),i(t,{unfollowed:o.comUnfollow});}catch(e){r(e);}}),n.command("mute").description("Mute or unmute a follow").argument("<id>","Follow ID").requiredOption("--muted <bool>","true|false",t=>t==="true").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let o=await a(dt,{id:t,muted:e.muted});c(`Follow ${o.comMuteFollow.muted?"muted":"unmuted"}`),i(e,o.comMuteFollow);}catch(o){r(o);}});}function wt(s){s.command("health").description("Comradecircle service health check (public)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await w(pt);c(t.comHealth),i(n,{health:t.comHealth});}catch(t){r(t);}});}var $t={id:"comradecircle",version:"1.0.0",displayName:"Comradecircle",dependsOn:["auth","workspaces"],register(s,n){k(n);let t=s.command("comradecircle").description("Comradecircle community circles");lt(t),ut(t),mt(t),ft(t),gt(t),Ct(t),It(t),ht(t),yt(t),wt(t);}},So=$t;module.exports=So;
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.cjs';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.cjs';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.js';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.js';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import {a,b as b$1,i,r,h as h$1,k as k$1,q as q$2,d as d$1}from'../../chunk-WTNQ5PEC.js';import {q as q$1}from'../../chunk-MT2F54AC.js';var h=`
1
+ import {a,b as b$1,i,r,h as h$1,k as k$1,q as q$2,d as d$1}from'../../chunk-3ZVMC2AF.js';import {q as q$1}from'../../chunk-ZT6KOG7N.js';var h=`
2
2
  query ComradecircleCircle($id: ID!) {
3
3
  comCircle(id: $id) {
4
4
  id name slug description topic status visibility tags memberCount