@burdenoff/cli-sdk 2026.627.5 → 2026.629.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.
@@ -0,0 +1,325 @@
1
+ import {a,b as b$1,h,p as p$1,g,i,o as o$1,d}from'../../chunk-WXDQ3S5J.js';import {o}from'../../chunk-TCBALVP4.js';var C=`
2
+ query SubGetProvider($id: ID!) {
3
+ subProvider(id: $id) {
4
+ id name slug description category status industry language region
5
+ websiteUrl logoFileId tags churnRiskScore vendorHealthScore
6
+ createdAt updatedAt workspaceId
7
+ plans {
8
+ id name amount currency interval isActive
9
+ }
10
+ }
11
+ }
12
+ `,R=`
13
+ query SubListProviders(
14
+ $category: SubProviderCategory
15
+ $search: String
16
+ $status: SubProviderStatus
17
+ $pagination: PaginationInput
18
+ ) {
19
+ subListProviders(
20
+ category: $category
21
+ search: $search
22
+ status: $status
23
+ pagination: $pagination
24
+ ) {
25
+ items {
26
+ id name slug category status industry region churnRiskScore
27
+ vendorHealthScore createdAt
28
+ }
29
+ pageInfo { cursor hasMore }
30
+ }
31
+ }
32
+ `,S=`
33
+ mutation SubCreateProvider($input: SubCreateProviderInput!) {
34
+ subCreateProvider(input: $input) {
35
+ id name slug description category status industry language region
36
+ websiteUrl tags createdAt
37
+ }
38
+ }
39
+ `,v=`
40
+ mutation SubUpdateProvider($id: ID!, $input: SubUpdateProviderInput!) {
41
+ subUpdateProvider(id: $id, input: $input) {
42
+ id name slug description category status industry language region
43
+ websiteUrl tags churnRiskScore vendorHealthScore updatedAt
44
+ }
45
+ }
46
+ `,E=`
47
+ mutation SubArchiveProvider($id: ID!) {
48
+ subArchiveProvider(id: $id)
49
+ }
50
+ `,k=`
51
+ query SubListPlans($providerId: ID) {
52
+ subListPlans(providerId: $providerId) {
53
+ id providerId name description amount currency interval features
54
+ isActive createdAt updatedAt workspaceId
55
+ }
56
+ }
57
+ `,O=`
58
+ mutation SubCreatePlan($input: SubCreatePlanInput!) {
59
+ subCreatePlan(input: $input) {
60
+ id providerId name description amount currency interval features
61
+ isActive createdAt
62
+ }
63
+ }
64
+ `,L=`
65
+ query SubGetRelationship($id: ID!) {
66
+ subRelationship(id: $id) {
67
+ id ownerId label kind status providerId planId amount currency interval
68
+ autoRenew discoverySource healthScore notes tags startedAt renewsAt
69
+ trialEndsAt cancelledAt createdAt updatedAt workspaceId
70
+ provider { id name category status }
71
+ plan { id name amount currency interval }
72
+ entitlements { id name type quota used isActive }
73
+ assets { id name type expiresAt }
74
+ renewalEvents { id eventType occursAt amount currency notified }
75
+ }
76
+ }
77
+ `,T=`
78
+ query SubListRelationships(
79
+ $kind: SubRelationshipKind
80
+ $ownerId: ID
81
+ $providerId: ID
82
+ $status: SubRelationshipStatus
83
+ $pagination: PaginationInput
84
+ ) {
85
+ subListRelationships(
86
+ kind: $kind
87
+ ownerId: $ownerId
88
+ providerId: $providerId
89
+ status: $status
90
+ pagination: $pagination
91
+ ) {
92
+ items {
93
+ id ownerId label kind status providerId planId amount currency
94
+ interval autoRenew renewsAt healthScore createdAt
95
+ }
96
+ pageInfo { cursor hasMore }
97
+ }
98
+ }
99
+ `,P=`
100
+ mutation SubCreateRelationship($input: SubCreateRelationshipInput!) {
101
+ subCreateRelationship(input: $input) {
102
+ id ownerId label kind status providerId planId amount currency interval
103
+ autoRenew discoverySource startedAt renewsAt trialEndsAt tags createdAt
104
+ }
105
+ }
106
+ `,D=`
107
+ mutation SubUpdateRelationship($id: ID!, $input: SubUpdateRelationshipInput!) {
108
+ subUpdateRelationship(id: $id, input: $input) {
109
+ id ownerId label kind status providerId planId amount currency interval
110
+ autoRenew healthScore notes tags renewsAt startedAt trialEndsAt updatedAt
111
+ }
112
+ }
113
+ `,$=`
114
+ mutation SubCancelRelationship($id: ID!) {
115
+ subCancelRelationship(id: $id) {
116
+ id label status cancelledAt updatedAt
117
+ }
118
+ }
119
+ `,x=`
120
+ mutation SubTransitionRelationship($id: ID!, $status: SubRelationshipStatus!) {
121
+ subTransitionRelationship(id: $id, status: $status) {
122
+ id label status updatedAt
123
+ }
124
+ }
125
+ `,N=`
126
+ query SubListRenewalEvents($relationshipId: ID, $upcomingOnly: Boolean) {
127
+ subListRenewalEvents(relationshipId: $relationshipId, upcomingOnly: $upcomingOnly) {
128
+ id relationshipId eventType detail amount currency occursAt notified
129
+ createdAt updatedAt workspaceId
130
+ }
131
+ }
132
+ `,_=`
133
+ query SubListAssets($relationshipId: ID!) {
134
+ subListAssets(relationshipId: $relationshipId) {
135
+ id relationshipId name type secretRef expiresAt createdAt updatedAt
136
+ workspaceId
137
+ file { id }
138
+ }
139
+ }
140
+ `,U=`
141
+ mutation SubCreateAsset($input: SubCreateAssetInput!) {
142
+ subCreateAsset(input: $input) {
143
+ id relationshipId name type secretRef expiresAt createdAt
144
+ file { id }
145
+ }
146
+ }
147
+ `,M=`
148
+ query SubListEntitlements($relationshipId: ID!) {
149
+ subListEntitlements(relationshipId: $relationshipId) {
150
+ id relationshipId name description type quota unit used isActive
151
+ createdAt updatedAt workspaceId
152
+ }
153
+ }
154
+ `,q=`
155
+ mutation SubCreateEntitlement($input: SubCreateEntitlementInput!) {
156
+ subCreateEntitlement(input: $input) {
157
+ id relationshipId name description type quota unit used isActive createdAt
158
+ }
159
+ }
160
+ `,W=`
161
+ query SubListInvoices(
162
+ $relationshipId: ID
163
+ $status: SubInvoiceStatus
164
+ $pagination: PaginationInput
165
+ ) {
166
+ subListInvoices(relationshipId: $relationshipId, status: $status, pagination: $pagination) {
167
+ items {
168
+ id relationshipId number status currency subtotal taxAmount total
169
+ issueDate dueDate paidAt createdAt
170
+ }
171
+ pageInfo { cursor hasMore }
172
+ }
173
+ }
174
+ `,H=`
175
+ mutation SubCreateInvoice($input: SubCreateInvoiceInput!) {
176
+ subCreateInvoice(input: $input) {
177
+ id relationshipId number status currency subtotal taxAmount total
178
+ lineItems issueDate dueDate createdAt
179
+ file { id }
180
+ }
181
+ }
182
+ `,F=`
183
+ mutation SubMarkInvoicePaid($id: ID!) {
184
+ subMarkInvoicePaid(id: $id) {
185
+ id number status total paidAt updatedAt
186
+ }
187
+ }
188
+ `,V=`
189
+ query SubListPaymentInstruments($ownerId: ID) {
190
+ subListPaymentInstruments(ownerId: $ownerId) {
191
+ id ownerId label type status brand last4 expiryMonth expiryYear
192
+ isDefault createdAt updatedAt workspaceId
193
+ }
194
+ }
195
+ `,G=`
196
+ mutation SubCreatePaymentInstrument($input: SubCreatePaymentInstrumentInput!) {
197
+ subCreatePaymentInstrument(input: $input) {
198
+ id ownerId label type status brand last4 expiryMonth expiryYear
199
+ isDefault createdAt
200
+ }
201
+ }
202
+ `,B=`
203
+ mutation SubRemovePaymentInstrument($id: ID!) {
204
+ subRemovePaymentInstrument(id: $id)
205
+ }
206
+ `,Y=`
207
+ query SubListChannels($ownerId: ID) {
208
+ subListChannels(ownerId: $ownerId) {
209
+ id ownerId type address label status ingestEnabled verifiedAt
210
+ createdAt updatedAt workspaceId
211
+ }
212
+ }
213
+ `,j=`
214
+ mutation SubCreateChannel($input: SubCreateChannelInput!) {
215
+ subCreateChannel(input: $input) {
216
+ id ownerId type address label status ingestEnabled createdAt
217
+ }
218
+ }
219
+ `,K=`
220
+ mutation SubVerifyChannel($id: ID!) {
221
+ subVerifyChannel(id: $id) {
222
+ id type address status verifiedAt updatedAt
223
+ }
224
+ }
225
+ `,J=`
226
+ query SubListInboxMessages(
227
+ $category: SubMessageCategory
228
+ $channelId: ID
229
+ $relationshipId: ID
230
+ $unreadOnly: Boolean
231
+ $pagination: PaginationInput
232
+ ) {
233
+ subListInboxMessages(
234
+ category: $category
235
+ channelId: $channelId
236
+ relationshipId: $relationshipId
237
+ unreadOnly: $unreadOnly
238
+ pagination: $pagination
239
+ ) {
240
+ items {
241
+ id channelId relationshipId category categoryConfidence subject preview
242
+ externalId isRead actionRequired receivedAt createdAt
243
+ }
244
+ pageInfo { cursor hasMore }
245
+ }
246
+ }
247
+ `,z=`
248
+ mutation SubIngestMessage($input: SubIngestMessageInput!) {
249
+ subIngestMessage(input: $input) {
250
+ id channelId relationshipId category categoryConfidence subject preview
251
+ externalId isRead actionRequired receivedAt createdAt
252
+ }
253
+ }
254
+ `,Q=`
255
+ mutation SubMarkMessageRead($id: ID!) {
256
+ subMarkMessageRead(id: $id) {
257
+ id subject category isRead updatedAt
258
+ }
259
+ }
260
+ `,X=`
261
+ query SubGetAgent($id: ID!) {
262
+ subAgent(id: $id) {
263
+ id ownerId name description kind status config lastRunAt
264
+ createdAt updatedAt workspaceId
265
+ policies {
266
+ id name action isEnabled triggerCount lastTriggeredAt
267
+ }
268
+ }
269
+ }
270
+ `,Z=`
271
+ query SubListAgents($kind: SubAgentKind, $ownerId: ID, $status: SubAgentStatus) {
272
+ subListAgents(kind: $kind, ownerId: $ownerId, status: $status) {
273
+ id ownerId name description kind status lastRunAt createdAt
274
+ }
275
+ }
276
+ `,tt=`
277
+ mutation SubCreateAgent($input: SubCreateAgentInput!) {
278
+ subCreateAgent(input: $input) {
279
+ id ownerId name description kind status config createdAt
280
+ }
281
+ }
282
+ `,et=`
283
+ mutation SubSetAgentStatus($id: ID!, $status: SubAgentStatus!) {
284
+ subSetAgentStatus(id: $id, status: $status) {
285
+ id name kind status updatedAt
286
+ }
287
+ }
288
+ `,nt=`
289
+ query SubListPolicies($agentId: ID) {
290
+ subListPolicies(agentId: $agentId) {
291
+ id agentId name description action condition isEnabled triggerCount
292
+ lastTriggeredAt createdAt updatedAt workspaceId
293
+ }
294
+ }
295
+ `,it=`
296
+ mutation SubCreatePolicy($input: SubCreatePolicyInput!) {
297
+ subCreatePolicy(input: $input) {
298
+ id agentId name description action condition isEnabled triggerCount
299
+ createdAt
300
+ }
301
+ }
302
+ `,rt=`
303
+ query SubListWorkflows($status: SubWorkflowStatus) {
304
+ subListWorkflows(status: $status) {
305
+ id name description triggerEvent status runCount lastRunAt
306
+ createdAt updatedAt workspaceId
307
+ }
308
+ }
309
+ `,st=`
310
+ mutation SubCreateWorkflow($input: SubCreateWorkflowInput!) {
311
+ subCreateWorkflow(input: $input) {
312
+ id name description triggerEvent steps status runCount createdAt
313
+ }
314
+ }
315
+ `,ot=`
316
+ mutation SubActivateWorkflow($id: ID!) {
317
+ subActivateWorkflow(id: $id) {
318
+ id name status runCount lastRunAt updatedAt
319
+ }
320
+ }
321
+ `,at=`
322
+ query SubHealth {
323
+ subHealth
324
+ }
325
+ `;function y(d,i){try{return JSON.parse(i)}catch{throw new o(`--${d} must be valid JSON`)}}function p(d){let i=Number.parseInt(d,10);if(Number.isNaN(i))throw new o(`Expected an integer but got "${d}"`);return i}function b(d){let i=Number.parseFloat(d);if(Number.isNaN(i))throw new o(`Expected a number but got "${d}"`);return i}function I(d){return d.split(",").map(i=>i.trim()).filter(i=>i.length>0)}function dt(d){let i$1=d.command("providers").description("SubscriberBot provider registry (vendors / publishers / services)");i$1.command("list").description("List / search providers in the registry").option("--category <c>","Filter by provider category").option("--status <s>","Filter by provider status").option("--search <q>","Free-text search").option("--limit <n>","Page size",p,50).option("--offset <n>","Offset",p,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(R,{category:t.category?t.category.toUpperCase():void 0,status:t.status?t.status.toUpperCase():void 0,search:t.search,pagination:{limit:t.limit,offset:t.offset}});h(t,e.subListProviders.items,{headers:["ID","Name","Category","Status","Region","Churn"],rows:e.subListProviders.items.map(n=>[p$1(n.id,12),n.name,n.category,n.status,n.region??"-",n.churnRiskScore!=null?String(n.churnRiskScore):"-"])});}catch(e){g(e);}}),i$1.command("get").description("Get a provider by id").argument("<id>","Provider ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(C,{id:t});if(!n.subProvider)throw new o(`Provider ${t} not found`);h(e,n.subProvider);}catch(n){g(n);}}),i$1.command("create").description("Create a provider").requiredOption("--name <name>","Provider name").option("--category <c>","Provider category","OTHER").option("--status <s>","Provider status","UNVERIFIED").option("--slug <slug>","URL slug").option("--description <s>","Description").option("--industry <s>","Industry").option("--language <s>","Language").option("--region <s>","Region").option("--website-url <url>","Website URL").option("--logo-file-id <id>","Logo file ID").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,category:(t.category??"OTHER").toUpperCase(),status:(t.status??"UNVERIFIED").toUpperCase()};t.slug&&(e.slug=t.slug),t.description&&(e.description=t.description),t.industry&&(e.industry=t.industry),t.language&&(e.language=t.language),t.region&&(e.region=t.region),t.websiteUrl&&(e.websiteUrl=t.websiteUrl),t.logoFileId&&(e.logoFileId=t.logoFileId),t.tags&&(e.tags=I(t.tags));let n=await b$1(S,{input:e});i(`Provider created: ${n.subCreateProvider.name}`),h(t,n.subCreateProvider);}catch(e){g(e);}}),i$1.command("update").description("Update a provider").argument("<id>","Provider ID").option("--name <name>","Provider name").option("--category <c>","Provider category").option("--status <s>","Provider status").option("--slug <slug>","URL slug").option("--description <s>","Description").option("--industry <s>","Industry").option("--language <s>","Language").option("--region <s>","Region").option("--website-url <url>","Website URL").option("--logo-file-id <id>","Logo file ID").option("--churn-risk-score <n>","Churn risk score",p).option("--vendor-health-score <n>","Vendor health score",p).option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.category&&(n.category=e.category.toUpperCase()),e.status&&(n.status=e.status.toUpperCase()),e.slug&&(n.slug=e.slug),e.description!==void 0&&(n.description=e.description),e.industry&&(n.industry=e.industry),e.language&&(n.language=e.language),e.region&&(n.region=e.region),e.websiteUrl&&(n.websiteUrl=e.websiteUrl),e.logoFileId&&(n.logoFileId=e.logoFileId),e.churnRiskScore!==void 0&&(n.churnRiskScore=e.churnRiskScore),e.vendorHealthScore!==void 0&&(n.vendorHealthScore=e.vendorHealthScore),e.tags&&(n.tags=I(e.tags)),!Object.keys(n).length)throw new o("No updates specified");let h$1=await b$1(v,{id:t,input:n});i("Provider updated"),h(e,h$1.subUpdateProvider);}catch(n){g(n);}}),i$1.command("archive").description("Archive (soft-delete) a provider").argument("<id>","Provider ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(E,{id:t});i(`Provider ${t} archived`),h(e,{archived:n.subArchiveProvider});}catch(n){g(n);}});}function ut(d){let i$1=d.command("plans").description("SubscriberBot provider plans");i$1.command("list").description("List plans (optionally filtered by provider)").option("--provider <id>","Filter by provider ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(k,{providerId:t.provider});h(t,e.subListPlans,{headers:["ID","Name","Amount","Currency","Interval","Active"],rows:e.subListPlans.map(n=>[p$1(n.id,12),n.name,String(n.amount),n.currency,n.interval,n.isActive?"yes":"no"])});}catch(e){g(e);}}),i$1.command("create").description("Create a plan for a provider").requiredOption("--provider <id>","Provider ID").requiredOption("--name <name>","Plan name").option("--amount <n>","Amount",b).option("--currency <c>","Currency code").option("--interval <i>","Billing interval","MONTHLY").option("--description <s>","Description").option("--features <csv>","Comma-separated feature list").option("-f, --format <format>","Output format").action(async t=>{try{let e={providerId:t.provider,name:t.name,interval:(t.interval??"MONTHLY").toUpperCase()};t.amount!==void 0&&(e.amount=t.amount),t.currency&&(e.currency=t.currency),t.description&&(e.description=t.description),t.features&&(e.features=I(t.features));let n=await b$1(O,{input:e});i(`Plan created: ${n.subCreatePlan.name}`),h(t,n.subCreatePlan);}catch(e){g(e);}});}function pt(d){let i$1=d.command("relationships").description("SubscriberBot subscriptions, memberships & recurring relationships");i$1.command("list").description("List relationships").option("--kind <k>","Filter by relationship kind").option("--owner <id>","Filter by owner ID").option("--provider <id>","Filter by provider ID").option("--status <s>","Filter by relationship status").option("--limit <n>","Page size",p,50).option("--offset <n>","Offset",p,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(T,{kind:t.kind?t.kind.toUpperCase():void 0,ownerId:t.owner,providerId:t.provider,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});h(t,e.subListRelationships.items,{headers:["ID","Label","Kind","Status","Amount","Renews"],rows:e.subListRelationships.items.map(n=>[p$1(n.id,12),n.label,n.kind,n.status,`${n.amount} ${n.currency}`,o$1(n.renewsAt)])});}catch(e){g(e);}}),i$1.command("get").description("Get a relationship by id").argument("<id>","Relationship ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(L,{id:t});if(!n.subRelationship)throw new o(`Relationship ${t} not found`);h(e,n.subRelationship);}catch(n){g(n);}}),i$1.command("create").description("Create a relationship (subscription / membership / \u2026)").requiredOption("--label <label>","Human-readable label").option("--kind <k>","Relationship kind","SUBSCRIPTION").option("--status <s>","Relationship status","ACTIVE").option("--owner <id>","Owner ID").option("--provider <id>","Provider ID").option("--plan <id>","Plan ID").option("--amount <n>","Amount",b).option("--currency <c>","Currency code").option("--interval <i>","Billing interval","MONTHLY").option("--discovery-source <s>","Discovery source","MANUAL").option("--no-auto-renew","Disable auto-renew").option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("--started-at <iso>","Started at (ISO date)").option("--renews-at <iso>","Renews at (ISO date)").option("--trial-ends-at <iso>","Trial end (ISO date)").option("-f, --format <format>","Output format").action(async t=>{try{let e={label:t.label,kind:(t.kind??"SUBSCRIPTION").toUpperCase(),status:(t.status??"ACTIVE").toUpperCase(),interval:(t.interval??"MONTHLY").toUpperCase(),discoverySource:(t.discoverySource??"MANUAL").toUpperCase(),autoRenew:t.autoRenew!==!1};t.owner&&(e.ownerId=t.owner),t.provider&&(e.providerId=t.provider),t.plan&&(e.planId=t.plan),t.amount!==void 0&&(e.amount=t.amount),t.currency&&(e.currency=t.currency),t.notes&&(e.notes=t.notes),t.tags&&(e.tags=I(t.tags)),t.startedAt&&(e.startedAt=t.startedAt),t.renewsAt&&(e.renewsAt=t.renewsAt),t.trialEndsAt&&(e.trialEndsAt=t.trialEndsAt);let n=await b$1(P,{input:e});i(`Relationship created: ${n.subCreateRelationship.label}`),h(t,n.subCreateRelationship);}catch(e){g(e);}}),i$1.command("update").description("Update a relationship").argument("<id>","Relationship ID").option("--label <label>","Label").option("--kind <k>","Relationship kind").option("--provider <id>","Provider ID").option("--plan <id>","Plan ID").option("--amount <n>","Amount",b).option("--currency <c>","Currency code").option("--interval <i>","Billing interval").option("--auto-renew <bool>","true|false",t=>t==="true").option("--health-score <n>","Health score",p).option("--notes <s>","Notes").option("--tags <csv>","Comma-separated tags").option("--started-at <iso>","Started at (ISO date)").option("--renews-at <iso>","Renews at (ISO date)").option("--trial-ends-at <iso>","Trial end (ISO date)").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n={};if(e.label&&(n.label=e.label),e.kind&&(n.kind=e.kind.toUpperCase()),e.provider&&(n.providerId=e.provider),e.plan&&(n.planId=e.plan),e.amount!==void 0&&(n.amount=e.amount),e.currency&&(n.currency=e.currency),e.interval&&(n.interval=e.interval.toUpperCase()),e.autoRenew!==void 0&&(n.autoRenew=e.autoRenew),e.healthScore!==void 0&&(n.healthScore=e.healthScore),e.notes!==void 0&&(n.notes=e.notes),e.tags&&(n.tags=I(e.tags)),e.startedAt&&(n.startedAt=e.startedAt),e.renewsAt&&(n.renewsAt=e.renewsAt),e.trialEndsAt&&(n.trialEndsAt=e.trialEndsAt),!Object.keys(n).length)throw new o("No updates specified");let h$1=await b$1(D,{id:t,input:n});i("Relationship updated"),h(e,h$1.subUpdateRelationship);}catch(n){g(n);}}),i$1.command("cancel").description("Cancel a relationship").argument("<id>","Relationship ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1($,{id:t});i(`Relationship cancelled: ${n.subCancelRelationship.label}`),h(e,n.subCancelRelationship);}catch(n){g(n);}}),i$1.command("transition").description("Advance a relationship through its lifecycle").argument("<id>","Relationship ID").requiredOption("--status <s>","ACTIVE|TRIAL|PAST_DUE|PAUSED|CANCELLED|EXPIRED|LAPSED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(x,{id:t,status:e.status.toUpperCase()});i(`Relationship status set to ${n.subTransitionRelationship.status}`),h(e,n.subTransitionRelationship);}catch(n){g(n);}}),i$1.command("renewals").description("List renewal events").option("--relationship <id>","Filter by relationship ID").option("--upcoming-only","Only upcoming events").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(N,{relationshipId:t.relationship,upcomingOnly:t.upcomingOnly?!0:void 0});h(t,e.subListRenewalEvents,{headers:["ID","Relationship","Type","Amount","Occurs","Notified"],rows:e.subListRenewalEvents.map(n=>[p$1(n.id,12),p$1(n.relationshipId,12),n.eventType,n.amount!=null?`${n.amount} ${n.currency??""}`.trim():"-",o$1(n.occursAt),n.notified?"yes":"no"])});}catch(e){g(e);}});}function ct(d){let i$1=d.command("assets").description("SubscriberBot relationship assets (contracts, licenses, credentials, \u2026)");i$1.command("list").description("List assets for a relationship").requiredOption("--relationship <id>","Relationship ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(_,{relationshipId:t.relationship});h(t,e.subListAssets,{headers:["ID","Name","Type","Secret","Expires"],rows:e.subListAssets.map(n=>[p$1(n.id,12),n.name,n.type,n.secretRef?"yes":"no",o$1(n.expiresAt)])});}catch(e){g(e);}}),i$1.command("create").description("Create an asset on a relationship").requiredOption("--relationship <id>","Relationship ID").requiredOption("--name <name>","Asset name").option("--type <t>","Asset type","RECEIPT").option("--file-id <id>","Referenced file ID (blob lives in wspace-files-svc)").option("--secret-ref <ref>","Secret reference").option("--expires-at <iso>","Expiry (ISO date)").option("-f, --format <format>","Output format").action(async t=>{try{let e={relationshipId:t.relationship,name:t.name,type:(t.type??"RECEIPT").toUpperCase()};t.fileId&&(e.fileId=t.fileId),t.secretRef&&(e.secretRef=t.secretRef),t.expiresAt&&(e.expiresAt=t.expiresAt);let n=await b$1(U,{input:e});i(`Asset created: ${n.subCreateAsset.name}`),h(t,n.subCreateAsset);}catch(e){g(e);}});}function mt(d){let i$1=d.command("entitlements").description("SubscriberBot relationship entitlements (seats, quotas, features, \u2026)");i$1.command("list").description("List entitlements for a relationship").requiredOption("--relationship <id>","Relationship ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(M,{relationshipId:t.relationship});h(t,e.subListEntitlements,{headers:["ID","Name","Type","Used","Quota","Active"],rows:e.subListEntitlements.map(n=>[p$1(n.id,12),n.name,n.type,String(n.used),n.quota!=null?String(n.quota):"-",n.isActive?"yes":"no"])});}catch(e){g(e);}}),i$1.command("create").description("Create an entitlement on a relationship").requiredOption("--relationship <id>","Relationship ID").requiredOption("--name <name>","Entitlement name").option("--type <t>","Entitlement type","FEATURE_ACCESS").option("--description <s>","Description").option("--quota <n>","Quota",p).option("--unit <u>","Quota unit").option("-f, --format <format>","Output format").action(async t=>{try{let e={relationshipId:t.relationship,name:t.name,type:(t.type??"FEATURE_ACCESS").toUpperCase()};t.description&&(e.description=t.description),t.quota!==void 0&&(e.quota=t.quota),t.unit&&(e.unit=t.unit);let n=await b$1(q,{input:e});i(`Entitlement created: ${n.subCreateEntitlement.name}`),h(t,n.subCreateEntitlement);}catch(e){g(e);}});}function lt(d){let i$1=d.command("invoices").description("SubscriberBot invoices");i$1.command("list").description("List invoices").option("--relationship <id>","Filter by relationship ID").option("--status <s>","Filter by invoice status").option("--limit <n>","Page size",p,50).option("--offset <n>","Offset",p,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(W,{relationshipId:t.relationship,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});h(t,e.subListInvoices.items,{headers:["ID","Number","Status","Total","Currency","Due"],rows:e.subListInvoices.items.map(n=>[p$1(n.id,12),n.number??"-",n.status,String(n.total),n.currency,o$1(n.dueDate)])});}catch(e){g(e);}}),i$1.command("create").description("Create an invoice on a relationship").requiredOption("--relationship <id>","Relationship ID").option("--number <n>","Invoice number").option("--status <s>","Invoice status","ISSUED").option("--currency <c>","Currency code").option("--subtotal <n>","Subtotal",b).option("--tax-amount <n>","Tax amount",b).option("--total <n>","Total",b).option("--line-items <json>","Line items JSON").option("--issue-date <iso>","Issue date (ISO date)").option("--due-date <iso>","Due date (ISO date)").option("--payment-instrument <id>","Payment instrument ID").option("--file-id <id>","Referenced file ID (invoice PDF in wspace-files-svc)").option("-f, --format <format>","Output format").action(async t=>{try{let e={relationshipId:t.relationship,status:(t.status??"ISSUED").toUpperCase()};t.number&&(e.number=t.number),t.currency&&(e.currency=t.currency),t.subtotal!==void 0&&(e.subtotal=t.subtotal),t.taxAmount!==void 0&&(e.taxAmount=t.taxAmount),t.total!==void 0&&(e.total=t.total),t.lineItems&&(e.lineItems=y("line-items",t.lineItems)),t.issueDate&&(e.issueDate=t.issueDate),t.dueDate&&(e.dueDate=t.dueDate),t.paymentInstrument&&(e.paymentInstrumentId=t.paymentInstrument),t.fileId&&(e.fileId=t.fileId);let n=await b$1(H,{input:e});i(`Invoice created: ${n.subCreateInvoice.number??n.subCreateInvoice.id}`),h(t,n.subCreateInvoice);}catch(e){g(e);}}),i$1.command("mark-paid").description("Mark an invoice as paid").argument("<id>","Invoice ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(F,{id:t});i(`Invoice marked paid: ${n.subMarkInvoicePaid.number??n.subMarkInvoicePaid.id}`),h(e,n.subMarkInvoicePaid);}catch(n){g(n);}});}function gt(d){let i$1=d.command("payment-instruments").description("SubscriberBot payment instruments (cards, wallets, bank accounts, \u2026)");i$1.command("list").description("List payment instruments").option("--owner <id>","Filter by owner ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(V,{ownerId:t.owner});h(t,e.subListPaymentInstruments,{headers:["ID","Label","Type","Status","Brand","Last4","Default"],rows:e.subListPaymentInstruments.map(n=>[p$1(n.id,12),n.label,n.type,n.status,n.brand??"-",n.last4??"-",n.isDefault?"yes":"no"])});}catch(e){g(e);}}),i$1.command("create").description("Add a payment instrument").requiredOption("--label <label>","Label").option("--type <t>","Payment instrument type","CARD").option("--owner <id>","Owner ID").option("--brand <b>","Card/instrument brand").option("--last4 <n>","Last 4 digits").option("--expiry-month <n>","Expiry month",p).option("--expiry-year <n>","Expiry year",p).option("--processor-token <t>","Processor token").option("--default","Mark as default").option("-f, --format <format>","Output format").action(async t=>{try{let e={label:t.label,type:(t.type??"CARD").toUpperCase(),isDefault:t.default===!0};t.owner&&(e.ownerId=t.owner),t.brand&&(e.brand=t.brand),t.last4&&(e.last4=t.last4),t.expiryMonth!==void 0&&(e.expiryMonth=t.expiryMonth),t.expiryYear!==void 0&&(e.expiryYear=t.expiryYear),t.processorToken&&(e.processorToken=t.processorToken);let n=await b$1(G,{input:e});i(`Payment instrument added: ${n.subCreatePaymentInstrument.label}`),h(t,n.subCreatePaymentInstrument);}catch(e){g(e);}}),i$1.command("remove").description("Remove a payment instrument").argument("<id>","Payment instrument ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(B,{id:t});i(`Payment instrument ${t} removed`),h(e,{removed:n.subRemovePaymentInstrument});}catch(n){g(n);}});}function ft(d){let i$1=d.command("channels").description("SubscriberBot communication channels (email, sms, slack, webhook, \u2026)");i$1.command("list").description("List communication channels").option("--owner <id>","Filter by owner ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(Y,{ownerId:t.owner});h(t,e.subListChannels,{headers:["ID","Type","Address","Label","Status","Ingest"],rows:e.subListChannels.map(n=>[p$1(n.id,12),n.type,n.address,n.label??"-",n.status,n.ingestEnabled?"yes":"no"])});}catch(e){g(e);}}),i$1.command("create").description("Create a communication channel").requiredOption("--address <addr>","Channel address (email, phone, webhook URL, \u2026)").option("--type <t>","Channel type","EMAIL").option("--owner <id>","Owner ID").option("--label <label>","Label").option("--no-ingest","Disable message ingestion").option("-f, --format <format>","Output format").action(async t=>{try{let e={address:t.address,type:(t.type??"EMAIL").toUpperCase(),ingestEnabled:t.ingest!==!1};t.owner&&(e.ownerId=t.owner),t.label&&(e.label=t.label);let n=await b$1(j,{input:e});i(`Channel created: ${n.subCreateChannel.address}`),h(t,n.subCreateChannel);}catch(e){g(e);}}),i$1.command("verify").description("Mark a channel as verified").argument("<id>","Channel ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(K,{id:t});i(`Channel verified: ${n.subVerifyChannel.address}`),h(e,n.subVerifyChannel);}catch(n){g(n);}});}function bt(d){let i$1=d.command("inbox").description("SubscriberBot universal inbox (merged subscription communications)");i$1.command("list").description("List inbox messages").option("--category <c>","Filter by message category").option("--channel <id>","Filter by channel ID").option("--relationship <id>","Filter by relationship ID").option("--unread-only","Only unread messages").option("--limit <n>","Page size",p,50).option("--offset <n>","Offset",p,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(J,{category:t.category?t.category.toUpperCase():void 0,channelId:t.channel,relationshipId:t.relationship,unreadOnly:t.unreadOnly?!0:void 0,pagination:{limit:t.limit,offset:t.offset}});h(t,e.subListInboxMessages.items,{headers:["ID","Subject","Category","Read","Action","Received"],rows:e.subListInboxMessages.items.map(n=>[p$1(n.id,12),p$1(n.subject??"-",30),n.category,n.isRead?"yes":"no",n.actionRequired?"yes":"no",o$1(n.receivedAt)])});}catch(e){g(e);}}),i$1.command("ingest").description("Ingest a message into the universal inbox").requiredOption("--channel <id>","Channel ID").requiredOption("--received-at <iso>","Received at (ISO date)").option("--category <c>","Message category","OTHER").option("--relationship <id>","Relationship ID").option("--subject <s>","Subject").option("--preview <s>","Preview text").option("--external-id <id>","External message ID").option("--category-confidence <n>","Category confidence (0-100)",p).option("--action-required","Flag as action required").option("-f, --format <format>","Output format").action(async t=>{try{let e={channelId:t.channel,receivedAt:t.receivedAt,category:(t.category??"OTHER").toUpperCase(),actionRequired:t.actionRequired===!0};t.relationship&&(e.relationshipId=t.relationship),t.subject&&(e.subject=t.subject),t.preview&&(e.preview=t.preview),t.externalId&&(e.externalId=t.externalId),t.categoryConfidence!==void 0&&(e.categoryConfidence=t.categoryConfidence);let n=await b$1(z,{input:e});i(`Message ingested: ${n.subIngestMessage.id}`),h(t,n.subIngestMessage);}catch(e){g(e);}}),i$1.command("mark-read").description("Mark a message as read").argument("<id>","Message ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(Q,{id:t});i(`Message ${t} marked read`),h(e,n.subMarkMessageRead);}catch(n){g(n);}});}function It(d){let i$1=d.command("agents").description("SubscriberBot AI agents & their automation policies");i$1.command("list").description("List AI agents").option("--kind <k>","Filter by agent kind").option("--owner <id>","Filter by owner ID").option("--status <s>","Filter by agent status").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(Z,{kind:t.kind?t.kind.toUpperCase():void 0,ownerId:t.owner,status:t.status?t.status.toUpperCase():void 0});h(t,e.subListAgents,{headers:["ID","Name","Kind","Status","Description"],rows:e.subListAgents.map(n=>[p$1(n.id,12),n.name,n.kind,n.status,p$1(n.description??"-",30)])});}catch(e){g(e);}}),i$1.command("get").description("Get an agent by id").argument("<id>","Agent ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(X,{id:t});if(!n.subAgent)throw new o(`Agent ${t} not found`);h(e,n.subAgent);}catch(n){g(n);}}),i$1.command("create").description("Create an AI agent").requiredOption("--name <name>","Agent name").option("--kind <k>","Agent kind","DISCOVERY").option("--status <s>","Agent status","SUGGEST_ONLY").option("--owner <id>","Owner ID").option("--description <s>","Description").option("--config <json>","Agent config JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,kind:(t.kind??"DISCOVERY").toUpperCase(),status:(t.status??"SUGGEST_ONLY").toUpperCase()};t.owner&&(e.ownerId=t.owner),t.description&&(e.description=t.description),t.config&&(e.config=y("config",t.config));let n=await b$1(tt,{input:e});i(`Agent created: ${n.subCreateAgent.name}`),h(t,n.subCreateAgent);}catch(e){g(e);}}),i$1.command("set-status").description("Change an agent's operating posture").argument("<id>","Agent ID").requiredOption("--status <s>","DISABLED|SUGGEST_ONLY|AUTONOMOUS").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(et,{id:t,status:e.status.toUpperCase()});i(`Agent status set to ${n.subSetAgentStatus.status}`),h(e,n.subSetAgentStatus);}catch(n){g(n);}}),i$1.command("list-policies").description("List policies (optionally filtered by agent)").option("--agent <id>","Filter by agent ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(nt,{agentId:t.agent});h(t,e.subListPolicies,{headers:["ID","Name","Action","Enabled","Triggers"],rows:e.subListPolicies.map(n=>[p$1(n.id,12),n.name,n.action,n.isEnabled?"yes":"no",String(n.triggerCount??0)])});}catch(e){g(e);}}),i$1.command("create-policy").description("Create an automation policy for an agent").requiredOption("--agent <id>","Agent ID").requiredOption("--name <name>","Policy name").option("--action <a>","Policy action","ALERT").option("--description <s>","Description").option("--condition <json>","Condition JSON").option("--no-enabled","Create disabled").option("-f, --format <format>","Output format").action(async t=>{try{let e={agentId:t.agent,name:t.name,action:(t.action??"ALERT").toUpperCase(),isEnabled:t.enabled!==!1};t.description&&(e.description=t.description),t.condition&&(e.condition=y("condition",t.condition));let n=await b$1(it,{input:e});i(`Policy created: ${n.subCreatePolicy.name}`),h(t,n.subCreatePolicy);}catch(e){g(e);}});}function yt(d){let i$1=d.command("workflows").description("SubscriberBot automation workflows");i$1.command("list").description("List workflows").option("--status <s>","Filter by workflow status").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b$1(rt,{status:t.status?t.status.toUpperCase():void 0});h(t,e.subListWorkflows,{headers:["ID","Name","Trigger","Status","Runs"],rows:e.subListWorkflows.map(n=>[p$1(n.id,12),n.name,n.triggerEvent,n.status,String(n.runCount??0)])});}catch(e){g(e);}}),i$1.command("create").description("Create a workflow").requiredOption("--name <name>","Workflow name").requiredOption("--trigger-event <e>","Trigger event").option("--description <s>","Description").option("--steps <json>","Steps JSON").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name,triggerEvent:t.triggerEvent};t.description&&(e.description=t.description),t.steps&&(e.steps=y("steps",t.steps));let n=await b$1(st,{input:e});i(`Workflow created: ${n.subCreateWorkflow.name}`),h(t,n.subCreateWorkflow);}catch(e){g(e);}}),i$1.command("activate").description("Activate a workflow").argument("<id>","Workflow ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let n=await b$1(ot,{id:t});i(`Workflow activated: ${n.subActivateWorkflow.name}`),h(e,n.subActivateWorkflow);}catch(n){g(n);}});}function ht(d$1){d$1.command("health").description("SubscriberBot service health check (public)").option("-f, --format <format>","Output format").action(async i$1=>{try{let t=await d(at);i(t.subHealth),h(i$1,{health:t.subHealth});}catch(t){g(t);}});}var At={id:"subscriberbot",version:"1.0.0",displayName:"SubscriberBot",dependsOn:["auth","workspaces"],register(d,i){a(i);let t=d.command("subscriberbot").description("SubscriberBot universal subscription & relationship management");dt(t),ut(t),pt(t),ct(t),mt(t),lt(t),gt(t),ft(t),bt(t),It(t),yt(t),ht(t);}},we=At;export{we as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/cli-sdk",
3
- "version": "2026.627.5",
3
+ "version": "2026.629.1",
4
4
  "description": "Modular CLI SDK shared across all Burdenoff product CLIs (vibecontrols, botlit, fluidgrids, bigconsole, healthybowl, devportal, workspaces). Each module exports CliModule contract; product CLIs become thin shells that pick which modules to mount.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",