@robbeverhelst/do 1.386.0 → 1.388.0

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 (2) hide show
  1. package/dist/do.js +604 -87
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -14420,7 +14420,7 @@ var configError = (message) => new CliError("config", message, EXIT.CONFIG);
14420
14420
 
14421
14421
  // src/meta.ts
14422
14422
  var CLI_NAME = "do";
14423
- var VERSION = "1.386.0";
14423
+ var VERSION = "1.388.0";
14424
14424
  var API_PREFIX = "/api/v1";
14425
14425
  var DEFAULT_API_URL = "http://localhost:3001";
14426
14426
 
@@ -18033,7 +18033,8 @@ var habits = pgTable("habits", {
18033
18033
  eventMatch: text("event_match"),
18034
18034
  eventOffset: text("event_offset"),
18035
18035
  durationMinutes: integer2("duration_minutes"),
18036
- activeMonths: integer2("active_months").array()
18036
+ activeMonths: integer2("active_months").array(),
18037
+ checklist: boolean4("checklist").notNull().default(false)
18037
18038
  }, (t) => [
18038
18039
  index("habits_tenant_idx").on(t.tenantId),
18039
18040
  index("habits_tenant_area_idx").on(t.tenantId, t.areaId),
@@ -22025,8 +22026,36 @@ var animalOperations = defineOperations({
22025
22026
  }
22026
22027
  });
22027
22028
 
22028
- // ../../packages/schema/src/contracts/habit-sources.ts
22029
- var habitSourceSchema = _enum2(["manual", "google_fit", "strava", "github"]);
22029
+ // ../../packages/schema/src/db/habit-items.ts
22030
+ var habitItems = pgTable("habit_items", {
22031
+ id: text("id").primaryKey(),
22032
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
22033
+ habitId: text("habit_id").notNull().references(() => habits.id),
22034
+ title: text("title").notNull(),
22035
+ position: integer2("position").notNull().default(0),
22036
+ byDay: text("by_day").array(),
22037
+ timeOfDay: text("time_of_day"),
22038
+ archivedAt: timestamp("archived_at", { withTimezone: true }),
22039
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
22040
+ }, (t) => [
22041
+ index("habit_items_habit_idx").on(t.tenantId, t.habitId, t.position),
22042
+ check2("habit_items_time_of_day_chk", sql`${t.timeOfDay} IS NULL OR ${t.timeOfDay} IN ('morning', 'midday', 'evening')`)
22043
+ ]);
22044
+ var habitItemTicks = pgTable("habit_item_ticks", {
22045
+ id: text("id").primaryKey(),
22046
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
22047
+ habitId: text("habit_id").notNull().references(() => habits.id),
22048
+ itemId: text("item_id").notNull().references(() => habitItems.id),
22049
+ day: date5("day", { mode: "string" }).notNull(),
22050
+ tickedAt: timestamp("ticked_at", { withTimezone: true }).notNull().defaultNow(),
22051
+ source: habitEntrySource("source").notNull().default("manual"),
22052
+ userId: text("user_id"),
22053
+ agentId: text("agent_id"),
22054
+ routineRunStepId: text("routine_run_step_id")
22055
+ }, (t) => [
22056
+ uniqueIndex("habit_item_ticks_item_day_uniq").on(t.itemId, t.day),
22057
+ index("habit_item_ticks_habit_day_idx").on(t.tenantId, t.habitId, t.day)
22058
+ ]);
22030
22059
 
22031
22060
  // ../../packages/schema/src/contracts/recurrence.ts
22032
22061
  var recurrenceRuleSchema = createSelectSchema(recurrenceRules, {
@@ -22098,6 +22127,71 @@ var updateOccurrenceInputSchema = createUpdateSchema(occurrences, {
22098
22127
  occurrenceDate: exports_coerce.date().optional()
22099
22128
  }).pick({ occurrenceDate: true, status: true }).strict();
22100
22129
 
22130
+ // ../../packages/schema/src/contracts/habit-items.ts
22131
+ var civilDate = exports_iso.date();
22132
+ var habitItemTimeOfDaySchema = _enum2(["morning", "midday", "evening"]);
22133
+ var itemTitleSchema = string2().trim().min(1).max(120);
22134
+ var itemByDaySchema = array(byDayCodeSchema).min(1).max(7).refine((d) => new Set(d).size === d.length, "each weekday once");
22135
+ var habitItemSchema = createSelectSchema(habitItems, {
22136
+ byDay: array(string2()).nullable(),
22137
+ timeOfDay: string2().nullable(),
22138
+ archivedAt: exports_coerce.date().nullable(),
22139
+ createdAt: exports_coerce.date()
22140
+ });
22141
+ var habitItemTickSchema = createSelectSchema(habitItemTicks, {
22142
+ tickedAt: exports_coerce.date()
22143
+ });
22144
+ var createHabitItemInputSchema = object({
22145
+ id: ulidSchema,
22146
+ title: itemTitleSchema,
22147
+ byDay: itemByDaySchema.nullish(),
22148
+ timeOfDay: habitItemTimeOfDaySchema.nullish(),
22149
+ position: number2().int().min(0).optional()
22150
+ }).strict();
22151
+ var updateHabitItemInputSchema = object({
22152
+ title: itemTitleSchema.optional(),
22153
+ byDay: itemByDaySchema.nullish(),
22154
+ timeOfDay: habitItemTimeOfDaySchema.nullish()
22155
+ }).strict();
22156
+ var reorderHabitItemsInputSchema = object({
22157
+ ids: array(ulidSchema).min(1).max(100).refine((ids) => new Set(ids).size === ids.length, "each item once")
22158
+ }).strict();
22159
+ var habitItemTickInputSchema = object({ date: civilDate.optional() }).strict();
22160
+ var habitTickAllInputSchema = object({
22161
+ date: civilDate.optional(),
22162
+ except: array(ulidSchema).max(100).optional()
22163
+ }).strict();
22164
+ var habitChecklistQuerySchema = object({ date: civilDate.optional() });
22165
+ var habitItemTickedBySchema = object({
22166
+ source: _enum2(habitEntrySource.enumValues),
22167
+ userId: string2().nullable(),
22168
+ agentId: string2().nullable()
22169
+ });
22170
+ var habitChecklistItemSchema = object({
22171
+ id: ulidSchema,
22172
+ title: string2(),
22173
+ position: number2().int(),
22174
+ byDay: array(string2()).nullable(),
22175
+ timeOfDay: habitItemTimeOfDaySchema.nullable(),
22176
+ due: boolean2(),
22177
+ ticked: boolean2(),
22178
+ tickedAt: exports_coerce.date().nullable(),
22179
+ tickedBy: habitItemTickedBySchema.nullable()
22180
+ });
22181
+ var habitChecklistDaySchema = object({
22182
+ habitId: ulidSchema,
22183
+ date: civilDate,
22184
+ items: array(habitChecklistItemSchema),
22185
+ due: number2().int().min(0),
22186
+ ticked: number2().int().min(0),
22187
+ percent: number2().int().min(0).max(100),
22188
+ done: boolean2()
22189
+ });
22190
+ var habitItemListSchema = array(habitItemSchema);
22191
+
22192
+ // ../../packages/schema/src/contracts/habit-sources.ts
22193
+ var habitSourceSchema = _enum2(["manual", "google_fit", "strava", "github"]);
22194
+
22101
22195
  // ../../packages/schema/src/contracts/habits.ts
22102
22196
  var habitSchema = createSelectSchema(habits, {
22103
22197
  source: habitSourceSchema.default("manual"),
@@ -22113,7 +22207,8 @@ var habitSchema = createSelectSchema(habits, {
22113
22207
  eventMatch: string2().nullable().default(null),
22114
22208
  eventOffset: string2().nullable().default(null),
22115
22209
  durationMinutes: number2().int().nullable().default(null),
22116
- activeMonths: array(number2().int()).nullable().default(null)
22210
+ activeMonths: array(number2().int()).nullable().default(null),
22211
+ checklist: boolean2().default(false)
22117
22212
  });
22118
22213
  var habitEntrySchema = createSelectSchema(habitEntries, {
22119
22214
  occurredAt: exports_coerce.date(),
@@ -22181,11 +22276,13 @@ var createHabitInputSchema = createInsertSchema(habits, {
22181
22276
  dayTimes: weekdayTimesSchema.nullish(),
22182
22277
  remind: boolean2().optional(),
22183
22278
  durationMinutes: habitDurationMinutesSchema.nullish(),
22184
- activeMonths: habitActiveMonthsSchema.optional()
22279
+ activeMonths: habitActiveMonthsSchema.optional(),
22280
+ checklist: boolean2().optional()
22185
22281
  }).omit({ tenantId: true, recurrenceRuleId: true, retiredAt: true, ...eventColumns }).extend({
22186
22282
  title: string2().min(1),
22187
22283
  schedule: habitScheduleSchema.optional(),
22188
- displayKind: string2().min(1).nullish()
22284
+ displayKind: string2().min(1).nullish(),
22285
+ items: array(createHabitItemInputSchema).max(100).optional()
22189
22286
  });
22190
22287
  var updateHabitInputSchema = createUpdateSchema(habits, {
22191
22288
  source: habitSourceSchema.optional(),
@@ -22209,6 +22306,7 @@ var updateHabitInputSchema = createUpdateSchema(habits, {
22209
22306
  pausedFrom: true,
22210
22307
  pausedUntil: true,
22211
22308
  retiredAt: true,
22309
+ checklist: true,
22212
22310
  ...eventColumns
22213
22311
  }).extend({
22214
22312
  title: string2().min(1).optional(),
@@ -22396,6 +22494,7 @@ var habitTodayItemSchema = object({
22396
22494
  measurementType: habitMeasurementTypeSchema,
22397
22495
  unit: string2().nullable(),
22398
22496
  target: number2().nullable(),
22497
+ checklist: boolean2().optional(),
22399
22498
  timeOfDay: string2().nullable().default(null),
22400
22499
  value: number2(),
22401
22500
  state: habitTodayStateSchema,
@@ -22447,6 +22546,7 @@ var habitSectionRowSchema = object({
22447
22546
  sourceWords: string2().nullable(),
22448
22547
  done: boolean2(),
22449
22548
  amount: object({ value: number2(), target: number2().nullable(), unit: string2().nullable() }).nullable(),
22549
+ checklist: boolean2().optional(),
22450
22550
  strip: array(habitStripDaySchema).length(HABIT_STRIP_DAYS),
22451
22551
  streak: habitSectionStreakSchema,
22452
22552
  routineStep: object({
@@ -23591,6 +23691,7 @@ var routineTodayStepSchema = object({
23591
23691
  routineId: string2().nullable().default(null),
23592
23692
  habitToday: _enum2(["due", "not_due", "paused"]).nullable().default(null),
23593
23693
  amount: object({ value: number2(), target: number2().nullable(), unit: string2().nullable() }).nullable().default(null),
23694
+ checklist: boolean2().optional(),
23594
23695
  ref: string2().nullish()
23595
23696
  });
23596
23697
  var routineTodayStateSchema = _enum2(["done", "running", "upcoming", "resting"]);
@@ -29652,6 +29753,7 @@ var correctMealLogInputSchema = object({
29652
29753
  place: string2().trim().max(100).nullish(),
29653
29754
  confidence: foodConfidenceSchema.optional(),
29654
29755
  flags: flags.optional(),
29756
+ photoFileId: ulidSchema.nullish(),
29655
29757
  replace: array(object({ itemId: ulidSchema, item: mealLogItemInputSchema })).max(40).optional(),
29656
29758
  remove: array(ulidSchema).max(40).optional(),
29657
29759
  add: array(mealLogItemInputSchema).max(40).optional()
@@ -29676,12 +29778,12 @@ var foodDaySchema = object({
29676
29778
  meals: number2().int(),
29677
29779
  completeness: _enum2(FOOD_DAY_COMPLETENESS_VALUES)
29678
29780
  });
29679
- var civilDate = string2().regex(/^\d{4}-\d{2}-\d{2}$/, "a date is YYYY-MM-DD");
29680
- var foodDateSchema = civilDate;
29781
+ var civilDate2 = string2().regex(/^\d{4}-\d{2}-\d{2}$/, "a date is YYYY-MM-DD");
29782
+ var foodDateSchema = civilDate2;
29681
29783
  var mealLogListQuerySchema = object({ from: exports_coerce.date(), to: exports_coerce.date() }).refine((q) => q.from < q.to, { message: "from must be before to" }).refine((q) => q.to.getTime() - q.from.getTime() <= 92 * 24 * 60 * 60 * 1000, {
29682
29784
  message: "ask for at most 92 days"
29683
29785
  });
29684
- var foodDaysQuerySchema = object({ from: civilDate, to: civilDate }).refine((q) => q.from <= q.to, { message: "from must not be after to" });
29786
+ var foodDaysQuerySchema = object({ from: civilDate2, to: civilDate2 }).refine((q) => q.from <= q.to, { message: "from must not be after to" });
29685
29787
  var FOOD_AFTER_MARK_VALUES = ["tired", "symptom"];
29686
29788
  var plannedMealSchema = object({
29687
29789
  id: string2(),
@@ -29713,7 +29815,7 @@ var foodDayIntakeSchema = object({
29713
29815
  note: string2().nullable()
29714
29816
  });
29715
29817
  var foodDayViewSchema = object({
29716
- date: civilDate,
29818
+ date: civilDate2,
29717
29819
  logs: array(mealLogViewSchema),
29718
29820
  total: foodDaySchema.nullable(),
29719
29821
  planned: array(plannedMealSchema),
@@ -29725,7 +29827,7 @@ var MEAL_AFTER_KIND_VALUES = ["symptom", "episode", "dose", "sleep", "rating"];
29725
29827
  var mealAfterEntrySchema = object({
29726
29828
  kind: _enum2(MEAL_AFTER_KIND_VALUES),
29727
29829
  at: exports_coerce.date().nullable(),
29728
- day: civilDate.nullable(),
29830
+ day: civilDate2.nullable(),
29729
29831
  label: string2(),
29730
29832
  bodyRegion: bodyRegionSchema.nullable(),
29731
29833
  severity: number2().int().nullable(),
@@ -29757,7 +29859,7 @@ var mealContextSchema = object({
29757
29859
  triggerText: string2().nullable()
29758
29860
  }).nullable()
29759
29861
  });
29760
- var foodWeekQuerySchema = object({ start: civilDate.optional() });
29862
+ var foodWeekQuerySchema = object({ start: civilDate2.optional() });
29761
29863
  var foodWeekMealSchema = object({
29762
29864
  id: string2(),
29763
29865
  title: string2(),
@@ -29768,7 +29870,7 @@ var foodWeekMealSchema = object({
29768
29870
  marks: array(_enum2(FOOD_AFTER_MARK_VALUES))
29769
29871
  });
29770
29872
  var foodWeekDaySchema = object({
29771
- day: civilDate,
29873
+ day: civilDate2,
29772
29874
  total: foodDaySchema.nullable(),
29773
29875
  meals: array(foodWeekMealSchema),
29774
29876
  planned: object({ meals: number2().int(), kcal: number2().nullable() }),
@@ -29777,10 +29879,10 @@ var foodWeekDaySchema = object({
29777
29879
  });
29778
29880
  var FOOD_WEEK_READ_MAX = 2000;
29779
29881
  var writeFoodWeekReadInputSchema = object({
29780
- start: civilDate,
29882
+ start: civilDate2,
29781
29883
  body: string2().trim().min(1).max(FOOD_WEEK_READ_MAX)
29782
29884
  }).strict();
29783
- var foodWeekReadQuerySchema = object({ start: civilDate });
29885
+ var foodWeekReadQuerySchema = object({ start: civilDate2 });
29784
29886
  var foodWeekReadSchema = object({
29785
29887
  id: string2(),
29786
29888
  body: string2(),
@@ -29788,14 +29890,14 @@ var foodWeekReadSchema = object({
29788
29890
  updatedAt: exports_coerce.date()
29789
29891
  });
29790
29892
  var foodWeekSchema = object({
29791
- start: civilDate,
29792
- end: civilDate,
29893
+ start: civilDate2,
29894
+ end: civilDate2,
29793
29895
  week: number2().int(),
29794
29896
  days: array(foodWeekDaySchema),
29795
29897
  usualKcal: number2().nullable(),
29796
29898
  weight: object({
29797
- points: array(object({ day: civilDate, value: number2() })),
29798
- trend: array(object({ day: civilDate, value: number2() })),
29899
+ points: array(object({ day: civilDate2, value: number2() })),
29900
+ trend: array(object({ day: civilDate2, value: number2() })),
29799
29901
  latest: number2().nullable(),
29800
29902
  perWeek: number2().nullable(),
29801
29903
  source: metricSourceSchema.nullable()
@@ -29806,7 +29908,7 @@ var foodWeekSchema = object({
29806
29908
  averageProteinG: number2().nullable(),
29807
29909
  dinnersPlanned: number2().int(),
29808
29910
  dinnersAsPlanned: number2().int(),
29809
- dinnersNearBed: array(civilDate),
29911
+ dinnersNearBed: array(civilDate2),
29810
29912
  meals: number2().int(),
29811
29913
  tiredAfter: number2().int(),
29812
29914
  tiredAfterLunch: number2().int()
@@ -29863,13 +29965,13 @@ var foodPatternSideSchema = object({
29863
29965
  mean: number2().nullable()
29864
29966
  });
29865
29967
  var foodPatternWeekSchema = object({
29866
- start: civilDate,
29968
+ start: civilDate2,
29867
29969
  week: number2().int(),
29868
29970
  averageKcal: number2().nullable(),
29869
29971
  weightChange: number2().nullable()
29870
29972
  });
29871
29973
  var foodPatternDaySchema = object({
29872
- day: civilDate,
29974
+ day: civilDate2,
29873
29975
  with: boolean2(),
29874
29976
  hit: boolean2().nullable(),
29875
29977
  value: number2().nullable()
@@ -29897,7 +29999,7 @@ var proposeFoodTrialInputSchema = object({
29897
29999
  question: foodPatternQuestionSchema,
29898
30000
  title: string2().trim().min(1).max(120),
29899
30001
  note: string2().trim().min(1).max(FOOD_TRIAL_NOTE_MAX),
29900
- startsOn: civilDate,
30002
+ startsOn: civilDate2,
29901
30003
  days: number2().int().min(7).max(28).default(14)
29902
30004
  }).strict();
29903
30005
  var foodTrialSchema = object({
@@ -29906,15 +30008,15 @@ var foodTrialSchema = object({
29906
30008
  title: string2(),
29907
30009
  note: string2(),
29908
30010
  state: _enum2(["proposed", "running"]),
29909
- startsOn: civilDate,
29910
- endsOn: civilDate,
30011
+ startsOn: civilDate2,
30012
+ endsOn: civilDate2,
29911
30013
  days: number2().int(),
29912
30014
  day: number2().int().nullable(),
29913
30015
  author: _enum2(["me", "agent"])
29914
30016
  });
29915
30017
  var foodPatternsSchema = object({
29916
- from: civilDate,
29917
- to: civilDate,
30018
+ from: civilDate2,
30019
+ to: civilDate2,
29918
30020
  windowDays: number2().int().positive(),
29919
30021
  loggedDays: number2().int().nonnegative(),
29920
30022
  answers: array(foodPatternAnswerSchema),
@@ -31098,6 +31200,8 @@ var guestOperations = defineOperations({
31098
31200
  });
31099
31201
 
31100
31202
  // ../../packages/schema/src/operations/habits.ts
31203
+ var item = { itemId: "The item's ULID." };
31204
+ var notChecklist = "A habit that isn't a checklist answers 409.";
31101
31205
  var habitListQuery = habitListQuerySchema.extend(paginationQuerySchema.shape);
31102
31206
  var habitOperations = defineOperations({
31103
31207
  list: {
@@ -31411,6 +31515,133 @@ var habitOperations = defineOperations({
31411
31515
  errors: { 404: true },
31412
31516
  webhook: "habit.updated",
31413
31517
  operationId: "undo_habit_check_in"
31518
+ },
31519
+ listItems: {
31520
+ method: "get",
31521
+ path: "/habits/{id}/items",
31522
+ scopes: ["habits:read"],
31523
+ tag: "Habits",
31524
+ summary: "List a checklist habit's items",
31525
+ description: `A checklist habit is one habit made of small items; ticking them fills its day (6 of 9 is 67%). Its live items, in order, each with its weekdays (\`byDay\`, null = every day) and part of the day. ${notChecklist}`,
31526
+ status: 200,
31527
+ response: { description: "The items, in order." },
31528
+ errors: { 404: true, 409: true },
31529
+ operationId: "list_habit_items"
31530
+ },
31531
+ addItem: {
31532
+ method: "post",
31533
+ path: "/habits/{id}/items",
31534
+ scopes: ["habits:write"],
31535
+ tag: "Habits",
31536
+ summary: "Add an item to a checklist habit",
31537
+ description: `Body \`{ id, title, byDay?, timeOfDay?, position? }\`: the item goes last, or at \`position\`. Returns the items. ${notChecklist}`,
31538
+ body: createHabitItemInputSchema,
31539
+ status: 201,
31540
+ response: { description: "The items, in order." },
31541
+ errors: { 400: true, 404: true, 409: true },
31542
+ webhook: "habit.updated",
31543
+ operationId: "add_habit_item"
31544
+ },
31545
+ updateItem: {
31546
+ method: "patch",
31547
+ path: "/habits/{id}/items/{itemId}",
31548
+ pathParams: item,
31549
+ scopes: ["habits:write"],
31550
+ tag: "Habits",
31551
+ summary: "Rename an item or change when it's due",
31552
+ description: `Body \`{ title?, byDay?, timeOfDay? }\`; null clears its weekdays or part of the day. Returns the items. ${notChecklist}`,
31553
+ body: updateHabitItemInputSchema,
31554
+ status: 200,
31555
+ response: { description: "The items, in order." },
31556
+ errors: { 400: true, 404: true, 409: true },
31557
+ webhook: "habit.updated",
31558
+ operationId: "update_habit_item"
31559
+ },
31560
+ reorderItems: {
31561
+ method: "put",
31562
+ path: "/habits/{id}/items/order",
31563
+ scopes: ["habits:write"],
31564
+ tag: "Habits",
31565
+ summary: "Reorder a checklist habit's items",
31566
+ description: `Body \`{ ids }\`: every live item's id, once each, first to last (400 otherwise). Returns the items. ${notChecklist}`,
31567
+ body: reorderHabitItemsInputSchema,
31568
+ status: 200,
31569
+ response: { description: "The items, in order." },
31570
+ errors: { 400: true, 404: true, 409: true },
31571
+ webhook: "habit.updated",
31572
+ operationId: "reorder_habit_items"
31573
+ },
31574
+ archiveItem: {
31575
+ method: "delete",
31576
+ path: "/habits/{id}/items/{itemId}",
31577
+ pathParams: item,
31578
+ scopes: ["habits:write"],
31579
+ tag: "Habits",
31580
+ summary: "Remove an item from a checklist habit",
31581
+ description: `The item is archived, never deleted: the days it was ticked keep their count, and from today it's no longer due. Returns the items left. ${notChecklist}`,
31582
+ status: 200,
31583
+ response: { description: "The items left, in order." },
31584
+ errors: { 404: true, 409: true },
31585
+ webhook: "habit.updated",
31586
+ operationId: "remove_habit_item"
31587
+ },
31588
+ checklist: {
31589
+ method: "get",
31590
+ path: "/habits/{id}/checklist",
31591
+ scopes: ["habits:read"],
31592
+ tag: "Habits",
31593
+ summary: "A checklist habit's day",
31594
+ description: `The day's items (each due or not, ticked or not, when and by whom), how many are due and ticked, the percent (6 of 9 \u2192 67) and \`done\`. \`date\` (YYYY-MM-DD) defaults to today in the member's zone. The habit's own day value is this percent (target 100), so its streak counts a day at 100%. ${notChecklist}`,
31595
+ query: [{ name: "date", description: "The day (YYYY-MM-DD); today when absent." }],
31596
+ querySchema: habitChecklistQuerySchema,
31597
+ status: 200,
31598
+ response: { description: "The checklist on the day." },
31599
+ errors: { 400: true, 404: true, 409: true },
31600
+ operationId: "get_habit_checklist"
31601
+ },
31602
+ tickItem: {
31603
+ method: "post",
31604
+ path: "/habits/{id}/items/{itemId}/tick",
31605
+ pathParams: item,
31606
+ scopes: ["habits:write"],
31607
+ tag: "Habits",
31608
+ summary: "Tick an item",
31609
+ description: `Body \`{ date? }\` (today when absent). Ticking a ticked item changes nothing. An Agent's key ticks it as that Agent's. Returns the day; fires \`habit.updated\`. ${notChecklist}`,
31610
+ body: habitItemTickInputSchema,
31611
+ status: 200,
31612
+ response: { description: "The checklist on the day." },
31613
+ errors: { 400: true, 404: true, 409: true },
31614
+ webhook: "habit.updated",
31615
+ operationId: "tick_habit_item"
31616
+ },
31617
+ untickItem: {
31618
+ method: "post",
31619
+ path: "/habits/{id}/items/{itemId}/untick",
31620
+ pathParams: item,
31621
+ scopes: ["habits:write"],
31622
+ tag: "Habits",
31623
+ summary: "Untick an item",
31624
+ description: `Body \`{ date? }\` (today when absent): undo a tick. Returns the day; fires \`habit.updated\`. ${notChecklist}`,
31625
+ body: habitItemTickInputSchema,
31626
+ status: 200,
31627
+ response: { description: "The checklist on the day." },
31628
+ errors: { 400: true, 404: true, 409: true },
31629
+ webhook: "habit.updated",
31630
+ operationId: "untick_habit_item"
31631
+ },
31632
+ tickAll: {
31633
+ method: "post",
31634
+ path: "/habits/{id}/items/tick-all",
31635
+ scopes: ["habits:write"],
31636
+ tag: "Habits",
31637
+ summary: "Tick every item due",
31638
+ description: `"All": body \`{ date?, except? }\` ticks every item due on the day (today when absent) but the ones in \`except\`, which end up unticked: "all done except the water". Returns the day; fires \`habit.updated\`. ${notChecklist}`,
31639
+ body: habitTickAllInputSchema,
31640
+ status: 200,
31641
+ response: { description: "The checklist on the day." },
31642
+ errors: { 400: true, 404: true, 409: true },
31643
+ webhook: "habit.updated",
31644
+ operationId: "tick_all_habit_items"
31414
31645
  }
31415
31646
  });
31416
31647
 
@@ -35263,13 +35494,13 @@ var mailCampaignOperations = defineOperations({
35263
35494
 
35264
35495
  // ../../packages/schema/src/contracts/meal-plans.ts
35265
35496
  var mealPlanStateSchema = _enum2(MEAL_PLAN_STATES);
35266
- var civilDate2 = string2().regex(/^\d{4}-\d{2}-\d{2}$/, "a date is YYYY-MM-DD");
35497
+ var civilDate3 = string2().regex(/^\d{4}-\d{2}-\d{2}$/, "a date is YYYY-MM-DD");
35267
35498
  var weekMenuFields = {
35268
35499
  state: mealPlanStateSchema.optional(),
35269
35500
  cookUserId: ulidSchema.nullish(),
35270
35501
  company: string2().max(120).nullish(),
35271
35502
  leftoverPortions: number2().int().positive().nullish(),
35272
- leftoverEatBy: civilDate2.nullish(),
35503
+ leftoverEatBy: civilDate3.nullish(),
35273
35504
  leftoverFrozen: boolean2().optional(),
35274
35505
  eaterUserIds: array(ulidSchema).max(50).optional(),
35275
35506
  guests: number2().int().min(0).max(99).optional()
@@ -35333,10 +35564,10 @@ var mealPlanCookResultSchema = object({
35333
35564
  });
35334
35565
  var cookMealPlanInputSchema = object({
35335
35566
  leftoverPortions: number2().int().positive().nullish(),
35336
- leftoverEatBy: civilDate2.nullish()
35567
+ leftoverEatBy: civilDate3.nullish()
35337
35568
  }).strict();
35338
- var mealWeekQuerySchema = object({ start: civilDate2.optional() });
35339
- var acceptMealDraftInputSchema = object({ start: civilDate2 }).strict();
35569
+ var mealWeekQuerySchema = object({ start: civilDate3.optional() });
35570
+ var acceptMealDraftInputSchema = object({ start: civilDate3 }).strict();
35340
35571
  var mealWeekCookSchema = object({
35341
35572
  userId: string2(),
35342
35573
  name: string2(),
@@ -35355,7 +35586,7 @@ var mealWeekSlotSchema = object({
35355
35586
  time: string2().nullable()
35356
35587
  });
35357
35588
  var mealWeekDaySchema = object({
35358
- date: civilDate2,
35589
+ date: civilDate3,
35359
35590
  isToday: boolean2(),
35360
35591
  dinner: mealWeekSlotSchema.nullable(),
35361
35592
  lunch: mealWeekSlotSchema.nullable()
@@ -35364,19 +35595,19 @@ var mealWeekLeftoverSchema = object({
35364
35595
  mealPlanId: ulidSchema,
35365
35596
  title: string2(),
35366
35597
  portions: number2().int(),
35367
- cookedOn: civilDate2,
35368
- eatBy: civilDate2.nullable(),
35598
+ cookedOn: civilDate3,
35599
+ eatBy: civilDate3.nullable(),
35369
35600
  frozen: boolean2()
35370
35601
  });
35371
35602
  var mealWeekDraftDaySchema = object({
35372
- date: civilDate2,
35603
+ date: civilDate3,
35373
35604
  dinner: mealWeekSlotSchema.nullable(),
35374
35605
  why: string2().nullable()
35375
35606
  });
35376
35607
  var mealWeekSchema = object({
35377
35608
  week: number2().int().min(1).max(53),
35378
- start: civilDate2,
35379
- end: civilDate2,
35609
+ start: civilDate3,
35610
+ end: civilDate3,
35380
35611
  days: array(mealWeekDaySchema).length(7),
35381
35612
  summary: object({
35382
35613
  planned: number2().int().min(0),
@@ -41587,9 +41818,9 @@ var todayOperations = defineOperations({
41587
41818
  // ../../packages/schema/src/contracts/waste-calendar.ts
41588
41819
  var WASTE_KIND_VALUES = ["rest", "pmd", "paper", "garden", "glass", "other"];
41589
41820
  var wasteKindSchema = _enum2(WASTE_KIND_VALUES);
41590
- var civilDate3 = exports_iso.date();
41821
+ var civilDate4 = exports_iso.date();
41591
41822
  var wasteCollectionSchema = object({
41592
- date: civilDate3,
41823
+ date: civilDate4,
41593
41824
  kinds: array(wasteKindSchema).min(1),
41594
41825
  movedBy: string2().min(1).optional()
41595
41826
  });
@@ -49525,7 +49756,12 @@ var commands18 = [
49525
49756
  {
49526
49757
  name: "data",
49527
49758
  type: "string",
49528
- description: 'The CorrectMealLogInput as JSON: {"replace":[{"itemId":"\u2026","item":{"label":"martino","foodId":"\u2026","grams":20}}],"remove":["\u2026"],"add":[\u2026],"flags":["spice:very_hot"]}.'
49759
+ description: 'The CorrectMealLogInput as JSON: {"replace":[{"itemId":"\u2026","item":{"label":"martino","foodId":"\u2026","grams":20}}],"remove":["\u2026"],"add":[\u2026],"flags":["spice:very_hot"],"photoFileId":"\u2026"}.'
49760
+ },
49761
+ {
49762
+ name: "photo",
49763
+ type: "string",
49764
+ description: "Set the meal's photo to a file already in the Space (its ULID); `none` takes it off. Joins --data, or stands alone."
49529
49765
  }
49530
49766
  ],
49531
49767
  scopes: [...foodLogOperations.correct.scopes],
@@ -49534,9 +49770,14 @@ var commands18 = [
49534
49770
  },
49535
49771
  run: async ({ args, flags, requireClient }) => {
49536
49772
  const id = requireArg(args, 0, "meal id");
49537
- if (flagString(flags, "data") === undefined)
49538
- throw usageError("food correct needs --data");
49539
- const body = parseInput(correctMealLogInputSchema, readDataFlag(flags));
49773
+ const photo = flagString(flags, "photo");
49774
+ if (flagString(flags, "data") === undefined && photo === undefined)
49775
+ throw usageError("food correct needs --data or --photo");
49776
+ const data = flagString(flags, "data") === undefined ? {} : readDataFlag(flags);
49777
+ const body = parseInput(correctMealLogInputSchema, {
49778
+ ...data,
49779
+ ...photo === undefined ? {} : { photoFileId: photo === "none" ? null : photo }
49780
+ });
49540
49781
  return {
49541
49782
  data: await requireClient().patch(pathOf(foodLogOperations.correct, { id }), body),
49542
49783
  render: renderRecord
@@ -49829,6 +50070,281 @@ var commands20 = [
49829
50070
  }
49830
50071
  ];
49831
50072
 
50073
+ // src/commands/habit-items.ts
50074
+ var DATE_FLAG = {
50075
+ name: "date",
50076
+ type: "string",
50077
+ description: "The day (YYYY-MM-DD); today in your zone when absent."
50078
+ };
50079
+ var WHEN_FLAGS = [
50080
+ {
50081
+ name: "on",
50082
+ type: "string",
50083
+ description: "Its weekdays, e.g. mo,we,fr; every day when absent."
50084
+ },
50085
+ {
50086
+ name: "part",
50087
+ type: "string",
50088
+ description: "Its part of the day: morning, midday or evening."
50089
+ }
50090
+ ];
50091
+ function itemWhenFromFlags(flags) {
50092
+ const out = {};
50093
+ const on = flagString(flags, "on");
50094
+ if (on !== undefined)
50095
+ out.byDay = on.split(",").map((d) => d.trim().toUpperCase().slice(0, 2)).filter(Boolean);
50096
+ if (flagBool(flags, "every-day"))
50097
+ out.byDay = null;
50098
+ const part = flagString(flags, "part");
50099
+ if (part !== undefined)
50100
+ out.timeOfDay = part === "any" ? null : part.trim().toLowerCase();
50101
+ return out;
50102
+ }
50103
+ function renderChecklist(data, mode) {
50104
+ const parsed = habitChecklistDaySchema.safeParse(data);
50105
+ if (!parsed.success)
50106
+ return renderRecord(data, mode);
50107
+ const day = parsed.data;
50108
+ const lines = day.items.map((i) => {
50109
+ const mark = i.ticked ? paint(mode, "green", "\u2713") : i.due ? "\xB7" : " ";
50110
+ const off = i.due ? "" : paint(mode, "dim", " (not due)");
50111
+ return `${mark} ${i.title}${off} ${paint(mode, "dim", i.id)}`;
50112
+ });
50113
+ lines.push(paint(mode, "dim", `${day.date}: ${day.ticked} of ${day.due}, ${day.percent}%${day.done ? ", done" : ""}`));
50114
+ return lines.join(`
50115
+ `);
50116
+ }
50117
+ function renderItems(data, mode) {
50118
+ const parsed = habitItemListSchema.safeParse(data);
50119
+ if (!parsed.success)
50120
+ return renderRecord(data, mode);
50121
+ if (parsed.data.length === 0)
50122
+ return "No items yet.";
50123
+ return parsed.data.map((i, n) => {
50124
+ const when = [i.byDay?.join(","), i.timeOfDay].filter(Boolean).join(" \xB7 ");
50125
+ return `${n + 1}. ${i.title}${when ? paint(mode, "dim", ` (${when})`) : ""} ${paint(mode, "dim", i.id)}`;
50126
+ }).join(`
50127
+ `);
50128
+ }
50129
+ var habitArg = { name: "id", required: true, description: "The checklist habit's ULID." };
50130
+ var itemArg = { name: "item-id", required: true, description: "The item's ULID." };
50131
+ var NOT_CHECKLIST = "A habit that isn't a checklist answers 409.";
50132
+ var commands21 = [
50133
+ {
50134
+ spec: {
50135
+ path: ["habit", "items"],
50136
+ summary: "List a checklist habit's items, in order.",
50137
+ args: [habitArg],
50138
+ flags: [],
50139
+ scopes: [...habitOperations.listItems.scopes],
50140
+ returns: "HabitItem[]",
50141
+ notes: `${routeOf(habitOperations.listItems)}. A checklist habit is one habit of small items; ticking them fills its day (6 of 9 is 67%). Make one with \`do habits create "<title>" --data '{"checklist":true,"items":[{"id":"<ulid>","title":"Item A"}]}'\`. ${NOT_CHECKLIST}`
50142
+ },
50143
+ run: async ({ args, requireClient }) => ({
50144
+ data: await requireClient().get(pathOf(habitOperations.listItems, { id: requireArg(args, 0, "habit id") })),
50145
+ render: renderItems
50146
+ })
50147
+ },
50148
+ {
50149
+ spec: {
50150
+ path: ["habit", "item", "add"],
50151
+ summary: "Add an item to a checklist habit.",
50152
+ args: [habitArg, { name: "title", required: true, description: "The item's title." }],
50153
+ flags: [
50154
+ ...WHEN_FLAGS,
50155
+ { name: "at", type: "string", description: "Its place, 1 first; last when absent." }
50156
+ ],
50157
+ scopes: [...habitOperations.addItem.scopes],
50158
+ returns: "HabitItem[]",
50159
+ notes: `${routeOf(habitOperations.addItem)}. e.g. \`do habit item add <id> "Morning glass of water" --part morning\`. ${NOT_CHECKLIST}`
50160
+ },
50161
+ run: async ({ args, flags, requireClient }) => {
50162
+ const id = requireArg(args, 0, "habit id");
50163
+ const title = args.slice(1).join(" ").trim();
50164
+ if (!title)
50165
+ throw usageError('habit item add needs a title, e.g. `do habit item add <id> "Item A"`');
50166
+ const at = flagString(flags, "at");
50167
+ const input = parseInput(createHabitItemInputSchema, {
50168
+ id: ulid3(),
50169
+ title,
50170
+ ...itemWhenFromFlags(flags),
50171
+ ...at !== undefined ? { position: Math.max(0, Number(at) - 1) } : {}
50172
+ });
50173
+ return {
50174
+ data: await requireClient().post(pathOf(habitOperations.addItem, { id }), input),
50175
+ render: renderItems
50176
+ };
50177
+ }
50178
+ },
50179
+ {
50180
+ spec: {
50181
+ path: ["habit", "item", "edit"],
50182
+ summary: "Rename an item or change when it's due.",
50183
+ args: [habitArg, itemArg],
50184
+ flags: [
50185
+ { name: "title", type: "string", description: "Its new title." },
50186
+ ...WHEN_FLAGS,
50187
+ { name: "every-day", type: "boolean", description: "Due every day again." }
50188
+ ],
50189
+ scopes: [...habitOperations.updateItem.scopes],
50190
+ returns: "HabitItem[]",
50191
+ notes: `${routeOf(habitOperations.updateItem)}. --part any clears its part of the day. ${NOT_CHECKLIST}`
50192
+ },
50193
+ run: async ({ args, flags, requireClient }) => {
50194
+ const id = requireArg(args, 0, "habit id");
50195
+ const itemId = requireArg(args, 1, "item id");
50196
+ const title = flagString(flags, "title");
50197
+ const input = parseInput(updateHabitItemInputSchema, {
50198
+ ...title !== undefined ? { title } : {},
50199
+ ...itemWhenFromFlags(flags)
50200
+ });
50201
+ if (Object.keys(input).length === 0)
50202
+ throw usageError("nothing to change \u2014 pass --title, --on, --every-day or --part");
50203
+ return {
50204
+ data: await requireClient().patch(pathOf(habitOperations.updateItem, { id, itemId }), input),
50205
+ render: renderItems
50206
+ };
50207
+ }
50208
+ },
50209
+ {
50210
+ spec: {
50211
+ path: ["habit", "item", "order"],
50212
+ summary: "Put a checklist habit's items in a new order.",
50213
+ args: [
50214
+ habitArg,
50215
+ { name: "item-ids", required: true, description: "Every item's ULID, first to last." }
50216
+ ],
50217
+ flags: [],
50218
+ scopes: [...habitOperations.reorderItems.scopes],
50219
+ returns: "HabitItem[]",
50220
+ notes: `${routeOf(habitOperations.reorderItems)}. Name every item on the list once (400 otherwise). ${NOT_CHECKLIST}`
50221
+ },
50222
+ run: async ({ args, requireClient }) => {
50223
+ const id = requireArg(args, 0, "habit id");
50224
+ const input = parseInput(reorderHabitItemsInputSchema, { ids: args.slice(1) });
50225
+ return {
50226
+ data: await requireClient().put(pathOf(habitOperations.reorderItems, { id }), input),
50227
+ render: renderItems
50228
+ };
50229
+ }
50230
+ },
50231
+ {
50232
+ spec: {
50233
+ path: ["habit", "item", "rm"],
50234
+ summary: "Remove an item from a checklist habit (archived; its past ticks keep counting).",
50235
+ args: [habitArg, itemArg],
50236
+ flags: [],
50237
+ scopes: [...habitOperations.archiveItem.scopes],
50238
+ returns: "HabitItem[]",
50239
+ notes: `${routeOf(habitOperations.archiveItem)}. ${NOT_CHECKLIST}`
50240
+ },
50241
+ run: async ({ args, requireClient }) => {
50242
+ const id = requireArg(args, 0, "habit id");
50243
+ const itemId = requireArg(args, 1, "item id");
50244
+ return {
50245
+ data: await requireClient().delete(pathOf(habitOperations.archiveItem, { id, itemId })),
50246
+ render: renderItems
50247
+ };
50248
+ }
50249
+ },
50250
+ {
50251
+ spec: {
50252
+ path: ["habit", "checklist"],
50253
+ summary: "A checklist habit's day: each item due and ticked, and the percent.",
50254
+ args: [habitArg],
50255
+ flags: [DATE_FLAG],
50256
+ scopes: [...habitOperations.checklist.scopes],
50257
+ returns: "HabitChecklistDay",
50258
+ notes: `${routeOf(habitOperations.checklist)}. The habit's day value is this percent (target 100). ${NOT_CHECKLIST}`
50259
+ },
50260
+ run: async ({ args, flags, requireClient }) => {
50261
+ const id = requireArg(args, 0, "habit id");
50262
+ const date = flagString(flags, "date");
50263
+ const q = date ? `?${new URLSearchParams({ date })}` : "";
50264
+ return {
50265
+ data: await requireClient().get(`${pathOf(habitOperations.checklist, { id })}${q}`),
50266
+ render: renderChecklist
50267
+ };
50268
+ }
50269
+ },
50270
+ {
50271
+ spec: {
50272
+ path: ["habit", "tick"],
50273
+ summary: "Tick an item of a checklist habit.",
50274
+ args: [habitArg, itemArg],
50275
+ flags: [DATE_FLAG],
50276
+ scopes: [...habitOperations.tickItem.scopes],
50277
+ returns: "HabitChecklistDay",
50278
+ notes: `${routeOf(habitOperations.tickItem)}. A ticked item stays ticked. An Agent's key ticks it as that Agent's. ${NOT_CHECKLIST}`
50279
+ },
50280
+ run: async ({ args, flags, requireClient }) => {
50281
+ const id = requireArg(args, 0, "habit id");
50282
+ const itemId = requireArg(args, 1, "item id");
50283
+ const input = parseInput(habitItemTickInputSchema, dateOf(flags));
50284
+ return {
50285
+ data: await requireClient().post(pathOf(habitOperations.tickItem, { id, itemId }), input),
50286
+ render: renderChecklist
50287
+ };
50288
+ }
50289
+ },
50290
+ {
50291
+ spec: {
50292
+ path: ["habit", "untick"],
50293
+ summary: "Untick an item of a checklist habit.",
50294
+ args: [habitArg, itemArg],
50295
+ flags: [DATE_FLAG],
50296
+ scopes: [...habitOperations.untickItem.scopes],
50297
+ returns: "HabitChecklistDay",
50298
+ notes: `${routeOf(habitOperations.untickItem)}. ${NOT_CHECKLIST}`
50299
+ },
50300
+ run: async ({ args, flags, requireClient }) => {
50301
+ const id = requireArg(args, 0, "habit id");
50302
+ const itemId = requireArg(args, 1, "item id");
50303
+ const input = parseInput(habitItemTickInputSchema, dateOf(flags));
50304
+ return {
50305
+ data: await requireClient().post(pathOf(habitOperations.untickItem, { id, itemId }), input),
50306
+ render: renderChecklist
50307
+ };
50308
+ }
50309
+ },
50310
+ {
50311
+ spec: {
50312
+ path: ["habit", "tick-all"],
50313
+ summary: 'Tick every item due ("All"), or all but some: "all done except one".',
50314
+ args: [habitArg],
50315
+ flags: [
50316
+ DATE_FLAG,
50317
+ {
50318
+ name: "except",
50319
+ type: "string",
50320
+ description: "Item ULIDs to leave unticked, comma-separated."
50321
+ }
50322
+ ],
50323
+ scopes: [...habitOperations.tickAll.scopes],
50324
+ returns: "HabitChecklistDay",
50325
+ notes: `${routeOf(habitOperations.tickAll)}. The items in --except end up unticked (unticked if they were). Find their ids with \`do habit checklist <id>\`. ${NOT_CHECKLIST}`
50326
+ },
50327
+ run: async ({ args, flags, requireClient }) => {
50328
+ const id = requireArg(args, 0, "habit id");
50329
+ const except = flagString(flags, "except");
50330
+ const input = parseInput(habitTickAllInputSchema, {
50331
+ ...dateOf(flags),
50332
+ ...except ? {
50333
+ except: except.split(",").map((s) => s.trim()).filter(Boolean)
50334
+ } : {}
50335
+ });
50336
+ return {
50337
+ data: await requireClient().post(pathOf(habitOperations.tickAll, { id }), input),
50338
+ render: renderChecklist
50339
+ };
50340
+ }
50341
+ }
50342
+ ];
50343
+ function dateOf(flags) {
50344
+ const date = flagString(flags, "date");
50345
+ return date ? { date } : {};
50346
+ }
50347
+
49832
50348
  // src/commands/habits.ts
49833
50349
  var SCHEDULE_FLAGS = [
49834
50350
  { name: "every-day", type: "boolean", description: "Due every day." },
@@ -49967,7 +50483,7 @@ function seasonFromFlags(flags) {
49967
50483
  const season = flagString(flags, "season");
49968
50484
  return season === undefined ? {} : { activeMonths: seasonFromFlag(season) };
49969
50485
  }
49970
- var commands21 = [
50486
+ var commands22 = [
49971
50487
  {
49972
50488
  spec: {
49973
50489
  path: ["habits", "create"],
@@ -51107,7 +51623,7 @@ function healthRecordHandlers() {
51107
51623
  }
51108
51624
  return out;
51109
51625
  }
51110
- var commands22 = pairCommands(HEALTH_COMMAND_SPECS, {
51626
+ var commands23 = pairCommands(HEALTH_COMMAND_SPECS, {
51111
51627
  ...healthRecordHandlers(),
51112
51628
  "health record": async ({ flags, requireClient }) => {
51113
51629
  const body = parseInput(logHealthInputSchema, readDataFlag(flags));
@@ -51377,7 +51893,7 @@ var commands22 = pairCommands(HEALTH_COMMAND_SPECS, {
51377
51893
  });
51378
51894
 
51379
51895
  // src/commands/house.ts
51380
- var commands23 = [
51896
+ var commands24 = [
51381
51897
  {
51382
51898
  spec: {
51383
51899
  path: ["house"],
@@ -51659,7 +52175,7 @@ function renderSorting(data, _mode) {
51659
52175
  ].join(`
51660
52176
  `);
51661
52177
  }
51662
- var commands24 = [
52178
+ var commands25 = [
51663
52179
  defineCommand({
51664
52180
  operation: inboxOperations.list,
51665
52181
  path: ["inbox"],
@@ -51751,7 +52267,7 @@ var commands24 = [
51751
52267
  ];
51752
52268
 
51753
52269
  // src/commands/incidents.ts
51754
- var commands25 = [
52270
+ var commands26 = [
51755
52271
  {
51756
52272
  spec: {
51757
52273
  path: ["incidents", "open"],
@@ -51980,7 +52496,7 @@ function journalDateArg(args, verb) {
51980
52496
  }
51981
52497
  return date;
51982
52498
  }
51983
- var commands26 = [
52499
+ var commands27 = [
51984
52500
  defineCommand({
51985
52501
  operation: journalOperations.day,
51986
52502
  path: ["journal", "day"],
@@ -52543,7 +53059,7 @@ function renderCreatedKey(data, mode) {
52543
53059
  ].join(`
52544
53060
  `);
52545
53061
  }
52546
- var commands27 = [
53062
+ var commands28 = [
52547
53063
  {
52548
53064
  spec: {
52549
53065
  path: ["keys", "list"],
@@ -52679,7 +53195,7 @@ var KIND_FLAG2 = {
52679
53195
  type: "string",
52680
53196
  description: "The kind of an unknown word (pages, eggs, health, note, or a word taught before); remembered for the Space."
52681
53197
  };
52682
- var commands28 = [
53198
+ var commands29 = [
52683
53199
  {
52684
53200
  spec: {
52685
53201
  path: ["log"],
@@ -52754,7 +53270,7 @@ var commands28 = [
52754
53270
  ];
52755
53271
 
52756
53272
  // src/commands/mail-campaigns.ts
52757
- var commands29 = [
53273
+ var commands30 = [
52758
53274
  {
52759
53275
  spec: {
52760
53276
  path: ["mail-campaigns", "list"],
@@ -53069,7 +53585,7 @@ async function serveMcp(io, target) {
53069
53585
  }
53070
53586
 
53071
53587
  // src/commands/mcp.ts
53072
- var commands30 = [
53588
+ var commands31 = [
53073
53589
  {
53074
53590
  spec: {
53075
53591
  path: ["mcp"],
@@ -53114,7 +53630,7 @@ var commands30 = [
53114
53630
  ];
53115
53631
 
53116
53632
  // src/commands/members.ts
53117
- var commands31 = [
53633
+ var commands32 = [
53118
53634
  {
53119
53635
  spec: {
53120
53636
  path: ["invite", "create"],
@@ -53239,7 +53755,7 @@ var commands31 = [
53239
53755
  ];
53240
53756
 
53241
53757
  // src/commands/metrics.ts
53242
- var commands32 = [
53758
+ var commands33 = [
53243
53759
  {
53244
53760
  spec: {
53245
53761
  path: ["metrics", "list"],
@@ -53367,7 +53883,7 @@ async function setModuleVisibility(args, requireClient, on) {
53367
53883
  render: renderRecord
53368
53884
  };
53369
53885
  }
53370
- var commands33 = [
53886
+ var commands34 = [
53371
53887
  {
53372
53888
  spec: {
53373
53889
  path: ["modules", "list"],
@@ -53596,7 +54112,7 @@ function shareFlag(flags) {
53596
54112
  function localMonth(now) {
53597
54113
  return `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}`;
53598
54114
  }
53599
- var commands34 = [
54115
+ var commands35 = [
53600
54116
  defineCommand({
53601
54117
  operation: moneyOperations.listAccounts,
53602
54118
  path: ["money", "accounts"],
@@ -54765,7 +55281,7 @@ var commands34 = [
54765
55281
  ];
54766
55282
 
54767
55283
  // src/commands/notes.ts
54768
- var commands35 = [
55284
+ var commands36 = [
54769
55285
  {
54770
55286
  spec: {
54771
55287
  path: ["notes", "backlinks"],
@@ -54887,7 +55403,7 @@ var commands35 = [
54887
55403
  ];
54888
55404
 
54889
55405
  // src/commands/orca.ts
54890
- var commands36 = [
55406
+ var commands37 = [
54891
55407
  {
54892
55408
  spec: {
54893
55409
  path: ["orca", "list"],
@@ -55253,7 +55769,7 @@ function linkBody(args) {
55253
55769
  return parseInput(familyTreeLinkInputSchema, { kind, a: ref, b: other });
55254
55770
  throw usageError("the kind is parent, child or partner");
55255
55771
  }
55256
- var commands37 = [
55772
+ var commands38 = [
55257
55773
  {
55258
55774
  spec: {
55259
55775
  path: ["people", "propose"],
@@ -55942,7 +56458,7 @@ var commands37 = [
55942
56458
 
55943
56459
  // src/commands/places.ts
55944
56460
  import { readFileSync as readFileSync10 } from "fs";
55945
- var commands38 = [
56461
+ var commands39 = [
55946
56462
  {
55947
56463
  spec: {
55948
56464
  path: ["places", "import"],
@@ -55999,7 +56515,7 @@ async function planDecision({ args, requireClient }, verb) {
55999
56515
  render: renderPlan
56000
56516
  };
56001
56517
  }
56002
- var commands39 = [
56518
+ var commands40 = [
56003
56519
  {
56004
56520
  spec: {
56005
56521
  path: ["plans", "list"],
@@ -56226,7 +56742,7 @@ var commands39 = [
56226
56742
  ];
56227
56743
 
56228
56744
  // src/commands/presets.ts
56229
- var commands40 = [
56745
+ var commands41 = [
56230
56746
  {
56231
56747
  spec: {
56232
56748
  path: ["presets", "list"],
@@ -56323,7 +56839,7 @@ function renderReviewSummary(data, mode) {
56323
56839
  return out.join(`
56324
56840
  `);
56325
56841
  }
56326
- var commands41 = [
56842
+ var commands42 = [
56327
56843
  {
56328
56844
  spec: {
56329
56845
  path: ["progress"],
@@ -56532,7 +57048,7 @@ function renderUpdates(data, mode) {
56532
57048
  return updates.map((u) => updateLine(u, mode)).join(`
56533
57049
  `);
56534
57050
  }
56535
- var commands42 = [
57051
+ var commands43 = [
56536
57052
  defineCommand({
56537
57053
  operation: projectOperations.update,
56538
57054
  path: ["projects", "set"],
@@ -57129,7 +57645,7 @@ var routineCommands = [
57129
57645
  }
57130
57646
  }
57131
57647
  ];
57132
- var commands43 = [
57648
+ var commands44 = [
57133
57649
  ...routineCommands,
57134
57650
  {
57135
57651
  spec: {
@@ -57252,7 +57768,7 @@ var commands43 = [
57252
57768
  ];
57253
57769
 
57254
57770
  // src/commands/rsvp-answers.ts
57255
- var commands44 = [
57771
+ var commands45 = [
57256
57772
  {
57257
57773
  spec: {
57258
57774
  path: ["rsvp-answers", "list"],
@@ -57306,7 +57822,7 @@ var commands44 = [
57306
57822
  ];
57307
57823
 
57308
57824
  // src/commands/rsvp-links.ts
57309
- var commands45 = [
57825
+ var commands46 = [
57310
57826
  {
57311
57827
  spec: {
57312
57828
  path: ["rsvp-links", "list"],
@@ -57402,7 +57918,7 @@ var commands45 = [
57402
57918
  ];
57403
57919
 
57404
57920
  // src/commands/rsvp-questions.ts
57405
- var commands46 = [
57921
+ var commands47 = [
57406
57922
  {
57407
57923
  spec: {
57408
57924
  path: ["rsvp-questions", "presets"],
@@ -57974,7 +58490,7 @@ function sessionFlags(flags) {
57974
58490
  body.occurredOn = on;
57975
58491
  return body;
57976
58492
  }
57977
- var commands47 = [
58493
+ var commands48 = [
57978
58494
  {
57979
58495
  spec: {
57980
58496
  path: ["runs", "change"],
@@ -58291,7 +58807,7 @@ var commands47 = [
58291
58807
  ];
58292
58808
 
58293
58809
  // src/commands/search.ts
58294
- var commands48 = [
58810
+ var commands49 = [
58295
58811
  {
58296
58812
  spec: {
58297
58813
  path: ["search"],
@@ -58324,7 +58840,7 @@ var commands48 = [
58324
58840
  ];
58325
58841
 
58326
58842
  // src/commands/seating-proposals.ts
58327
- var commands49 = [
58843
+ var commands50 = [
58328
58844
  {
58329
58845
  spec: {
58330
58846
  path: ["seating-proposals", "list"],
@@ -58411,7 +58927,7 @@ var commands49 = [
58411
58927
  ];
58412
58928
 
58413
58929
  // src/commands/sensors.ts
58414
- var commands50 = [
58930
+ var commands51 = [
58415
58931
  {
58416
58932
  spec: {
58417
58933
  path: ["sensors", "status"],
@@ -58571,7 +59087,7 @@ var commands50 = [
58571
59087
  ];
58572
59088
 
58573
59089
  // src/commands/settings.ts
58574
- var commands51 = [
59090
+ var commands52 = [
58575
59091
  {
58576
59092
  spec: {
58577
59093
  path: ["settings", "get"],
@@ -58605,7 +59121,7 @@ var commands51 = [
58605
59121
  ];
58606
59122
 
58607
59123
  // src/commands/sharing.ts
58608
- var commands52 = [
59124
+ var commands53 = [
58609
59125
  {
58610
59126
  spec: {
58611
59127
  path: ["share"],
@@ -58738,7 +59254,7 @@ var commands52 = [
58738
59254
  ];
58739
59255
 
58740
59256
  // src/commands/space.ts
58741
- var commands53 = [
59257
+ var commands54 = [
58742
59258
  {
58743
59259
  spec: {
58744
59260
  path: ["space", "address"],
@@ -58794,7 +59310,7 @@ var commands53 = [
58794
59310
  ];
58795
59311
 
58796
59312
  // src/commands/tap-tags.ts
58797
- var commands54 = [
59313
+ var commands55 = [
58798
59314
  {
58799
59315
  spec: {
58800
59316
  path: ["tap-tags", "tap"],
@@ -58822,7 +59338,7 @@ var BY = {
58822
59338
  type: "string",
58823
59339
  description: "The blocking task's ref (DO-147) or ULID."
58824
59340
  };
58825
- var commands55 = [
59341
+ var commands56 = [
58826
59342
  defineCommand({
58827
59343
  operation: taskBlockOperations.addBlocker,
58828
59344
  path: ["tasks", "block"],
@@ -58888,7 +59404,7 @@ function renderSeries(data, mode) {
58888
59404
  }).join(`
58889
59405
  `);
58890
59406
  }
58891
- var commands56 = [
59407
+ var commands57 = [
58892
59408
  defineCommand({
58893
59409
  operation: taskSeriesOperations.make,
58894
59410
  path: ["tasks", "make-series"],
@@ -59043,7 +59559,7 @@ function repeatFromFlags(flags) {
59043
59559
  out.anchor = "from_completion";
59044
59560
  return out;
59045
59561
  }
59046
- var commands57 = [
59562
+ var commands58 = [
59047
59563
  {
59048
59564
  spec: {
59049
59565
  path: ["capture"],
@@ -59501,7 +60017,7 @@ var commands57 = [
59501
60017
  ];
59502
60018
 
59503
60019
  // src/commands/time-blocks.ts
59504
- var commands58 = [
60020
+ var commands59 = [
59505
60021
  {
59506
60022
  spec: {
59507
60023
  path: ["time-blocks", "record"],
@@ -59693,7 +60209,7 @@ function renderLandedCounts(data, mode) {
59693
60209
  return out.join(`
59694
60210
  `);
59695
60211
  }
59696
- var commands59 = [
60212
+ var commands60 = [
59697
60213
  {
59698
60214
  spec: {
59699
60215
  path: ["today"],
@@ -60065,7 +60581,7 @@ function renderViews(data, mode) {
60065
60581
  function renderView(data, mode) {
60066
60582
  return renderViews([data], mode);
60067
60583
  }
60068
- var commands60 = [
60584
+ var commands61 = [
60069
60585
  defineCommand({
60070
60586
  operation: workViewOperations.list,
60071
60587
  path: ["views", "list"],
@@ -60184,7 +60700,7 @@ var commands60 = [
60184
60700
  ];
60185
60701
 
60186
60702
  // src/commands/worktree-links.ts
60187
- var commands61 = [
60703
+ var commands62 = [
60188
60704
  {
60189
60705
  spec: {
60190
60706
  path: ["worktree-links", "list"],
@@ -60351,7 +60867,8 @@ var FEATURE_COMMANDS = [
60351
60867
  ...commands58,
60352
60868
  ...commands59,
60353
60869
  ...commands60,
60354
- ...commands61
60870
+ ...commands61,
60871
+ ...commands62
60355
60872
  ];
60356
60873
 
60357
60874
  // src/registry.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.386.0",
3
+ "version": "1.388.0",
4
4
  "private": false,
5
5
  "description": "do — the agent-drivable CLI over the public /api/v1 surface",
6
6
  "homepage": "https://github.com/robbeverhelst/do/tree/main/apps/cli",