@burdenoff/cli-sdk 2026.1110.2 → 2026.1123.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/dist/{chunk-WTNQ5PEC.js → chunk-3ZVMC2AF.js} +1 -1
  2. package/dist/{chunk-6HSWVWQW.js → chunk-ASSY2L5R.js} +1 -1
  3. package/dist/chunk-ZT6KOG7N.js +34 -0
  4. package/dist/core/index.cjs +8 -8
  5. package/dist/core/index.d.cts +2 -2
  6. package/dist/core/index.d.ts +2 -2
  7. package/dist/core/index.js +1 -1
  8. package/dist/index.cjs +8 -8
  9. package/dist/index.d.cts +1 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/{module-CLaW1ycq.d.ts → module-BNVKV_pI.d.cts} +11 -1
  13. package/dist/{module-CLaW1ycq.d.cts → module-BNVKV_pI.d.ts} +11 -1
  14. package/dist/modules/adaptercloud/index.cjs +4 -4
  15. package/dist/modules/adaptercloud/index.d.cts +1 -1
  16. package/dist/modules/adaptercloud/index.d.ts +1 -1
  17. package/dist/modules/adaptercloud/index.js +1 -1
  18. package/dist/modules/artistrybase/index.cjs +3 -3
  19. package/dist/modules/artistrybase/index.d.cts +1 -1
  20. package/dist/modules/artistrybase/index.d.ts +1 -1
  21. package/dist/modules/artistrybase/index.js +1 -1
  22. package/dist/modules/assethandler/index.cjs +7 -7
  23. package/dist/modules/assethandler/index.d.cts +1 -1
  24. package/dist/modules/assethandler/index.d.ts +1 -1
  25. package/dist/modules/assethandler/index.js +1 -1
  26. package/dist/modules/atheletebridge/index.cjs +4 -4
  27. package/dist/modules/atheletebridge/index.d.cts +1 -1
  28. package/dist/modules/atheletebridge/index.d.ts +1 -1
  29. package/dist/modules/atheletebridge/index.js +1 -1
  30. package/dist/modules/auth/index.d.cts +1 -1
  31. package/dist/modules/auth/index.d.ts +1 -1
  32. package/dist/modules/auth/index.js +1 -1
  33. package/dist/modules/billing/index.cjs +8 -8
  34. package/dist/modules/billing/index.d.cts +1 -1
  35. package/dist/modules/billing/index.d.ts +1 -1
  36. package/dist/modules/billing/index.js +1 -1
  37. package/dist/modules/brainyrich/index.cjs +8 -8
  38. package/dist/modules/brainyrich/index.d.cts +1 -1
  39. package/dist/modules/brainyrich/index.d.ts +1 -1
  40. package/dist/modules/brainyrich/index.js +1 -1
  41. package/dist/modules/buildmyiq/index.d.cts +1 -1
  42. package/dist/modules/buildmyiq/index.d.ts +1 -1
  43. package/dist/modules/buildmyiq/index.js +1 -1
  44. package/dist/modules/channels/index.cjs +8 -8
  45. package/dist/modules/channels/index.d.cts +1 -1
  46. package/dist/modules/channels/index.d.ts +1 -1
  47. package/dist/modules/channels/index.js +1 -1
  48. package/dist/modules/collabkin/index.cjs +3 -3
  49. package/dist/modules/collabkin/index.d.cts +1 -1
  50. package/dist/modules/collabkin/index.d.ts +1 -1
  51. package/dist/modules/collabkin/index.js +1 -1
  52. package/dist/modules/comradecircle/index.cjs +10 -10
  53. package/dist/modules/comradecircle/index.d.cts +1 -1
  54. package/dist/modules/comradecircle/index.d.ts +1 -1
  55. package/dist/modules/comradecircle/index.js +1 -1
  56. package/dist/modules/conversations/index.cjs +4 -4
  57. package/dist/modules/conversations/index.d.cts +1 -1
  58. package/dist/modules/conversations/index.d.ts +1 -1
  59. package/dist/modules/conversations/index.js +1 -1
  60. package/dist/modules/coolandlovely/index.cjs +3 -3
  61. package/dist/modules/coolandlovely/index.d.cts +1 -1
  62. package/dist/modules/coolandlovely/index.d.ts +1 -1
  63. package/dist/modules/coolandlovely/index.js +1 -1
  64. package/dist/modules/cosmicintersection/index.cjs +4 -4
  65. package/dist/modules/cosmicintersection/index.d.cts +1 -1
  66. package/dist/modules/cosmicintersection/index.d.ts +1 -1
  67. package/dist/modules/cosmicintersection/index.js +1 -1
  68. package/dist/modules/crewfoundry/index.cjs +7 -7
  69. package/dist/modules/crewfoundry/index.d.cts +1 -1
  70. package/dist/modules/crewfoundry/index.d.ts +1 -1
  71. package/dist/modules/crewfoundry/index.js +1 -1
  72. package/dist/modules/devportal/index.cjs +6 -6
  73. package/dist/modules/devportal/index.d.cts +1 -1
  74. package/dist/modules/devportal/index.d.ts +1 -1
  75. package/dist/modules/devportal/index.js +1 -1
  76. package/dist/modules/ecoimpacthub/index.cjs +3 -3
  77. package/dist/modules/ecoimpacthub/index.d.cts +1 -1
  78. package/dist/modules/ecoimpacthub/index.d.ts +1 -1
  79. package/dist/modules/ecoimpacthub/index.js +1 -1
  80. package/dist/modules/eventfullymanaged/index.cjs +13 -13
  81. package/dist/modules/eventfullymanaged/index.d.cts +1 -1
  82. package/dist/modules/eventfullymanaged/index.d.ts +1 -1
  83. package/dist/modules/eventfullymanaged/index.js +1 -1
  84. package/dist/modules/export/index.cjs +5 -5
  85. package/dist/modules/export/index.d.cts +1 -1
  86. package/dist/modules/export/index.d.ts +1 -1
  87. package/dist/modules/export/index.js +1 -1
  88. package/dist/modules/files/index.cjs +7 -7
  89. package/dist/modules/files/index.d.cts +1 -1
  90. package/dist/modules/files/index.d.ts +1 -1
  91. package/dist/modules/files/index.js +1 -1
  92. package/dist/modules/fluidgrids/index.cjs +5 -5
  93. package/dist/modules/fluidgrids/index.d.cts +1 -1
  94. package/dist/modules/fluidgrids/index.d.ts +1 -1
  95. package/dist/modules/fluidgrids/index.js +1 -1
  96. package/dist/modules/ggnomad/index.cjs +6 -6
  97. package/dist/modules/ggnomad/index.d.cts +1 -1
  98. package/dist/modules/ggnomad/index.d.ts +1 -1
  99. package/dist/modules/ggnomad/index.js +1 -1
  100. package/dist/modules/govcitizenhub/index.cjs +6 -6
  101. package/dist/modules/govcitizenhub/index.d.cts +1 -1
  102. package/dist/modules/govcitizenhub/index.d.ts +1 -1
  103. package/dist/modules/govcitizenhub/index.js +1 -1
  104. package/dist/modules/groups/index.cjs +2 -2
  105. package/dist/modules/groups/index.d.cts +1 -1
  106. package/dist/modules/groups/index.d.ts +1 -1
  107. package/dist/modules/groups/index.js +1 -1
  108. package/dist/modules/headshotmarketing/index.d.cts +1 -1
  109. package/dist/modules/headshotmarketing/index.d.ts +1 -1
  110. package/dist/modules/headshotmarketing/index.js +1 -1
  111. package/dist/modules/health/index.d.cts +1 -1
  112. package/dist/modules/health/index.d.ts +1 -1
  113. package/dist/modules/hookmovies/index.cjs +4 -4
  114. package/dist/modules/hookmovies/index.d.cts +1 -1
  115. package/dist/modules/hookmovies/index.d.ts +1 -1
  116. package/dist/modules/hookmovies/index.js +1 -1
  117. package/dist/modules/housingvista/index.cjs +13 -13
  118. package/dist/modules/housingvista/index.d.cts +1 -1
  119. package/dist/modules/housingvista/index.d.ts +1 -1
  120. package/dist/modules/housingvista/index.js +1 -1
  121. package/dist/modules/integrations/index.cjs +7 -7
  122. package/dist/modules/integrations/index.d.cts +1 -1
  123. package/dist/modules/integrations/index.d.ts +1 -1
  124. package/dist/modules/integrations/index.js +1 -1
  125. package/dist/modules/intelwatchtower/index.cjs +6 -6
  126. package/dist/modules/intelwatchtower/index.d.cts +1 -1
  127. package/dist/modules/intelwatchtower/index.d.ts +1 -1
  128. package/dist/modules/intelwatchtower/index.js +1 -1
  129. package/dist/modules/kadaikodi/index.cjs +5 -5
  130. package/dist/modules/kadaikodi/index.d.cts +1 -1
  131. package/dist/modules/kadaikodi/index.d.ts +1 -1
  132. package/dist/modules/kadaikodi/index.js +1 -1
  133. package/dist/modules/labsofscience/index.cjs +6 -6
  134. package/dist/modules/labsofscience/index.d.cts +1 -1
  135. package/dist/modules/labsofscience/index.d.ts +1 -1
  136. package/dist/modules/labsofscience/index.js +1 -1
  137. package/dist/modules/manufacturedops/index.cjs +8 -8
  138. package/dist/modules/manufacturedops/index.d.cts +1 -1
  139. package/dist/modules/manufacturedops/index.d.ts +1 -1
  140. package/dist/modules/manufacturedops/index.js +1 -1
  141. package/dist/modules/movethewheels/index.cjs +18 -18
  142. package/dist/modules/movethewheels/index.d.cts +1 -1
  143. package/dist/modules/movethewheels/index.d.ts +1 -1
  144. package/dist/modules/movethewheels/index.js +1 -1
  145. package/dist/modules/mybodyshield/index.cjs +5 -5
  146. package/dist/modules/mybodyshield/index.d.cts +1 -1
  147. package/dist/modules/mybodyshield/index.d.ts +1 -1
  148. package/dist/modules/mybodyshield/index.js +1 -1
  149. package/dist/modules/notifications/index.cjs +4 -4
  150. package/dist/modules/notifications/index.d.cts +1 -1
  151. package/dist/modules/notifications/index.d.ts +1 -1
  152. package/dist/modules/notifications/index.js +1 -1
  153. package/dist/modules/organizations/index.cjs +2 -2
  154. package/dist/modules/organizations/index.d.cts +1 -1
  155. package/dist/modules/organizations/index.d.ts +1 -1
  156. package/dist/modules/organizations/index.js +1 -1
  157. package/dist/modules/planmagnet/index.cjs +17 -17
  158. package/dist/modules/planmagnet/index.d.cts +1 -1
  159. package/dist/modules/planmagnet/index.d.ts +1 -1
  160. package/dist/modules/planmagnet/index.js +1 -1
  161. package/dist/modules/products/index.cjs +8 -8
  162. package/dist/modules/products/index.d.cts +1 -1
  163. package/dist/modules/products/index.d.ts +1 -1
  164. package/dist/modules/products/index.js +1 -1
  165. package/dist/modules/proserviceworld/index.cjs +4 -4
  166. package/dist/modules/proserviceworld/index.d.cts +1 -1
  167. package/dist/modules/proserviceworld/index.d.ts +1 -1
  168. package/dist/modules/proserviceworld/index.js +1 -1
  169. package/dist/modules/rbac/index.cjs +5 -5
  170. package/dist/modules/rbac/index.d.cts +1 -1
  171. package/dist/modules/rbac/index.d.ts +1 -1
  172. package/dist/modules/rbac/index.js +1 -1
  173. package/dist/modules/sandbox/index.cjs +1 -1
  174. package/dist/modules/sandbox/index.d.cts +1 -1
  175. package/dist/modules/sandbox/index.d.ts +1 -1
  176. package/dist/modules/sandbox/index.js +1 -1
  177. package/dist/modules/scheduler/index.cjs +6 -6
  178. package/dist/modules/scheduler/index.d.cts +1 -1
  179. package/dist/modules/scheduler/index.d.ts +1 -1
  180. package/dist/modules/scheduler/index.js +1 -1
  181. package/dist/modules/security/index.cjs +7 -7
  182. package/dist/modules/security/index.d.cts +1 -1
  183. package/dist/modules/security/index.d.ts +1 -1
  184. package/dist/modules/security/index.js +1 -1
  185. package/dist/modules/semanticfed/index.cjs +7 -7
  186. package/dist/modules/semanticfed/index.d.cts +1 -1
  187. package/dist/modules/semanticfed/index.d.ts +1 -1
  188. package/dist/modules/semanticfed/index.js +1 -1
  189. package/dist/modules/semanticfed-sql/index.cjs +4 -4
  190. package/dist/modules/semanticfed-sql/index.d.cts +1 -1
  191. package/dist/modules/semanticfed-sql/index.d.ts +1 -1
  192. package/dist/modules/semanticfed-sql/index.js +1 -1
  193. package/dist/modules/store/index.cjs +7 -7
  194. package/dist/modules/store/index.d.cts +1 -1
  195. package/dist/modules/store/index.d.ts +1 -1
  196. package/dist/modules/store/index.js +1 -1
  197. package/dist/modules/subscriberbot/index.cjs +4 -4
  198. package/dist/modules/subscriberbot/index.d.cts +1 -1
  199. package/dist/modules/subscriberbot/index.d.ts +1 -1
  200. package/dist/modules/subscriberbot/index.js +1 -1
  201. package/dist/modules/support/index.cjs +2 -2
  202. package/dist/modules/support/index.d.cts +1 -1
  203. package/dist/modules/support/index.d.ts +1 -1
  204. package/dist/modules/support/index.js +1 -1
  205. package/dist/modules/tags/index.cjs +2 -2
  206. package/dist/modules/tags/index.d.cts +1 -1
  207. package/dist/modules/tags/index.d.ts +1 -1
  208. package/dist/modules/tags/index.js +1 -1
  209. package/dist/modules/technospam/index.cjs +10 -10
  210. package/dist/modules/technospam/index.d.cts +1 -1
  211. package/dist/modules/technospam/index.d.ts +1 -1
  212. package/dist/modules/technospam/index.js +1 -1
  213. package/dist/modules/theculturepost/index.cjs +8 -8
  214. package/dist/modules/theculturepost/index.d.cts +1 -1
  215. package/dist/modules/theculturepost/index.d.ts +1 -1
  216. package/dist/modules/theculturepost/index.js +1 -1
  217. package/dist/modules/theglobalfuel/index.cjs +4 -4
  218. package/dist/modules/theglobalfuel/index.d.cts +1 -1
  219. package/dist/modules/theglobalfuel/index.d.ts +1 -1
  220. package/dist/modules/theglobalfuel/index.js +1 -1
  221. package/dist/modules/timecampus/index.cjs +72 -61
  222. package/dist/modules/timecampus/index.d.cts +7 -3
  223. package/dist/modules/timecampus/index.d.ts +7 -3
  224. package/dist/modules/timecampus/index.js +72 -61
  225. package/dist/modules/tours/index.cjs +2 -2
  226. package/dist/modules/tours/index.d.cts +1 -1
  227. package/dist/modules/tours/index.d.ts +1 -1
  228. package/dist/modules/tours/index.js +1 -1
  229. package/dist/modules/vibecontrols/index.cjs +32 -32
  230. package/dist/modules/vibecontrols/index.d.cts +1 -1
  231. package/dist/modules/vibecontrols/index.d.ts +1 -1
  232. package/dist/modules/vibecontrols/index.js +1 -1
  233. package/dist/modules/workspaces/index.cjs +7 -7
  234. package/dist/modules/workspaces/index.d.cts +1 -1
  235. package/dist/modules/workspaces/index.d.ts +1 -1
  236. package/dist/modules/workspaces/index.js +1 -1
  237. package/package.json +1 -1
  238. package/dist/chunk-MT2F54AC.js +0 -34
