wellness-nourish 0.1.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 (90) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +146 -0
  3. package/SECURITY.md +9 -0
  4. package/dist/cli/commands.d.ts +3 -0
  5. package/dist/cli/commands.js +467 -0
  6. package/dist/cli/commands.js.map +1 -0
  7. package/dist/constants.d.ts +8 -0
  8. package/dist/constants.js +9 -0
  9. package/dist/constants.js.map +1 -0
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.js +153 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/prompts/nourish-prompts.d.ts +2 -0
  14. package/dist/prompts/nourish-prompts.js +17 -0
  15. package/dist/prompts/nourish-prompts.js.map +1 -0
  16. package/dist/providers/open-food-facts.d.ts +5 -0
  17. package/dist/providers/open-food-facts.js +141 -0
  18. package/dist/providers/open-food-facts.js.map +1 -0
  19. package/dist/providers/usda.d.ts +6 -0
  20. package/dist/providers/usda.js +157 -0
  21. package/dist/providers/usda.js.map +1 -0
  22. package/dist/resources/nourish-resources.d.ts +2 -0
  23. package/dist/resources/nourish-resources.js +26 -0
  24. package/dist/resources/nourish-resources.js.map +1 -0
  25. package/dist/schemas/common.d.ts +224 -0
  26. package/dist/schemas/common.js +224 -0
  27. package/dist/schemas/common.js.map +1 -0
  28. package/dist/services/agent-manifest.d.ts +27 -0
  29. package/dist/services/agent-manifest.js +80 -0
  30. package/dist/services/agent-manifest.js.map +1 -0
  31. package/dist/services/capabilities.d.ts +12 -0
  32. package/dist/services/capabilities.js +27 -0
  33. package/dist/services/capabilities.js.map +1 -0
  34. package/dist/services/config.d.ts +3 -0
  35. package/dist/services/config.js +32 -0
  36. package/dist/services/config.js.map +1 -0
  37. package/dist/services/connection-status.d.ts +13 -0
  38. package/dist/services/connection-status.js +34 -0
  39. package/dist/services/connection-status.js.map +1 -0
  40. package/dist/services/food-normalization.d.ts +3 -0
  41. package/dist/services/food-normalization.js +14 -0
  42. package/dist/services/food-normalization.js.map +1 -0
  43. package/dist/services/format.d.ts +13 -0
  44. package/dist/services/format.js +58 -0
  45. package/dist/services/format.js.map +1 -0
  46. package/dist/services/goals-store.d.ts +7 -0
  47. package/dist/services/goals-store.js +87 -0
  48. package/dist/services/goals-store.js.map +1 -0
  49. package/dist/services/hydration-store.d.ts +12 -0
  50. package/dist/services/hydration-store.js +96 -0
  51. package/dist/services/hydration-store.js.map +1 -0
  52. package/dist/services/intake-store.d.ts +15 -0
  53. package/dist/services/intake-store.js +170 -0
  54. package/dist/services/intake-store.js.map +1 -0
  55. package/dist/services/meal-estimator.d.ts +22 -0
  56. package/dist/services/meal-estimator.js +178 -0
  57. package/dist/services/meal-estimator.js.map +1 -0
  58. package/dist/services/nutrients.d.ts +4 -0
  59. package/dist/services/nutrients.js +31 -0
  60. package/dist/services/nutrients.js.map +1 -0
  61. package/dist/services/portion-engine.d.ts +4 -0
  62. package/dist/services/portion-engine.js +50 -0
  63. package/dist/services/portion-engine.js.map +1 -0
  64. package/dist/services/privacy-audit.d.ts +12 -0
  65. package/dist/services/privacy-audit.js +19 -0
  66. package/dist/services/privacy-audit.js.map +1 -0
  67. package/dist/services/summary.d.ts +28 -0
  68. package/dist/services/summary.js +84 -0
  69. package/dist/services/summary.js.map +1 -0
  70. package/dist/services/usage-guide.d.ts +12 -0
  71. package/dist/services/usage-guide.js +57 -0
  72. package/dist/services/usage-guide.js.map +1 -0
  73. package/dist/tools/nourish-tools.d.ts +2 -0
  74. package/dist/tools/nourish-tools.js +603 -0
  75. package/dist/tools/nourish-tools.js.map +1 -0
  76. package/dist/types.d.ts +97 -0
  77. package/dist/types.js +2 -0
  78. package/dist/types.js.map +1 -0
  79. package/examples/claude-desktop.json +13 -0
  80. package/examples/codex.json +13 -0
  81. package/examples/cursor.json +13 -0
  82. package/examples/hermes.md +18 -0
  83. package/examples/openclaw.md +18 -0
  84. package/examples/windsurf.json +13 -0
  85. package/fixtures/open-food-facts/barcode-peanut-butter.json +23 -0
  86. package/fixtures/usda/food-banana.json +16 -0
  87. package/fixtures/usda/search-banana.json +17 -0
  88. package/package.json +52 -0
  89. package/server.json +16 -0
  90. package/tsconfig.json +21 -0
