@burdenoff/cli-sdk 2026.1021.1 → 2026.1031.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 (95) hide show
  1. package/dist/{chunk-NLEVVDXR.js → chunk-SQSFZFQZ.js} +1 -1
  2. package/dist/{chunk-IZXPWPKX.js → chunk-UAFYTYK6.js} +7 -7
  3. package/dist/core/index.cjs +7 -7
  4. package/dist/core/index.js +1 -1
  5. package/dist/index.cjs +7 -7
  6. package/dist/index.js +1 -1
  7. package/dist/modules/adaptercloud/index.js +1 -1
  8. package/dist/modules/artistrybase/index.cjs +3 -3
  9. package/dist/modules/artistrybase/index.js +1 -1
  10. package/dist/modules/assethandler/index.cjs +1 -1
  11. package/dist/modules/assethandler/index.js +1 -1
  12. package/dist/modules/atheletebridge/index.cjs +6 -6
  13. package/dist/modules/atheletebridge/index.js +1 -1
  14. package/dist/modules/auth/index.cjs +39 -17
  15. package/dist/modules/auth/index.js +42 -20
  16. package/dist/modules/billing/index.js +1 -1
  17. package/dist/modules/brainyrich/index.cjs +2 -2
  18. package/dist/modules/brainyrich/index.js +1 -1
  19. package/dist/modules/buildmyiq/index.cjs +1 -1
  20. package/dist/modules/buildmyiq/index.js +1 -1
  21. package/dist/modules/channels/index.cjs +13 -14
  22. package/dist/modules/channels/index.js +11 -12
  23. package/dist/modules/collabkin/index.js +1 -1
  24. package/dist/modules/comradecircle/index.cjs +3 -3
  25. package/dist/modules/comradecircle/index.js +1 -1
  26. package/dist/modules/conversations/index.cjs +1 -1
  27. package/dist/modules/conversations/index.js +5 -5
  28. package/dist/modules/coolandlovely/index.js +1 -1
  29. package/dist/modules/cosmicintersection/index.cjs +4 -4
  30. package/dist/modules/cosmicintersection/index.js +1 -1
  31. package/dist/modules/crewfoundry/index.cjs +4 -4
  32. package/dist/modules/crewfoundry/index.js +1 -1
  33. package/dist/modules/devportal/index.cjs +3 -3
  34. package/dist/modules/devportal/index.js +1 -1
  35. package/dist/modules/ecoimpacthub/index.js +1 -1
  36. package/dist/modules/eventfullymanaged/index.js +1 -1
  37. package/dist/modules/export/index.cjs +2 -2
  38. package/dist/modules/export/index.js +1 -1
  39. package/dist/modules/files/index.cjs +4 -4
  40. package/dist/modules/files/index.js +1 -1
  41. package/dist/modules/fluidgrids/index.js +1 -1
  42. package/dist/modules/ggnomad/index.cjs +3 -3
  43. package/dist/modules/ggnomad/index.js +1 -1
  44. package/dist/modules/govcitizenhub/index.cjs +2 -2
  45. package/dist/modules/govcitizenhub/index.js +1 -1
  46. package/dist/modules/groups/index.cjs +16 -15
  47. package/dist/modules/groups/index.js +15 -14
  48. package/dist/modules/headshotmarketing/index.js +1 -1
  49. package/dist/modules/hookmovies/index.js +1 -1
  50. package/dist/modules/housingvista/index.cjs +6 -6
  51. package/dist/modules/housingvista/index.js +1 -1
  52. package/dist/modules/integrations/index.cjs +1 -1
  53. package/dist/modules/integrations/index.js +1 -1
  54. package/dist/modules/intelwatchtower/index.cjs +3 -3
  55. package/dist/modules/intelwatchtower/index.js +1 -1
  56. package/dist/modules/kadaikodi/index.js +1 -1
  57. package/dist/modules/labsofscience/index.cjs +3 -3
  58. package/dist/modules/labsofscience/index.js +1 -1
  59. package/dist/modules/manufacturedops/index.js +1 -1
  60. package/dist/modules/movethewheels/index.js +1 -1
  61. package/dist/modules/mybodyshield/index.cjs +4 -4
  62. package/dist/modules/mybodyshield/index.js +1 -1
  63. package/dist/modules/notifications/index.cjs +2 -2
  64. package/dist/modules/notifications/index.js +1 -1
  65. package/dist/modules/organizations/index.js +1 -1
  66. package/dist/modules/planmagnet/index.js +1 -1
  67. package/dist/modules/products/index.cjs +5 -5
  68. package/dist/modules/products/index.js +5 -5
  69. package/dist/modules/proserviceworld/index.js +1 -1
  70. package/dist/modules/rbac/index.cjs +8 -19
  71. package/dist/modules/rbac/index.js +6 -17
  72. package/dist/modules/sandbox/index.cjs +3 -3
  73. package/dist/modules/sandbox/index.js +1 -1
  74. package/dist/modules/scheduler/index.cjs +4 -4
  75. package/dist/modules/scheduler/index.js +1 -1
  76. package/dist/modules/security/index.cjs +2 -2
  77. package/dist/modules/security/index.js +1 -1
  78. package/dist/modules/semanticfed/index.js +1 -1
  79. package/dist/modules/store/index.cjs +2 -2
  80. package/dist/modules/store/index.js +1 -1
  81. package/dist/modules/subscriberbot/index.js +1 -1
  82. package/dist/modules/support/index.js +1 -1
  83. package/dist/modules/tags/index.cjs +2 -2
  84. package/dist/modules/tags/index.js +1 -1
  85. package/dist/modules/technospam/index.cjs +2 -2
  86. package/dist/modules/technospam/index.js +1 -1
  87. package/dist/modules/theculturepost/index.js +1 -1
  88. package/dist/modules/theglobalfuel/index.js +1 -1
  89. package/dist/modules/timecampus/index.js +1 -1
  90. package/dist/modules/tours/index.cjs +2 -2
  91. package/dist/modules/tours/index.js +1 -1
  92. package/dist/modules/vibecontrols/index.js +1 -1
  93. package/dist/modules/workspaces/index.cjs +10 -10
  94. package/dist/modules/workspaces/index.js +12 -12
  95. package/package.json +1 -1