@@ -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 C=null;function v(r){C=r;}function g(){if(!C)throw new f("vibecontrols module helpers used before setHelpersContext was called");return C}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 w(r,c){return g().output.truncate(r,c)}function A(){return g()}var O=`
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 C=null;function v(r){C=r;}function g(){if(!C)throw new f("vibecontrols module helpers used before setHelpersContext was called");return C}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 A(){return g()}var O=`
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 }
@@ -12,13 +12,13 @@
12
12
  nextExecutionAt lastExecutionAt
13
13
  }
14
14
  }
15
- `,$=`
15
+ `,R=`
16
16
  mutation CreateScheduledJob($workspaceId: ID!, $input: CreateScheduledJobInput!) {
17
17
  createScheduledJob(workspaceId: $workspaceId, input: $input) {
18
18
  id name status scheduleType
19
19
  }
20
20
  }
21
- `,R=`
21
+ `,$=`
22
22
  mutation DeleteScheduledJob($id: ID!) {
23
23
  deleteScheduledJob(id: $id)
24
24
  }
@@ -85,7 +85,7 @@
85
85
  count startDate endDate nextExecutions
86
86
  }
87
87
  }
88
- `,G=`
88
+ `,W=`
89
89
  query ScheduleTemplates(
90
90
  $workspaceId: ID!
91
91
  $filter: ScheduleTemplateFilterInput
@@ -96,7 +96,7 @@
96
96
  total nextCursor
97
97
  }
98
98
  }
