@kynver-app/mcp-estimator 0.2.8 → 0.2.11

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 (40) hide show
  1. package/dist/lib/mcp-sse-server.d.ts +15 -0
  2. package/dist/lib/mcp-sse-server.js +103 -2
  3. package/dist/server.js +16 -0
  4. package/dist/tools/catalog-tools.js +1 -1
  5. package/dist/tools/email-pdf-tools.d.ts +45 -0
  6. package/dist/tools/email-pdf-tools.js +21 -0
  7. package/dist/tools/intake-tools.d.ts +463 -0
  8. package/dist/tools/intake-tools.js +82 -0
  9. package/dist/tools/price-catalog-tools.d.ts +96 -0
  10. package/dist/tools/price-catalog-tools.js +72 -0
  11. package/dist/tools/remodel-deliverable-tools.d.ts +1868 -0
  12. package/dist/tools/remodel-deliverable-tools.js +138 -0
  13. package/dist/tools/remodel-estimate-tools.d.ts +525 -0
  14. package/dist/tools/remodel-estimate-tools.js +71 -0
  15. package/dist/tools/takeoff-tools.d.ts +274 -0
  16. package/dist/tools/takeoff-tools.js +38 -4
  17. package/dist/tools/vision-tools.js +2 -2
  18. package/package.json +6 -1
  19. package/src/index.ts +0 -18
  20. package/src/lib/kynver-client.ts +0 -136
  21. package/src/lib/mcp-sse-server.ts +0 -249
  22. package/src/lib/package-version.ts +0 -55
  23. package/src/server.ts +0 -141
  24. package/src/sse.ts +0 -10
  25. package/src/tools/catalog-tools.ts +0 -217
  26. package/src/tools/client-tools.ts +0 -114
  27. package/src/tools/company-tools.ts +0 -108
  28. package/src/tools/email-pdf-tools.ts +0 -27
  29. package/src/tools/estimate-tools.ts +0 -281
  30. package/src/tools/intake-tools.ts +0 -95
  31. package/src/tools/photo-tools.ts +0 -60
  32. package/src/tools/price-catalog-tools.ts +0 -80
  33. package/src/tools/remodel-deliverable-tools.ts +0 -163
  34. package/src/tools/remodel-estimate-tools.ts +0 -80
  35. package/src/tools/stats-pdf-tools.ts +0 -80
  36. package/src/tools/takeoff-tools.ts +0 -319
  37. package/src/tools/template-tools.ts +0 -80
  38. package/src/tools/version-tools.ts +0 -39
  39. package/src/tools/vision-tools.ts +0 -48
  40. package/tsconfig.json +0 -15