@@ -1,70 +1,69 @@
1
- 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var l=class extends Error{exitCode;hint;constructor(o,p){super(o),this.name="CliUserError",this.exitCode=p?.exitCode??1,this.hint=p?.hint;}};var d=class extends Error{cause;constructor(o,p){super(o),this.name="CliInternalError",this.cause=p;}};var h=null;function E(r){h=r;}function g(){if(!h)throw new d("vibecontrols module helpers used before setHelpersContext was called");return h}async function a(r,o){return g().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,p){g().output.formatAndOutput(r,o,p);}function f(r){g().output.printSuccess(r);}function C(r){return g().output.formatStatus(r)}function I(r){return g().output.formatDate(r)}function w(r,o){return g().output.truncate(r,o)}function T(){return g()}var b=`
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 I(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 b(){return p()}var v=`
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 }
5
5
  total hasMore
6
6
  }
7
7
  }
8
- `,v=`
8
+ `,A=`
9
9
  query GetChannel($id: ID!) {
10
10
  getChannel(id: $id) {
11
11
  id name platform adapterType status channelType
12
12
  connection { id authType isActive isHealthy }
13
13
  }
14
14
  }
15
- `,A=`
15
+ `,O=`
16
16
  mutation CreateChannel($input: CreateChannelInput!) {
17
17
  createChannel(input: $input) {
18
18
  id name platform adapterType status
19
19
  }
20
20
  }
21
- `,O=`
21
+ `,S=`
22
22
  mutation DeleteChannel($id: ID!) {
23
23
  deleteChannel(id: $id)
24
24
  }
25
- `,S=`
25
+ `,N=`
26
26
  mutation SendChannelMessage($input: SendMessageInput!) {
27
27
  sendMessage(input: $input) {
28
- success messageId status sentAt
29
- error { code message retryable }
28
+ success messageId attemptId willRetry nextRetryAt error
30
29
  }
31
30
  }
32
- `,N=`
31
+ `,$=`
33
32
  query GetChannelDeliveryAttempts($channelId: ID!, $cursor: String, $limit: Int) {
34
33
  getChannelDeliveryAttempts(channelId: $channelId, cursor: $cursor, limit: $limit) {
35
34
  items { id channelId status sentAt retryCount errorMessage }
36
35
  total hasMore
37
36
  }
38
37
  }
39
- `,$=`
38
+ `,D=`
40
39
  query ListChannelUsers($channelId: ID!, $pagination: ChannelPaginationInput) {
41
40
  listUserPlatformConnectionsByChannel(channelId: $channelId, pagination: $pagination) {
42
41
  items { id externalUserId externalDisplayName platform dmAllowed presenceStatus }
43
42
  total hasMore
44
43
  }
45
44
  }
46
- `,D=`
45
+ `,L=`
47
46
  query GetChannelWebhookEvents($channelId: ID!, $cursor: String, $limit: Int) {
48
47
  getChannelWebhookEvents(channelId: $channelId, cursor: $cursor, limit: $limit) {
49
48
  items { id eventType status createdAt }
50
49
  total hasMore
51
50
  }
52
51
  }
53
- `,L=`
52
+ `,R=`
54
53
  query GetConnectionsByOrg($organizationId: ID!, $pagination: ChannelPaginationInput) {
55
54
  getConnectionsByOrganization(organizationId: $organizationId, pagination: $pagination) {
56
55
  items { id channelId authType tokenExpiresAt isActive isHealthy }
57
56
  total hasMore
58
57
  }
59
58
  }
60
- `,R=`
59
+ `,_=`
61
60
  mutation CreateChannelConnection($input: CreateConnectionInput!) {
62
61
  createConnection(input: $input) {
63
62
  id channelId authType isActive
64
63
  }
65
64
  }
66
- `,_=`
65
+ `,P=`
67
66
  mutation DeleteChannelConnection($id: ID!) {
68
67
  deleteConnection(id: $id)
69
68
  }