99
- `,W=`
99
+ `,G=`
100
100
  query ScheduleTemplate($id: ID!) {
101
101
  scheduleTemplate(id: $id) {
102
102
  id name description category isPublic scheduleType executorType
@@ -139,4 +139,4 @@
139
139
  query GetScheduledJobTags($input: GetScheduledJobTagsInput!) {
140
140
  getScheduledJobTags(input: $input) { id entityId tagId source }
141
141
  }
142
- `;function x(){let r=A().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(O,{workspaceId:x(),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,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(D,{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:x(),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(R,{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(q,{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(P,{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(N,{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(J,{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(U,{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(j,{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(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});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(Q,{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(X,{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(G,{workspaceId:x(),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(W,{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:x(),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=>[w(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(L,{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),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);}},St=fe;module.exports=St;
142
+ `;function x(){let r=A().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(O,{workspaceId:x(),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(D,{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??"{}")},k=await o(R,{workspaceId:x(),input:a});u(`Job created: ${k.createScheduledJob.name}`),d(e,k.createScheduledJob);}catch(t){i(t);}}),s.command("delete").description("Delete a scheduled job").argument("<id>").action(async e=>{try{await o($,{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(q,{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(P,{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(N,{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(J,{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(U,{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(j,{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(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});d(e,t.previewSchedule);}catch(t){i(t);}});let w=s.command("tags").description("Scheduled-job tag assignments");w.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);}}),w.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);}}),w.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(Q,{input:{entityId:e.entity,tagIds:e.tags.split(",")}});u("Tags replaced"),d(e,t.replaceScheduledJobTags);}catch(t){i(t);}}),w.command("list").description("List tags on a scheduled job").requiredOption("--entity <id>").option("-f, --format <format>").action(async e=>{try{let t=await o(X,{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:x(),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:x(),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(L,{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);}},St=fe;module.exports=St;
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.cjs';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.cjs';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.js';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.js';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import {a,b,i,r,p,q as q$1,h as h$1,k as k$1,u}from'../../chunk-WTNQ5PEC.js';import {q as q$2}from'../../chunk-MT2F54AC.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-3ZVMC2AF.js';import {q as q$2}from'../../chunk-ZT6KOG7N.js';var C=`
2
2
  query ListScheduledJobs($workspaceId: ID!, $filter: JobFilterInput, $pagination: SchedulerPaginationInput) {
3
3
  scheduledJobs(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
4
4
  jobs { id name status scheduleType nextExecutionAt createdAt }
@@ -1,4 +1,4 @@
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";}},g=class extends Error{cause;constructor(o,s){super(o),this.name="CliInternalError",this.cause=s;}};var k=null;function b(r){k=r;}function f(){if(!k)throw new g("vibecontrols module helpers used before setHelpersContext was called");return k}function ee(){let r=f();if(!r.auth.isAuthenticated())throw new h("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function u(r,o){return ee(),f().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){f().output.formatAndOutput(r,o,s);}function l(r){f().output.printSuccess(r);}function y(r){return f().output.formatStatus(r)}function C(r){return f().output.formatDate(r)}function x(r,o){return f().output.truncate(r,o)}function v(){return f()}var I=`
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var c=class extends Error{exitCode;hint;constructor(o,s){super(o),this.name="CliUserError",this.exitCode=s?.exitCode??1,this.hint=s?.hint;}},w=class extends c{constructor(o,s){super(o,{exitCode:2,hint:s?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},g=class extends Error{cause;constructor(o,s){super(o),this.name="CliInternalError",this.cause=s;}};var k=null;function b(r){k=r;}function f(){if(!k)throw new g("vibecontrols module helpers used before setHelpersContext was called");return k}function ee(){let r=f();if(!r.auth.isAuthenticated())throw new w("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function u(r,o){return ee(),f().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){f().output.formatAndOutput(r,o,s);}function l(r){f().output.printSuccess(r);}function y(r){return f().output.formatStatus(r)}function C(r){return f().output.formatDate(r)}function x(r,o){return f().output.truncate(r,o)}function v(){return f()}var I=`
2
2
  query GetVaults($filter: VaultFilterInput, $pagination: SecurityPaginationInput) {
3
3
  getVaults(filter: $filter, pagination: $pagination) {
4
4
  items { id name description scope status createdAt }
@@ -31,26 +31,26 @@
31
31
  mutation ArchiveVault($id: ID!) {
32
32
  archiveVault(id: $id) { id status }
33
33
  }
34
- `,D=`
34
+ `,q=`
35
35
  query GetSecrets($vaultId: ID!, $filter: SecretFilterInput, $pagination: SecurityPaginationInput) {
36
36
  getSecrets(vaultId: $vaultId, filter: $filter, pagination: $pagination) {
37
37
  items { id key name description type status isEphemeral createdAt }
38
38
  total hasMore
39
39
  }
40
40
  }
41
- `,q=`
41
+ `,D=`
42
42
  query GetSecret($id: ID!) {
43
43
  getSecret(id: $id) {
44
44
  id key name description type status isEphemeral expiresAt createdAt updatedAt
45
45
  }
46
46
  }
47
- `,L=`
47
+ `,P=`
48
48
  query DecryptSecret($id: ID!) {
49
49
  decryptSecret(id: $id) {
50
50
  id key value
51
51
  }
52
52
  }
53
- `,P=`
53
+ `,L=`
54
54
  mutation CreateSecret($input: CreateSecretInput!) {
55
55
  createSecret(input: $input) {
56
56
  id key name type status
@@ -66,10 +66,10 @@
66
66
  mutation DeleteSecret($id: ID!) {
67
67
  deleteSecret(id: $id)
68
68
  }
69
- `,N=`
69
+ `,G=`
70
70
  mutation RotateSecret($id: ID!, $newValue: String!) {
71
71
  rotateSecret(id: $id, newValue: $newValue) {
72
72
  id key updatedAt
73
73
  }
74
74
  }
75
- `;function w(){let r=v().auth.read();if(!r?.workspaceId)throw new c("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:r.workspaceId}}async function G(){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 U(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(I,{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(A,{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(S,{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(R,{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(O,{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(q,{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(L,{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 G(),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(P,{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 G(),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){b(o),U(r);}},gt=ne;module.exports=gt;
75
+ `;function h(){let r=v().auth.read();if(!r?.workspaceId)throw new c("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:r.workspaceId}}async function N(){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 W(r){let o=r.command("security").description("Security: vaults & secrets"),s=o.command("vaults").description("Vault management");s.command("list").description("List vaults").option("--scope <s>","WORKSPACE|GLOBAL|VIBE").option("--status <s>").option("--search <q>").option("--limit <n>","Page size",e=>parseInt(e,10),50).option("-f, --format <format>").action(async e=>{try{let t={context:h()};e.scope&&(t.scope=e.scope.toUpperCase()),e.status&&(t.status=e.status.toUpperCase()),e.search&&(t.search=e.search);let n=await u(I,{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(A,{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=h(),n={context:t,name:e.name,description:e.description,scope:(e.scope??"WORKSPACE").toUpperCase(),scopeId:e.scopeId??t.workspaceId,lockAfterMinutes:e.lockAfter},i=await u(S,{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(R,{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(O,{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:h()};e.type&&(t.type=e.type.toUpperCase()),e.search&&(t.search=e.search);let n=await u(q,{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(D,{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 N(),n={context:h(),vaultId:e.vault,key:e.key,name:e.name,description:e.description,type:(e.type??"OTHER").toUpperCase(),isEphemeral:!!e.ephemeral,expiresAt:e.expires,value:t},i=await u(L,{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 U=await N(),F=await u(G,{id:e,newValue:U});l("Secret rotated"),d(t,F.rotateSecret);return}let n={context:h()};if(t.name&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.status&&(n.status=t.status.toUpperCase()),Object.keys(n).length===1)throw new c("No updates specified (use --rotate to change value)");let i=await u(V,{id:e,input:n});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){b(o),W(r);}},gt=ne;module.exports=gt;
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.cjs';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.cjs';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.js';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.js';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import {a,b,i,r,p,q as q$1,h,k as k$1,u}from'../../chunk-WTNQ5PEC.js';import {q as q$2}from'../../chunk-MT2F54AC.js';var T=`
1
+ import {a,b,i,r,p,q as q$1,h,k as k$1,u}from'../../chunk-3ZVMC2AF.js';import {q as q$2}from'../../chunk-ZT6KOG7N.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 }
@@ -1,4 +1,4 @@
1
- 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var d=class extends Error{exitCode;hint;constructor(o,e){super(o),this.name="CliUserError",this.exitCode=e?.exitCode??1,this.hint=e?.hint;}},w=class extends d{constructor(o,e){super(o,{exitCode:2,hint:e?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},E=class extends Error{cause;constructor(o,e){super(o),this.name="CliInternalError",this.cause=e;}};var b=null;function O(r){b=r;}function S(){if(!b)throw new E("vibecontrols module helpers used before setHelpersContext was called");return b}function We(){let r=S();if(!r.auth.isAuthenticated())throw new w("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function a(r,o){return We(),S().gql.workspace.request(r,o)}async function T(r,o){return S().gql.workspaceAuthOnly.request(r,o)}function s(r){let o=r instanceof Error?r.message:String(r);throw new d(o)}function c(r,o,e){S().output.formatAndOutput(r,o,e);}function A(){return S().output}function u(r){S().output.printSuccess(r);}function m(r,o){return S().output.truncate(r,o)}var v=`
1
+ 'use strict';require('graphql-request'),require('cross-fetch'),require('commander');var d=class extends Error{exitCode;hint;constructor(o,e){super(o),this.name="CliUserError",this.exitCode=e?.exitCode??1,this.hint=e?.hint;}},S=class extends d{constructor(o,e){super(o,{exitCode:2,hint:e?.hint??"Run `<product> auth login` to authenticate."}),this.name="CliAuthError";}},E=class extends Error{cause;constructor(o,e){super(o),this.name="CliInternalError",this.cause=e;}};var b=null;function O(r){b=r;}function w(){if(!b)throw new E("vibecontrols module helpers used before setHelpersContext was called");return b}function je(){let r=w();if(!r.auth.isAuthenticated())throw new S("Authentication required.",{hint:`Run \`${r.productName} auth login\` to authenticate.`})}async function a(r,o){return je(),w().gql.workspace.request(r,o)}async function T(r,o){return w().gql.workspaceAuthOnly.request(r,o)}function s(r){let o=r instanceof Error?r.message:String(r);throw new d(o)}function c(r,o,e){w().output.formatAndOutput(r,o,e);}function A(){return w().output}function u(r){w().output.printSuccess(r);}function m(r,o){return w().output.truncate(r,o)}var v=`
2
2
  query SemConnector($id: ID!) {
3
3
  semConnector(id: $id) {
4
4
  id name kind description isActive capabilities
@@ -21,13 +21,13 @@
21
21
  id name kind description isActive capabilities createdAt updatedAt workspaceId
22
22
  }
23
23
  }
24
- `,$=`
24
+ `,q=`
25
25
  mutation SemUpdateConnector($id: ID!, $input: SemUpdateConnectorInput!) {
26
26
  semUpdateConnector(id: $id, input: $input) {
27
27
  id name kind description isActive capabilities updatedAt workspaceId
28
28
  }
29
29
  }
30
- `,q=`
30
+ `,$=`
31
31
  mutation SemArchiveConnector($id: ID!) {
32
32
  semArchiveConnector(id: $id)
33
33
  }
@@ -78,7 +78,7 @@
78
78
  id name status updatedAt workspaceId
79
79
  }
80
80
  }
81
- `,j=`
81
+ `,W=`
82
82
  query SemListConnections($dataSourceId: ID!) {
83
83
  semListConnections(dataSourceId: $dataSourceId) {
84
84
  id dataSourceId health latencyMs message probedAt createdAt updatedAt workspaceId
@@ -90,7 +90,7 @@
90
90
  id dataSourceId health latencyMs message probedAt createdAt updatedAt workspaceId
91
91
  }
92
92
  }
93
- `,W=`
93
+ `,j=`
94
94
  query SemModel($id: ID!) {
95
95
  semModel(id: $id) {
96
96
  id name description status version tags publishedAt
@@ -302,6 +302,6 @@
302
302
  }
303
303
  }
304
304
  }
305
- `;function g(r,o){try{return JSON.parse(o)}catch{throw new d(`--${r} must be valid JSON`)}}function l(r){let o=Number.parseInt(r,10);if(Number.isNaN(o))throw new d(`Expected an integer but got "${r}"`);return o}function C(r){return r.split(",").map(o=>o.trim()).filter(o=>o.length>0)}function h(r){let o={};return r.limit!==void 0&&(o.limit=r.limit),r.offset!==void 0&&(o.offset=r.offset),r.cursor&&(o.cursor=r.cursor),Object.keys(o).length?o:void 0}function Ee(r){let o=r.command("connectors").description("SemanticFed connectors (database/warehouse/API drivers)");o.command("list").description("List connectors").option("--kind <k>","Filter by connector kind (e.g. POSTGRES, BIGQUERY)").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(M,{kind:e.kind?e.kind.toUpperCase():void 0,pagination:h(e)})).semListConnectors.items;c(e,n,{headers:["ID","Name","Kind","Active","Description"],rows:n.map(i=>[m(i.id,12),i.name,i.kind,i.isActive?"yes":"no",m(i.description??"",32)])});}catch(t){s(t);}}),o.command("get").description("Get a connector by id").argument("<id>","Connector ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(v,{id:e});if(!n.semConnector)throw new d(`Connector ${e} not found`);c(t,n.semConnector);}catch(n){s(n);}}),o.command("create").description("Create a connector").requiredOption("--name <name>","Connector name").option("--kind <k>","Connector kind (e.g. POSTGRES, BIGQUERY)","POSTGRES").option("--description <s>","Description").option("--capabilities <json>","Capabilities JSON").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name,kind:(e.kind??"POSTGRES").toUpperCase()};e.description&&(t.description=e.description),e.capabilities&&(t.capabilities=g("capabilities",e.capabilities));let n=await a(_,{input:t});u(`Connector created: ${n.semCreateConnector.name}`),c(e,n.semCreateConnector);}catch(t){s(t);}}),o.command("update").description("Update a connector").argument("<id>","Connector ID").option("--name <name>","Connector name").option("--kind <k>","Connector kind").option("--description <s>","Description").option("--capabilities <json>","Capabilities JSON").option("--active <bool>","true|false",e=>e==="true").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.kind&&(n.kind=t.kind.toUpperCase()),t.description!==void 0&&(n.description=t.description),t.capabilities&&(n.capabilities=g("capabilities",t.capabilities)),t.active!==void 0&&(n.isActive=t.active),!Object.keys(n).length)throw new d("No updates specified");let i=await a($,{id:e,input:n});u("Connector updated"),c(t,i.semUpdateConnector);}catch(n){s(n);}}),o.command("archive").description("Archive a connector").argument("<id>","Connector ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(q,{id:e});if(!n.semArchiveConnector)throw new d(`Connector ${e} could not be archived`);u(`Connector ${e} archived`),c(t,{archived:n.semArchiveConnector});}catch(n){s(n);}});}function Se(r){let o=r.command("data-sources").description("SemanticFed data sources (federated query targets)");o.command("list").description("List data sources").option("--connector <id>","Filter by connector ID").option("--status <s>","Filter by data source status").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(N,{connectorId:e.connector,status:e.status?e.status.toUpperCase():void 0,pagination:h(e)})).semListDataSources.items;c(e,n,{headers:["ID","Name","Connector","Status","Pushdown"],rows:n.map(i=>[m(i.id,12),i.name,m(i.connectorId,12),i.status,i.pushdownEnabled?"yes":"no"])});}catch(t){s(t);}}),o.command("get").description("Get a data source by id").argument("<id>","Data source ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(L,{id:e});if(!n.semDataSource)throw new d(`Data source ${e} not found`);c(t,n.semDataSource);}catch(n){s(n);}}),o.command("create").description("Create a data source").requiredOption("--connector <id>","Connector ID").requiredOption("--name <name>","Data source name").option("--description <s>","Description").option("--endpoint <json>","Endpoint JSON (host/db/url/\u2026)").option("--secret-ref <ref>","Secret reference (Key Vault key)").option("--pushdown <bool>","Enable predicate pushdown true|false",e=>e==="true").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={connectorId:e.connector,name:e.name};e.description&&(t.description=e.description),e.endpoint&&(t.endpoint=g("endpoint",e.endpoint)),e.secretRef&&(t.secretRef=e.secretRef),e.pushdown!==void 0&&(t.pushdownEnabled=e.pushdown),e.tags&&(t.tags=C(e.tags));let n=await a(P,{input:t});u(`Data source created: ${n.semCreateDataSource.name}`),c(e,n.semCreateDataSource);}catch(t){s(t);}}),o.command("update").description("Update a data source").argument("<id>","Data source ID").option("--name <name>","Data source name").option("--description <s>","Description").option("--endpoint <json>","Endpoint JSON").option("--secret-ref <ref>","Secret reference").option("--pushdown <bool>","Enable predicate pushdown true|false",e=>e==="true").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.endpoint&&(n.endpoint=g("endpoint",t.endpoint)),t.secretRef&&(n.secretRef=t.secretRef),t.pushdown!==void 0&&(n.pushdownEnabled=t.pushdown),t.tags&&(n.tags=C(t.tags)),!Object.keys(n).length)throw new d("No updates specified");let i=await a(U,{id:e,input:n});u("Data source updated"),c(t,i.semUpdateDataSource);}catch(n){s(n);}}),o.command("archive").description("Archive a data source").argument("<id>","Data source ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(Q,{id:e});if(!n.semArchiveDataSource)throw new d(`Data source ${e} could not be archived`);u(`Data source ${e} archived`),c(t,{archived:n.semArchiveDataSource});}catch(n){s(n);}}),o.command("transition").description("Move a data source through its connectivity lifecycle").argument("<id>","Data source ID").requiredOption("--status <s>","DRAFT|CONNECTED|DEGRADED|DISCONNECTED|DISABLED").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(F,{id:e,status:t.status.toUpperCase()});u(`Data source status set to ${n.semTransitionDataSource.status}`),c(t,n.semTransitionDataSource);}catch(n){s(n);}}),o.command("connections").description("List connection health probes for a data source").argument("<dataSourceId>","Data source ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(j,{dataSourceId:e});c(t,n.semListConnections,{headers:["ID","Health","Latency (ms)","Probed At","Message"],rows:n.semListConnections.map(i=>[m(i.id,12),i.health,i.latencyMs!=null?String(i.latencyMs):"-",i.probedAt,m(i.message??"",32)])});}catch(n){s(n);}}),o.command("record-connection").description("Record a connection health probe for a data source").requiredOption("--data-source <id>","Data source ID").requiredOption("--health <h>","HEALTHY|DEGRADED|UNREACHABLE|UNKNOWN").option("--latency-ms <n>","Latency in milliseconds",l).option("--message <s>","Probe message").option("-f, --format <format>","Output format").action(async e=>{try{let t={dataSourceId:e.dataSource,health:e.health.toUpperCase()};e.latencyMs!==void 0&&(t.latencyMs=e.latencyMs),e.message&&(t.message=e.message);let n=await a(G,{input:t});u(`Connection recorded: ${n.semRecordConnection.health}`),c(e,n.semRecordConnection);}catch(t){s(t);}});}function we(r){let o=r.command("models").description("SemanticFed semantic models (versioned entity/metric graphs)");o.command("list").description("List semantic models").option("--status <s>","Filter by model status (DRAFT|PUBLISHED|DEPRECATED|ARCHIVED)").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(H,{status:e.status?e.status.toUpperCase():void 0,pagination:h(e)})).semListModels.items;c(e,n,{headers:["ID","Name","Status","Version","Description"],rows:n.map(i=>[m(i.id,12),i.name,i.status,String(i.version),m(i.description??"",32)])});}catch(t){s(t);}}),o.command("get").description("Get a semantic model by id").argument("<id>","Model ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(W,{id:e});if(!n.semModel)throw new d(`Model ${e} not found`);c(t,n.semModel);}catch(n){s(n);}}),o.command("create").description("Create a semantic model").requiredOption("--name <name>","Model name").option("--description <s>","Description").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name};e.description&&(t.description=e.description),e.tags&&(t.tags=C(e.tags));let n=await a(Y,{input:t});u(`Model created: ${n.semCreateModel.name}`),c(e,n.semCreateModel);}catch(t){s(t);}}),o.command("update").description("Update a semantic model").argument("<id>","Model ID").option("--name <name>","Model name").option("--description <s>","Description").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.tags&&(n.tags=C(t.tags)),!Object.keys(n).length)throw new d("No updates specified");let i=await a(V,{id:e,input:n});u("Model updated"),c(t,i.semUpdateModel);}catch(n){s(n);}}),o.command("archive").description("Archive a semantic model").argument("<id>","Model ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(B,{id:e});if(!n.semArchiveModel)throw new d(`Model ${e} could not be archived`);u(`Model ${e} archived`),c(t,{archived:n.semArchiveModel});}catch(n){s(n);}}),o.command("publish").description("Publish a draft model (bumps version, flips status to PUBLISHED)").argument("<id>","Model ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(K,{id:e});u(`Model published (v${n.semPublishModel.version})`),c(t,n.semPublishModel);}catch(n){s(n);}});}function Ie(r){let o=r.command("entities").description("SemanticFed entities (tables/views/derived datasets in a model)");o.command("list").description("List entities in a model").requiredOption("--model <id>","Model ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(z,{modelId:e.model});c(e,t.semListEntities,{headers:["ID","Name","Kind","Physical Name","Primary Key"],rows:t.semListEntities.map(n=>[m(n.id,12),n.name,n.kind,n.physicalName??"-",n.primaryKey??"-"])});}catch(t){s(t);}}),o.command("get").description("Get an entity by id").argument("<id>","Entity ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(J,{id:e});if(!n.semEntity)throw new d(`Entity ${e} not found`);c(t,n.semEntity);}catch(n){s(n);}}),o.command("create").description("Create an entity").requiredOption("--model <id>","Model ID").requiredOption("--name <name>","Entity name").option("--kind <k>","TABLE|VIEW|DERIVED|EXTERNAL","TABLE").option("--data-source <id>","Backing data source ID").option("--physical-name <n>","Physical (DB) name").option("--primary-key <k>","Primary key column").option("--sql-definition <sql>","SQL definition (for derived entities)").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t={modelId:e.model,name:e.name,kind:(e.kind??"TABLE").toUpperCase()};e.dataSource&&(t.dataSourceId=e.dataSource),e.physicalName&&(t.physicalName=e.physicalName),e.primaryKey&&(t.primaryKey=e.primaryKey),e.sqlDefinition&&(t.sqlDefinition=e.sqlDefinition),e.description&&(t.description=e.description);let n=await a(X,{input:t});u(`Entity created: ${n.semCreateEntity.name}`),c(e,n.semCreateEntity);}catch(t){s(t);}}),o.command("update").description("Update an entity").argument("<id>","Entity ID").option("--name <name>","Entity name").option("--kind <k>","TABLE|VIEW|DERIVED|EXTERNAL").option("--data-source <id>","Backing data source ID").option("--physical-name <n>","Physical (DB) name").option("--primary-key <k>","Primary key column").option("--sql-definition <sql>","SQL definition").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.kind&&(n.kind=t.kind.toUpperCase()),t.dataSource&&(n.dataSourceId=t.dataSource),t.physicalName&&(n.physicalName=t.physicalName),t.primaryKey&&(n.primaryKey=t.primaryKey),t.sqlDefinition&&(n.sqlDefinition=t.sqlDefinition),t.description!==void 0&&(n.description=t.description),!Object.keys(n).length)throw new d("No updates specified");let i=await a(Z,{id:e,input:n});u("Entity updated"),c(t,i.semUpdateEntity);}catch(n){s(n);}}),o.command("delete").description("Delete an entity").argument("<id>","Entity ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(ee,{id:e});if(!n.semDeleteEntity)throw new d(`Entity ${e} could not be deleted`);u(`Entity ${e} deleted`),c(t,{deleted:n.semDeleteEntity});}catch(n){s(n);}});}function ke(r){r.command("dimensions").description("SemanticFed dimensions (queryable attributes on an entity)").command("create").description("Create a dimension").requiredOption("--entity <id>","Entity ID").requiredOption("--name <name>","Dimension name").option("--data-type <t>","STRING|INTEGER|DECIMAL|BOOLEAN|DATE|TIMESTAMP|JSON|GEO","STRING").option("--expression <e>","SQL expression").option("--primary","Mark as primary dimension").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t={entityId:e.entity,name:e.name,dataType:(e.dataType??"STRING").toUpperCase()};e.expression&&(t.expression=e.expression),e.primary&&(t.isPrimary=!0),e.description&&(t.description=e.description);let n=await a(te,{input:t});u(`Dimension created: ${n.semCreateDimension.name}`),c(e,n.semCreateDimension);}catch(t){s(t);}});}function Ae(r){r.command("metrics").description("SemanticFed metrics (aggregated measures on an entity)").command("create").description("Create a metric").requiredOption("--entity <id>","Entity ID").requiredOption("--name <name>","Metric name").option("--aggregation <a>","SUM|AVG|MIN|MAX|COUNT|COUNT_DISTINCT|MEDIAN|CUSTOM","SUM").option("--expression <e>","SQL expression").option("--format-spec <f>","Display format (e.g. currency, percent)").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t={entityId:e.entity,name:e.name,aggregation:(e.aggregation??"SUM").toUpperCase()};e.expression&&(t.expression=e.expression),e.formatSpec&&(t.format=e.formatSpec),e.description&&(t.description=e.description);let n=await a(ne,{input:t});u(`Metric created: ${n.semCreateMetric.name}`),c(e,n.semCreateMetric);}catch(t){s(t);}});}function be(r){let o=r.command("relationships").description("SemanticFed relationships (joins between entities in a model)");o.command("list").description("List relationships in a model").requiredOption("--model <id>","Model ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(oe,{modelId:e.model});c(e,t.semListRelationships,{headers:["ID","Name","Kind","From","To"],rows:t.semListRelationships.map(n=>[m(n.id,12),n.name,n.kind,`${m(n.fromEntityId,8)}.${n.fromField}`,`${m(n.toEntityId,8)}.${n.toField}`])});}catch(t){s(t);}}),o.command("create").description("Create a relationship").requiredOption("--model <id>","Model ID").requiredOption("--name <name>","Relationship name").requiredOption("--from-entity <id>","From entity ID").requiredOption("--from-field <f>","From field").requiredOption("--to-entity <id>","To entity ID").requiredOption("--to-field <f>","To field").option("--kind <k>","ONE_TO_ONE|ONE_TO_MANY|MANY_TO_ONE|MANY_TO_MANY","MANY_TO_ONE").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t={modelId:e.model,name:e.name,fromEntityId:e.fromEntity,fromField:e.fromField,toEntityId:e.toEntity,toField:e.toField,kind:(e.kind??"MANY_TO_ONE").toUpperCase()};e.description&&(t.description=e.description);let n=await a(re,{input:t});u(`Relationship created: ${n.semCreateRelationship.name}`),c(e,n.semCreateRelationship);}catch(t){s(t);}});}function Te(r){let o=r.command("queries").description("SemanticFed saved federated queries & run history");o.command("list").description("List saved queries").option("--model <id>","Filter by model ID").option("--status <s>","Filter by query status (DRAFT|PUBLISHED|ARCHIVED)").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(se,{modelId:e.model,status:e.status?e.status.toUpperCase():void 0,pagination:h(e)})).semListQueries.items;c(e,n,{headers:["ID","Name","Status","Model","Cacheable"],rows:n.map(i=>[m(i.id,12),i.name,i.status,i.modelId?m(i.modelId,12):"-",i.cacheable?"yes":"no"])});}catch(t){s(t);}}),o.command("get").description("Get a saved query by id").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(ie,{id:e});if(!n.semQuery)throw new d(`Query ${e} not found`);c(t,n.semQuery);}catch(n){s(n);}}),o.command("create").description("Create a saved query").requiredOption("--name <name>","Query name").requiredOption("--query-text <sql>","Federated query text").option("--model <id>","Associated model ID").option("--description <s>","Description").option("--cacheable <bool>","true|false",e=>e==="true").option("--cache-ttl <n>","Cache TTL seconds",l).option("--parameters <json>","Parameters JSON").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name,queryText:e.queryText};e.model&&(t.modelId=e.model),e.description&&(t.description=e.description),e.cacheable!==void 0&&(t.cacheable=e.cacheable),e.cacheTtl!==void 0&&(t.cacheTtlSeconds=e.cacheTtl),e.parameters&&(t.parameters=g("parameters",e.parameters)),e.tags&&(t.tags=C(e.tags));let n=await a(ae,{input:t});u(`Query created: ${n.semCreateQuery.name}`),c(e,n.semCreateQuery);}catch(t){s(t);}}),o.command("update").description("Update a saved query").argument("<id>","Query ID").option("--name <name>","Query name").option("--query-text <sql>","Federated query text").option("--model <id>","Associated model ID").option("--description <s>","Description").option("--cacheable <bool>","true|false",e=>e==="true").option("--cache-ttl <n>","Cache TTL seconds",l).option("--parameters <json>","Parameters JSON").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.queryText&&(n.queryText=t.queryText),t.model&&(n.modelId=t.model),t.description!==void 0&&(n.description=t.description),t.cacheable!==void 0&&(n.cacheable=t.cacheable),t.cacheTtl!==void 0&&(n.cacheTtlSeconds=t.cacheTtl),t.parameters&&(n.parameters=g("parameters",t.parameters)),t.tags&&(n.tags=C(t.tags)),!Object.keys(n).length)throw new d("No updates specified");let i=await a(ce,{id:e,input:n});u("Query updated"),c(t,i.semUpdateQuery);}catch(n){s(n);}}),o.command("archive").description("Archive a saved query").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(de,{id:e});if(!n.semArchiveQuery)throw new d(`Query ${e} could not be archived`);u(`Query ${e} archived`),c(t,{archived:n.semArchiveQuery});}catch(n){s(n);}}),o.command("publish").description("Publish a draft query").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(ue,{id:e});u(`Query published: ${n.semPublishQuery.name}`),c(t,n.semPublishQuery);}catch(n){s(n);}}),o.command("run").description("Enqueue a federated execution of a saved query").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(pe,{id:e});u(`Query run enqueued: ${n.semRunQuery.id} (${n.semRunQuery.status})`),c(t,n.semRunQuery);}catch(n){s(n);}}),o.command("runs").description("List run history for a saved query").requiredOption("--query <id>","Query ID").option("--status <s>","Filter by run status").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(me,{queryId:e.query,status:e.status?e.status.toUpperCase():void 0,pagination:h(e)})).semListQueryRuns.items;c(e,n,{headers:["ID","Status","Rows","Duration (ms)","Cached"],rows:n.map(i=>[m(i.id,12),i.status,i.rowCount!=null?String(i.rowCount):"-",i.durationMs!=null?String(i.durationMs):"-",i.fromCache?"yes":"no"])});}catch(t){s(t);}});}function xe(r){let o=r.command("access-policies").description("SemanticFed access policies (row/column/entity governance)");o.command("list").description("List access policies").option("--entity <id>","Filter by entity ID").option("--model <id>","Filter by model ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(le,{entityId:e.entity,modelId:e.model});c(e,t.semListAccessPolicies,{headers:["ID","Name","Principal","Effect","Scope","Active"],rows:t.semListAccessPolicies.map(n=>[m(n.id,12),n.name,n.principal,n.effect,n.scope,n.isActive?"yes":"no"])});}catch(t){s(t);}}),o.command("create").description("Create an access policy").requiredOption("--name <name>","Policy name").requiredOption("--principal <p>","Principal (user/role/group expression)").option("--effect <e>","ALLOW|DENY","ALLOW").option("--scope <s>","ROW|COLUMN|ENTITY","ROW").option("--entity <id>","Scoped entity ID").option("--model <id>","Scoped model ID").option("--rule <json>","Rule JSON (predicate / column list)").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name,principal:e.principal,effect:(e.effect??"ALLOW").toUpperCase(),scope:(e.scope??"ROW").toUpperCase()};e.entity&&(t.entityId=e.entity),e.model&&(t.modelId=e.model),e.rule&&(t.rule=g("rule",e.rule)),e.description&&(t.description=e.description);let n=await a(fe,{input:t});u(`Access policy created: ${n.semCreateAccessPolicy.name}`),c(e,n.semCreateAccessPolicy);}catch(t){s(t);}}),o.command("set-active").description("Activate or deactivate an access policy").argument("<id>","Policy ID").requiredOption("--active <bool>","true|false",e=>e==="true").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(ge,{id:e,isActive:t.active});u(`Access policy ${e} ${n.semSetAccessPolicyActive.isActive?"activated":"deactivated"}`),c(t,n.semSetAccessPolicyActive);}catch(n){s(n);}});}function De(r){r.command("health").description("SemanticFed subgraph liveness/identity probe (public)").option("-f, --format <format>","Output format").action(async o=>{try{let e=await T(ye);u(e.semHealth),c(o,{health:e.semHealth});}catch(e){s(e);}});}var Re=["table","json","csv","yaml"];function Oe(r){if(r===void 0)return;let o=r.toLowerCase();if(Re.includes(o))return o;throw new d(`--format must be one of ${Re.join(", ")} (got "${r}")`)}function He(r){return r==null?"NULL":typeof r=="object"?JSON.stringify(r):String(r)}function ve(r){if(r==null)return "";let o=typeof r=="object"?JSON.stringify(r):String(r);return /[",\r\n]/.test(o)?`"${o.replace(/"/g,'""')}"`:o}function Ye(r){let o=r.columns.map(t=>t.name),e=[o.map(ve).join(",")];for(let t of r.rows)e.push(o.map(n=>ve(t[n])).join(","));return `${e.join(`\r
305
+ `;function g(r,o){try{return JSON.parse(o)}catch{throw new d(`--${r} must be valid JSON`)}}function l(r){let o=Number.parseInt(r,10);if(Number.isNaN(o))throw new d(`Expected an integer but got "${r}"`);return o}function C(r){return r.split(",").map(o=>o.trim()).filter(o=>o.length>0)}function h(r){let o={};return r.limit!==void 0&&(o.limit=r.limit),r.offset!==void 0&&(o.offset=r.offset),r.cursor&&(o.cursor=r.cursor),Object.keys(o).length?o:void 0}function Ee(r){let o=r.command("connectors").description("SemanticFed connectors (database/warehouse/API drivers)");o.command("list").description("List connectors").option("--kind <k>","Filter by connector kind (e.g. POSTGRES, BIGQUERY)").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(M,{kind:e.kind?e.kind.toUpperCase():void 0,pagination:h(e)})).semListConnectors.items;c(e,n,{headers:["ID","Name","Kind","Active","Description"],rows:n.map(i=>[m(i.id,12),i.name,i.kind,i.isActive?"yes":"no",m(i.description??"",32)])});}catch(t){s(t);}}),o.command("get").description("Get a connector by id").argument("<id>","Connector ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(v,{id:e});if(!n.semConnector)throw new d(`Connector ${e} not found`);c(t,n.semConnector);}catch(n){s(n);}}),o.command("create").description("Create a connector").requiredOption("--name <name>","Connector name").option("--kind <k>","Connector kind (e.g. POSTGRES, BIGQUERY)","POSTGRES").option("--description <s>","Description").option("--capabilities <json>","Capabilities JSON").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name,kind:(e.kind??"POSTGRES").toUpperCase()};e.description&&(t.description=e.description),e.capabilities&&(t.capabilities=g("capabilities",e.capabilities));let n=await a(_,{input:t});u(`Connector created: ${n.semCreateConnector.name}`),c(e,n.semCreateConnector);}catch(t){s(t);}}),o.command("update").description("Update a connector").argument("<id>","Connector ID").option("--name <name>","Connector name").option("--kind <k>","Connector kind").option("--description <s>","Description").option("--capabilities <json>","Capabilities JSON").option("--active <bool>","true|false",e=>e==="true").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.kind&&(n.kind=t.kind.toUpperCase()),t.description!==void 0&&(n.description=t.description),t.capabilities&&(n.capabilities=g("capabilities",t.capabilities)),t.active!==void 0&&(n.isActive=t.active),!Object.keys(n).length)throw new d("No updates specified");let i=await a(q,{id:e,input:n});u("Connector updated"),c(t,i.semUpdateConnector);}catch(n){s(n);}}),o.command("archive").description("Archive a connector").argument("<id>","Connector ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a($,{id:e});if(!n.semArchiveConnector)throw new d(`Connector ${e} could not be archived`);u(`Connector ${e} archived`),c(t,{archived:n.semArchiveConnector});}catch(n){s(n);}});}function we(r){let o=r.command("data-sources").description("SemanticFed data sources (federated query targets)");o.command("list").description("List data sources").option("--connector <id>","Filter by connector ID").option("--status <s>","Filter by data source status").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(N,{connectorId:e.connector,status:e.status?e.status.toUpperCase():void 0,pagination:h(e)})).semListDataSources.items;c(e,n,{headers:["ID","Name","Connector","Status","Pushdown"],rows:n.map(i=>[m(i.id,12),i.name,m(i.connectorId,12),i.status,i.pushdownEnabled?"yes":"no"])});}catch(t){s(t);}}),o.command("get").description("Get a data source by id").argument("<id>","Data source ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(L,{id:e});if(!n.semDataSource)throw new d(`Data source ${e} not found`);c(t,n.semDataSource);}catch(n){s(n);}}),o.command("create").description("Create a data source").requiredOption("--connector <id>","Connector ID").requiredOption("--name <name>","Data source name").option("--description <s>","Description").option("--endpoint <json>","Endpoint JSON (host/db/url/\u2026)").option("--secret-ref <ref>","Secret reference (Key Vault key)").option("--pushdown <bool>","Enable predicate pushdown true|false",e=>e==="true").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={connectorId:e.connector,name:e.name};e.description&&(t.description=e.description),e.endpoint&&(t.endpoint=g("endpoint",e.endpoint)),e.secretRef&&(t.secretRef=e.secretRef),e.pushdown!==void 0&&(t.pushdownEnabled=e.pushdown),e.tags&&(t.tags=C(e.tags));let n=await a(P,{input:t});u(`Data source created: ${n.semCreateDataSource.name}`),c(e,n.semCreateDataSource);}catch(t){s(t);}}),o.command("update").description("Update a data source").argument("<id>","Data source ID").option("--name <name>","Data source name").option("--description <s>","Description").option("--endpoint <json>","Endpoint JSON").option("--secret-ref <ref>","Secret reference").option("--pushdown <bool>","Enable predicate pushdown true|false",e=>e==="true").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.endpoint&&(n.endpoint=g("endpoint",t.endpoint)),t.secretRef&&(n.secretRef=t.secretRef),t.pushdown!==void 0&&(n.pushdownEnabled=t.pushdown),t.tags&&(n.tags=C(t.tags)),!Object.keys(n).length)throw new d("No updates specified");let i=await a(U,{id:e,input:n});u("Data source updated"),c(t,i.semUpdateDataSource);}catch(n){s(n);}}),o.command("archive").description("Archive a data source").argument("<id>","Data source ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(Q,{id:e});if(!n.semArchiveDataSource)throw new d(`Data source ${e} could not be archived`);u(`Data source ${e} archived`),c(t,{archived:n.semArchiveDataSource});}catch(n){s(n);}}),o.command("transition").description("Move a data source through its connectivity lifecycle").argument("<id>","Data source ID").requiredOption("--status <s>","DRAFT|CONNECTED|DEGRADED|DISCONNECTED|DISABLED").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(F,{id:e,status:t.status.toUpperCase()});u(`Data source status set to ${n.semTransitionDataSource.status}`),c(t,n.semTransitionDataSource);}catch(n){s(n);}}),o.command("connections").description("List connection health probes for a data source").argument("<dataSourceId>","Data source ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(W,{dataSourceId:e});c(t,n.semListConnections,{headers:["ID","Health","Latency (ms)","Probed At","Message"],rows:n.semListConnections.map(i=>[m(i.id,12),i.health,i.latencyMs!=null?String(i.latencyMs):"-",i.probedAt,m(i.message??"",32)])});}catch(n){s(n);}}),o.command("record-connection").description("Record a connection health probe for a data source").requiredOption("--data-source <id>","Data source ID").requiredOption("--health <h>","HEALTHY|DEGRADED|UNREACHABLE|UNKNOWN").option("--latency-ms <n>","Latency in milliseconds",l).option("--message <s>","Probe message").option("-f, --format <format>","Output format").action(async e=>{try{let t={dataSourceId:e.dataSource,health:e.health.toUpperCase()};e.latencyMs!==void 0&&(t.latencyMs=e.latencyMs),e.message&&(t.message=e.message);let n=await a(G,{input:t});u(`Connection recorded: ${n.semRecordConnection.health}`),c(e,n.semRecordConnection);}catch(t){s(t);}});}function Se(r){let o=r.command("models").description("SemanticFed semantic models (versioned entity/metric graphs)");o.command("list").description("List semantic models").option("--status <s>","Filter by model status (DRAFT|PUBLISHED|DEPRECATED|ARCHIVED)").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(H,{status:e.status?e.status.toUpperCase():void 0,pagination:h(e)})).semListModels.items;c(e,n,{headers:["ID","Name","Status","Version","Description"],rows:n.map(i=>[m(i.id,12),i.name,i.status,String(i.version),m(i.description??"",32)])});}catch(t){s(t);}}),o.command("get").description("Get a semantic model by id").argument("<id>","Model ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(j,{id:e});if(!n.semModel)throw new d(`Model ${e} not found`);c(t,n.semModel);}catch(n){s(n);}}),o.command("create").description("Create a semantic model").requiredOption("--name <name>","Model name").option("--description <s>","Description").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name};e.description&&(t.description=e.description),e.tags&&(t.tags=C(e.tags));let n=await a(Y,{input:t});u(`Model created: ${n.semCreateModel.name}`),c(e,n.semCreateModel);}catch(t){s(t);}}),o.command("update").description("Update a semantic model").argument("<id>","Model ID").option("--name <name>","Model name").option("--description <s>","Description").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.description!==void 0&&(n.description=t.description),t.tags&&(n.tags=C(t.tags)),!Object.keys(n).length)throw new d("No updates specified");let i=await a(V,{id:e,input:n});u("Model updated"),c(t,i.semUpdateModel);}catch(n){s(n);}}),o.command("archive").description("Archive a semantic model").argument("<id>","Model ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(B,{id:e});if(!n.semArchiveModel)throw new d(`Model ${e} could not be archived`);u(`Model ${e} archived`),c(t,{archived:n.semArchiveModel});}catch(n){s(n);}}),o.command("publish").description("Publish a draft model (bumps version, flips status to PUBLISHED)").argument("<id>","Model ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(K,{id:e});u(`Model published (v${n.semPublishModel.version})`),c(t,n.semPublishModel);}catch(n){s(n);}});}function Ie(r){let o=r.command("entities").description("SemanticFed entities (tables/views/derived datasets in a model)");o.command("list").description("List entities in a model").requiredOption("--model <id>","Model ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(z,{modelId:e.model});c(e,t.semListEntities,{headers:["ID","Name","Kind","Physical Name","Primary Key"],rows:t.semListEntities.map(n=>[m(n.id,12),n.name,n.kind,n.physicalName??"-",n.primaryKey??"-"])});}catch(t){s(t);}}),o.command("get").description("Get an entity by id").argument("<id>","Entity ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(J,{id:e});if(!n.semEntity)throw new d(`Entity ${e} not found`);c(t,n.semEntity);}catch(n){s(n);}}),o.command("create").description("Create an entity").requiredOption("--model <id>","Model ID").requiredOption("--name <name>","Entity name").option("--kind <k>","TABLE|VIEW|DERIVED|EXTERNAL","TABLE").option("--data-source <id>","Backing data source ID").option("--physical-name <n>","Physical (DB) name").option("--primary-key <k>","Primary key column").option("--sql-definition <sql>","SQL definition (for derived entities)").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t={modelId:e.model,name:e.name,kind:(e.kind??"TABLE").toUpperCase()};e.dataSource&&(t.dataSourceId=e.dataSource),e.physicalName&&(t.physicalName=e.physicalName),e.primaryKey&&(t.primaryKey=e.primaryKey),e.sqlDefinition&&(t.sqlDefinition=e.sqlDefinition),e.description&&(t.description=e.description);let n=await a(X,{input:t});u(`Entity created: ${n.semCreateEntity.name}`),c(e,n.semCreateEntity);}catch(t){s(t);}}),o.command("update").description("Update an entity").argument("<id>","Entity ID").option("--name <name>","Entity name").option("--kind <k>","TABLE|VIEW|DERIVED|EXTERNAL").option("--data-source <id>","Backing data source ID").option("--physical-name <n>","Physical (DB) name").option("--primary-key <k>","Primary key column").option("--sql-definition <sql>","SQL definition").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.kind&&(n.kind=t.kind.toUpperCase()),t.dataSource&&(n.dataSourceId=t.dataSource),t.physicalName&&(n.physicalName=t.physicalName),t.primaryKey&&(n.primaryKey=t.primaryKey),t.sqlDefinition&&(n.sqlDefinition=t.sqlDefinition),t.description!==void 0&&(n.description=t.description),!Object.keys(n).length)throw new d("No updates specified");let i=await a(Z,{id:e,input:n});u("Entity updated"),c(t,i.semUpdateEntity);}catch(n){s(n);}}),o.command("delete").description("Delete an entity").argument("<id>","Entity ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(ee,{id:e});if(!n.semDeleteEntity)throw new d(`Entity ${e} could not be deleted`);u(`Entity ${e} deleted`),c(t,{deleted:n.semDeleteEntity});}catch(n){s(n);}});}function ke(r){r.command("dimensions").description("SemanticFed dimensions (queryable attributes on an entity)").command("create").description("Create a dimension").requiredOption("--entity <id>","Entity ID").requiredOption("--name <name>","Dimension name").option("--data-type <t>","STRING|INTEGER|DECIMAL|BOOLEAN|DATE|TIMESTAMP|JSON|GEO","STRING").option("--expression <e>","SQL expression").option("--primary","Mark as primary dimension").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t={entityId:e.entity,name:e.name,dataType:(e.dataType??"STRING").toUpperCase()};e.expression&&(t.expression=e.expression),e.primary&&(t.isPrimary=!0),e.description&&(t.description=e.description);let n=await a(te,{input:t});u(`Dimension created: ${n.semCreateDimension.name}`),c(e,n.semCreateDimension);}catch(t){s(t);}});}function Ae(r){r.command("metrics").description("SemanticFed metrics (aggregated measures on an entity)").command("create").description("Create a metric").requiredOption("--entity <id>","Entity ID").requiredOption("--name <name>","Metric name").option("--aggregation <a>","SUM|AVG|MIN|MAX|COUNT|COUNT_DISTINCT|MEDIAN|CUSTOM","SUM").option("--expression <e>","SQL expression").option("--format-spec <f>","Display format (e.g. currency, percent)").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t={entityId:e.entity,name:e.name,aggregation:(e.aggregation??"SUM").toUpperCase()};e.expression&&(t.expression=e.expression),e.formatSpec&&(t.format=e.formatSpec),e.description&&(t.description=e.description);let n=await a(ne,{input:t});u(`Metric created: ${n.semCreateMetric.name}`),c(e,n.semCreateMetric);}catch(t){s(t);}});}function be(r){let o=r.command("relationships").description("SemanticFed relationships (joins between entities in a model)");o.command("list").description("List relationships in a model").requiredOption("--model <id>","Model ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(oe,{modelId:e.model});c(e,t.semListRelationships,{headers:["ID","Name","Kind","From","To"],rows:t.semListRelationships.map(n=>[m(n.id,12),n.name,n.kind,`${m(n.fromEntityId,8)}.${n.fromField}`,`${m(n.toEntityId,8)}.${n.toField}`])});}catch(t){s(t);}}),o.command("create").description("Create a relationship").requiredOption("--model <id>","Model ID").requiredOption("--name <name>","Relationship name").requiredOption("--from-entity <id>","From entity ID").requiredOption("--from-field <f>","From field").requiredOption("--to-entity <id>","To entity ID").requiredOption("--to-field <f>","To field").option("--kind <k>","ONE_TO_ONE|ONE_TO_MANY|MANY_TO_ONE|MANY_TO_MANY","MANY_TO_ONE").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t={modelId:e.model,name:e.name,fromEntityId:e.fromEntity,fromField:e.fromField,toEntityId:e.toEntity,toField:e.toField,kind:(e.kind??"MANY_TO_ONE").toUpperCase()};e.description&&(t.description=e.description);let n=await a(re,{input:t});u(`Relationship created: ${n.semCreateRelationship.name}`),c(e,n.semCreateRelationship);}catch(t){s(t);}});}function Te(r){let o=r.command("queries").description("SemanticFed saved federated queries & run history");o.command("list").description("List saved queries").option("--model <id>","Filter by model ID").option("--status <s>","Filter by query status (DRAFT|PUBLISHED|ARCHIVED)").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(se,{modelId:e.model,status:e.status?e.status.toUpperCase():void 0,pagination:h(e)})).semListQueries.items;c(e,n,{headers:["ID","Name","Status","Model","Cacheable"],rows:n.map(i=>[m(i.id,12),i.name,i.status,i.modelId?m(i.modelId,12):"-",i.cacheable?"yes":"no"])});}catch(t){s(t);}}),o.command("get").description("Get a saved query by id").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(ie,{id:e});if(!n.semQuery)throw new d(`Query ${e} not found`);c(t,n.semQuery);}catch(n){s(n);}}),o.command("create").description("Create a saved query").requiredOption("--name <name>","Query name").requiredOption("--query-text <sql>","Federated query text").option("--model <id>","Associated model ID").option("--description <s>","Description").option("--cacheable <bool>","true|false",e=>e==="true").option("--cache-ttl <n>","Cache TTL seconds",l).option("--parameters <json>","Parameters JSON").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name,queryText:e.queryText};e.model&&(t.modelId=e.model),e.description&&(t.description=e.description),e.cacheable!==void 0&&(t.cacheable=e.cacheable),e.cacheTtl!==void 0&&(t.cacheTtlSeconds=e.cacheTtl),e.parameters&&(t.parameters=g("parameters",e.parameters)),e.tags&&(t.tags=C(e.tags));let n=await a(ae,{input:t});u(`Query created: ${n.semCreateQuery.name}`),c(e,n.semCreateQuery);}catch(t){s(t);}}),o.command("update").description("Update a saved query").argument("<id>","Query ID").option("--name <name>","Query name").option("--query-text <sql>","Federated query text").option("--model <id>","Associated model ID").option("--description <s>","Description").option("--cacheable <bool>","true|false",e=>e==="true").option("--cache-ttl <n>","Cache TTL seconds",l).option("--parameters <json>","Parameters JSON").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n={};if(t.name&&(n.name=t.name),t.queryText&&(n.queryText=t.queryText),t.model&&(n.modelId=t.model),t.description!==void 0&&(n.description=t.description),t.cacheable!==void 0&&(n.cacheable=t.cacheable),t.cacheTtl!==void 0&&(n.cacheTtlSeconds=t.cacheTtl),t.parameters&&(n.parameters=g("parameters",t.parameters)),t.tags&&(n.tags=C(t.tags)),!Object.keys(n).length)throw new d("No updates specified");let i=await a(ce,{id:e,input:n});u("Query updated"),c(t,i.semUpdateQuery);}catch(n){s(n);}}),o.command("archive").description("Archive a saved query").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(de,{id:e});if(!n.semArchiveQuery)throw new d(`Query ${e} could not be archived`);u(`Query ${e} archived`),c(t,{archived:n.semArchiveQuery});}catch(n){s(n);}}),o.command("publish").description("Publish a draft query").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(ue,{id:e});u(`Query published: ${n.semPublishQuery.name}`),c(t,n.semPublishQuery);}catch(n){s(n);}}),o.command("run").description("Enqueue a federated execution of a saved query").argument("<id>","Query ID").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(pe,{id:e});u(`Query run enqueued: ${n.semRunQuery.id} (${n.semRunQuery.status})`),c(t,n.semRunQuery);}catch(n){s(n);}}),o.command("runs").description("List run history for a saved query").requiredOption("--query <id>","Query ID").option("--status <s>","Filter by run status").option("--limit <n>","Page size",l,50).option("--offset <n>","Offset",l,0).option("--cursor <c>","Opaque pagination cursor").option("-f, --format <format>","Output format").action(async e=>{try{let n=(await a(me,{queryId:e.query,status:e.status?e.status.toUpperCase():void 0,pagination:h(e)})).semListQueryRuns.items;c(e,n,{headers:["ID","Status","Rows","Duration (ms)","Cached"],rows:n.map(i=>[m(i.id,12),i.status,i.rowCount!=null?String(i.rowCount):"-",i.durationMs!=null?String(i.durationMs):"-",i.fromCache?"yes":"no"])});}catch(t){s(t);}});}function xe(r){let o=r.command("access-policies").description("SemanticFed access policies (row/column/entity governance)");o.command("list").description("List access policies").option("--entity <id>","Filter by entity ID").option("--model <id>","Filter by model ID").option("-f, --format <format>","Output format").action(async e=>{try{let t=await a(le,{entityId:e.entity,modelId:e.model});c(e,t.semListAccessPolicies,{headers:["ID","Name","Principal","Effect","Scope","Active"],rows:t.semListAccessPolicies.map(n=>[m(n.id,12),n.name,n.principal,n.effect,n.scope,n.isActive?"yes":"no"])});}catch(t){s(t);}}),o.command("create").description("Create an access policy").requiredOption("--name <name>","Policy name").requiredOption("--principal <p>","Principal (user/role/group expression)").option("--effect <e>","ALLOW|DENY","ALLOW").option("--scope <s>","ROW|COLUMN|ENTITY","ROW").option("--entity <id>","Scoped entity ID").option("--model <id>","Scoped model ID").option("--rule <json>","Rule JSON (predicate / column list)").option("--description <s>","Description").option("-f, --format <format>","Output format").action(async e=>{try{let t={name:e.name,principal:e.principal,effect:(e.effect??"ALLOW").toUpperCase(),scope:(e.scope??"ROW").toUpperCase()};e.entity&&(t.entityId=e.entity),e.model&&(t.modelId=e.model),e.rule&&(t.rule=g("rule",e.rule)),e.description&&(t.description=e.description);let n=await a(fe,{input:t});u(`Access policy created: ${n.semCreateAccessPolicy.name}`),c(e,n.semCreateAccessPolicy);}catch(t){s(t);}}),o.command("set-active").description("Activate or deactivate an access policy").argument("<id>","Policy ID").requiredOption("--active <bool>","true|false",e=>e==="true").option("-f, --format <format>","Output format").action(async(e,t)=>{try{let n=await a(ge,{id:e,isActive:t.active});u(`Access policy ${e} ${n.semSetAccessPolicyActive.isActive?"activated":"deactivated"}`),c(t,n.semSetAccessPolicyActive);}catch(n){s(n);}});}function Re(r){r.command("health").description("SemanticFed subgraph liveness/identity probe (public)").option("-f, --format <format>","Output format").action(async o=>{try{let e=await T(ye);u(e.semHealth),c(o,{health:e.semHealth});}catch(e){s(e);}});}var De=["table","json","csv","yaml"];function Oe(r){if(r===void 0)return;let o=r.toLowerCase();if(De.includes(o))return o;throw new d(`--format must be one of ${De.join(", ")} (got "${r}")`)}function He(r){return r==null?"NULL":typeof r=="object"?JSON.stringify(r):String(r)}function ve(r){if(r==null)return "";let o=typeof r=="object"?JSON.stringify(r):String(r);return /[",\r\n]/.test(o)?`"${o.replace(/"/g,'""')}"`:o}function Ye(r){let o=r.columns.map(t=>t.name),e=[o.map(ve).join(",")];for(let t of r.rows)e.push(o.map(n=>ve(t[n])).join(","));return `${e.join(`\r
306
306
  `)}\r
307
- `}function Ve(r,o){if(!r||r.trim()==="")throw new d('A SQL statement is required, e.g. semanticfed sql "SELECT * FROM customers LIMIT 10"');let e={sql:r};if(o.model&&(e.modelId=o.model),o.maxRows!==void 0){if(o.maxRows<1)throw new d("--max-rows must be a positive integer");e.maxRows=o.maxRows;}if(o.timeout!==void 0){if(o.timeout<1)throw new d("--timeout must be a positive integer");e.timeoutMs=o.timeout;}return e}function Be(r,o){let e=A(),t=r??e.getFormat({});if(t==="csv"){if(!e.printRaw)throw new d("This output adapter cannot print CSV; use --format json or table");e.printRaw(Ye(o));}else if(t==="table"){let n=o.columns.map(y=>y.name);e.printTable(n,o.rows.map(y=>n.map(k=>He(y[k]))));let i=o.columns.filter(y=>y.masked).map(y=>y.name);e.printInfo(`${o.rowCount} row${o.rowCount===1?"":"s"} in ${Math.round(o.durationMs)} ms`+(i.length?` (masked: ${i.join(", ")})`:""));}else e.formatAndOutput({format:t},o);o.truncated&&e.printWarning("Result truncated: more rows matched than were returned (raise --max-rows, max 10000, or add LIMIT/WHERE).");}function Me(r){r.command("sql").description("Run a read-only SQL SELECT against a semantic model (sql catalog: list tables)").argument("[statement]","One SELECT statement; tables are entities, columns their fields").option("--model <id>","Semantic model ID (optional when the workspace has one model)").option("--max-rows <n>","Maximum rows returned (server default 1000, max 10000)",l).option("--timeout <ms>","Execution time limit in ms (default 30000, 1000-60000)",l).option("-f, --format <format>","Output format: table|json|csv|yaml").action(async(e,t)=>{try{let n=Oe(t.format),i=Ve(e,t),y=await a(Ce,{input:i});Be(n,y.semExecuteSql);}catch(n){s(n);}}).command("catalog").description("List the tables and columns a semantic model exposes to SQL").option("--model <id>","Semantic model ID (optional when the workspace has one model)").option("-f, --format <format>","Output format: table|json|yaml").action(async(e,t)=>{try{let n=t.optsWithGlobals(),i=Oe(n.format);if(i==="csv")throw new d("sql catalog supports --format table, json or yaml");let k=(await a(he,{modelId:n.model||void 0})).semSqlCatalog;A().formatAndOutput({format:i},k,{headers:["Table","Column","Kind","Type","Primary","Aggregation"],rows:k.tables.flatMap(x=>x.columns.map(I=>[x.name,I.name,I.kind,I.dataType,I.isPrimary?"yes":"",I.aggregation??""]))});}catch(n){s(n);}});}var Ke={id:"semanticfed",version:"1.0.0",displayName:"SemanticFed",dependsOn:["auth","workspaces"],register(r,o){O(o);let e=r.command("semanticfed").description("SemanticFed data-federation & governed semantic layer");Ee(e),Se(e),we(e),Ie(e),ke(e),Ae(e),be(e),Te(e),xe(e),De(e),Me(e);}},Zn=Ke;module.exports=Zn;
307
+ `}function Ve(r,o){if(!r||r.trim()==="")throw new d('A SQL statement is required, e.g. semanticfed sql "SELECT * FROM customers LIMIT 10"');let e={sql:r};if(o.model&&(e.modelId=o.model),o.maxRows!==void 0){if(o.maxRows<1)throw new d("--max-rows must be a positive integer");e.maxRows=o.maxRows;}if(o.timeout!==void 0){if(o.timeout<1)throw new d("--timeout must be a positive integer");e.timeoutMs=o.timeout;}return e}function Be(r,o){let e=A(),t=r??e.getFormat({});if(t==="csv"){if(!e.printRaw)throw new d("This output adapter cannot print CSV; use --format json or table");e.printRaw(Ye(o));}else if(t==="table"){let n=o.columns.map(y=>y.name);e.printTable(n,o.rows.map(y=>n.map(k=>He(y[k]))));let i=o.columns.filter(y=>y.masked).map(y=>y.name);e.printInfo(`${o.rowCount} row${o.rowCount===1?"":"s"} in ${Math.round(o.durationMs)} ms`+(i.length?` (masked: ${i.join(", ")})`:""));}else e.formatAndOutput({format:t},o);o.truncated&&e.printWarning("Result truncated: more rows matched than were returned (raise --max-rows, max 10000, or add LIMIT/WHERE).");}function Me(r){r.command("sql").description("Run a read-only SQL SELECT against a semantic model (sql catalog: list tables)").argument("[statement]","One SELECT statement; tables are entities, columns their fields").option("--model <id>","Semantic model ID (optional when the workspace has one model)").option("--max-rows <n>","Maximum rows returned (server default 1000, max 10000)",l).option("--timeout <ms>","Execution time limit in ms (default 30000, 1000-60000)",l).option("-f, --format <format>","Output format: table|json|csv|yaml").action(async(e,t)=>{try{let n=Oe(t.format),i=Ve(e,t),y=await a(Ce,{input:i});Be(n,y.semExecuteSql);}catch(n){s(n);}}).command("catalog").description("List the tables and columns a semantic model exposes to SQL").option("--model <id>","Semantic model ID (optional when the workspace has one model)").option("-f, --format <format>","Output format: table|json|yaml").action(async(e,t)=>{try{let n=t.optsWithGlobals(),i=Oe(n.format);if(i==="csv")throw new d("sql catalog supports --format table, json or yaml");let k=(await a(he,{modelId:n.model||void 0})).semSqlCatalog;A().formatAndOutput({format:i},k,{headers:["Table","Column","Kind","Type","Primary","Aggregation"],rows:k.tables.flatMap(x=>x.columns.map(I=>[x.name,I.name,I.kind,I.dataType,I.isPrimary?"yes":"",I.aggregation??""]))});}catch(n){s(n);}});}var Ke={id:"semanticfed",version:"1.0.0",displayName:"SemanticFed",dependsOn:["auth","workspaces"],register(r,o){O(o);let e=r.command("semanticfed").description("SemanticFed data-federation & governed semantic layer");Ee(e),we(e),Se(e),Ie(e),ke(e),Ae(e),be(e),Te(e),xe(e),Re(e),Me(e);}},Zn=Ke;module.exports=Zn;
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.cjs';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.cjs';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4
 
@@ -1,4 +1,4 @@
1
- import { C as CliModule } from '../../module-CLaW1ycq.js';
1
+ import { C as CliModule } from '../../module-BNVKV_pI.js';
2
2
  import 'commander';
3
3
  import 'graphql-request';
4
4