@@ -0,0 +1,463 @@
1
+ import { z } from "zod";
2
+ declare const normalizeRemodelIntakeSchema: z.ZodObject<{
3
+ projectType: z.ZodEnum<["kitchen_remodel", "bath_remodel", "kitchen_and_bath_remodel", "whole_home_remodel", "other_remodel"]>;
4
+ projectName: z.ZodOptional<z.ZodString>;
5
+ siteAddress: z.ZodOptional<z.ZodString>;
6
+ baseScopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
7
+ key: z.ZodOptional<z.ZodString>;
8
+ label: z.ZodString;
9
+ quantity: z.ZodOptional<z.ZodNumber>;
10
+ unit: z.ZodOptional<z.ZodString>;
11
+ serviceCode: z.ZodOptional<z.ZodString>;
12
+ budgetLump: z.ZodOptional<z.ZodNumber>;
13
+ notes: z.ZodOptional<z.ZodString>;
14
+ confidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low", "unknown"]>>;
15
+ isAlternate: z.ZodOptional<z.ZodBoolean>;
16
+ alternateGroup: z.ZodOptional<z.ZodString>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ label: string;
19
+ serviceCode?: string | undefined;
20
+ unit?: string | undefined;
21
+ notes?: string | undefined;
22
+ quantity?: number | undefined;
23
+ key?: string | undefined;
24
+ budgetLump?: number | undefined;
25
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
26
+ isAlternate?: boolean | undefined;
27
+ alternateGroup?: string | undefined;
28
+ }, {
29
+ label: string;
30
+ serviceCode?: string | undefined;
31
+ unit?: string | undefined;
32
+ notes?: string | undefined;
33
+ quantity?: number | undefined;
34
+ key?: string | undefined;
35
+ budgetLump?: number | undefined;
36
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
37
+ isAlternate?: boolean | undefined;
38
+ alternateGroup?: string | undefined;
39
+ }>, "many">>;
40
+ alternates: z.ZodOptional<z.ZodArray<z.ZodObject<{
41
+ key: z.ZodString;
42
+ label: z.ZodString;
43
+ scopeKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
44
+ lumpAdd: z.ZodOptional<z.ZodNumber>;
45
+ notes: z.ZodOptional<z.ZodString>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ label: string;
48
+ key: string;
49
+ notes?: string | undefined;
50
+ scopeKeys?: string[] | undefined;
51
+ lumpAdd?: number | undefined;
52
+ }, {
53
+ label: string;
54
+ key: string;
55
+ notes?: string | undefined;
56
+ scopeKeys?: string[] | undefined;
57
+ lumpAdd?: number | undefined;
58
+ }>, "many">>;
59
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
60
+ id: z.ZodString;
61
+ kind: z.ZodEnum<["photo", "drawing", "plan_set", "spec_pdf", "spreadsheet", "other"]>;
62
+ fileName: z.ZodOptional<z.ZodString>;
63
+ caption: z.ZodOptional<z.ZodString>;
64
+ url: z.ZodOptional<z.ZodString>;
65
+ mimeType: z.ZodOptional<z.ZodString>;
66
+ }, "strip", z.ZodTypeAny, {
67
+ id: string;
68
+ kind: "photo" | "drawing" | "plan_set" | "spec_pdf" | "spreadsheet" | "other";
69
+ caption?: string | undefined;
70
+ fileName?: string | undefined;
71
+ mimeType?: string | undefined;
72
+ url?: string | undefined;
73
+ }, {
74
+ id: string;
75
+ kind: "photo" | "drawing" | "plan_set" | "spec_pdf" | "spreadsheet" | "other";
76
+ caption?: string | undefined;
77
+ fileName?: string | undefined;
78
+ mimeType?: string | undefined;
79
+ url?: string | undefined;
80
+ }>, "many">>;
81
+ exclusions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
82
+ surprises: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
83
+ rateReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
84
+ key: z.ZodString;
85
+ label: z.ZodString;
86
+ value: z.ZodNumber;
87
+ unit: z.ZodOptional<z.ZodString>;
88
+ source: z.ZodEnum<["operating_rule", "catalog", "user", "takeoff"]>;
89
+ catalogId: z.ZodOptional<z.ZodString>;
90
+ confidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low", "unknown"]>>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ value: number;
93
+ label: string;
94
+ key: string;
95
+ source: "operating_rule" | "catalog" | "user" | "takeoff";
96
+ unit?: string | undefined;
97
+ catalogId?: string | undefined;
98
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
99
+ }, {
100
+ value: number;
101
+ label: string;
102
+ key: string;
103
+ source: "operating_rule" | "catalog" | "user" | "takeoff";
104
+ unit?: string | undefined;
105
+ catalogId?: string | undefined;
106
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
107
+ }>, "many">>;
108
+ assumptionsNeedingReview: z.ZodOptional<z.ZodArray<z.ZodObject<{
109
+ id: z.ZodString;
110
+ text: z.ZodString;
111
+ severity: z.ZodEnum<["info", "warn", "blocker"]>;
112
+ relatedScopeKey: z.ZodOptional<z.ZodString>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ id: string;
115
+ text: string;
116
+ severity: "info" | "warn" | "blocker";
117
+ relatedScopeKey?: string | undefined;
118
+ }, {
119
+ id: string;
120
+ text: string;
121
+ severity: "info" | "warn" | "blocker";
122
+ relatedScopeKey?: string | undefined;
123
+ }>, "many">>;
124
+ remodelHints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
125
+ includeStandardAlternates: z.ZodOptional<z.ZodBoolean>;
126
+ notes: z.ZodOptional<z.ZodString>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ projectType: "kitchen_remodel" | "bath_remodel" | "kitchen_and_bath_remodel" | "whole_home_remodel" | "other_remodel";
129
+ notes?: string | undefined;
130
+ projectName?: string | undefined;
131
+ siteAddress?: string | undefined;
132
+ remodelHints?: Record<string, unknown> | undefined;
133
+ baseScopes?: {
134
+ label: string;
135
+ serviceCode?: string | undefined;
136
+ unit?: string | undefined;
137
+ notes?: string | undefined;
138
+ quantity?: number | undefined;
139
+ key?: string | undefined;
140
+ budgetLump?: number | undefined;
141
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
142
+ isAlternate?: boolean | undefined;
143
+ alternateGroup?: string | undefined;
144
+ }[] | undefined;
145
+ alternates?: {
146
+ label: string;
147
+ key: string;
148
+ notes?: string | undefined;
149
+ scopeKeys?: string[] | undefined;
150
+ lumpAdd?: number | undefined;
151
+ }[] | undefined;
152
+ attachments?: {
153
+ id: string;
154
+ kind: "photo" | "drawing" | "plan_set" | "spec_pdf" | "spreadsheet" | "other";
155
+ caption?: string | undefined;
156
+ fileName?: string | undefined;
157
+ mimeType?: string | undefined;
158
+ url?: string | undefined;
159
+ }[] | undefined;
160
+ exclusions?: string[] | undefined;
161
+ surprises?: string[] | undefined;
162
+ rateReferences?: {
163
+ value: number;
164
+ label: string;
165
+ key: string;
166
+ source: "operating_rule" | "catalog" | "user" | "takeoff";
167
+ unit?: string | undefined;
168
+ catalogId?: string | undefined;
169
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
170
+ }[] | undefined;
171
+ assumptionsNeedingReview?: {
172
+ id: string;
173
+ text: string;
174
+ severity: "info" | "warn" | "blocker";
175
+ relatedScopeKey?: string | undefined;
176
+ }[] | undefined;
177
+ includeStandardAlternates?: boolean | undefined;
178
+ }, {
179
+ projectType: "kitchen_remodel" | "bath_remodel" | "kitchen_and_bath_remodel" | "whole_home_remodel" | "other_remodel";
180
+ notes?: string | undefined;
181
+ projectName?: string | undefined;
182
+ siteAddress?: string | undefined;
183
+ remodelHints?: Record<string, unknown> | undefined;
184
+ baseScopes?: {
185
+ label: string;
186
+ serviceCode?: string | undefined;
187
+ unit?: string | undefined;
188
+ notes?: string | undefined;
189
+ quantity?: number | undefined;
190
+ key?: string | undefined;
191
+ budgetLump?: number | undefined;
192
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
193
+ isAlternate?: boolean | undefined;
194
+ alternateGroup?: string | undefined;
195
+ }[] | undefined;
196
+ alternates?: {
197
+ label: string;
198
+ key: string;
199
+ notes?: string | undefined;
200
+ scopeKeys?: string[] | undefined;
201
+ lumpAdd?: number | undefined;
202
+ }[] | undefined;
203
+ attachments?: {
204
+ id: string;
205
+ kind: "photo" | "drawing" | "plan_set" | "spec_pdf" | "spreadsheet" | "other";
206
+ caption?: string | undefined;
207
+ fileName?: string | undefined;
208
+ mimeType?: string | undefined;
209
+ url?: string | undefined;
210
+ }[] | undefined;
211
+ exclusions?: string[] | undefined;
212
+ surprises?: string[] | undefined;
213
+ rateReferences?: {
214
+ value: number;
215
+ label: string;
216
+ key: string;
217
+ source: "operating_rule" | "catalog" | "user" | "takeoff";
218
+ unit?: string | undefined;
219
+ catalogId?: string | undefined;
220
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
221
+ }[] | undefined;
222
+ assumptionsNeedingReview?: {
223
+ id: string;
224
+ text: string;
225
+ severity: "info" | "warn" | "blocker";
226
+ relatedScopeKey?: string | undefined;
227
+ }[] | undefined;
228
+ includeStandardAlternates?: boolean | undefined;
229
+ }>;
230
+ export declare const normalizeRemodelIntake: {
231
+ name: string;
232
+ description: string;
233
+ inputSchemaZod: z.ZodObject<{
234
+ projectType: z.ZodEnum<["kitchen_remodel", "bath_remodel", "kitchen_and_bath_remodel", "whole_home_remodel", "other_remodel"]>;
235
+ projectName: z.ZodOptional<z.ZodString>;
236
+ siteAddress: z.ZodOptional<z.ZodString>;
237
+ baseScopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
238
+ key: z.ZodOptional<z.ZodString>;
239
+ label: z.ZodString;
240
+ quantity: z.ZodOptional<z.ZodNumber>;
241
+ unit: z.ZodOptional<z.ZodString>;
242
+ serviceCode: z.ZodOptional<z.ZodString>;
243
+ budgetLump: z.ZodOptional<z.ZodNumber>;
244
+ notes: z.ZodOptional<z.ZodString>;
245
+ confidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low", "unknown"]>>;
246
+ isAlternate: z.ZodOptional<z.ZodBoolean>;
247
+ alternateGroup: z.ZodOptional<z.ZodString>;
248
+ }, "strip", z.ZodTypeAny, {
249
+ label: string;
250
+ serviceCode?: string | undefined;
251
+ unit?: string | undefined;
252
+ notes?: string | undefined;
253
+ quantity?: number | undefined;
254
+ key?: string | undefined;
255
+ budgetLump?: number | undefined;
256
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
257
+ isAlternate?: boolean | undefined;
258
+ alternateGroup?: string | undefined;
259
+ }, {
260
+ label: string;
261
+ serviceCode?: string | undefined;
262
+ unit?: string | undefined;
263
+ notes?: string | undefined;
264
+ quantity?: number | undefined;
265
+ key?: string | undefined;
266
+ budgetLump?: number | undefined;
267
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
268
+ isAlternate?: boolean | undefined;
269
+ alternateGroup?: string | undefined;
270
+ }>, "many">>;
271
+ alternates: z.ZodOptional<z.ZodArray<z.ZodObject<{
272
+ key: z.ZodString;
273
+ label: z.ZodString;
274
+ scopeKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
275
+ lumpAdd: z.ZodOptional<z.ZodNumber>;
276
+ notes: z.ZodOptional<z.ZodString>;
277
+ }, "strip", z.ZodTypeAny, {
278
+ label: string;
279
+ key: string;
280
+ notes?: string | undefined;
281
+ scopeKeys?: string[] | undefined;
282
+ lumpAdd?: number | undefined;
283
+ }, {
284
+ label: string;
285
+ key: string;
286
+ notes?: string | undefined;
287
+ scopeKeys?: string[] | undefined;
288
+ lumpAdd?: number | undefined;
289
+ }>, "many">>;
290
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
291
+ id: z.ZodString;
292
+ kind: z.ZodEnum<["photo", "drawing", "plan_set", "spec_pdf", "spreadsheet", "other"]>;
293
+ fileName: z.ZodOptional<z.ZodString>;
294
+ caption: z.ZodOptional<z.ZodString>;
295
+ url: z.ZodOptional<z.ZodString>;
296
+ mimeType: z.ZodOptional<z.ZodString>;
297
+ }, "strip", z.ZodTypeAny, {
298
+ id: string;
299
+ kind: "photo" | "drawing" | "plan_set" | "spec_pdf" | "spreadsheet" | "other";
300
+ caption?: string | undefined;
301
+ fileName?: string | undefined;
302
+ mimeType?: string | undefined;
303
+ url?: string | undefined;
304
+ }, {
305
+ id: string;
306
+ kind: "photo" | "drawing" | "plan_set" | "spec_pdf" | "spreadsheet" | "other";
307
+ caption?: string | undefined;
308
+ fileName?: string | undefined;
309
+ mimeType?: string | undefined;
310
+ url?: string | undefined;
311
+ }>, "many">>;
312
+ exclusions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
313
+ surprises: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
314
+ rateReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
315
+ key: z.ZodString;
316
+ label: z.ZodString;
317
+ value: z.ZodNumber;
318
+ unit: z.ZodOptional<z.ZodString>;
319
+ source: z.ZodEnum<["operating_rule", "catalog", "user", "takeoff"]>;
320
+ catalogId: z.ZodOptional<z.ZodString>;
321
+ confidence: z.ZodOptional<z.ZodEnum<["high", "medium", "low", "unknown"]>>;
322
+ }, "strip", z.ZodTypeAny, {
323
+ value: number;
324
+ label: string;
325
+ key: string;
326
+ source: "operating_rule" | "catalog" | "user" | "takeoff";
327
+ unit?: string | undefined;
328
+ catalogId?: string | undefined;
329
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
330
+ }, {
331
+ value: number;
332
+ label: string;
333
+ key: string;
334
+ source: "operating_rule" | "catalog" | "user" | "takeoff";
335
+ unit?: string | undefined;
336
+ catalogId?: string | undefined;
337
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
338
+ }>, "many">>;
339
+ assumptionsNeedingReview: z.ZodOptional<z.ZodArray<z.ZodObject<{
340
+ id: z.ZodString;
341
+ text: z.ZodString;
342
+ severity: z.ZodEnum<["info", "warn", "blocker"]>;
343
+ relatedScopeKey: z.ZodOptional<z.ZodString>;
344
+ }, "strip", z.ZodTypeAny, {
345
+ id: string;
346
+ text: string;
347
+ severity: "info" | "warn" | "blocker";
348
+ relatedScopeKey?: string | undefined;
349
+ }, {
350
+ id: string;
351
+ text: string;
352
+ severity: "info" | "warn" | "blocker";
353
+ relatedScopeKey?: string | undefined;
354
+ }>, "many">>;
355
+ remodelHints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
356
+ includeStandardAlternates: z.ZodOptional<z.ZodBoolean>;
357
+ notes: z.ZodOptional<z.ZodString>;
358
+ }, "strip", z.ZodTypeAny, {
359
+ projectType: "kitchen_remodel" | "bath_remodel" | "kitchen_and_bath_remodel" | "whole_home_remodel" | "other_remodel";
360
+ notes?: string | undefined;
361
+ projectName?: string | undefined;
362
+ siteAddress?: string | undefined;
363
+ remodelHints?: Record<string, unknown> | undefined;
364
+ baseScopes?: {
365
+ label: string;
366
+ serviceCode?: string | undefined;
367
+ unit?: string | undefined;
368
+ notes?: string | undefined;
369
+ quantity?: number | undefined;
370
+ key?: string | undefined;
371
+ budgetLump?: number | undefined;
372
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
373
+ isAlternate?: boolean | undefined;
374
+ alternateGroup?: string | undefined;
375
+ }[] | undefined;
376
+ alternates?: {
377
+ label: string;
378
+ key: string;
379
+ notes?: string | undefined;
380
+ scopeKeys?: string[] | undefined;
381
+ lumpAdd?: number | undefined;
382
+ }[] | undefined;
383
+ attachments?: {
384
+ id: string;
385
+ kind: "photo" | "drawing" | "plan_set" | "spec_pdf" | "spreadsheet" | "other";
386
+ caption?: string | undefined;
387
+ fileName?: string | undefined;
388
+ mimeType?: string | undefined;
389
+ url?: string | undefined;
390
+ }[] | undefined;
391
+ exclusions?: string[] | undefined;
392
+ surprises?: string[] | undefined;
393
+ rateReferences?: {
394
+ value: number;
395
+ label: string;
396
+ key: string;
397
+ source: "operating_rule" | "catalog" | "user" | "takeoff";
398
+ unit?: string | undefined;
399
+ catalogId?: string | undefined;
400
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
401
+ }[] | undefined;
402
+ assumptionsNeedingReview?: {
403
+ id: string;
404
+ text: string;
405
+ severity: "info" | "warn" | "blocker";
406
+ relatedScopeKey?: string | undefined;
407
+ }[] | undefined;
408
+ includeStandardAlternates?: boolean | undefined;
409
+ }, {
410
+ projectType: "kitchen_remodel" | "bath_remodel" | "kitchen_and_bath_remodel" | "whole_home_remodel" | "other_remodel";
411
+ notes?: string | undefined;
412
+ projectName?: string | undefined;
413
+ siteAddress?: string | undefined;
414
+ remodelHints?: Record<string, unknown> | undefined;
415
+ baseScopes?: {
416
+ label: string;
417
+ serviceCode?: string | undefined;
418
+ unit?: string | undefined;
419
+ notes?: string | undefined;
420
+ quantity?: number | undefined;
421
+ key?: string | undefined;
422
+ budgetLump?: number | undefined;
423
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
424
+ isAlternate?: boolean | undefined;
425
+ alternateGroup?: string | undefined;
426
+ }[] | undefined;
427
+ alternates?: {
428
+ label: string;
429
+ key: string;
430
+ notes?: string | undefined;
431
+ scopeKeys?: string[] | undefined;
432
+ lumpAdd?: number | undefined;
433
+ }[] | undefined;
434
+ attachments?: {
435
+ id: string;
436
+ kind: "photo" | "drawing" | "plan_set" | "spec_pdf" | "spreadsheet" | "other";
437
+ caption?: string | undefined;
438
+ fileName?: string | undefined;
439
+ mimeType?: string | undefined;
440
+ url?: string | undefined;
441
+ }[] | undefined;
442
+ exclusions?: string[] | undefined;
443
+ surprises?: string[] | undefined;
444
+ rateReferences?: {
445
+ value: number;
446
+ label: string;
447
+ key: string;
448
+ source: "operating_rule" | "catalog" | "user" | "takeoff";
449
+ unit?: string | undefined;
450
+ catalogId?: string | undefined;
451
+ confidence?: "unknown" | "high" | "medium" | "low" | undefined;
452
+ }[] | undefined;
453
+ assumptionsNeedingReview?: {
454
+ id: string;
455
+ text: string;
456
+ severity: "info" | "warn" | "blocker";
457
+ relatedScopeKey?: string | undefined;
458
+ }[] | undefined;
459
+ includeStandardAlternates?: boolean | undefined;
460
+ }>;
461
+ execute: (args: z.infer<typeof normalizeRemodelIntakeSchema>) => Promise<string>;
462
+ };
463
+ export {};
@@ -0,0 +1,82 @@
1
+ import { z } from "zod";
2
+ import * as client from "../lib/kynver-client.js";
3
+ const remodelProjectTypeSchema = z.enum([
4
+ "kitchen_remodel",
5
+ "bath_remodel",
6
+ "kitchen_and_bath_remodel",
7
+ "whole_home_remodel",
8
+ "other_remodel",
9
+ ]);
10
+ const normalizeRemodelIntakeSchema = z.object({
11
+ projectType: remodelProjectTypeSchema,
12
+ projectName: z.string().optional(),
13
+ siteAddress: z.string().optional(),
14
+ baseScopes: z
15
+ .array(z.object({
16
+ key: z.string().optional(),
17
+ label: z.string(),
18
+ quantity: z.number().optional(),
19
+ unit: z.string().optional(),
20
+ serviceCode: z.string().optional(),
21
+ budgetLump: z.number().optional(),
22
+ notes: z.string().optional(),
23
+ confidence: z.enum(["high", "medium", "low", "unknown"]).optional(),
24
+ isAlternate: z.boolean().optional(),
25
+ alternateGroup: z.string().optional(),
26
+ }))
27
+ .optional(),
28
+ alternates: z
29
+ .array(z.object({
30
+ key: z.string(),
31
+ label: z.string(),
32
+ scopeKeys: z.array(z.string()).optional(),
33
+ lumpAdd: z.number().optional(),
34
+ notes: z.string().optional(),
35
+ }))
36
+ .optional(),
37
+ attachments: z
38
+ .array(z.object({
39
+ id: z.string(),
40
+ kind: z.enum(["photo", "drawing", "plan_set", "spec_pdf", "spreadsheet", "other"]),
41
+ fileName: z.string().optional(),
42
+ caption: z.string().optional(),
43
+ url: z.string().optional(),
44
+ mimeType: z.string().optional(),
45
+ }))
46
+ .optional(),
47
+ exclusions: z.array(z.string()).optional(),
48
+ surprises: z.array(z.string()).optional(),
49
+ rateReferences: z
50
+ .array(z.object({
51
+ key: z.string(),
52
+ label: z.string(),
53
+ value: z.number(),
54
+ unit: z.string().optional(),
55
+ source: z.enum(["operating_rule", "catalog", "user", "takeoff"]),
56
+ catalogId: z.string().optional(),
57
+ confidence: z.enum(["high", "medium", "low", "unknown"]).optional(),
58
+ }))
59
+ .optional(),
60
+ assumptionsNeedingReview: z
61
+ .array(z.object({
62
+ id: z.string(),
63
+ text: z.string(),
64
+ severity: z.enum(["info", "warn", "blocker"]),
65
+ relatedScopeKey: z.string().optional(),
66
+ }))
67
+ .optional(),
68
+ remodelHints: z.record(z.string(), z.unknown()).optional(),
69
+ includeStandardAlternates: z.boolean().optional(),
70
+ notes: z.string().optional(),
71
+ });
72
+ export const normalizeRemodelIntake = {
73
+ name: "estimator_normalize_remodel_intake",
74
+ description: "Validate and normalize a residential remodel intake payload for kitchen/bath estimating. Accepts project type, base scopes vs alternates, drawing/photo attachment metadata, exclusions/surprises, rate references, and optional remodelHints from takeoff. Returns provenance-backed scopes, Will Portland default rates, assumptions needing review, and an estimate-builder-ready payload.",
75
+ inputSchemaZod: normalizeRemodelIntakeSchema,
76
+ execute: async (args) => {
77
+ if (!client.hasApiKey())
78
+ return client.noApiKeyMessage();
79
+ const data = await client.post("/estimator/intake/normalize-remodel", args);
80
+ return JSON.stringify(data, null, 2);
81
+ },
82
+ };
@@ -0,0 +1,96 @@
1
+ import { z } from "zod";
2
+ declare const listPriceCatalogsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
3
+ export declare const listPriceCatalogs: {
4
+ name: string;
5
+ description: string;
6
+ inputSchemaZod: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
7
+ execute: (_args: z.infer<typeof listPriceCatalogsSchema>) => Promise<string>;
8
+ };
9
+ declare const getPriceCatalogSchema: z.ZodObject<{
10
+ catalogId: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ catalogId: string;
13
+ }, {
14
+ catalogId: string;
15
+ }>;
16
+ export declare const getPriceCatalog: {
17
+ name: string;
18
+ description: string;
19
+ inputSchemaZod: z.ZodObject<{
20
+ catalogId: z.ZodString;
21
+ }, "strip", z.ZodTypeAny, {
22
+ catalogId: string;
23
+ }, {
24
+ catalogId: string;
25
+ }>;
26
+ execute: (args: z.infer<typeof getPriceCatalogSchema>) => Promise<string>;
27
+ };
28
+ declare const resolvePriceSchema: z.ZodObject<{
29
+ serviceCode: z.ZodString;
30
+ materialType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ region: z.ZodOptional<z.ZodString>;
32
+ overrideMaterialCost: z.ZodOptional<z.ZodNumber>;
33
+ overrideLaborCost: z.ZodOptional<z.ZodNumber>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ serviceCode: string;
36
+ materialType?: string | null | undefined;
37
+ region?: string | undefined;
38
+ overrideMaterialCost?: number | undefined;
39
+ overrideLaborCost?: number | undefined;
40
+ }, {
41
+ serviceCode: string;
42
+ materialType?: string | null | undefined;
43
+ region?: string | undefined;
44
+ overrideMaterialCost?: number | undefined;
45
+ overrideLaborCost?: number | undefined;
46
+ }>;
47
+ export declare const resolvePrice: {
48
+ name: string;
49
+ description: string;
50
+ inputSchemaZod: z.ZodObject<{
51
+ serviceCode: z.ZodString;
52
+ materialType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ region: z.ZodOptional<z.ZodString>;
54
+ overrideMaterialCost: z.ZodOptional<z.ZodNumber>;
55
+ overrideLaborCost: z.ZodOptional<z.ZodNumber>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ serviceCode: string;
58
+ materialType?: string | null | undefined;
59
+ region?: string | undefined;
60
+ overrideMaterialCost?: number | undefined;
61
+ overrideLaborCost?: number | undefined;
62
+ }, {
63
+ serviceCode: string;
64
+ materialType?: string | null | undefined;
65
+ region?: string | undefined;
66
+ overrideMaterialCost?: number | undefined;
67
+ overrideLaborCost?: number | undefined;
68
+ }>;
69
+ execute: (args: z.infer<typeof resolvePriceSchema>) => Promise<string>;
70
+ };
71
+ declare const seedPriceCatalogSchema: z.ZodObject<{
72
+ catalogId: z.ZodString;
73
+ overwrite: z.ZodOptional<z.ZodBoolean>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ catalogId: string;
76
+ overwrite?: boolean | undefined;
77
+ }, {
78
+ catalogId: string;
79
+ overwrite?: boolean | undefined;
80
+ }>;
81
+ export declare const seedPriceCatalog: {
82
+ name: string;
83
+ description: string;
84
+ inputSchemaZod: z.ZodObject<{
85
+ catalogId: z.ZodString;
86
+ overwrite: z.ZodOptional<z.ZodBoolean>;
87
+ }, "strip", z.ZodTypeAny, {
88
+ catalogId: string;
89
+ overwrite?: boolean | undefined;
90
+ }, {
91
+ catalogId: string;
92
+ overwrite?: boolean | undefined;
93
+ }>;
94
+ execute: (args: z.infer<typeof seedPriceCatalogSchema>) => Promise<string>;
95
+ };
96
+ export {};