@@ -0,0 +1,224 @@
1
+ import { z } from "zod";
2
+ export declare const ResponseOnlyInputSchema: z.ZodObject<{
3
+ response_format: z.ZodDefault<z.ZodEnum<{
4
+ json: "json";
5
+ markdown: "markdown";
6
+ }>>;
7
+ }, z.core.$strict>;
8
+ export declare const IntakeListInputSchema: z.ZodObject<{
9
+ date: z.ZodOptional<z.ZodString>;
10
+ response_format: z.ZodDefault<z.ZodEnum<{
11
+ json: "json";
12
+ markdown: "markdown";
13
+ }>>;
14
+ }, z.core.$strict>;
15
+ export declare const ClearDayInputSchema: z.ZodObject<{
16
+ date: z.ZodString;
17
+ explicit_user_intent: z.ZodDefault<z.ZodBoolean>;
18
+ response_format: z.ZodDefault<z.ZodEnum<{
19
+ json: "json";
20
+ markdown: "markdown";
21
+ }>>;
22
+ }, z.core.$strict>;
23
+ export declare const HydrationLogInputSchema: z.ZodObject<{
24
+ amount_ml: z.ZodNumber;
25
+ timestamp: z.ZodOptional<z.ZodString>;
26
+ date: z.ZodOptional<z.ZodString>;
27
+ notes: z.ZodOptional<z.ZodString>;
28
+ explicit_user_intent: z.ZodDefault<z.ZodBoolean>;
29
+ response_format: z.ZodDefault<z.ZodEnum<{
30
+ json: "json";
31
+ markdown: "markdown";
32
+ }>>;
33
+ }, z.core.$strict>;
34
+ export declare const GoalsSetInputSchema: z.ZodObject<{
35
+ daily: z.ZodOptional<z.ZodObject<{
36
+ calories_kcal: z.ZodOptional<z.ZodNumber>;
37
+ protein_g: z.ZodOptional<z.ZodNumber>;
38
+ carbohydrates_g: z.ZodOptional<z.ZodNumber>;
39
+ fat_g: z.ZodOptional<z.ZodNumber>;
40
+ fiber_g: z.ZodOptional<z.ZodNumber>;
41
+ sugar_g: z.ZodOptional<z.ZodNumber>;
42
+ saturated_fat_g: z.ZodOptional<z.ZodNumber>;
43
+ sodium_mg: z.ZodOptional<z.ZodNumber>;
44
+ }, z.core.$strict>>;
45
+ hydration_ml: z.ZodOptional<z.ZodNumber>;
46
+ explicit_user_intent: z.ZodDefault<z.ZodBoolean>;
47
+ response_format: z.ZodDefault<z.ZodEnum<{
48
+ json: "json";
49
+ markdown: "markdown";
50
+ }>>;
51
+ }, z.core.$strict>;
52
+ export declare const ExportInputSchema: z.ZodObject<{
53
+ export_format: z.ZodDefault<z.ZodEnum<{
54
+ jsonl: "jsonl";
55
+ csv: "csv";
56
+ }>>;
57
+ response_format: z.ZodDefault<z.ZodEnum<{
58
+ json: "json";
59
+ markdown: "markdown";
60
+ }>>;
61
+ }, z.core.$strict>;
62
+ export declare const AgentManifestInputSchema: z.ZodObject<{
63
+ client: z.ZodDefault<z.ZodEnum<{
64
+ generic: "generic";
65
+ cursor: "cursor";
66
+ claude: "claude";
67
+ codex: "codex";
68
+ windsurf: "windsurf";
69
+ hermes: "hermes";
70
+ openclaw: "openclaw";
71
+ }>>;
72
+ response_format: z.ZodDefault<z.ZodEnum<{
73
+ json: "json";
74
+ markdown: "markdown";
75
+ }>>;
76
+ }, z.core.$strict>;
77
+ export declare const FoodSearchInputSchema: z.ZodObject<{
78
+ query: z.ZodString;
79
+ limit: z.ZodDefault<z.ZodNumber>;
80
+ provider: z.ZodDefault<z.ZodEnum<{
81
+ usda: "usda";
82
+ }>>;
83
+ response_format: z.ZodDefault<z.ZodEnum<{
84
+ json: "json";
85
+ markdown: "markdown";
86
+ }>>;
87
+ }, z.core.$strict>;
88
+ export declare const BarcodeLookupInputSchema: z.ZodObject<{
89
+ barcode: z.ZodString;
90
+ response_format: z.ZodDefault<z.ZodEnum<{
91
+ json: "json";
92
+ markdown: "markdown";
93
+ }>>;
94
+ }, z.core.$strict>;
95
+ export declare const FoodGetInputSchema: z.ZodObject<{
96
+ source: z.ZodEnum<{
97
+ usda: "usda";
98
+ open_food_facts: "open_food_facts";
99
+ }>;
100
+ source_id: z.ZodString;
101
+ response_format: z.ZodDefault<z.ZodEnum<{
102
+ json: "json";
103
+ markdown: "markdown";
104
+ }>>;
105
+ }, z.core.$strict>;
106
+ export declare const MealEstimateInputSchema: z.ZodObject<{
107
+ text: z.ZodString;
108
+ locale: z.ZodDefault<z.ZodString>;
109
+ meal_type: z.ZodDefault<z.ZodEnum<{
110
+ breakfast: "breakfast";
111
+ lunch: "lunch";
112
+ dinner: "dinner";
113
+ snack: "snack";
114
+ other: "other";
115
+ }>>;
116
+ response_format: z.ZodDefault<z.ZodEnum<{
117
+ json: "json";
118
+ markdown: "markdown";
119
+ }>>;
120
+ }, z.core.$strict>;
121
+ export declare const IntakeLogInputSchema: z.ZodObject<{
122
+ text: z.ZodOptional<z.ZodString>;
123
+ food: z.ZodOptional<z.ZodUnknown>;
124
+ timestamp: z.ZodOptional<z.ZodString>;
125
+ meal_type: z.ZodDefault<z.ZodEnum<{
126
+ breakfast: "breakfast";
127
+ lunch: "lunch";
128
+ dinner: "dinner";
129
+ snack: "snack";
130
+ other: "other";
131
+ }>>;
132
+ food_ref: z.ZodOptional<z.ZodObject<{
133
+ source: z.ZodEnum<{
134
+ usda: "usda";
135
+ open_food_facts: "open_food_facts";
136
+ manual: "manual";
137
+ estimate: "estimate";
138
+ }>;
139
+ source_id: z.ZodString;
140
+ name: z.ZodString;
141
+ }, z.core.$strict>>;
142
+ custom_food: z.ZodOptional<z.ZodObject<{
143
+ source: z.ZodEnum<{
144
+ usda: "usda";
145
+ open_food_facts: "open_food_facts";
146
+ manual: "manual";
147
+ estimate: "estimate";
148
+ }>;
149
+ source_id: z.ZodString;
150
+ name: z.ZodString;
151
+ nutrients_per_100g: z.ZodObject<{
152
+ calories_kcal: z.ZodOptional<z.ZodNumber>;
153
+ protein_g: z.ZodOptional<z.ZodNumber>;
154
+ carbohydrates_g: z.ZodOptional<z.ZodNumber>;
155
+ fat_g: z.ZodOptional<z.ZodNumber>;
156
+ fiber_g: z.ZodOptional<z.ZodNumber>;
157
+ sugar_g: z.ZodOptional<z.ZodNumber>;
158
+ saturated_fat_g: z.ZodOptional<z.ZodNumber>;
159
+ sodium_mg: z.ZodOptional<z.ZodNumber>;
160
+ }, z.core.$strict>;
161
+ }, z.core.$loose>>;
162
+ quantity: z.ZodOptional<z.ZodNumber>;
163
+ unit: z.ZodOptional<z.ZodString>;
164
+ grams_estimate: z.ZodOptional<z.ZodNumber>;
165
+ nutrients: z.ZodOptional<z.ZodObject<{
166
+ calories_kcal: z.ZodOptional<z.ZodNumber>;
167
+ protein_g: z.ZodOptional<z.ZodNumber>;
168
+ carbohydrates_g: z.ZodOptional<z.ZodNumber>;
169
+ fat_g: z.ZodOptional<z.ZodNumber>;
170
+ fiber_g: z.ZodOptional<z.ZodNumber>;
171
+ sugar_g: z.ZodOptional<z.ZodNumber>;
172
+ saturated_fat_g: z.ZodOptional<z.ZodNumber>;
173
+ sodium_mg: z.ZodOptional<z.ZodNumber>;
174
+ }, z.core.$strict>>;
175
+ confidence: z.ZodOptional<z.ZodNumber>;
176
+ explicit_user_intent: z.ZodDefault<z.ZodBoolean>;
177
+ notes: z.ZodOptional<z.ZodString>;
178
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
179
+ wellness_context_refs: z.ZodDefault<z.ZodArray<z.ZodString>>;
180
+ response_format: z.ZodDefault<z.ZodEnum<{
181
+ json: "json";
182
+ markdown: "markdown";
183
+ }>>;
184
+ }, z.core.$strict>;
185
+ export declare const IntakeUpdateInputSchema: z.ZodObject<{
186
+ id: z.ZodString;
187
+ meal_type: z.ZodOptional<z.ZodEnum<{
188
+ breakfast: "breakfast";
189
+ lunch: "lunch";
190
+ dinner: "dinner";
191
+ snack: "snack";
192
+ other: "other";
193
+ }>>;
194
+ quantity: z.ZodOptional<z.ZodNumber>;
195
+ unit: z.ZodOptional<z.ZodString>;
196
+ timestamp: z.ZodOptional<z.ZodString>;
197
+ notes: z.ZodOptional<z.ZodString>;
198
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
199
+ response_format: z.ZodDefault<z.ZodEnum<{
200
+ json: "json";
201
+ markdown: "markdown";
202
+ }>>;
203
+ }, z.core.$strict>;
204
+ export declare const IntakeDeleteInputSchema: z.ZodObject<{
205
+ id: z.ZodString;
206
+ response_format: z.ZodDefault<z.ZodEnum<{
207
+ json: "json";
208
+ markdown: "markdown";
209
+ }>>;
210
+ }, z.core.$strict>;
211
+ export declare const SummaryInputSchema: z.ZodObject<{
212
+ date: z.ZodOptional<z.ZodString>;
213
+ response_format: z.ZodDefault<z.ZodEnum<{
214
+ json: "json";
215
+ markdown: "markdown";
216
+ }>>;
217
+ }, z.core.$strict>;
218
+ export declare const WeeklySummaryInputSchema: z.ZodObject<{
219
+ start_date: z.ZodOptional<z.ZodString>;
220
+ response_format: z.ZodDefault<z.ZodEnum<{
221
+ json: "json";
222
+ markdown: "markdown";
223
+ }>>;
224
+ }, z.core.$strict>;
@@ -0,0 +1,224 @@
1
+ import { z } from "zod";
2
+ const ResponseFormatSchema = z.enum(["json", "markdown"]);
3
+ const MealTypeSchema = z
4
+ .enum(["breakfast", "lunch", "dinner", "snack", "other"])
5
+ .default("other");
6
+ const DateSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}$/);
7
+ const NutrientMapSchema = z
8
+ .object({
9
+ calories_kcal: z.number().optional(),
10
+ protein_g: z.number().optional(),
11
+ carbohydrates_g: z.number().optional(),
12
+ fat_g: z.number().optional(),
13
+ fiber_g: z.number().optional(),
14
+ sugar_g: z.number().optional(),
15
+ saturated_fat_g: z.number().optional(),
16
+ sodium_mg: z.number().optional(),
17
+ })
18
+ .strict();
19
+ const ProviderSourceSchema = z.enum(["usda", "open_food_facts", "manual", "estimate"]);
20
+ const FoodRefSchema = z
21
+ .object({
22
+ source: ProviderSourceSchema,
23
+ source_id: z.string().trim().min(1),
24
+ name: z.string().trim().min(1),
25
+ })
26
+ .strict();
27
+ const CustomFoodSchema = z
28
+ .object({
29
+ source: ProviderSourceSchema,
30
+ source_id: z.string().trim().min(1),
31
+ name: z.string().trim().min(1),
32
+ nutrients_per_100g: NutrientMapSchema,
33
+ })
34
+ .passthrough();
35
+ export const ResponseOnlyInputSchema = z
36
+ .object({
37
+ response_format: ResponseFormatSchema.default("json"),
38
+ })
39
+ .strict();
40
+ export const IntakeListInputSchema = z
41
+ .object({
42
+ date: DateSchema.optional(),
43
+ response_format: ResponseFormatSchema.default("json"),
44
+ })
45
+ .strict();
46
+ export const ClearDayInputSchema = z
47
+ .object({
48
+ date: DateSchema,
49
+ explicit_user_intent: z.boolean().default(false),
50
+ response_format: ResponseFormatSchema.default("json"),
51
+ })
52
+ .strict()
53
+ .superRefine((input, ctx) => {
54
+ if (input.explicit_user_intent !== true) {
55
+ ctx.addIssue({
56
+ code: "custom",
57
+ message: "explicit_user_intent must be true to clear a day.",
58
+ path: ["explicit_user_intent"],
59
+ });
60
+ }
61
+ });
62
+ export const HydrationLogInputSchema = z
63
+ .object({
64
+ amount_ml: z.number().positive(),
65
+ timestamp: z.string().datetime().optional(),
66
+ date: DateSchema.optional(),
67
+ notes: z.string().trim().optional(),
68
+ explicit_user_intent: z.boolean().default(false),
69
+ response_format: ResponseFormatSchema.default("json"),
70
+ })
71
+ .strict()
72
+ .superRefine((input, ctx) => {
73
+ if (input.explicit_user_intent !== true) {
74
+ ctx.addIssue({
75
+ code: "custom",
76
+ message: "explicit_user_intent must be true to log hydration.",
77
+ path: ["explicit_user_intent"],
78
+ });
79
+ }
80
+ });
81
+ export const GoalsSetInputSchema = z
82
+ .object({
83
+ daily: NutrientMapSchema.optional(),
84
+ hydration_ml: z.number().positive().optional(),
85
+ explicit_user_intent: z.boolean().default(false),
86
+ response_format: ResponseFormatSchema.default("json"),
87
+ })
88
+ .strict()
89
+ .superRefine((input, ctx) => {
90
+ if (input.explicit_user_intent !== true) {
91
+ ctx.addIssue({
92
+ code: "custom",
93
+ message: "explicit_user_intent must be true to update goals.",
94
+ path: ["explicit_user_intent"],
95
+ });
96
+ }
97
+ if (input.daily === undefined && input.hydration_ml === undefined) {
98
+ ctx.addIssue({
99
+ code: "custom",
100
+ message: "Provide daily nutrients or hydration_ml.",
101
+ path: ["daily"],
102
+ });
103
+ }
104
+ });
105
+ export const ExportInputSchema = z
106
+ .object({
107
+ export_format: z.enum(["jsonl", "csv"]).default("jsonl"),
108
+ response_format: ResponseFormatSchema.default("json"),
109
+ })
110
+ .strict();
111
+ export const AgentManifestInputSchema = z
112
+ .object({
113
+ client: z
114
+ .enum(["claude", "codex", "cursor", "windsurf", "hermes", "openclaw", "generic"])
115
+ .default("generic"),
116
+ response_format: ResponseFormatSchema.default("json"),
117
+ })
118
+ .strict();
119
+ export const FoodSearchInputSchema = z
120
+ .object({
121
+ query: z.string().trim().min(1),
122
+ limit: z.number().int().min(1).max(25).default(10),
123
+ provider: z.enum(["usda"]).default("usda"),
124
+ response_format: ResponseFormatSchema.default("json"),
125
+ })
126
+ .strict();
127
+ export const BarcodeLookupInputSchema = z
128
+ .object({
129
+ barcode: z.string().regex(/^[0-9]{6,18}$/),
130
+ response_format: ResponseFormatSchema.default("json"),
131
+ })
132
+ .strict();
133
+ export const FoodGetInputSchema = z
134
+ .object({
135
+ source: z.enum(["usda", "open_food_facts"]),
136
+ source_id: z.string().trim().min(1),
137
+ response_format: ResponseFormatSchema.default("json"),
138
+ })
139
+ .strict();
140
+ export const MealEstimateInputSchema = z
141
+ .object({
142
+ text: z.string().trim().min(1),
143
+ locale: z.string().trim().min(2).default("en-US"),
144
+ meal_type: MealTypeSchema,
145
+ response_format: ResponseFormatSchema.default("json"),
146
+ })
147
+ .strict();
148
+ export const IntakeLogInputSchema = z
149
+ .object({
150
+ text: z.string().trim().min(1).optional(),
151
+ food: z.unknown().optional(),
152
+ timestamp: z.string().datetime().optional(),
153
+ meal_type: MealTypeSchema,
154
+ food_ref: FoodRefSchema.optional(),
155
+ custom_food: CustomFoodSchema.optional(),
156
+ quantity: z.number().positive().optional(),
157
+ unit: z.string().trim().min(1).optional(),
158
+ grams_estimate: z.number().positive().optional(),
159
+ nutrients: NutrientMapSchema.optional(),
160
+ confidence: z.number().min(0).max(1).optional(),
161
+ explicit_user_intent: z.boolean().default(false),
162
+ notes: z.string().trim().optional(),
163
+ tags: z.array(z.string().trim().min(1)).default([]),
164
+ wellness_context_refs: z.array(z.string().trim().min(1)).default([]),
165
+ response_format: ResponseFormatSchema.default("json"),
166
+ })
167
+ .strict()
168
+ .superRefine((input, ctx) => {
169
+ const hasMeaningfulFood = typeof input.food === "object" &&
170
+ input.food !== null &&
171
+ !Array.isArray(input.food) &&
172
+ (hasNonEmptyStringProperty(input.food, "source_id") ||
173
+ hasNonEmptyStringProperty(input.food, "name"));
174
+ const hasMeaningfulCustomFood = input.custom_food !== undefined;
175
+ if (!input.text && !input.food_ref && !hasMeaningfulCustomFood && !hasMeaningfulFood) {
176
+ ctx.addIssue({
177
+ code: "custom",
178
+ message: "At least one meaningful intake input is required.",
179
+ path: ["text"],
180
+ });
181
+ }
182
+ if (input.explicit_user_intent !== true) {
183
+ ctx.addIssue({
184
+ code: "custom",
185
+ message: "explicit_user_intent must be true to log intake.",
186
+ path: ["explicit_user_intent"],
187
+ });
188
+ }
189
+ });
190
+ function hasNonEmptyStringProperty(value, key) {
191
+ const property = value[key];
192
+ return typeof property === "string" && property.trim().length > 0;
193
+ }
194
+ export const IntakeUpdateInputSchema = z
195
+ .object({
196
+ id: z.string().trim().min(1),
197
+ meal_type: z.enum(["breakfast", "lunch", "dinner", "snack", "other"]).optional(),
198
+ quantity: z.number().positive().optional(),
199
+ unit: z.string().trim().min(1).optional(),
200
+ timestamp: z.string().datetime().optional(),
201
+ notes: z.string().trim().optional(),
202
+ tags: z.array(z.string().trim().min(1)).optional(),
203
+ response_format: ResponseFormatSchema.default("json"),
204
+ })
205
+ .strict();
206
+ export const IntakeDeleteInputSchema = z
207
+ .object({
208
+ id: z.string().trim().min(1),
209
+ response_format: ResponseFormatSchema.default("json"),
210
+ })
211
+ .strict();
212
+ export const SummaryInputSchema = z
213
+ .object({
214
+ date: DateSchema.optional(),
215
+ response_format: ResponseFormatSchema.default("json"),
216
+ })
217
+ .strict();
218
+ export const WeeklySummaryInputSchema = z
219
+ .object({
220
+ start_date: DateSchema.optional(),
221
+ response_format: ResponseFormatSchema.default("json"),
222
+ })
223
+ .strict();
224
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/schemas/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,oBAAoB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAC1D,MAAM,cAAc,GAAG,CAAC;KACrB,IAAI,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;KACxD,OAAO,CAAC,OAAO,CAAC,CAAC;AACpB,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAC3D,MAAM,iBAAiB,GAAG,CAAC;KACxB,MAAM,CAAC;IACN,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;C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,EAAE;IAClD,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC;CACtD,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC;CACtD,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,IAAI,EAAE,UAAU,CAAC,QAAQ,EAAE;IAC3B,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC;CACtD,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC;KACtC,MAAM,CAAC;IACN,UAAU,EAAE,UAAU,CAAC,QAAQ,EAAE;IACjC,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,MAAM,CAAC;CACtD,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { buildCapabilities } from "./capabilities.js";
2
+ import { type NourishPrivacyAudit } from "./privacy-audit.js";
3
+ export type NourishAgentClient = "claude" | "codex" | "cursor" | "windsurf" | "hermes" | "openclaw" | "generic";
4
+ export interface NourishAgentManifest {
5
+ name: string;
6
+ version: string;
7
+ client: string;
8
+ supported_clients: NourishAgentClient[];
9
+ install: {
10
+ command: string;
11
+ args: string[];
12
+ optional_env: string[];
13
+ };
14
+ recommended_first_calls: string[];
15
+ tools: string[];
16
+ resources: string[];
17
+ hermes: {
18
+ tool_name_prefix: string;
19
+ reload_after_config_change: string;
20
+ use_direct_tools: boolean;
21
+ avoid_terminal_workarounds: boolean;
22
+ };
23
+ agent_rules: string[];
24
+ capabilities: ReturnType<typeof buildCapabilities>;
25
+ privacy: NourishPrivacyAudit;
26
+ }
27
+ export declare function buildAgentManifest(client: string): NourishAgentManifest;
@@ -0,0 +1,80 @@
1
+ import { SERVER_NAME, SERVER_VERSION } from "../constants.js";
2
+ import { buildCapabilities } from "./capabilities.js";
3
+ import { buildPrivacyAudit } from "./privacy-audit.js";
4
+ const SUPPORTED_CLIENTS = [
5
+ "claude",
6
+ "codex",
7
+ "cursor",
8
+ "windsurf",
9
+ "hermes",
10
+ "openclaw",
11
+ "generic",
12
+ ];
13
+ const RECOMMENDED_FIRST_CALLS = [
14
+ "nourish_connection_status",
15
+ "nourish_capabilities",
16
+ "nourish_search_food",
17
+ ];
18
+ const TOOLS = [
19
+ "nourish_agent_manifest",
20
+ "nourish_capabilities",
21
+ "nourish_privacy_audit",
22
+ "nourish_connection_status",
23
+ "nourish_search_food",
24
+ "nourish_lookup_barcode",
25
+ "nourish_get_food",
26
+ "nourish_estimate_meal",
27
+ "nourish_log_intake",
28
+ "nourish_list_intake",
29
+ "nourish_update_intake",
30
+ "nourish_delete_intake",
31
+ "nourish_clear_day",
32
+ "nourish_log_water",
33
+ "nourish_hydration_summary",
34
+ "nourish_get_goals",
35
+ "nourish_set_goals",
36
+ "nourish_daily_summary",
37
+ "nourish_weekly_summary",
38
+ "nourish_export_data",
39
+ ];
40
+ export function buildAgentManifest(client) {
41
+ return {
42
+ name: SERVER_NAME,
43
+ version: SERVER_VERSION,
44
+ client,
45
+ supported_clients: SUPPORTED_CLIENTS,
46
+ install: {
47
+ command: "npx",
48
+ args: ["-y", "wellness-nourish"],
49
+ optional_env: ["FDC_API_KEY", "NOURISH_OFF_ENABLED", "NOURISH_LOCAL_DIR"],
50
+ },
51
+ recommended_first_calls: RECOMMENDED_FIRST_CALLS,
52
+ tools: TOOLS,
53
+ resources: [
54
+ "nourish://agent-manifest",
55
+ "nourish://capabilities",
56
+ "nourish://privacy-audit",
57
+ "nourish://usage-guide",
58
+ ],
59
+ hermes: {
60
+ tool_name_prefix: "mcp_nourish_",
61
+ reload_after_config_change: "/reload-mcp or hermes mcp test nourish",
62
+ use_direct_tools: true,
63
+ avoid_terminal_workarounds: true,
64
+ },
65
+ agent_rules: [
66
+ "Call nourish_connection_status before provider-backed tools.",
67
+ "Use exact search or barcode lookup before estimating nutrition.",
68
+ "Preserve confidence values and source quality warnings in user-facing summaries.",
69
+ "Ask confirmation before logging intake unless the user explicitly requested logging.",
70
+ "Use preview/list/update/delete tools instead of overwriting private logs blindly.",
71
+ "Use hydration and goals tools only for local tracking context, never for clinical advice.",
72
+ "Never ask users to paste secrets, raw health exports, provider tokens, or private food logs.",
73
+ "Nutrition summaries are not medical advice, diagnosis, treatment, or emergency guidance.",
74
+ "Preserve source, license, attribution, and share_alike obligations.",
75
+ ],
76
+ capabilities: buildCapabilities(),
77
+ privacy: buildPrivacyAudit(),
78
+ };
79
+ }
80
+ //# sourceMappingURL=agent-manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-manifest.js","sourceRoot":"","sources":["../../src/services/agent-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAA4B,MAAM,oBAAoB,CAAC;AAmCjF,MAAM,iBAAiB,GAAyB;IAC9C,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,UAAU;IACV,SAAS;CACV,CAAC;AAEF,MAAM,uBAAuB,GAAG;IAC9B,2BAA2B;IAC3B,sBAAsB;IACtB,qBAAqB;CACtB,CAAC;AAEF,MAAM,KAAK,GAAG;IACZ,wBAAwB;IACxB,sBAAsB;IACtB,uBAAuB;IACvB,2BAA2B;IAC3B,qBAAqB;IACrB,wBAAwB;IACxB,kBAAkB;IAClB,uBAAuB;IACvB,oBAAoB;IACpB,qBAAqB;IACrB,uBAAuB;IACvB,uBAAuB;IACvB,mBAAmB;IACnB,mBAAmB;IACnB,2BAA2B;IAC3B,mBAAmB;IACnB,mBAAmB;IACnB,uBAAuB;IACvB,wBAAwB;IACxB,qBAAqB;CACtB,CAAC;AAEF,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,cAAc;QACvB,MAAM;QACN,iBAAiB,EAAE,iBAAiB;QACpC,OAAO,EAAE;YACP,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,CAAC,IAAI,EAAE,kBAAkB,CAAC;YAChC,YAAY,EAAE,CAAC,aAAa,EAAE,qBAAqB,EAAE,mBAAmB,CAAC;SAC1E;QACD,uBAAuB,EAAE,uBAAuB;QAChD,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE;YACT,0BAA0B;YAC1B,wBAAwB;YACxB,yBAAyB;YACzB,uBAAuB;SACxB;QACD,MAAM,EAAE;YACN,gBAAgB,EAAE,cAAc;YAChC,0BAA0B,EAAE,wCAAwC;YACpE,gBAAgB,EAAE,IAAI;YACtB,0BAA0B,EAAE,IAAI;SACjC;QACD,WAAW,EAAE;YACX,8DAA8D;YAC9D,iEAAiE;YACjE,kFAAkF;YAClF,sFAAsF;YACtF,mFAAmF;YACnF,2FAA2F;YAC3F,8FAA8F;YAC9F,0FAA0F;YAC1F,qEAAqE;SACtE;QACD,YAAY,EAAE,iBAAiB,EAAE;QACjC,OAAO,EAAE,iBAAiB,EAAE;KAC7B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface NourishCapabilities {
2
+ project: string;
3
+ role: string;
4
+ providers: {
5
+ primary: string;
6
+ optional_barcode: string;
7
+ bulk_imports: string;
8
+ };
9
+ workflows: string[];
10
+ recommended_first_tools: string[];
11
+ }
12
+ export declare function buildCapabilities(): NourishCapabilities;
@@ -0,0 +1,27 @@
1
+ export function buildCapabilities() {
2
+ return {
3
+ project: "Nourish MCP",
4
+ role: "nutrition intelligence adapter for agents and local-first humans",
5
+ providers: {
6
+ primary: "USDA FoodData Central",
7
+ optional_barcode: "Open Food Facts",
8
+ bulk_imports: "OpenNutrition/Open Food Facts imports are separate opt-in flows",
9
+ },
10
+ workflows: [
11
+ "food search",
12
+ "barcode lookup",
13
+ "meal estimation",
14
+ "local intake logging",
15
+ "intake list, edit, delete, and clear-day workflows",
16
+ "hydration and local nutrition goals",
17
+ "daily and weekly summaries",
18
+ "wearable-aware wellness context",
19
+ ],
20
+ recommended_first_tools: [
21
+ "nourish_connection_status",
22
+ "nourish_capabilities",
23
+ "nourish_search_food",
24
+ ],
25
+ };
26
+ }
27
+ //# sourceMappingURL=capabilities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../src/services/capabilities.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL,OAAO,EAAE,aAAa;QACtB,IAAI,EAAE,kEAAkE;QACxE,SAAS,EAAE;YACT,OAAO,EAAE,uBAAuB;YAChC,gBAAgB,EAAE,iBAAiB;YACnC,YAAY,EAAE,iEAAiE;SAChF;QACD,SAAS,EAAE;YACT,aAAa;YACb,gBAAgB;YAChB,iBAAiB;YACjB,sBAAsB;YACtB,oDAAoD;YACpD,qCAAqC;YACrC,4BAA4B;YAC5B,iCAAiC;SAClC;QACD,uBAAuB,EAAE;YACvB,2BAA2B;YAC3B,sBAAsB;YACtB,qBAAqB;SACtB;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { NourishConfig } from "../types.js";
2
+ export declare function getConfig(): NourishConfig;
3
+ export declare function getFixtureDir(): string;
@@ -0,0 +1,32 @@
1
+ /// <reference types="node" />
2
+ import { mkdirSync } from "node:fs";
3
+ import { homedir } from "node:os";
4
+ import { join } from "node:path";
5
+ import { LOCAL_DIR_NAME } from "../constants.js";
6
+ function numberFromEnv(value, fallback) {
7
+ if (value === undefined) {
8
+ return fallback;
9
+ }
10
+ const parsed = Number.parseInt(value, 10);
11
+ return Number.isFinite(parsed) ? parsed : fallback;
12
+ }
13
+ export function getConfig() {
14
+ const local_dir = process.env.NOURISH_LOCAL_DIR ?? join(homedir(), LOCAL_DIR_NAME);
15
+ const usda_api_key = process.env.FDC_API_KEY ?? process.env.USDA_FDC_API_KEY;
16
+ mkdirSync(local_dir, { recursive: true });
17
+ const config = {
18
+ local_dir,
19
+ fixture_mode: process.env.NOURISH_FIXTURE_MODE === "1",
20
+ off_enabled: process.env.NOURISH_OFF_ENABLED !== "0",
21
+ cache_ttl_seconds: numberFromEnv(process.env.NOURISH_CACHE_TTL_SECONDS, 3600),
22
+ max_results: numberFromEnv(process.env.NOURISH_MAX_RESULTS, 20),
23
+ };
24
+ if (usda_api_key !== undefined) {
25
+ config.usda_api_key = usda_api_key;
26
+ }
27
+ return config;
28
+ }
29
+ export function getFixtureDir() {
30
+ return process.env.NOURISH_FIXTURE_DIR ?? "fixtures";
31
+ }
32
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/services/config.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGjD,SAAS,aAAa,CAAC,KAAyB,EAAE,QAAgB;IAChE,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC1C,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;AACrD,CAAC;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