@burdenoff/cli-sdk 2026.526.2 → 2026.527.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.
- package/dist/{chunk-KTKHJORN.js → chunk-LZQBJDKZ.js} +1 -1
- package/dist/chunk-TCBALVP4.js +32 -0
- package/dist/core/index.cjs +7 -7
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{module-Bv5zhYt2.d.cts → module-DxCuik6L.d.cts} +1 -0
- package/dist/{module-Bv5zhYt2.d.ts → module-DxCuik6L.d.ts} +1 -0
- package/dist/modules/auth/index.cjs +4 -4
- package/dist/modules/auth/index.d.cts +1 -1
- package/dist/modules/auth/index.d.ts +1 -1
- package/dist/modules/auth/index.js +1 -1
- package/dist/modules/billing/index.cjs +2 -2
- package/dist/modules/billing/index.d.cts +1 -1
- package/dist/modules/billing/index.d.ts +1 -1
- package/dist/modules/billing/index.js +1 -1
- package/dist/modules/channels/index.cjs +4 -4
- package/dist/modules/channels/index.d.cts +1 -1
- package/dist/modules/channels/index.d.ts +1 -1
- package/dist/modules/channels/index.js +1 -1
- package/dist/modules/conversations/index.cjs +2 -2
- package/dist/modules/conversations/index.d.cts +1 -1
- package/dist/modules/conversations/index.d.ts +1 -1
- package/dist/modules/conversations/index.js +1 -1
- package/dist/modules/devportal/index.cjs +4 -4
- package/dist/modules/devportal/index.d.cts +1 -1
- package/dist/modules/devportal/index.d.ts +1 -1
- package/dist/modules/devportal/index.js +1 -1
- package/dist/modules/export/index.d.cts +1 -1
- package/dist/modules/export/index.d.ts +1 -1
- package/dist/modules/export/index.js +1 -1
- package/dist/modules/files/index.cjs +5 -5
- package/dist/modules/files/index.d.cts +1 -1
- package/dist/modules/files/index.d.ts +1 -1
- package/dist/modules/files/index.js +1 -1
- package/dist/modules/groups/index.cjs +4 -4
- package/dist/modules/groups/index.d.cts +1 -1
- package/dist/modules/groups/index.d.ts +1 -1
- package/dist/modules/groups/index.js +1 -1
- package/dist/modules/health/index.d.cts +1 -1
- package/dist/modules/health/index.d.ts +1 -1
- package/dist/modules/integrations/index.cjs +4 -4
- package/dist/modules/integrations/index.d.cts +1 -1
- package/dist/modules/integrations/index.d.ts +1 -1
- package/dist/modules/integrations/index.js +1 -1
- package/dist/modules/notifications/index.d.cts +1 -1
- package/dist/modules/notifications/index.d.ts +1 -1
- package/dist/modules/notifications/index.js +1 -1
- package/dist/modules/organizations/index.cjs +4 -4
- package/dist/modules/organizations/index.d.cts +1 -1
- package/dist/modules/organizations/index.d.ts +1 -1
- package/dist/modules/organizations/index.js +1 -1
- package/dist/modules/products/index.cjs +8 -8
- package/dist/modules/products/index.d.cts +1 -1
- package/dist/modules/products/index.d.ts +1 -1
- package/dist/modules/products/index.js +1 -1
- package/dist/modules/rbac/index.cjs +3 -3
- package/dist/modules/rbac/index.d.cts +1 -1
- package/dist/modules/rbac/index.d.ts +1 -1
- package/dist/modules/rbac/index.js +1 -1
- package/dist/modules/sandbox/index.d.cts +1 -1
- package/dist/modules/sandbox/index.d.ts +1 -1
- package/dist/modules/sandbox/index.js +1 -1
- package/dist/modules/scheduler/index.cjs +10 -10
- package/dist/modules/scheduler/index.d.cts +1 -1
- package/dist/modules/scheduler/index.d.ts +1 -1
- package/dist/modules/scheduler/index.js +1 -1
- package/dist/modules/security/index.cjs +7 -7
- package/dist/modules/security/index.d.cts +1 -1
- package/dist/modules/security/index.d.ts +1 -1
- package/dist/modules/security/index.js +1 -1
- package/dist/modules/store/index.cjs +2 -2
- package/dist/modules/store/index.d.cts +1 -1
- package/dist/modules/store/index.d.ts +1 -1
- package/dist/modules/store/index.js +1 -1
- package/dist/modules/support/index.cjs +2 -2
- package/dist/modules/support/index.d.cts +1 -1
- package/dist/modules/support/index.d.ts +1 -1
- package/dist/modules/support/index.js +1 -1
- package/dist/modules/tags/index.cjs +2 -2
- package/dist/modules/tags/index.d.cts +1 -1
- package/dist/modules/tags/index.d.ts +1 -1
- package/dist/modules/tags/index.js +1 -1
- package/dist/modules/tours/index.cjs +2 -2
- package/dist/modules/tours/index.d.cts +1 -1
- package/dist/modules/tours/index.d.ts +1 -1
- package/dist/modules/tours/index.js +1 -1
- package/dist/modules/vibecontrols/index.cjs +51 -51
- package/dist/modules/vibecontrols/index.d.cts +1 -1
- package/dist/modules/vibecontrols/index.d.ts +1 -1
- package/dist/modules/vibecontrols/index.js +1 -1
- package/dist/modules/workspaces/index.cjs +10 -10
- package/dist/modules/workspaces/index.d.cts +1 -1
- package/dist/modules/workspaces/index.d.ts +1 -1
- package/dist/modules/workspaces/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-RNWXATAC.js +0 -32
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,c,g,o,m,n,f,h as h$1,r}from'../../chunk-
|
|
1
|
+
import {a,c,g,o,m,n,f,h as h$1,r}from'../../chunk-LZQBJDKZ.js';import'../../chunk-TCBALVP4.js';var h=`
|
|
2
2
|
query ListNotifications($filter: NotificationFilterInput, $limit: Int, $offset: Int) {
|
|
3
3
|
notifications(filter: $filter, limit: $limit, offset: $offset) {
|
|
4
4
|
items { id title message channel status isRead createdAt }
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
hasMore
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
`,
|
|
18
|
+
`,v=`
|
|
19
19
|
query MyOrganizationInvites($status: InviteStatus, $limit: Int, $offset: Int) {
|
|
20
20
|
myOrganizationInvites(status: $status, limit: $limit, offset: $offset) {
|
|
21
21
|
items {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
hasMore
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
`,
|
|
35
|
+
`,b=`
|
|
36
36
|
mutation AcceptOrganizationInvite($inviteId: ID!) {
|
|
37
37
|
acceptOrganizationInvite(inviteId: $inviteId) {
|
|
38
38
|
id
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
joinedAt
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
`,
|
|
45
|
+
`,T=`
|
|
46
46
|
mutation RejectOrganizationInvite($inviteId: ID!) {
|
|
47
47
|
rejectOrganizationInvite(inviteId: $inviteId) {
|
|
48
48
|
id
|
|
@@ -50,4 +50,4 @@
|
|
|
50
50
|
respondedAt
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
`;function
|
|
53
|
+
`;function E(e){let t=e.command("organizations").description("Organization membership & invites");t.command("list").description("List organizations the current user is a member of").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let o=await p(I,{limit:n.limit,offset:0});f(n,o.myOrganizations.items,{headers:["ID","Name","Slug","TenantID","Status","Created"],rows:o.myOrganizations.items.map(i=>[d(i.id,12),i.name,i.slug,d(i.tenantId,12),h(i.status),w(i.createdAt)])});}catch(o){l(o);}});let s=t.command("invites").description("Manage org invites");s.command("list").description("List pending org invites for the current user").option("--status <s>","Filter by invite status","PENDING").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let o=await p(v,{status:n.status?.toUpperCase(),limit:n.limit,offset:0});f(n,o.myOrganizationInvites.items,{headers:["InviteID","OrgID","Email","Role","Status","Expires"],rows:o.myOrganizationInvites.items.map(i=>[d(i.id,12),d(i.organizationId,12),i.email,i.role,h(i.status),w(i.expiresAt)])});}catch(o){l(o);}}),s.command("accept").description("Accept an organization invite").argument("<inviteId>").action(async n=>{try{await p(b,{inviteId:n}),m("Invite accepted");}catch(o){l(o);}}),s.command("decline").description("Decline an organization invite").argument("<inviteId>").action(async n=>{try{await p(T,{inviteId:n}),m("Invite declined");}catch(o){l(o);}});}var G={id:"organizations",version:"1.0.0",displayName:"Organizations",dependsOn:["auth"],register(e,t){y(t),E(e);}},Je=G;module.exports=Je;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,c,g,o,m,n,f as f$1,h}from'../../chunk-
|
|
1
|
+
import {a,c,g,o,m,n,f as f$1,h}from'../../chunk-LZQBJDKZ.js';import'../../chunk-TCBALVP4.js';var f=`
|
|
2
2
|
query MyOrganizations($limit: Int, $offset: Int) {
|
|
3
3
|
myOrganizations(limit: $limit, offset: $offset) {
|
|
4
4
|
items {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var l=class extends Error{exitCode;hint;constructor(o,d){super(o),this.name="CliUserError",this.exitCode=d?.exitCode??1,this.hint=d?.hint;}};var g=class extends Error{cause;constructor(o,d){super(o),this.name="CliInternalError",this.cause=d;}};var C=null;function
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var l=class extends Error{exitCode;hint;constructor(o,d){super(o),this.name="CliUserError",this.exitCode=d?.exitCode??1,this.hint=d?.hint;}};var g=class extends Error{cause;constructor(o,d){super(o),this.name="CliInternalError",this.cause=d;}};var C=null;function E(i){C=i;}function y(){if(!C)throw new g("vibecontrols module helpers used before setHelpersContext was called");return C}async function s(i,o){return y().gql.global.request(i,o)}function a(i){let o=i instanceof Error?i.message:String(i);throw new l(o)}function c(i,o,d){y().output.formatAndOutput(i,o,d);}function p(i){y().output.printSuccess(i);}function w(i){return y().output.formatStatus(i)}function f(i,o){return y().output.truncate(i,o)}var x=`
|
|
2
2
|
query ListProducts($filter: PlatformProductFilterInput, $limit: Int, $offset: Int) {
|
|
3
3
|
platformProducts(filter: $filter, limit: $limit, offset: $offset) {
|
|
4
4
|
items { id name slug status logoUrl appUrl }
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
id name slug status
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
`,
|
|
20
|
+
`,P=`
|
|
21
21
|
mutation UpdatePlatformProduct($id: ID!, $input: UpdatePlatformProductInput!) {
|
|
22
22
|
updatePlatformProduct(id: $id, input: $input) {
|
|
23
23
|
id name status
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
`,
|
|
26
|
+
`,A=`
|
|
27
27
|
mutation DeletePlatformProduct($id: ID!) {
|
|
28
28
|
deletePlatformProduct(id: $id)
|
|
29
29
|
}
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
id label shortcutKey isEnabled
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
`,D=`
|
|
49
49
|
mutation DeleteKeyboardShortcut($id: ID!) {
|
|
50
50
|
deleteKeyboardShortcut(id: $id)
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
`,$=`
|
|
53
53
|
query ListContentPages($productId: ID!, $filter: ContentPageFilterInput, $limit: Int) {
|
|
54
54
|
contentPages(productId: $productId, filter: $filter, limit: $limit) {
|
|
55
55
|
items { id slug title visibility isPublished }
|
|
@@ -67,11 +67,11 @@
|
|
|
67
67
|
id slug title isPublished
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
`,
|
|
70
|
+
`,_=`
|
|
71
71
|
mutation DeleteContentPage($id: ID!) {
|
|
72
72
|
deleteContentPage(id: $id)
|
|
73
73
|
}
|
|
74
|
-
`,
|
|
74
|
+
`,U=`
|
|
75
75
|
query ListFeatureFlags($filter: FeatureFlagFilterInput, $limit: Int) {
|
|
76
76
|
featureFlags(filter: $filter, limit: $limit) {
|
|
77
77
|
items { id key name flagType status defaultValue category productId }
|
|
@@ -99,4 +99,4 @@
|
|
|
99
99
|
evaluations { key flagType value variant reason }
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
`;function W(i){let o=i.command("products").description("Platform products, shortcuts, content-pages, feature-flags");o.command("list").description("List platform products").option("--search <q>").option("--status <s>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e={};t.search&&(e.search=t.search),t.status&&(e.status=t.status.toUpperCase());let n=await s(
|
|
102
|
+
`;function W(i){let o=i.command("products").description("Platform products, shortcuts, content-pages, feature-flags");o.command("list").description("List platform products").option("--search <q>").option("--status <s>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e={};t.search&&(e.search=t.search),t.status&&(e.status=t.status.toUpperCase());let n=await s(x,{filter:Object.keys(e).length?e:void 0,limit:t.limit,offset:0});c(t,n.platformProducts.items,{headers:["ID","Name","Slug","Status"],rows:n.platformProducts.items.map(r=>[f(r.id,12),r.name,r.slug??"-",w(r.status)])});}catch(e){a(e);}}),o.command("get").description("Get a product").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let n=await s(I,{id:t});if(!n.platformProduct)throw new l(`Product ${t} not found`);c(e,n.platformProduct);}catch(n){a(n);}}),o.command("create").description("Create a platform product").requiredOption("--name <s>").requiredOption("--slug <s>").option("--description <s>").option("--status <s>","DRAFT|ACTIVE|ARCHIVED","DRAFT").option("--app-url <url>").option("--logo-url <url>").option("-f, --format <format>").action(async t=>{try{let e={name:t.name,slug:t.slug,description:t.description,status:(t.status??"DRAFT").toUpperCase(),appUrl:t.appUrl,logoUrl:t.logoUrl},n=await s(v,{input:e});p(`Product created: ${n.createPlatformProduct.name}`),c(t,n.createPlatformProduct);}catch(e){a(e);}}),o.command("update").description("Update a product").argument("<id>").option("--name <s>").option("--description <s>").option("--status <s>").option("-f, --format <format>").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.description!==void 0&&(n.description=e.description),e.status&&(n.status=e.status.toUpperCase()),!Object.keys(n).length)throw new l("No updates specified");let r=await s(P,{id:t,input:n});p("Product updated"),c(e,r.updatePlatformProduct);}catch(n){a(n);}}),o.command("delete").description("Delete a product").argument("<id>").action(async t=>{try{await s(A,{id:t}),p("Product deleted");}catch(e){a(e);}});let d=o.command("shortcuts").description("Keyboard shortcuts");d.command("list").description("List shortcuts").option("--product <id>").option("--category <c>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e={};t.product&&(e.productId=t.product),t.category&&(e.category=t.category);let n=await s(S,{filter:Object.keys(e).length?e:void 0,limit:t.limit});c(t,n.keyboardShortcuts.items,{headers:["ID","Label","Key","Category","Event","Enabled"],rows:n.keyboardShortcuts.items.map(r=>[f(r.id,12),r.label,r.shortcutKey,r.category??"-",r.eventName??"-",String(!!r.isEnabled)])});}catch(e){a(e);}}),d.command("create").description("Create a shortcut").requiredOption("--label <s>").requiredOption("--key <s>",'Shortcut key sequence (e.g. "g h")').requiredOption("--event <name>","Event emitted when shortcut fires").requiredOption("--product <id>","Owning product id").option("--category <c>","Navigation|Editing|...").option("--enabled").option("-f, --format <format>").action(async t=>{try{let e={label:t.label,shortcutKey:t.key,eventName:t.event,productId:t.product,category:t.category,isEnabled:t.enabled!==!1},n=await s(O,{input:e});p("Shortcut created"),c(t,n.createKeyboardShortcut);}catch(e){a(e);}}),d.command("update").description("Update a shortcut").argument("<id>").option("--label <s>").option("--key <s>").option("--enabled <bool>").option("-f, --format <format>").action(async(t,e)=>{try{let n={};if(e.label&&(n.label=e.label),e.key&&(n.shortcutKey=e.key),e.enabled!==void 0&&(n.isEnabled=e.enabled==="true"),!Object.keys(n).length)throw new l("No updates specified");let r=await s(R,{id:t,input:n});p("Shortcut updated"),c(e,r.updateKeyboardShortcut);}catch(n){a(n);}}),d.command("delete").description("Delete a shortcut").argument("<id>").action(async t=>{try{await s(D,{id:t}),p("Shortcut deleted");}catch(e){a(e);}});let h=o.command("content-pages").description("Content pages (legal, marketing)");h.command("list").description("List content pages for a product").requiredOption("--product <id>").option("--published").option("--visibility <v>","PUBLIC|PRIVATE").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e={};t.published!==void 0&&(e.isPublished=t.published),t.visibility&&(e.visibility=t.visibility.toUpperCase());let n=await s($,{productId:t.product,filter:Object.keys(e).length?e:void 0,limit:t.limit});c(t,n.contentPages.items,{headers:["ID","Slug","Title","Visibility","Published"],rows:n.contentPages.items.map(r=>[f(r.id,12),r.slug,f(r.title,40),r.visibility??"-",String(!!r.isPublished)])});}catch(e){a(e);}}),h.command("create").description("Create a content page").requiredOption("--product <id>").requiredOption("--slug <s>").requiredOption("--title <s>").requiredOption("--content <s>").option("--visibility <v>","PUBLIC|PRIVATE","PUBLIC").option("--published").option("-f, --format <format>").action(async t=>{try{let e={productId:t.product,slug:t.slug,title:t.title,content:t.content,visibility:(t.visibility??"PUBLIC").toUpperCase(),isPublished:!!t.published},n=await s(F,{input:e});p("Content page created"),c(t,n.createContentPage);}catch(e){a(e);}}),h.command("update").description("Update a content page").argument("<id>").option("--title <s>").option("--content <s>").option("--visibility <v>").option("--published <bool>").option("-f, --format <format>").action(async(t,e)=>{try{let n={};if(e.title&&(n.title=e.title),e.content!==void 0&&(n.content=e.content),e.visibility&&(n.visibility=e.visibility.toUpperCase()),e.published!==void 0&&(n.isPublished=e.published==="true"),!Object.keys(n).length)throw new l("No updates specified");let r=await s(L,{id:t,input:n});p("Content page updated"),c(e,r.updateContentPage);}catch(n){a(n);}}),h.command("delete").description("Delete a content page").argument("<id>").action(async t=>{try{await s(_,{id:t}),p("Content page deleted");}catch(e){a(e);}});let m=o.command("feature-flags").description("Feature flag administration (highest SRE/ops value)");m.command("list").description("List feature flags").option("--product <id>").option("--status <s>").option("--category <c>").option("--limit <n>","Page size",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e={};t.product&&(e.productId=t.product),t.status&&(e.status=t.status.toUpperCase()),t.category&&(e.category=t.category);let n=await s(U,{filter:Object.keys(e).length?e:void 0,limit:t.limit});c(t,n.featureFlags.items,{headers:["ID","Key","Type","Status","Default"],rows:n.featureFlags.items.map(r=>[f(r.id,12),r.key,r.flagType??"-",w(r.status),String(r.defaultValue)])});}catch(e){a(e);}}),m.command("create").description("Create a feature flag").requiredOption("--key <s>","Stable key (e.g. enable-beta-ui)").requiredOption("--name <s>","Human label").requiredOption("--product <id>","Owning product id").option("--type <t>","BOOLEAN|STRING|NUMBER|JSON","BOOLEAN").option("--default <s>","Default value (parsed as JSON)").option("--description <s>").option("--category <c>").option("--previewable").option("--tags <s>","Comma-separated tags").option("-f, --format <format>").action(async t=>{try{let e={key:t.key,name:t.name,productId:t.product,flagType:(t.type??"BOOLEAN").toUpperCase(),defaultValue:t.default?JSON.parse(t.default):!1,description:t.description,category:t.category,previewable:!!t.previewable,tags:t.tags?t.tags.split(","):void 0},n=await s(q,{input:e});p(`Feature flag created: ${n.createFeatureFlag.key}`),c(t,n.createFeatureFlag);}catch(e){a(e);}}),m.command("update").description("Update a feature flag").argument("<id>").option("--name <s>").option("--default <s>","Default value (parsed as JSON)").option("--status <s>","ACTIVE|ARCHIVED").option("-f, --format <format>").action(async(t,e)=>{try{let n={};if(e.name&&(n.name=e.name),e.default!==void 0&&(n.defaultValue=JSON.parse(e.default)),e.status&&(n.status=e.status.toUpperCase()),!Object.keys(n).length)throw new l("No updates specified");let r=await s(N,{id:t,input:n});p("Feature flag updated"),c(e,r.updateFeatureFlag);}catch(n){a(n);}}),m.command("delete").description("Delete a feature flag").argument("<id>").action(async t=>{try{await s(G,{id:t}),p("Feature flag deleted");}catch(e){a(e);}}),m.command("evaluate").description("Evaluate flags in a workspace context").requiredOption("--workspace <id>").requiredOption("--keys <s>","Comma-separated flag keys").option("-f, --format <format>").action(async t=>{try{let e={workspaceId:t.workspace,keys:t.keys.split(",")},n=await s(j,{input:e});c(t,n.evaluateFeatureFlags.evaluations);}catch(e){a(e);}});}var et={id:"products",version:"1.0.0",displayName:"Platform Products",dependsOn:["auth"],register(i,o){E(o),W(i);}},le=et;module.exports=le;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,c,g,o,m,f,h as h$1}from'../../chunk-
|
|
1
|
+
import {a,c,g,o,m,f,h as h$1}from'../../chunk-LZQBJDKZ.js';import {o as o$1}from'../../chunk-TCBALVP4.js';var b=`
|
|
2
2
|
query ListProducts($filter: PlatformProductFilterInput, $limit: Int, $offset: Int) {
|
|
3
3
|
platformProducts(filter: $filter, limit: $limit, offset: $offset) {
|
|
4
4
|
items { id name slug status logoUrl appUrl }
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
`,
|
|
16
|
+
`,P=`
|
|
17
17
|
query GetRole($id: ID!) {
|
|
18
18
|
role(id: $id) {
|
|
19
19
|
id
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,L=`
|
|
32
32
|
mutation CreateRole($input: CreateRoleInput!) {
|
|
33
33
|
createRole(input: $input) {
|
|
34
34
|
id
|
|
@@ -84,4 +84,4 @@
|
|
|
84
84
|
overrideType
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
`;function u(r,n,a){return r==="workspace"?v(n,a):R(n,a)}function I(r){let n=S().auth.read();if(r==="workspace"){if(!n?.workspaceId)throw new l("No workspace set. Run `vibecontrols workspace set <id>` or pass --scope <workspaceId>.");return n.workspaceId}if(!n?.organizationId)throw new l("No organization context. Run `auth login` to bind a tenant or pass --scope <tenantId>.");return n.organizationId}function j(r){let n=r.command("rbac").description("Role-based access control"),a=n.command("roles").description("Manage roles");a.command("list").description("List roles").option("--layer <layer>","workspace or global","workspace").option("--scope <scopeId>","Override scope id (workspace or tenant)").option("--include-system","Include system roles",false).option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>","Output format").action(async e=>{try{let t=e.layer==="global"?"global":"workspace",i=e.scope??I(t),o={};e.includeSystem&&(o.includeSystem=!0);let s=await u(t,O,{filter:Object.keys(o).length?o:void 0,pagination:{limit:e.limit,offset:0},scopeId:i});m(e,s.roles,{headers:["ID","Name","Scope","Priority","System"],rows:s.roles.map(g=>[h(g.id,12),g.name,h(g.scopeId,12),String(g.priority),String(g.isSystem)])});}catch(t){p(t);}}),a.command("get").description("Get role by id").argument("<id>").option("--layer <layer>","workspace or global","workspace").option("-f, --format <format>").action(async(e,t)=>{try{let i=t.layer==="global"?"global":"workspace",o=await u(i,
|
|
87
|
+
`;function u(r,n,a){return r==="workspace"?v(n,a):R(n,a)}function I(r){let n=S().auth.read();if(r==="workspace"){if(!n?.workspaceId)throw new l("No workspace set. Run `vibecontrols workspace set <id>` or pass --scope <workspaceId>.");return n.workspaceId}if(!n?.organizationId)throw new l("No organization context. Run `auth login` to bind a tenant or pass --scope <tenantId>.");return n.organizationId}function j(r){let n=r.command("rbac").description("Role-based access control"),a=n.command("roles").description("Manage roles");a.command("list").description("List roles").option("--layer <layer>","workspace or global","workspace").option("--scope <scopeId>","Override scope id (workspace or tenant)").option("--include-system","Include system roles",false).option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>","Output format").action(async e=>{try{let t=e.layer==="global"?"global":"workspace",i=e.scope??I(t),o={};e.includeSystem&&(o.includeSystem=!0);let s=await u(t,O,{filter:Object.keys(o).length?o:void 0,pagination:{limit:e.limit,offset:0},scopeId:i});m(e,s.roles,{headers:["ID","Name","Scope","Priority","System"],rows:s.roles.map(g=>[h(g.id,12),g.name,h(g.scopeId,12),String(g.priority),String(g.isSystem)])});}catch(t){p(t);}}),a.command("get").description("Get role by id").argument("<id>").option("--layer <layer>","workspace or global","workspace").option("-f, --format <format>").action(async(e,t)=>{try{let i=t.layer==="global"?"global":"workspace",o=await u(i,P,{id:e});if(!o.role)throw new l(`Role ${e} not found`);m(t,o.role);}catch(i){p(i);}}),a.command("create").description("Create a role").requiredOption("--name <name>","Role name").option("--description <text>").option("--parent <id>","Parent role id").option("--priority <n>","Priority",e=>parseInt(e,10)).option("--layer <layer>","workspace or global","workspace").option("--scope <scopeId>","Override scope id").option("--scope-type <type>","wspace|entity (global only)").option("-f, --format <format>").action(async e=>{try{let t=e.layer==="global"?"global":"workspace",i=e.scope??I(t),o={name:e.name,description:e.description,parentId:e.parent,priority:e.priority,scopeId:i};t==="global"&&e.scopeType&&(o.scopeType=e.scopeType);let s=await u(t,L,{input:o});k(`Role created: ${s.createRole.name}`),m(e,s.createRole);}catch(t){p(t);}}),a.command("update").description("Update a role").argument("<id>").option("--name <name>").option("--description <text>").option("--priority <n>","",e=>parseInt(e,10)).option("--parent <id>").option("--layer <layer>","workspace or global","workspace").option("-f, --format <format>").action(async(e,t)=>{try{let i=t.layer==="global"?"global":"workspace",o={};if(t.name&&(o.name=t.name),t.description!==void 0&&(o.description=t.description),t.priority!==void 0&&(o.priority=t.priority),t.parent&&(o.parentId=t.parent),!Object.keys(o).length)throw new l("No updates specified");let s=await u(i,$,{id:e,input:o});k("Role updated"),m(t,s.updateRole);}catch(i){p(i);}}),a.command("delete").description("Delete a role").argument("<id>").option("--reassign <roleId>","Reassign actors to this role").option("--layer <layer>","workspace or global","workspace").action(async(e,t)=>{try{let i=t.layer==="global"?"global":"workspace";await u(i,D,{id:e,reassignToRoleId:t.reassign}),k("Role deleted");}catch(i){p(i);}});let C=n.command("policies").description("Manage policy references");C.command("list").description("List policy references").option("--layer <layer>","workspace or global","workspace").option("--resource-type <s>","Filter by resource type").option("--action <s>","Filter by action").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t=e.layer==="global"?"global":"workspace",i={};e.resourceType&&(i.resourceType=e.resourceType),e.action&&(i.action=e.action);let o=await u(t,q,{filter:Object.keys(i).length?i:void 0,pagination:{limit:e.limit,offset:0}});m(e,o.policyReferences,{headers:["ID","Name","Resource","Action","Active","Priority"],rows:o.policyReferences.map(s=>[h(s.id,12),s.name,s.resourceType??"-",s.action??"-",String(s.isActive),String(s.priority??"-")])});}catch(t){p(t);}}),C.command("attach").description("Attach a policy to a role").requiredOption("--role <roleId>").requiredOption("--policy <policyId>").option("--layer <layer>","workspace or global","workspace").action(async e=>{try{let t=e.layer==="global"?"global":"workspace";await u(t,_,{roleId:e.role,policyId:e.policy}),k("Policy attached");}catch(t){p(t);}}),C.command("detach").description("Detach a policy from a role").requiredOption("--role <roleId>").requiredOption("--policy <policyId>").option("--layer <layer>","workspace or global","workspace").action(async e=>{try{let t=e.layer==="global"?"global":"workspace";await u(t,N,{roleId:e.role,policyId:e.policy}),k("Policy detached");}catch(t){p(t);}}),n.command("check").description("Check whether an actor has permission for an action on a resource").argument("<actorId>","Actor id (user/app/service/super_admin)").argument("<action>","Action like read/write/delete").argument("<resourceType>","Resource type like project/task").option("--actor-type <type>","USER|BOT|GROUP|INTEGRATION|DELEGATED_AGENT","USER").option("--resource-id <id>","Specific resource id (optional)").option("--scope <scopeId>","Scope id (workspaceId or tenantId)").option("--layer <layer>","workspace or global","workspace").option("-f, --format <format>").action(async(e,t,i,o)=>{try{let s=o.layer==="global"?"global":"workspace",g=o.scope??I(s),G={actorId:e,actorType:(o.actorType??"USER").toUpperCase(),action:t,resourceType:i,resourceId:o.resourceId,scopeId:g},y=await u(s,F,{input:G});m(o,y.checkPermission,{headers:["Allowed","Decision","Role","Level","Override"],rows:[[A(y.checkPermission.allowed?"ACTIVE":"ERROR"),y.checkPermission.decisionPath,y.checkPermission.roleName??"-",y.checkPermission.roleLevel??"-",y.checkPermission.overrideType??"-"]]});}catch(s){p(s);}});}var ee={id:"rbac",version:"1.0.0",displayName:"RBAC",dependsOn:["auth"],register(r,n){E(n),j(r);}},pt=ee;module.exports=pt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,g,o,f as f$1,h,m,r,b,c}from'../../chunk-
|
|
1
|
+
import {a,g,o,f as f$1,h,m,r,b,c}from'../../chunk-LZQBJDKZ.js';import {o as o$1}from'../../chunk-TCBALVP4.js';var L=`
|
|
2
2
|
query ListRoles($filter: RoleFilterInput, $pagination: PaginationInput, $scopeId: String!) {
|
|
3
3
|
roles(filter: $filter, pagination: $pagination, scopeId: $scopeId) {
|
|
4
4
|
id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {Nc,Oc,Pc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,_c,$c,ad,Zc,bd,dd,cd,ed,fd,gd,hd,id,jd,kd,ld,md}from'../../chunk-REBBLQFS.js';import {a,b,g,o,m,n,f,h,p,r as r$1}from'../../chunk-KTKHJORN.js';import {o as o$1}from'../../chunk-RNWXATAC.js';function r(){let l=r$1().auth.read();if(!l?.workspaceId)throw new o$1("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:l.workspaceId}}function Q(l){let d=l.command("sandbox").description("Manage sandboxes");d.command("list").description("List sandboxes").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n$1=>{try{let t={};n$1.status&&(t.status=n$1.status.toUpperCase()),n$1.template&&(t.template=n$1.template.toUpperCase());let c=(await b(Nc,{context:r(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n$1.limit,offset:0}})).listSandboxes.items;g(n$1,c,{headers:["ID","Name","Template","Mode","Status","TTL","Created"],rows:c.map(m$1=>[o(m$1.id,12),m$1.name,m$1.template,m$1.mode,m(m$1.status),m$1.ttlSeconds?`${m$1.ttlSeconds}s`:"-",n(m$1.createdAt)])});}catch(t){f(t);}}),d.command("get").description("Get sandbox details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Oc,{context:r(),id:n});if(!e.getSandbox)throw new o$1("Sandbox not found");g(t,e.getSandbox);}catch(e){f(e);}}),d.command("create").description("Create sandbox").requiredOption("--name <name>","Sandbox name").option("--template <template>","Template type","VIBECONTROLS").option("--mode <mode>","Mode (DEPLOYMENT or JOB)","DEPLOYMENT").option("--ttl <seconds>","TTL in seconds",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Pc,{input:{name:n.name,template:n.template.toUpperCase(),mode:n.mode.toUpperCase(),ttlSeconds:n.ttl,context:r()}});h("Sandbox created"),g(n,t.createSandbox);}catch(t){f(t);}}),d.command("stop").description("Stop sandbox").argument("<id>").action(async n=>{try{await b(Qc,{context:r(),id:n}),h("Sandbox stopped");}catch(t){f(t);}}),d.command("delete").description("Delete sandbox").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await p("Delete this sandbox?",t.force))return;await b(Rc,{context:r(),id:n}),h("Sandbox deleted");}catch(e){f(e);}}),d.command("extend").description("Extend sandbox TTL").argument("<id>").option("--seconds <n>","Extend by seconds",parseInt).option("--minutes <n>","Extend by minutes",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e;if(t.seconds?e=t.seconds:t.minutes&&(e=t.minutes*60),!e)throw new o$1("Either --seconds or --minutes is required");let c=await b(Sc,{context:r(),id:n,additionalSeconds:e});h(`Sandbox extended by ${e}s`),g(t,c.extendSandboxTTL);}catch(e){f(e);}});let f$1=d.command("templates").description("Manage sandbox templates");f$1.command("list").description("List sandbox templates").option("--template <kind>","Filter by template kind").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Tc,{context:r(),template:n.template?.toUpperCase(),pagination:{limit:n.limit,offset:0}});g(n,t.listSandboxTemplates.items);}catch(t){f(t);}}),f$1.command("get").description("Get template details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Uc,{context:r(),id:n});if(!e.getSandboxTemplate)throw new o$1("Template not found");g(t,e.getSandboxTemplate);}catch(e){f(e);}}),f$1.command("create").description("Create sandbox template").requiredOption("--name <name>","Template name").requiredOption("--template <kind>","Template kind").option("--description <desc>","Description").option("--default","Mark as default").option("--ttl <seconds>","Default TTL",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t={name:n.name,template:n.template.toUpperCase(),context:r()};n.description&&(t.description=n.description),n.default&&(t.isDefault=!0),n.ttl!==void 0&&(t.ttlSeconds=n.ttl);let e=await b(Vc,{input:t});h("Template created"),g(n,e.createSandboxTemplate);}catch(t){f(t);}}),f$1.command("update").description("Update sandbox template").argument("<id>").option("--name <name>","New name").option("--description <desc>","New description").option("--default","Mark as default").option("--ttl <seconds>","New default TTL",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={id:n,context:r()};t.name&&(e.name=t.name),t.description&&(e.description=t.description),t.default!==void 0&&(e.isDefault=t.default),t.ttl!==void 0&&(e.ttlSeconds=t.ttl);let c=await b(Wc,{input:e});h("Template updated"),g(t,c.updateSandboxTemplate);}catch(e){f(e);}}),f$1.command("delete").description("Delete sandbox template").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await p("Delete this template?",t.force))return;await b(Xc,{context:r(),id:n}),h("Template deleted");}catch(e){f(e);}});let u=d.command("tags").description("Manage sandbox tags");u.command("list").description("List available sandbox tags").option("--query <q>","Search query").option("--limit <n>","Page size",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Yc,{query:n.query,limit:n.limit});g(n,t.availableSandboxTags);}catch(t){f(t);}}),u.command("create").description("Create a new sandbox tag").requiredOption("--label <label>","Tag label").option("--color <color>","Tag color").option("-f, --format <format>","Output format").action(async n=>{try{let t={label:n.label};n.color&&(t.color=n.color);let e=await b(_c,{input:t});h("Tag created"),g(n,e.createSandboxTag);}catch(t){f(t);}}),u.command("attach").description("Attach a tag to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b($c,{input:{sandboxId:n.sandbox,tagId:n.tag}});h("Tag attached"),g(n,t.tagSandbox);}catch(t){f(t);}}),u.command("detach").description("Detach a tag from a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").action(async n=>{try{await b(ad,{input:{sandboxId:n.sandbox,tagId:n.tag}}),h("Tag detached");}catch(t){f(t);}}),u.command("get").description("Get tags assigned to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Zc,{input:{sandboxId:n.sandbox}});g(n,t.getSandboxTags);}catch(t){f(t);}}),u.command("replace").description("Replace all tags on a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tags <ids...>","Tag IDs (space separated)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(bd,{input:{sandboxId:n.sandbox,tagIds:n.tags}});h("Tags replaced"),g(n,t.replaceSandboxTags);}catch(t){f(t);}});let p$1=d.command("admin").description("Admin / observability ops");p$1.command("nodes").description("List sandbox nodes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(dd,{context:r()});g(n,t.listSandboxNodes);}catch(t){f(t);}}),p$1.command("all").description("List all sandboxes (admin)").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.status&&(t.status=n.status.toUpperCase()),n.template&&(t.template=n.template.toUpperCase());let e=await b(cd,{context:r(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n.limit,offset:0}});g(n,e.listAllSandboxes.items);}catch(t){f(t);}}),p$1.command("active").description("Get active sandboxes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(ed,{context:r()});g(n,t.getActiveSandboxes);}catch(t){f(t);}}),p$1.command("activity").description("Get recent sandbox activity").option("--limit <n>","Max items",parseInt,20).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(fd,{context:r(),limit:n.limit});g(n,t.getRecentSandboxActivity.items);}catch(t){f(t);}}),p$1.command("stats").description("Get sandbox stats").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(gd,{context:r()});g(n,t.getSandboxStats);}catch(t){f(t);}}),p$1.command("logs").description("Get logs for a sandbox container").argument("<id>").requiredOption("--container <name>","Container name").option("--tail <n>","Tail lines",parseInt,100).action(async(n,t)=>{try{let e=await b(hd,{context:r(),id:n,containerName:t.container,tailLines:t.tail});process.stdout.write(e.getSandboxLogs);}catch(e){f(e);}});let S=p$1.command("config").description("Sandbox config");S.command("get").description("Get sandbox config").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(id,{context:r()});g(n,t.getSandboxConfig);}catch(t){f(t);}}),S.command("set").description("Update sandbox config").option("--default-ttl <seconds>","Default TTL",parseInt).option("--max-ttl <seconds>","Max TTL",parseInt).option("--max-per-user <n>","Max concurrent per user",parseInt).option("--max-per-workspace <n>","Max concurrent per workspace",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t={context:r()};n.defaultTtl!==void 0&&(t.defaultTtlSeconds=n.defaultTtl),n.maxTtl!==void 0&&(t.maxTtlSeconds=n.maxTtl),n.maxPerUser!==void 0&&(t.maxConcurrentPerUser=n.maxPerUser),n.maxPerWorkspace!==void 0&&(t.maxConcurrentPerWorkspace=n.maxPerWorkspace);let e=await b(jd,{input:t});h("Config updated"),g(n,e.updateSandboxConfig);}catch(t){f(t);}});let x=d.command("export").description("Sandbox export jobs");x.command("create").description("Create a sandbox export job").requiredOption("--format <fmt>","Format (CSV or JSON)").option("--include-usage","Include usage events").option("-f, --format-out <format>","Output format").action(async n=>{try{let t=r(),e={workspaceId:t.workspaceId,format:n.format.toUpperCase(),context:t};n.includeUsage&&(e.includeUsageEvents=!0);let c=await b(kd,{input:e});h("Export job created"),g({format:n.formatOut},c.exportSandboxes);}catch(t){f(t);}}),x.command("get").description("Get sandbox export job").argument("<jobId>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=r(),c=await b(ld,{workspaceId:e.workspaceId,jobId:n,context:e});g(t,c.getSandboxExportJob);}catch(e){f(e);}}),x.command("list").description("List sandbox export jobs").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t=r(),e=await b(md,{workspaceId:t.workspaceId,context:t,pagination:{limit:n.limit,offset:0}});g(n,e.listSandboxExportJobs);}catch(t){f(t);}});}var nt={id:"sandbox",version:"1.0.0",displayName:"Sandbox",dependsOn:["auth","workspaces"],register(l,d){a(d),Q(l);}},ct=nt;export{ct as default};
|
|
1
|
+
import {Nc,Oc,Pc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,_c,$c,ad,Zc,bd,dd,cd,ed,fd,gd,hd,id,jd,kd,ld,md}from'../../chunk-REBBLQFS.js';import {a,b,g,o,m,n,f,h,p,r as r$1}from'../../chunk-LZQBJDKZ.js';import {o as o$1}from'../../chunk-TCBALVP4.js';function r(){let l=r$1().auth.read();if(!l?.workspaceId)throw new o$1("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:l.workspaceId}}function Q(l){let d=l.command("sandbox").description("Manage sandboxes");d.command("list").description("List sandboxes").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n$1=>{try{let t={};n$1.status&&(t.status=n$1.status.toUpperCase()),n$1.template&&(t.template=n$1.template.toUpperCase());let c=(await b(Nc,{context:r(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n$1.limit,offset:0}})).listSandboxes.items;g(n$1,c,{headers:["ID","Name","Template","Mode","Status","TTL","Created"],rows:c.map(m$1=>[o(m$1.id,12),m$1.name,m$1.template,m$1.mode,m(m$1.status),m$1.ttlSeconds?`${m$1.ttlSeconds}s`:"-",n(m$1.createdAt)])});}catch(t){f(t);}}),d.command("get").description("Get sandbox details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Oc,{context:r(),id:n});if(!e.getSandbox)throw new o$1("Sandbox not found");g(t,e.getSandbox);}catch(e){f(e);}}),d.command("create").description("Create sandbox").requiredOption("--name <name>","Sandbox name").option("--template <template>","Template type","VIBECONTROLS").option("--mode <mode>","Mode (DEPLOYMENT or JOB)","DEPLOYMENT").option("--ttl <seconds>","TTL in seconds",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Pc,{input:{name:n.name,template:n.template.toUpperCase(),mode:n.mode.toUpperCase(),ttlSeconds:n.ttl,context:r()}});h("Sandbox created"),g(n,t.createSandbox);}catch(t){f(t);}}),d.command("stop").description("Stop sandbox").argument("<id>").action(async n=>{try{await b(Qc,{context:r(),id:n}),h("Sandbox stopped");}catch(t){f(t);}}),d.command("delete").description("Delete sandbox").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await p("Delete this sandbox?",t.force))return;await b(Rc,{context:r(),id:n}),h("Sandbox deleted");}catch(e){f(e);}}),d.command("extend").description("Extend sandbox TTL").argument("<id>").option("--seconds <n>","Extend by seconds",parseInt).option("--minutes <n>","Extend by minutes",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e;if(t.seconds?e=t.seconds:t.minutes&&(e=t.minutes*60),!e)throw new o$1("Either --seconds or --minutes is required");let c=await b(Sc,{context:r(),id:n,additionalSeconds:e});h(`Sandbox extended by ${e}s`),g(t,c.extendSandboxTTL);}catch(e){f(e);}});let f$1=d.command("templates").description("Manage sandbox templates");f$1.command("list").description("List sandbox templates").option("--template <kind>","Filter by template kind").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Tc,{context:r(),template:n.template?.toUpperCase(),pagination:{limit:n.limit,offset:0}});g(n,t.listSandboxTemplates.items);}catch(t){f(t);}}),f$1.command("get").description("Get template details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Uc,{context:r(),id:n});if(!e.getSandboxTemplate)throw new o$1("Template not found");g(t,e.getSandboxTemplate);}catch(e){f(e);}}),f$1.command("create").description("Create sandbox template").requiredOption("--name <name>","Template name").requiredOption("--template <kind>","Template kind").option("--description <desc>","Description").option("--default","Mark as default").option("--ttl <seconds>","Default TTL",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t={name:n.name,template:n.template.toUpperCase(),context:r()};n.description&&(t.description=n.description),n.default&&(t.isDefault=!0),n.ttl!==void 0&&(t.ttlSeconds=n.ttl);let e=await b(Vc,{input:t});h("Template created"),g(n,e.createSandboxTemplate);}catch(t){f(t);}}),f$1.command("update").description("Update sandbox template").argument("<id>").option("--name <name>","New name").option("--description <desc>","New description").option("--default","Mark as default").option("--ttl <seconds>","New default TTL",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={id:n,context:r()};t.name&&(e.name=t.name),t.description&&(e.description=t.description),t.default!==void 0&&(e.isDefault=t.default),t.ttl!==void 0&&(e.ttlSeconds=t.ttl);let c=await b(Wc,{input:e});h("Template updated"),g(t,c.updateSandboxTemplate);}catch(e){f(e);}}),f$1.command("delete").description("Delete sandbox template").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await p("Delete this template?",t.force))return;await b(Xc,{context:r(),id:n}),h("Template deleted");}catch(e){f(e);}});let u=d.command("tags").description("Manage sandbox tags");u.command("list").description("List available sandbox tags").option("--query <q>","Search query").option("--limit <n>","Page size",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Yc,{query:n.query,limit:n.limit});g(n,t.availableSandboxTags);}catch(t){f(t);}}),u.command("create").description("Create a new sandbox tag").requiredOption("--label <label>","Tag label").option("--color <color>","Tag color").option("-f, --format <format>","Output format").action(async n=>{try{let t={label:n.label};n.color&&(t.color=n.color);let e=await b(_c,{input:t});h("Tag created"),g(n,e.createSandboxTag);}catch(t){f(t);}}),u.command("attach").description("Attach a tag to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b($c,{input:{sandboxId:n.sandbox,tagId:n.tag}});h("Tag attached"),g(n,t.tagSandbox);}catch(t){f(t);}}),u.command("detach").description("Detach a tag from a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").action(async n=>{try{await b(ad,{input:{sandboxId:n.sandbox,tagId:n.tag}}),h("Tag detached");}catch(t){f(t);}}),u.command("get").description("Get tags assigned to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Zc,{input:{sandboxId:n.sandbox}});g(n,t.getSandboxTags);}catch(t){f(t);}}),u.command("replace").description("Replace all tags on a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tags <ids...>","Tag IDs (space separated)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(bd,{input:{sandboxId:n.sandbox,tagIds:n.tags}});h("Tags replaced"),g(n,t.replaceSandboxTags);}catch(t){f(t);}});let p$1=d.command("admin").description("Admin / observability ops");p$1.command("nodes").description("List sandbox nodes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(dd,{context:r()});g(n,t.listSandboxNodes);}catch(t){f(t);}}),p$1.command("all").description("List all sandboxes (admin)").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.status&&(t.status=n.status.toUpperCase()),n.template&&(t.template=n.template.toUpperCase());let e=await b(cd,{context:r(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n.limit,offset:0}});g(n,e.listAllSandboxes.items);}catch(t){f(t);}}),p$1.command("active").description("Get active sandboxes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(ed,{context:r()});g(n,t.getActiveSandboxes);}catch(t){f(t);}}),p$1.command("activity").description("Get recent sandbox activity").option("--limit <n>","Max items",parseInt,20).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(fd,{context:r(),limit:n.limit});g(n,t.getRecentSandboxActivity.items);}catch(t){f(t);}}),p$1.command("stats").description("Get sandbox stats").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(gd,{context:r()});g(n,t.getSandboxStats);}catch(t){f(t);}}),p$1.command("logs").description("Get logs for a sandbox container").argument("<id>").requiredOption("--container <name>","Container name").option("--tail <n>","Tail lines",parseInt,100).action(async(n,t)=>{try{let e=await b(hd,{context:r(),id:n,containerName:t.container,tailLines:t.tail});process.stdout.write(e.getSandboxLogs);}catch(e){f(e);}});let S=p$1.command("config").description("Sandbox config");S.command("get").description("Get sandbox config").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(id,{context:r()});g(n,t.getSandboxConfig);}catch(t){f(t);}}),S.command("set").description("Update sandbox config").option("--default-ttl <seconds>","Default TTL",parseInt).option("--max-ttl <seconds>","Max TTL",parseInt).option("--max-per-user <n>","Max concurrent per user",parseInt).option("--max-per-workspace <n>","Max concurrent per workspace",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t={context:r()};n.defaultTtl!==void 0&&(t.defaultTtlSeconds=n.defaultTtl),n.maxTtl!==void 0&&(t.maxTtlSeconds=n.maxTtl),n.maxPerUser!==void 0&&(t.maxConcurrentPerUser=n.maxPerUser),n.maxPerWorkspace!==void 0&&(t.maxConcurrentPerWorkspace=n.maxPerWorkspace);let e=await b(jd,{input:t});h("Config updated"),g(n,e.updateSandboxConfig);}catch(t){f(t);}});let x=d.command("export").description("Sandbox export jobs");x.command("create").description("Create a sandbox export job").requiredOption("--format <fmt>","Format (CSV or JSON)").option("--include-usage","Include usage events").option("-f, --format-out <format>","Output format").action(async n=>{try{let t=r(),e={workspaceId:t.workspaceId,format:n.format.toUpperCase(),context:t};n.includeUsage&&(e.includeUsageEvents=!0);let c=await b(kd,{input:e});h("Export job created"),g({format:n.formatOut},c.exportSandboxes);}catch(t){f(t);}}),x.command("get").description("Get sandbox export job").argument("<jobId>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=r(),c=await b(ld,{workspaceId:e.workspaceId,jobId:n,context:e});g(t,c.getSandboxExportJob);}catch(e){f(e);}}),x.command("list").description("List sandbox export jobs").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t=r(),e=await b(md,{workspaceId:t.workspaceId,context:t,pagination:{limit:n.limit,offset:0}});g(n,e.listSandboxExportJobs);}catch(t){f(t);}});}var nt={id:"sandbox",version:"1.0.0",displayName:"Sandbox",dependsOn:["auth","workspaces"],register(l,d){a(d),Q(l);}},ct=nt;export{ct as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var l=class extends Error{exitCode;hint;constructor(c,s){super(c),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}},m=class extends l{constructor(c,s){super(c,{exitCode:2,hint:s?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},f=class extends Error{cause;constructor(c,s){super(c),this.name="CliInternalError",this.cause=s;}};var x=null;function v(o){x=o;}function g(){if(!x)throw new f("vibecontrols module helpers used before setHelpersContext was called");return x}function le(){let o=g();if(!o.auth.isAuthenticated())throw new m(`Authentication required. Run \`${o.productName} auth login\`.`)}async function r(o,c){return le(),g().gql.workspace.request(o,c)}function i(o){let c=o instanceof Error?o.message:String(o);throw new l(c)}function d(o,c,s){g().output.formatAndOutput(o,c,s);}function u(o){g().output.printSuccess(o);}function T(o){return g().output.formatStatus(o)}function E(o){return g().output.formatDate(o)}function
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var l=class extends Error{exitCode;hint;constructor(c,s){super(c),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}},m=class extends l{constructor(c,s){super(c,{exitCode:2,hint:s?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},f=class extends Error{cause;constructor(c,s){super(c),this.name="CliInternalError",this.cause=s;}};var x=null;function v(o){x=o;}function g(){if(!x)throw new f("vibecontrols module helpers used before setHelpersContext was called");return x}function le(){let o=g();if(!o.auth.isAuthenticated())throw new m(`Authentication required. Run \`${o.productName} auth login\`.`)}async function r(o,c){return le(),g().gql.workspace.request(o,c)}function i(o){let c=o instanceof Error?o.message:String(o);throw new l(c)}function d(o,c,s){g().output.formatAndOutput(o,c,s);}function u(o){g().output.printSuccess(o);}function T(o){return g().output.formatStatus(o)}function E(o){return g().output.formatDate(o)}function C(o,c){return g().output.truncate(o,c)}function D(){return g()}var A=`
|
|
2
2
|
query ListScheduledJobs($workspaceId: ID!, $filter: JobFilterInput, $pagination: SchedulerPaginationInput) {
|
|
3
3
|
scheduledJobs(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
|
|
4
4
|
jobs { id name status scheduleType nextExecutionAt createdAt }
|
|
@@ -22,30 +22,30 @@
|
|
|
22
22
|
mutation DeleteScheduledJob($id: ID!) {
|
|
23
23
|
deleteScheduledJob(id: $id)
|
|
24
24
|
}
|
|
25
|
-
`,
|
|
25
|
+
`,_=`
|
|
26
26
|
query JobExecutions($jobId: ID!, $pagination: SchedulerPaginationInput) {
|
|
27
27
|
jobExecutions(jobId: $jobId, pagination: $pagination) {
|
|
28
28
|
executions { id status startedAt completedAt duration errorMessage success }
|
|
29
29
|
total nextCursor
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`,
|
|
32
|
+
`,R=`
|
|
33
33
|
mutation PauseScheduledJob($id: ID!) {
|
|
34
34
|
pauseScheduledJob(id: $id) { id name status }
|
|
35
35
|
}
|
|
36
|
-
`,
|
|
36
|
+
`,P=`
|
|
37
37
|
mutation ResumeScheduledJob($id: ID!) {
|
|
38
38
|
resumeScheduledJob(id: $id) { id name status }
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,N=`
|
|
41
41
|
mutation ActivateSchedule($id: ID!) {
|
|
42
42
|
activateSchedule(id: $id) { id name status }
|
|
43
43
|
}
|
|
44
|
-
`,
|
|
44
|
+
`,J=`
|
|
45
45
|
mutation ArchiveSchedule($id: ID!) {
|
|
46
46
|
archiveSchedule(id: $id) { id name status }
|
|
47
47
|
}
|
|
48
|
-
`,
|
|
48
|
+
`,U=`
|
|
49
49
|
mutation DisableSchedule($id: ID!, $reason: String) {
|
|
50
50
|
disableSchedule(id: $id, reason: $reason) { id name status }
|
|
51
51
|
}
|
|
@@ -96,14 +96,14 @@
|
|
|
96
96
|
total nextCursor
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
`,
|
|
99
|
+
`,G=`
|
|
100
100
|
query ScheduleTemplate($id: ID!) {
|
|
101
101
|
scheduleTemplate(id: $id) {
|
|
102
102
|
id name description category isPublic scheduleType executorType
|
|
103
103
|
scheduleConfig executorConfig usageCount
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
`,
|
|
106
|
+
`,M=`
|
|
107
107
|
mutation CreateScheduleTemplate($input: CreateScheduleTemplateInput!, $workspaceId: ID!) {
|
|
108
108
|
createScheduleTemplate(input: $input, workspaceId: $workspaceId) { id name scheduleType }
|
|
109
109
|
}
|
|
@@ -139,4 +139,4 @@
|
|
|
139
139
|
query GetScheduledJobTags($input: GetScheduledJobTagsInput!) {
|
|
140
140
|
getScheduledJobTags(input: $input) { id entityId tagId source }
|
|
141
141
|
}
|
|
142
|
-
`;function
|
|
142
|
+
`;function w(){let o=D().auth.read();if(!o?.workspaceId)throw new l("No workspace set. Run: vibecontrols workspace set <id>");return o.workspaceId}function Z(o){let c=o.command("scheduler").description("Scheduled jobs & executions"),s=c.command("jobs").description("Manage scheduled jobs");s.command("list").description("List scheduled jobs").option("--status <s>").option("--type <t>","CRON|INTERVAL|ONCE").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.type&&(t.scheduleType=e.type.toUpperCase());let n=await r(A,{workspaceId:w(),filter:Object.keys(t).length?t:void 0,pagination:{first:e.limit}});d(e,n.scheduledJobs.jobs,{headers:["ID","Name","Status","Type","NextRun","Created"],rows:n.scheduledJobs.jobs.map(a=>[C(a.id,12),a.name,T(a.status),a.scheduleType??"-",E(a.nextExecutionAt),E(a.createdAt)])});}catch(t){i(t);}}),s.command("get").description("Get a scheduled job").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await r(O,{id:e});if(!n.scheduledJob)throw new l(`Job ${e} not found`);d(t,n.scheduledJob);}catch(n){i(n);}}),s.command("create").description("Create a scheduled job").requiredOption("--name <name>").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").option("--cron <expr>","Cron expression (for CRON)").option("--interval-seconds <n>","",e=>parseInt(e,10)).option("--executor <e>","WEBHOOK|GRAPHQL|INTERNAL_API|NATS_TOPIC","WEBHOOK").option("--executor-config <json>","Executor config JSON","{}").option("-f, --format <format>").action(async e=>{try{let t={INTERVAL:"FIXED_INTERVAL",ONCE:"ONE_TIME"},n=e.type.toUpperCase(),a={name:e.name,scheduleType:t[n]??n,cronExpression:e.cron,intervalSeconds:e.intervalSeconds,executorType:(e.executor??"WEBHOOK").toUpperCase(),executorConfig:JSON.parse(e.executorConfig??"{}")},I=await r($,{workspaceId:w(),input:a});u(`Job created: ${I.createScheduledJob.name}`),d(e,I.createScheduledJob);}catch(t){i(t);}}),s.command("delete").description("Delete a scheduled job").argument("<id>").action(async e=>{try{await r(L,{id:e}),u("Job deleted");}catch(t){i(t);}});let ee=c.command("executions").description("Job execution history");s.command("pause").description("Pause a scheduled job").argument("<id>").action(async e=>{try{await r(R,{id:e}),u("Job paused");}catch(t){i(t);}}),s.command("resume").description("Resume a paused scheduled job").argument("<id>").action(async e=>{try{await r(P,{id:e}),u("Job resumed");}catch(t){i(t);}}),s.command("activate").description("Activate a draft or disabled schedule").argument("<id>").action(async e=>{try{await r(N,{id:e}),u("Schedule activated");}catch(t){i(t);}}),s.command("archive").description("Archive a scheduled job").argument("<id>").action(async e=>{try{await r(J,{id:e}),u("Schedule archived");}catch(t){i(t);}}),s.command("disable").description("Disable a schedule (with optional reason)").argument("<id>").option("--reason <r>").action(async(e,t)=>{try{await r(U,{id:e,reason:t.reason??null}),u("Schedule disabled");}catch(n){i(n);}}),s.command("clone").description("Clone a schedule (optionally to another workspace; overrides JSON)").argument("<sourceId>").option("--workspace <id>").option("--overrides <json>","Overrides JSON for CreateScheduledJobInput").option("-f, --format <format>").action(async(e,t)=>{try{let n=await r(q,{sourceId:e,newWorkspaceId:t.workspace??null,overrides:t.overrides?JSON.parse(t.overrides):null});u(`Cloned: ${n.cloneSchedule.id}`),d(t,n.cloneSchedule);}catch(n){i(n);}}),s.command("execute-now").description("Execute a scheduled job immediately").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await r(H,{id:e});u("Execution dispatched"),d(t,n.executeJobNow);}catch(n){i(n);}}),s.command("preview").description("Preview upcoming execution times without creating a job").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").option("--cron <expr>").option("--rrule <r>").option("--interval <n>","",e=>parseInt(e,10)).option("--interval-unit <u>","SECONDS|MINUTES|HOURS|DAYS").option("--count <n>","",e=>parseInt(e,10),5).option("--start <iso>").option("--end <iso>").option("--timezone <tz>").option("-f, --format <format>").action(async e=>{try{let t=await r(j,{scheduleType:e.type.toUpperCase(),cronExpression:e.cron??null,rrule:e.rrule??null,interval:e.interval??null,intervalUnit:e.intervalUnit??null,count:e.count??null,startDate:e.start??null,endDate:e.end??null,timezone:e.timezone??null});d(e,t.previewSchedule);}catch(t){i(t);}});let y=s.command("tags").description("Scheduled-job tag assignments");y.command("add").description("Tag a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").option("--source <s>").action(async e=>{try{let t={entityId:e.entity,tagId:e.tag};e.source&&(t.source=e.source),await r(K,{input:t}),u("Tagged");}catch(t){i(t);}}),y.command("remove").description("Remove a tag from a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").action(async e=>{try{await r(Y,{input:{entityId:e.entity,tagId:e.tag}}),u("Tag removed");}catch(t){i(t);}}),y.command("replace").description("Replace all tags on a scheduled job").requiredOption("--entity <id>").requiredOption("--tags <ids>","Comma-separated tag IDs").option("-f, --format <format>").action(async e=>{try{let t=await r(X,{input:{entityId:e.entity,tagIds:e.tags.split(",")}});u("Tags replaced"),d(e,t.replaceScheduledJobTags);}catch(t){i(t);}}),y.command("list").description("List tags on a scheduled job").requiredOption("--entity <id>").option("-f, --format <format>").action(async e=>{try{let t=await r(Q,{input:{entityId:e.entity}});d(e,t.getScheduledJobTags);}catch(t){i(t);}});let h=c.command("templates").description("Schedule templates");h.command("list").description("List schedule templates in the active workspace").option("--category <c>").option("--public","Only public templates").option("-f, --format <format>").action(async e=>{try{let t={};e.category&&(t.category=e.category),e.public!==void 0&&(t.isPublic=e.public);let n=await r(W,{workspaceId:w(),filter:Object.keys(t).length?t:void 0,pagination:{first:100}});d(e,n.scheduleTemplates.templates);}catch(t){i(t);}}),h.command("get").description("Get a schedule template").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await r(G,{id:e});if(!n.scheduleTemplate)throw new l(`Template ${e} not found`);d(t,n.scheduleTemplate);}catch(n){i(n);}}),h.command("create").description("Create a schedule template").requiredOption("--name <name>").requiredOption("--type <t>","CRON|FIXED_INTERVAL|ONE_TIME|RRULE|WINDOWED").requiredOption("--executor <e>","WEBHOOK|INTERNAL_API|NATS_TOPIC|GRAPHQL").requiredOption("--schedule-config <json>").requiredOption("--executor-config <json>").option("--description <d>").option("--category <c>").option("--public","Make template public").option("-f, --format <format>").action(async e=>{try{let t={name:e.name,scheduleType:e.type.toUpperCase(),executorType:e.executor.toUpperCase(),scheduleConfig:JSON.parse(e.scheduleConfig),executorConfig:JSON.parse(e.executorConfig)};e.description&&(t.description=e.description),e.category&&(t.category=e.category),e.public!==void 0&&(t.isPublic=e.public);let n=await r(M,{workspaceId:w(),input:t});u("Template created"),d(e,n.createScheduleTemplate);}catch(t){i(t);}}),h.command("update").description("Update a schedule template").argument("<id>").option("--name <name>").option("--description <d>").option("--category <c>").option("--public","Toggle public").option("-f, --format <format>").action(async(e,t)=>{try{let n={};if(t.name!==void 0&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.category!==void 0&&(n.category=t.category),t.public!==void 0&&(n.isPublic=t.public),Object.keys(n).length===0)throw new l("Provide at least one field to update");let a=await r(B,{id:e,input:n});u("Template updated"),d(t,a.updateScheduleTemplate);}catch(n){i(n);}}),h.command("delete").description("Delete a schedule template").argument("<id>").action(async e=>{try{await r(F,{id:e}),u("Template deleted");}catch(t){i(t);}});let b=c.command("versions").description("Schedule version history");b.command("list").description("List version history for a schedule").argument("<scheduleId>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await r(V,{scheduleId:e});d(t,n.scheduleVersionHistory,{headers:["ID","Version","ChangedBy","Reason","CreatedAt"],rows:n.scheduleVersionHistory.map(a=>[C(a.id,12),String(a.version),a.changedBy,a.changeReason??"-",E(a.createdAt)])});}catch(n){i(n);}}),b.command("restore").description("Restore a schedule to a prior version").requiredOption("--schedule <id>").requiredOption("--version <id>").option("-f, --format <format>").action(async e=>{try{let t=await r(z,{scheduleId:e.schedule,versionId:e.version});u("Version restored"),d(e,t.restoreScheduleVersion);}catch(t){i(t);}}),ee.command("list").description("List executions for a job").argument("<jobId>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async(e,t)=>{try{let n=await r(_,{jobId:e,pagination:{first:t.limit}});d(t,n.jobExecutions.executions,{headers:["ID","Status","Started","Duration","Success"],rows:n.jobExecutions.executions.map(a=>[C(a.id,12),T(a.status),E(a.startedAt),String(a.duration??"-"),String(!!a.success)])});}catch(n){i(n);}});}var fe={id:"scheduler",version:"1.0.0",displayName:"Scheduler",dependsOn:["auth","workspaces"],register(o,c){v(c),Z(o);}},It=fe;module.exports=It;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b,g,o,m,n,f,h as h$1,r}from'../../chunk-
|
|
1
|
+
import {a,b,g,o,m,n,f,h as h$1,r}from'../../chunk-LZQBJDKZ.js';import {o as o$1}from'../../chunk-TCBALVP4.js';var C=`
|
|
2
2
|
query ListScheduledJobs($workspaceId: ID!, $filter: JobFilterInput, $pagination: SchedulerPaginationInput) {
|
|
3
3
|
scheduledJobs(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
|
|
4
4
|
jobs { id name status scheduleType nextExecutionAt createdAt }
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var c=class extends Error{exitCode;hint;constructor(o,s){super(o),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}},w=class extends c{constructor(o,s){super(o,{exitCode:2,hint:s?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},f=class extends Error{cause;constructor(o,s){super(o),this.name="CliInternalError",this.cause=s;}};var k=null;function
|
|
1
|
+
'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var c=class extends Error{exitCode;hint;constructor(o,s){super(o),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}},w=class extends c{constructor(o,s){super(o,{exitCode:2,hint:s?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},f=class extends Error{cause;constructor(o,s){super(o),this.name="CliInternalError",this.cause=s;}};var k=null;function I(r){k=r;}function g(){if(!k)throw new f("vibecontrols module helpers used before setHelpersContext was called");return k}function ee(){let r=g();if(!r.auth.isAuthenticated())throw new w(`Authentication required. Run \`${r.productName} auth login\`.`)}async function u(r,o){return ee(),g().gql.workspace.request(r,o)}function p(r){let o=r instanceof Error?r.message:String(r);throw new c(o)}function l(r,o,s){g().output.formatAndOutput(r,o,s);}function d(r){g().output.printSuccess(r);}function C(r){return g().output.formatStatus(r)}function y(r){return g().output.formatDate(r)}function x(r,o){return g().output.truncate(r,o)}function v(){return g()}var S=`
|
|
2
2
|
query GetVaults($filter: VaultFilterInput, $pagination: SecurityPaginationInput) {
|
|
3
3
|
getVaults(filter: $filter, pagination: $pagination) {
|
|
4
4
|
items { id name description scope status createdAt }
|
|
5
5
|
total hasMore
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,b=`
|
|
9
9
|
query GetVault($id: ID!) {
|
|
10
10
|
getVault(id: $id) {
|
|
11
11
|
id name description scope scopeId status lockAfterMinutes createdAt updatedAt
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
`,
|
|
14
|
+
`,A=`
|
|
15
15
|
mutation CreateVault($input: CreateVaultInput!) {
|
|
16
16
|
createVault(input: $input) {
|
|
17
17
|
id name scope scopeId status
|
|
@@ -44,19 +44,19 @@
|
|
|
44
44
|
id key name description type status isEphemeral expiresAt createdAt updatedAt
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
`,
|
|
47
|
+
`,P=`
|
|
48
48
|
query DecryptSecret($id: ID!) {
|
|
49
49
|
decryptSecret(id: $id) {
|
|
50
50
|
id key value
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
`,
|
|
53
|
+
`,q=`
|
|
54
54
|
mutation CreateSecret($input: CreateSecretInput!) {
|
|
55
55
|
createSecret(input: $input) {
|
|
56
56
|
id key name type status
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
`,
|
|
59
|
+
`,V=`
|
|
60
60
|
mutation UpdateSecret($id: ID!, $input: UpdateSecretInput!) {
|
|
61
61
|
updateSecret(id: $id, input: $input) {
|
|
62
62
|
id key name status updatedAt
|
|
@@ -72,4 +72,4 @@
|
|
|
72
72
|
id key updatedAt
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`;function h(){let r=
|
|
75
|
+
`;function h(){let r=v().auth.read();if(!r?.workspaceId)throw new c("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:r.workspaceId}}async function U(){if(process.stdin.isTTY)throw new c('Pipe the secret value via stdin (e.g. `echo -n "value" | vibecontrols security secrets set ...`).');let r=[];for await(let o of process.stdin)r.push(Buffer.isBuffer(o)?o:Buffer.from(o));return Buffer.concat(r).toString("utf8")}function G(r){let o=r.command("security").description("Security: vaults & secrets"),s=o.command("vaults").description("Vault management");s.command("list").description("List vaults").option("--scope <s>","WORKSPACE|GLOBAL|VIBE").option("--status <s>").option("--search <q>").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={context:h()};e.scope&&(t.scope=e.scope.toUpperCase()),e.status&&(t.status=e.status.toUpperCase()),e.search&&(t.search=e.search);let n=await u(S,{filter:t,pagination:{limit:e.limit,offset:0}});l(e,n.getVaults.items,{headers:["ID","Name","Scope","Status","Created"],rows:n.getVaults.items.map(i=>[x(i.id,12),i.name,i.scope??"-",C(i.status),y(i.createdAt)])});}catch(t){p(t);}}),s.command("get").description("Get a vault").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await u(b,{id:e});if(!n.getVault)throw new c(`Vault ${e} not found`);l(t,n.getVault);}catch(n){p(n);}}),s.command("create").description("Create a vault").requiredOption("--name <name>").option("--description <s>").option("--scope <s>","WORKSPACE|GLOBAL|VIBE","WORKSPACE").option("--scope-id <id>","Scope id (defaults to current workspace)").option("--lock-after <minutes>","Auto-lock after N minutes",e=>parseInt(e,10)).option("-f, --format <format>").action(async e=>{try{let t=h(),n={context:t,name:e.name,description:e.description,scope:(e.scope??"WORKSPACE").toUpperCase(),scopeId:e.scopeId??t.workspaceId,lockAfterMinutes:e.lockAfter},i=await u(A,{input:n});d(`Vault created: ${i.createVault.name}`),l(e,i.createVault);}catch(t){p(t);}}),s.command("update").description("Update a vault").argument("<id>").option("--name <s>").option("--description <s>").option("--lock-after <minutes>","Auto-lock after N minutes",e=>parseInt(e,10)).option("-f, --format <format>").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.lockAfter!==void 0&&(n.lockAfterMinutes=t.lockAfter),!Object.keys(n).length)throw new c("No updates specified");let i=await u(R,{id:e,input:n});d("Vault updated"),l(t,i.updateVault);}catch(n){p(n);}}),s.command("delete").description("Delete a vault").argument("<id>").option("--archive","Archive instead of hard delete",false).action(async(e,t)=>{try{t.archive?(await u(O,{id:e}),d("Vault archived")):(await u($,{id:e}),d("Vault deleted"));}catch(n){p(n);}});let m=o.command("secrets").description("Secret management");m.command("list").description("List secrets in a vault").requiredOption("--vault <id>").option("--type <t>","Filter by secret type").option("--search <q>").option("--limit <n>","Page size",e=>parseInt(e,10),100).option("-f, --format <format>").action(async e=>{try{let t={context:h()};e.type&&(t.type=e.type.toUpperCase()),e.search&&(t.search=e.search);let n=await u(D,{vaultId:e.vault,filter:t,pagination:{limit:e.limit,offset:0}});l(e,n.getSecrets.items,{headers:["ID","Key","Name","Type","Status","Created"],rows:n.getSecrets.items.map(i=>[x(i.id,12),i.key,i.name,i.type??"-",C(i.status),y(i.createdAt)])});}catch(t){p(t);}}),m.command("get").description("Get secret metadata (does NOT decrypt)").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await u(L,{id:e});if(!n.getSecret)throw new c(`Secret ${e} not found`);l(t,n.getSecret);}catch(n){p(n);}}),m.command("show").description("Decrypt and print a secret value (audited)").argument("<id>").action(async e=>{try{let t=await u(P,{id:e});process.stdout.write(t.decryptSecret.value);}catch(t){p(t);}}),m.command("set").description("Create a secret. Reads the value from stdin.").requiredOption("--vault <id>").requiredOption("--key <key>","Secret key (unique within vault)").requiredOption("--name <name>").option("--description <s>").option("--type <t>","API_KEY|PASSWORD|CERTIFICATE|TOKEN|OTHER","OTHER").option("--ephemeral","Mark as ephemeral").option("--expires <iso>").option("-f, --format <format>").action(async e=>{try{let t=await U(),n={context:h(),vaultId:e.vault,key:e.key,name:e.name,description:e.description,type:(e.type??"OTHER").toUpperCase(),isEphemeral:!!e.ephemeral,expiresAt:e.expires,value:t},i=await u(q,{input:n});d(`Secret created: ${i.createSecret.key}`),l(e,i.createSecret);}catch(t){p(t);}}),m.command("update").description("Update a secret. Pass --value via stdin to rotate.").argument("<id>").option("--name <s>").option("--description <s>").option("--rotate","Rotate value (reads new value from stdin)").option("--status <s>").option("-f, --format <format>").action(async(e,t)=>{try{if(t.rotate){let W=await U(),F=await u(N,{id:e,newValue:W});d("Secret rotated"),l(t,F.rotateSecret);return}let n={context:h()};if(t.name&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.status&&(n.status=t.status.toUpperCase()),Object.keys(n).length===1)throw new c("No updates specified (use --rotate to change value)");let i=await u(V,{id:e,input:n});d("Secret updated"),l(t,i.updateSecret);}catch(n){p(n);}}),m.command("delete").description("Delete a secret").argument("<id>").action(async e=>{try{await u(_,{id:e}),d("Secret deleted");}catch(t){p(t);}});}var ne={id:"security",version:"1.0.0",displayName:"Security",dependsOn:["auth","workspaces"],register(r,o){I(o),G(r);}},dt=ne;module.exports=dt;
|