@burdenoff/cli-sdk 2026.1102.1 → 2026.1102.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/chunk-O6UCQ5IT.js +1 -0
  2. package/dist/{chunk-AYNNSLCL.js → chunk-ZGT7IIOP.js} +409 -418
  3. package/dist/modules/adaptercloud/index.cjs +9 -6
  4. package/dist/modules/adaptercloud/index.js +7 -4
  5. package/dist/modules/artistrybase/index.js +2 -2
  6. package/dist/modules/assethandler/index.cjs +2 -2
  7. package/dist/modules/assethandler/index.js +2 -2
  8. package/dist/modules/atheletebridge/index.cjs +35 -21
  9. package/dist/modules/atheletebridge/index.js +33 -19
  10. package/dist/modules/auth/index.cjs +37 -37
  11. package/dist/modules/auth/index.js +33 -29
  12. package/dist/modules/billing/index.cjs +1 -1
  13. package/dist/modules/billing/index.js +2 -2
  14. package/dist/modules/brainyrich/index.cjs +44 -28
  15. package/dist/modules/brainyrich/index.js +47 -31
  16. package/dist/modules/buildmyiq/index.cjs +64 -67
  17. package/dist/modules/buildmyiq/index.js +60 -63
  18. package/dist/modules/channels/index.cjs +3 -3
  19. package/dist/modules/channels/index.js +2 -2
  20. package/dist/modules/collabkin/index.cjs +4 -4
  21. package/dist/modules/collabkin/index.js +2 -2
  22. package/dist/modules/comradecircle/index.cjs +24 -16
  23. package/dist/modules/comradecircle/index.js +20 -12
  24. package/dist/modules/conversations/index.cjs +7 -7
  25. package/dist/modules/conversations/index.js +2 -2
  26. package/dist/modules/coolandlovely/index.cjs +28 -15
  27. package/dist/modules/coolandlovely/index.js +30 -17
  28. package/dist/modules/cosmicintersection/index.cjs +6 -6
  29. package/dist/modules/cosmicintersection/index.js +2 -2
  30. package/dist/modules/crewfoundry/index.js +2 -2
  31. package/dist/modules/devportal/index.cjs +2 -2
  32. package/dist/modules/devportal/index.js +2 -2
  33. package/dist/modules/ecoimpacthub/index.cjs +23 -13
  34. package/dist/modules/ecoimpacthub/index.js +20 -10
  35. package/dist/modules/eventfullymanaged/index.cjs +74 -74
  36. package/dist/modules/eventfullymanaged/index.js +78 -78
  37. package/dist/modules/export/index.cjs +4 -4
  38. package/dist/modules/export/index.js +2 -2
  39. package/dist/modules/files/index.cjs +3 -3
  40. package/dist/modules/files/index.js +4 -4
  41. package/dist/modules/fluidgrids/index.cjs +16 -16
  42. package/dist/modules/fluidgrids/index.js +3 -3
  43. package/dist/modules/ggnomad/index.cjs +4 -4
  44. package/dist/modules/ggnomad/index.js +2 -2
  45. package/dist/modules/govcitizenhub/index.cjs +10 -7
  46. package/dist/modules/govcitizenhub/index.js +8 -5
  47. package/dist/modules/groups/index.cjs +4 -4
  48. package/dist/modules/groups/index.js +2 -2
  49. package/dist/modules/headshotmarketing/index.js +2 -2
  50. package/dist/modules/hookmovies/index.cjs +6 -6
  51. package/dist/modules/hookmovies/index.js +2 -2
  52. package/dist/modules/housingvista/index.cjs +3 -3
  53. package/dist/modules/housingvista/index.js +2 -2
  54. package/dist/modules/integrations/index.cjs +5 -5
  55. package/dist/modules/integrations/index.js +2 -2
  56. package/dist/modules/intelwatchtower/index.cjs +28 -16
  57. package/dist/modules/intelwatchtower/index.js +25 -13
  58. package/dist/modules/kadaikodi/index.cjs +2 -2
  59. package/dist/modules/kadaikodi/index.js +2 -2
  60. package/dist/modules/labsofscience/index.cjs +10 -6
  61. package/dist/modules/labsofscience/index.js +9 -5
  62. package/dist/modules/manufacturedops/index.cjs +35 -22
  63. package/dist/modules/manufacturedops/index.js +35 -22
  64. package/dist/modules/movethewheels/index.js +2 -2
  65. package/dist/modules/notifications/index.cjs +2 -2
  66. package/dist/modules/notifications/index.js +2 -2
  67. package/dist/modules/organizations/index.js +2 -2
  68. package/dist/modules/planmagnet/index.cjs +21 -21
  69. package/dist/modules/planmagnet/index.js +32 -32
  70. package/dist/modules/products/index.cjs +4 -4
  71. package/dist/modules/products/index.js +2 -2
  72. package/dist/modules/proserviceworld/index.cjs +18 -13
  73. package/dist/modules/proserviceworld/index.js +18 -13
  74. package/dist/modules/rbac/index.js +2 -2
  75. package/dist/modules/sandbox/index.cjs +17 -17
  76. package/dist/modules/sandbox/index.js +1 -1
  77. package/dist/modules/scheduler/index.cjs +2 -2
  78. package/dist/modules/scheduler/index.js +2 -2
  79. package/dist/modules/security/index.cjs +3 -3
  80. package/dist/modules/security/index.js +2 -2
  81. package/dist/modules/semanticfed/index.cjs +3 -3
  82. package/dist/modules/semanticfed/index.js +2 -2
  83. package/dist/modules/store/index.cjs +3 -3
  84. package/dist/modules/store/index.js +2 -2
  85. package/dist/modules/subscriberbot/index.cjs +43 -19
  86. package/dist/modules/subscriberbot/index.js +47 -23
  87. package/dist/modules/support/index.cjs +2 -2
  88. package/dist/modules/support/index.js +2 -2
  89. package/dist/modules/tags/index.js +2 -2
  90. package/dist/modules/technospam/index.cjs +18 -9
  91. package/dist/modules/technospam/index.js +18 -9
  92. package/dist/modules/theculturepost/index.cjs +27 -22
  93. package/dist/modules/theculturepost/index.js +32 -27
  94. package/dist/modules/theglobalfuel/index.cjs +65 -60
  95. package/dist/modules/theglobalfuel/index.js +65 -60
  96. package/dist/modules/timecampus/index.js +2 -2
  97. package/dist/modules/tours/index.cjs +2 -2
  98. package/dist/modules/tours/index.js +2 -2
  99. package/dist/modules/vibecontrols/index.cjs +563 -567
  100. package/dist/modules/vibecontrols/index.js +5 -4
  101. package/dist/modules/workspaces/index.cjs +4 -4
  102. package/dist/modules/workspaces/index.js +2 -2
  103. package/package.json +1 -1
  104. package/dist/chunk-W4JZR7RJ.js +0 -1
