@burdenoff/cli-sdk 2026.1031.2 → 2026.1101.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/{chunk-SQSFZFQZ.js → chunk-W4JZR7RJ.js} +1 -1
  2. package/dist/{chunk-UAFYTYK6.js → chunk-YIY5IDXQ.js} +5 -5
  3. package/dist/core/index.cjs +4 -4
  4. package/dist/core/index.js +1 -1
  5. package/dist/index.cjs +4 -4
  6. package/dist/index.js +1 -1
  7. package/dist/modules/adaptercloud/index.js +1 -1
  8. package/dist/modules/artistrybase/index.js +1 -1
  9. package/dist/modules/assethandler/index.js +1 -1
  10. package/dist/modules/atheletebridge/index.js +1 -1
  11. package/dist/modules/auth/index.js +1 -1
  12. package/dist/modules/billing/index.cjs +1 -1
  13. package/dist/modules/billing/index.js +1 -1
  14. package/dist/modules/brainyrich/index.js +1 -1
  15. package/dist/modules/buildmyiq/index.cjs +3 -3
  16. package/dist/modules/buildmyiq/index.js +1 -1
  17. package/dist/modules/channels/index.js +1 -1
  18. package/dist/modules/collabkin/index.js +1 -1
  19. package/dist/modules/comradecircle/index.js +1 -1
  20. package/dist/modules/conversations/index.js +1 -1
  21. package/dist/modules/coolandlovely/index.js +1 -1
  22. package/dist/modules/cosmicintersection/index.js +1 -1
  23. package/dist/modules/crewfoundry/index.js +1 -1
  24. package/dist/modules/devportal/index.cjs +3 -3
  25. package/dist/modules/devportal/index.js +1 -1
  26. package/dist/modules/ecoimpacthub/index.js +1 -1
  27. package/dist/modules/eventfullymanaged/index.cjs +4 -4
  28. package/dist/modules/eventfullymanaged/index.js +1 -1
  29. package/dist/modules/export/index.js +1 -1
  30. package/dist/modules/files/index.js +1 -1
  31. package/dist/modules/fluidgrids/index.js +1 -1
  32. package/dist/modules/ggnomad/index.cjs +16 -16
  33. package/dist/modules/ggnomad/index.js +21 -21
  34. package/dist/modules/govcitizenhub/index.js +1 -1
  35. package/dist/modules/groups/index.js +1 -1
  36. package/dist/modules/headshotmarketing/index.js +1 -1
  37. package/dist/modules/hookmovies/index.js +1 -1
  38. package/dist/modules/housingvista/index.js +1 -1
  39. package/dist/modules/integrations/index.js +1 -1
  40. package/dist/modules/intelwatchtower/index.js +1 -1
  41. package/dist/modules/kadaikodi/index.js +1 -1
  42. package/dist/modules/labsofscience/index.js +1 -1
  43. package/dist/modules/manufacturedops/index.js +1 -1
  44. package/dist/modules/movethewheels/index.js +1 -1
  45. package/dist/modules/mybodyshield/index.cjs +52 -28
  46. package/dist/modules/mybodyshield/index.js +71 -47
  47. package/dist/modules/notifications/index.js +1 -1
  48. package/dist/modules/organizations/index.js +1 -1
  49. package/dist/modules/planmagnet/index.js +1 -1
  50. package/dist/modules/products/index.js +1 -1
  51. package/dist/modules/proserviceworld/index.js +1 -1
  52. package/dist/modules/rbac/index.js +1 -1
  53. package/dist/modules/sandbox/index.js +1 -1
  54. package/dist/modules/scheduler/index.js +1 -1
  55. package/dist/modules/security/index.cjs +3 -3
  56. package/dist/modules/security/index.js +1 -1
  57. package/dist/modules/semanticfed/index.js +1 -1
  58. package/dist/modules/store/index.cjs +3 -3
  59. package/dist/modules/store/index.js +1 -1
  60. package/dist/modules/subscriberbot/index.js +1 -1
  61. package/dist/modules/support/index.js +1 -1
  62. package/dist/modules/tags/index.cjs +2 -2
  63. package/dist/modules/tags/index.js +1 -1
  64. package/dist/modules/technospam/index.js +1 -1
  65. package/dist/modules/theculturepost/index.js +1 -1
  66. package/dist/modules/theglobalfuel/index.js +1 -1
  67. package/dist/modules/timecampus/index.cjs +3 -3
  68. package/dist/modules/timecampus/index.js +1 -1
  69. package/dist/modules/tours/index.js +1 -1
  70. package/dist/modules/vibecontrols/index.js +1 -1
  71. package/dist/modules/workspaces/index.js +1 -1
  72. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import {a,b,h as h$1,p,g,i,o as o$2,d}from'../../chunk-SQSFZFQZ.js';import {o as o$1}from'../../chunk-UAFYTYK6.js';var T=`
1
+ import {o,p}from'../../chunk-YIY5IDXQ.js';import {readFileSync}from'fs';var M=`
2
2
  query MybListPrograms(
3
3
  $memberId: ID
4
4
  $status: MybProgramStatus
@@ -12,62 +12,66 @@ import {a,b,h as h$1,p,g,i,o as o$2,d}from'../../chunk-SQSFZFQZ.js';import {o as
12
12
  pageInfo { cursor hasMore }
13
13
  }
14
14
  }
15
- `,C=`
15
+ `,O=`
16
16
  query MybProgram($id: ID!) {
17
17
  mybProgram(id: $id) {
18
18
  id memberId coachId name description goalType level phase status
19
19
  weeks daysPerWeek startDate endDate tags createdAt updatedAt workspaceId
20
20
  workouts {
21
- id name type dayOfWeek weekNumber orderIndex durationMin
21
+ items { id name type dayOfWeek weekNumber orderIndex durationMin }
22
+ pageInfo { cursor hasMore }
22
23
  }
23
24
  }
24
25
  }
