@burdenoff/cli-sdk 2026.522.1 → 2026.525.2

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.
@@ -1,11 +1,11 @@
1
- import {a,b,g,o,n,f,r,h}from'../../chunk-KTKHJORN.js';import {o as o$1}from'../../chunk-RNWXATAC.js';var y=`
1
+ import {a,b as b$1,g,o,n,f,r,h as h$1}from'../../chunk-KTKHJORN.js';import {o as o$1}from'../../chunk-RNWXATAC.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 } }
5
5
  pageInfo { hasNextPage endCursor }
6
6
  }
7
7
  }
8
- `,E=`
8
+ `,R=`
9
9
  query GetConversation($id: ID!) {
10
10
  conversation(id: $id) {
11
11
  id title type description avatarUrl settings
@@ -18,20 +18,138 @@ import {a,b,g,o,n,f,r,h}from'../../chunk-KTKHJORN.js';import {o as o$1}from'../.
18
18
  conversation { id title type }
19
19
  }
20
20
  }
21
- `,I=`
21
+ `,y=`
22
22
  mutation DeleteConversation($id: ID!) {
23
23
  deleteConversation(id: $id) { success }
24
24
  }
25
- `,O=`
25
+ `,T=`
26
26
  mutation UpdateConversation($input: UpdateConversationInput!) {
27
27
  updateConversation(input: $input) {
28
28
  conversation { id title description }
29
29
  }
30
30
  }
31
- `,A=`
31
+ `,O=`
32
32
  mutation SendMessage($input: SendMessageInput!) {
33
33
  sendMessage(input: $input) {
34
34
  message { id content type createdAt }
35
35
  }
36
36
  }
37
- `;function S(m){let o$2=m.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",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={};e.type&&(t.type=e.type.toUpperCase());let i=(await b(y,{filter:Object.keys(t).length?t:void 0,first:e.limit})).conversations.edges.map(r=>r.node);g(e,i,{headers:["ID","Title","Type","Unread","Created"],rows:i.map(r=>[o(r.id,12),r.title??"-",r.type??"-",String(r.unreadCount??0),n(r.createdAt)])});}catch(t){f(t);}}),o$2.command("get").description("Get a conversation").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(E,{id:e});if(!n.conversation)throw new o$1(`Conversation ${e} not found`);g(t,n.conversation);}catch(n){f(n);}}),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 e=>{try{let t=r().auth.read();if(!t?.workspaceId)throw new o$1("No workspace set. Run: vibecontrols workspace set <id>");let n={title:e.title,description:e.description,type:(e.type??"GROUP").toUpperCase(),participantIds:e.participants.split(","),workspaceId:t.workspaceId},i=await b(N,{input:n});h("Conversation created"),g(e,i.createConversation.conversation);}catch(t){f(t);}}),o$2.command("update").description("Update a conversation").argument("<id>").option("--title <s>").option("--description <s>").option("-f, --format <format>").action(async(e,t)=>{try{let n={id:e};if(t.title&&(n.title=t.title),t.description!==void 0&&(n.description=t.description),Object.keys(n).length===1)throw new o$1("No updates specified");let i=await b(O,{input:n});h("Conversation updated"),g(t,i.updateConversation.conversation);}catch(n){f(n);}}),o$2.command("delete").description("Delete a conversation").argument("<id>").action(async e=>{try{await b(I,{id:e}),h("Conversation deleted");}catch(t){f(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(e,t)=>{try{let n={conversationId:e,content:{text:t.content},type:"TEXT",parentMessageId:t.parent},i=await b(A,{input:n});h("Message sent"),g(t,i.sendMessage.message);}catch(n){f(n);}});}var R={id:"conversations",version:"1.0.0",displayName:"Conversations",dependsOn:["auth","workspaces"],register(m,o){a(o),S(m);}},k=R;export{k as default};
37
+ `;var S=`
38
+ mutation EditMessage($input: EditMessageInput!) {
39
+ editMessage(input: $input) { id content isEdited editedAt }
40
+ }
41
+ `,$=`
42
+ mutation DeleteMessage($id: ID!, $hard: Boolean) {
43
+ deleteMessage(id: $id, hard: $hard) { success messageId }
44
+ }
45
+ `,D=`
46
+ mutation ForwardMessage($messageId: ID!, $targetConversationId: ID!) {
47
+ forwardMessage(messageId: $messageId, targetConversationId: $targetConversationId) {
48
+ success message { id conversationId content createdAt }
49
+ }
50
+ }
51
+ `,M=`
52
+ mutation PinMessage($messageId: ID!) {
53
+ pinMessage(messageId: $messageId) { id isPinned pinnedAt }
54
+ }
55
+ `,_=`
56
+ mutation UnpinMessage($messageId: ID!) {
57
+ unpinMessage(messageId: $messageId) { id isPinned }
58
+ }
59
+ `,h=`
60
+ query SearchMessages($query: String!, $conversationId: ID, $first: Int) {
61
+ searchMessages(query: $query, conversationId: $conversationId, first: $first) {
62
+ edges { node { id conversationId authorId content type createdAt } }
63
+ totalCount
64
+ }
65
+ }
66
+ `,x=`
67
+ query Draft($conversationId: ID!) {
68
+ draft(conversationId: $conversationId) {
69
+ id conversationId content parentMessageId createdAt updatedAt
70
+ }
71
+ }
72
+ `,w=`
73
+ mutation SaveDraft($input: SaveDraftInput!) {
74
+ saveDraft(input: $input) { id conversationId content updatedAt }
75
+ }
76
+ `,P=`
77
+ mutation DeleteDraft($conversationId: ID!) {
78
+ deleteDraft(conversationId: $conversationId) { success conversationId }
79
+ }
80
+ `,U=`
81
+ mutation AddReaction($messageId: ID!, $emoji: String!) {
82
+ addReaction(messageId: $messageId, emoji: $emoji) {
83
+ id messageId userId emoji createdAt
84
+ }
85
+ }
86
+ `,V=`
87
+ mutation RemoveReaction($messageId: ID!, $emoji: String!) {
88
+ removeReaction(messageId: $messageId, emoji: $emoji) { success messageId emoji }
89
+ }
90
+ `,k=`
91
+ mutation AddParticipant($input: AddParticipantInput!) {
92
+ addParticipant(input: $input) { id conversationId userId createdAt }
93
+ }
94
+ `,L=`
95
+ mutation RemoveParticipant($input: RemoveParticipantInput!) {
96
+ removeParticipant(input: $input) { success conversationId userId }
97
+ }
98
+ `,G=`
99
+ mutation UpdateParticipantRole($input: UpdateParticipantRoleInput!) {
100
+ updateParticipantRole(input: $input) { id conversationId userId }
101
+ }
102
+ `,q=`
103
+ mutation LeaveConversation($conversationId: ID!) {
104
+ leaveConversation(conversationId: $conversationId) { success conversationId }
105
+ }
106
+ `,j=`
107
+ mutation ArchiveConversation($id: ID!) {
108
+ archiveConversation(id: $id) { id state }
109
+ }
110
+ `,b=`
111
+ mutation UnarchiveConversation($id: ID!) {
112
+ unarchiveConversation(id: $id) { id state }
113
+ }
114
+ `,F=`
115
+ mutation MuteConversation($conversationId: ID!, $until: DateTime) {
116
+ muteConversation(conversationId: $conversationId, until: $until) {
117
+ id conversationId userId
118
+ }
119
+ }
120
+ `,H=`
121
+ mutation UnmuteConversation($conversationId: ID!) {
122
+ unmuteConversation(conversationId: $conversationId) { id conversationId userId }
123
+ }
124
+ `,K=`
125
+ mutation PinConversation($conversationId: ID!) {
126
+ pinConversation(conversationId: $conversationId) { id conversationId userId }
127
+ }
128
+ `,J=`
129
+ mutation UnpinConversation($conversationId: ID!) {
130
+ unpinConversation(conversationId: $conversationId) { id conversationId userId }
131
+ }
132
+ `,B=`
133
+ mutation MarkConversationAsRead($conversationId: ID!, $messageId: ID) {
134
+ markConversationAsRead(conversationId: $conversationId, messageId: $messageId) {
135
+ id conversationId userId
136
+ }
137
+ }
138
+ `,W=`
139
+ mutation CreateInviteLink($input: CreateInviteLinkInput!) {
140
+ createInviteLink(input: $input) {
141
+ code url currentUses maxUses expiresAt createdAt
142
+ }
143
+ }
144
+ `,z=`
145
+ mutation JoinViaInviteLink($code: String!) {
146
+ joinViaInviteLink(code: $code) { id conversationId userId createdAt }
147
+ }
148
+ `,X=`
149
+ query ValidateInviteLink($code: String!) {
150
+ validateInviteLink(code: $code) {
151
+ valid usesRemaining expiresAt
152
+ conversation { id title type }
153
+ }
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$1=>{try{let t={};n$1.type&&(t.type=n$1.type.toUpperCase());let i=(await b$1(l,{filter:Object.keys(t).length?t:void 0,first:n$1.limit})).conversations.edges.map(p=>p.node);g(n$1,i,{headers:["ID","Title","Type","Unread","Created"],rows:i.map(p=>[o(p.id,12),p.title??"-",p.type??"-",String(p.unreadCount??0),n(p.createdAt)])});}catch(t){f(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`);g(t,e.conversation);}catch(e){f(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=r().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=await b$1(N,{input:e});h$1("Conversation created"),g(n,i.createConversation.conversation);}catch(t){f(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=await b$1(T,{input:e});h$1("Conversation updated"),g(t,i.updateConversation.conversation);}catch(e){f(e);}}),o$2.command("delete").description("Delete a conversation").argument("<id>").action(async n=>{try{await b$1(y,{id:n}),h$1("Conversation deleted");}catch(t){f(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=await b$1(O,{input:e});h$1("Message sent"),g(t,i.sendMessage.message);}catch(e){f(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=await b$1(S,{input:e});h$1("Message edited"),g(t,i.editMessage);}catch(e){f(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}),h$1("Message deleted");}catch(e){f(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});h$1("Message forwarded"),g(t,e.forwardMessage.message);}catch(e){f(e);}}),o$1.command("pin").description("Pin a message").argument("<messageId>").action(async n=>{try{await b$1(M,{messageId:n}),h$1("Message pinned");}catch(t){f(t);}}),o$1.command("unpin").description("Unpin a message").argument("<messageId>").action(async n=>{try{await b$1(_,{messageId:n}),h$1("Message unpinned");}catch(t){f(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$1=>{try{let e=(await b$1(h,{query:n$1.query,conversationId:n$1.conversation,first:n$1.limit})).searchMessages.edges.map(i=>i.node);g(n$1,e,{headers:["ID","Conversation","Author","Created"],rows:e.map(i=>[o(i.id,12),o(i.conversationId??"-",12),o(i.authorId??"-",12),n(i.createdAt)])});}catch(t){f(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){h$1("No draft saved");return}g(t,e.draft);}catch(e){f(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=await b$1(w,{input:e});h$1("Draft saved"),g(t,i.saveDraft);}catch(e){f(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}),h$1("Draft deleted");}catch(t){f(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});h$1("Reaction added"),g(t,e.addReaction);}catch(e){f(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}),h$1("Reaction removed");}catch(e){f(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=await b$1(k,{input:e});h$1("Participant added"),g(t,i.addParticipant);}catch(e){f(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}),h$1("Participant removed");}catch(e){f(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()}}),h$1("Participant role updated");}catch(e){f(e);}});}function ot(d){let o=(t,e,i,p)=>{d.command(t).description(e).argument("<id>").action(async I=>{try{await b$1(i,{id:I}),h$1(p);}catch(g){f(g);}});},n=(t,e,i,p)=>{d.command(t).description(e).argument("<conversationId>").action(async I=>{try{await b$1(i,{conversationId:I}),h$1(p);}catch(g){f(g);}});};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}),h$1("Muted");}catch(i){f(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}),h$1("Marked as read");}catch(i){f(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=await b$1(W,{input:e});h$1("Invite link created"),g(t,i.createInviteLink);}catch(e){f(e);}}),o.command("join").description("Join a conversation via invite code").argument("<code>").action(async n=>{try{await b$1(z,{code:n}),h$1("Joined via invite link");}catch(t){f(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});g(t,e.validateInviteLink);}catch(e){f(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
- 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var promises=require('fs/promises');var s=class extends Error{exitCode;hint;constructor(r,c){super(r),this.name="CliUserError",this.exitCode=c?.exitCode??1,this.hint=c?.hint;}},f=class extends s{constructor(r,c){super(r,{exitCode:2,hint:c?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},p=class extends Error{cause;constructor(r,c){super(r),this.name="CliInternalError",this.cause=c;}};var w=null;function T(e){w=e;}function u(){if(!w)throw new p("vibecontrols module helpers used before setHelpersContext was called");return w}function V(){let e=u();if(!e.auth.isAuthenticated())throw new f(`Authentication required. Run \`${e.productName} auth login\`.`)}async function l(e,r){return V(),u().gql.workspace.request(e,r)}function d(e){let r=e instanceof Error?e.message:String(e);throw new s(r)}function m(e,r,c){u().output.formatAndOutput(e,r,c);}function h(e){u().output.printSuccess(e);}function I(e){u().output.printInfo(e);}function v(e){return u().output.formatStatus(e)}function A(e){return u().output.formatDate(e)}function S(e,r){return u().output.truncate(e,r)}function O(){return u()}var $=`
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var promises=require('fs/promises');var s=class extends Error{exitCode;hint;constructor(r,a){super(r),this.name="CliUserError",this.exitCode=a?.exitCode??1,this.hint=a?.hint;}},E=class extends s{constructor(r,a){super(r,{exitCode:2,hint:a?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},x=class extends Error{cause;constructor(r,a){super(r),this.name="CliInternalError",this.cause=a;}};var y=null;function k(o){y=o;}function f(){if(!y)throw new x("vibecontrols module helpers used before setHelpersContext was called");return y}function tt(){let o=f();if(!o.auth.isAuthenticated())throw new E(`Authentication required. Run \`${o.productName} auth login\`.`)}async function c(o,r){return tt(),f().gql.workspace.request(o,r)}function p(o){let r=o instanceof Error?o.message:String(o);throw new s(r)}function g(o,r,a){f().output.formatAndOutput(o,r,a);}function m(o){f().output.printSuccess(o);}function I(o){f().output.printInfo(o);}function A(o){return f().output.formatStatus(o)}function v(o){return f().output.formatDate(o)}function $(o,r){return f().output.truncate(o,r)}function O(){return f()}var S=`
2
2
  query ListExportJobs($context: ContextInput!, $filter: ExportJobFilterInput, $pagination: ExportPaginationInput) {
3
3
  listExportJobs(context: $context, filter: $filter, pagination: $pagination) {
4
4
  edges { node {
@@ -8,20 +8,20 @@
8
8
  pageInfo { totalCount hasNextPage }
9
9
  }
10
10
  }
11
- `,C=`
11
+ `,T=`
12
12
  query GetExportJob($context: ContextInput, $id: ID!) {
13
13
  getExportJob(context: $context, id: $id) {
14
14
  id name status progress
15
15
  downloadUrl downloadExpiresAt totalSizeBytes
16
16
  }
17
17
  }
18
- `,R=`
18
+ `,P=`
19
19
  mutation CreateExportJob($context: ContextInput!, $input: CreateExportJobInput!) {
20
20
  createExportJob(context: $context, input: $input) {
21
21
  id status progress entityTypes
22
22
  }
23
23
  }
24
- `,P=`
24
+ `,R=`
25
25
  query ListExportTemplates($context: ContextInput!, $pagination: ExportPaginationInput) {
26
26
  listExportTemplates(context: $context, pagination: $pagination) {
27
27
  edges { node { id name entityTypes format includeMedia includeMetadata } }
@@ -34,4 +34,62 @@
34
34
  id name entityTypes format
35
35
  }
36
36
  }
37
- `;function x(){let e=O().auth.read();if(!e?.workspaceId)throw new s("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:e.workspaceId}}function q(e){let r=e.command("export").description("Workspace data export jobs"),c=r.command("jobs").description("Export job lifecycle");c.command("list").description("List export jobs").option("--status <s>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let o={};t.status&&(o.status=t.status.toUpperCase());let g=(await l($,{context:x(),filter:Object.keys(o).length?o:void 0,pagination:{first:t.limit}})).listExportJobs.edges.map(a=>a.node);m(t,g,{headers:["ID","Name","Status","Progress","Started"],rows:g.map(a=>[S(a.id,12),a.name??"-",v(a.status),`${a.processedEntities??0}/${a.totalEntities??"-"}`,A(a.startedAt)])});}catch(o){d(o);}}),c.command("get").description("Get an export job").argument("<id>").option("-f, --format <format>").action(async(t,o)=>{try{let n=await l(C,{context:x(),id:t});if(!n.getExportJob)throw new s(`Export job ${t} not found`);m(o,n.getExportJob);}catch(n){d(n);}}),c.command("create").description("Create an export job").requiredOption("--name <s>").requiredOption("--types <t>","Comma-separated entity types").option("--format <fmt>","JSON|CSV|ZIP","JSON").option("--include-media","Include media files",false).option("--include-metadata","Include metadata",true).option("--from <iso>","Date range start").option("--to <iso>","Date range end").option("-f, --format-output <format>").action(async t=>{try{let o={name:t.name,entityTypes:t.types.split(","),format:(t.format??"JSON").toUpperCase(),includeMedia:!!t.includeMedia,includeMetadata:t.includeMetadata!==!1,dateRangeStart:t.from,dateRangeEnd:t.to},n=await l(R,{context:x(),input:o});h(`Export job created: ${n.createExportJob.id}`),m({format:t.formatOutput},n.createExportJob);}catch(o){d(o);}}),r.command("download").description("Download a completed export job to a local path").argument("<jobId>").requiredOption("--to <path>","Local file path to write").action(async(t,o)=>{try{let n=await l(C,{context:x(),id:t});if(!n.getExportJob)throw new s(`Export job ${t} not found`);let g=n.getExportJob.downloadUrl;if(!g)throw new s(`Job ${t} has no downloadUrl yet (status=${n.getExportJob.status??"UNKNOWN"}).`);I(`Downloading from ${g}`);let a=await fetch(g);if(!a.ok)throw new s(`Download failed: ${a.status} ${a.statusText}`);let y=Buffer.from(await a.arrayBuffer());await promises.writeFile(o.to,y),h(`Saved ${y.length} bytes to ${o.to}`);}catch(n){d(n);}});let k=r.command("templates").description("Export templates");k.command("list").description("List export templates").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let o=await l(P,{context:x(),pagination:{first:t.limit}});m(t,o.listExportTemplates.edges.map(n=>n.node));}catch(o){d(o);}}),k.command("get").description("Get an export template").argument("<id>").option("-f, --format <format>").action(async(t,o)=>{try{let n=await l(D,{context:x(),id:t});if(!n.getExportTemplate)throw new s(`Template ${t} not found`);m(o,n.getExportTemplate);}catch(n){d(n);}});}var X={id:"export",version:"1.0.0",displayName:"Export",dependsOn:["auth","workspaces"],register(e,r){T(r),q(e);}},st=X;module.exports=st;
37
+ `,_=`
38
+ mutation CancelExportJob($context: ContextInput, $id: ID!) {
39
+ cancelExportJob(context: $context, id: $id) {
40
+ id status progress
41
+ }
42
+ }
43
+ `,L=`
44
+ mutation DeleteExportJob($context: ContextInput, $id: ID!) {
45
+ deleteExportJob(context: $context, id: $id)
46
+ }
47
+ `,N=`
48
+ mutation RetryExportJob($context: ContextInput, $id: ID!) {
49
+ retryExportJob(context: $context, id: $id) {
50
+ id status progress
51
+ }
52
+ }
53
+ `,q=`
54
+ mutation CreateExportTemplate($context: ContextInput, $input: CreateExportTemplateInput!) {
55
+ createExportTemplate(context: $context, input: $input) {
56
+ id name entityTypes format includeMedia includeMetadata
57
+ }
58
+ }
59
+ `,M=`
60
+ mutation UpdateExportTemplate(
61
+ $context: ContextInput
62
+ $id: ID!
63
+ $input: UpdateExportTemplateInput!
64
+ ) {
65
+ updateExportTemplate(context: $context, id: $id, input: $input) {
66
+ id name entityTypes format includeMedia includeMetadata isDefault
67
+ }
68
+ }
69
+ `,J=`
70
+ mutation DeleteExportTemplate($context: ContextInput, $id: ID!) {
71
+ deleteExportTemplate(context: $context, id: $id)
72
+ }
73
+ `,j=`
74
+ query GetAvailableExportEntities(
75
+ $context: ContextInput!
76
+ $pagination: ExportPaginationInput
77
+ ) {
78
+ getAvailableExportEntities(context: $context, pagination: $pagination) {
79
+ edges {
80
+ node {
81
+ entityType displayName description enabled
82
+ supportsDateRange supportsMediaExport estimatedSize
83
+ }
84
+ }
85
+ pageInfo { totalCount }
86
+ }
87
+ }
88
+ `,G=`
89
+ query GetExportPart($context: ContextInput, $id: ID!) {
90
+ getExportPart(context: $context, id: $id) {
91
+ id jobId partNumber fileName fileId sizeBytes checksum
92
+ downloadUrl downloadExpiresAt
93
+ }
94
+ }
95
+ `;function d(){let o=O().auth.read();if(!o?.workspaceId)throw new s("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:o.workspaceId}}function F(o){let r=o.command("export").description("Workspace data export jobs"),a=r.command("jobs").description("Export job lifecycle");a.command("list").description("List export jobs").option("--status <s>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e={};t.status&&(e.status=t.status.toUpperCase());let i=(await c(S,{context:d(),filter:Object.keys(e).length?e:void 0,pagination:{first:t.limit}})).listExportJobs.edges.map(l=>l.node);g(t,i,{headers:["ID","Name","Status","Progress","Started"],rows:i.map(l=>[$(l.id,12),l.name??"-",A(l.status),`${l.processedEntities??0}/${l.totalEntities??"-"}`,v(l.startedAt)])});}catch(e){p(e);}}),a.command("get").description("Get an export job").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let n=await c(T,{context:d(),id:t});if(!n.getExportJob)throw new s(`Export job ${t} not found`);g(e,n.getExportJob);}catch(n){p(n);}}),a.command("create").description("Create an export job").requiredOption("--name <s>").requiredOption("--types <t>","Comma-separated entity types").option("--format <fmt>","JSON|CSV|ZIP","JSON").option("--include-media","Include media files",false).option("--include-metadata","Include metadata",true).option("--from <iso>","Date range start").option("--to <iso>","Date range end").option("-f, --format-output <format>").action(async t=>{try{let e={name:t.name,entityTypes:t.types.split(","),format:(t.format??"JSON").toUpperCase(),includeMedia:!!t.includeMedia,includeMetadata:t.includeMetadata!==!1,dateRangeStart:t.from,dateRangeEnd:t.to},n=await c(P,{context:d(),input:e});m(`Export job created: ${n.createExportJob.id}`),g({format:t.formatOutput},n.createExportJob);}catch(e){p(e);}}),a.command("cancel").description("Cancel a running export job").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let n=await c(_,{context:d(),id:t});m(`Export job cancelled: ${n.cancelExportJob.id}`),g(e,n.cancelExportJob);}catch(n){p(n);}}),a.command("delete").description("Delete an export job").argument("<id>").action(async t=>{try{if(!(await c(L,{context:d(),id:t})).deleteExportJob)throw new s(`Failed to delete export job ${t}`);m(`Export job deleted: ${t}`);}catch(e){p(e);}}),a.command("retry").description("Retry a failed export job").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let n=await c(N,{context:d(),id:t});m(`Export job retry queued: ${n.retryExportJob.id}`),g(e,n.retryExportJob);}catch(n){p(n);}}),r.command("entities").description("List entity types available for export").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let n=(await c(j,{context:d(),pagination:{first:t.limit}})).getAvailableExportEntities.edges.map(i=>i.node);g(t,n,{headers:["Type","Display","Enabled","DateRange","Media","Size"],rows:n.map(i=>[i.entityType,i.displayName,i.enabled?"yes":"no",i.supportsDateRange?"yes":"no",i.supportsMediaExport?"yes":"no",i.estimatedSize??"-"])});}catch(e){p(e);}}),r.command("part").description("Get an export part by id").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let n=await c(G,{context:d(),id:t});if(!n.getExportPart)throw new s(`Export part ${t} not found`);g(e,n.getExportPart);}catch(n){p(n);}}),r.command("download").description("Download a completed export job to a local path").argument("<jobId>").requiredOption("--to <path>","Local file path to write").action(async(t,e)=>{try{let n=await c(T,{context:d(),id:t});if(!n.getExportJob)throw new s(`Export job ${t} not found`);let i=n.getExportJob.downloadUrl;if(!i)throw new s(`Job ${t} has no downloadUrl yet (status=${n.getExportJob.status??"UNKNOWN"}).`);I(`Downloading from ${i}`);let l=await fetch(i);if(!l.ok)throw new s(`Download failed: ${l.status} ${l.statusText}`);let C=Buffer.from(await l.arrayBuffer());await promises.writeFile(e.to,C),m(`Saved ${C.length} bytes to ${e.to}`);}catch(n){p(n);}});let w=r.command("templates").description("Export templates");w.command("list").description("List export templates").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e=await c(R,{context:d(),pagination:{first:t.limit}});g(t,e.listExportTemplates.edges.map(n=>n.node));}catch(e){p(e);}}),w.command("get").description("Get an export template").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let n=await c(D,{context:d(),id:t});if(!n.getExportTemplate)throw new s(`Template ${t} not found`);g(e,n.getExportTemplate);}catch(n){p(n);}}),w.command("create").description("Create an export template").requiredOption("--name <s>").requiredOption("--types <t>","Comma-separated entity types").option("--description <s>").option("--format <fmt>","JSON|CSV","JSON").option("--include-media","Include media files",false).option("--include-metadata","Include metadata",true).option("-f, --format-output <format>").action(async t=>{try{let e={name:t.name,entityTypes:t.types.split(","),format:(t.format??"JSON").toUpperCase(),includeMedia:!!t.includeMedia,includeMetadata:t.includeMetadata!==!1};t.description&&(e.description=t.description);let n=await c(q,{context:d(),input:e});m(`Template created: ${n.createExportTemplate.id}`),g({format:t.formatOutput},n.createExportTemplate);}catch(e){p(e);}}),w.command("update").description("Update an export template").argument("<id>").option("--name <s>").option("--description <s>").option("--types <t>","Comma-separated entity types").option("--format <fmt>","JSON|CSV").option("--include-media <bool>","true|false").option("--include-metadata <bool>","true|false").option("--default <bool>","Set isDefault: true|false").option("-f, --format-output <format>").action(async(t,e)=>{try{let n={};e.name&&(n.name=e.name),e.description&&(n.description=e.description),e.types&&(n.entityTypes=e.types.split(",")),e.format&&(n.format=e.format.toUpperCase()),e.includeMedia!==void 0&&(n.includeMedia=e.includeMedia==="true"),e.includeMetadata!==void 0&&(n.includeMetadata=e.includeMetadata==="true"),e.default!==void 0&&(n.isDefault=e.default==="true");let i=await c(M,{context:d(),id:t,input:n});m(`Template updated: ${i.updateExportTemplate.id}`),g({format:e.formatOutput},i.updateExportTemplate);}catch(n){p(n);}}),w.command("delete").description("Delete an export template").argument("<id>").action(async t=>{try{if(!(await c(J,{context:d(),id:t})).deleteExportTemplate)throw new s(`Failed to delete template ${t}`);m(`Template deleted: ${t}`);}catch(e){p(e);}});}var ot={id:"export",version:"1.0.0",displayName:"Export",dependsOn:["auth","workspaces"],register(o,r){k(r),F(o);}},fe=ot;module.exports=fe;
@@ -1,4 +1,4 @@
1
- import {a,b,g,o,m as m$1,n,f,h as h$1,j,r}from'../../chunk-KTKHJORN.js';import {o as o$1}from'../../chunk-RNWXATAC.js';import {writeFile}from'fs/promises';var I=`
1
+ import {a,b,g,o,m,n,f,h as h$1,j,r}from'../../chunk-KTKHJORN.js';import {o as o$1}from'../../chunk-RNWXATAC.js';import {writeFile}from'fs/promises';var J=`
2
2
  query ListExportJobs($context: ContextInput!, $filter: ExportJobFilterInput, $pagination: ExportPaginationInput) {
3
3
  listExportJobs(context: $context, filter: $filter, pagination: $pagination) {
4
4
  edges { node {
@@ -8,7 +8,7 @@ import {a,b,g,o,m as m$1,n,f,h as h$1,j,r}from'../../chunk-KTKHJORN.js';import {
8
8
  pageInfo { totalCount hasNextPage }
9
9
  }
10
10
  }
11
- `,x=`
11
+ `,E=`
12
12
  query GetExportJob($context: ContextInput, $id: ID!) {
13
13
  getExportJob(context: $context, id: $id) {
14
14
  id name status progress
@@ -21,17 +21,75 @@ import {a,b,g,o,m as m$1,n,f,h as h$1,j,r}from'../../chunk-KTKHJORN.js';import {
21
21
  id status progress entityTypes
22
22
  }
23
23
  }
24
- `,h=`
24
+ `,P=`
25
25
  query ListExportTemplates($context: ContextInput!, $pagination: ExportPaginationInput) {
26
26
  listExportTemplates(context: $context, pagination: $pagination) {
27
27
  edges { node { id name entityTypes format includeMedia includeMetadata } }
28
28
  pageInfo { totalCount }
29
29
  }
30
30
  }
31
- `,P=`
31
+ `,_=`
32
32
  query GetExportTemplate($context: ContextInput, $id: ID!) {
33
33
  getExportTemplate(context: $context, id: $id) {
34
34
  id name entityTypes format
35
35
  }
36
36
  }
37
- `;function m(){let s=r().auth.read();if(!s?.workspaceId)throw new o$1("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:s.workspaceId}}function _(s){let c=s.command("export").description("Workspace data export jobs"),l=c.command("jobs").description("Export job lifecycle");l.command("list").description("List export jobs").option("--status <s>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e={};t.status&&(e.status=t.status.toUpperCase());let p=(await b(I,{context:m(),filter:Object.keys(e).length?e:void 0,pagination:{first:t.limit}})).listExportJobs.edges.map(n=>n.node);g(t,p,{headers:["ID","Name","Status","Progress","Started"],rows:p.map(n$1=>[o(n$1.id,12),n$1.name??"-",m$1(n$1.status),`${n$1.processedEntities??0}/${n$1.totalEntities??"-"}`,n(n$1.startedAt)])});}catch(e){f(e);}}),l.command("get").description("Get an export job").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await b(x,{context:m(),id:t});if(!o.getExportJob)throw new o$1(`Export job ${t} not found`);g(e,o.getExportJob);}catch(o){f(o);}}),l.command("create").description("Create an export job").requiredOption("--name <s>").requiredOption("--types <t>","Comma-separated entity types").option("--format <fmt>","JSON|CSV|ZIP","JSON").option("--include-media","Include media files",false).option("--include-metadata","Include metadata",true).option("--from <iso>","Date range start").option("--to <iso>","Date range end").option("-f, --format-output <format>").action(async t=>{try{let e={name:t.name,entityTypes:t.types.split(","),format:(t.format??"JSON").toUpperCase(),includeMedia:!!t.includeMedia,includeMetadata:t.includeMetadata!==!1,dateRangeStart:t.from,dateRangeEnd:t.to},o=await b(O,{context:m(),input:e});h$1(`Export job created: ${o.createExportJob.id}`),g({format:t.formatOutput},o.createExportJob);}catch(e){f(e);}}),c.command("download").description("Download a completed export job to a local path").argument("<jobId>").requiredOption("--to <path>","Local file path to write").action(async(t,e)=>{try{let o=await b(x,{context:m(),id:t});if(!o.getExportJob)throw new o$1(`Export job ${t} not found`);let p=o.getExportJob.downloadUrl;if(!p)throw new o$1(`Job ${t} has no downloadUrl yet (status=${o.getExportJob.status??"UNKNOWN"}).`);j(`Downloading from ${p}`);let n=await fetch(p);if(!n.ok)throw new o$1(`Download failed: ${n.status} ${n.statusText}`);let g=Buffer.from(await n.arrayBuffer());await writeFile(e.to,g),h$1(`Saved ${g.length} bytes to ${e.to}`);}catch(o){f(o);}});let f$1=c.command("templates").description("Export templates");f$1.command("list").description("List export templates").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e=await b(h,{context:m(),pagination:{first:t.limit}});g(t,e.listExportTemplates.edges.map(o=>o.node));}catch(e){f(e);}}),f$1.command("get").description("Get an export template").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await b(P,{context:m(),id:t});if(!o.getExportTemplate)throw new o$1(`Template ${t} not found`);g(e,o.getExportTemplate);}catch(o){f(o);}});}var R={id:"export",version:"1.0.0",displayName:"Export",dependsOn:["auth","workspaces"],register(s,c){a(c),_(s);}},G=R;export{G as default};
37
+ `,R=`
38
+ mutation CancelExportJob($context: ContextInput, $id: ID!) {
39
+ cancelExportJob(context: $context, id: $id) {
40
+ id status progress
41
+ }
42
+ }
43
+ `,A=`
44
+ mutation DeleteExportJob($context: ContextInput, $id: ID!) {
45
+ deleteExportJob(context: $context, id: $id)
46
+ }
47
+ `,M=`
48
+ mutation RetryExportJob($context: ContextInput, $id: ID!) {
49
+ retryExportJob(context: $context, id: $id) {
50
+ id status progress
51
+ }
52
+ }
53
+ `,N=`
54
+ mutation CreateExportTemplate($context: ContextInput, $input: CreateExportTemplateInput!) {
55
+ createExportTemplate(context: $context, input: $input) {
56
+ id name entityTypes format includeMedia includeMetadata
57
+ }
58
+ }
59
+ `,h=`
60
+ mutation UpdateExportTemplate(
61
+ $context: ContextInput
62
+ $id: ID!
63
+ $input: UpdateExportTemplateInput!
64
+ ) {
65
+ updateExportTemplate(context: $context, id: $id, input: $input) {
66
+ id name entityTypes format includeMedia includeMetadata isDefault
67
+ }
68
+ }
69
+ `,D=`
70
+ mutation DeleteExportTemplate($context: ContextInput, $id: ID!) {
71
+ deleteExportTemplate(context: $context, id: $id)
72
+ }
73
+ `,L=`
74
+ query GetAvailableExportEntities(
75
+ $context: ContextInput!
76
+ $pagination: ExportPaginationInput
77
+ ) {
78
+ getAvailableExportEntities(context: $context, pagination: $pagination) {
79
+ edges {
80
+ node {
81
+ entityType displayName description enabled
82
+ supportsDateRange supportsMediaExport estimatedSize
83
+ }
84
+ }
85
+ pageInfo { totalCount }
86
+ }
87
+ }
88
+ `,S=`
89
+ query GetExportPart($context: ContextInput, $id: ID!) {
90
+ getExportPart(context: $context, id: $id) {
91
+ id jobId partNumber fileName fileId sizeBytes checksum
92
+ downloadUrl downloadExpiresAt
93
+ }
94
+ }
95
+ `;function i(){let l=r().auth.read();if(!l?.workspaceId)throw new o$1("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:l.workspaceId}}function X(l){let m$1=l.command("export").description("Workspace data export jobs"),u=m$1.command("jobs").description("Export job lifecycle");u.command("list").description("List export jobs").option("--status <s>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e={};t.status&&(e.status=t.status.toUpperCase());let n$1=(await b(J,{context:i(),filter:Object.keys(e).length?e:void 0,pagination:{first:t.limit}})).listExportJobs.edges.map(p=>p.node);g(t,n$1,{headers:["ID","Name","Status","Progress","Started"],rows:n$1.map(p=>[o(p.id,12),p.name??"-",m(p.status),`${p.processedEntities??0}/${p.totalEntities??"-"}`,n(p.startedAt)])});}catch(e){f(e);}}),u.command("get").description("Get an export job").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await b(E,{context:i(),id:t});if(!o.getExportJob)throw new o$1(`Export job ${t} not found`);g(e,o.getExportJob);}catch(o){f(o);}}),u.command("create").description("Create an export job").requiredOption("--name <s>").requiredOption("--types <t>","Comma-separated entity types").option("--format <fmt>","JSON|CSV|ZIP","JSON").option("--include-media","Include media files",false).option("--include-metadata","Include metadata",true).option("--from <iso>","Date range start").option("--to <iso>","Date range end").option("-f, --format-output <format>").action(async t=>{try{let e={name:t.name,entityTypes:t.types.split(","),format:(t.format??"JSON").toUpperCase(),includeMedia:!!t.includeMedia,includeMetadata:t.includeMetadata!==!1,dateRangeStart:t.from,dateRangeEnd:t.to},o=await b(O,{context:i(),input:e});h$1(`Export job created: ${o.createExportJob.id}`),g({format:t.formatOutput},o.createExportJob);}catch(e){f(e);}}),u.command("cancel").description("Cancel a running export job").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await b(R,{context:i(),id:t});h$1(`Export job cancelled: ${o.cancelExportJob.id}`),g(e,o.cancelExportJob);}catch(o){f(o);}}),u.command("delete").description("Delete an export job").argument("<id>").action(async t=>{try{if(!(await b(A,{context:i(),id:t})).deleteExportJob)throw new o$1(`Failed to delete export job ${t}`);h$1(`Export job deleted: ${t}`);}catch(e){f(e);}}),u.command("retry").description("Retry a failed export job").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await b(M,{context:i(),id:t});h$1(`Export job retry queued: ${o.retryExportJob.id}`),g(e,o.retryExportJob);}catch(o){f(o);}}),m$1.command("entities").description("List entity types available for export").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let o=(await b(L,{context:i(),pagination:{first:t.limit}})).getAvailableExportEntities.edges.map(n=>n.node);g(t,o,{headers:["Type","Display","Enabled","DateRange","Media","Size"],rows:o.map(n=>[n.entityType,n.displayName,n.enabled?"yes":"no",n.supportsDateRange?"yes":"no",n.supportsMediaExport?"yes":"no",n.estimatedSize??"-"])});}catch(e){f(e);}}),m$1.command("part").description("Get an export part by id").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await b(S,{context:i(),id:t});if(!o.getExportPart)throw new o$1(`Export part ${t} not found`);g(e,o.getExportPart);}catch(o){f(o);}}),m$1.command("download").description("Download a completed export job to a local path").argument("<jobId>").requiredOption("--to <path>","Local file path to write").action(async(t,e)=>{try{let o=await b(E,{context:i(),id:t});if(!o.getExportJob)throw new o$1(`Export job ${t} not found`);let n=o.getExportJob.downloadUrl;if(!n)throw new o$1(`Job ${t} has no downloadUrl yet (status=${o.getExportJob.status??"UNKNOWN"}).`);j(`Downloading from ${n}`);let p=await fetch(n);if(!p.ok)throw new o$1(`Download failed: ${p.status} ${p.statusText}`);let f=Buffer.from(await p.arrayBuffer());await writeFile(e.to,f),h$1(`Saved ${f.length} bytes to ${e.to}`);}catch(o){f(o);}});let x=m$1.command("templates").description("Export templates");x.command("list").description("List export templates").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e=await b(P,{context:i(),pagination:{first:t.limit}});g(t,e.listExportTemplates.edges.map(o=>o.node));}catch(e){f(e);}}),x.command("get").description("Get an export template").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await b(_,{context:i(),id:t});if(!o.getExportTemplate)throw new o$1(`Template ${t} not found`);g(e,o.getExportTemplate);}catch(o){f(o);}}),x.command("create").description("Create an export template").requiredOption("--name <s>").requiredOption("--types <t>","Comma-separated entity types").option("--description <s>").option("--format <fmt>","JSON|CSV","JSON").option("--include-media","Include media files",false).option("--include-metadata","Include metadata",true).option("-f, --format-output <format>").action(async t=>{try{let e={name:t.name,entityTypes:t.types.split(","),format:(t.format??"JSON").toUpperCase(),includeMedia:!!t.includeMedia,includeMetadata:t.includeMetadata!==!1};t.description&&(e.description=t.description);let o=await b(N,{context:i(),input:e});h$1(`Template created: ${o.createExportTemplate.id}`),g({format:t.formatOutput},o.createExportTemplate);}catch(e){f(e);}}),x.command("update").description("Update an export template").argument("<id>").option("--name <s>").option("--description <s>").option("--types <t>","Comma-separated entity types").option("--format <fmt>","JSON|CSV").option("--include-media <bool>","true|false").option("--include-metadata <bool>","true|false").option("--default <bool>","Set isDefault: true|false").option("-f, --format-output <format>").action(async(t,e)=>{try{let o={};e.name&&(o.name=e.name),e.description&&(o.description=e.description),e.types&&(o.entityTypes=e.types.split(",")),e.format&&(o.format=e.format.toUpperCase()),e.includeMedia!==void 0&&(o.includeMedia=e.includeMedia==="true"),e.includeMetadata!==void 0&&(o.includeMetadata=e.includeMetadata==="true"),e.default!==void 0&&(o.isDefault=e.default==="true");let n=await b(h,{context:i(),id:t,input:o});h$1(`Template updated: ${n.updateExportTemplate.id}`),g({format:e.formatOutput},n.updateExportTemplate);}catch(o){f(o);}}),x.command("delete").description("Delete an export template").argument("<id>").action(async t=>{try{if(!(await b(D,{context:i(),id:t})).deleteExportTemplate)throw new o$1(`Failed to delete template ${t}`);h$1(`Template deleted: ${t}`);}catch(e){f(e);}});}var U={id:"export",version:"1.0.0",displayName:"Export",dependsOn:["auth","workspaces"],register(l,m){a(m),X(l);}},W=U;export{W as default};
@@ -1,4 +1,4 @@
1
- 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var fs=require('fs'),path=require('path'),crypto=require('crypto');var u=class extends Error{exitCode;hint;constructor(n,a){super(n),this.name="CliUserError",this.exitCode=a?.exitCode??1,this.hint=a?.hint;}},f=class extends u{constructor(n,a){super(n,{exitCode:2,hint:a?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},p=class extends Error{cause;constructor(n,a){super(n),this.name="CliInternalError",this.cause=a;}};var C=null;function E(e){C=e;}function g(){if(!C)throw new p("vibecontrols module helpers used before setHelpersContext was called");return C}function B(){let e=g();if(!e.auth.isAuthenticated())throw new f(`Authentication required. Run \`${e.productName} auth login\`.`)}async function d(e,n){return B(),g().gql.workspace.request(e,n)}function m(e){let n=e instanceof Error?e.message:String(e);throw new u(n)}function h(e,n,a){g().output.formatAndOutput(e,n,a);}function w(e){g().output.printSuccess(e);}function x(e){g().output.printInfo(e);}function y(e,n){return g().output.truncate(e,n)}var v=`
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var fs=require('fs'),path=require('path'),crypto=require('crypto');var u=class extends Error{exitCode;hint;constructor(r,a){super(r),this.name="CliUserError",this.exitCode=a?.exitCode??1,this.hint=a?.hint;}},m=class extends u{constructor(r,a){super(r,{exitCode:2,hint:a?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},g=class extends Error{cause;constructor(r,a){super(r),this.name="CliInternalError",this.cause=a;}};var C=null;function E(n){C=n;}function w(){if(!C)throw new g("vibecontrols module helpers used before setHelpersContext was called");return C}function H(){let n=w();if(!n.auth.isAuthenticated())throw new m(`Authentication required. Run \`${n.productName} auth login\`.`)}async function l(n,r){return H(),w().gql.workspace.request(n,r)}function p(n){let r=n instanceof Error?n.message:String(n);throw new u(r)}function d(n,r,a){w().output.formatAndOutput(n,r,a);}function h(n){w().output.printSuccess(n);}function x(n){w().output.printInfo(n);}function y(n,r){return w().output.truncate(n,r)}var v=`
2
2
  query BrowseFolderRoot($pagination: PaginationInput) {
3
3
  getFilesInFolder(pagination: $pagination) {
4
4
  files { id name size mimeType extension createdAt }
@@ -31,19 +31,34 @@
31
31
  fileId
32
32
  }
33
33
  }
34
- `,R=`
34
+ `,$=`
35
35
  mutation CreateShare($input: FileCreateShareInput!) {
36
36
  createShare(input: $input) {
37
37
  id token shareType accessLevel expiresAt requiresPassword
38
38
  downloadCount maxDownloads createdAt
39
39
  }
40
40
  }
41
- `,$=`
41
+ `,D=`
42
42
  mutation RevokeShare($id: ID!) {
43
43
  revokeShare(id: $id) {
44
44
  id revokedAt revokedBy
45
45
  }
46
46
  }
47
- `;function D(e){let n=e.command("files").description("Workspace file management");n.command("browse").description("Browse a folder (defaults to root)").argument("[folderId]").option("--limit <n>","Page size",r=>parseInt(r,10),100).option("-f, --format <format>").action(async(r,t)=>{try{let s={limit:t.limit,offset:0};if(r){let o=await d(A,{folderId:r,pagination:s});if(t.format){h(t,{folder:o.getFolder,files:o.getFilesInFolder.files});return}o.getFolder&&x(`Folder: ${o.getFolder.name}`);for(let c of o.getFilesInFolder.files){let k=c.size?`${c.size}b`:"-";console.log(` \u{1F4C4} ${y(c.id,12)} ${c.name} ${k} ${c.mimeType??"-"}`);}console.log(`
48
- ${o.getFilesInFolder.total} files`);return}let l=await d(v,{pagination:s});if(t.format){h(t,{files:l.getFilesInFolder.files});return}for(let o of l.getFilesInFolder.files){let c=o.size?`${o.size}b`:"-";console.log(` \u{1F4C4} ${y(o.id,12)} ${o.name} ${c} ${o.mimeType??"-"}`);}console.log(`
49
- ${l.getFilesInFolder.total} files`);}catch(s){m(s);}}),n.command("upload").description("Upload a local file (initiates a multipart session)").argument("<path>","Local file path").option("--folder <folderId>","Target folder id").option("--visibility <v>","PRIVATE|WORKSPACE|PUBLIC","WORKSPACE").option("-f, --format <format>").action(async(r,t)=>{try{let s=fs.statSync(r),l=path.basename(r),o=path.extname(r).slice(1)||void 0,c=fs.readFileSync(r),k=crypto.createHash("sha256").update(c).digest("hex"),L={fileName:l,fileSize:s.size,mimeType:"application/octet-stream",extension:o,folderId:t.folder,sha256Hash:k,visibility:(t.visibility??"WORKSPACE").toUpperCase()},b=await d(S,{input:L});x("Upload session created. PUT the local bytes to the returned URL(s)."),h(t,b.initiateUpload),x(`After uploading, complete with: vibecontrols files upload-complete --session ${b.initiateUpload.session.id}`);}catch(s){m(s);}}),n.command("upload-complete").description("Complete an in-flight upload session").requiredOption("--session <id>","Session id from `files upload`").option("--folder <folderId>").option("--description <s>").option("-f, --format <format>").action(async r=>{try{let t=await d(O,{input:{sessionId:r.session,folderId:r.folder,description:r.description}});w(`Upload complete: ${t.completeUpload.fileId}`),h(r,t.completeUpload.file);}catch(t){m(t);}});let a=n.command("share").description("Manage file shares");a.command("create").description("Create a share link for a file").argument("<fileId>").option("--access <a>","VIEW|DOWNLOAD","DOWNLOAD").option("--expires <iso>","Expiry timestamp").option("--password <p>").option("--max-downloads <n>","",r=>parseInt(r,10)).option("-f, --format <format>").action(async(r,t)=>{try{let s={fileId:r,shareType:"PUBLIC_LINK",accessLevel:(t.access??"DOWNLOAD").toUpperCase(),expiresAt:t.expires,password:t.password,maxDownloads:t.maxDownloads},l=await d(R,{input:s});w("Share created"),h(t,l.createShare);}catch(s){m(s);}}),a.command("revoke").description("Revoke a share by id").argument("<shareId>").action(async r=>{try{await d($,{id:r}),w("Share revoked");}catch(t){m(t);}});}var X={id:"files",version:"1.0.0",displayName:"Files",dependsOn:["auth","workspaces"],register(e,n){E(n),D(e);}},pt=X;module.exports=pt;
47
+ `,R=`
48
+ query GetFile($id: ID!) {
49
+ getFile(id: $id) {
50
+ id name description workspaceId folderId
51
+ mimeType extension size s3Key s3Bucket
52
+ downloadUrl status visibility
53
+ starred downloadCount viewCount sha256Hash
54
+ uploadedById createdAt updatedAt
55
+ tags
56
+ }
57
+ }
58
+ `,F=`
59
+ query GetFileDownloadUrl($id: ID!, $expiresIn: Int) {
60
+ getFileDownloadUrl(id: $id, expiresIn: $expiresIn)
61
+ }
62
+ `;function L(n){let r=n.command("files").description("Workspace file management");r.command("browse").description("Browse a folder (defaults to root)").argument("[folderId]").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,e)=>{try{let o={limit:e.limit,offset:0};if(t){let i=await l(A,{folderId:t,pagination:o});if(e.format){d(e,{folder:i.getFolder,files:i.getFilesInFolder.files});return}i.getFolder&&x(`Folder: ${i.getFolder.name}`);for(let c of i.getFilesInFolder.files){let k=c.size?`${c.size}b`:"-";console.log(` \u{1F4C4} ${y(c.id,12)} ${c.name} ${k} ${c.mimeType??"-"}`);}console.log(`
63
+ ${i.getFilesInFolder.total} files`);return}let f=await l(v,{pagination:o});if(e.format){d(e,{files:f.getFilesInFolder.files});return}for(let i of f.getFilesInFolder.files){let c=i.size?`${i.size}b`:"-";console.log(` \u{1F4C4} ${y(i.id,12)} ${i.name} ${c} ${i.mimeType??"-"}`);}console.log(`
64
+ ${f.getFilesInFolder.total} files`);}catch(o){p(o);}}),r.command("upload").description("Upload a local file (initiates a multipart session)").argument("<path>","Local file path").option("--folder <folderId>","Target folder id").option("--visibility <v>","PRIVATE|WORKSPACE|PUBLIC","WORKSPACE").option("-f, --format <format>").action(async(t,e)=>{try{let o=fs.statSync(t),f=path.basename(t),i=path.extname(t).slice(1)||void 0,c=fs.readFileSync(t),k=crypto.createHash("sha256").update(c).digest("hex"),q={fileName:f,fileSize:o.size,mimeType:"application/octet-stream",extension:i,folderId:e.folder,sha256Hash:k,visibility:(e.visibility??"WORKSPACE").toUpperCase()},I=await l(S,{input:q});x("Upload session created. PUT the local bytes to the returned URL(s)."),d(e,I.initiateUpload),x(`After uploading, complete with: vibecontrols files upload-complete --session ${I.initiateUpload.session.id}`);}catch(o){p(o);}}),r.command("upload-complete").description("Complete an in-flight upload session").requiredOption("--session <id>","Session id from `files upload`").option("--folder <folderId>").option("--description <s>").option("-f, --format <format>").action(async t=>{try{let e=await l(O,{input:{sessionId:t.session,folderId:t.folder,description:t.description}});h(`Upload complete: ${e.completeUpload.fileId}`),d(t,e.completeUpload.file);}catch(e){p(e);}}),r.command("get").description("Get a file by id").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await l(R,{id:t});if(!o.getFile)throw new u(`File ${t} not found`);d(e,o.getFile);}catch(o){p(o);}}),r.command("download").description("Get a pre-signed download URL for a file").argument("<id>").option("--expires <seconds>","URL expiry in seconds",t=>parseInt(t,10)).option("-f, --format <format>").action(async(t,e)=>{try{let o=await l(F,{id:t,expiresIn:e.expires});if(e.format){d(e,{url:o.getFileDownloadUrl});return}h("Download URL:"),console.log(o.getFileDownloadUrl);}catch(o){p(o);}});let a=r.command("share").description("Manage file shares");a.command("create").description("Create a share link for a file").argument("<fileId>").option("--access <a>","VIEW|DOWNLOAD","DOWNLOAD").option("--expires <iso>","Expiry timestamp").option("--password <p>").option("--max-downloads <n>","",t=>parseInt(t,10)).option("-f, --format <format>").action(async(t,e)=>{try{let o={fileId:t,shareType:"PUBLIC_LINK",accessLevel:(e.access??"DOWNLOAD").toUpperCase(),expiresAt:e.expires,password:e.password,maxDownloads:e.maxDownloads},f=await l($,{input:o});h("Share created"),d(e,f.createShare);}catch(o){p(o);}}),a.command("revoke").description("Revoke a share by id").argument("<shareId>").action(async t=>{try{await l(D,{id:t}),h("Share revoked");}catch(e){p(e);}});}var ee={id:"files",version:"1.0.0",displayName:"Files",dependsOn:["auth","workspaces"],register(n,r){E(r),L(n);}},ft=ee;module.exports=ft;
@@ -1,11 +1,11 @@
1
- import {a,b,g,j,o,f,h}from'../../chunk-KTKHJORN.js';import'../../chunk-RNWXATAC.js';import {statSync,readFileSync}from'fs';import {basename,extname}from'path';import {createHash}from'crypto';var E=`
1
+ import {a,b,g,j,o,f,h as h$1}from'../../chunk-KTKHJORN.js';import {o as o$1}from'../../chunk-RNWXATAC.js';import {statSync,readFileSync}from'fs';import {basename,extname}from'path';import {createHash}from'crypto';var h=`
2
2
  query BrowseFolderRoot($pagination: PaginationInput) {
3
3
  getFilesInFolder(pagination: $pagination) {
4
4
  files { id name size mimeType extension createdAt }
5
5
  total hasMore
6
6
  }
7
7
  }
8
- `,C=`
8
+ `,x=`
9
9
  query BrowseFolderById($folderId: ID!, $pagination: PaginationInput) {
10
10
  getFolder(id: $folderId) {
11
11
  id name path
@@ -15,7 +15,7 @@ import {a,b,g,j,o,f,h}from'../../chunk-KTKHJORN.js';import'../../chunk-RNWXATAC.
15
15
  total hasMore
16
16
  }
17
17
  }
18
- `,R=`
18
+ `,E=`
19
19
  mutation InitiateUpload($input: InitiateUploadInput!) {
20
20
  initiateUpload(input: $input) {
21
21
  session { id fileName fileSize s3Bucket s3Key }
@@ -24,26 +24,41 @@ import {a,b,g,j,o,f,h}from'../../chunk-KTKHJORN.js';import'../../chunk-RNWXATAC.
24
24
  multipartUploadId
25
25
  }
26
26
  }
27
- `,O=`
27
+ `,R=`
28
28
  mutation CompleteUpload($input: CompleteUploadInput!) {
29
29
  completeUpload(input: $input) {
30
30
  file { id name size s3Bucket s3Key downloadUrl }
31
31
  fileId
32
32
  }
33
33
  }
34
- `,U=`
34
+ `,$=`
35
35
  mutation CreateShare($input: FileCreateShareInput!) {
36
36
  createShare(input: $input) {
37
37
  id token shareType accessLevel expiresAt requiresPassword
38
38
  downloadCount maxDownloads createdAt
39
39
  }
40
40
  }
41
- `,w=`
41
+ `,O=`
42
42
  mutation RevokeShare($id: ID!) {
43
43
  revokeShare(id: $id) {
44
44
  id revokedAt revokedBy
45
45
  }
46
46
  }
47
- `;function x(c){let a=c.command("files").description("Workspace file management");a.command("browse").description("Browse a folder (defaults to root)").argument("[folderId]").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,e)=>{try{let i={limit:e.limit,offset:0};if(t){let o$1=await b(C,{folderId:t,pagination:i});if(e.format){g(e,{folder:o$1.getFolder,files:o$1.getFilesInFolder.files});return}o$1.getFolder&&j(`Folder: ${o$1.getFolder.name}`);for(let n of o$1.getFilesInFolder.files){let f=n.size?`${n.size}b`:"-";console.log(` \u{1F4C4} ${o(n.id,12)} ${n.name} ${f} ${n.mimeType??"-"}`);}console.log(`
48
- ${o$1.getFilesInFolder.total} files`);return}let s=await b(E,{pagination:i});if(e.format){g(e,{files:s.getFilesInFolder.files});return}for(let o$1 of s.getFilesInFolder.files){let n=o$1.size?`${o$1.size}b`:"-";console.log(` \u{1F4C4} ${o(o$1.id,12)} ${o$1.name} ${n} ${o$1.mimeType??"-"}`);}console.log(`
49
- ${s.getFilesInFolder.total} files`);}catch(i){f(i);}}),a.command("upload").description("Upload a local file (initiates a multipart session)").argument("<path>","Local file path").option("--folder <folderId>","Target folder id").option("--visibility <v>","PRIVATE|WORKSPACE|PUBLIC","WORKSPACE").option("-f, --format <format>").action(async(t,e)=>{try{let i=statSync(t),s=basename(t),o=extname(t).slice(1)||void 0,n=readFileSync(t),f=createHash("sha256").update(n).digest("hex"),A={fileName:s,fileSize:i.size,mimeType:"application/octet-stream",extension:o,folderId:e.folder,sha256Hash:f,visibility:(e.visibility??"WORKSPACE").toUpperCase()},I=await b(R,{input:A});j("Upload session created. PUT the local bytes to the returned URL(s)."),g(e,I.initiateUpload),j(`After uploading, complete with: vibecontrols files upload-complete --session ${I.initiateUpload.session.id}`);}catch(i){f(i);}}),a.command("upload-complete").description("Complete an in-flight upload session").requiredOption("--session <id>","Session id from `files upload`").option("--folder <folderId>").option("--description <s>").option("-f, --format <format>").action(async t=>{try{let e=await b(O,{input:{sessionId:t.session,folderId:t.folder,description:t.description}});h(`Upload complete: ${e.completeUpload.fileId}`),g(t,e.completeUpload.file);}catch(e){f(e);}});let g$1=a.command("share").description("Manage file shares");g$1.command("create").description("Create a share link for a file").argument("<fileId>").option("--access <a>","VIEW|DOWNLOAD","DOWNLOAD").option("--expires <iso>","Expiry timestamp").option("--password <p>").option("--max-downloads <n>","",t=>parseInt(t,10)).option("-f, --format <format>").action(async(t,e)=>{try{let i={fileId:t,shareType:"PUBLIC_LINK",accessLevel:(e.access??"DOWNLOAD").toUpperCase(),expiresAt:e.expires,password:e.password,maxDownloads:e.maxDownloads},s=await b(U,{input:i});h("Share created"),g(e,s.createShare);}catch(i){f(i);}}),g$1.command("revoke").description("Revoke a share by id").argument("<shareId>").action(async t=>{try{await b(w,{id:t}),h("Share revoked");}catch(e){f(e);}});}var v={id:"files",version:"1.0.0",displayName:"Files",dependsOn:["auth","workspaces"],register(c,a$1){a(a$1),x(c);}},q=v;export{q as default};
47
+ `,C=`
48
+ query GetFile($id: ID!) {
49
+ getFile(id: $id) {
50
+ id name description workspaceId folderId
51
+ mimeType extension size s3Key s3Bucket
52
+ downloadUrl status visibility
53
+ starred downloadCount viewCount sha256Hash
54
+ uploadedById createdAt updatedAt
55
+ tags
56
+ }
57
+ }
58
+ `,A=`
59
+ query GetFileDownloadUrl($id: ID!, $expiresIn: Int) {
60
+ getFileDownloadUrl(id: $id, expiresIn: $expiresIn)
61
+ }
62
+ `;function D(c){let s=c.command("files").description("Workspace file management");s.command("browse").description("Browse a folder (defaults to root)").argument("[folderId]").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async(t,e)=>{try{let o$1={limit:e.limit,offset:0};if(t){let i=await b(x,{folderId:t,pagination:o$1});if(e.format){g(e,{folder:i.getFolder,files:i.getFilesInFolder.files});return}i.getFolder&&j(`Folder: ${i.getFolder.name}`);for(let n of i.getFilesInFolder.files){let f=n.size?`${n.size}b`:"-";console.log(` \u{1F4C4} ${o(n.id,12)} ${n.name} ${f} ${n.mimeType??"-"}`);}console.log(`
63
+ ${i.getFilesInFolder.total} files`);return}let d=await b(h,{pagination:o$1});if(e.format){g(e,{files:d.getFilesInFolder.files});return}for(let i of d.getFilesInFolder.files){let n=i.size?`${i.size}b`:"-";console.log(` \u{1F4C4} ${o(i.id,12)} ${i.name} ${n} ${i.mimeType??"-"}`);}console.log(`
64
+ ${d.getFilesInFolder.total} files`);}catch(o){f(o);}}),s.command("upload").description("Upload a local file (initiates a multipart session)").argument("<path>","Local file path").option("--folder <folderId>","Target folder id").option("--visibility <v>","PRIVATE|WORKSPACE|PUBLIC","WORKSPACE").option("-f, --format <format>").action(async(t,e)=>{try{let o=statSync(t),d=basename(t),i=extname(t).slice(1)||void 0,n=readFileSync(t),f=createHash("sha256").update(n).digest("hex"),L={fileName:d,fileSize:o.size,mimeType:"application/octet-stream",extension:i,folderId:e.folder,sha256Hash:f,visibility:(e.visibility??"WORKSPACE").toUpperCase()},I=await b(E,{input:L});j("Upload session created. PUT the local bytes to the returned URL(s)."),g(e,I.initiateUpload),j(`After uploading, complete with: vibecontrols files upload-complete --session ${I.initiateUpload.session.id}`);}catch(o){f(o);}}),s.command("upload-complete").description("Complete an in-flight upload session").requiredOption("--session <id>","Session id from `files upload`").option("--folder <folderId>").option("--description <s>").option("-f, --format <format>").action(async t=>{try{let e=await b(R,{input:{sessionId:t.session,folderId:t.folder,description:t.description}});h$1(`Upload complete: ${e.completeUpload.fileId}`),g(t,e.completeUpload.file);}catch(e){f(e);}}),s.command("get").description("Get a file by id").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let o=await b(C,{id:t});if(!o.getFile)throw new o$1(`File ${t} not found`);g(e,o.getFile);}catch(o){f(o);}}),s.command("download").description("Get a pre-signed download URL for a file").argument("<id>").option("--expires <seconds>","URL expiry in seconds",t=>parseInt(t,10)).option("-f, --format <format>").action(async(t,e)=>{try{let o=await b(A,{id:t,expiresIn:e.expires});if(e.format){g(e,{url:o.getFileDownloadUrl});return}h$1("Download URL:"),console.log(o.getFileDownloadUrl);}catch(o){f(o);}});let u=s.command("share").description("Manage file shares");u.command("create").description("Create a share link for a file").argument("<fileId>").option("--access <a>","VIEW|DOWNLOAD","DOWNLOAD").option("--expires <iso>","Expiry timestamp").option("--password <p>").option("--max-downloads <n>","",t=>parseInt(t,10)).option("-f, --format <format>").action(async(t,e)=>{try{let o={fileId:t,shareType:"PUBLIC_LINK",accessLevel:(e.access??"DOWNLOAD").toUpperCase(),expiresAt:e.expires,password:e.password,maxDownloads:e.maxDownloads},d=await b($,{input:o});h$1("Share created"),g(e,d.createShare);}catch(o){f(o);}}),u.command("revoke").description("Revoke a share by id").argument("<shareId>").action(async t=>{try{await b(O,{id:t}),h$1("Share revoked");}catch(e){f(e);}});}var B={id:"files",version:"1.0.0",displayName:"Files",dependsOn:["auth","workspaces"],register(c,s){a(s),D(c);}},V=B;export{V as default};