@robbeverhelst/do 1.27.0 → 1.29.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 +830 -5
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -19653,7 +19653,8 @@ var createHabitInputSchema = exports_external.object({
19653
19653
  targetUnit: exports_external.string().min(1).nullish(),
19654
19654
  period: habitPeriodSchema.default("day"),
19655
19655
  frequencyCount: exports_external.number().int().positive().default(1),
19656
- areaId: ulidSchema.nullish()
19656
+ areaId: ulidSchema.nullish(),
19657
+ displayKind: exports_external.string().min(1).nullish()
19657
19658
  });
19658
19659
  var updateHabitInputSchema = exports_external.object({
19659
19660
  title: exports_external.string().min(1),
@@ -21062,7 +21063,18 @@ function parseCapture(input) {
21062
21063
  return { title, tags, ...priority ? { priority } : {}, ...area ? { area } : {} };
21063
21064
  }
21064
21065
  // ../../packages/schema/src/presets/recipe.ts
21065
- var presetEntitySchema = exports_external.enum(["habit", "list", "inventory"]);
21066
+ var presetEntitySchema = exports_external.enum([
21067
+ "habit",
21068
+ "list",
21069
+ "inventory",
21070
+ "routine",
21071
+ "area",
21072
+ "project",
21073
+ "recipe",
21074
+ "contact",
21075
+ "challenge",
21076
+ "automation"
21077
+ ]);
21066
21078
  var recipeNodeBase = {
21067
21079
  ref: exports_external.string().min(1),
21068
21080
  parentRef: exports_external.string().min(1).nullish()
@@ -21100,10 +21112,89 @@ var recipeInventoryNodeSchema = exports_external.object({
21100
21112
  location: exports_external.string().min(1).nullish(),
21101
21113
  lowStockThreshold: exports_external.number().min(0).nullish()
21102
21114
  });
21115
+ var recipeRoutineStepSchema = exports_external.object({
21116
+ title: exports_external.string().min(1),
21117
+ durationMinutes: exports_external.number().int().positive().nullish(),
21118
+ notes: exports_external.string().min(1).nullish()
21119
+ });
21120
+ var recipeRoutineNodeSchema = exports_external.object({
21121
+ ...recipeNodeBase,
21122
+ kind: exports_external.literal("routine"),
21123
+ title: exports_external.string().min(1),
21124
+ routineKind: routineKindSchema.optional(),
21125
+ notes: exports_external.string().min(1).nullish(),
21126
+ steps: exports_external.array(recipeRoutineStepSchema).optional()
21127
+ });
21128
+ var recipeAreaNodeSchema = exports_external.object({
21129
+ ...recipeNodeBase,
21130
+ kind: exports_external.literal("area"),
21131
+ title: exports_external.string().min(1),
21132
+ color: areaColorSchema.optional(),
21133
+ icon: exports_external.string().min(1).nullish(),
21134
+ reviewCadence: reviewCadenceSchema.nullish()
21135
+ });
21136
+ var recipeProjectNodeSchema = exports_external.object({
21137
+ ...recipeNodeBase,
21138
+ kind: exports_external.literal("project"),
21139
+ title: exports_external.string().min(1),
21140
+ status: projectStatusSchema.optional(),
21141
+ notes: exports_external.string().min(1).nullish(),
21142
+ milestones: exports_external.array(exports_external.object({ title: exports_external.string().min(1) })).optional()
21143
+ });
21144
+ var recipeIngredientItemSchema = exports_external.object({
21145
+ name: exports_external.string().min(1),
21146
+ quantity: exports_external.number().positive().nullish(),
21147
+ unit: exports_external.string().min(1).nullish()
21148
+ });
21149
+ var recipeRecipeNodeSchema = exports_external.object({
21150
+ ...recipeNodeBase,
21151
+ kind: exports_external.literal("recipe"),
21152
+ title: exports_external.string().min(1),
21153
+ description: exports_external.string().min(1).nullish(),
21154
+ instructions: exports_external.string().min(1).nullish(),
21155
+ servings: exports_external.number().int().positive().nullish(),
21156
+ prepMinutes: exports_external.number().int().min(0).nullish(),
21157
+ cookMinutes: exports_external.number().int().min(0).nullish(),
21158
+ tags: exports_external.array(exports_external.string().min(1)).optional(),
21159
+ ingredients: exports_external.array(recipeIngredientItemSchema).optional()
21160
+ });
21161
+ var recipeContactNodeSchema = exports_external.object({
21162
+ ...recipeNodeBase,
21163
+ kind: exports_external.literal("contact"),
21164
+ title: exports_external.string().min(1),
21165
+ company: exports_external.string().min(1).nullish(),
21166
+ notes: exports_external.string().min(1).nullish(),
21167
+ tags: exports_external.array(exports_external.string().min(1)).optional()
21168
+ });
21169
+ var recipeChallengeNodeSchema = exports_external.object({
21170
+ ...recipeNodeBase,
21171
+ kind: exports_external.literal("challenge"),
21172
+ title: exports_external.string().min(1),
21173
+ description: exports_external.string().min(1).nullish(),
21174
+ metric: exports_external.string().min(1),
21175
+ target: exports_external.number().int().positive(),
21176
+ durationDays: exports_external.number().int().positive()
21177
+ });
21178
+ var recipeAutomationNodeSchema = exports_external.object({
21179
+ ...recipeNodeBase,
21180
+ kind: exports_external.literal("automation"),
21181
+ name: exports_external.string().min(1),
21182
+ enabled: exports_external.boolean().optional(),
21183
+ trigger: automationTriggerSchema,
21184
+ condition: automationConditionSchema.nullish(),
21185
+ action: automationActionSchema
21186
+ });
21103
21187
  var recipeNodeSchema = exports_external.discriminatedUnion("kind", [
21104
21188
  recipeHabitNodeSchema,
21105
21189
  recipeShoppingListNodeSchema,
21106
- recipeInventoryNodeSchema
21190
+ recipeInventoryNodeSchema,
21191
+ recipeRoutineNodeSchema,
21192
+ recipeAreaNodeSchema,
21193
+ recipeProjectNodeSchema,
21194
+ recipeRecipeNodeSchema,
21195
+ recipeContactNodeSchema,
21196
+ recipeChallengeNodeSchema,
21197
+ recipeAutomationNodeSchema
21107
21198
  ]);
21108
21199
  var presetRecipeSchema = exports_external.object({
21109
21200
  nodes: exports_external.array(recipeNodeSchema).min(1)
@@ -21117,6 +21208,7 @@ var presetSchema = exports_external.object({
21117
21208
  color: exports_external.string().regex(/^#[0-9a-fA-F]{6}$/),
21118
21209
  category: exports_external.string().min(1),
21119
21210
  displayKind: exports_external.string().min(1).optional(),
21211
+ featured: exports_external.boolean().optional(),
21120
21212
  recipe: presetRecipeSchema
21121
21213
  });
21122
21214
  var presetInstallResultSchema = exports_external.object({
@@ -21125,6 +21217,7 @@ var presetInstallResultSchema = exports_external.object({
21125
21217
  nodeIds: exports_external.array(exports_external.string()),
21126
21218
  nodeCount: exports_external.number().int().nonnegative()
21127
21219
  });
21220
+ var MS_PER_DAY = 24 * 60 * 60 * 1000;
21128
21221
  // ../../packages/schema/src/presets/catalog.ts
21129
21222
  var habitPresets = [
21130
21223
  {
@@ -21136,6 +21229,7 @@ var habitPresets = [
21136
21229
  color: "#38bdf8",
21137
21230
  category: "Health",
21138
21231
  displayKind: "water-cup",
21232
+ featured: true,
21139
21233
  recipe: {
21140
21234
  nodes: [
21141
21235
  {
@@ -21529,6 +21623,7 @@ var shoppingListPresets = listPresetDefs.map((def) => ({
21529
21623
  icon: def.icon,
21530
21624
  color: def.color,
21531
21625
  category: def.category,
21626
+ featured: def.key === "groceries",
21532
21627
  recipe: {
21533
21628
  nodes: [
21534
21629
  { ref: "list", kind: "shopping_list", title: def.title, items: shoppingItems2(...def.items) }
@@ -21569,10 +21664,740 @@ var inventoryPresets = [
21569
21664
  }
21570
21665
  }
21571
21666
  ];
21667
+ var routinePresetDefs = [
21668
+ {
21669
+ key: "morning-routine",
21670
+ name: "Morning Routine",
21671
+ description: "Start the day with intention.",
21672
+ icon: "\uD83C\uDF05",
21673
+ color: "#f59e0b",
21674
+ category: "Daily",
21675
+ displayKind: "routine-checklist",
21676
+ steps: ["Make the bed", "Drink a glass of water", "Stretch", "Plan the day"]
21677
+ },
21678
+ {
21679
+ key: "evening-wind-down",
21680
+ name: "Evening Wind-Down",
21681
+ description: "Ease into a restful night.",
21682
+ icon: "\uD83C\uDF19",
21683
+ color: "#818cf8",
21684
+ category: "Daily",
21685
+ steps: ["Dim the lights", "Tidy up", "Read a few pages", "Lights out"]
21686
+ },
21687
+ {
21688
+ key: "deep-work-block",
21689
+ name: "Deep Work Block",
21690
+ description: "Set up for focused, distraction-free work.",
21691
+ icon: "\uD83C\uDFAF",
21692
+ color: "#a78bfa",
21693
+ category: "Work",
21694
+ steps: ["Silence notifications", "Pick one task", "Start a 50-min timer", "Take a break"]
21695
+ },
21696
+ {
21697
+ key: "gym-session",
21698
+ name: "Gym Session",
21699
+ description: "A repeatable workout flow.",
21700
+ icon: "\uD83C\uDFCB\uFE0F",
21701
+ color: "#fb7185",
21702
+ category: "Fitness",
21703
+ steps: ["Warm up", "Main lifts", "Accessory work", "Cool down & stretch"]
21704
+ },
21705
+ {
21706
+ key: "weekly-review",
21707
+ name: "Weekly Review",
21708
+ description: "Close the week and set up the next.",
21709
+ icon: "\uD83D\uDDD3\uFE0F",
21710
+ color: "#34d399",
21711
+ category: "Work",
21712
+ steps: ["Clear the inbox", "Review last week", "Check goals", "Plan next week"]
21713
+ },
21714
+ {
21715
+ key: "leaving-the-house",
21716
+ name: "Leaving the House",
21717
+ description: "Never forget the essentials.",
21718
+ icon: "\uD83D\uDEAA",
21719
+ color: "#38bdf8",
21720
+ category: "Daily",
21721
+ steps: ["Keys", "Wallet", "Phone", "Lock the door"]
21722
+ },
21723
+ {
21724
+ key: "skincare-routine",
21725
+ name: "Skincare AM/PM",
21726
+ description: "A simple morning and night skincare flow.",
21727
+ icon: "\uD83E\uDDF4",
21728
+ color: "#f472b6",
21729
+ category: "Self-care",
21730
+ steps: ["Cleanse", "Treat", "Moisturise", "SPF (AM only)"]
21731
+ },
21732
+ {
21733
+ key: "shutdown-ritual",
21734
+ name: "Shutdown Ritual",
21735
+ description: "End the workday cleanly.",
21736
+ icon: "\uD83D\uDD0C",
21737
+ color: "#a78bfa",
21738
+ category: "Work",
21739
+ steps: ["Review what got done", "Note tomorrow's top task", "Close all tabs", "Step away"]
21740
+ }
21741
+ ];
21742
+ var routinePresets = routinePresetDefs.map((def) => ({
21743
+ key: def.key,
21744
+ entity: "routine",
21745
+ name: def.name,
21746
+ description: def.description,
21747
+ icon: def.icon,
21748
+ color: def.color,
21749
+ category: def.category,
21750
+ ...def.displayKind ? { displayKind: def.displayKind } : {},
21751
+ featured: def.key === "morning-routine",
21752
+ recipe: {
21753
+ nodes: [
21754
+ {
21755
+ ref: "routine",
21756
+ kind: "routine",
21757
+ title: def.name,
21758
+ steps: def.steps.map((title) => ({ title }))
21759
+ }
21760
+ ]
21761
+ }
21762
+ }));
21763
+ var areaBundleDefs = [
21764
+ {
21765
+ key: "life-setup",
21766
+ name: "Life Setup",
21767
+ description: "Nine areas of responsibility to organise your whole life.",
21768
+ icon: "\uD83C\uDF31",
21769
+ color: "#34d399",
21770
+ areas: [
21771
+ { title: "Health", color: "green", icon: "heart-pulse" },
21772
+ { title: "Finances", color: "amber", icon: "wallet" },
21773
+ { title: "Career", color: "blue", icon: "briefcase" },
21774
+ { title: "Relationships", color: "rose", icon: "users" },
21775
+ { title: "Home", color: "teal", icon: "house" },
21776
+ { title: "Personal Growth", color: "purple", icon: "sprout" },
21777
+ { title: "Recreation", color: "amber", icon: "gamepad-2" },
21778
+ { title: "Admin", color: "slate", icon: "file-text" },
21779
+ { title: "Community", color: "red", icon: "hand-heart" }
21780
+ ]
21781
+ },
21782
+ {
21783
+ key: "student-life",
21784
+ name: "Student Life",
21785
+ description: "Keep coursework, exams and the rest of life in balance.",
21786
+ icon: "\uD83C\uDF93",
21787
+ color: "#38bdf8",
21788
+ areas: [
21789
+ { title: "Coursework", color: "blue", icon: "book-open" },
21790
+ { title: "Exams", color: "red", icon: "graduation-cap" },
21791
+ { title: "Finances", color: "amber", icon: "wallet" },
21792
+ { title: "Social", color: "rose", icon: "users" },
21793
+ { title: "Health", color: "green", icon: "heart-pulse" },
21794
+ { title: "Career Prep", color: "purple", icon: "briefcase" }
21795
+ ]
21796
+ },
21797
+ {
21798
+ key: "founder",
21799
+ name: "Founder",
21800
+ description: "The hats a founder wears, as areas to steward.",
21801
+ icon: "\uD83D\uDE80",
21802
+ color: "#a78bfa",
21803
+ areas: [
21804
+ { title: "Product", color: "purple", icon: "box" },
21805
+ { title: "Sales", color: "green", icon: "trending-up" },
21806
+ { title: "Fundraising", color: "amber", icon: "banknote" },
21807
+ { title: "Team", color: "blue", icon: "users" },
21808
+ { title: "Finances", color: "slate", icon: "wallet" },
21809
+ { title: "Personal", color: "rose", icon: "heart" }
21810
+ ]
21811
+ },
21812
+ {
21813
+ key: "new-parent",
21814
+ name: "New Parent",
21815
+ description: "Stay on top of life with a newborn.",
21816
+ icon: "\uD83C\uDF7C",
21817
+ color: "#f472b6",
21818
+ areas: [
21819
+ { title: "Baby Care", color: "rose", icon: "baby" },
21820
+ { title: "Health", color: "green", icon: "heart-pulse" },
21821
+ { title: "Home", color: "teal", icon: "house" },
21822
+ { title: "Finances", color: "amber", icon: "wallet" },
21823
+ { title: "Relationship", color: "purple", icon: "heart" },
21824
+ { title: "Self-care", color: "blue", icon: "sparkles" }
21825
+ ]
21826
+ }
21827
+ ];
21828
+ var areaPresets = areaBundleDefs.map((def) => ({
21829
+ key: def.key,
21830
+ entity: "area",
21831
+ name: def.name,
21832
+ description: def.description,
21833
+ icon: def.icon,
21834
+ color: def.color,
21835
+ category: "Life Setup",
21836
+ featured: def.key === "life-setup",
21837
+ recipe: {
21838
+ nodes: def.areas.map((area, index2) => ({
21839
+ ref: `area-${index2}`,
21840
+ kind: "area",
21841
+ title: area.title,
21842
+ color: area.color,
21843
+ icon: area.icon
21844
+ }))
21845
+ }
21846
+ }));
21847
+ var projectPresetDefs = [
21848
+ {
21849
+ key: "plan-a-trip",
21850
+ name: "Plan a Trip",
21851
+ description: "From idea to itinerary.",
21852
+ icon: "\uD83E\uDDF3",
21853
+ color: "#38bdf8",
21854
+ category: "Personal",
21855
+ milestones: ["Pick dates & destination", "Book flights", "Book stay", "Plan itinerary", "Pack"]
21856
+ },
21857
+ {
21858
+ key: "job-search",
21859
+ name: "Job Search",
21860
+ description: "Run a focused job hunt.",
21861
+ icon: "\uD83D\uDCBC",
21862
+ color: "#a78bfa",
21863
+ category: "Career",
21864
+ milestones: ["Update CV", "Build a target list", "Apply", "Interview prep", "Negotiate offer"]
21865
+ },
21866
+ {
21867
+ key: "move-house",
21868
+ name: "Move House",
21869
+ description: "Keep a move from overwhelming you.",
21870
+ icon: "\uD83D\uDCE6",
21871
+ color: "#f59e0b",
21872
+ category: "Home",
21873
+ milestones: ["Declutter", "Book movers", "Pack room by room", "Change address", "Unpack"]
21874
+ },
21875
+ {
21876
+ key: "side-project",
21877
+ name: "Launch a Side Project",
21878
+ description: "Ship something on the side.",
21879
+ icon: "\uD83D\uDEE0\uFE0F",
21880
+ color: "#34d399",
21881
+ category: "Career",
21882
+ milestones: ["Define the MVP", "Build it", "Test with users", "Launch", "Gather feedback"]
21883
+ },
21884
+ {
21885
+ key: "plan-an-event",
21886
+ name: "Plan an Event",
21887
+ description: "Pull off a gathering without the stress.",
21888
+ icon: "\uD83C\uDF89",
21889
+ color: "#fb7185",
21890
+ category: "Personal",
21891
+ milestones: [
21892
+ "Set date & budget",
21893
+ "Invite guests",
21894
+ "Book venue",
21895
+ "Order food",
21896
+ "Day-of run sheet"
21897
+ ]
21898
+ },
21899
+ {
21900
+ key: "learn-a-skill",
21901
+ name: "Learn a Skill",
21902
+ description: "Go from beginner to capable.",
21903
+ icon: "\uD83D\uDCDA",
21904
+ color: "#f59e0b",
21905
+ category: "Growth",
21906
+ milestones: [
21907
+ "Pick a resource",
21908
+ "Daily practice",
21909
+ "Build a project",
21910
+ "Get feedback",
21911
+ "Teach someone"
21912
+ ]
21913
+ }
21914
+ ];
21915
+ var projectPresets = projectPresetDefs.map((def) => ({
21916
+ key: def.key,
21917
+ entity: "project",
21918
+ name: def.name,
21919
+ description: def.description,
21920
+ icon: def.icon,
21921
+ color: def.color,
21922
+ category: def.category,
21923
+ featured: def.key === "plan-a-trip",
21924
+ recipe: {
21925
+ nodes: [
21926
+ {
21927
+ ref: "project",
21928
+ kind: "project",
21929
+ title: def.name,
21930
+ milestones: def.milestones.map((title) => ({ title }))
21931
+ }
21932
+ ]
21933
+ }
21934
+ }));
21935
+ var recipeNode = (def) => ({
21936
+ ref: def.ref,
21937
+ kind: "recipe",
21938
+ title: def.title,
21939
+ ...def.servings ? { servings: def.servings } : {},
21940
+ ...def.tags ? { tags: def.tags } : {},
21941
+ ingredients: def.ingredients.map((name) => ({ name }))
21942
+ });
21943
+ var mealPresets = [
21944
+ {
21945
+ key: "weeknight-dinners",
21946
+ entity: "recipe",
21947
+ name: "Weeknight Dinners",
21948
+ description: "Three fast, no-fuss dinners.",
21949
+ icon: "\uD83C\uDF5D",
21950
+ color: "#fb7185",
21951
+ category: "Recipes",
21952
+ featured: true,
21953
+ recipe: {
21954
+ nodes: [
21955
+ recipeNode({
21956
+ ref: "r1",
21957
+ title: "One-Pan Pasta",
21958
+ servings: 2,
21959
+ ingredients: ["Pasta", "Cherry tomatoes", "Garlic", "Olive oil", "Basil"],
21960
+ tags: ["quick"]
21961
+ }),
21962
+ recipeNode({
21963
+ ref: "r2",
21964
+ title: "Sheet-Pan Chicken & Veg",
21965
+ servings: 4,
21966
+ ingredients: ["Chicken thighs", "Broccoli", "Potatoes", "Olive oil", "Paprika"],
21967
+ tags: ["quick"]
21968
+ }),
21969
+ recipeNode({
21970
+ ref: "r3",
21971
+ title: "Black Bean Tacos",
21972
+ servings: 3,
21973
+ ingredients: ["Tortillas", "Black beans", "Avocado", "Lime", "Cilantro"],
21974
+ tags: ["quick", "vegetarian"]
21975
+ })
21976
+ ]
21977
+ }
21978
+ },
21979
+ {
21980
+ key: "meal-prep-sunday",
21981
+ entity: "recipe",
21982
+ name: "Meal Prep Sunday",
21983
+ description: "Two batch recipes plus the grocery list to shop for them.",
21984
+ icon: "\uD83E\uDD61",
21985
+ color: "#34d399",
21986
+ category: "Recipes",
21987
+ recipe: {
21988
+ nodes: [
21989
+ recipeNode({
21990
+ ref: "r1",
21991
+ title: "Big-Batch Chili",
21992
+ servings: 6,
21993
+ ingredients: ["Ground beef", "Kidney beans", "Canned tomatoes", "Onion", "Chili powder"],
21994
+ tags: ["meal-prep"]
21995
+ }),
21996
+ recipeNode({
21997
+ ref: "r2",
21998
+ title: "Roasted Veg & Grains",
21999
+ servings: 6,
22000
+ ingredients: ["Quinoa", "Sweet potato", "Chickpeas", "Bell pepper", "Tahini"],
22001
+ tags: ["meal-prep", "vegetarian"]
22002
+ }),
22003
+ {
22004
+ ref: "groceries",
22005
+ kind: "shopping_list",
22006
+ title: "Meal Prep Groceries",
22007
+ items: [
22008
+ { title: "Ground beef" },
22009
+ { title: "Kidney beans" },
22010
+ { title: "Canned tomatoes" },
22011
+ { title: "Quinoa" },
22012
+ { title: "Sweet potato" },
22013
+ { title: "Chickpeas" }
22014
+ ]
22015
+ }
22016
+ ]
22017
+ }
22018
+ },
22019
+ {
22020
+ key: "smoothies",
22021
+ entity: "recipe",
22022
+ name: "Smoothies",
22023
+ description: "Three blend-and-go smoothies.",
22024
+ icon: "\uD83E\uDD64",
22025
+ color: "#f472b6",
22026
+ category: "Recipes",
22027
+ recipe: {
22028
+ nodes: [
22029
+ recipeNode({
22030
+ ref: "r1",
22031
+ title: "Green Smoothie",
22032
+ servings: 1,
22033
+ ingredients: ["Spinach", "Banana", "Almond milk", "Peanut butter"]
22034
+ }),
22035
+ recipeNode({
22036
+ ref: "r2",
22037
+ title: "Berry Blast",
22038
+ servings: 1,
22039
+ ingredients: ["Mixed berries", "Greek yogurt", "Honey", "Oats"]
22040
+ }),
22041
+ recipeNode({
22042
+ ref: "r3",
22043
+ title: "Tropical Smoothie",
22044
+ servings: 1,
22045
+ ingredients: ["Mango", "Pineapple", "Coconut water", "Lime"]
22046
+ })
22047
+ ]
22048
+ }
22049
+ },
22050
+ {
22051
+ key: "high-protein-pack",
22052
+ entity: "recipe",
22053
+ name: "High-Protein Pack",
22054
+ description: "Protein-forward meals to fuel training.",
22055
+ icon: "\uD83D\uDCAA",
22056
+ color: "#fb7185",
22057
+ category: "Recipes",
22058
+ recipe: {
22059
+ nodes: [
22060
+ recipeNode({
22061
+ ref: "r1",
22062
+ title: "Chicken & Rice Bowl",
22063
+ servings: 2,
22064
+ ingredients: ["Chicken breast", "Rice", "Broccoli", "Soy sauce"],
22065
+ tags: ["high-protein"]
22066
+ }),
22067
+ recipeNode({
22068
+ ref: "r2",
22069
+ title: "Egg & Oats Breakfast",
22070
+ servings: 1,
22071
+ ingredients: ["Eggs", "Oats", "Cottage cheese", "Berries"],
22072
+ tags: ["high-protein"]
22073
+ })
22074
+ ]
22075
+ }
22076
+ },
22077
+ {
22078
+ key: "vegetarian-pack",
22079
+ entity: "recipe",
22080
+ name: "Vegetarian Pack",
22081
+ description: "Meat-free meals that satisfy.",
22082
+ icon: "\uD83E\uDD57",
22083
+ color: "#34d399",
22084
+ category: "Recipes",
22085
+ recipe: {
22086
+ nodes: [
22087
+ recipeNode({
22088
+ ref: "r1",
22089
+ title: "Lentil Curry",
22090
+ servings: 4,
22091
+ ingredients: ["Red lentils", "Coconut milk", "Spinach", "Curry powder", "Onion"],
22092
+ tags: ["vegetarian"]
22093
+ }),
22094
+ recipeNode({
22095
+ ref: "r2",
22096
+ title: "Halloumi Salad",
22097
+ servings: 2,
22098
+ ingredients: ["Halloumi", "Mixed greens", "Cherry tomatoes", "Cucumber", "Olive oil"],
22099
+ tags: ["vegetarian"]
22100
+ })
22101
+ ]
22102
+ }
22103
+ },
22104
+ {
22105
+ key: "budget-pack",
22106
+ entity: "recipe",
22107
+ name: "Budget Pack",
22108
+ description: "Cheap, filling meals that stretch the grocery bill.",
22109
+ icon: "\uD83D\uDCB0",
22110
+ color: "#f59e0b",
22111
+ category: "Recipes",
22112
+ recipe: {
22113
+ nodes: [
22114
+ recipeNode({
22115
+ ref: "r1",
22116
+ title: "Rice & Beans",
22117
+ servings: 4,
22118
+ ingredients: ["Rice", "Black beans", "Onion", "Cumin", "Garlic"],
22119
+ tags: ["budget"]
22120
+ }),
22121
+ recipeNode({
22122
+ ref: "r2",
22123
+ title: "Pasta Aglio e Olio",
22124
+ servings: 2,
22125
+ ingredients: ["Pasta", "Garlic", "Olive oil", "Chili flakes", "Parsley"],
22126
+ tags: ["budget"]
22127
+ })
22128
+ ]
22129
+ }
22130
+ }
22131
+ ];
22132
+ var contactCircleDefs = [
22133
+ {
22134
+ key: "inner-circle",
22135
+ name: "Inner Circle",
22136
+ description: "The people you check in with weekly.",
22137
+ cadence: "every week",
22138
+ tag: "1w"
22139
+ },
22140
+ {
22141
+ key: "close-friends",
22142
+ name: "Close Friends",
22143
+ description: "Friends worth a message every couple of weeks.",
22144
+ cadence: "every 2 weeks",
22145
+ tag: "2w"
22146
+ },
22147
+ {
22148
+ key: "keep-warm",
22149
+ name: "Keep Warm",
22150
+ description: "People to keep warm with a monthly hello.",
22151
+ cadence: "every month",
22152
+ tag: "1m"
22153
+ },
22154
+ {
22155
+ key: "network",
22156
+ name: "Network",
22157
+ description: "Professional contacts to touch base with quarterly.",
22158
+ cadence: "every 3 months",
22159
+ tag: "3m"
22160
+ },
22161
+ {
22162
+ key: "birthday-only",
22163
+ name: "Birthday Only",
22164
+ description: "People you reach out to on their birthday.",
22165
+ cadence: "on their birthday",
22166
+ tag: "birthday"
22167
+ }
22168
+ ];
22169
+ var contactPresets = contactCircleDefs.map((def) => ({
22170
+ key: def.key,
22171
+ entity: "contact",
22172
+ name: def.name,
22173
+ description: def.description,
22174
+ icon: "\uD83D\uDC65",
22175
+ color: "#38bdf8",
22176
+ category: "Keep in Touch",
22177
+ featured: def.key === "inner-circle",
22178
+ recipe: {
22179
+ nodes: [
22180
+ {
22181
+ ref: "contact",
22182
+ kind: "contact",
22183
+ title: def.name,
22184
+ notes: `Keep-in-touch circle \u2014 reach out ${def.cadence}. Rename to a person and set their cadence.`,
22185
+ tags: ["keep-in-touch", def.tag]
22186
+ }
22187
+ ]
22188
+ }
22189
+ }));
22190
+ var challengePresetDefs = [
22191
+ {
22192
+ key: "challenge-75-hard",
22193
+ name: "75 Hard",
22194
+ description: "75 days of two workouts, water, reading and a clean diet.",
22195
+ icon: "\uD83D\uDD25",
22196
+ color: "#fb7185",
22197
+ metric: "habits.checked_in",
22198
+ target: 75,
22199
+ durationDays: 75
22200
+ },
22201
+ {
22202
+ key: "challenge-no-sugar",
22203
+ name: "30-Day No Sugar",
22204
+ description: "Cut added sugar for 30 days.",
22205
+ icon: "\uD83C\uDF6D",
22206
+ color: "#f472b6",
22207
+ metric: "habits.checked_in",
22208
+ target: 30,
22209
+ durationDays: 30
22210
+ },
22211
+ {
22212
+ key: "challenge-couch-to-5k",
22213
+ name: "Couch-to-5K",
22214
+ description: "Run your first 5K in nine weeks.",
22215
+ icon: "\uD83C\uDFC3",
22216
+ color: "#34d399",
22217
+ metric: "habits.checked_in",
22218
+ target: 27,
22219
+ durationDays: 63
22220
+ },
22221
+ {
22222
+ key: "challenge-dry-january",
22223
+ name: "Dry January",
22224
+ description: "An alcohol-free month to reset.",
22225
+ icon: "\uD83D\uDEAB",
22226
+ color: "#38bdf8",
22227
+ metric: "habits.checked_in",
22228
+ target: 31,
22229
+ durationDays: 31
22230
+ },
22231
+ {
22232
+ key: "challenge-meditation",
22233
+ name: "31-Day Meditation",
22234
+ description: "Sit every day for a month.",
22235
+ icon: "\uD83E\uDDD8",
22236
+ color: "#a78bfa",
22237
+ metric: "habits.checked_in",
22238
+ target: 31,
22239
+ durationDays: 31
22240
+ },
22241
+ {
22242
+ key: "challenge-no-spend",
22243
+ name: "No-Spend Month",
22244
+ description: "Thirty days of buying only the essentials.",
22245
+ icon: "\uD83D\uDCB8",
22246
+ color: "#f59e0b",
22247
+ metric: "habits.checked_in",
22248
+ target: 30,
22249
+ durationDays: 30
22250
+ }
22251
+ ];
22252
+ var challengePresets = challengePresetDefs.map((def) => ({
22253
+ key: def.key,
22254
+ entity: "challenge",
22255
+ name: def.name,
22256
+ description: def.description,
22257
+ icon: def.icon,
22258
+ color: def.color,
22259
+ category: "Challenges",
22260
+ featured: def.key === "challenge-couch-to-5k",
22261
+ recipe: {
22262
+ nodes: [
22263
+ {
22264
+ ref: "challenge",
22265
+ kind: "challenge",
22266
+ title: def.name,
22267
+ description: def.description,
22268
+ metric: def.metric,
22269
+ target: def.target,
22270
+ durationDays: def.durationDays
22271
+ }
22272
+ ]
22273
+ }
22274
+ }));
22275
+ var automationPresets = [
22276
+ {
22277
+ key: "auto-low-stock-groceries",
22278
+ entity: "automation",
22279
+ name: "Low stock \u2192 add to groceries",
22280
+ description: "When an inventory item runs low, make a task to restock it.",
22281
+ icon: "\uD83E\uDD6B",
22282
+ color: "#34d399",
22283
+ category: "Automations",
22284
+ recipe: {
22285
+ nodes: [
22286
+ {
22287
+ ref: "automation",
22288
+ kind: "automation",
22289
+ name: "Low stock \u2192 add to groceries",
22290
+ trigger: { entity: "inventory", action: "updated" },
22291
+ condition: { path: "value.lowStock", op: "eq", value: true },
22292
+ action: { type: "create_task", title: "Restock low groceries", priority: "medium" }
22293
+ }
22294
+ ]
22295
+ }
22296
+ },
22297
+ {
22298
+ key: "auto-habit-missed-nudge",
22299
+ entity: "automation",
22300
+ name: "Habit missed 3\xD7 \u2192 nudge",
22301
+ description: "Get a gentle nudge when you miss a habit three times.",
22302
+ icon: "\uD83D\uDD14",
22303
+ color: "#fb7185",
22304
+ category: "Automations",
22305
+ recipe: {
22306
+ nodes: [
22307
+ {
22308
+ ref: "automation",
22309
+ kind: "automation",
22310
+ name: "Habit missed 3\xD7 \u2192 nudge",
22311
+ trigger: { entity: "habits", action: "updated" },
22312
+ condition: { path: "value.missedStreak", op: "eq", value: 3 },
22313
+ action: {
22314
+ type: "notify",
22315
+ title: "Don't break the chain",
22316
+ body: "You've missed this habit three times \u2014 jump back in today."
22317
+ }
22318
+ }
22319
+ ]
22320
+ }
22321
+ },
22322
+ {
22323
+ key: "auto-task-overdue-bump",
22324
+ entity: "automation",
22325
+ name: "Task overdue \u2192 bump priority",
22326
+ description: "When a task goes overdue, raise a high-priority follow-up.",
22327
+ icon: "\u23F0",
22328
+ color: "#f59e0b",
22329
+ category: "Automations",
22330
+ recipe: {
22331
+ nodes: [
22332
+ {
22333
+ ref: "automation",
22334
+ kind: "automation",
22335
+ name: "Task overdue \u2192 bump priority",
22336
+ trigger: { entity: "tasks", action: "updated" },
22337
+ condition: { path: "value.overdue", op: "eq", value: true },
22338
+ action: { type: "create_task", title: "Reprioritise overdue task", priority: "high" }
22339
+ }
22340
+ ]
22341
+ }
22342
+ },
22343
+ {
22344
+ key: "auto-weekly-review",
22345
+ entity: "automation",
22346
+ name: "Weekly review reminder",
22347
+ description: "Reschedule your weekly review a week out each time you finish it.",
22348
+ icon: "\uD83D\uDDD3\uFE0F",
22349
+ color: "#34d399",
22350
+ category: "Automations",
22351
+ recipe: {
22352
+ nodes: [
22353
+ {
22354
+ ref: "automation",
22355
+ kind: "automation",
22356
+ name: "Weekly review reminder",
22357
+ trigger: { entity: "tasks", action: "updated" },
22358
+ condition: { path: "value.title", op: "contains", value: "Weekly Review" },
22359
+ action: { type: "schedule_task", offsetMinutes: 10080 }
22360
+ }
22361
+ ]
22362
+ }
22363
+ },
22364
+ {
22365
+ key: "auto-finished-book-rate",
22366
+ entity: "automation",
22367
+ name: "Finished book \u2192 rate it",
22368
+ description: "When you finish a book, make a task to rate it.",
22369
+ icon: "\uD83D\uDCDA",
22370
+ color: "#f59e0b",
22371
+ category: "Automations",
22372
+ recipe: {
22373
+ nodes: [
22374
+ {
22375
+ ref: "automation",
22376
+ kind: "automation",
22377
+ name: "Finished book \u2192 rate it",
22378
+ trigger: { entity: "books", action: "updated" },
22379
+ condition: { path: "value.status", op: "eq", value: "finished" },
22380
+ action: {
22381
+ type: "create_task",
22382
+ title: "Rate the book you just finished",
22383
+ priority: "low"
22384
+ }
22385
+ }
22386
+ ]
22387
+ }
22388
+ }
22389
+ ];
21572
22390
  var presetCatalog = [
21573
22391
  ...habitPresets,
21574
22392
  ...shoppingListPresets,
21575
- ...inventoryPresets
22393
+ ...inventoryPresets,
22394
+ ...routinePresets,
22395
+ ...areaPresets,
22396
+ ...projectPresets,
22397
+ ...mealPresets,
22398
+ ...contactPresets,
22399
+ ...challengePresets,
22400
+ ...automationPresets
21576
22401
  ];
21577
22402
  var presetsByKey = new Map(presetCatalog.map((preset) => [preset.key, preset]));
21578
22403
  // ../../node_modules/.bun/ulidx@2.4.1/node_modules/ulidx/dist/node/index.js
@@ -21827,7 +22652,7 @@ function parseCapture2(input) {
21827
22652
 
21828
22653
  // src/meta.ts
21829
22654
  var CLI_NAME = "do";
21830
- var VERSION = "1.27.0";
22655
+ var VERSION = "1.29.0";
21831
22656
  var API_PREFIX = "/api/v1";
21832
22657
  var DEFAULT_API_URL = "http://localhost:3001";
21833
22658
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.27.0",
3
+ "version": "1.29.0",
4
4
  "private": false,
5
5
  "description": "do — the agent-drivable CLI over the public /api/v1 surface",
6
6
  "type": "module",