70
- `;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(b,{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,C(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(A,{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(O,{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(S,{input:n});i.sendMessage.success&&f(`Sent: ${i.sendMessage.messageId??"(no id)"}`),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(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,C(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(R,{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 Y={id:"channels",version:"1.0.0",displayName:"Channels",dependsOn:["auth"],register(r,o){E(o),P(r);}},it=Y;module.exports=it;
69
+ `;function q(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(v,{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(A,{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??b().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($,{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(D,{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(L,{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(R,{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(_,{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){I(o),q(r);}},st=J;module.exports=st;
@@ -1,42 +1,41 @@
1
- import {a,c,h,p,n,g,s,i,o as o$1}from'../../chunk-NLEVVDXR.js';import {o}from'../../chunk-IZXPWPKX.js';var y=`
1
+ import {a,c,h,p,n,g,s,i,l,o as o$1}from'../../chunk-SQSFZFQZ.js';import {o}from'../../chunk-UAFYTYK6.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 }
5
5
  total hasMore
6
6
  }
7
7
  }
8
- `,I=`
8
+ `,N=`
9
9
  query GetChannel($id: ID!) {
10
10
  getChannel(id: $id) {
11
11
  id name platform adapterType status channelType
12
12
  connection { id authType isActive isHealthy }
13
13
  }
14
14
  }
15
- `,N=`
15
+ `,A=`
16
16
  mutation CreateChannel($input: CreateChannelInput!) {
17
17
  createChannel(input: $input) {
18
18
  id name platform adapterType status
19
19
  }
20
20
  }
21
- `,A=`
21
+ `,T=`
22
22
  mutation DeleteChannel($id: ID!) {
23
23
  deleteChannel(id: $id)
24
24
  }
25
- `,T=`
25
+ `,_=`
26
26
  mutation SendChannelMessage($input: SendMessageInput!) {
27
27
  sendMessage(input: $input) {
28
- success messageId status sentAt
29
- error { code message retryable }
28
+ success messageId attemptId willRetry nextRetryAt error
30
29
  }
31
30
  }
32
- `,_=`
31
+ `,S=`
33
32
  query GetChannelDeliveryAttempts($channelId: ID!, $cursor: String, $limit: Int) {
34
33
  getChannelDeliveryAttempts(channelId: $channelId, cursor: $cursor, limit: $limit) {
35
34
  items { id channelId status sentAt retryCount errorMessage }
36
35
  total hasMore
37
36
  }
38
37
  }
39
- `,S=`
38
+ `,$=`
40
39
  query ListChannelUsers($channelId: ID!, $pagination: ChannelPaginationInput) {
41
40
  listUserPlatformConnectionsByChannel(channelId: $channelId, pagination: $pagination) {
42
41
  items { id externalUserId externalDisplayName platform dmAllowed presenceStatus }
@@ -50,7 +49,7 @@ import {a,c,h,p,n,g,s,i,o as o$1}from'../../chunk-NLEVVDXR.js';import {o}from'..
50
49
  total hasMore
51
50
  }
52
51
  }
53
- `,$=`
52
+ `,w=`
54
53
  query GetConnectionsByOrg($organizationId: ID!, $pagination: ChannelPaginationInput) {
55
54
  getConnectionsByOrganization(organizationId: $organizationId, pagination: $pagination) {
56
55
  items { id channelId authType tokenExpiresAt isActive isHealthy }
@@ -63,8 +62,8 @@ import {a,c,h,p,n,g,s,i,o as o$1}from'../../chunk-NLEVVDXR.js';import {o}from'..
63
62
  id channelId authType isActive
64
63
  }
65
64
  }
66
- `,w=`
65
+ `,D=`
67
66
  mutation DeleteChannelConnection($id: ID!) {
68
67
  deleteConnection(id: $id)
69
68
  }
70
- `;function H(m){let r=m.command("channels").description("Multi-platform message channels (email/SMS/Slack/etc.)");r.command("list").description("List channels").option("--platform <p>").option("--status <s>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let n$1={};t.platform&&(n$1.platform=t.platform.toUpperCase()),t.status&&(n$1.status=t.status.toUpperCase());let e=await c(y,{filter:Object.keys(n$1).length?n$1:void 0,pagination:{limit:t.limit,offset:0}});h(t,e.getChannels.items,{headers:["ID","Name","Platform","Status","Priority"],rows:e.getChannels.items.map(a=>[p(a.id,12),a.name,a.platform,n(a.status),String(a.priority??"-")])});}catch(n){g(n);}}),r.command("get").description("Get a channel").argument("<id>").option("-f, --format <format>").action(async(t,n)=>{try{let e=await c(I,{id:t});if(!e.getChannel)throw new o(`Channel ${t} not found`);h(n,e.getChannel);}catch(e){g(e);}}),r.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 t=>{try{let n=t.organization??s().auth.read()?.organizationId;if(!n)throw new o("No organization context. Pass --organization <id> or set auth.organizationId.");let e={name:t.name,platform:t.platform.toUpperCase(),organizationId:n,adapterType:t.adapter?t.adapter.toUpperCase():void 0},a=await c(N,{input:e});i("Channel created"),h(t,a.createChannel);}catch(n){g(n);}}),r.command("delete").description("Delete a channel").argument("<id>").action(async t=>{try{await c(A,{id:t}),i("Channel deleted");}catch(n){g(n);}}),r.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(t,n)=>{try{let e={channelId:t,content:n.content,recipientId:n.recipient,subject:n.subject},a=await c(T,{input:e});a.sendMessage.success&&i(`Sent: ${a.sendMessage.messageId??"(no id)"}`),h(n,a.sendMessage);}catch(e){g(e);}}),r.command("deliveries").description("Recent delivery attempts for a channel").argument("<channelId>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,n)=>{try{let e=await c(_,{channelId:t,limit:n.limit});h(n,e.getChannelDeliveryAttempts.items);}catch(e){g(e);}}),r.command("users").description("Users connected to this channel").argument("<channelId>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,n)=>{try{let e=await c(S,{channelId:t,pagination:{limit:n.limit,offset:0}});h(n,e.listUserPlatformConnectionsByChannel.items);}catch(e){g(e);}}),r.command("webhooks").description("Channel webhook events").command("list").description("List webhook events for a channel").argument("<channelId>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,n$1)=>{try{let e=await c(O,{channelId:t,limit:n$1.limit});h(n$1,e.getChannelWebhookEvents.items,{headers:["ID","Event","Status","When"],rows:e.getChannelWebhookEvents.items.map(a=>[p(a.id,12),a.eventType,n(a.status),o$1(a.createdAt)])});}catch(e){g(e);}});let l=r.command("connections").description("Channel connections (OAuth/API keys)");l.command("list").description("List connections for an organization").requiredOption("--organization <id>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let n=await c($,{organizationId:t.organization,pagination:{limit:t.limit,offset:0}});h(t,n.getConnectionsByOrganization.items);}catch(n){g(n);}}),l.command("create").description("Create a channel connection").requiredOption("--channel <id>").requiredOption("--auth-type <t>","OAUTH|API_KEY|WEBHOOK").option("-f, --format <format>").action(async t=>{try{let n={channelId:t.channel,authType:t.authType.toUpperCase()},e=await c(L,{input:n});i("Connection created"),h(t,e.createConnection);}catch(n){g(n);}}),l.command("delete").description("Delete a connection").argument("<id>").action(async t=>{try{await c(w,{id:t}),i("Connection deleted");}catch(n){g(n);}});}var D={id:"channels",version:"1.0.0",displayName:"Channels",dependsOn:["auth"],register(m,r){a(r),H(m);}},P=D;export{P as default};
69
+ `;function H(l$1){let r=l$1.command("channels").description("Multi-platform message channels (email/SMS/Slack/etc.)");r.command("list").description("List channels").option("--platform <p>").option("--status <s>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let n$1={};t.platform&&(n$1.platform=t.platform.toUpperCase()),t.status&&(n$1.status=t.status.toUpperCase());let e=await c(I,{filter:Object.keys(n$1).length?n$1:void 0,pagination:{limit:t.limit,offset:0}});h(t,e.getChannels.items,{headers:["ID","Name","Platform","Status","Priority"],rows:e.getChannels.items.map(a=>[p(a.id,12),a.name,a.platform,n(a.status),String(a.priority??"-")])});}catch(n){g(n);}}),r.command("get").description("Get a channel").argument("<id>").option("-f, --format <format>").action(async(t,n)=>{try{let e=await c(N,{id:t});if(!e.getChannel)throw new o(`Channel ${t} not found`);h(n,e.getChannel);}catch(e){g(e);}}),r.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 t=>{try{let n=t.organization??s().auth.read()?.organizationId;if(!n)throw new o("No organization context. Pass --organization <id> or set auth.organizationId.");let e={name:t.name,platform:t.platform.toUpperCase(),organizationId:n,adapterType:t.adapter?t.adapter.toUpperCase():void 0},a=await c(A,{input:e});i("Channel created"),h(t,a.createChannel);}catch(n){g(n);}}),r.command("delete").description("Delete a channel").argument("<id>").action(async t=>{try{await c(T,{id:t}),i("Channel deleted");}catch(n){g(n);}}),r.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(t,n)=>{try{let e={channelId:t,content:n.content,recipientId:n.recipient,subject:n.subject},a=await c(_,{input:e});a.sendMessage.success?i(`Sent: ${a.sendMessage.messageId??"(no id)"}`):a.sendMessage.willRetry?l(`Delivery failed, will retry: ${a.sendMessage.error??"unknown error"}`):l(`Delivery failed: ${a.sendMessage.error??"unknown error"}`),h(n,a.sendMessage);}catch(e){g(e);}}),r.command("deliveries").description("Recent delivery attempts for a channel").argument("<channelId>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,n)=>{try{let e=await c(S,{channelId:t,limit:n.limit});h(n,e.getChannelDeliveryAttempts.items);}catch(e){g(e);}}),r.command("users").description("Users connected to this channel").argument("<channelId>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,n)=>{try{let e=await c($,{channelId:t,pagination:{limit:n.limit,offset:0}});h(n,e.listUserPlatformConnectionsByChannel.items);}catch(e){g(e);}}),r.command("webhooks").description("Channel webhook events").command("list").description("List webhook events for a channel").argument("<channelId>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,n$1)=>{try{let e=await c(O,{channelId:t,limit:n$1.limit});h(n$1,e.getChannelWebhookEvents.items,{headers:["ID","Event","Status","When"],rows:e.getChannelWebhookEvents.items.map(a=>[p(a.id,12),a.eventType,n(a.status),o$1(a.createdAt)])});}catch(e){g(e);}});let m=r.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",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let n=await c(w,{organizationId:t.organization,pagination:{limit:t.limit,offset:0}});h(t,n.getConnectionsByOrganization.items);}catch(n){g(n);}}),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 t=>{try{let n={channelId:t.channel,authType:t.authType.toUpperCase()},e=await c(L,{input:n});i("Connection created"),h(t,e.createConnection);}catch(n){g(n);}}),m.command("delete").description("Delete a connection").argument("<id>").action(async t=>{try{await c(D,{id:t}),i("Connection deleted");}catch(n){g(n);}});}var M={id:"channels",version:"1.0.0",displayName:"Channels",dependsOn:["auth"],register(l,r){a(r),H(l);}},U=M;export{U as default};
@@ -1,4 +1,4 @@
1
- import {a,b as b$1,h as h$1,p,g,i,o as o$1,d}from'../../chunk-NLEVVDXR.js';import {o}from'../../chunk-IZXPWPKX.js';var D=`
1
+ import {a,b as b$1,h as h$1,p,g,i,o as o$1,d}from'../../chunk-SQSFZFQZ.js';import {o}from'../../chunk-UAFYTYK6.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
@@ -19,13 +19,13 @@
19
19
  pageInfo { cursor hasMore }
20
20
  }
21
21
  }
22
- `,x=`
22
+ `,O=`
23
23
  mutation ComradecircleCreateCircle($input: ComCreateCircleInput!) {
24
24
  comCreateCircle(input: $input) {
25
25
  id name slug description topic status visibility tags memberCount createdAt
26
26
  }
27
27
  }
28
- `,O=`
28
+ `,x=`
29
29
  mutation ComradecircleUpdateCircle($id: ID!, $input: ComUpdateCircleInput!) {
30
30
  comUpdateCircle(id: $id, input: $input) {
31
31
  id name slug description topic status visibility tags updatedAt
@@ -278,4 +278,4 @@
278
278
  query ComradecircleHealth {
279
279
  comHealth
280
280
  }
281
- `;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,{headers:["ID","Name","Slug","Type","Visibility","Position"],rows:e.comListChannels.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(U,{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(_,{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(q,{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(H,{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(W,{postId:t.post});i(t,e.comListComments,{headers:["ID","Author","Body","Parent","Hidden"],rows:e.comListComments.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(j,{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(G,{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,{headers:["ID","Question","Status","Anonymous","Multiple"],rows:e.comListPolls.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,{headers:["ID","Target","Target Type","Muted"],rows:e.comMyFollows.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);}},Lo=$t;module.exports=Lo;
281
+ `;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(O,{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(x,{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,{headers:["ID","Name","Slug","Type","Visibility","Position"],rows:e.comListChannels.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(U,{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(_,{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(q,{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(H,{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(W,{postId:t.post});i(t,e.comListComments,{headers:["ID","Author","Body","Parent","Hidden"],rows:e.comListComments.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(j,{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(G,{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,{headers:["ID","Question","Status","Anonymous","Multiple"],rows:e.comListPolls.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,{headers:["ID","Target","Target Type","Muted"],rows:e.comMyFollows.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);}},Lo=$t;module.exports=Lo;
@@ -1,4 +1,4 @@
1
- import {a,b as b$1,h as h$1,p,g,i,o as o$1,d as d$1}from'../../chunk-NLEVVDXR.js';import {o}from'../../chunk-IZXPWPKX.js';var h=`
1
+ import {a,b as b$1,h as h$1,p,g,i,o as o$1,d as d$1}from'../../chunk-SQSFZFQZ.js';import {o}from'../../chunk-UAFYTYK6.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
@@ -8,7 +8,7 @@
8
8
  `,T=`
9
9
  query GetConversation($id: ID!) {
10
10
  conversation(id: $id) {
11
- id title type description avatarUrl settings
11
+ id title type description avatar settings
12
12
  createdAt updatedAt
13
13
  }
14
14
  }
@@ -1,4 +1,4 @@
1
- import {a,b as b$1,h as h$1,p,o,g,s,i}from'../../chunk-NLEVVDXR.js';import {o as o$1}from'../../chunk-IZXPWPKX.js';var l=`
1
+ import {a,b as b$1,h as h$1,p,o,g,s,i}from'../../chunk-SQSFZFQZ.js';import {o as o$1}from'../../chunk-UAFYTYK6.js';var l=`
2
2
  query ListConversations($filter: ConversationFilter, $first: Int, $after: String) {
3
3
  conversations(filter: $filter, first: $first, after: $after) {
4
4
  edges { node { id title type description createdAt updatedAt unreadCount } }
@@ -8,7 +8,7 @@ import {a,b as b$1,h as h$1,p,o,g,s,i}from'../../chunk-NLEVVDXR.js';import {o as
8
8
  `,R=`
9
9
  query GetConversation($id: ID!) {
10
10
  conversation(id: $id) {
11
- id title type description avatarUrl settings
11
+ id title type description avatar settings
12
12
  createdAt updatedAt
13
13
  }
14
14
  }
@@ -77,13 +77,13 @@ import {a,b as b$1,h as h$1,p,o,g,s,i}from'../../chunk-NLEVVDXR.js';import {o as
77
77
  mutation DeleteDraft($conversationId: ID!) {
78
78
  deleteDraft(conversationId: $conversationId) { success conversationId }
79
79
  }
80
- `,U=`
80
+ `,V=`
81
81
  mutation AddReaction($messageId: ID!, $emoji: String!) {
82
82
  addReaction(messageId: $messageId, emoji: $emoji) {
83
83
  id messageId userId emoji createdAt
84
84
  }
85
85
  }
86
- `,V=`
86
+ `,U=`
87
87
  mutation RemoveReaction($messageId: ID!, $emoji: String!) {
88
88
  removeReaction(messageId: $messageId, emoji: $emoji) { success messageId emoji }
89
89
  }
@@ -152,4 +152,4 @@ import {a,b as b$1,h as h$1,p,o,g,s,i}from'../../chunk-NLEVVDXR.js';import {o as
152
152
  conversation { id title type }
153
153
  }
154
154
  }
155
- `;function Q(d){let o$2=d.command("conversations").description("Conversation management");o$2.command("list").description("List conversations").option("--type <t>","Filter by type (DIRECT|GROUP|CHANNEL)").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>").action(async n=>{try{let t={};n.type&&(t.type=n.type.toUpperCase());let i=(await b$1(l,{filter:Object.keys(t).length?t:void 0,first:n.limit})).conversations.edges.map(p=>p.node);h$1(n,i,{headers:["ID","Title","Type","Unread","Created"],rows:i.map(p$1=>[p(p$1.id,12),p$1.title??"-",p$1.type??"-",String(p$1.unreadCount??0),o(p$1.createdAt)])});}catch(t){g(t);}}),o$2.command("get").description("Get a conversation").argument("<id>").option("-f, --format <format>").action(async(n,t)=>{try{let e=await b$1(R,{id:n});if(!e.conversation)throw new o$1(`Conversation ${n} not found`);h$1(t,e.conversation);}catch(e){g(e);}}),o$2.command("create").description("Create a conversation").requiredOption("--title <s>").requiredOption("--participants <ids>","Comma-separated participant userIds (required by schema)").option("--description <s>").option("--type <t>","DIRECT|GROUP|CHANNEL","GROUP").option("-f, --format <format>").action(async n=>{try{let t=s().auth.read();if(!t?.workspaceId)throw new o$1("No workspace set. Run: vibecontrols workspace set <id>");let e={title:n.title,description:n.description,type:(n.type??"GROUP").toUpperCase(),participantIds:n.participants.split(","),workspaceId:t.workspaceId},i$1=await b$1(N,{input:e});i("Conversation created"),h$1(n,i$1.createConversation.conversation);}catch(t){g(t);}}),o$2.command("update").description("Update a conversation").argument("<id>").option("--title <s>").option("--description <s>").option("-f, --format <format>").action(async(n,t)=>{try{let e={id:n};if(t.title&&(e.title=t.title),t.description!==void 0&&(e.description=t.description),Object.keys(e).length===1)throw new o$1("No updates specified");let i$1=await b$1(T,{input:e});i("Conversation updated"),h$1(t,i$1.updateConversation.conversation);}catch(e){g(e);}}),o$2.command("delete").description("Delete a conversation").argument("<id>").action(async n=>{try{await b$1(y,{id:n}),i("Conversation deleted");}catch(t){g(t);}}),o$2.command("send").description("Send a message to a conversation").argument("<conversationId>").requiredOption("--content <text>").option("--parent <messageId>","Reply parent").option("-f, --format <format>").action(async(n,t)=>{try{let e={conversationId:n,content:{text:t.content},type:"TEXT",parentMessageId:t.parent},i$1=await b$1(O,{input:e});i("Message sent"),h$1(t,i$1.sendMessage.message);}catch(e){g(e);}}),Z(o$2),tt(o$2),et(o$2),nt(o$2),ot(o$2),it(o$2);}function Z(d){let o$1=d.command("messages").description("Message operations");o$1.command("edit").description("Edit a message").argument("<id>").requiredOption("--content <text>").option("--reason <s>").option("-f, --format <format>").action(async(n,t)=>{try{let e={id:n,content:{text:t.content}};t.reason&&(e.reason=t.reason);let i$1=await b$1(S,{input:e});i("Message edited"),h$1(t,i$1.editMessage);}catch(e){g(e);}}),o$1.command("delete").description("Delete a message").argument("<id>").option("--hard","Hard delete (default: soft)").action(async(n,t)=>{try{await b$1($,{id:n,hard:t.hard??!1}),i("Message deleted");}catch(e){g(e);}}),o$1.command("forward").description("Forward a message to another conversation").argument("<messageId>").requiredOption("--to <targetConversationId>").option("-f, --format <format>").action(async(n,t)=>{try{let e=await b$1(D,{messageId:n,targetConversationId:t.to});i("Message forwarded"),h$1(t,e.forwardMessage.message);}catch(e){g(e);}}),o$1.command("pin").description("Pin a message").argument("<messageId>").action(async n=>{try{await b$1(M,{messageId:n}),i("Message pinned");}catch(t){g(t);}}),o$1.command("unpin").description("Unpin a message").argument("<messageId>").action(async n=>{try{await b$1(_,{messageId:n}),i("Message unpinned");}catch(t){g(t);}}),o$1.command("search").description("Search messages").requiredOption("--query <s>").option("--conversation <id>","Restrict to a conversation").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>").action(async n=>{try{let e=(await b$1(h,{query:n.query,conversationId:n.conversation,first:n.limit})).searchMessages.edges.map(i=>i.node);h$1(n,e,{headers:["ID","Conversation","Author","Created"],rows:e.map(i=>[p(i.id,12),p(i.conversationId??"-",12),p(i.authorId??"-",12),o(i.createdAt)])});}catch(t){g(t);}});}function tt(d){let o=d.command("drafts").description("Draft message operations");o.command("get").description("Get the actor\u2019s draft for a conversation").argument("<conversationId>").option("-f, --format <format>").action(async(n,t)=>{try{let e=await b$1(x,{conversationId:n});if(!e.draft){i("No draft saved");return}h$1(t,e.draft);}catch(e){g(e);}}),o.command("save").description("Save (upsert) a draft for a conversation").argument("<conversationId>").requiredOption("--content <text>").option("--parent <messageId>").option("-f, --format <format>").action(async(n,t)=>{try{let e={conversationId:n,content:{text:t.content}};t.parent&&(e.parentMessageId=t.parent);let i$1=await b$1(w,{input:e});i("Draft saved"),h$1(t,i$1.saveDraft);}catch(e){g(e);}}),o.command("delete").description("Delete the actor\u2019s draft for a conversation").argument("<conversationId>").action(async n=>{try{await b$1(P,{conversationId:n}),i("Draft deleted");}catch(t){g(t);}});}function et(d){let o=d.command("reactions").description("Reaction operations");o.command("add").description("Add an emoji reaction to a message").argument("<messageId>").requiredOption("--emoji <e>").option("-f, --format <format>").action(async(n,t)=>{try{let e=await b$1(U,{messageId:n,emoji:t.emoji});i("Reaction added"),h$1(t,e.addReaction);}catch(e){g(e);}}),o.command("remove").description("Remove an emoji reaction from a message").argument("<messageId>").requiredOption("--emoji <e>").action(async(n,t)=>{try{await b$1(V,{messageId:n,emoji:t.emoji}),i("Reaction removed");}catch(e){g(e);}});}function nt(d){let o=d.command("participants").description("Participant operations");o.command("add").description("Add a participant to a conversation").argument("<conversationId>").requiredOption("--user <userId>").option("--role <role>","ADMIN | MODERATOR | MEMBER | GUEST").option("-f, --format <format>").action(async(n,t)=>{try{let e={conversationId:n,userId:t.user};t.role&&(e.role=t.role.toUpperCase());let i$1=await b$1(k,{input:e});i("Participant added"),h$1(t,i$1.addParticipant);}catch(e){g(e);}}),o.command("remove").description("Remove a participant from a conversation").argument("<conversationId>").requiredOption("--user <userId>").option("--reason <s>").action(async(n,t)=>{try{let e={conversationId:n,userId:t.user};t.reason&&(e.reason=t.reason),await b$1(L,{input:e}),i("Participant removed");}catch(e){g(e);}}),o.command("role").description("Update a participant\u2019s role").argument("<conversationId>").requiredOption("--user <userId>").requiredOption("--role <role>","ADMIN | MODERATOR | MEMBER | GUEST").action(async(n,t)=>{try{await b$1(G,{input:{conversationId:n,userId:t.user,role:t.role.toUpperCase()}}),i("Participant role updated");}catch(e){g(e);}});}function ot(d){let o=(t,e,i$1,p)=>{d.command(t).description(e).argument("<id>").action(async I=>{try{await b$1(i$1,{id:I}),i(p);}catch(g$1){g(g$1);}});},n=(t,e,i$1,p)=>{d.command(t).description(e).argument("<conversationId>").action(async I=>{try{await b$1(i$1,{conversationId:I}),i(p);}catch(g$1){g(g$1);}});};o("archive","Archive a conversation",j,"Archived"),o("unarchive","Unarchive a conversation",b,"Unarchived"),d.command("mute").description("Mute a conversation").argument("<conversationId>").option("--until <iso>","ISO timestamp; omit for indefinite").action(async(t,e)=>{try{await b$1(F,{conversationId:t,until:e.until}),i("Muted");}catch(i){g(i);}}),n("unmute","Unmute a conversation",H,"Unmuted"),n("pin","Pin a conversation",K,"Pinned"),n("unpin","Unpin a conversation",J,"Unpinned"),d.command("read").description("Mark a conversation as read").argument("<conversationId>").option("--message <messageId>","Mark read up to this message (defaults to latest)").action(async(t,e)=>{try{await b$1(B,{conversationId:t,messageId:e.message}),i("Marked as read");}catch(i){g(i);}}),n("leave","Leave a conversation",q,"Left conversation");}function it(d){let o=d.command("invites").description("Invite link operations");o.command("create").description("Create an invite link for a conversation").argument("<conversationId>").option("--max-uses <n>","Maximum number of uses",n=>parseInt(n,10)).option("--expires-at <iso>","ISO expiry timestamp").option("-f, --format <format>").action(async(n,t)=>{try{let e={conversationId:n};t.maxUses!==void 0&&(e.maxUses=t.maxUses),t.expiresAt&&(e.expiresAt=t.expiresAt);let i$1=await b$1(W,{input:e});i("Invite link created"),h$1(t,i$1.createInviteLink);}catch(e){g(e);}}),o.command("join").description("Join a conversation via invite code").argument("<code>").action(async n=>{try{await b$1(z,{code:n}),i("Joined via invite link");}catch(t){g(t);}}),o.command("validate").description("Validate an invite code").argument("<code>").option("-f, --format <format>").action(async(n,t)=>{try{let e=await b$1(X,{code:n});h$1(t,e.validateInviteLink);}catch(e){g(e);}});}var at={id:"conversations",version:"1.0.0",displayName:"Conversations",dependsOn:["auth","workspaces"],register(d,o){a(o),Q(d);}},ut=at;export{ut as default};
155
+ `;function Q(d){let o$2=d.command("conversations").description("Conversation management");o$2.command("list").description("List conversations").option("--type <t>","Filter by type (DIRECT|GROUP|CHANNEL)").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>").action(async n=>{try{let t={};n.type&&(t.type=n.type.toUpperCase());let i=(await b$1(l,{filter:Object.keys(t).length?t:void 0,first:n.limit})).conversations.edges.map(p=>p.node);h$1(n,i,{headers:["ID","Title","Type","Unread","Created"],rows:i.map(p$1=>[p(p$1.id,12),p$1.title??"-",p$1.type??"-",String(p$1.unreadCount??0),o(p$1.createdAt)])});}catch(t){g(t);}}),o$2.command("get").description("Get a conversation").argument("<id>").option("-f, --format <format>").action(async(n,t)=>{try{let e=await b$1(R,{id:n});if(!e.conversation)throw new o$1(`Conversation ${n} not found`);h$1(t,e.conversation);}catch(e){g(e);}}),o$2.command("create").description("Create a conversation").requiredOption("--title <s>").requiredOption("--participants <ids>","Comma-separated participant userIds (required by schema)").option("--description <s>").option("--type <t>","DIRECT|GROUP|CHANNEL","GROUP").option("-f, --format <format>").action(async n=>{try{let t=s().auth.read();if(!t?.workspaceId)throw new o$1("No workspace set. Run: vibecontrols workspace set <id>");let e={title:n.title,description:n.description,type:(n.type??"GROUP").toUpperCase(),participantIds:n.participants.split(","),workspaceId:t.workspaceId},i$1=await b$1(N,{input:e});i("Conversation created"),h$1(n,i$1.createConversation.conversation);}catch(t){g(t);}}),o$2.command("update").description("Update a conversation").argument("<id>").option("--title <s>").option("--description <s>").option("-f, --format <format>").action(async(n,t)=>{try{let e={id:n};if(t.title&&(e.title=t.title),t.description!==void 0&&(e.description=t.description),Object.keys(e).length===1)throw new o$1("No updates specified");let i$1=await b$1(T,{input:e});i("Conversation updated"),h$1(t,i$1.updateConversation.conversation);}catch(e){g(e);}}),o$2.command("delete").description("Delete a conversation").argument("<id>").action(async n=>{try{await b$1(y,{id:n}),i("Conversation deleted");}catch(t){g(t);}}),o$2.command("send").description("Send a message to a conversation").argument("<conversationId>").requiredOption("--content <text>").option("--parent <messageId>","Reply parent").option("-f, --format <format>").action(async(n,t)=>{try{let e={conversationId:n,content:{text:t.content},type:"TEXT",parentMessageId:t.parent},i$1=await b$1(O,{input:e});i("Message sent"),h$1(t,i$1.sendMessage.message);}catch(e){g(e);}}),Z(o$2),tt(o$2),et(o$2),nt(o$2),ot(o$2),it(o$2);}function Z(d){let o$1=d.command("messages").description("Message operations");o$1.command("edit").description("Edit a message").argument("<id>").requiredOption("--content <text>").option("--reason <s>").option("-f, --format <format>").action(async(n,t)=>{try{let e={id:n,content:{text:t.content}};t.reason&&(e.reason=t.reason);let i$1=await b$1(S,{input:e});i("Message edited"),h$1(t,i$1.editMessage);}catch(e){g(e);}}),o$1.command("delete").description("Delete a message").argument("<id>").option("--hard","Hard delete (default: soft)").action(async(n,t)=>{try{await b$1($,{id:n,hard:t.hard??!1}),i("Message deleted");}catch(e){g(e);}}),o$1.command("forward").description("Forward a message to another conversation").argument("<messageId>").requiredOption("--to <targetConversationId>").option("-f, --format <format>").action(async(n,t)=>{try{let e=await b$1(D,{messageId:n,targetConversationId:t.to});i("Message forwarded"),h$1(t,e.forwardMessage.message);}catch(e){g(e);}}),o$1.command("pin").description("Pin a message").argument("<messageId>").action(async n=>{try{await b$1(M,{messageId:n}),i("Message pinned");}catch(t){g(t);}}),o$1.command("unpin").description("Unpin a message").argument("<messageId>").action(async n=>{try{await b$1(_,{messageId:n}),i("Message unpinned");}catch(t){g(t);}}),o$1.command("search").description("Search messages").requiredOption("--query <s>").option("--conversation <id>","Restrict to a conversation").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>").action(async n=>{try{let e=(await b$1(h,{query:n.query,conversationId:n.conversation,first:n.limit})).searchMessages.edges.map(i=>i.node);h$1(n,e,{headers:["ID","Conversation","Author","Created"],rows:e.map(i=>[p(i.id,12),p(i.conversationId??"-",12),p(i.authorId??"-",12),o(i.createdAt)])});}catch(t){g(t);}});}function tt(d){let o=d.command("drafts").description("Draft message operations");o.command("get").description("Get the actor\u2019s draft for a conversation").argument("<conversationId>").option("-f, --format <format>").action(async(n,t)=>{try{let e=await b$1(x,{conversationId:n});if(!e.draft){i("No draft saved");return}h$1(t,e.draft);}catch(e){g(e);}}),o.command("save").description("Save (upsert) a draft for a conversation").argument("<conversationId>").requiredOption("--content <text>").option("--parent <messageId>").option("-f, --format <format>").action(async(n,t)=>{try{let e={conversationId:n,content:{text:t.content}};t.parent&&(e.parentMessageId=t.parent);let i$1=await b$1(w,{input:e});i("Draft saved"),h$1(t,i$1.saveDraft);}catch(e){g(e);}}),o.command("delete").description("Delete the actor\u2019s draft for a conversation").argument("<conversationId>").action(async n=>{try{await b$1(P,{conversationId:n}),i("Draft deleted");}catch(t){g(t);}});}function et(d){let o=d.command("reactions").description("Reaction operations");o.command("add").description("Add an emoji reaction to a message").argument("<messageId>").requiredOption("--emoji <e>").option("-f, --format <format>").action(async(n,t)=>{try{let e=await b$1(V,{messageId:n,emoji:t.emoji});i("Reaction added"),h$1(t,e.addReaction);}catch(e){g(e);}}),o.command("remove").description("Remove an emoji reaction from a message").argument("<messageId>").requiredOption("--emoji <e>").action(async(n,t)=>{try{await b$1(U,{messageId:n,emoji:t.emoji}),i("Reaction removed");}catch(e){g(e);}});}function nt(d){let o=d.command("participants").description("Participant operations");o.command("add").description("Add a participant to a conversation").argument("<conversationId>").requiredOption("--user <userId>").option("--role <role>","ADMIN | MODERATOR | MEMBER | GUEST").option("-f, --format <format>").action(async(n,t)=>{try{let e={conversationId:n,userId:t.user};t.role&&(e.role=t.role.toUpperCase());let i$1=await b$1(k,{input:e});i("Participant added"),h$1(t,i$1.addParticipant);}catch(e){g(e);}}),o.command("remove").description("Remove a participant from a conversation").argument("<conversationId>").requiredOption("--user <userId>").option("--reason <s>").action(async(n,t)=>{try{let e={conversationId:n,userId:t.user};t.reason&&(e.reason=t.reason),await b$1(L,{input:e}),i("Participant removed");}catch(e){g(e);}}),o.command("role").description("Update a participant\u2019s role").argument("<conversationId>").requiredOption("--user <userId>").requiredOption("--role <role>","ADMIN | MODERATOR | MEMBER | GUEST").action(async(n,t)=>{try{await b$1(G,{input:{conversationId:n,userId:t.user,role:t.role.toUpperCase()}}),i("Participant role updated");}catch(e){g(e);}});}function ot(d){let o=(t,e,i$1,p)=>{d.command(t).description(e).argument("<id>").action(async I=>{try{await b$1(i$1,{id:I}),i(p);}catch(g$1){g(g$1);}});},n=(t,e,i$1,p)=>{d.command(t).description(e).argument("<conversationId>").action(async I=>{try{await b$1(i$1,{conversationId:I}),i(p);}catch(g$1){g(g$1);}});};o("archive","Archive a conversation",j,"Archived"),o("unarchive","Unarchive a conversation",b,"Unarchived"),d.command("mute").description("Mute a conversation").argument("<conversationId>").option("--until <iso>","ISO timestamp; omit for indefinite").action(async(t,e)=>{try{await b$1(F,{conversationId:t,until:e.until}),i("Muted");}catch(i){g(i);}}),n("unmute","Unmute a conversation",H,"Unmuted"),n("pin","Pin a conversation",K,"Pinned"),n("unpin","Unpin a conversation",J,"Unpinned"),d.command("read").description("Mark a conversation as read").argument("<conversationId>").option("--message <messageId>","Mark read up to this message (defaults to latest)").action(async(t,e)=>{try{await b$1(B,{conversationId:t,messageId:e.message}),i("Marked as read");}catch(i){g(i);}}),n("leave","Leave a conversation",q,"Left conversation");}function it(d){let o=d.command("invites").description("Invite link operations");o.command("create").description("Create an invite link for a conversation").argument("<conversationId>").option("--max-uses <n>","Maximum number of uses",n=>parseInt(n,10)).option("--expires-at <iso>","ISO expiry timestamp").option("-f, --format <format>").action(async(n,t)=>{try{let e={conversationId:n};t.maxUses!==void 0&&(e.maxUses=t.maxUses),t.expiresAt&&(e.expiresAt=t.expiresAt);let i$1=await b$1(W,{input:e});i("Invite link created"),h$1(t,i$1.createInviteLink);}catch(e){g(e);}}),o.command("join").description("Join a conversation via invite code").argument("<code>").action(async n=>{try{await b$1(z,{code:n}),i("Joined via invite link");}catch(t){g(t);}}),o.command("validate").description("Validate an invite code").argument("<code>").option("-f, --format <format>").action(async(n,t)=>{try{let e=await b$1(X,{code:n});h$1(t,e.validateInviteLink);}catch(e){g(e);}});}var at={id:"conversations",version:"1.0.0",displayName:"Conversations",dependsOn:["auth","workspaces"],register(d,o){a(o),Q(d);}},ut=at;export{ut as default};
@@ -1,4 +1,4 @@
1
- import {a,b as b$1,h as h$1,p,g,i,d}from'../../chunk-NLEVVDXR.js';import {o}from'../../chunk-IZXPWPKX.js';var k=`
1
+ import {a,b as b$1,h as h$1,p,g,i,d}from'../../chunk-SQSFZFQZ.js';import {o}from'../../chunk-UAFYTYK6.js';var k=`
2
2
  query CooGetBrand($id: ID!) {
3
3
  cooBrand(id: $id) {
4
4
  id name handle tagline bio status isFeatured aesthetics tags websiteUrl