@@ -1,4 +1,4 @@
1
- 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var l=class extends Error{exitCode;hint;constructor(i,d){super(i),this.name="CliUserError",this.exitCode=d?.exitCode??1,this.hint=d?.hint;}},k=class extends l{constructor(i,d){super(i,{exitCode:2,hint:d?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},x=class extends Error{cause;constructor(i,d){super(i),this.name="CliInternalError",this.cause=d;}};var Y=null;function nt(o){Y=o;}function $(){if(!Y)throw new x("vibecontrols module helpers used before setHelpersContext was called");return Y}function ie(){let o=$();if(!o.auth.isAuthenticated())throw new k("Authentication required.",{hint:`Run \`${o.productName} auth login\` to authenticate.`})}async function r(o,i){return ie(),$().gql.workspace.request(o,i)}function s(o){let i=o instanceof Error?o.message:String(o);throw new l(i)}function a(o,i,d){$().output.formatAndOutput(o,i,d);}function u(o){$().output.printSuccess(o);}function ot(o){return $().output.formatStatus(o)}function it(o){return $().output.formatDate(o)}function rt(o,i){return $().output.truncate(o,i)}function j(o,i){return $().output.confirm(o,i)}function st(){return $()}var C=`
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var l=class extends Error{exitCode;hint;constructor(i,d){super(i),this.name="CliUserError",this.exitCode=d?.exitCode??1,this.hint=d?.hint;}},k=class extends l{constructor(i,d){super(i,{exitCode:2,hint:d?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},E=class extends Error{cause;constructor(i,d){super(i),this.name="CliInternalError",this.cause=d;}};var X=null;function et(o){X=o;}function S(){if(!X)throw new E("vibecontrols module helpers used before setHelpersContext was called");return X}function oe(){let o=S();if(!o.auth.isAuthenticated())throw new k("Authentication required.",{hint:`Run \`${o.productName} auth login\` to authenticate.`})}async function r(o,i){return oe(),S().gql.workspace.request(o,i)}function s(o){let i=o instanceof Error?o.message:String(o);throw new l(i)}function a(o,i,d){S().output.formatAndOutput(o,i,d);}function p(o){S().output.printSuccess(o);}function nt(o){return S().output.formatStatus(o)}function ot(o){return S().output.formatDate(o)}function it(o,i){return S().output.truncate(o,i)}function Y(o,i){return S().output.confirm(o,i)}function rt(){return S()}var C=`
2
2
  id name template mode status ttlSeconds
3
3
  expiresAt stoppedAt
4
4
  workspaceId createdAt updatedAt
@@ -8,11 +8,11 @@
8
8
  items { ${C} } total hasMore
9
9
  }
10
10
  }
11
- `,It=`
11
+ `,gt=`
12
12
  query GetSandbox($context: ContextInput!, $id: ID!) {
13
13
  getSandbox(context: $context, id: $id) { ${C} }
14
14
  }
15
- `,gt=`
15
+ `,It=`
16
16
  mutation CreateSandbox($input: CreateSandboxInput!) {
17
17
  createSandbox(input: $input) { ${C} }
18
18
  }
@@ -30,7 +30,7 @@
30
30
  ${C}
31
31
  }
32
32
  }
33
- `,M=`
33
+ `,F=`
34
34
  id name description template isDefault ttlSeconds
35
35
  workspaceId createdAt updatedAt
36
36
  `,Tt=`
@@ -40,32 +40,32 @@
40
40
  $pagination: SandboxPaginationInput
41
41
  ) {
42
42
  listSandboxTemplates(context: $context, template: $template, pagination: $pagination) {
43
- items { ${M} } total hasMore
43
+ items { ${F} } total hasMore
44
44
  }
45
45
  }
46
46
  `,Et=`
47
47
  query GetSandboxTemplate($context: ContextInput!, $id: ID!) {
48
- getSandboxTemplate(context: $context, id: $id) { ${M} }
48
+ getSandboxTemplate(context: $context, id: $id) { ${F} }
49
49
  }
50
50
  `,ft=`
51
51
  mutation CreateSandboxTemplate($input: CreateSandboxTemplateInput!) {
52
- createSandboxTemplate(input: $input) { ${M} }
52
+ createSandboxTemplate(input: $input) { ${F} }
53
53
  }
54
54
  `,xt=`
55
55
  mutation UpdateSandboxTemplate($input: UpdateSandboxTemplateInput!) {
56
- updateSandboxTemplate(input: $input) { ${M} }
56
+ updateSandboxTemplate(input: $input) { ${F} }
57
57
  }
58
58
  `,At=`
59
59
  mutation DeleteSandboxTemplate($context: ContextInput!, $id: ID!) {
60
60
  deleteSandboxTemplate(context: $context, id: $id)
61
61
  }
62
- `,Dt=`
62
+ `,bt=`
63
63
  query AvailableSandboxTags($query: String, $limit: Int) {
64
64
  availableSandboxTags(query: $query, limit: $limit) {
65
65
  id key label color
66
66
  }
67
67
  }
68
- `,bt=`
68
+ `,Dt=`
69
69
  query GetSandboxTags($input: GetSandboxTagsInput!) {
70
70
  getSandboxTags(input: $input) {
71
71
  id entityId entityType tagId source assignedAt assignedBy
@@ -75,13 +75,13 @@
75
75
  mutation CreateSandboxTag($input: CreateSandboxTagInput!) {
76
76
  createSandboxTag(input: $input) { id key label color }
77
77
  }
78
- `,_t=`
78
+ `,yt=`
79
79
  mutation TagSandbox($input: TagSandboxInput!) {
80
80
  tagSandbox(input: $input) {
81
81
  id entityId tagId source assignedAt
82
82
  }
83
83
  }
84
- `,yt=`
84
+ `,_t=`
85
85
  mutation UntagSandbox($input: UntagSandboxInput!) {
86
86
  untagSandbox(input: $input)
87
87
  }
@@ -101,13 +101,13 @@
101
101
  items { ${C} } total hasMore
102
102
  }
103
103
  }
104
- `,Nt=`
104
+ `,ht=`
105
105
  query ListSandboxNodes($context: ContextInput!) {
106
106
  listSandboxNodes(context: $context) {
107
107
  name status allocatableCpu allocatableMemory sandboxPodCount labels
108
108
  }
109
109
  }
110
- `,ht=`
110
+ `,Nt=`
111
111
  query GetActiveSandboxes($context: ContextInput!) {
112
112
  getActiveSandboxes(context: $context) { ${C} }
113
113
  }
@@ -125,7 +125,7 @@
125
125
  stoppedNow expiredCount failedCount totalCpuUsed totalMemoryUsed
126
126
  }
127
127
  }
128
- `,Lt=`
128
+ `,wt=`
129
129
  query GetSandboxLogs(
130
130
  $context: ContextInput!
131
131
  $id: ID!
@@ -134,7 +134,7 @@
134
134
  ) {
135
135
  getSandboxLogs(context: $context, id: $id, containerName: $containerName, tailLines: $tailLines)
136
136
  }
137
- `,wt=`
137
+ `,Lt=`
138
138
  query GetSandboxConfig($context: ContextInput!) {
139
139
  getSandboxConfig(context: $context) {
140
140
  id defaultTtlSeconds maxTtlSeconds allowedTemplates
@@ -152,4 +152,4 @@
152
152
  workspaceId updatedAt
153
153
  }
154
154
  }
155
- `;function c(){let o=st().auth.read();if(!o?.workspaceId)throw new l("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:o.workspaceId}}function Kt(o){let i=o.command("sandbox").description("Manage sandboxes");i.command("list").description("List sandboxes").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.template&&(t.template=e.template.toUpperCase());let y=(await r(lt,{context:c(),filter:Object.keys(t).length?t:void 0,pagination:{limit:e.limit,offset:0}})).listSandboxes.items;a(e,y,{headers:["ID","Name","Template","Mode","Status","TTL","Created"],rows:y.map(T=>[rt(T.id,12),T.name,T.template,T.mode,ot(T.status),T.ttlSeconds?`${T.ttlSeconds}s`:"-",it(T.createdAt)])});}catch(t){s(t);}}),i.command("get").description("Get sandbox details").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await r(It,{context:c(),id:e});if(!n.getSandbox)throw new l("Sandbox not found");a(t,n.getSandbox);}catch(n){s(n);}}),i.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 e=>{try{let t=await r(gt,{input:{name:e.name,template:e.template.toUpperCase(),mode:e.mode.toUpperCase(),ttlSeconds:e.ttl,context:c()}});u("Sandbox created"),a(e,t.createSandbox);}catch(t){s(t);}}),i.command("stop").description("Stop sandbox").argument("<id>").action(async e=>{try{await r(mt,{context:c(),id:e}),u("Sandbox stopped");}catch(t){s(t);}}),i.command("delete").description("Delete sandbox").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await j("Delete this sandbox?",t.force))return;await r(St,{context:c(),id:e}),u("Sandbox deleted");}catch(n){s(n);}}),i.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(e,t)=>{try{let n;if(t.seconds?n=t.seconds:t.minutes&&(n=t.minutes*60),!n)throw new l("Either --seconds or --minutes is required");let y=await r($t,{context:c(),id:e,additionalSeconds:n});u(`Sandbox extended by ${n}s`),a(t,y.extendSandboxTTL);}catch(n){s(n);}});let d=i.command("templates").description("Manage sandbox templates");d.command("list").description("List sandbox templates").option("--template <kind>","Filter by template kind").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(Tt,{context:c(),template:e.template?.toUpperCase(),pagination:{limit:e.limit,offset:0}});a(e,t.listSandboxTemplates.items);}catch(t){s(t);}}),d.command("get").description("Get template details").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await r(Et,{context:c(),id:e});if(!n.getSandboxTemplate)throw new l("Template not found");a(t,n.getSandboxTemplate);}catch(n){s(n);}}),d.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 e=>{try{let t={name:e.name,template:e.template.toUpperCase(),context:c()};e.description&&(t.description=e.description),e.default&&(t.isDefault=!0),e.ttl!==void 0&&(t.ttlSeconds=e.ttl);let n=await r(ft,{input:t});u("Template created"),a(e,n.createSandboxTemplate);}catch(t){s(t);}}),d.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(e,t)=>{try{let n={id:e,context:c()};t.name&&(n.name=t.name),t.description&&(n.description=t.description),t.default!==void 0&&(n.isDefault=t.default),t.ttl!==void 0&&(n.ttlSeconds=t.ttl);let y=await r(xt,{input:n});u("Template updated"),a(t,y.updateSandboxTemplate);}catch(n){s(n);}}),d.command("delete").description("Delete sandbox template").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await j("Delete this template?",t.force))return;await r(At,{context:c(),id:e}),u("Template deleted");}catch(n){s(n);}});let _=i.command("tags").description("Manage sandbox tags");_.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 e=>{try{let t=await r(Dt,{query:e.query,limit:e.limit});a(e,t.availableSandboxTags);}catch(t){s(t);}}),_.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 e=>{try{let t={label:e.label};e.color&&(t.color=e.color);let n=await r(Ct,{input:t});u("Tag created"),a(e,n.createSandboxTag);}catch(t){s(t);}}),_.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 e=>{try{let t=await r(_t,{input:{sandboxId:e.sandbox,tagId:e.tag}});u("Tag attached"),a(e,t.tagSandbox);}catch(t){s(t);}}),_.command("detach").description("Detach a tag from a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").action(async e=>{try{await r(yt,{input:{sandboxId:e.sandbox,tagId:e.tag}}),u("Tag detached");}catch(t){s(t);}}),_.command("get").description("Get tags assigned to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(bt,{input:{sandboxId:e.sandbox}});a(e,t.getSandboxTags);}catch(t){s(t);}}),_.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 e=>{try{let t=await r(kt,{input:{sandboxId:e.sandbox,tagIds:e.tags}});u("Tags replaced"),a(e,t.replaceSandboxTags);}catch(t){s(t);}});let f=i.command("admin").description("Admin / observability ops");f.command("nodes").description("List sandbox nodes").option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(Nt,{context:c()});a(e,t.listSandboxNodes);}catch(t){s(t);}}),f.command("all").description("List all sandboxes (admin)").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.template&&(t.template=e.template.toUpperCase());let n=await r(Ot,{context:c(),filter:Object.keys(t).length?t:void 0,pagination:{limit:e.limit,offset:0}});a(e,n.listAllSandboxes.items);}catch(t){s(t);}}),f.command("active").description("Get active sandboxes").option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(ht,{context:c()});a(e,t.getActiveSandboxes);}catch(t){s(t);}}),f.command("activity").description("Get recent sandbox activity").option("--limit <n>","Max items",parseInt,20).option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(vt,{context:c(),limit:e.limit});a(e,t.getRecentSandboxActivity.items);}catch(t){s(t);}}),f.command("stats").description("Get sandbox stats").option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(Rt,{context:c()});a(e,t.getSandboxStats);}catch(t){s(t);}}),f.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(e,t)=>{try{let n=await r(Lt,{context:c(),id:e,containerName:t.container,tailLines:t.tail});process.stdout.write(n.getSandboxLogs);}catch(n){s(n);}});let Z=f.command("config").description("Sandbox config");Z.command("get").description("Get sandbox config").option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(wt,{context:c()});a(e,t.getSandboxConfig);}catch(t){s(t);}}),Z.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 e=>{try{let t={context:c()};e.defaultTtl!==void 0&&(t.defaultTtlSeconds=e.defaultTtl),e.maxTtl!==void 0&&(t.maxTtlSeconds=e.maxTtl),e.maxPerUser!==void 0&&(t.maxConcurrentPerUser=e.maxPerUser),e.maxPerWorkspace!==void 0&&(t.maxConcurrentPerWorkspace=e.maxPerWorkspace);let n=await r(Pt,{input:t});u("Config updated"),a(e,n.updateSandboxConfig);}catch(t){s(t);}});}var ae={id:"sandbox",version:"1.0.0",displayName:"Sandbox",dependsOn:["auth","workspaces"],register(o,i){nt(i),Kt(o);}},Wr=ae;module.exports=Wr;
155
+ `;function c(){let o=rt().auth.read();if(!o?.workspaceId)throw new l("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:o.workspaceId}}function Wt(o){let i=o.command("sandbox").description("Manage sandboxes");i.command("list").description("List sandboxes").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.template&&(t.template=e.template.toUpperCase());let _=(await r(lt,{context:c(),filter:Object.keys(t).length?t:void 0,pagination:{limit:e.limit,offset:0}})).listSandboxes.items;a(e,_,{headers:["ID","Name","Template","Mode","Status","TTL","Created"],rows:_.map($=>[it($.id,12),$.name,$.template,$.mode,nt($.status),$.ttlSeconds?`${$.ttlSeconds}s`:"-",ot($.createdAt)])});}catch(t){s(t);}}),i.command("get").description("Get sandbox details").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await r(gt,{context:c(),id:e});if(!n.getSandbox)throw new l("Sandbox not found");a(t,n.getSandbox);}catch(n){s(n);}}),i.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 e=>{try{let t=await r(It,{input:{name:e.name,template:e.template.toUpperCase(),mode:e.mode.toUpperCase(),ttlSeconds:e.ttl,context:c()}});p("Sandbox created"),a(e,t.createSandbox);}catch(t){s(t);}}),i.command("stop").description("Stop sandbox").argument("<id>").action(async e=>{try{await r(mt,{context:c(),id:e}),p("Sandbox stopped");}catch(t){s(t);}}),i.command("delete").description("Delete sandbox").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await Y("Delete this sandbox?",t.force))return;await r(St,{context:c(),id:e}),p("Sandbox deleted");}catch(n){s(n);}}),i.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(e,t)=>{try{let n;if(t.seconds?n=t.seconds:t.minutes&&(n=t.minutes*60),!n)throw new l("Either --seconds or --minutes is required");let _=await r($t,{context:c(),id:e,additionalSeconds:n});p(`Sandbox extended by ${n}s`),a(t,_.extendSandboxTTL);}catch(n){s(n);}});let d=i.command("templates").description("Manage sandbox templates");d.command("list").description("List sandbox templates").option("--template <kind>","Filter by template kind").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(Tt,{context:c(),template:e.template?.toUpperCase(),pagination:{limit:e.limit,offset:0}});a(e,t.listSandboxTemplates.items);}catch(t){s(t);}}),d.command("get").description("Get template details").argument("<id>").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await r(Et,{context:c(),id:e});if(!n.getSandboxTemplate)throw new l("Template not found");a(t,n.getSandboxTemplate);}catch(n){s(n);}}),d.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 e=>{try{let t={name:e.name,template:e.template.toUpperCase(),context:c()};e.description&&(t.description=e.description),e.default&&(t.isDefault=!0),e.ttl!==void 0&&(t.ttlSeconds=e.ttl);let n=await r(ft,{input:t});p("Template created"),a(e,n.createSandboxTemplate);}catch(t){s(t);}}),d.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(e,t)=>{try{let n={id:e,context:c()};t.name&&(n.name=t.name),t.description&&(n.description=t.description),t.default!==void 0&&(n.isDefault=t.default),t.ttl!==void 0&&(n.ttlSeconds=t.ttl);let _=await r(xt,{input:n});p("Template updated"),a(t,_.updateSandboxTemplate);}catch(n){s(n);}}),d.command("delete").description("Delete sandbox template").argument("<id>").option("--force","Skip confirmation").action(async(e,t)=>{try{if(!await Y("Delete this template?",t.force))return;await r(At,{context:c(),id:e}),p("Template deleted");}catch(n){s(n);}});let y=i.command("tags").description("Manage sandbox tags");y.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 e=>{try{let t=await r(bt,{query:e.query,limit:e.limit});a(e,t.availableSandboxTags);}catch(t){s(t);}}),y.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 e=>{try{let t={label:e.label};e.color&&(t.color=e.color);let n=await r(Ct,{input:t});p("Tag created"),a(e,n.createSandboxTag);}catch(t){s(t);}}),y.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 e=>{try{let t=await r(yt,{input:{sandboxId:e.sandbox,tagId:e.tag}});p("Tag attached"),a(e,t.tagSandbox);}catch(t){s(t);}}),y.command("detach").description("Detach a tag from a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").action(async e=>{try{await r(_t,{input:{sandboxId:e.sandbox,tagId:e.tag}}),p("Tag detached");}catch(t){s(t);}}),y.command("get").description("Get tags assigned to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(Dt,{input:{sandboxId:e.sandbox}});a(e,t.getSandboxTags);}catch(t){s(t);}}),y.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 e=>{try{let t=await r(kt,{input:{sandboxId:e.sandbox,tagIds:e.tags}});p("Tags replaced"),a(e,t.replaceSandboxTags);}catch(t){s(t);}});let T=i.command("admin").description("Admin / observability ops");T.command("nodes").description("List sandbox nodes").option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(ht,{context:c()});a(e,t.listSandboxNodes);}catch(t){s(t);}}),T.command("all").description("List all sandboxes (admin)").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>","Output format").action(async e=>{try{let t={};e.status&&(t.status=e.status.toUpperCase()),e.template&&(t.template=e.template.toUpperCase());let n=await r(Ot,{context:c(),filter:Object.keys(t).length?t:void 0,pagination:{limit:e.limit,offset:0}});a(e,n.listAllSandboxes.items);}catch(t){s(t);}}),T.command("active").description("Get active sandboxes").option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(Nt,{context:c()});a(e,t.getActiveSandboxes);}catch(t){s(t);}}),T.command("activity").description("Get recent sandbox activity").option("--limit <n>","Max items",parseInt,20).option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(vt,{context:c(),limit:e.limit});a(e,t.getRecentSandboxActivity.items);}catch(t){s(t);}}),T.command("stats").description("Get sandbox stats").option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(Rt,{context:c()});a(e,t.getSandboxStats);}catch(t){s(t);}}),T.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(e,t)=>{try{let n=await r(wt,{context:c(),id:e,containerName:t.container,tailLines:t.tail});process.stdout.write(n.getSandboxLogs);}catch(n){s(n);}});let Q=T.command("config").description("Sandbox config");Q.command("get").description("Get sandbox config").option("-f, --format <format>","Output format").action(async e=>{try{let t=await r(Lt,{context:c()});a(e,t.getSandboxConfig);}catch(t){s(t);}}),Q.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 e=>{try{let t={context:c()};e.defaultTtl!==void 0&&(t.defaultTtlSeconds=e.defaultTtl),e.maxTtl!==void 0&&(t.maxTtlSeconds=e.maxTtl),e.maxPerUser!==void 0&&(t.maxConcurrentPerUser=e.maxPerUser),e.maxPerWorkspace!==void 0&&(t.maxConcurrentPerWorkspace=e.maxPerWorkspace);let n=await r(Pt,{input:t});p("Config updated"),a(e,n.updateSandboxConfig);}catch(t){s(t);}});}var se={id:"sandbox",version:"1.0.0",displayName:"Sandbox",dependsOn:["auth","workspaces"],register(o,i){et(i),Wt(o);}},Ur=se;module.exports=Ur;
@@ -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}from'../../chunk-AYNNSLCL.js';import {a,b,h,p,n,o,g,i,q,s as s$1}from'../../chunk-W4JZR7RJ.js';import {o as o$1}from'../../chunk-YIY5IDXQ.js';function s(){let p=s$1().auth.read();if(!p?.workspaceId)throw new o$1("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:p.workspaceId}}function $(p$1){let d=p$1.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 u=(await b(Nc,{context:s(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n$1.limit,offset:0}})).listSandboxes.items;h(n$1,u,{headers:["ID","Name","Template","Mode","Status","TTL","Created"],rows:u.map(c=>[p(c.id,12),c.name,c.template,c.mode,n(c.status),c.ttlSeconds?`${c.ttlSeconds}s`:"-",o(c.createdAt)])});}catch(t){g(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:s(),id:n});if(!e.getSandbox)throw new o$1("Sandbox not found");h(t,e.getSandbox);}catch(e){g(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:s()}});i("Sandbox created"),h(n,t.createSandbox);}catch(t){g(t);}}),d.command("stop").description("Stop sandbox").argument("<id>").action(async n=>{try{await b(Qc,{context:s(),id:n}),i("Sandbox stopped");}catch(t){g(t);}}),d.command("delete").description("Delete sandbox").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await q("Delete this sandbox?",t.force))return;await b(Rc,{context:s(),id:n}),i("Sandbox deleted");}catch(e){g(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 u=await b(Sc,{context:s(),id:n,additionalSeconds:e});i(`Sandbox extended by ${e}s`),h(t,u.extendSandboxTTL);}catch(e){g(e);}});let f=d.command("templates").description("Manage sandbox templates");f.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:s(),template:n.template?.toUpperCase(),pagination:{limit:n.limit,offset:0}});h(n,t.listSandboxTemplates.items);}catch(t){g(t);}}),f.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:s(),id:n});if(!e.getSandboxTemplate)throw new o$1("Template not found");h(t,e.getSandboxTemplate);}catch(e){g(e);}}),f.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:s()};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});i("Template created"),h(n,e.createSandboxTemplate);}catch(t){g(t);}}),f.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:s()};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 u=await b(Wc,{input:e});i("Template updated"),h(t,u.updateSandboxTemplate);}catch(e){g(e);}}),f.command("delete").description("Delete sandbox template").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await q("Delete this template?",t.force))return;await b(Xc,{context:s(),id:n}),i("Template deleted");}catch(e){g(e);}});let l=d.command("tags").description("Manage sandbox tags");l.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});h(n,t.availableSandboxTags);}catch(t){g(t);}}),l.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});i("Tag created"),h(n,e.createSandboxTag);}catch(t){g(t);}}),l.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}});i("Tag attached"),h(n,t.tagSandbox);}catch(t){g(t);}}),l.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}}),i("Tag detached");}catch(t){g(t);}}),l.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}});h(n,t.getSandboxTags);}catch(t){g(t);}}),l.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}});i("Tags replaced"),h(n,t.replaceSandboxTags);}catch(t){g(t);}});let m=d.command("admin").description("Admin / observability ops");m.command("nodes").description("List sandbox nodes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(dd,{context:s()});h(n,t.listSandboxNodes);}catch(t){g(t);}}),m.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:s(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n.limit,offset:0}});h(n,e.listAllSandboxes.items);}catch(t){g(t);}}),m.command("active").description("Get active sandboxes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(ed,{context:s()});h(n,t.getActiveSandboxes);}catch(t){g(t);}}),m.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:s(),limit:n.limit});h(n,t.getRecentSandboxActivity.items);}catch(t){g(t);}}),m.command("stats").description("Get sandbox stats").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(gd,{context:s()});h(n,t.getSandboxStats);}catch(t){g(t);}}),m.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:s(),id:n,containerName:t.container,tailLines:t.tail});process.stdout.write(e.getSandboxLogs);}catch(e){g(e);}});let b$1=m.command("config").description("Sandbox config");b$1.command("get").description("Get sandbox config").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(id,{context:s()});h(n,t.getSandboxConfig);}catch(t){g(t);}}),b$1.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:s()};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});i("Config updated"),h(n,e.updateSandboxConfig);}catch(t){g(t);}});}var K={id:"sandbox",version:"1.0.0",displayName:"Sandbox",dependsOn:["auth","workspaces"],register(p,d){a(d),$(p);}},it=K;export{it as default};
1
+ import {Kc,Lc,Mc,Nc,Oc,Pc,Qc,Rc,Sc,Tc,Uc,Vc,Xc,Yc,Zc,Wc,_c,ad,$c,bd,cd,dd,ed,fd,gd}from'../../chunk-ZGT7IIOP.js';import {a,b,i,r,p,q,h,k,s as s$1,u}from'../../chunk-O6UCQ5IT.js';import {o}from'../../chunk-YIY5IDXQ.js';function s(){let p=u().auth.read();if(!p?.workspaceId)throw new o("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:p.workspaceId}}function $(p$1){let d=p$1.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=>{try{let t={};n.status&&(t.status=n.status.toUpperCase()),n.template&&(t.template=n.template.toUpperCase());let u=(await b(Kc,{context:s(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n.limit,offset:0}})).listSandboxes.items;i(n,u,{headers:["ID","Name","Template","Mode","Status","TTL","Created"],rows:u.map(c=>[r(c.id,12),c.name,c.template,c.mode,p(c.status),c.ttlSeconds?`${c.ttlSeconds}s`:"-",q(c.createdAt)])});}catch(t){h(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(Lc,{context:s(),id:n});if(!e.getSandbox)throw new o("Sandbox not found");i(t,e.getSandbox);}catch(e){h(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(Mc,{input:{name:n.name,template:n.template.toUpperCase(),mode:n.mode.toUpperCase(),ttlSeconds:n.ttl,context:s()}});k("Sandbox created"),i(n,t.createSandbox);}catch(t){h(t);}}),d.command("stop").description("Stop sandbox").argument("<id>").action(async n=>{try{await b(Nc,{context:s(),id:n}),k("Sandbox stopped");}catch(t){h(t);}}),d.command("delete").description("Delete sandbox").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await s$1("Delete this sandbox?",t.force))return;await b(Oc,{context:s(),id:n}),k("Sandbox deleted");}catch(e){h(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("Either --seconds or --minutes is required");let u=await b(Pc,{context:s(),id:n,additionalSeconds:e});k(`Sandbox extended by ${e}s`),i(t,u.extendSandboxTTL);}catch(e){h(e);}});let f=d.command("templates").description("Manage sandbox templates");f.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(Qc,{context:s(),template:n.template?.toUpperCase(),pagination:{limit:n.limit,offset:0}});i(n,t.listSandboxTemplates.items);}catch(t){h(t);}}),f.command("get").description("Get template details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Rc,{context:s(),id:n});if(!e.getSandboxTemplate)throw new o("Template not found");i(t,e.getSandboxTemplate);}catch(e){h(e);}}),f.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:s()};n.description&&(t.description=n.description),n.default&&(t.isDefault=!0),n.ttl!==void 0&&(t.ttlSeconds=n.ttl);let e=await b(Sc,{input:t});k("Template created"),i(n,e.createSandboxTemplate);}catch(t){h(t);}}),f.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:s()};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 u=await b(Tc,{input:e});k("Template updated"),i(t,u.updateSandboxTemplate);}catch(e){h(e);}}),f.command("delete").description("Delete sandbox template").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await s$1("Delete this template?",t.force))return;await b(Uc,{context:s(),id:n}),k("Template deleted");}catch(e){h(e);}});let l=d.command("tags").description("Manage sandbox tags");l.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(Vc,{query:n.query,limit:n.limit});i(n,t.availableSandboxTags);}catch(t){h(t);}}),l.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(Xc,{input:t});k("Tag created"),i(n,e.createSandboxTag);}catch(t){h(t);}}),l.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(Yc,{input:{sandboxId:n.sandbox,tagId:n.tag}});k("Tag attached"),i(n,t.tagSandbox);}catch(t){h(t);}}),l.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(Zc,{input:{sandboxId:n.sandbox,tagId:n.tag}}),k("Tag detached");}catch(t){h(t);}}),l.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(Wc,{input:{sandboxId:n.sandbox}});i(n,t.getSandboxTags);}catch(t){h(t);}}),l.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(_c,{input:{sandboxId:n.sandbox,tagIds:n.tags}});k("Tags replaced"),i(n,t.replaceSandboxTags);}catch(t){h(t);}});let m=d.command("admin").description("Admin / observability ops");m.command("nodes").description("List sandbox nodes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(ad,{context:s()});i(n,t.listSandboxNodes);}catch(t){h(t);}}),m.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($c,{context:s(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n.limit,offset:0}});i(n,e.listAllSandboxes.items);}catch(t){h(t);}}),m.command("active").description("Get active sandboxes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(bd,{context:s()});i(n,t.getActiveSandboxes);}catch(t){h(t);}}),m.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(cd,{context:s(),limit:n.limit});i(n,t.getRecentSandboxActivity.items);}catch(t){h(t);}}),m.command("stats").description("Get sandbox stats").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(dd,{context:s()});i(n,t.getSandboxStats);}catch(t){h(t);}}),m.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(ed,{context:s(),id:n,containerName:t.container,tailLines:t.tail});process.stdout.write(e.getSandboxLogs);}catch(e){h(e);}});let b$1=m.command("config").description("Sandbox config");b$1.command("get").description("Get sandbox config").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(fd,{context:s()});i(n,t.getSandboxConfig);}catch(t){h(t);}}),b$1.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:s()};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(gd,{input:t});k("Config updated"),i(n,e.updateSandboxConfig);}catch(t){h(t);}});}var K={id:"sandbox",version:"1.0.0",displayName:"Sandbox",dependsOn:["auth","workspaces"],register(p,d){a(d),$(p);}},it=K;export{it 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(r){x=r;}function g(){if(!x)throw new f("vibecontrols module helpers used before setHelpersContext was called");return x}function le(){let r=g();if(!r.auth.isAuthenticated())throw new m("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function o(r,c){return le(),g().gql.workspace.request(r,c)}function i(r){let c=r instanceof Error?r.message:String(r);throw new l(c)}function d(r,c,s){g().output.formatAndOutput(r,c,s);}function u(r){g().output.printSuccess(r);}function T(r){return g().output.formatStatus(r)}function E(r){return g().output.formatDate(r)}function w(r,c){return g().output.truncate(r,c)}function O(){return g()}var D=`
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(r){x=r;}function g(){if(!x)throw new f("vibecontrols module helpers used before setHelpersContext was called");return x}function le(){let r=g();if(!r.auth.isAuthenticated())throw new m("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function o(r,c){return le(),g().gql.workspace.request(r,c)}function i(r){let c=r instanceof Error?r.message:String(r);throw new l(c)}function d(r,c,s){g().output.formatAndOutput(r,c,s);}function u(r){g().output.printSuccess(r);}function b(r){return g().output.formatStatus(r)}function E(r){return g().output.formatDate(r)}function y(r,c){return g().output.truncate(r,c)}function O(){return g()}var D=`
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 }
@@ -139,4 +139,4 @@
139
139
  query GetScheduledJobTags($input: GetScheduledJobTagsInput!) {
140
140
  getScheduledJobTags(input: $input) { id entityId tagId source }
141
141
  }
142
- `;function C(){let r=O().auth.read();if(!r?.workspaceId)throw new l("No workspace set. Run: vibecontrols workspace set <id>");return r.workspaceId}function Z(r){let c=r.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 o(D,{workspaceId:C(),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=>[w(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 o(A,{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 o($,{workspaceId:C(),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 o(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 o(_,{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 o(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 o(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 o(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 o(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 o(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 o(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 o(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 o(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 o(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 o(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 o(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 o(W,{workspaceId:C(),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 o(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 o(M,{workspaceId:C(),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 o(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 o(V,{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 o(F,{scheduleId:e});d(t,n.scheduleVersionHistory,{headers:["ID","Version","ChangedBy","Reason","CreatedAt"],rows:n.scheduleVersionHistory.map(a=>[w(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 o(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 o(R,{jobId:e,pagination:{first:t.limit}});d(t,n.jobExecutions.executions,{headers:["ID","Status","Started","Duration","Success"],rows:n.jobExecutions.executions.map(a=>[w(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(r,c){v(c),Z(r);}},It=fe;module.exports=It;
142
+ `;function w(){let r=O().auth.read();if(!r?.workspaceId)throw new l("No workspace set. Run: vibecontrols workspace set <id>");return r.workspaceId}function Z(r){let c=r.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 o(D,{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=>[y(a.id,12),a.name,b(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 o(A,{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 o($,{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 o(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 o(_,{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 o(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 o(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 o(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 o(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 o(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 o(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 o(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 C=s.command("tags").description("Scheduled-job tag assignments");C.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 o(K,{input:t}),u("Tagged");}catch(t){i(t);}}),C.command("remove").description("Remove a tag from a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").action(async e=>{try{await o(Y,{input:{entityId:e.entity,tagId:e.tag}}),u("Tag removed");}catch(t){i(t);}}),C.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 o(X,{input:{entityId:e.entity,tagIds:e.tags.split(",")}});u("Tags replaced"),d(e,t.replaceScheduledJobTags);}catch(t){i(t);}}),C.command("list").description("List tags on a scheduled job").requiredOption("--entity <id>").option("-f, --format <format>").action(async e=>{try{let t=await o(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 o(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 o(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 o(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 o(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 o(V,{id:e}),u("Template deleted");}catch(t){i(t);}});let T=c.command("versions").description("Schedule version history");T.command("list").description("List version history for a schedule").argument("<scheduleId>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await o(F,{scheduleId:e});d(t,n.scheduleVersionHistory,{headers:["ID","Version","ChangedBy","Reason","CreatedAt"],rows:n.scheduleVersionHistory.map(a=>[y(a.id,12),String(a.version),a.changedBy,a.changeReason??"-",E(a.createdAt)])});}catch(n){i(n);}}),T.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 o(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 o(R,{jobId:e,pagination:{first:t.limit}});d(t,n.jobExecutions.executions,{headers:["ID","Status","Started","Duration","Success"],rows:n.jobExecutions.executions.map(a=>[y(a.id,12),b(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(r,c){v(c),Z(r);}},It=fe;module.exports=It;
@@ -1,4 +1,4 @@
1
- import {a,b,h as h$1,p,n,o,g,i,s}from'../../chunk-W4JZR7RJ.js';import {o as o$1}from'../../chunk-YIY5IDXQ.js';var C=`
1
+ import {a,b,i,r,p,q as q$1,h as h$1,k as k$1,u}from'../../chunk-O6UCQ5IT.js';import {o}from'../../chunk-YIY5IDXQ.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 }
@@ -139,4 +139,4 @@ import {a,b,h as h$1,p,n,o,g,i,s}from'../../chunk-W4JZR7RJ.js';import {o as o$1}
139
139
  query GetScheduledJobTags($input: GetScheduledJobTagsInput!) {
140
140
  getScheduledJobTags(input: $input) { id entityId tagId source }
141
141
  }
142
- `;function h(){let d=s().auth.read();if(!d?.workspaceId)throw new o$1("No workspace set. Run: vibecontrols workspace set <id>");return d.workspaceId}function X(d){let u=d.command("scheduler").description("Scheduled jobs & executions"),c=u.command("jobs").description("Manage scheduled jobs");c.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$1=await b(C,{workspaceId:h(),filter:Object.keys(t).length?t:void 0,pagination:{first:e.limit}});h$1(e,n$1.scheduledJobs.jobs,{headers:["ID","Name","Status","Type","NextRun","Created"],rows:n$1.scheduledJobs.jobs.map(r=>[p(r.id,12),r.name,n(r.status),r.scheduleType??"-",o(r.nextExecutionAt),o(r.createdAt)])});}catch(t){g(t);}}),c.command("get").description("Get a scheduled job").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(x,{id:e});if(!n.scheduledJob)throw new o$1(`Job ${e} not found`);h$1(t,n.scheduledJob);}catch(n){g(n);}}),c.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(),r={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 b(w,{workspaceId:h(),input:r});i(`Job created: ${I.createScheduledJob.name}`),h$1(e,I.createScheduledJob);}catch(t){g(t);}}),c.command("delete").description("Delete a scheduled job").argument("<id>").action(async e=>{try{await b(_,{id:e}),i("Job deleted");}catch(t){g(t);}});let F=u.command("executions").description("Job execution history");c.command("pause").description("Pause a scheduled job").argument("<id>").action(async e=>{try{await b($,{id:e}),i("Job paused");}catch(t){g(t);}}),c.command("resume").description("Resume a paused scheduled job").argument("<id>").action(async e=>{try{await b(J,{id:e}),i("Job resumed");}catch(t){g(t);}}),c.command("activate").description("Activate a draft or disabled schedule").argument("<id>").action(async e=>{try{await b(L,{id:e}),i("Schedule activated");}catch(t){g(t);}}),c.command("archive").description("Archive a scheduled job").argument("<id>").action(async e=>{try{await b(R,{id:e}),i("Schedule archived");}catch(t){g(t);}}),c.command("disable").description("Disable a schedule (with optional reason)").argument("<id>").option("--reason <r>").action(async(e,t)=>{try{await b(U,{id:e,reason:t.reason??null}),i("Schedule disabled");}catch(n){g(n);}}),c.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 b(A,{sourceId:e,newWorkspaceId:t.workspace??null,overrides:t.overrides?JSON.parse(t.overrides):null});i(`Cloned: ${n.cloneSchedule.id}`),h$1(t,n.cloneSchedule);}catch(n){g(n);}}),c.command("execute-now").description("Execute a scheduled job immediately").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(v,{id:e});i("Execution dispatched"),h$1(t,n.executeJobNow);}catch(n){g(n);}}),c.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 b(H,{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});h$1(e,t.previewSchedule);}catch(t){g(t);}});let g$1=c.command("tags").description("Scheduled-job tag assignments");g$1.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 b(M,{input:t}),i("Tagged");}catch(t){g(t);}}),g$1.command("remove").description("Remove a tag from a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").action(async e=>{try{await b(G,{input:{entityId:e.entity,tagId:e.tag}}),i("Tag removed");}catch(t){g(t);}}),g$1.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 b(W,{input:{entityId:e.entity,tagIds:e.tags.split(",")}});i("Tags replaced"),h$1(e,t.replaceScheduledJobTags);}catch(t){g(t);}}),g$1.command("list").description("List tags on a scheduled job").requiredOption("--entity <id>").option("-f, --format <format>").action(async e=>{try{let t=await b(z,{input:{entityId:e.entity}});h$1(e,t.getScheduledJobTags);}catch(t){g(t);}});let p$1=u.command("templates").description("Schedule templates");p$1.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 b(N,{workspaceId:h(),filter:Object.keys(t).length?t:void 0,pagination:{first:100}});h$1(e,n.scheduleTemplates.templates);}catch(t){g(t);}}),p$1.command("get").description("Get a schedule template").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(k,{id:e});if(!n.scheduleTemplate)throw new o$1(`Template ${e} not found`);h$1(t,n.scheduleTemplate);}catch(n){g(n);}}),p$1.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 b(P,{workspaceId:h(),input:t});i("Template created"),h$1(e,n.createScheduleTemplate);}catch(t){g(t);}}),p$1.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 o$1("Provide at least one field to update");let r=await b(j,{id:e,input:n});i("Template updated"),h$1(t,r.updateScheduleTemplate);}catch(n){g(n);}}),p$1.command("delete").description("Delete a schedule template").argument("<id>").action(async e=>{try{await b(B,{id:e}),i("Template deleted");}catch(t){g(t);}});let y=u.command("versions").description("Schedule version history");y.command("list").description("List version history for a schedule").argument("<scheduleId>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(V,{scheduleId:e});h$1(t,n.scheduleVersionHistory,{headers:["ID","Version","ChangedBy","Reason","CreatedAt"],rows:n.scheduleVersionHistory.map(r=>[p(r.id,12),String(r.version),r.changedBy,r.changeReason??"-",o(r.createdAt)])});}catch(n){g(n);}}),y.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 b(q,{scheduleId:e.schedule,versionId:e.version});i("Version restored"),h$1(e,t.restoreScheduleVersion);}catch(t){g(t);}}),F.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$1=await b(O,{jobId:e,pagination:{first:t.limit}});h$1(t,n$1.jobExecutions.executions,{headers:["ID","Status","Started","Duration","Success"],rows:n$1.jobExecutions.executions.map(r=>[p(r.id,12),n(r.status),o(r.startedAt),String(r.duration??"-"),String(!!r.success)])});}catch(n){g(n);}});}var Y={id:"scheduler",version:"1.0.0",displayName:"Scheduler",dependsOn:["auth","workspaces"],register(d,u){a(u),X(d);}},ie=Y;export{ie as default};
142
+ `;function h(){let d=u().auth.read();if(!d?.workspaceId)throw new o("No workspace set. Run: vibecontrols workspace set <id>");return d.workspaceId}function X(d){let u=d.command("scheduler").description("Scheduled jobs & executions"),c=u.command("jobs").description("Manage scheduled jobs");c.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 b(C,{workspaceId:h(),filter:Object.keys(t).length?t:void 0,pagination:{first:e.limit}});i(e,n.scheduledJobs.jobs,{headers:["ID","Name","Status","Type","NextRun","Created"],rows:n.scheduledJobs.jobs.map(r$1=>[r(r$1.id,12),r$1.name,p(r$1.status),r$1.scheduleType??"-",q$1(r$1.nextExecutionAt),q$1(r$1.createdAt)])});}catch(t){h$1(t);}}),c.command("get").description("Get a scheduled job").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(x,{id:e});if(!n.scheduledJob)throw new o(`Job ${e} not found`);i(t,n.scheduledJob);}catch(n){h$1(n);}}),c.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(),r={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 b(w,{workspaceId:h(),input:r});k$1(`Job created: ${I.createScheduledJob.name}`),i(e,I.createScheduledJob);}catch(t){h$1(t);}}),c.command("delete").description("Delete a scheduled job").argument("<id>").action(async e=>{try{await b(_,{id:e}),k$1("Job deleted");}catch(t){h$1(t);}});let F=u.command("executions").description("Job execution history");c.command("pause").description("Pause a scheduled job").argument("<id>").action(async e=>{try{await b($,{id:e}),k$1("Job paused");}catch(t){h$1(t);}}),c.command("resume").description("Resume a paused scheduled job").argument("<id>").action(async e=>{try{await b(J,{id:e}),k$1("Job resumed");}catch(t){h$1(t);}}),c.command("activate").description("Activate a draft or disabled schedule").argument("<id>").action(async e=>{try{await b(L,{id:e}),k$1("Schedule activated");}catch(t){h$1(t);}}),c.command("archive").description("Archive a scheduled job").argument("<id>").action(async e=>{try{await b(R,{id:e}),k$1("Schedule archived");}catch(t){h$1(t);}}),c.command("disable").description("Disable a schedule (with optional reason)").argument("<id>").option("--reason <r>").action(async(e,t)=>{try{await b(U,{id:e,reason:t.reason??null}),k$1("Schedule disabled");}catch(n){h$1(n);}}),c.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 b(A,{sourceId:e,newWorkspaceId:t.workspace??null,overrides:t.overrides?JSON.parse(t.overrides):null});k$1(`Cloned: ${n.cloneSchedule.id}`),i(t,n.cloneSchedule);}catch(n){h$1(n);}}),c.command("execute-now").description("Execute a scheduled job immediately").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(v,{id:e});k$1("Execution dispatched"),i(t,n.executeJobNow);}catch(n){h$1(n);}}),c.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 b(H,{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});i(e,t.previewSchedule);}catch(t){h$1(t);}});let g=c.command("tags").description("Scheduled-job tag assignments");g.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 b(M,{input:t}),k$1("Tagged");}catch(t){h$1(t);}}),g.command("remove").description("Remove a tag from a scheduled job").requiredOption("--entity <id>").requiredOption("--tag <tagId>").action(async e=>{try{await b(G,{input:{entityId:e.entity,tagId:e.tag}}),k$1("Tag removed");}catch(t){h$1(t);}}),g.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 b(W,{input:{entityId:e.entity,tagIds:e.tags.split(",")}});k$1("Tags replaced"),i(e,t.replaceScheduledJobTags);}catch(t){h$1(t);}}),g.command("list").description("List tags on a scheduled job").requiredOption("--entity <id>").option("-f, --format <format>").action(async e=>{try{let t=await b(z,{input:{entityId:e.entity}});i(e,t.getScheduledJobTags);}catch(t){h$1(t);}});let p$1=u.command("templates").description("Schedule templates");p$1.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 b(N,{workspaceId:h(),filter:Object.keys(t).length?t:void 0,pagination:{first:100}});i(e,n.scheduleTemplates.templates);}catch(t){h$1(t);}}),p$1.command("get").description("Get a schedule template").argument("<id>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(k,{id:e});if(!n.scheduleTemplate)throw new o(`Template ${e} not found`);i(t,n.scheduleTemplate);}catch(n){h$1(n);}}),p$1.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 b(P,{workspaceId:h(),input:t});k$1("Template created"),i(e,n.createScheduleTemplate);}catch(t){h$1(t);}}),p$1.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 o("Provide at least one field to update");let r=await b(j,{id:e,input:n});k$1("Template updated"),i(t,r.updateScheduleTemplate);}catch(n){h$1(n);}}),p$1.command("delete").description("Delete a schedule template").argument("<id>").action(async e=>{try{await b(B,{id:e}),k$1("Template deleted");}catch(t){h$1(t);}});let y=u.command("versions").description("Schedule version history");y.command("list").description("List version history for a schedule").argument("<scheduleId>").option("-f, --format <format>").action(async(e,t)=>{try{let n=await b(V,{scheduleId:e});i(t,n.scheduleVersionHistory,{headers:["ID","Version","ChangedBy","Reason","CreatedAt"],rows:n.scheduleVersionHistory.map(r$1=>[r(r$1.id,12),String(r$1.version),r$1.changedBy,r$1.changeReason??"-",q$1(r$1.createdAt)])});}catch(n){h$1(n);}}),y.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 b(q,{scheduleId:e.schedule,versionId:e.version});k$1("Version restored"),i(e,t.restoreScheduleVersion);}catch(t){h$1(t);}}),F.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 b(O,{jobId:e,pagination:{first:t.limit}});i(t,n.jobExecutions.executions,{headers:["ID","Status","Started","Duration","Success"],rows:n.jobExecutions.executions.map(r$1=>[r(r$1.id,12),p(r$1.status),q$1(r$1.startedAt),String(r$1.duration??"-"),String(!!r$1.success)])});}catch(n){h$1(n);}});}var Y={id:"scheduler",version:"1.0.0",displayName:"Scheduler",dependsOn:["auth","workspaces"],register(d,u){a(u),X(d);}},ie=Y;export{ie as default};
@@ -1,11 +1,11 @@
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;}},h=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 v(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 h("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}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 d(r,o,s){g().output.formatAndOutput(r,o,s);}function l(r){g().output.printSuccess(r);}function y(r){return g().output.formatStatus(r)}function C(r){return g().output.formatDate(r)}function x(r,o){return g().output.truncate(r,o)}function I(){return g()}var S=`
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;}},h=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 v(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 h("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}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 d(r,o,s){g().output.formatAndOutput(r,o,s);}function l(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 I(){return g()}var b=`
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
- `,b=`
8
+ `,S=`
9
9
  query GetVault($id: ID!) {
10
10
  getVault(id: $id) {
11
11
  id name description scope scopeId status lockAfterMinutes createdAt updatedAt
@@ -72,4 +72,4 @@
72
72
  id key updatedAt
73
73
  }
74
74
  }
75
- `;function w(){let r=I().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:w()};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}});d(e,n.getVaults.items,{headers:["ID","Name","Scope","Status","Created"],rows:n.getVaults.items.map(i=>[x(i.id,12),i.name,i.scope??"-",y(i.status),C(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`);d(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=w(),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});l(`Vault created: ${i.createVault.name}`),d(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(O,{id:e,input:n});l("Vault updated"),d(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($,{id:e}),l("Vault archived")):(await u(R,{id:e}),l("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:w()};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}});d(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??"-",y(i.status),C(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`);d(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:w(),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});l(`Secret created: ${i.createSecret.key}`),d(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});l("Secret rotated"),d(t,F.rotateSecret);return}let n={context:w()};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});l("Secret updated"),d(t,i.updateSecret);}catch(n){p(n);}}),m.command("delete").description("Delete a secret").argument("<id>").action(async e=>{try{await u(_,{id:e}),l("Secret deleted");}catch(t){p(t);}});}var ne={id:"security",version:"1.0.0",displayName:"Security",dependsOn:["auth","workspaces"],register(r,o){v(o),G(r);}},lt=ne;module.exports=lt;
75
+ `;function w(){let r=I().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:w()};e.scope&&(t.scope=e.scope.toUpperCase()),e.status&&(t.status=e.status.toUpperCase()),e.search&&(t.search=e.search);let n=await u(b,{filter:t,pagination:{limit:e.limit,offset:0}});d(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(S,{id:e});if(!n.getVault)throw new c(`Vault ${e} not found`);d(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=w(),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});l(`Vault created: ${i.createVault.name}`),d(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(O,{id:e,input:n});l("Vault updated"),d(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($,{id:e}),l("Vault archived")):(await u(R,{id:e}),l("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:w()};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}});d(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`);d(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:w(),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});l(`Secret created: ${i.createSecret.key}`),d(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 F=await U(),W=await u(N,{id:e,newValue:F});l("Secret rotated"),d(t,W.rotateSecret);return}let n={context:w()};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});l("Secret updated"),d(t,i.updateSecret);}catch(n){p(n);}}),m.command("delete").description("Delete a secret").argument("<id>").action(async e=>{try{await u(_,{id:e}),l("Secret deleted");}catch(t){p(t);}});}var ne={id:"security",version:"1.0.0",displayName:"Security",dependsOn:["auth","workspaces"],register(r,o){v(o),G(r);}},lt=ne;module.exports=lt;
@@ -1,4 +1,4 @@
1
- import {a,b,h,p,n,o,g,i,s}from'../../chunk-W4JZR7RJ.js';import {o as o$1}from'../../chunk-YIY5IDXQ.js';var T=`
1
+ import {a,b,i,r,p,q as q$1,h,k as k$1,u}from'../../chunk-O6UCQ5IT.js';import {o}from'../../chunk-YIY5IDXQ.js';var T=`
2
2
  query GetVaults($filter: VaultFilterInput, $pagination: SecurityPaginationInput) {
3
3
  getVaults(filter: $filter, pagination: $pagination) {
4
4
  items { id name description scope status createdAt }
@@ -72,4 +72,4 @@ import {a,b,h,p,n,o,g,i,s}from'../../chunk-W4JZR7RJ.js';import {o as o$1}from'..
72
72
  id key updatedAt
73
73
  }
74
74
  }
