@robbeverhelst/do 1.389.0 → 1.391.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 +376 -334
  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.389.0";
14423
+ var VERSION = "1.391.0";
14424
14424
  var API_PREFIX = "/api/v1";
14425
14425
  var DEFAULT_API_URL = "http://localhost:3001";
14426
14426
 
@@ -18260,6 +18260,7 @@ var userSettings = pgTable("user_settings", {
18260
18260
  themePack: settingsThemePack("theme_pack").notNull().default("do"),
18261
18261
  themePackScope: settingsThemePackScope("theme_pack_scope").notNull().default("section"),
18262
18262
  ui: settingsUi("ui").notNull().default("v1"),
18263
+ healthTodayHints: text("health_today_hints").array().notNull().default(sql`'{supplements,sleep}'::text[]`),
18263
18264
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
18264
18265
  updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
18265
18266
  }, (t) => [unique("user_settings_tenant_user_uniq").on(t.tenantId, t.userId)]);
@@ -18515,6 +18516,7 @@ var keyDates = pgTable("key_dates", {
18515
18516
  derivedFrom: text("derived_from"),
18516
18517
  source: text("source").notNull().default("manual"),
18517
18518
  confirmedAt: timestamp("confirmed_at", { withTimezone: true }),
18519
+ bookedAt: timestamp("booked_at", { withTimezone: true }),
18518
18520
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
18519
18521
  updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
18520
18522
  }, (t) => [
@@ -20855,6 +20857,7 @@ var keyDateRepeatSchema = _enum2(["yearly"]);
20855
20857
  var keyDateSchema = createSelectSchema(keyDates, {
20856
20858
  date: keyDateDaySchema,
20857
20859
  confirmedAt: exports_coerce.date().nullable(),
20860
+ bookedAt: exports_coerce.date().nullish(),
20858
20861
  createdAt: exports_coerce.date(),
20859
20862
  updatedAt: exports_coerce.date()
20860
20863
  });
@@ -20884,7 +20887,8 @@ var createKeyDateInputSchema = object({
20884
20887
  leadDays: leadDaysSchema.optional(),
20885
20888
  derivedFrom: string2().trim().min(1).max(120).nullish(),
20886
20889
  source: sourceSchema.optional(),
20887
- confirmed: boolean2().optional()
20890
+ confirmed: boolean2().optional(),
20891
+ bookedAt: exports_coerce.date().nullish()
20888
20892
  }).strict();
20889
20893
  var updateKeyDateInputSchema = object({
20890
20894
  kind: keyDateKindSchema.optional(),
@@ -20895,8 +20899,10 @@ var updateKeyDateInputSchema = object({
20895
20899
  leadDays: leadDaysSchema.optional(),
20896
20900
  derivedFrom: string2().trim().min(1).max(120).nullish(),
20897
20901
  source: sourceSchema.optional(),
20898
- confirmed: boolean2().optional()
20902
+ confirmed: boolean2().optional(),
20903
+ bookedAt: exports_coerce.date().nullish()
20899
20904
  }).strict();
20905
+ var keyDateBookingInputSchema = object({ bookedAt: exports_coerce.date().nullable() }).strict();
20900
20906
  var keyDatesQuerySchema = object({
20901
20907
  nodeId: ulidSchema.optional(),
20902
20908
  kind: keyDateKindSchema.optional(),
@@ -23940,7 +23946,8 @@ var collectionTypeValues = [
23940
23946
  "wine",
23941
23947
  "wardrobe",
23942
23948
  "asset",
23943
- "hobby"
23949
+ "hobby",
23950
+ "console"
23944
23951
  ];
23945
23952
  var collectionTypeSchema = _enum2(collectionTypeValues);
23946
23953
  var collectionViewValues = ["grid", "shelf", "map"];
@@ -29306,75 +29313,340 @@ var healthCycleShares = pgTable("health_cycle_shares", {
29306
29313
  updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
29307
29314
  }, (t) => [primaryKey({ columns: [t.tenantId, t.userId] })]);
29308
29315
 
29309
- // ../../packages/schema/src/contracts/health-records.ts
29310
- var BODY_REGION_VALUES = [
29311
- "head",
29312
- "face",
29313
- "eyes",
29314
- "ears",
29315
- "nose",
29316
- "mouth",
29317
- "throat",
29318
- "neck",
29319
- "chest",
29320
- "upper_back",
29321
- "lower_back",
29322
- "epigastric",
29323
- "ruq",
29324
- "luq",
29325
- "periumbilical",
29326
- "rlq",
29327
- "llq",
29328
- "lower_abdomen",
29329
- "pelvis",
29330
- "shoulder_l",
29331
- "shoulder_r",
29332
- "arm_l",
29333
- "arm_r",
29334
- "elbow_l",
29335
- "elbow_r",
29336
- "wrist_l",
29337
- "wrist_r",
29338
- "hand_l",
29339
- "hand_r",
29340
- "hip_l",
29341
- "hip_r",
29342
- "thigh_l",
29343
- "thigh_r",
29344
- "knee_l",
29345
- "knee_r",
29346
- "calf_l",
29347
- "calf_r",
29348
- "ankle_l",
29349
- "ankle_r",
29350
- "foot_l",
29351
- "foot_r",
29352
- "skin",
29353
- "whole_body"
29316
+ // ../../packages/schema/src/contracts/modules.ts
29317
+ var MODULE_KEYS = [
29318
+ "tasks",
29319
+ "habits",
29320
+ "routines",
29321
+ "challenges",
29322
+ "projects",
29323
+ "areas",
29324
+ "notes",
29325
+ "shopping",
29326
+ "inventory",
29327
+ "meals",
29328
+ "animals",
29329
+ "contacts",
29330
+ "sharing",
29331
+ "automations"
29354
29332
  ];
29355
- var bodyRegionSchema = _enum2(BODY_REGION_VALUES);
29356
- var RED_FLAG_VALUES = [
29357
- "fever",
29358
- "vomiting",
29359
- "black_stools",
29360
- "blood",
29361
- "weight_loss",
29362
- "night_pain",
29363
- "chest_pain",
29364
- "short_of_breath"
29333
+ var moduleKeySchema = _enum2(MODULE_KEYS);
29334
+ var FEATURE_MODULES = [
29335
+ {
29336
+ key: "today",
29337
+ label: "Today",
29338
+ description: "Your daily dashboard \u2014 always on.",
29339
+ group: "System",
29340
+ defaultEnabled: true,
29341
+ system: true
29342
+ },
29343
+ {
29344
+ key: "inbox",
29345
+ label: "Inbox",
29346
+ description: "Quick capture and triage \u2014 always on.",
29347
+ group: "System",
29348
+ defaultEnabled: true,
29349
+ system: true
29350
+ },
29351
+ {
29352
+ key: "settings",
29353
+ label: "Settings",
29354
+ description: "This screen \u2014 always on.",
29355
+ group: "System",
29356
+ defaultEnabled: true,
29357
+ system: true
29358
+ },
29359
+ {
29360
+ key: "tasks",
29361
+ label: "Tasks",
29362
+ description: "To-dos, due dates, and starred focus.",
29363
+ group: "Track",
29364
+ defaultEnabled: true
29365
+ },
29366
+ {
29367
+ key: "habits",
29368
+ label: "Habits",
29369
+ description: "Daily routines and streaks.",
29370
+ group: "Track",
29371
+ defaultEnabled: true
29372
+ },
29373
+ {
29374
+ key: "routines",
29375
+ label: "Routines",
29376
+ description: "Repeatable checklists you run.",
29377
+ group: "Track",
29378
+ defaultEnabled: true
29379
+ },
29380
+ {
29381
+ key: "challenges",
29382
+ label: "Challenges",
29383
+ description: "Time-boxed goals and competitions.",
29384
+ group: "Track",
29385
+ defaultEnabled: false
29386
+ },
29387
+ {
29388
+ key: "projects",
29389
+ label: "Projects",
29390
+ description: "Multi-step work with milestones.",
29391
+ group: "Organize",
29392
+ defaultEnabled: true
29393
+ },
29394
+ {
29395
+ key: "areas",
29396
+ label: "Areas",
29397
+ description: "Ongoing life domains (PARA areas).",
29398
+ group: "Organize",
29399
+ defaultEnabled: true
29400
+ },
29401
+ {
29402
+ key: "notes",
29403
+ label: "Notes",
29404
+ description: "Quick notes and documents.",
29405
+ group: "Organize",
29406
+ defaultEnabled: true
29407
+ },
29408
+ {
29409
+ key: "shopping",
29410
+ label: "Shopping",
29411
+ description: "Lists and groceries.",
29412
+ group: "Household",
29413
+ defaultEnabled: true
29414
+ },
29415
+ {
29416
+ key: "inventory",
29417
+ label: "Inventory",
29418
+ description: "Things you own and stock.",
29419
+ group: "Household",
29420
+ defaultEnabled: true
29421
+ },
29422
+ {
29423
+ key: "meals",
29424
+ label: "Meals",
29425
+ description: "Recipes and meal plans.",
29426
+ group: "Household",
29427
+ defaultEnabled: false
29428
+ },
29429
+ {
29430
+ key: "animals",
29431
+ label: "Animals",
29432
+ description: "Pets and flocks: eggs, weights, feed and care.",
29433
+ group: "Household",
29434
+ defaultEnabled: false
29435
+ },
29436
+ {
29437
+ key: "contacts",
29438
+ label: "Contacts",
29439
+ description: "People and relationships.",
29440
+ group: "People",
29441
+ defaultEnabled: false
29442
+ },
29443
+ {
29444
+ key: "sharing",
29445
+ label: "Members & sharing",
29446
+ description: "Members, roles, per-item sharing and comments.",
29447
+ group: "People",
29448
+ defaultEnabled: false
29449
+ },
29450
+ {
29451
+ key: "automations",
29452
+ label: "Automations",
29453
+ description: "Trigger \u2192 condition \u2192 action rules.",
29454
+ group: "Manage",
29455
+ defaultEnabled: false
29456
+ }
29365
29457
  ];
29366
- var redFlagSchema = _enum2(RED_FLAG_VALUES);
29367
- var redFlagsSchema = partialRecord(redFlagSchema, boolean2());
29368
- var HEALTH_CONDITION_STATUS_VALUES = [
29369
- "active",
29370
- "managed",
29371
- "resolved",
29372
- "suspected"
29458
+ var TOGGLEABLE_MODULES = FEATURE_MODULES.filter((m) => !m.system);
29459
+ function isModuleKey(value) {
29460
+ return MODULE_KEYS.includes(value);
29461
+ }
29462
+ function defaultEnabledModules() {
29463
+ return TOGGLEABLE_MODULES.filter((m) => m.defaultEnabled).map((m) => m.key);
29464
+ }
29465
+ function normalizeEnabledModules(keys) {
29466
+ const present = new Set(keys.filter(isModuleKey));
29467
+ return MODULE_KEYS.filter((key) => present.has(key));
29468
+ }
29469
+ function effectiveEnabledModules(enabled) {
29470
+ const known = normalizeEnabledModules(enabled ?? []);
29471
+ return known.length > 0 ? known : defaultEnabledModules();
29472
+ }
29473
+ function setModuleEnabled(enabled, key, on) {
29474
+ const next = new Set(effectiveEnabledModules(enabled));
29475
+ if (on)
29476
+ next.add(key);
29477
+ else
29478
+ next.delete(key);
29479
+ return MODULE_KEYS.filter((candidate) => next.has(candidate));
29480
+ }
29481
+
29482
+ // ../../packages/schema/src/contracts/settings.ts
29483
+ var clockTimeSchema = string2().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "a time like 22:00");
29484
+ var quietHoursSchema = object({
29485
+ from: clockTimeSchema,
29486
+ until: clockTimeSchema,
29487
+ days: array(number2().int().min(0).max(6)).max(7)
29488
+ });
29489
+ var PINNED_AREAS_MAX = 5;
29490
+ var PILL_PAGES = [
29491
+ "now",
29492
+ "habits",
29493
+ "tasks",
29494
+ "calendar",
29495
+ "areas",
29496
+ "house",
29497
+ "collection",
29498
+ "animals",
29499
+ "notes",
29500
+ "progress",
29501
+ "landed",
29502
+ "review",
29503
+ "agents",
29504
+ "profile",
29505
+ "settings",
29506
+ "alerts",
29507
+ "trash"
29373
29508
  ];
29374
- var healthConditionStatusSchema = _enum2(HEALTH_CONDITION_STATUS_VALUES);
29375
- var HEALTH_EPISODE_STATUS_VALUES = ["open", "watching", "resolved"];
29376
- var healthEpisodeStatusSchema = _enum2(HEALTH_EPISODE_STATUS_VALUES);
29377
- var HEALTH_ENCOUNTER_KIND_VALUES = [
29509
+ var pillPageSchema = _enum2(PILL_PAGES);
29510
+ var PILL_PAGES_MAX = 4;
29511
+ var CALENDAR_ZOOM_MIN = 75;
29512
+ var CALENDAR_ZOOM_MAX = 300;
29513
+ var calendarZoomSchema = number2().int().min(CALENDAR_ZOOM_MIN).max(CALENDAR_ZOOM_MAX);
29514
+ var settingsGlassSchema = _enum2(settingsGlass.enumValues);
29515
+ var themePackSchema = _enum2(settingsThemePack.enumValues);
29516
+ var themePackScopeSchema = _enum2(settingsThemePackScope.enumValues);
29517
+ var settingsUiSchema = _enum2(settingsUi.enumValues);
29518
+ var HEALTH_TODAY_HINTS = ["supplements", "sleep", "appointment", "episode"];
29519
+ var healthTodayHintSchema = _enum2(HEALTH_TODAY_HINTS);
29520
+ var HEALTH_TODAY_HINTS_DEFAULT = ["supplements", "sleep"];
29521
+ var userSettingsSchema = createSelectSchema(userSettings, {
29522
+ pinnedAreaIds: array(string2()).default([]),
29523
+ focusAreaId: string2().nullable().default(null),
29524
+ focusUntil: exports_coerce.date().nullable().default(null),
29525
+ quietHours: quietHoursSchema.nullable().default(null),
29526
+ notifications: record(string2(), unknown()).nullable().default(null),
29527
+ lifeBlockSharing: lifeBlockSharingSchema.nullable().default(null),
29528
+ pillPages: array(string2()).default([]).transform((ids) => ids.filter((id) => pillPageSchema.safeParse(id).success)),
29529
+ foodDiaryMode: boolean2().default(false),
29530
+ calendarZoom: number2().int().nullable().default(null),
29531
+ glass: settingsGlassSchema.default("liquid"),
29532
+ followSky: boolean2().default(true),
29533
+ nightUntilWake: boolean2().default(false),
29534
+ largerText: boolean2().default(false),
29535
+ reduceMotion: boolean2().default(false),
29536
+ showStreakNumbers: boolean2().default(true),
29537
+ themePack: themePackSchema.default("do"),
29538
+ themePackScope: themePackScopeSchema.default("section"),
29539
+ ui: settingsUiSchema.default("v1"),
29540
+ healthTodayHints: array(string2()).default([...HEALTH_TODAY_HINTS_DEFAULT]).transform((ids) => ids.filter((id) => healthTodayHintSchema.safeParse(id).success)),
29541
+ createdAt: exports_coerce.date(),
29542
+ updatedAt: exports_coerce.date()
29543
+ }).omit({ autoRollOverdue: true });
29544
+ var updateUserSettingsInputSchema = createUpdateSchema(userSettings, {
29545
+ displayName: string2().trim().max(80).nullish(),
29546
+ avatarUrl: union([string2().url().max(2048), literal("")]).nullish(),
29547
+ timezone: string2().min(1).optional(),
29548
+ locale: string2().min(1).optional(),
29549
+ theme: settingsThemeSchema.optional(),
29550
+ density: settingsDensitySchema.optional(),
29551
+ accent: settingsAccentSchema.optional(),
29552
+ sunCity: string2().trim().max(80).transform((city) => city === "" ? null : city).nullish(),
29553
+ backdrop: backdropIdSchema.nullish(),
29554
+ enabledModules: array(string2().trim().min(1)).transform(normalizeEnabledModules).optional(),
29555
+ pinnedAreaIds: array(ulidSchema).transform((ids) => [...new Set(ids)]).pipe(array(ulidSchema).max(PINNED_AREAS_MAX)).optional(),
29556
+ focusAreaId: ulidSchema.nullish(),
29557
+ quietHours: quietHoursSchema.nullish(),
29558
+ lifeBlockSharing: lifeBlockSharingSchema.nullish(),
29559
+ calendarZoom: calendarZoomSchema.nullish(),
29560
+ pillPages: array(pillPageSchema).transform((ids) => [...new Set(ids)]).pipe(array(pillPageSchema).max(PILL_PAGES_MAX)).optional(),
29561
+ glass: settingsGlassSchema.optional(),
29562
+ followSky: boolean2().optional(),
29563
+ nightUntilWake: boolean2().optional(),
29564
+ largerText: boolean2().optional(),
29565
+ reduceMotion: boolean2().optional(),
29566
+ showStreakNumbers: boolean2().optional(),
29567
+ themePack: themePackSchema.optional(),
29568
+ themePackScope: themePackScopeSchema.optional(),
29569
+ ui: settingsUiSchema.optional(),
29570
+ healthTodayHints: array(healthTodayHintSchema).transform((ids) => HEALTH_TODAY_HINTS.filter((id) => ids.includes(id))).optional()
29571
+ }).omit({
29572
+ id: true,
29573
+ tenantId: true,
29574
+ userId: true,
29575
+ createdAt: true,
29576
+ updatedAt: true,
29577
+ autoRollOverdue: true,
29578
+ focusUntil: true
29579
+ }).strict();
29580
+
29581
+ // ../../packages/schema/src/contracts/health-records.ts
29582
+ var BODY_REGION_VALUES = [
29583
+ "head",
29584
+ "face",
29585
+ "eyes",
29586
+ "ears",
29587
+ "nose",
29588
+ "mouth",
29589
+ "throat",
29590
+ "neck",
29591
+ "chest",
29592
+ "upper_back",
29593
+ "lower_back",
29594
+ "epigastric",
29595
+ "ruq",
29596
+ "luq",
29597
+ "periumbilical",
29598
+ "rlq",
29599
+ "llq",
29600
+ "lower_abdomen",
29601
+ "pelvis",
29602
+ "shoulder_l",
29603
+ "shoulder_r",
29604
+ "arm_l",
29605
+ "arm_r",
29606
+ "elbow_l",
29607
+ "elbow_r",
29608
+ "wrist_l",
29609
+ "wrist_r",
29610
+ "hand_l",
29611
+ "hand_r",
29612
+ "hip_l",
29613
+ "hip_r",
29614
+ "thigh_l",
29615
+ "thigh_r",
29616
+ "knee_l",
29617
+ "knee_r",
29618
+ "calf_l",
29619
+ "calf_r",
29620
+ "ankle_l",
29621
+ "ankle_r",
29622
+ "foot_l",
29623
+ "foot_r",
29624
+ "skin",
29625
+ "whole_body"
29626
+ ];
29627
+ var bodyRegionSchema = _enum2(BODY_REGION_VALUES);
29628
+ var RED_FLAG_VALUES = [
29629
+ "fever",
29630
+ "vomiting",
29631
+ "black_stools",
29632
+ "blood",
29633
+ "weight_loss",
29634
+ "night_pain",
29635
+ "chest_pain",
29636
+ "short_of_breath"
29637
+ ];
29638
+ var redFlagSchema = _enum2(RED_FLAG_VALUES);
29639
+ var redFlagsSchema = partialRecord(redFlagSchema, boolean2());
29640
+ var HEALTH_CONDITION_STATUS_VALUES = [
29641
+ "active",
29642
+ "managed",
29643
+ "resolved",
29644
+ "suspected"
29645
+ ];
29646
+ var healthConditionStatusSchema = _enum2(HEALTH_CONDITION_STATUS_VALUES);
29647
+ var HEALTH_EPISODE_STATUS_VALUES = ["open", "watching", "resolved"];
29648
+ var healthEpisodeStatusSchema = _enum2(HEALTH_EPISODE_STATUS_VALUES);
29649
+ var HEALTH_ENCOUNTER_KIND_VALUES = [
29378
29650
  "gp",
29379
29651
  "specialist",
29380
29652
  "physio",
@@ -29582,6 +29854,14 @@ var updateHealthProfileInputSchema = object({
29582
29854
  emergencyContactId: ulidSchema.nullish(),
29583
29855
  primaryGpContactId: ulidSchema.nullish()
29584
29856
  }).strict();
29857
+ var healthTodaySchema = object({
29858
+ hints: array(healthTodayHintSchema),
29859
+ on: boolean2(),
29860
+ supplementHabitIds: array(string2()),
29861
+ sleep: object({ hours: number2() }).nullable(),
29862
+ appointment: object({ id: string2(), title: string2(), at: exports_coerce.date() }).nullable(),
29863
+ episode: object({ id: string2(), title: string2(), startedAt: exports_coerce.date() }).nullable()
29864
+ });
29585
29865
  var grantHealthConsentInputSchema = object({ version: literal(HEALTH_CONSENT_VERSION) }).strict();
29586
29866
  var HEALTH_ERASE_PHRASE = "delete my health data";
29587
29867
  var eraseHealthDataInputSchema = object({ confirm: literal(HEALTH_ERASE_PHRASE) }).strict();
@@ -37982,7 +38262,7 @@ var planningRules = pgTable("planning_rules", {
37982
38262
  var PLANNING_RULE_KINDS = planningRuleKind.enumValues;
37983
38263
  var planningRuleKindSchema = _enum2(PLANNING_RULE_KINDS);
37984
38264
  var PLANNING_RULE_SENTENCE_MAX = 280;
37985
- var clockTimeSchema = string2().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "expected HH:MM (24 h)");
38265
+ var clockTimeSchema2 = string2().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "expected HH:MM (24 h)");
37986
38266
  var ruleWeekdaysSchema = array(number2().int().min(1).max(7)).min(1).max(7).transform((days) => [...new Set(days)].sort((a, b) => a - b));
37987
38267
  var phraseSchema = string2().trim().min(1).max(80);
37988
38268
  function clockMinutes(clock) {
@@ -37993,15 +38273,15 @@ var fixedTimeRuleSchema = object({
37993
38273
  kind: literal("fixed_time"),
37994
38274
  what: phraseSchema,
37995
38275
  days: ruleWeekdaysSchema,
37996
- at: clockTimeSchema,
38276
+ at: clockTimeSchema2,
37997
38277
  minutes: number2().int().min(5).max(24 * 60).default(60),
37998
38278
  lifeKind: lifeBlockKindSchema.optional()
37999
38279
  }).strict();
38000
38280
  var keepFreeRuleSchema = object({
38001
38281
  kind: literal("keep_free"),
38002
38282
  days: ruleWeekdaysSchema,
38003
- from: clockTimeSchema,
38004
- to: clockTimeSchema,
38283
+ from: clockTimeSchema2,
38284
+ to: clockTimeSchema2,
38005
38285
  what: phraseSchema.optional()
38006
38286
  }).strict().refine((r) => clockMinutes(r.to) > clockMinutes(r.from), {
38007
38287
  message: "`to` comes after `from`",
@@ -40863,266 +41143,6 @@ var sensorOperations = defineOperations({
40863
41143
  }
40864
41144
  });
40865
41145
 
40866
- // ../../packages/schema/src/contracts/modules.ts
40867
- var MODULE_KEYS = [
40868
- "tasks",
40869
- "habits",
40870
- "routines",
40871
- "challenges",
40872
- "projects",
40873
- "areas",
40874
- "notes",
40875
- "shopping",
40876
- "inventory",
40877
- "meals",
40878
- "animals",
40879
- "contacts",
40880
- "sharing",
40881
- "automations"
40882
- ];
40883
- var moduleKeySchema = _enum2(MODULE_KEYS);
40884
- var FEATURE_MODULES = [
40885
- {
40886
- key: "today",
40887
- label: "Today",
40888
- description: "Your daily dashboard \u2014 always on.",
40889
- group: "System",
40890
- defaultEnabled: true,
40891
- system: true
40892
- },
40893
- {
40894
- key: "inbox",
40895
- label: "Inbox",
40896
- description: "Quick capture and triage \u2014 always on.",
40897
- group: "System",
40898
- defaultEnabled: true,
40899
- system: true
40900
- },
40901
- {
40902
- key: "settings",
40903
- label: "Settings",
40904
- description: "This screen \u2014 always on.",
40905
- group: "System",
40906
- defaultEnabled: true,
40907
- system: true
40908
- },
40909
- {
40910
- key: "tasks",
40911
- label: "Tasks",
40912
- description: "To-dos, due dates, and starred focus.",
40913
- group: "Track",
40914
- defaultEnabled: true
40915
- },
40916
- {
40917
- key: "habits",
40918
- label: "Habits",
40919
- description: "Daily routines and streaks.",
40920
- group: "Track",
40921
- defaultEnabled: true
40922
- },
40923
- {
40924
- key: "routines",
40925
- label: "Routines",
40926
- description: "Repeatable checklists you run.",
40927
- group: "Track",
40928
- defaultEnabled: true
40929
- },
40930
- {
40931
- key: "challenges",
40932
- label: "Challenges",
40933
- description: "Time-boxed goals and competitions.",
40934
- group: "Track",
40935
- defaultEnabled: false
40936
- },
40937
- {
40938
- key: "projects",
40939
- label: "Projects",
40940
- description: "Multi-step work with milestones.",
40941
- group: "Organize",
40942
- defaultEnabled: true
40943
- },
40944
- {
40945
- key: "areas",
40946
- label: "Areas",
40947
- description: "Ongoing life domains (PARA areas).",
40948
- group: "Organize",
40949
- defaultEnabled: true
40950
- },
40951
- {
40952
- key: "notes",
40953
- label: "Notes",
40954
- description: "Quick notes and documents.",
40955
- group: "Organize",
40956
- defaultEnabled: true
40957
- },
40958
- {
40959
- key: "shopping",
40960
- label: "Shopping",
40961
- description: "Lists and groceries.",
40962
- group: "Household",
40963
- defaultEnabled: true
40964
- },
40965
- {
40966
- key: "inventory",
40967
- label: "Inventory",
40968
- description: "Things you own and stock.",
40969
- group: "Household",
40970
- defaultEnabled: true
40971
- },
40972
- {
40973
- key: "meals",
40974
- label: "Meals",
40975
- description: "Recipes and meal plans.",
40976
- group: "Household",
40977
- defaultEnabled: false
40978
- },
40979
- {
40980
- key: "animals",
40981
- label: "Animals",
40982
- description: "Pets and flocks: eggs, weights, feed and care.",
40983
- group: "Household",
40984
- defaultEnabled: false
40985
- },
40986
- {
40987
- key: "contacts",
40988
- label: "Contacts",
40989
- description: "People and relationships.",
40990
- group: "People",
40991
- defaultEnabled: false
40992
- },
40993
- {
40994
- key: "sharing",
40995
- label: "Members & sharing",
40996
- description: "Members, roles, per-item sharing and comments.",
40997
- group: "People",
40998
- defaultEnabled: false
40999
- },
41000
- {
41001
- key: "automations",
41002
- label: "Automations",
41003
- description: "Trigger \u2192 condition \u2192 action rules.",
41004
- group: "Manage",
41005
- defaultEnabled: false
41006
- }
41007
- ];
41008
- var TOGGLEABLE_MODULES = FEATURE_MODULES.filter((m) => !m.system);
41009
- function isModuleKey(value) {
41010
- return MODULE_KEYS.includes(value);
41011
- }
41012
- function defaultEnabledModules() {
41013
- return TOGGLEABLE_MODULES.filter((m) => m.defaultEnabled).map((m) => m.key);
41014
- }
41015
- function normalizeEnabledModules(keys) {
41016
- const present = new Set(keys.filter(isModuleKey));
41017
- return MODULE_KEYS.filter((key) => present.has(key));
41018
- }
41019
- function effectiveEnabledModules(enabled) {
41020
- const known = normalizeEnabledModules(enabled ?? []);
41021
- return known.length > 0 ? known : defaultEnabledModules();
41022
- }
41023
- function setModuleEnabled(enabled, key, on) {
41024
- const next = new Set(effectiveEnabledModules(enabled));
41025
- if (on)
41026
- next.add(key);
41027
- else
41028
- next.delete(key);
41029
- return MODULE_KEYS.filter((candidate) => next.has(candidate));
41030
- }
41031
-
41032
- // ../../packages/schema/src/contracts/settings.ts
41033
- var clockTimeSchema2 = string2().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "a time like 22:00");
41034
- var quietHoursSchema = object({
41035
- from: clockTimeSchema2,
41036
- until: clockTimeSchema2,
41037
- days: array(number2().int().min(0).max(6)).max(7)
41038
- });
41039
- var PINNED_AREAS_MAX = 5;
41040
- var PILL_PAGES = [
41041
- "now",
41042
- "habits",
41043
- "tasks",
41044
- "calendar",
41045
- "areas",
41046
- "house",
41047
- "collection",
41048
- "animals",
41049
- "notes",
41050
- "progress",
41051
- "landed",
41052
- "review",
41053
- "agents",
41054
- "profile",
41055
- "settings",
41056
- "alerts",
41057
- "trash"
41058
- ];
41059
- var pillPageSchema = _enum2(PILL_PAGES);
41060
- var PILL_PAGES_MAX = 4;
41061
- var CALENDAR_ZOOM_MIN = 75;
41062
- var CALENDAR_ZOOM_MAX = 300;
41063
- var calendarZoomSchema = number2().int().min(CALENDAR_ZOOM_MIN).max(CALENDAR_ZOOM_MAX);
41064
- var settingsGlassSchema = _enum2(settingsGlass.enumValues);
41065
- var themePackSchema = _enum2(settingsThemePack.enumValues);
41066
- var themePackScopeSchema = _enum2(settingsThemePackScope.enumValues);
41067
- var settingsUiSchema = _enum2(settingsUi.enumValues);
41068
- var userSettingsSchema = createSelectSchema(userSettings, {
41069
- pinnedAreaIds: array(string2()).default([]),
41070
- focusAreaId: string2().nullable().default(null),
41071
- focusUntil: exports_coerce.date().nullable().default(null),
41072
- quietHours: quietHoursSchema.nullable().default(null),
41073
- notifications: record(string2(), unknown()).nullable().default(null),
41074
- lifeBlockSharing: lifeBlockSharingSchema.nullable().default(null),
41075
- pillPages: array(string2()).default([]).transform((ids) => ids.filter((id) => pillPageSchema.safeParse(id).success)),
41076
- foodDiaryMode: boolean2().default(false),
41077
- calendarZoom: number2().int().nullable().default(null),
41078
- glass: settingsGlassSchema.default("liquid"),
41079
- followSky: boolean2().default(true),
41080
- nightUntilWake: boolean2().default(false),
41081
- largerText: boolean2().default(false),
41082
- reduceMotion: boolean2().default(false),
41083
- showStreakNumbers: boolean2().default(true),
41084
- themePack: themePackSchema.default("do"),
41085
- themePackScope: themePackScopeSchema.default("section"),
41086
- ui: settingsUiSchema.default("v1"),
41087
- createdAt: exports_coerce.date(),
41088
- updatedAt: exports_coerce.date()
41089
- }).omit({ autoRollOverdue: true });
41090
- var updateUserSettingsInputSchema = createUpdateSchema(userSettings, {
41091
- displayName: string2().trim().max(80).nullish(),
41092
- avatarUrl: union([string2().url().max(2048), literal("")]).nullish(),
41093
- timezone: string2().min(1).optional(),
41094
- locale: string2().min(1).optional(),
41095
- theme: settingsThemeSchema.optional(),
41096
- density: settingsDensitySchema.optional(),
41097
- accent: settingsAccentSchema.optional(),
41098
- sunCity: string2().trim().max(80).transform((city) => city === "" ? null : city).nullish(),
41099
- backdrop: backdropIdSchema.nullish(),
41100
- enabledModules: array(string2().trim().min(1)).transform(normalizeEnabledModules).optional(),
41101
- pinnedAreaIds: array(ulidSchema).transform((ids) => [...new Set(ids)]).pipe(array(ulidSchema).max(PINNED_AREAS_MAX)).optional(),
41102
- focusAreaId: ulidSchema.nullish(),
41103
- quietHours: quietHoursSchema.nullish(),
41104
- lifeBlockSharing: lifeBlockSharingSchema.nullish(),
41105
- calendarZoom: calendarZoomSchema.nullish(),
41106
- pillPages: array(pillPageSchema).transform((ids) => [...new Set(ids)]).pipe(array(pillPageSchema).max(PILL_PAGES_MAX)).optional(),
41107
- glass: settingsGlassSchema.optional(),
41108
- followSky: boolean2().optional(),
41109
- nightUntilWake: boolean2().optional(),
41110
- largerText: boolean2().optional(),
41111
- reduceMotion: boolean2().optional(),
41112
- showStreakNumbers: boolean2().optional(),
41113
- themePack: themePackSchema.optional(),
41114
- themePackScope: themePackScopeSchema.optional(),
41115
- ui: settingsUiSchema.optional()
41116
- }).omit({
41117
- id: true,
41118
- tenantId: true,
41119
- userId: true,
41120
- createdAt: true,
41121
- updatedAt: true,
41122
- autoRollOverdue: true,
41123
- focusUntil: true
41124
- }).strict();
41125
-
41126
41146
  // ../../packages/schema/src/operations/settings.ts
41127
41147
  var settingsOperations = defineOperations({
41128
41148
  get: {
@@ -43241,6 +43261,18 @@ var hobbyFacetSchema = object({
43241
43261
  with: string2().min(1).max(80).nullish(),
43242
43262
  coverUrl
43243
43263
  }).strict();
43264
+ var consoleFacetSchema = object({
43265
+ model: string2().min(1).max(120).nullish(),
43266
+ region: string2().min(1).max(40).nullish(),
43267
+ condition: string2().min(1).max(80).nullish(),
43268
+ boxed: boolean2().nullish(),
43269
+ extras: string2().min(1).max(200).nullish(),
43270
+ year: number2().int().min(1950).max(2100).nullish(),
43271
+ works: boolean2().nullish(),
43272
+ fixNote: string2().min(1).max(200).nullish(),
43273
+ plays: array(string2().trim().min(1).max(40)).max(12).nullish(),
43274
+ coverUrl
43275
+ }).strict();
43244
43276
  var placeFacetSchema = object({
43245
43277
  address: string2().min(1).max(400).nullish(),
43246
43278
  lat: number2().min(-90).max(90).nullish(),
@@ -43477,6 +43509,16 @@ var COLLECTION_TYPES = {
43477
43509
  facetSchema: hobbyFacetSchema,
43478
43510
  view: "grid",
43479
43511
  subtitleKey: "kind"
43512
+ },
43513
+ console: {
43514
+ key: "console",
43515
+ label: "Consoles",
43516
+ itemNoun: "console",
43517
+ statuses: ["want", "doing", "have", "done"],
43518
+ statusLabels: { want: "Wanted", doing: "Hooked up", have: "In the cupboard", done: "Retired" },
43519
+ facetSchema: consoleFacetSchema,
43520
+ view: "grid",
43521
+ subtitleKey: "model"
43480
43522
  }
43481
43523
  };
43482
43524
  var COLLECTION_TYPE_LIST = collectionTypeValues.map((k) => COLLECTION_TYPES[k]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.389.0",
3
+ "version": "1.391.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",