25
- `,S=`
26
- query MybProgramWorkouts($programId: ID!) {
27
- mybProgramWorkouts(programId: $programId) {
26
+ `,R=`
27
+ query MybProgramWorkouts($programId: ID!, $pagination: PaginationInput) {
28
+ mybProgramWorkouts(programId: $programId, pagination: $pagination) {
29
+ items {
28
30
  id programId name description type dayOfWeek weekNumber durationMin
29
31
  orderIndex createdAt updatedAt workspaceId
32
+ }
33
+ pageInfo { cursor hasMore }
30
34
  }
31
35
  }
32
- `,D=`
36
+ `,k=`
33
37
  mutation MybCreateProgram($input: MybCreateProgramInput!) {
34
38
  mybCreateProgram(input: $input) {
35
39
  id memberId coachId name description goalType level phase status
36
40
  weeks daysPerWeek startDate endDate tags createdAt
37
41
  }
38
42
  }
39
- `,w=`
43
+ `,N=`
40
44
  mutation MybUpdateProgram($id: ID!, $input: MybUpdateProgramInput!) {
41
45
  mybUpdateProgram(id: $id, input: $input) {
42
46
  id name description goalType level phase status weeks daysPerWeek
43
47
  startDate endDate tags updatedAt
44
48
  }
45
49
  }
46
- `,E=`
50
+ `,L=`
47
51
  mutation MybTransitionProgram($id: ID!, $status: MybProgramStatus!) {
48
52
  mybTransitionProgram(id: $id, status: $status) {
49
53
  id name status phase updatedAt
50
54
  }
51
55
  }
52
- `,M=`
56
+ `,P=`
53
57
  mutation MybArchiveProgram($id: ID!) {
54
58
  mybArchiveProgram(id: $id)
55
59
  }
56
- `,R=`
60
+ `,v=`
57
61
  mutation MybAddWorkout($input: MybCreateWorkoutInput!) {
58
62
  mybAddWorkout(input: $input) {
59
63
  id programId name description type dayOfWeek weekNumber durationMin
60
64
  orderIndex createdAt workspaceId
61
65
  }
62
66
  }
63
- `,O=`
67
+ `,$=`
64
68
  mutation MybAddExercise($input: MybCreateExerciseInput!) {
65
69
  mybAddExercise(input: $input) {
66
70
  id workoutId name muscleGroup sets reps restSeconds targetWeight
67
71
  orderIndex instructions createdAt workspaceId
68
72
  }
69
73
  }
70
- `,k=`
74
+ `,G=`
71
75
  query MybListSessions(
72
76
  $programId: ID
73
77
  $status: MybSessionStatus
@@ -81,39 +85,39 @@ import {a,b,h as h$1,p,g,i,o as o$2,d}from'../../chunk-SQSFZFQZ.js';import {o as
81
85
  pageInfo { cursor hasMore }
82
86
  }
83
87
  }
84
- `,N=`
88
+ `,x=`
85
89
  query MybSession($id: ID!) {
86
90
  mybSession(id: $id) {
87
91
  id memberId programId workoutId status scheduledFor startedAt
88
92
  completedAt caloriesBurned perceivedExertion notes createdAt updatedAt
89
93
  workspaceId
90
94
  sets {
91
- id exerciseName setNumber reps weight distanceM durationSec
92
- isPersonalRecord
95
+ items { id exerciseName setNumber reps weight distanceM durationSec isPersonalRecord }
96
+ pageInfo { cursor hasMore }
93
97
  }
94
98
  }
95
99
  }
96
- `,P=`
100
+ `,_=`
97
101
  mutation MybStartSession($input: MybStartSessionInput!) {
98
102
  mybStartSession(input: $input) {
99
103
  id memberId programId workoutId status scheduledFor startedAt
100
104
  notes createdAt
101
105
  }
102
106
  }
103
- `,L=`
107
+ `,U=`
104
108
  mutation MybLogSet($input: MybLogSetInput!) {
105
109
  mybLogSet(input: $input) {
106
110
  id sessionId exerciseName setNumber reps weight distanceM durationSec
107
111
  isPersonalRecord createdAt
108
112
  }
109
113
  }
110
- `,G=`
114
+ `,W=`
111
115
  mutation MybCompleteSession($id: ID!, $input: MybCompleteSessionInput!) {
112
116
  mybCompleteSession(id: $id, input: $input) {
113
117
  id status completedAt caloriesBurned perceivedExertion notes updatedAt
114
118
  }
115
119
  }
116
- `,v=`
120
+ `,V=`
117
121
  query MybListGoals(
118
122
  $memberId: ID
119
123
  $status: MybGoalStatus
@@ -127,34 +131,34 @@ import {a,b,h as h$1,p,g,i,o as o$2,d}from'../../chunk-SQSFZFQZ.js';import {o as
127
131
  pageInfo { cursor hasMore }
128
132
  }
129
133
  }
130
- `,$=`
134
+ `,H=`
131
135
  query MybGoal($id: ID!) {
132
136
  mybGoal(id: $id) {
133
137
  id memberId type status title description targetValue currentValue
134
138
  baselineValue unit targetDate achievedAt createdAt updatedAt workspaceId
135
139
  }
136
140
  }
137
- `,x=`
141
+ `,F=`
138
142
  mutation MybCreateGoal($input: MybCreateGoalInput!) {
139
143
  mybCreateGoal(input: $input) {
140
144
  id memberId type status title description targetValue currentValue
141
145
  baselineValue unit targetDate createdAt
142
146
  }
143
147
  }
144
- `,_=`
148
+ `,B=`
145
149
  mutation MybUpdateGoal($id: ID!, $input: MybUpdateGoalInput!) {
146
150
  mybUpdateGoal(id: $id, input: $input) {
147
151
  id type status title description targetValue currentValue baselineValue
148
152
  unit targetDate updatedAt
149
153
  }
150
154
  }
151
- `,U=`
155
+ `,q=`
152
156
  mutation MybAchieveGoal($id: ID!) {
153
157
  mybAchieveGoal(id: $id) {
154
158
  id title status achievedAt updatedAt
155
159
  }
156
160
  }
157
- `,W=`
161
+ `,Y=`
158
162
  query MybListBodyMetrics(
159
163
  $memberId: ID
160
164
  $type: MybBodyMetricType
@@ -168,55 +172,55 @@ import {a,b,h as h$1,p,g,i,o as o$2,d}from'../../chunk-SQSFZFQZ.js';import {o as
168
172
  pageInfo { cursor hasMore }
169
173
  }
170
174
  }
171
- `,H=`
175
+ `,j=`
172
176
  mutation MybRecordBodyMetric($input: MybRecordMetricInput!) {
173
177
  mybRecordBodyMetric(input: $input) {
174
178
  id memberId type value unit measuredAt notes createdAt workspaceId
175
179
  }
176
180
  }
177
- `,V=`
181
+ `,K=`
178
182
  query MybNutritionPlan($id: ID!) {
179
183
  mybNutritionPlan(id: $id) {
180
184
  id memberId coachId name goalType calorieTarget proteinTarget carbsTarget
181
185
  fatTarget isActive startDate endDate notes createdAt updatedAt workspaceId
182
- meals { id name mealType calories proteinG carbsG fatG loggedAt }
186
+ meals { items { id name mealType calories proteinG carbsG fatG loggedAt } pageInfo { cursor hasMore } }
183
187
  }
184
188
  }
185
- `,F=`
189
+ `,z=`
186
190
  query MybActiveNutritionPlan($memberId: ID) {
187
191
  mybActiveNutritionPlan(memberId: $memberId) {
188
192
  id memberId coachId name goalType calorieTarget proteinTarget carbsTarget
189
193
  fatTarget isActive startDate endDate notes createdAt updatedAt workspaceId
190
194
  }
191
195
  }
192
- `,B=`
196
+ `,X=`
193
197
  query MybDailyMacros($date: DateTime, $memberId: ID) {
194
198
  mybDailyMacros(date: $date, memberId: $memberId) {
195
199
  date calories calorieTarget proteinG proteinTarget carbsG carbsTarget
196
200
  fatG fatTarget
197
201
  }
198
202
  }
199
- `,q=`
203
+ `,J=`
200
204
  mutation MybCreateNutritionPlan($input: MybCreateNutritionPlanInput!) {
201
205
  mybCreateNutritionPlan(input: $input) {
202
206
  id memberId coachId name goalType calorieTarget proteinTarget carbsTarget
203
207
  fatTarget isActive startDate endDate notes createdAt
204
208
  }
205
209
  }
206
- `,Y=`
210
+ `,Z=`
207
211
  mutation MybUpdateNutritionPlan($id: ID!, $input: MybUpdateNutritionPlanInput!) {
208
212
  mybUpdateNutritionPlan(id: $id, input: $input) {
209
213
  id name goalType calorieTarget proteinTarget carbsTarget fatTarget
210
214
  startDate endDate notes updatedAt
211
215
  }
212
216
  }
213
- `,K=`
217
+ `,Q=`
214
218
  mutation MybActivateNutritionPlan($id: ID!) {
215
219
  mybActivateNutritionPlan(id: $id) {
216
220
  id name isActive updatedAt
217
221
  }
218
222
  }
219
- `,j=`
223
+ `,ee=`
220
224
  query MybListMeals(
221
225
  $mealType: MybMealType
222
226
  $planId: ID
@@ -230,52 +234,72 @@ import {a,b,h as h$1,p,g,i,o as o$2,d}from'../../chunk-SQSFZFQZ.js';import {o as
230
234
  pageInfo { cursor hasMore }
231
235
  }
232
236
  }
233
- `,z=`
237
+ `,te=`
234
238
  mutation MybLogMeal($input: MybLogMealInput!) {
235
239
  mybLogMeal(input: $input) {
236
240
  id memberId planId name mealType calories proteinG carbsG fatG servings
237
241
  isFavorite loggedAt createdAt workspaceId
238
242
  }
239
243
  }
240
- `,J=`
244
+ `,re=`
241
245
  mutation MybDeleteMeal($id: ID!) {
242
246
  mybDeleteMeal(id: $id)
243
247
  }
244
- `,X=`
245
- query MybListRecoveryLogs($memberId: ID, $metric: MybRecoveryMetric) {
246
- mybListRecoveryLogs(memberId: $memberId, metric: $metric) {
248
+ `,ne=`
249
+ query MybListRecoveryLogs($memberId: ID, $metric: MybRecoveryMetric, $pagination: PaginationInput) {
250
+ mybListRecoveryLogs(memberId: $memberId, metric: $metric, pagination: $pagination) {
251
+ items {
247
252
  id memberId metric score sleepHours notes loggedAt createdAt updatedAt
248
253
  workspaceId
254
+ }
255
+ pageInfo { cursor hasMore }
249
256
  }
250
257
  }
251
- `,Q=`
258
+ `,oe=`
252
259
  mutation MybLogRecovery($input: MybLogRecoveryInput!) {
253
260
  mybLogRecovery(input: $input) {
254
261
  id memberId metric score sleepHours notes loggedAt createdAt workspaceId
255
262
  }
256
263
  }
257
- `,Z=`
258
- query MybListCoaching($memberId: ID, $status: MybCoachingStatus) {
259
- mybListCoaching(memberId: $memberId, status: $status) {
264
+ `,ie=`
265
+ query MybListCoaching($memberId: ID, $status: MybCoachingStatus, $pagination: PaginationInput) {
266
+ mybListCoaching(memberId: $memberId, status: $status, pagination: $pagination) {
267
+ items {
260
268
  id coachId memberId status specialty shareWorkouts shareNutrition
261
269
  shareMetrics notes startedAt endedAt createdAt updatedAt workspaceId
270
+ }
271
+ pageInfo { cursor hasMore }
262
272
  }
263
273
  }
264
- `,tt=`
274
+ `,ae=`
265
275
  mutation MybCreateCoaching($input: MybCreateCoachingInput!) {
266
276
  mybCreateCoaching(input: $input) {
267
277
  id coachId memberId status specialty shareWorkouts shareNutrition
268
278
  shareMetrics notes createdAt workspaceId
269
279
  }
270
280
  }
271
- `,et=`
281
+ `,se=`
272
282
  mutation MybTransitionCoaching($id: ID!, $status: MybCoachingStatus!) {
273
283
  mybTransitionCoaching(id: $id, status: $status) {
274
284
  id coachId memberId status startedAt endedAt updatedAt
275
285
  }
276
286
  }
277
- `,rt=`
287
+ `,me=`
278
288
  query MybHealth {
279
289
  mybHealth
280
290
  }
281
- `;function o(d){let n=Number.parseInt(d,10);if(Number.isNaN(n))throw new o$1(`Expected an integer but got "${d}"`);return n}function u(d){let n=Number.parseFloat(d);if(Number.isNaN(n))throw new o$1(`Expected a number but got "${d}"`);return n}function h(d){return d.split(",").map(n=>n.trim()).filter(n=>n.length>0)}function nt(d){let n=d.command("programs").description("Mybodyshield training programs");n.command("list").description("List training programs").option("--member <id>","Filter by member ID").option("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("--limit <n>","Page size",o,50).option("--offset <n>","Offset",o,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b(T,{memberId:t.member,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});h$1(t,e.mybListPrograms.items,{headers:["ID","Name","Goal","Level","Phase","Status"],rows:e.mybListPrograms.items.map(r=>[p(r.id,12),r.name,r.goalType,r.level,r.phase,r.status])});}catch(e){g(e);}}),n.command("get").description("Get a training program by id").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await b(C,{id:t});if(!r.mybProgram)throw new o$1(`Program ${t} not found`);h$1(e,r.mybProgram);}catch(r){g(r);}}),n.command("workouts").description("List workouts for a program").argument("<programId>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await b(S,{programId:t});h$1(e,r.mybProgramWorkouts,{headers:["ID","Name","Type","Day","Week","Duration"],rows:r.mybProgramWorkouts.map(c=>[p(c.id,12),c.name,c.type,c.dayOfWeek!=null?String(c.dayOfWeek):"-",c.weekNumber!=null?String(c.weekNumber):"-",c.durationMin!=null?String(c.durationMin):"-"])});}catch(r){g(r);}}),n.command("create").description("Create a training program").requiredOption("--name <name>","Program name").option("--member <id>","Member ID").option("--coach <id>","Coach ID").option("--description <s>","Description").option("--goal-type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|ELITE").option("--phase <p>","BUILD|PEAK|DELOAD|MAINTENANCE").option("--weeks <n>","Number of weeks",o).option("--days-per-week <n>","Days per week",o).option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.member&&(e.memberId=t.member),t.coach&&(e.coachId=t.coach),t.description&&(e.description=t.description),t.goalType&&(e.goalType=t.goalType.toUpperCase()),t.level&&(e.level=t.level.toUpperCase()),t.phase&&(e.phase=t.phase.toUpperCase()),t.weeks!==void 0&&(e.weeks=t.weeks),t.daysPerWeek!==void 0&&(e.daysPerWeek=t.daysPerWeek),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate),t.tags&&(e.tags=h(t.tags));let r=await b(D,{input:e});i(`Program created: ${r.mybCreateProgram.name}`),h$1(t,r.mybCreateProgram);}catch(e){g(e);}}),n.command("update").description("Update a training program").argument("<id>","Program ID").option("--name <name>","Program name").option("--description <s>","Description").option("--goal-type <t>","Goal type").option("--level <l>","Fitness level").option("--phase <p>","Program phase").option("--weeks <n>","Number of weeks",o).option("--days-per-week <n>","Days per week",o).option("--coach <id>","Coach ID").option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r={};if(e.name&&(r.name=e.name),e.description!==void 0&&(r.description=e.description),e.goalType&&(r.goalType=e.goalType.toUpperCase()),e.level&&(r.level=e.level.toUpperCase()),e.phase&&(r.phase=e.phase.toUpperCase()),e.weeks!==void 0&&(r.weeks=e.weeks),e.daysPerWeek!==void 0&&(r.daysPerWeek=e.daysPerWeek),e.coach&&(r.coachId=e.coach),e.startDate&&(r.startDate=e.startDate),e.endDate&&(r.endDate=e.endDate),e.tags&&(r.tags=h(e.tags)),!Object.keys(r).length)throw new o$1("No updates specified");let c=await b(w,{id:t,input:r});i("Program updated"),h$1(e,c.mybUpdateProgram);}catch(r){g(r);}}),n.command("transition").description("Advance a program through its lifecycle").argument("<id>","Program ID").requiredOption("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await b(E,{id:t,status:e.status.toUpperCase()});i(`Program transitioned to ${r.mybTransitionProgram.status}`),h$1(e,r.mybTransitionProgram);}catch(r){g(r);}}),n.command("archive").description("Archive a training program").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await b(M,{id:t});i(r.mybArchiveProgram?"Program archived":"Program not archived"),h$1(e,{archived:r.mybArchiveProgram});}catch(r){g(r);}});}function ot(d){let n=d.command("workouts").description("Mybodyshield workouts & exercises");n.command("add").description("Add a workout to a program").requiredOption("--program <id>","Program ID").requiredOption("--name <name>","Workout name").option("--description <s>","Description").option("--type <t>","STRENGTH|CARDIO|HIIT|MOBILITY|RECOVERY|YOGA").option("--day-of-week <n>","Day of week (0-6)",o).option("--week-number <n>","Week number",o).option("--duration-min <n>","Duration (minutes)",o).option("--order-index <n>","Order index",o).option("-f, --format <format>","Output format").action(async t=>{try{let e={programId:t.program,name:t.name};t.description&&(e.description=t.description),t.type&&(e.type=t.type.toUpperCase()),t.dayOfWeek!==void 0&&(e.dayOfWeek=t.dayOfWeek),t.weekNumber!==void 0&&(e.weekNumber=t.weekNumber),t.durationMin!==void 0&&(e.durationMin=t.durationMin),t.orderIndex!==void 0&&(e.orderIndex=t.orderIndex);let r=await b(R,{input:e});i(`Workout added: ${r.mybAddWorkout.name}`),h$1(t,r.mybAddWorkout);}catch(e){g(e);}}),n.command("add-exercise").description("Add an exercise to a workout").requiredOption("--workout <id>","Workout ID").requiredOption("--name <name>","Exercise name").option("--muscle-group <g>","CHEST|BACK|LEGS|SHOULDERS|ARMS|CORE|FULL_BODY").option("--sets <n>","Sets",o).option("--reps <n>","Reps",o).option("--rest-seconds <n>","Rest (seconds)",o).option("--target-weight <n>","Target weight",u).option("--order-index <n>","Order index",o).option("--instructions <s>","Instructions").option("--demo-file-id <id>","Demo file ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={workoutId:t.workout,name:t.name};t.muscleGroup&&(e.muscleGroup=t.muscleGroup.toUpperCase()),t.sets!==void 0&&(e.sets=t.sets),t.reps!==void 0&&(e.reps=t.reps),t.restSeconds!==void 0&&(e.restSeconds=t.restSeconds),t.targetWeight!==void 0&&(e.targetWeight=t.targetWeight),t.orderIndex!==void 0&&(e.orderIndex=t.orderIndex),t.instructions&&(e.instructions=t.instructions),t.demoFileId&&(e.demoFileId=t.demoFileId);let r=await b(O,{input:e});i(`Exercise added: ${r.mybAddExercise.name}`),h$1(t,r.mybAddExercise);}catch(e){g(e);}});}function it(d){let n=d.command("sessions").description("Mybodyshield workout sessions");n.command("list").description("List workout sessions").option("--program <id>","Filter by program ID").option("--status <s>","SCHEDULED|IN_PROGRESS|COMPLETED|SKIPPED").option("--limit <n>","Page size",o,50).option("--offset <n>","Offset",o,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b(k,{programId:t.program,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});h$1(t,e.mybListSessions.items,{headers:["ID","Member","Status","Scheduled","Started"],rows:e.mybListSessions.items.map(r=>[p(r.id,12),p(r.memberId,12),r.status,o$2(r.scheduledFor),o$2(r.startedAt)])});}catch(e){g(e);}}),n.command("get").description("Get a workout session by id").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await b(N,{id:t});if(!r.mybSession)throw new o$1(`Session ${t} not found`);h$1(e,r.mybSession);}catch(r){g(r);}}),n.command("start").description("Start a workout session").option("--program <id>","Program ID").option("--workout <id>","Workout ID").option("--scheduled-for <iso>","Scheduled time (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.program&&(e.programId=t.program),t.workout&&(e.workoutId=t.workout),t.scheduledFor&&(e.scheduledFor=t.scheduledFor),t.notes&&(e.notes=t.notes);let r=await b(P,{input:e});i(`Session started: ${p(r.mybStartSession.id,12)}`),h$1(t,r.mybStartSession);}catch(e){g(e);}}),n.command("log-set").description("Log a set within a session").requiredOption("--session <id>","Session ID").requiredOption("--exercise-name <name>","Exercise name").option("--set-number <n>","Set number",o).option("--reps <n>","Reps",o).option("--weight <n>","Weight",u).option("--distance-m <n>","Distance (meters)",u).option("--duration-sec <n>","Duration (seconds)",o).option("--personal-record","Mark as a personal record").option("-f, --format <format>","Output format").action(async t=>{try{let e={sessionId:t.session,exerciseName:t.exerciseName};t.setNumber!==void 0&&(e.setNumber=t.setNumber),t.reps!==void 0&&(e.reps=t.reps),t.weight!==void 0&&(e.weight=t.weight),t.distanceM!==void 0&&(e.distanceM=t.distanceM),t.durationSec!==void 0&&(e.durationSec=t.durationSec),t.personalRecord&&(e.isPersonalRecord=!0);let r=await b(L,{input:e});i(`Set logged for ${r.mybLogSet.exerciseName}`),h$1(t,r.mybLogSet);}catch(e){g(e);}}),n.command("complete").description("Complete a workout session").argument("<id>","Session ID").option("--calories-burned <n>","Calories burned",o).option("--perceived-exertion <n>","Perceived exertion (1-10)",o).option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r={};e.caloriesBurned!==void 0&&(r.caloriesBurned=e.caloriesBurned),e.perceivedExertion!==void 0&&(r.perceivedExertion=e.perceivedExertion),e.notes&&(r.notes=e.notes);let c=await b(G,{id:t,input:r});i("Session completed"),h$1(e,c.mybCompleteSession);}catch(r){g(r);}});}function at(d){let n=d.command("goals").description("Mybodyshield fitness goals");n.command("list").description("List fitness goals").option("--member <id>","Filter by member ID").option("--status <s>","ACTIVE|ACHIEVED|PAUSED|ABANDONED").option("--limit <n>","Page size",o,50).option("--offset <n>","Offset",o,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b(v,{memberId:t.member,status:t.status?t.status.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});h$1(t,e.mybListGoals.items,{headers:["ID","Title","Type","Status","Current","Target"],rows:e.mybListGoals.items.map(r=>[p(r.id,12),r.title,r.type,r.status,`${r.currentValue??0}${r.unit?` ${r.unit}`:""}`,`${r.targetValue??0}${r.unit?` ${r.unit}`:""}`])});}catch(e){g(e);}}),n.command("get").description("Get a goal by id").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await b($,{id:t});if(!r.mybGoal)throw new o$1(`Goal ${t} not found`);h$1(e,r.mybGoal);}catch(r){g(r);}}),n.command("create").description("Create a fitness goal").requiredOption("--title <t>","Goal title").option("--member <id>","Member ID").option("--type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--description <s>","Description").option("--target-value <n>","Target value",u).option("--baseline-value <n>","Baseline value",u).option("--unit <u>","Unit").option("--target-date <iso>","Target date (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title};t.member&&(e.memberId=t.member),t.type&&(e.type=t.type.toUpperCase()),t.description&&(e.description=t.description),t.targetValue!==void 0&&(e.targetValue=t.targetValue),t.baselineValue!==void 0&&(e.baselineValue=t.baselineValue),t.unit&&(e.unit=t.unit),t.targetDate&&(e.targetDate=t.targetDate);let r=await b(x,{input:e});i(`Goal created: ${r.mybCreateGoal.title}`),h$1(t,r.mybCreateGoal);}catch(e){g(e);}}),n.command("update").description("Update a fitness goal").argument("<id>","Goal ID").option("--title <t>","Goal title").option("--type <t>","Goal type").option("--description <s>","Description").option("--target-value <n>","Target value",u).option("--current-value <n>","Current value",u).option("--baseline-value <n>","Baseline value",u).option("--unit <u>","Unit").option("--target-date <iso>","Target date (ISO)").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r={};if(e.title&&(r.title=e.title),e.type&&(r.type=e.type.toUpperCase()),e.description!==void 0&&(r.description=e.description),e.targetValue!==void 0&&(r.targetValue=e.targetValue),e.currentValue!==void 0&&(r.currentValue=e.currentValue),e.baselineValue!==void 0&&(r.baselineValue=e.baselineValue),e.unit&&(r.unit=e.unit),e.targetDate&&(r.targetDate=e.targetDate),!Object.keys(r).length)throw new o$1("No updates specified");let c=await b(_,{id:t,input:r});i("Goal updated"),h$1(e,c.mybUpdateGoal);}catch(r){g(r);}}),n.command("achieve").description("Mark a goal as achieved").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await b(U,{id:t});i(`Goal achieved: ${r.mybAchieveGoal.title}`),h$1(e,r.mybAchieveGoal);}catch(r){g(r);}});}function st(d){let n=d.command("metrics").description("Mybodyshield body metrics");n.command("list").description("List body metrics").option("--member <id>","Filter by member ID").option("--type <t>","WEIGHT|BODY_FAT|CHEST|WAIST|HIPS|THIGH|ARM|RESTING_HEART_RATE").option("--limit <n>","Page size",o,50).option("--offset <n>","Offset",o,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b(W,{memberId:t.member,type:t.type?t.type.toUpperCase():void 0,pagination:{limit:t.limit,offset:t.offset}});h$1(t,e.mybListBodyMetrics.items,{headers:["ID","Type","Value","Unit","Measured"],rows:e.mybListBodyMetrics.items.map(r=>[p(r.id,12),r.type,String(r.value),r.unit,o$2(r.measuredAt)])});}catch(e){g(e);}}),n.command("record").description("Record a body metric").requiredOption("--type <t>","WEIGHT|BODY_FAT|CHEST|WAIST|HIPS|THIGH|ARM|RESTING_HEART_RATE").requiredOption("--value <n>","Measured value",u).option("--member <id>","Member ID").option("--unit <u>","Unit").option("--measured-at <iso>","Measured at (ISO)").option("--notes <s>","Notes").option("--photo-file-id <id>","Progress photo file ID").option("-f, --format <format>","Output format").action(async t=>{try{let e={type:t.type.toUpperCase(),value:t.value};t.member&&(e.memberId=t.member),t.unit&&(e.unit=t.unit),t.measuredAt&&(e.measuredAt=t.measuredAt),t.notes&&(e.notes=t.notes),t.photoFileId&&(e.photoFileId=t.photoFileId);let r=await b(H,{input:e});i(`Metric recorded: ${r.mybRecordBodyMetric.type}`),h$1(t,r.mybRecordBodyMetric);}catch(e){g(e);}});}function mt(d){let n=d.command("nutrition").description("Mybodyshield nutrition plans");n.command("get").description("Get a nutrition plan by id").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await b(V,{id:t});if(!r.mybNutritionPlan)throw new o$1(`Nutrition plan ${t} not found`);h$1(e,r.mybNutritionPlan);}catch(r){g(r);}}),n.command("active").description("Get a member's active nutrition plan").option("--member <id>","Member ID").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b(F,{memberId:t.member});if(!e.mybActiveNutritionPlan)throw new o$1("No active nutrition plan found");h$1(t,e.mybActiveNutritionPlan);}catch(e){g(e);}}),n.command("macros").description("Roll up a member's logged meals for a day against the active plan").option("--member <id>","Member ID").option("--date <iso>","Date (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b(B,{memberId:t.member,date:t.date});h$1(t,e.mybDailyMacros);}catch(e){g(e);}}),n.command("create").description("Create a nutrition plan").requiredOption("--name <name>","Plan name").option("--member <id>","Member ID").option("--coach <id>","Coach ID").option("--goal-type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--calorie-target <n>","Calorie target",o).option("--protein-target <n>","Protein target (g)",o).option("--carbs-target <n>","Carbs target (g)",o).option("--fat-target <n>","Fat target (g)",o).option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.member&&(e.memberId=t.member),t.coach&&(e.coachId=t.coach),t.goalType&&(e.goalType=t.goalType.toUpperCase()),t.calorieTarget!==void 0&&(e.calorieTarget=t.calorieTarget),t.proteinTarget!==void 0&&(e.proteinTarget=t.proteinTarget),t.carbsTarget!==void 0&&(e.carbsTarget=t.carbsTarget),t.fatTarget!==void 0&&(e.fatTarget=t.fatTarget),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate),t.notes&&(e.notes=t.notes);let r=await b(q,{input:e});i(`Nutrition plan created: ${r.mybCreateNutritionPlan.name}`),h$1(t,r.mybCreateNutritionPlan);}catch(e){g(e);}}),n.command("update").description("Update a nutrition plan").argument("<id>","Plan ID").option("--name <name>","Plan name").option("--goal-type <t>","Goal type").option("--calorie-target <n>","Calorie target",o).option("--protein-target <n>","Protein target (g)",o).option("--carbs-target <n>","Carbs target (g)",o).option("--fat-target <n>","Fat target (g)",o).option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r={};if(e.name&&(r.name=e.name),e.goalType&&(r.goalType=e.goalType.toUpperCase()),e.calorieTarget!==void 0&&(r.calorieTarget=e.calorieTarget),e.proteinTarget!==void 0&&(r.proteinTarget=e.proteinTarget),e.carbsTarget!==void 0&&(r.carbsTarget=e.carbsTarget),e.fatTarget!==void 0&&(r.fatTarget=e.fatTarget),e.startDate&&(r.startDate=e.startDate),e.endDate&&(r.endDate=e.endDate),e.notes!==void 0&&(r.notes=e.notes),!Object.keys(r).length)throw new o$1("No updates specified");let c=await b(Y,{id:t,input:r});i("Nutrition plan updated"),h$1(e,c.mybUpdateNutritionPlan);}catch(r){g(r);}}),n.command("activate").description("Activate a nutrition plan").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await b(K,{id:t});i(`Nutrition plan activated: ${r.mybActivateNutritionPlan.name}`),h$1(e,r.mybActivateNutritionPlan);}catch(r){g(r);}});}function dt(d){let n=d.command("meals").description("Mybodyshield meal logs");n.command("list").description("List logged meals").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Filter by nutrition plan ID").option("--limit <n>","Page size",o,50).option("--offset <n>","Offset",o,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await b(j,{mealType:t.mealType?t.mealType.toUpperCase():void 0,planId:t.plan,pagination:{limit:t.limit,offset:t.offset}});h$1(t,e.mybListMeals.items,{headers:["ID","Name","Meal","Calories","Protein"],rows:e.mybListMeals.items.map(r=>[p(r.id,12),r.name,r.mealType,String(r.calories??0),`${r.proteinG??0}g`])});}catch(e){g(e);}}),n.command("log").description("Log a meal").requiredOption("--name <name>","Meal name").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Nutrition plan ID").option("--calories <n>","Calories",o).option("--protein-g <n>","Protein (g)",o).option("--carbs-g <n>","Carbs (g)",o).option("--fat-g <n>","Fat (g)",o).option("--servings <n>","Servings",u).option("--favorite","Mark as favorite").option("--logged-at <iso>","Logged at (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.mealType&&(e.mealType=t.mealType.toUpperCase()),t.plan&&(e.planId=t.plan),t.calories!==void 0&&(e.calories=t.calories),t.proteinG!==void 0&&(e.proteinG=t.proteinG),t.carbsG!==void 0&&(e.carbsG=t.carbsG),t.fatG!==void 0&&(e.fatG=t.fatG),t.servings!==void 0&&(e.servings=t.servings),t.favorite&&(e.isFavorite=!0),t.loggedAt&&(e.loggedAt=t.loggedAt);let r=await b(z,{input:e});i(`Meal logged: ${r.mybLogMeal.name}`),h$1(t,r.mybLogMeal);}catch(e){g(e);}}),n.command("delete").description("Delete a logged meal").argument("<id>","Meal log ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await b(J,{id:t});i(r.mybDeleteMeal?"Meal deleted":"Meal not deleted"),h$1(e,{deleted:r.mybDeleteMeal});}catch(r){g(r);}});}function pt(d){let n=d.command("recovery").description("Mybodyshield recovery logs");n.command("list").description("List recovery logs").option("--member <id>","Filter by member ID").option("--metric <m>","READINESS|SLEEP|SORENESS|STRESS|MOOD").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b(X,{memberId:t.member,metric:t.metric?t.metric.toUpperCase():void 0});h$1(t,e.mybListRecoveryLogs,{headers:["ID","Metric","Score","Sleep (h)","Logged"],rows:e.mybListRecoveryLogs.map(r=>[p(r.id,12),r.metric,String(r.score),r.sleepHours!=null?String(r.sleepHours):"-",o$2(r.loggedAt)])});}catch(e){g(e);}}),n.command("log").description("Log a recovery metric").option("--member <id>","Member ID").option("--metric <m>","READINESS|SLEEP|SORENESS|STRESS|MOOD").option("--score <n>","Score",o).option("--sleep-hours <n>","Sleep hours",u).option("--notes <s>","Notes").option("--logged-at <iso>","Logged at (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={};t.member&&(e.memberId=t.member),t.metric&&(e.metric=t.metric.toUpperCase()),t.score!==void 0&&(e.score=t.score),t.sleepHours!==void 0&&(e.sleepHours=t.sleepHours),t.notes&&(e.notes=t.notes),t.loggedAt&&(e.loggedAt=t.loggedAt);let r=await b(Q,{input:e});i(`Recovery logged: ${r.mybLogRecovery.metric}`),h$1(t,r.mybLogRecovery);}catch(e){g(e);}});}function ct(d){let n=d.command("coaching").description("Mybodyshield coaching relationships");n.command("list").description("List coaching relationships").option("--member <id>","Filter by member ID").option("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("-f, --format <format>","Output format").action(async t=>{try{let e=await b(Z,{memberId:t.member,status:t.status?t.status.toUpperCase():void 0});h$1(t,e.mybListCoaching,{headers:["ID","Coach","Member","Status","Specialty"],rows:e.mybListCoaching.map(r=>[p(r.id,12),p(r.coachId,12),p(r.memberId,12),r.status,r.specialty??"-"])});}catch(e){g(e);}}),n.command("create").description("Create a coaching relationship").requiredOption("--coach <id>","Coach ID").requiredOption("--member <id>","Member ID").option("--specialty <s>","Specialty").option("--share-workouts","Share workouts with the coach").option("--share-nutrition","Share nutrition with the coach").option("--share-metrics","Share body metrics with the coach").option("-f, --format <format>","Output format").action(async t=>{try{let e={coachId:t.coach,memberId:t.member};t.specialty&&(e.specialty=t.specialty),t.shareWorkouts&&(e.shareWorkouts=!0),t.shareNutrition&&(e.shareNutrition=!0),t.shareMetrics&&(e.shareMetrics=!0);let r=await b(tt,{input:e});i("Coaching relationship created"),h$1(t,r.mybCreateCoaching);}catch(e){g(e);}}),n.command("transition").description("Transition a coaching relationship status").argument("<id>","Coaching relationship ID").requiredOption("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await b(et,{id:t,status:e.status.toUpperCase()});i(`Coaching transitioned to ${r.mybTransitionCoaching.status}`),h$1(e,r.mybTransitionCoaching);}catch(r){g(r);}});}function ut(d$1){d$1.command("health").description("Mybodyshield service health check (public)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await d(rt);i(t.mybHealth),h$1(n,{health:t.mybHealth});}catch(t){g(t);}});}var gt={id:"mybodyshield",version:"1.0.0",displayName:"Mybodyshield",dependsOn:["auth","workspaces"],register(d,n){a(n);let t=d.command("mybodyshield").description("Mybodyshield fitness coaching platform");nt(t),ot(t),it(t),at(t),st(t),mt(t),dt(t),pt(t),ct(t),ut(t);}},ae=gt;export{ae as default};
291
+ `,de=`
292
+ query MybWorkoutExercises($workoutId: ID!, $pagination: PaginationInput) {
293
+ mybWorkoutExercises(workoutId: $workoutId, pagination: $pagination) {
294
+ items { id workoutId name muscleGroup sets reps restSeconds targetWeight orderIndex instructions createdAt updatedAt workspaceId }
295
+ pageInfo { cursor hasMore }
296
+ }
297
+ }
298
+ `,ce=`
299
+ query MybSessionSets($sessionId: ID!, $pagination: PaginationInput) {
300
+ mybSessionSets(sessionId: $sessionId, pagination: $pagination) {
301
+ items { id sessionId exerciseName setNumber reps weight distanceM durationSec isPersonalRecord createdAt updatedAt workspaceId }
302
+ pageInfo { cursor hasMore }
303
+ }
304
+ }
305
+ `,pe="query MybAiSettings { mybAiSettings { allowanceResetAt createdAt dailyAllowance dailyAllowanceUsed hasProviderKey id memberId modelName provider updatedAt workspaceId } }",ue="mutation MybUpdateAiSettings($input: MybUpdateAiSettingsInput!) { mybUpdateAiSettings(input: $input) { allowanceResetAt createdAt dailyAllowance dailyAllowanceUsed hasProviderKey id memberId modelName provider updatedAt workspaceId } }",ge="query MybListAiOperationLogs($pagination: PaginationInput) { mybListAiOperationLogs(pagination: $pagination) { items { createdAt errorMessage id inputTokens memberId modelName operationType outputTokens provider status workspaceId } pageInfo { cursor hasMore } } }",le="query MybTodayGuidance($memberId: ID) { mybTodayGuidance(memberId: $memberId) { aiSummary cards { action reason signal } date memberId readinessScore } }",ye="query MybInsights($dateRangeEnd: DateTime, $dateRangeStart: DateTime, $memberId: ID) { mybInsights(dateRangeEnd: $dateRangeEnd, dateRangeStart: $dateRangeStart, memberId: $memberId) { daily { calories carbsG date fatG proteinG readiness sessions sleepHours volumeKg weight } dateRangeEnd dateRangeStart goals { achievedAt baselineValue createdAt currentValue description id memberId status targetDate targetValue title type unit updatedAt workspaceId } summary { averageReadiness consistencyStreakDays macroAdherencePercent totalSessions totalVolumeKg } } }",fe="query MybExerciseBestSet($exerciseName: String!) { mybExerciseBestSet(exerciseName: $exerciseName) { createdAt distanceM durationSec exerciseName id isPersonalRecord reps sessionId setNumber updatedAt weight workspaceId } }",be="query MybSearchFoods($limit: Int, $query: String!) { mybSearchFoods(limit: $limit, query: $query) { barcode brand calories carbsG fatG imageUrl name proteinG servingG } }",Ie="query MybFoodByBarcode($barcode: String!) { mybFoodByBarcode(barcode: $barcode) { barcode brand calories carbsG fatG imageUrl name proteinG servingG } }",Ce="query MybListDeviceConnections($memberId: ID) { mybListDeviceConnections(memberId: $memberId) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }",Ae="mutation MybConnectDevice($input: MybConnectDeviceInput!) { mybConnectDevice(input: $input) { createdAt externalAccountId id lastSyncedAt memberId provider scopes status updatedAt workspaceId } }",Se="mutation MybDisconnectDevice($id: ID!) { mybDisconnectDevice(id: $id) }",he="mutation MybSyncDeviceReadings($connectionId: ID!, $readings: [MybSyncReadingInput!]!) { mybSyncDeviceReadings(connectionId: $connectionId, readings: $readings) { connectionId createdAt id metricType normalizedBodyMetricId normalizedRecoveryLogId recordedAt unit value } }",Te="query MybListLegalAcceptances($actorId: ID, $checkpointType: MybLegalCheckpointType, $pagination: PaginationInput) { mybListLegalAcceptances(actorId: $actorId, checkpointType: $checkpointType, pagination: $pagination) { items { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } pageInfo { cursor hasMore } } }",Ee="query MybMyLegalAcceptances($checkpointType: MybLegalCheckpointType, $pagination: PaginationInput) { mybMyLegalAcceptances(checkpointType: $checkpointType, pagination: $pagination) { items { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } pageInfo { cursor hasMore } } }",De="mutation MybRecordLegalAcceptance($input: MybRecordLegalAcceptanceInput!) { mybRecordLegalAcceptance(input: $input) { acceptedAt actorId actorType checkpointType createdAt documentVersion id ipAddress updatedAt userAgent workspaceId } }",we="query MybMyAiProcessingConsent { mybMyAiProcessingConsent { acceptedAt actorId createdAt enabled id updatedAt withdrawnAt workspaceId } }",Me="mutation MybSetAiProcessingConsent($enabled: Boolean!) { mybSetAiProcessingConsent(enabled: $enabled) { acceptedAt actorId createdAt enabled id updatedAt withdrawnAt workspaceId } }",Oe="mutation MybExportData($input: MybExportInput!) { mybExportData(input: $input) { createdAt entityTypes format id status } }";function g(m){return {async execWorkspace(o,i){if(!m.auth.isAuthenticated())throw new p(`Authentication required. Run \`${m.productName} auth login\`.`);return m.gql.workspace.request(o,i)},async execWorkspaceAuthOnly(o,i){return m.gql.workspaceAuthOnly.request(o,i)},formatAndOutput(o,i,d){m.output.formatAndOutput(o,i,d),m.output.getFormat(o)==="table"&&Ve(i)&&i.pageInfo.hasMore&&m.output.printInfo(`More results are available; continue with --cursor ${i.pageInfo.cursor??"(unavailable)"}.`);},handleCommandError(o$1){throw o$1 instanceof p?o$1:new o(o$1 instanceof Error?o$1.message:String(o$1))},printSuccess(o){m.output.printSuccess(o);},truncate(o,i){return m.output.truncate(o,i)},formatDate(o){return m.output.formatDate(o)}}}function Ve(m){if(typeof m!="object"||m===null||!("pageInfo"in m))return false;let o=m.pageInfo;return typeof o=="object"&&o!==null&&"hasMore"in o&&typeof o.hasMore=="boolean"&&"cursor"in o&&(typeof o.cursor=="string"||o.cursor===null)}function Re(m,o$1){try{return JSON.parse(o$1)}catch{throw new o(`--${m} must be valid JSON`)}}function s(m){let o$1=Number(m);if(!m.trim()||!Number.isSafeInteger(o$1))throw new o(`Expected an integer but got "${m}"`);return o$1}function y(m){let o$1=Number(m);if(!m.trim()||!Number.isFinite(o$1))throw new o(`Expected a number but got "${m}"`);return o$1}function D(m){return m.split(",").map(o=>o.trim()).filter(o=>o.length>0)}function ke(m,o$1){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p}=g(o$1),n=m.command("programs").description("Mybodyshield training programs");n.command("list").description("List training programs").option("--member <id>","Filter by member ID").option("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(M,{memberId:t.member,status:t.status?t.status.toUpperCase():void 0,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybListPrograms,{headers:["ID","Name","Goal","Level","Phase","Status"],rows:e.mybListPrograms.items.map(r=>[p(r.id,12),r.name,r.goalType,r.level,r.phase,r.status])});}catch(e){c(e);}}),n.command("get").description("Get a training program by id").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(O,{id:t});if(!r.mybProgram)throw new o(`Program ${t} not found`);d(e,r.mybProgram);}catch(r){c(r);}}),n.command("workouts").description("List workouts for a program").argument("<programId>","Program ID").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(R,{programId:t,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,r.mybProgramWorkouts,{headers:["ID","Name","Type","Day","Week","Duration"],rows:r.mybProgramWorkouts.items.map(a=>[p(a.id,12),a.name,a.type,a.dayOfWeek!=null?String(a.dayOfWeek):"-",a.weekNumber!=null?String(a.weekNumber):"-",a.durationMin!=null?String(a.durationMin):"-"])});}catch(r){c(r);}}),n.command("create").description("Create a training program").requiredOption("--name <name>","Program name").option("--member <id>","Member ID").option("--coach <id>","Coach ID").option("--description <s>","Description").option("--goal-type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--level <l>","BEGINNER|INTERMEDIATE|ADVANCED|ELITE").option("--phase <p>","BUILD|PEAK|DELOAD|MAINTENANCE").option("--weeks <n>","Number of weeks",s).option("--days-per-week <n>","Days per week",s).option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.member&&(e.memberId=t.member),t.coach&&(e.coachId=t.coach),t.description&&(e.description=t.description),t.goalType&&(e.goalType=t.goalType.toUpperCase()),t.level&&(e.level=t.level.toUpperCase()),t.phase&&(e.phase=t.phase.toUpperCase()),t.weeks!==void 0&&(e.weeks=t.weeks),t.daysPerWeek!==void 0&&(e.daysPerWeek=t.daysPerWeek),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate),t.tags&&(e.tags=D(t.tags));let r=await i(k,{input:e});u(`Program created: ${r.mybCreateProgram.name}`),d(t,r.mybCreateProgram);}catch(e){c(e);}}),n.command("update").description("Update a training program").argument("<id>","Program ID").option("--name <name>","Program name").option("--description <s>","Description").option("--goal-type <t>","Goal type").option("--level <l>","Fitness level").option("--phase <p>","Program phase").option("--weeks <n>","Number of weeks",s).option("--days-per-week <n>","Days per week",s).option("--coach <id>","Coach ID").option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--tags <csv>","Comma-separated tags").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r={};if(e.name&&(r.name=e.name),e.description!==void 0&&(r.description=e.description),e.goalType&&(r.goalType=e.goalType.toUpperCase()),e.level&&(r.level=e.level.toUpperCase()),e.phase&&(r.phase=e.phase.toUpperCase()),e.weeks!==void 0&&(r.weeks=e.weeks),e.daysPerWeek!==void 0&&(r.daysPerWeek=e.daysPerWeek),e.coach&&(r.coachId=e.coach),e.startDate&&(r.startDate=e.startDate),e.endDate&&(r.endDate=e.endDate),e.tags&&(r.tags=D(e.tags)),!Object.keys(r).length)throw new o("No updates specified");let a=await i(N,{id:t,input:r});u("Program updated"),d(e,a.mybUpdateProgram);}catch(r){c(r);}}),n.command("transition").description("Advance a program through its lifecycle").argument("<id>","Program ID").requiredOption("--status <s>","DRAFT|ACTIVE|COMPLETED|ARCHIVED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(L,{id:t,status:e.status.toUpperCase()});u(`Program transitioned to ${r.mybTransitionProgram.status}`),d(e,r.mybTransitionProgram);}catch(r){c(r);}}),n.command("archive").description("Archive a training program").argument("<id>","Program ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(P,{id:t});u(r.mybArchiveProgram?"Program archived":"Program not archived"),d(e,{archived:r.mybArchiveProgram});}catch(r){c(r);}});}function Ne(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u}=g(o),p=m.command("workouts").description("Mybodyshield workouts & exercises");p.command("exercises").description("List exercises with continuation metadata").argument("<workoutId>","workoutId").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await i(de,{workoutId:n,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybWorkoutExercises);}catch(e){c(e);}}),p.command("add").description("Add a workout to a program").requiredOption("--program <id>","Program ID").requiredOption("--name <name>","Workout name").option("--description <s>","Description").option("--type <t>","STRENGTH|CARDIO|HIIT|MOBILITY|RECOVERY|YOGA").option("--day-of-week <n>","Day of week (0-6)",s).option("--week-number <n>","Week number",s).option("--duration-min <n>","Duration (minutes)",s).option("--order-index <n>","Order index",s).option("-f, --format <format>","Output format").action(async n=>{try{let t={programId:n.program,name:n.name};n.description&&(t.description=n.description),n.type&&(t.type=n.type.toUpperCase()),n.dayOfWeek!==void 0&&(t.dayOfWeek=n.dayOfWeek),n.weekNumber!==void 0&&(t.weekNumber=n.weekNumber),n.durationMin!==void 0&&(t.durationMin=n.durationMin),n.orderIndex!==void 0&&(t.orderIndex=n.orderIndex);let e=await i(v,{input:t});u(`Workout added: ${e.mybAddWorkout.name}`),d(n,e.mybAddWorkout);}catch(t){c(t);}}),p.command("add-exercise").description("Add an exercise to a workout").requiredOption("--workout <id>","Workout ID").requiredOption("--name <name>","Exercise name").option("--muscle-group <g>","CHEST|BACK|LEGS|SHOULDERS|ARMS|CORE|FULL_BODY").option("--sets <n>","Sets",s).option("--reps <n>","Reps",s).option("--rest-seconds <n>","Rest (seconds)",s).option("--target-weight <n>","Target weight",y).option("--order-index <n>","Order index",s).option("--instructions <s>","Instructions").option("--demo-file-id <id>","Demo file ID").option("-f, --format <format>","Output format").action(async n=>{try{let t={workoutId:n.workout,name:n.name};n.muscleGroup&&(t.muscleGroup=n.muscleGroup.toUpperCase()),n.sets!==void 0&&(t.sets=n.sets),n.reps!==void 0&&(t.reps=n.reps),n.restSeconds!==void 0&&(t.restSeconds=n.restSeconds),n.targetWeight!==void 0&&(t.targetWeight=n.targetWeight),n.orderIndex!==void 0&&(t.orderIndex=n.orderIndex),n.instructions&&(t.instructions=n.instructions),n.demoFileId&&(t.demoFileId=n.demoFileId);let e=await i($,{input:t});u(`Exercise added: ${e.mybAddExercise.name}`),d(n,e.mybAddExercise);}catch(t){c(t);}});}function Le(m,o$1){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p,formatDate:n}=g(o$1),t=m.command("sessions").description("Mybodyshield workout sessions");t.command("sets").description("List sets with continuation metadata").argument("<sessionId>","sessionId").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async(e,r)=>{try{let a=await i(ce,{sessionId:e,pagination:{cursor:r.cursor,limit:r.limit,offset:r.offset}});d(r,a.mybSessionSets);}catch(a){c(a);}}),t.command("list").description("List workout sessions").option("--program <id>","Filter by program ID").option("--status <s>","SCHEDULED|IN_PROGRESS|COMPLETED|SKIPPED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async e=>{try{let r=await i(G,{programId:e.program,status:e.status?e.status.toUpperCase():void 0,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,r.mybListSessions,{headers:["ID","Member","Status","Scheduled","Started"],rows:r.mybListSessions.items.map(a=>[p(a.id,12),p(a.memberId,12),a.status,n(a.scheduledFor),n(a.startedAt)])});}catch(r){c(r);}}),t.command("get").description("Get a workout session by id").argument("<id>","Session ID").option("-f, --format <format>","Output format").action(async(e,r)=>{try{let a=await i(x,{id:e});if(!a.mybSession)throw new o(`Session ${e} not found`);d(r,a.mybSession);}catch(a){c(a);}}),t.command("start").description("Start a workout session").option("--program <id>","Program ID").option("--workout <id>","Workout ID").option("--scheduled-for <iso>","Scheduled time (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async e=>{try{let r={};e.program&&(r.programId=e.program),e.workout&&(r.workoutId=e.workout),e.scheduledFor&&(r.scheduledFor=e.scheduledFor),e.notes&&(r.notes=e.notes);let a=await i(_,{input:r});u(`Session started: ${p(a.mybStartSession.id,12)}`),d(e,a.mybStartSession);}catch(r){c(r);}}),t.command("log-set").description("Log a set within a session").requiredOption("--session <id>","Session ID").requiredOption("--exercise-name <name>","Exercise name").option("--set-number <n>","Set number",s).option("--reps <n>","Reps",s).option("--weight <n>","Weight",y).option("--distance-m <n>","Distance (meters)",y).option("--duration-sec <n>","Duration (seconds)",s).option("--personal-record","Mark as a personal record").option("-f, --format <format>","Output format").action(async e=>{try{let r={sessionId:e.session,exerciseName:e.exerciseName};e.setNumber!==void 0&&(r.setNumber=e.setNumber),e.reps!==void 0&&(r.reps=e.reps),e.weight!==void 0&&(r.weight=e.weight),e.distanceM!==void 0&&(r.distanceM=e.distanceM),e.durationSec!==void 0&&(r.durationSec=e.durationSec),e.personalRecord&&(r.isPersonalRecord=!0);let a=await i(U,{input:r});u(`Set logged for ${a.mybLogSet.exerciseName}`),d(e,a.mybLogSet);}catch(r){c(r);}}),t.command("complete").description("Complete a workout session").argument("<id>","Session ID").option("--calories-burned <n>","Calories burned",s).option("--perceived-exertion <n>","Perceived exertion (1-10)",s).option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(e,r)=>{try{let a={};r.caloriesBurned!==void 0&&(a.caloriesBurned=r.caloriesBurned),r.perceivedExertion!==void 0&&(a.perceivedExertion=r.perceivedExertion),r.notes&&(a.notes=r.notes);let h=await i(W,{id:e,input:a});u("Session completed"),d(r,h.mybCompleteSession);}catch(a){c(a);}});}function Pe(m,o$1){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p}=g(o$1),n=m.command("goals").description("Mybodyshield fitness goals");n.command("list").description("List fitness goals").option("--member <id>","Filter by member ID").option("--status <s>","ACTIVE|ACHIEVED|PAUSED|ABANDONED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(V,{memberId:t.member,status:t.status?t.status.toUpperCase():void 0,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybListGoals,{headers:["ID","Title","Type","Status","Current","Target"],rows:e.mybListGoals.items.map(r=>[p(r.id,12),r.title,r.type,r.status,`${r.currentValue??0}${r.unit?` ${r.unit}`:""}`,`${r.targetValue??0}${r.unit?` ${r.unit}`:""}`])});}catch(e){c(e);}}),n.command("get").description("Get a goal by id").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(H,{id:t});if(!r.mybGoal)throw new o(`Goal ${t} not found`);d(e,r.mybGoal);}catch(r){c(r);}}),n.command("create").description("Create a fitness goal").requiredOption("--title <t>","Goal title").option("--member <id>","Member ID").option("--type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--description <s>","Description").option("--target-value <n>","Target value",y).option("--baseline-value <n>","Baseline value",y).option("--unit <u>","Unit").option("--target-date <iso>","Target date (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={title:t.title};t.member&&(e.memberId=t.member),t.type&&(e.type=t.type.toUpperCase()),t.description&&(e.description=t.description),t.targetValue!==void 0&&(e.targetValue=t.targetValue),t.baselineValue!==void 0&&(e.baselineValue=t.baselineValue),t.unit&&(e.unit=t.unit),t.targetDate&&(e.targetDate=t.targetDate);let r=await i(F,{input:e});u(`Goal created: ${r.mybCreateGoal.title}`),d(t,r.mybCreateGoal);}catch(e){c(e);}}),n.command("update").description("Update a fitness goal").argument("<id>","Goal ID").option("--title <t>","Goal title").option("--type <t>","Goal type").option("--description <s>","Description").option("--target-value <n>","Target value",y).option("--current-value <n>","Current value",y).option("--baseline-value <n>","Baseline value",y).option("--unit <u>","Unit").option("--target-date <iso>","Target date (ISO)").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r={};if(e.title&&(r.title=e.title),e.type&&(r.type=e.type.toUpperCase()),e.description!==void 0&&(r.description=e.description),e.targetValue!==void 0&&(r.targetValue=e.targetValue),e.currentValue!==void 0&&(r.currentValue=e.currentValue),e.baselineValue!==void 0&&(r.baselineValue=e.baselineValue),e.unit&&(r.unit=e.unit),e.targetDate&&(r.targetDate=e.targetDate),!Object.keys(r).length)throw new o("No updates specified");let a=await i(B,{id:t,input:r});u("Goal updated"),d(e,a.mybUpdateGoal);}catch(r){c(r);}}),n.command("achieve").description("Mark a goal as achieved").argument("<id>","Goal ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(q,{id:t});u(`Goal achieved: ${r.mybAchieveGoal.title}`),d(e,r.mybAchieveGoal);}catch(r){c(r);}});}function ve(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p,formatDate:n}=g(o),t=m.command("metrics").description("Mybodyshield body metrics");t.command("list").description("List body metrics").option("--member <id>","Filter by member ID").option("--type <t>","WEIGHT|BODY_FAT|CHEST|WAIST|HIPS|THIGH|ARM|RESTING_HEART_RATE").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async e=>{try{let r=await i(Y,{memberId:e.member,type:e.type?e.type.toUpperCase():void 0,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset}});d(e,r.mybListBodyMetrics,{headers:["ID","Type","Value","Unit","Measured"],rows:r.mybListBodyMetrics.items.map(a=>[p(a.id,12),a.type,String(a.value),a.unit,n(a.measuredAt)])});}catch(r){c(r);}}),t.command("record").description("Record a body metric").requiredOption("--type <t>","WEIGHT|BODY_FAT|CHEST|WAIST|HIPS|THIGH|ARM|RESTING_HEART_RATE").requiredOption("--value <n>","Measured value",y).option("--member <id>","Member ID").option("--unit <u>","Unit").option("--measured-at <iso>","Measured at (ISO)").option("--notes <s>","Notes").option("--photo-file-id <id>","Progress photo file ID").option("-f, --format <format>","Output format").action(async e=>{try{let r={type:e.type.toUpperCase(),value:e.value};e.member&&(r.memberId=e.member),e.unit&&(r.unit=e.unit),e.measuredAt&&(r.measuredAt=e.measuredAt),e.notes&&(r.notes=e.notes),e.photoFileId&&(r.photoFileId=e.photoFileId);let a=await i(j,{input:r});u(`Metric recorded: ${a.mybRecordBodyMetric.type}`),d(e,a.mybRecordBodyMetric);}catch(r){c(r);}});}function $e(m,o$1){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u}=g(o$1),p=m.command("nutrition").description("Mybodyshield nutrition plans");p.command("get").description("Get a nutrition plan by id").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await i(K,{id:n});if(!e.mybNutritionPlan)throw new o(`Nutrition plan ${n} not found`);d(t,e.mybNutritionPlan);}catch(e){c(e);}}),p.command("active").description("Get a member's active nutrition plan").option("--member <id>","Member ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await i(z,{memberId:n.member});if(!t.mybActiveNutritionPlan)throw new o("No active nutrition plan found");d(n,t.mybActiveNutritionPlan);}catch(t){c(t);}}),p.command("macros").description("Roll up a member's logged meals for a day against the active plan").option("--member <id>","Member ID").option("--date <iso>","Date (ISO)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await i(X,{memberId:n.member,date:n.date});d(n,t.mybDailyMacros);}catch(t){c(t);}}),p.command("create").description("Create a nutrition plan").requiredOption("--name <name>","Plan name").option("--member <id>","Member ID").option("--coach <id>","Coach ID").option("--goal-type <t>","WEIGHT_LOSS|MUSCLE_GAIN|STRENGTH|ENDURANCE|MOBILITY|GENERAL_FITNESS").option("--calorie-target <n>","Calorie target",s).option("--protein-target <n>","Protein target (g)",s).option("--carbs-target <n>","Carbs target (g)",s).option("--fat-target <n>","Fat target (g)",s).option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async n=>{try{let t={name:n.name};n.member&&(t.memberId=n.member),n.coach&&(t.coachId=n.coach),n.goalType&&(t.goalType=n.goalType.toUpperCase()),n.calorieTarget!==void 0&&(t.calorieTarget=n.calorieTarget),n.proteinTarget!==void 0&&(t.proteinTarget=n.proteinTarget),n.carbsTarget!==void 0&&(t.carbsTarget=n.carbsTarget),n.fatTarget!==void 0&&(t.fatTarget=n.fatTarget),n.startDate&&(t.startDate=n.startDate),n.endDate&&(t.endDate=n.endDate),n.notes&&(t.notes=n.notes);let e=await i(J,{input:t});u(`Nutrition plan created: ${e.mybCreateNutritionPlan.name}`),d(n,e.mybCreateNutritionPlan);}catch(t){c(t);}}),p.command("update").description("Update a nutrition plan").argument("<id>","Plan ID").option("--name <name>","Plan name").option("--goal-type <t>","Goal type").option("--calorie-target <n>","Calorie target",s).option("--protein-target <n>","Protein target (g)",s).option("--carbs-target <n>","Carbs target (g)",s).option("--fat-target <n>","Fat target (g)",s).option("--start-date <iso>","Start date (ISO)").option("--end-date <iso>","End date (ISO)").option("--notes <s>","Notes").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={};if(t.name&&(e.name=t.name),t.goalType&&(e.goalType=t.goalType.toUpperCase()),t.calorieTarget!==void 0&&(e.calorieTarget=t.calorieTarget),t.proteinTarget!==void 0&&(e.proteinTarget=t.proteinTarget),t.carbsTarget!==void 0&&(e.carbsTarget=t.carbsTarget),t.fatTarget!==void 0&&(e.fatTarget=t.fatTarget),t.startDate&&(e.startDate=t.startDate),t.endDate&&(e.endDate=t.endDate),t.notes!==void 0&&(e.notes=t.notes),!Object.keys(e).length)throw new o("No updates specified");let r=await i(Z,{id:n,input:e});u("Nutrition plan updated"),d(t,r.mybUpdateNutritionPlan);}catch(e){c(e);}}),p.command("activate").description("Activate a nutrition plan").argument("<id>","Plan ID").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await i(Q,{id:n});u(`Nutrition plan activated: ${e.mybActivateNutritionPlan.name}`),d(t,e.mybActivateNutritionPlan);}catch(e){c(e);}});}function Ge(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p}=g(o),n=m.command("meals").description("Mybodyshield meal logs");n.command("list").description("List logged meals").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Filter by nutrition plan ID").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(ee,{mealType:t.mealType?t.mealType.toUpperCase():void 0,planId:t.plan,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset}});d(t,e.mybListMeals,{headers:["ID","Name","Meal","Calories","Protein"],rows:e.mybListMeals.items.map(r=>[p(r.id,12),r.name,r.mealType,String(r.calories??0),`${r.proteinG??0}g`])});}catch(e){c(e);}}),n.command("log").description("Log a meal").requiredOption("--name <name>","Meal name").option("--meal-type <t>","BREAKFAST|LUNCH|DINNER|SNACK").option("--plan <id>","Nutrition plan ID").option("--calories <n>","Calories",s).option("--protein-g <n>","Protein (g)",s).option("--carbs-g <n>","Carbs (g)",s).option("--fat-g <n>","Fat (g)",s).option("--servings <n>","Servings",y).option("--favorite","Mark as favorite").option("--logged-at <iso>","Logged at (ISO)").option("-f, --format <format>","Output format").action(async t=>{try{let e={name:t.name};t.mealType&&(e.mealType=t.mealType.toUpperCase()),t.plan&&(e.planId=t.plan),t.calories!==void 0&&(e.calories=t.calories),t.proteinG!==void 0&&(e.proteinG=t.proteinG),t.carbsG!==void 0&&(e.carbsG=t.carbsG),t.fatG!==void 0&&(e.fatG=t.fatG),t.servings!==void 0&&(e.servings=t.servings),t.favorite&&(e.isFavorite=!0),t.loggedAt&&(e.loggedAt=t.loggedAt);let r=await i(te,{input:e});u(`Meal logged: ${r.mybLogMeal.name}`),d(t,r.mybLogMeal);}catch(e){c(e);}}),n.command("delete").description("Delete a logged meal").argument("<id>","Meal log ID").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(re,{id:t});u(r.mybDeleteMeal?"Meal deleted":"Meal not deleted"),d(e,{deleted:r.mybDeleteMeal});}catch(r){c(r);}});}function xe(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p,formatDate:n}=g(o),t=m.command("recovery").description("Mybodyshield recovery logs");t.command("list").description("List recovery logs").option("--member <id>","Filter by member ID").option("--metric <m>","READINESS|SLEEP|SORENESS|STRESS|MOOD").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async e=>{try{let r=await i(ne,{memberId:e.member,pagination:{cursor:e.cursor,limit:e.limit,offset:e.offset},metric:e.metric?e.metric.toUpperCase():void 0});d(e,r.mybListRecoveryLogs,{headers:["ID","Metric","Score","Sleep (h)","Logged"],rows:r.mybListRecoveryLogs.items.map(a=>[p(a.id,12),a.metric,String(a.score),a.sleepHours!=null?String(a.sleepHours):"-",n(a.loggedAt)])});}catch(r){c(r);}}),t.command("log").description("Log a recovery metric").option("--member <id>","Member ID").option("--metric <m>","READINESS|SLEEP|SORENESS|STRESS|MOOD").option("--score <n>","Score",s).option("--sleep-hours <n>","Sleep hours",y).option("--notes <s>","Notes").option("--logged-at <iso>","Logged at (ISO)").option("-f, --format <format>","Output format").action(async e=>{try{let r={};e.member&&(r.memberId=e.member),e.metric&&(r.metric=e.metric.toUpperCase()),e.score!==void 0&&(r.score=e.score),e.sleepHours!==void 0&&(r.sleepHours=e.sleepHours),e.notes&&(r.notes=e.notes),e.loggedAt&&(r.loggedAt=e.loggedAt);let a=await i(oe,{input:r});u(`Recovery logged: ${a.mybLogRecovery.metric}`),d(e,a.mybLogRecovery);}catch(r){c(r);}});}function _e(m,o){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c,printSuccess:u,truncate:p}=g(o),n=m.command("coaching").description("Mybodyshield coaching relationships");n.command("list").description("List coaching relationships").option("--member <id>","Filter by member ID").option("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("--cursor <cursor>","Continuation cursor").option("--limit <n>","Page size",s,50).option("--offset <n>","Offset",s,0).option("-f, --format <format>","Output format").action(async t=>{try{let e=await i(ie,{memberId:t.member,pagination:{cursor:t.cursor,limit:t.limit,offset:t.offset},status:t.status?t.status.toUpperCase():void 0});d(t,e.mybListCoaching,{headers:["ID","Coach","Member","Status","Specialty"],rows:e.mybListCoaching.items.map(r=>[p(r.id,12),p(r.coachId,12),p(r.memberId,12),r.status,r.specialty??"-"])});}catch(e){c(e);}}),n.command("create").description("Create a coaching relationship").requiredOption("--coach <id>","Coach ID").requiredOption("--member <id>","Member ID").option("--specialty <s>","Specialty").option("--share-workouts","Share workouts with the coach").option("--share-nutrition","Share nutrition with the coach").option("--share-metrics","Share body metrics with the coach").option("-f, --format <format>","Output format").action(async t=>{try{let e={coachId:t.coach,memberId:t.member};t.specialty&&(e.specialty=t.specialty),t.shareWorkouts&&(e.shareWorkouts=!0),t.shareNutrition&&(e.shareNutrition=!0),t.shareMetrics&&(e.shareMetrics=!0);let r=await i(ae,{input:e});u("Coaching relationship created"),d(t,r.mybCreateCoaching);}catch(e){c(e);}}),n.command("transition").description("Transition a coaching relationship status").argument("<id>","Coaching relationship ID").requiredOption("--status <s>","PENDING|ACTIVE|PAUSED|ENDED").option("-f, --format <format>","Output format").action(async(t,e)=>{try{let r=await i(se,{id:t,status:e.status.toUpperCase()});u(`Coaching transitioned to ${r.mybTransitionCoaching.status}`),d(e,r.mybTransitionCoaching);}catch(r){c(r);}});}function Ue(m,o){let{execWorkspaceAuthOnly:i,formatAndOutput:d,handleCommandError:c,printSuccess:u}=g(o);m.command("health").description("Mybodyshield service health check (public)").option("-f, --format <format>","Output format").action(async p=>{try{let n=await i(me);u(n.mybHealth),d(p,{health:n.mybHealth});}catch(n){c(n);}});}var Fe=[{group:"ai",command:"settings",document:pe,field:"mybAiSettings",variables:[]},{group:"ai",command:"update-settings",document:ue,field:"mybUpdateAiSettings",variables:[{name:"input",type:"MybUpdateAiSettingsInput!"}]},{group:"ai",command:"operation-logs",document:ge,field:"mybListAiOperationLogs",variables:[{name:"pagination",type:"PaginationInput"}]},{group:"wellbeing",command:"guidance",document:le,field:"mybTodayGuidance",variables:[{name:"memberId",type:"ID"}]},{group:"wellbeing",command:"insights",document:ye,field:"mybInsights",variables:[{name:"dateRangeEnd",type:"DateTime"},{name:"dateRangeStart",type:"DateTime"},{name:"memberId",type:"ID"}]},{group:"performance",command:"best-set",document:fe,field:"mybExerciseBestSet",variables:[{name:"exerciseName",type:"String!"}]},{group:"foods",command:"search",document:be,field:"mybSearchFoods",variables:[{name:"limit",type:"Int"},{name:"query",type:"String!"}]},{group:"foods",command:"barcode",document:Ie,field:"mybFoodByBarcode",variables:[{name:"barcode",type:"String!"}]},{group:"devices",command:"list",document:Ce,field:"mybListDeviceConnections",variables:[{name:"memberId",type:"ID"}]},{group:"devices",command:"connect",document:Ae,field:"mybConnectDevice",variables:[{name:"input",type:"MybConnectDeviceInput!"}]},{group:"devices",command:"disconnect",document:Se,field:"mybDisconnectDevice",variables:[{name:"id",type:"ID!"}]},{group:"devices",command:"sync",document:he,field:"mybSyncDeviceReadings",variables:[{name:"connectionId",type:"ID!"},{name:"readings",type:"[MybSyncReadingInput!]!"}]},{group:"legal",command:"list",document:Te,field:"mybListLegalAcceptances",variables:[{name:"actorId",type:"ID"},{name:"checkpointType",type:"MybLegalCheckpointType"},{name:"pagination",type:"PaginationInput"}]},{group:"legal",command:"mine",document:Ee,field:"mybMyLegalAcceptances",variables:[{name:"checkpointType",type:"MybLegalCheckpointType"},{name:"pagination",type:"PaginationInput"}]},{group:"legal",command:"record",document:De,field:"mybRecordLegalAcceptance",variables:[{name:"input",type:"MybRecordLegalAcceptanceInput!"}]},{group:"privacy",command:"consent",document:we,field:"mybMyAiProcessingConsent",variables:[]},{group:"privacy",command:"set-consent",document:Me,field:"mybSetAiProcessingConsent",variables:[{name:"enabled",type:"Boolean!"}]},{group:"privacy",command:"export",document:Oe,field:"mybExportData",variables:[{name:"input",type:"MybExportInput!"}]}],T=m=>m.replace(/[A-Z]/g,o=>"-"+o.toLowerCase());function We(m,o$1){let{execWorkspace:i,formatAndOutput:d,handleCommandError:c}=g(o$1),u=new Map;for(let p of Fe){let n=u.get(p.group);n||(n=m.command(p.group).description("MyBodyShield "+p.group),u.set(p.group,n));let t=n.command(p.command).description("Call "+p.field+" through the workspace gateway");for(let e of p.variables){let r=T(e.name),h=e.type.replace(/[![\]]/g,"").endsWith("Input"),f="--"+r+(h?"-file":"")+" <value>",S=h?e.type+" JSON file; keep secret-bearing files private":e.type;e.type.endsWith("!")?t.requiredOption(f,S):t.option(f,S);}t.option("-f, --format <format>","Output format").action(async e=>{try{let r={};for(let f of p.variables){let S=f.type.replace(/[![\]]/g,""),w=S.endsWith("Input"),A=e[f.name+(w?"File":"")];if(A!==void 0){if(typeof A!="string")throw new o("Invalid option "+T(f.name));if(w)r[f.name]=Re(T(f.name),readFileSync(A,"utf8"));else if(S==="Int")r[f.name]=s(A);else if(S==="Float")r[f.name]=y(A);else if(S==="Boolean"){if(A!=="true"&&A!=="false")throw new o("--"+T(f.name)+" must be true or false");r[f.name]=A==="true";}else r[f.name]=A;}}let a=await i(p.document,r),h=typeof e.format=="string"?e.format:void 0;d({format:h},a[p.field]);}catch(r){c(r);}});}}var Be={id:"mybodyshield",version:"1.0.0",displayName:"Mybodyshield",dependsOn:["auth","workspaces"],register(m,o){let i=m.command("mybodyshield").description("Mybodyshield fitness coaching platform");ke(i,o),Ne(i,o),Le(i,o),Pe(i,o),ve(i,o),$e(i,o),Ge(i,o),xe(i,o),_e(i,o),Ue(i,o),We(i,o);}},Wt=Be;export{Wt as default};
@@ -1,4 +1,4 @@
1
- import {a,c,h as h$1,p,n,o,g,i,s}from'../../chunk-SQSFZFQZ.js';import'../../chunk-UAFYTYK6.js';var h=`
1
+ import {a,c,h as h$1,p,n,o,g,i,s}from'../../chunk-W4JZR7RJ.js';import'../../chunk-YIY5IDXQ.js';var h=`
2
2
  query ListNotifications($filter: NotificationFilterInput, $limit: Int, $offset: Int) {
3
3
  notifications(filter: $filter, limit: $limit, offset: $offset) {
4
4
  items { id title message channel status isRead createdAt }
@@ -1,4 +1,4 @@
1
- import {a,c,h,p,n,o,g,i}from'../../chunk-SQSFZFQZ.js';import'../../chunk-UAFYTYK6.js';var f=`
1
+ import {a,c,h,p,n,o,g,i}from'../../chunk-W4JZR7RJ.js';import'../../chunk-YIY5IDXQ.js';var f=`
2
2
  query MyOrganizations($limit: Int, $offset: Int) {
3
3
  myOrganizations(limit: $limit, offset: $offset) {
4
4
  items {
@@ -1,4 +1,4 @@
1
- import {a,b as b$1,h as h$1,g as g$1,i,t,p}from'../../chunk-SQSFZFQZ.js';import {o}from'../../chunk-UAFYTYK6.js';var I="pageInfo { hasNextPage endCursor } totalCount",S=`
1
+ import {a,b as b$1,h as h$1,g as g$1,i,t,p}from'../../chunk-W4JZR7RJ.js';import {o}from'../../chunk-YIY5IDXQ.js';var I="pageInfo { hasNextPage endCursor } totalCount",S=`
2
2
  id key name description status methodology ownerId programId
3
3
  startDate endDate tags createdAt updatedAt workspaceId
4
4
  `,X=`
@@ -1,4 +1,4 @@
1
- import {a,c,h as h$1,p,n,g,i}from'../../chunk-SQSFZFQZ.js';import {o}from'../../chunk-UAFYTYK6.js';var b=`
1
+ import {a,c,h as h$1,p,n,g,i}from'../../chunk-W4JZR7RJ.js';import {o}from'../../chunk-YIY5IDXQ.js';var b=`
2
2
  query ListProducts($filter: PlatformProductFilterInput, $limit: Int, $offset: Int) {
3
3
  platformProducts(filter: $filter, limit: $limit, offset: $offset) {
4
4
  items { id name slug status logoUrl appUrl }
@@ -1,4 +1,4 @@
1
- import {a,b as b$1,h as h$1,p,g,i,o as o$1,d}from'../../chunk-SQSFZFQZ.js';import {o}from'../../chunk-UAFYTYK6.js';var P=`
1
+ import {a,b as b$1,h as h$1,p,g,i,o as o$1,d}from'../../chunk-W4JZR7RJ.js';import {o}from'../../chunk-YIY5IDXQ.js';var P=`
2
2
  query PswClient($id: ID!) {
3
3
  pswClient(id: $id) {
4
4
  id name type status industry contactName contactEmail contactPhone
@@ -1,4 +1,4 @@
1
- import {a,h as h$1,p,g,i,n,s,b,c}from'../../chunk-SQSFZFQZ.js';import {o}from'../../chunk-UAFYTYK6.js';var h=`
1
+ import {a,h as h$1,p,g,i,n,s,b,c}from'../../chunk-W4JZR7RJ.js';import {o}from'../../chunk-YIY5IDXQ.js';var h=`
2
2
  query ListRoles($filter: RoleFilterInput, $pagination: PaginationInput, $scopeId: String!) {
3
3
  roles(filter: $filter, pagination: $pagination, scopeId: $scopeId) {
4
4
  id
@@ -1 +1 @@
1
- import {Nc,Oc,Pc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,_c,$c,ad,Zc,bd,dd,cd,ed,fd,gd,hd,id,jd,kd,ld,md}from'../../chunk-REBBLQFS.js';import {a,b,h,p,n,o,g,i,q,s}from'../../chunk-SQSFZFQZ.js';import {o as o$1}from'../../chunk-UAFYTYK6.js';function r(){let l=s().auth.read();if(!l?.workspaceId)throw new o$1("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:l.workspaceId}}function Q(l){let d=l.command("sandbox").description("Manage sandboxes");d.command("list").description("List sandboxes").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n$1=>{try{let t={};n$1.status&&(t.status=n$1.status.toUpperCase()),n$1.template&&(t.template=n$1.template.toUpperCase());let c=(await b(Nc,{context:r(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n$1.limit,offset:0}})).listSandboxes.items;h(n$1,c,{headers:["ID","Name","Template","Mode","Status","TTL","Created"],rows:c.map(m=>[p(m.id,12),m.name,m.template,m.mode,n(m.status),m.ttlSeconds?`${m.ttlSeconds}s`:"-",o(m.createdAt)])});}catch(t){g(t);}}),d.command("get").description("Get sandbox details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Oc,{context:r(),id:n});if(!e.getSandbox)throw new o$1("Sandbox not found");h(t,e.getSandbox);}catch(e){g(e);}}),d.command("create").description("Create sandbox").requiredOption("--name <name>","Sandbox name").option("--template <template>","Template type","VIBECONTROLS").option("--mode <mode>","Mode (DEPLOYMENT or JOB)","DEPLOYMENT").option("--ttl <seconds>","TTL in seconds",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Pc,{input:{name:n.name,template:n.template.toUpperCase(),mode:n.mode.toUpperCase(),ttlSeconds:n.ttl,context:r()}});i("Sandbox created"),h(n,t.createSandbox);}catch(t){g(t);}}),d.command("stop").description("Stop sandbox").argument("<id>").action(async n=>{try{await b(Qc,{context:r(),id:n}),i("Sandbox stopped");}catch(t){g(t);}}),d.command("delete").description("Delete sandbox").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await q("Delete this sandbox?",t.force))return;await b(Rc,{context:r(),id:n}),i("Sandbox deleted");}catch(e){g(e);}}),d.command("extend").description("Extend sandbox TTL").argument("<id>").option("--seconds <n>","Extend by seconds",parseInt).option("--minutes <n>","Extend by minutes",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e;if(t.seconds?e=t.seconds:t.minutes&&(e=t.minutes*60),!e)throw new o$1("Either --seconds or --minutes is required");let c=await b(Sc,{context:r(),id:n,additionalSeconds:e});i(`Sandbox extended by ${e}s`),h(t,c.extendSandboxTTL);}catch(e){g(e);}});let f=d.command("templates").description("Manage sandbox templates");f.command("list").description("List sandbox templates").option("--template <kind>","Filter by template kind").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Tc,{context:r(),template:n.template?.toUpperCase(),pagination:{limit:n.limit,offset:0}});h(n,t.listSandboxTemplates.items);}catch(t){g(t);}}),f.command("get").description("Get template details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Uc,{context:r(),id:n});if(!e.getSandboxTemplate)throw new o$1("Template not found");h(t,e.getSandboxTemplate);}catch(e){g(e);}}),f.command("create").description("Create sandbox template").requiredOption("--name <name>","Template name").requiredOption("--template <kind>","Template kind").option("--description <desc>","Description").option("--default","Mark as default").option("--ttl <seconds>","Default TTL",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t={name:n.name,template:n.template.toUpperCase(),context:r()};n.description&&(t.description=n.description),n.default&&(t.isDefault=!0),n.ttl!==void 0&&(t.ttlSeconds=n.ttl);let e=await b(Vc,{input:t});i("Template created"),h(n,e.createSandboxTemplate);}catch(t){g(t);}}),f.command("update").description("Update sandbox template").argument("<id>").option("--name <name>","New name").option("--description <desc>","New description").option("--default","Mark as default").option("--ttl <seconds>","New default TTL",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={id:n,context:r()};t.name&&(e.name=t.name),t.description&&(e.description=t.description),t.default!==void 0&&(e.isDefault=t.default),t.ttl!==void 0&&(e.ttlSeconds=t.ttl);let c=await b(Wc,{input:e});i("Template updated"),h(t,c.updateSandboxTemplate);}catch(e){g(e);}}),f.command("delete").description("Delete sandbox template").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await q("Delete this template?",t.force))return;await b(Xc,{context:r(),id:n}),i("Template deleted");}catch(e){g(e);}});let u=d.command("tags").description("Manage sandbox tags");u.command("list").description("List available sandbox tags").option("--query <q>","Search query").option("--limit <n>","Page size",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Yc,{query:n.query,limit:n.limit});h(n,t.availableSandboxTags);}catch(t){g(t);}}),u.command("create").description("Create a new sandbox tag").requiredOption("--label <label>","Tag label").option("--color <color>","Tag color").option("-f, --format <format>","Output format").action(async n=>{try{let t={label:n.label};n.color&&(t.color=n.color);let e=await b(_c,{input:t});i("Tag created"),h(n,e.createSandboxTag);}catch(t){g(t);}}),u.command("attach").description("Attach a tag to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b($c,{input:{sandboxId:n.sandbox,tagId:n.tag}});i("Tag attached"),h(n,t.tagSandbox);}catch(t){g(t);}}),u.command("detach").description("Detach a tag from a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").action(async n=>{try{await b(ad,{input:{sandboxId:n.sandbox,tagId:n.tag}}),i("Tag detached");}catch(t){g(t);}}),u.command("get").description("Get tags assigned to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Zc,{input:{sandboxId:n.sandbox}});h(n,t.getSandboxTags);}catch(t){g(t);}}),u.command("replace").description("Replace all tags on a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tags <ids...>","Tag IDs (space separated)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(bd,{input:{sandboxId:n.sandbox,tagIds:n.tags}});i("Tags replaced"),h(n,t.replaceSandboxTags);}catch(t){g(t);}});let p$1=d.command("admin").description("Admin / observability ops");p$1.command("nodes").description("List sandbox nodes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(dd,{context:r()});h(n,t.listSandboxNodes);}catch(t){g(t);}}),p$1.command("all").description("List all sandboxes (admin)").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.status&&(t.status=n.status.toUpperCase()),n.template&&(t.template=n.template.toUpperCase());let e=await b(cd,{context:r(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n.limit,offset:0}});h(n,e.listAllSandboxes.items);}catch(t){g(t);}}),p$1.command("active").description("Get active sandboxes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(ed,{context:r()});h(n,t.getActiveSandboxes);}catch(t){g(t);}}),p$1.command("activity").description("Get recent sandbox activity").option("--limit <n>","Max items",parseInt,20).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(fd,{context:r(),limit:n.limit});h(n,t.getRecentSandboxActivity.items);}catch(t){g(t);}}),p$1.command("stats").description("Get sandbox stats").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(gd,{context:r()});h(n,t.getSandboxStats);}catch(t){g(t);}}),p$1.command("logs").description("Get logs for a sandbox container").argument("<id>").requiredOption("--container <name>","Container name").option("--tail <n>","Tail lines",parseInt,100).action(async(n,t)=>{try{let e=await b(hd,{context:r(),id:n,containerName:t.container,tailLines:t.tail});process.stdout.write(e.getSandboxLogs);}catch(e){g(e);}});let S=p$1.command("config").description("Sandbox config");S.command("get").description("Get sandbox config").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(id,{context:r()});h(n,t.getSandboxConfig);}catch(t){g(t);}}),S.command("set").description("Update sandbox config").option("--default-ttl <seconds>","Default TTL",parseInt).option("--max-ttl <seconds>","Max TTL",parseInt).option("--max-per-user <n>","Max concurrent per user",parseInt).option("--max-per-workspace <n>","Max concurrent per workspace",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t={context:r()};n.defaultTtl!==void 0&&(t.defaultTtlSeconds=n.defaultTtl),n.maxTtl!==void 0&&(t.maxTtlSeconds=n.maxTtl),n.maxPerUser!==void 0&&(t.maxConcurrentPerUser=n.maxPerUser),n.maxPerWorkspace!==void 0&&(t.maxConcurrentPerWorkspace=n.maxPerWorkspace);let e=await b(jd,{input:t});i("Config updated"),h(n,e.updateSandboxConfig);}catch(t){g(t);}});let x=d.command("export").description("Sandbox export jobs");x.command("create").description("Create a sandbox export job").requiredOption("--format <fmt>","Format (CSV or JSON)").option("--include-usage","Include usage events").option("-f, --format-out <format>","Output format").action(async n=>{try{let t=r(),e={workspaceId:t.workspaceId,format:n.format.toUpperCase(),context:t};n.includeUsage&&(e.includeUsageEvents=!0);let c=await b(kd,{input:e});i("Export job created"),h({format:n.formatOut},c.exportSandboxes);}catch(t){g(t);}}),x.command("get").description("Get sandbox export job").argument("<jobId>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=r(),c=await b(ld,{workspaceId:e.workspaceId,jobId:n,context:e});h(t,c.getSandboxExportJob);}catch(e){g(e);}}),x.command("list").description("List sandbox export jobs").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t=r(),e=await b(md,{workspaceId:t.workspaceId,context:t,pagination:{limit:n.limit,offset:0}});h(n,e.listSandboxExportJobs);}catch(t){g(t);}});}var nt={id:"sandbox",version:"1.0.0",displayName:"Sandbox",dependsOn:["auth","workspaces"],register(l,d){a(d),Q(l);}},ct=nt;export{ct as default};
1
+ import {Nc,Oc,Pc,Qc,Rc,Sc,Tc,Uc,Vc,Wc,Xc,Yc,_c,$c,ad,Zc,bd,dd,cd,ed,fd,gd,hd,id,jd,kd,ld,md}from'../../chunk-REBBLQFS.js';import {a,b,h,p,n,o,g,i,q,s}from'../../chunk-W4JZR7RJ.js';import {o as o$1}from'../../chunk-YIY5IDXQ.js';function r(){let l=s().auth.read();if(!l?.workspaceId)throw new o$1("No workspace set. Run: vibecontrols workspace set <id>");return {workspaceId:l.workspaceId}}function Q(l){let d=l.command("sandbox").description("Manage sandboxes");d.command("list").description("List sandboxes").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n$1=>{try{let t={};n$1.status&&(t.status=n$1.status.toUpperCase()),n$1.template&&(t.template=n$1.template.toUpperCase());let c=(await b(Nc,{context:r(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n$1.limit,offset:0}})).listSandboxes.items;h(n$1,c,{headers:["ID","Name","Template","Mode","Status","TTL","Created"],rows:c.map(m=>[p(m.id,12),m.name,m.template,m.mode,n(m.status),m.ttlSeconds?`${m.ttlSeconds}s`:"-",o(m.createdAt)])});}catch(t){g(t);}}),d.command("get").description("Get sandbox details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Oc,{context:r(),id:n});if(!e.getSandbox)throw new o$1("Sandbox not found");h(t,e.getSandbox);}catch(e){g(e);}}),d.command("create").description("Create sandbox").requiredOption("--name <name>","Sandbox name").option("--template <template>","Template type","VIBECONTROLS").option("--mode <mode>","Mode (DEPLOYMENT or JOB)","DEPLOYMENT").option("--ttl <seconds>","TTL in seconds",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Pc,{input:{name:n.name,template:n.template.toUpperCase(),mode:n.mode.toUpperCase(),ttlSeconds:n.ttl,context:r()}});i("Sandbox created"),h(n,t.createSandbox);}catch(t){g(t);}}),d.command("stop").description("Stop sandbox").argument("<id>").action(async n=>{try{await b(Qc,{context:r(),id:n}),i("Sandbox stopped");}catch(t){g(t);}}),d.command("delete").description("Delete sandbox").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await q("Delete this sandbox?",t.force))return;await b(Rc,{context:r(),id:n}),i("Sandbox deleted");}catch(e){g(e);}}),d.command("extend").description("Extend sandbox TTL").argument("<id>").option("--seconds <n>","Extend by seconds",parseInt).option("--minutes <n>","Extend by minutes",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e;if(t.seconds?e=t.seconds:t.minutes&&(e=t.minutes*60),!e)throw new o$1("Either --seconds or --minutes is required");let c=await b(Sc,{context:r(),id:n,additionalSeconds:e});i(`Sandbox extended by ${e}s`),h(t,c.extendSandboxTTL);}catch(e){g(e);}});let f=d.command("templates").description("Manage sandbox templates");f.command("list").description("List sandbox templates").option("--template <kind>","Filter by template kind").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Tc,{context:r(),template:n.template?.toUpperCase(),pagination:{limit:n.limit,offset:0}});h(n,t.listSandboxTemplates.items);}catch(t){g(t);}}),f.command("get").description("Get template details").argument("<id>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=await b(Uc,{context:r(),id:n});if(!e.getSandboxTemplate)throw new o$1("Template not found");h(t,e.getSandboxTemplate);}catch(e){g(e);}}),f.command("create").description("Create sandbox template").requiredOption("--name <name>","Template name").requiredOption("--template <kind>","Template kind").option("--description <desc>","Description").option("--default","Mark as default").option("--ttl <seconds>","Default TTL",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t={name:n.name,template:n.template.toUpperCase(),context:r()};n.description&&(t.description=n.description),n.default&&(t.isDefault=!0),n.ttl!==void 0&&(t.ttlSeconds=n.ttl);let e=await b(Vc,{input:t});i("Template created"),h(n,e.createSandboxTemplate);}catch(t){g(t);}}),f.command("update").description("Update sandbox template").argument("<id>").option("--name <name>","New name").option("--description <desc>","New description").option("--default","Mark as default").option("--ttl <seconds>","New default TTL",parseInt).option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e={id:n,context:r()};t.name&&(e.name=t.name),t.description&&(e.description=t.description),t.default!==void 0&&(e.isDefault=t.default),t.ttl!==void 0&&(e.ttlSeconds=t.ttl);let c=await b(Wc,{input:e});i("Template updated"),h(t,c.updateSandboxTemplate);}catch(e){g(e);}}),f.command("delete").description("Delete sandbox template").argument("<id>").option("--force","Skip confirmation").action(async(n,t)=>{try{if(!await q("Delete this template?",t.force))return;await b(Xc,{context:r(),id:n}),i("Template deleted");}catch(e){g(e);}});let u=d.command("tags").description("Manage sandbox tags");u.command("list").description("List available sandbox tags").option("--query <q>","Search query").option("--limit <n>","Page size",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Yc,{query:n.query,limit:n.limit});h(n,t.availableSandboxTags);}catch(t){g(t);}}),u.command("create").description("Create a new sandbox tag").requiredOption("--label <label>","Tag label").option("--color <color>","Tag color").option("-f, --format <format>","Output format").action(async n=>{try{let t={label:n.label};n.color&&(t.color=n.color);let e=await b(_c,{input:t});i("Tag created"),h(n,e.createSandboxTag);}catch(t){g(t);}}),u.command("attach").description("Attach a tag to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b($c,{input:{sandboxId:n.sandbox,tagId:n.tag}});i("Tag attached"),h(n,t.tagSandbox);}catch(t){g(t);}}),u.command("detach").description("Detach a tag from a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tag <id>","Tag ID").action(async n=>{try{await b(ad,{input:{sandboxId:n.sandbox,tagId:n.tag}}),i("Tag detached");}catch(t){g(t);}}),u.command("get").description("Get tags assigned to a sandbox").requiredOption("--sandbox <id>","Sandbox ID").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(Zc,{input:{sandboxId:n.sandbox}});h(n,t.getSandboxTags);}catch(t){g(t);}}),u.command("replace").description("Replace all tags on a sandbox").requiredOption("--sandbox <id>","Sandbox ID").requiredOption("--tags <ids...>","Tag IDs (space separated)").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(bd,{input:{sandboxId:n.sandbox,tagIds:n.tags}});i("Tags replaced"),h(n,t.replaceSandboxTags);}catch(t){g(t);}});let p$1=d.command("admin").description("Admin / observability ops");p$1.command("nodes").description("List sandbox nodes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(dd,{context:r()});h(n,t.listSandboxNodes);}catch(t){g(t);}}),p$1.command("all").description("List all sandboxes (admin)").option("--status <status>","Filter by status").option("--template <template>","Filter by template").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t={};n.status&&(t.status=n.status.toUpperCase()),n.template&&(t.template=n.template.toUpperCase());let e=await b(cd,{context:r(),filter:Object.keys(t).length?t:void 0,pagination:{limit:n.limit,offset:0}});h(n,e.listAllSandboxes.items);}catch(t){g(t);}}),p$1.command("active").description("Get active sandboxes").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(ed,{context:r()});h(n,t.getActiveSandboxes);}catch(t){g(t);}}),p$1.command("activity").description("Get recent sandbox activity").option("--limit <n>","Max items",parseInt,20).option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(fd,{context:r(),limit:n.limit});h(n,t.getRecentSandboxActivity.items);}catch(t){g(t);}}),p$1.command("stats").description("Get sandbox stats").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(gd,{context:r()});h(n,t.getSandboxStats);}catch(t){g(t);}}),p$1.command("logs").description("Get logs for a sandbox container").argument("<id>").requiredOption("--container <name>","Container name").option("--tail <n>","Tail lines",parseInt,100).action(async(n,t)=>{try{let e=await b(hd,{context:r(),id:n,containerName:t.container,tailLines:t.tail});process.stdout.write(e.getSandboxLogs);}catch(e){g(e);}});let S=p$1.command("config").description("Sandbox config");S.command("get").description("Get sandbox config").option("-f, --format <format>","Output format").action(async n=>{try{let t=await b(id,{context:r()});h(n,t.getSandboxConfig);}catch(t){g(t);}}),S.command("set").description("Update sandbox config").option("--default-ttl <seconds>","Default TTL",parseInt).option("--max-ttl <seconds>","Max TTL",parseInt).option("--max-per-user <n>","Max concurrent per user",parseInt).option("--max-per-workspace <n>","Max concurrent per workspace",parseInt).option("-f, --format <format>","Output format").action(async n=>{try{let t={context:r()};n.defaultTtl!==void 0&&(t.defaultTtlSeconds=n.defaultTtl),n.maxTtl!==void 0&&(t.maxTtlSeconds=n.maxTtl),n.maxPerUser!==void 0&&(t.maxConcurrentPerUser=n.maxPerUser),n.maxPerWorkspace!==void 0&&(t.maxConcurrentPerWorkspace=n.maxPerWorkspace);let e=await b(jd,{input:t});i("Config updated"),h(n,e.updateSandboxConfig);}catch(t){g(t);}});let x=d.command("export").description("Sandbox export jobs");x.command("create").description("Create a sandbox export job").requiredOption("--format <fmt>","Format (CSV or JSON)").option("--include-usage","Include usage events").option("-f, --format-out <format>","Output format").action(async n=>{try{let t=r(),e={workspaceId:t.workspaceId,format:n.format.toUpperCase(),context:t};n.includeUsage&&(e.includeUsageEvents=!0);let c=await b(kd,{input:e});i("Export job created"),h({format:n.formatOut},c.exportSandboxes);}catch(t){g(t);}}),x.command("get").description("Get sandbox export job").argument("<jobId>").option("-f, --format <format>","Output format").action(async(n,t)=>{try{let e=r(),c=await b(ld,{workspaceId:e.workspaceId,jobId:n,context:e});h(t,c.getSandboxExportJob);}catch(e){g(e);}}),x.command("list").description("List sandbox export jobs").option("--limit <n>","Page size",n=>parseInt(n,10),50).option("-f, --format <format>","Output format").action(async n=>{try{let t=r(),e=await b(md,{workspaceId:t.workspaceId,context:t,pagination:{limit:n.limit,offset:0}});h(n,e.listSandboxExportJobs);}catch(t){g(t);}});}var nt={id:"sandbox",version:"1.0.0",displayName:"Sandbox",dependsOn:["auth","workspaces"],register(l,d){a(d),Q(l);}},ct=nt;export{ct as default};
@@ -1,4 +1,4 @@
1
- import {a,b,h as h$1,p,n,o,g,i,s}from'../../chunk-SQSFZFQZ.js';import {o as o$1}from'../../chunk-UAFYTYK6.js';var C=`
1
+ import {a,b,h as h$1,p,n,o,g,i,s}from'../../chunk-W4JZR7RJ.js';import {o as o$1}from'../../chunk-YIY5IDXQ.js';var C=`
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 }