75
- `;function l(){let o=s().auth.read();if(!o?.workspaceId)throw new o$1("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:o.workspaceId}}async function L(){if(process.stdin.isTTY)throw new o$1('Pipe the secret value via stdin (e.g. `echo -n "value" | vibecontrols security secrets set ...`).');let o=[];for await(let p of process.stdin)o.push(Buffer.isBuffer(p)?p:Buffer.from(p));return Buffer.concat(o).toString("utf8")}function O(o$2){let p$1=o$2.command("security").description("Security: vaults & secrets"),m=p$1.command("vaults").description("Vault management");m.command("list").description("List vaults").option("--scope <s>","WORKSPACE|GLOBAL|VIBE").option("--status <s>").option("--search <q>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e={context:l()};t.scope&&(e.scope=t.scope.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.search&&(e.search=t.search);let a=await b(T,{filter:e,pagination:{limit:t.limit,offset:0}});h(t,a.getVaults.items,{headers:["ID","Name","Scope","Status","Created"],rows:a.getVaults.items.map(r=>[p(r.id,12),r.name,r.scope??"-",n(r.status),o(r.createdAt)])});}catch(e){g(e);}}),m.command("get").description("Get a vault").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let a=await b(A,{id:t});if(!a.getVault)throw new o$1(`Vault ${t} not found`);h(e,a.getVault);}catch(a){g(a);}}),m.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",t=>parseInt(t,10)).option("-f, --format <format>").action(async t=>{try{let e=l(),a={context:e,name:t.name,description:t.description,scope:(t.scope??"WORKSPACE").toUpperCase(),scopeId:t.scopeId??e.workspaceId,lockAfterMinutes:t.lockAfter},r=await b(C,{input:a});i(`Vault created: ${r.createVault.name}`),h(t,r.createVault);}catch(e){g(e);}}),m.command("update").description("Update a vault").argument("<id>").option("--name <s>").option("--description <s>").option("--lock-after <minutes>","Auto-lock after N minutes",t=>parseInt(t,10)).option("-f, --format <format>").action(async(t,e)=>{try{let a={};if(e.name&&(a.name=e.name),e.description!==void 0&&(a.description=e.description),e.lockAfter!==void 0&&(a.lockAfterMinutes=e.lockAfter),!Object.keys(a).length)throw new o$1("No updates specified");let r=await b(V,{id:t,input:a});i("Vault updated"),h(e,r.updateVault);}catch(a){g(a);}}),m.command("delete").description("Delete a vault").argument("<id>").option("--archive","Archive instead of hard delete",false).action(async(t,e)=>{try{e.archive?(await b(I,{id:t}),i("Vault archived")):(await b(R,{id:t}),i("Vault deleted"));}catch(a){g(a);}});let u=p$1.command("secrets").description("Secret management");u.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",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e={context:l()};t.type&&(e.type=t.type.toUpperCase()),t.search&&(e.search=t.search);let a=await b(k,{vaultId:t.vault,filter:e,pagination:{limit:t.limit,offset:0}});h(t,a.getSecrets.items,{headers:["ID","Key","Name","Type","Status","Created"],rows:a.getSecrets.items.map(r=>[p(r.id,12),r.key,r.name,r.type??"-",n(r.status),o(r.createdAt)])});}catch(e){g(e);}}),u.command("get").description("Get secret metadata (does NOT decrypt)").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let a=await b(v,{id:t});if(!a.getSecret)throw new o$1(`Secret ${t} not found`);h(e,a.getSecret);}catch(a){g(a);}}),u.command("show").description("Decrypt and print a secret value (audited)").argument("<id>").action(async t=>{try{let e=await b($,{id:t});process.stdout.write(e.decryptSecret.value);}catch(e){g(e);}}),u.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 t=>{try{let e=await L(),a={context:l(),vaultId:t.vault,key:t.key,name:t.name,description:t.description,type:(t.type??"OTHER").toUpperCase(),isEphemeral:!!t.ephemeral,expiresAt:t.expires,value:e},r=await b(x,{input:a});i(`Secret created: ${r.createSecret.key}`),h(t,r.createSecret);}catch(e){g(e);}}),u.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(t,e)=>{try{if(e.rotate){let P=await L(),b$1=await b(_,{id:t,newValue:P});i("Secret rotated"),h(e,b$1.rotateSecret);return}let a={context:l()};if(e.name&&(a.name=e.name),e.description!==void 0&&(a.description=e.description),e.status&&(a.status=e.status.toUpperCase()),Object.keys(a).length===1)throw new o$1("No updates specified (use --rotate to change value)");let r=await b(D,{id:t,input:a});i("Secret updated"),h(e,r.updateSecret);}catch(a){g(a);}}),u.command("delete").description("Delete a secret").argument("<id>").action(async t=>{try{await b(U,{id:t}),i("Secret deleted");}catch(e){g(e);}});}var q={id:"security",version:"1.0.0",displayName:"Security",dependsOn:["auth","workspaces"],register(o,p){a(p),O(o);}},j=q;export{j as default};
75
+ `;function l(){let o$1=u().auth.read();if(!o$1?.workspaceId)throw new o("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:o$1.workspaceId}}async function L(){if(process.stdin.isTTY)throw new o('Pipe the secret value via stdin (e.g. `echo -n "value" | vibecontrols security secrets set ...`).');let o$1=[];for await(let p of process.stdin)o$1.push(Buffer.isBuffer(p)?p:Buffer.from(p));return Buffer.concat(o$1).toString("utf8")}function O(o$1){let p$1=o$1.command("security").description("Security: vaults & secrets"),m=p$1.command("vaults").description("Vault management");m.command("list").description("List vaults").option("--scope <s>","WORKSPACE|GLOBAL|VIBE").option("--status <s>").option("--search <q>").option("--limit <n>","Page size",t=>parseInt(t,10),50).option("-f, --format <format>").action(async t=>{try{let e={context:l()};t.scope&&(e.scope=t.scope.toUpperCase()),t.status&&(e.status=t.status.toUpperCase()),t.search&&(e.search=t.search);let a=await b(T,{filter:e,pagination:{limit:t.limit,offset:0}});i(t,a.getVaults.items,{headers:["ID","Name","Scope","Status","Created"],rows:a.getVaults.items.map(r$1=>[r(r$1.id,12),r$1.name,r$1.scope??"-",p(r$1.status),q$1(r$1.createdAt)])});}catch(e){h(e);}}),m.command("get").description("Get a vault").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let a=await b(A,{id:t});if(!a.getVault)throw new o(`Vault ${t} not found`);i(e,a.getVault);}catch(a){h(a);}}),m.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",t=>parseInt(t,10)).option("-f, --format <format>").action(async t=>{try{let e=l(),a={context:e,name:t.name,description:t.description,scope:(t.scope??"WORKSPACE").toUpperCase(),scopeId:t.scopeId??e.workspaceId,lockAfterMinutes:t.lockAfter},r=await b(C,{input:a});k$1(`Vault created: ${r.createVault.name}`),i(t,r.createVault);}catch(e){h(e);}}),m.command("update").description("Update a vault").argument("<id>").option("--name <s>").option("--description <s>").option("--lock-after <minutes>","Auto-lock after N minutes",t=>parseInt(t,10)).option("-f, --format <format>").action(async(t,e)=>{try{let a={};if(e.name&&(a.name=e.name),e.description!==void 0&&(a.description=e.description),e.lockAfter!==void 0&&(a.lockAfterMinutes=e.lockAfter),!Object.keys(a).length)throw new o("No updates specified");let r=await b(V,{id:t,input:a});k$1("Vault updated"),i(e,r.updateVault);}catch(a){h(a);}}),m.command("delete").description("Delete a vault").argument("<id>").option("--archive","Archive instead of hard delete",false).action(async(t,e)=>{try{e.archive?(await b(I,{id:t}),k$1("Vault archived")):(await b(R,{id:t}),k$1("Vault deleted"));}catch(a){h(a);}});let u=p$1.command("secrets").description("Secret management");u.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",t=>parseInt(t,10),100).option("-f, --format <format>").action(async t=>{try{let e={context:l()};t.type&&(e.type=t.type.toUpperCase()),t.search&&(e.search=t.search);let a=await b(k,{vaultId:t.vault,filter:e,pagination:{limit:t.limit,offset:0}});i(t,a.getSecrets.items,{headers:["ID","Key","Name","Type","Status","Created"],rows:a.getSecrets.items.map(r$1=>[r(r$1.id,12),r$1.key,r$1.name,r$1.type??"-",p(r$1.status),q$1(r$1.createdAt)])});}catch(e){h(e);}}),u.command("get").description("Get secret metadata (does NOT decrypt)").argument("<id>").option("-f, --format <format>").action(async(t,e)=>{try{let a=await b(v,{id:t});if(!a.getSecret)throw new o(`Secret ${t} not found`);i(e,a.getSecret);}catch(a){h(a);}}),u.command("show").description("Decrypt and print a secret value (audited)").argument("<id>").action(async t=>{try{let e=await b($,{id:t});process.stdout.write(e.decryptSecret.value);}catch(e){h(e);}}),u.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 t=>{try{let e=await L(),a={context:l(),vaultId:t.vault,key:t.key,name:t.name,description:t.description,type:(t.type??"OTHER").toUpperCase(),isEphemeral:!!t.ephemeral,expiresAt:t.expires,value:e},r=await b(x,{input:a});k$1(`Secret created: ${r.createSecret.key}`),i(t,r.createSecret);}catch(e){h(e);}}),u.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(t,e)=>{try{if(e.rotate){let P=await L(),b$1=await b(_,{id:t,newValue:P});k$1("Secret rotated"),i(e,b$1.rotateSecret);return}let a={context:l()};if(e.name&&(a.name=e.name),e.description!==void 0&&(a.description=e.description),e.status&&(a.status=e.status.toUpperCase()),Object.keys(a).length===1)throw new o("No updates specified (use --rotate to change value)");let r=await b(D,{id:t,input:a});k$1("Secret updated"),i(e,r.updateSecret);}catch(a){h(a);}}),u.command("delete").description("Delete a secret").argument("<id>").action(async t=>{try{await b(U,{id:t}),k$1("Secret deleted");}catch(e){h(e);}});}var q={id:"security",version:"1.0.0",displayName:"Security",dependsOn:["auth","workspaces"],register(o,p){a(p),O(o);}},j=q;export{j as default};