@kynver-app/mcp-estimator 0.2.8 → 0.2.10

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 (38) hide show
  1. package/dist/server.js +16 -0
  2. package/dist/tools/catalog-tools.js +1 -1
  3. package/dist/tools/email-pdf-tools.d.ts +45 -0
  4. package/dist/tools/email-pdf-tools.js +21 -0
  5. package/dist/tools/intake-tools.d.ts +463 -0
  6. package/dist/tools/intake-tools.js +82 -0
  7. package/dist/tools/price-catalog-tools.d.ts +96 -0
  8. package/dist/tools/price-catalog-tools.js +72 -0
  9. package/dist/tools/remodel-deliverable-tools.d.ts +1868 -0
  10. package/dist/tools/remodel-deliverable-tools.js +138 -0
  11. package/dist/tools/remodel-estimate-tools.d.ts +525 -0
  12. package/dist/tools/remodel-estimate-tools.js +71 -0
  13. package/dist/tools/takeoff-tools.d.ts +274 -0
  14. package/dist/tools/takeoff-tools.js +38 -4
  15. package/dist/tools/vision-tools.js +2 -2
  16. package/package.json +6 -1
  17. package/src/index.ts +0 -18
  18. package/src/lib/kynver-client.ts +0 -136
  19. package/src/lib/mcp-sse-server.ts +0 -249
  20. package/src/lib/package-version.ts +0 -55
  21. package/src/server.ts +0 -141
  22. package/src/sse.ts +0 -10
  23. package/src/tools/catalog-tools.ts +0 -217
  24. package/src/tools/client-tools.ts +0 -114
  25. package/src/tools/company-tools.ts +0 -108
  26. package/src/tools/email-pdf-tools.ts +0 -27
  27. package/src/tools/estimate-tools.ts +0 -281
  28. package/src/tools/intake-tools.ts +0 -95
  29. package/src/tools/photo-tools.ts +0 -60
  30. package/src/tools/price-catalog-tools.ts +0 -80
  31. package/src/tools/remodel-deliverable-tools.ts +0 -163
  32. package/src/tools/remodel-estimate-tools.ts +0 -80
  33. package/src/tools/stats-pdf-tools.ts +0 -80
  34. package/src/tools/takeoff-tools.ts +0 -319
  35. package/src/tools/template-tools.ts +0 -80
  36. package/src/tools/version-tools.ts +0 -39
  37. package/src/tools/vision-tools.ts +0 -48
  38. package/tsconfig.json +0 -15
package/dist/server.js CHANGED
@@ -4,15 +4,20 @@
4
4
  */
5
5
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
6
6
  import * as catalogTools from "./tools/catalog-tools.js";
7
+ import * as priceCatalogTools from "./tools/price-catalog-tools.js";
7
8
  import * as estimateTools from "./tools/estimate-tools.js";
8
9
  import * as templateTools from "./tools/template-tools.js";
9
10
  import * as versionTools from "./tools/version-tools.js";
10
11
  import * as photoTools from "./tools/photo-tools.js";
11
12
  import * as statsPdfTools from "./tools/stats-pdf-tools.js";
13
+ import * as emailPdfTools from "./tools/email-pdf-tools.js";
12
14
  import * as visionTools from "./tools/vision-tools.js";
13
15
  import * as companyTools from "./tools/company-tools.js";
14
16
  import * as clientTools from "./tools/client-tools.js";
15
17
  import * as takeoffTools from "./tools/takeoff-tools.js";
18
+ import * as intakeTools from "./tools/intake-tools.js";
19
+ import * as remodelEstimateTools from "./tools/remodel-estimate-tools.js";
20
+ import * as remodelDeliverableTools from "./tools/remodel-deliverable-tools.js";
16
21
  import { readOwnPackageVersion } from "./lib/package-version.js";
17
22
  const PACKAGE_VERSION = readOwnPackageVersion(import.meta.url);
18
23
  function toolResult(text) {
@@ -34,6 +39,11 @@ export function createEstimatorServer() {
34
39
  register(catalogTools.getConfig.name, { description: catalogTools.getConfig.description, inputSchema: catalogTools.getConfig.inputSchemaZod }, (args) => catalogTools.getConfig.execute(args));
35
40
  register(catalogTools.updateConfig.name, { description: catalogTools.updateConfig.description, inputSchema: catalogTools.updateConfig.inputSchemaZod }, (args) => catalogTools.updateConfig.execute(args));
36
41
  register(catalogTools.importTemplate.name, { description: catalogTools.importTemplate.description, inputSchema: catalogTools.importTemplate.inputSchemaZod }, (args) => catalogTools.importTemplate.execute(args));
42
+ // --- Price catalog tools (4) ---
43
+ register(priceCatalogTools.listPriceCatalogs.name, { description: priceCatalogTools.listPriceCatalogs.description, inputSchema: priceCatalogTools.listPriceCatalogs.inputSchemaZod }, (args) => priceCatalogTools.listPriceCatalogs.execute(args));
44
+ register(priceCatalogTools.getPriceCatalog.name, { description: priceCatalogTools.getPriceCatalog.description, inputSchema: priceCatalogTools.getPriceCatalog.inputSchemaZod }, (args) => priceCatalogTools.getPriceCatalog.execute(args));
45
+ register(priceCatalogTools.resolvePrice.name, { description: priceCatalogTools.resolvePrice.description, inputSchema: priceCatalogTools.resolvePrice.inputSchemaZod }, (args) => priceCatalogTools.resolvePrice.execute(args));
46
+ register(priceCatalogTools.seedPriceCatalog.name, { description: priceCatalogTools.seedPriceCatalog.description, inputSchema: priceCatalogTools.seedPriceCatalog.inputSchemaZod }, (args) => priceCatalogTools.seedPriceCatalog.execute(args));
37
47
  // --- Estimate tools (11) ---
38
48
  register(estimateTools.createReplacement.name, { description: estimateTools.createReplacement.description, inputSchema: estimateTools.createReplacement.inputSchemaZod }, (args) => estimateTools.createReplacement.execute(args));
39
49
  register(estimateTools.createRepair.name, { description: estimateTools.createRepair.description, inputSchema: estimateTools.createRepair.inputSchemaZod }, (args) => estimateTools.createRepair.execute(args));
@@ -46,6 +56,9 @@ export function createEstimatorServer() {
46
56
  register(estimateTools.updateEstimate.name, { description: estimateTools.updateEstimate.description, inputSchema: estimateTools.updateEstimate.inputSchemaZod }, (args) => estimateTools.updateEstimate.execute(args));
47
57
  register(estimateTools.deleteEstimate.name, { description: estimateTools.deleteEstimate.description, inputSchema: estimateTools.deleteEstimate.inputSchemaZod }, (args) => estimateTools.deleteEstimate.execute(args));
48
58
  register(estimateTools.duplicateEstimate.name, { description: estimateTools.duplicateEstimate.description, inputSchema: estimateTools.duplicateEstimate.inputSchemaZod }, (args) => estimateTools.duplicateEstimate.execute(args));
59
+ register(remodelEstimateTools.buildRemodelEstimate.name, { description: remodelEstimateTools.buildRemodelEstimate.description, inputSchema: remodelEstimateTools.buildRemodelEstimate.inputSchemaZod }, (args) => remodelEstimateTools.buildRemodelEstimate.execute(args));
60
+ register(remodelDeliverableTools.buildRemodelDeliverable.name, { description: remodelDeliverableTools.buildRemodelDeliverable.description, inputSchema: remodelDeliverableTools.buildRemodelDeliverable.inputSchemaZod }, (args) => remodelDeliverableTools.buildRemodelDeliverable.execute(args));
61
+ register(remodelDeliverableTools.draftRemodelDeliverable.name, { description: remodelDeliverableTools.draftRemodelDeliverable.description, inputSchema: remodelDeliverableTools.draftRemodelDeliverable.inputSchemaZod }, (args) => remodelDeliverableTools.draftRemodelDeliverable.execute(args));
49
62
  // --- Template tools (4) ---
50
63
  register(templateTools.saveTemplate.name, { description: templateTools.saveTemplate.description, inputSchema: templateTools.saveTemplate.inputSchemaZod }, (args) => templateTools.saveTemplate.execute(args));
51
64
  register(templateTools.listTemplates.name, { description: templateTools.listTemplates.description, inputSchema: templateTools.listTemplates.inputSchemaZod }, (args) => templateTools.listTemplates.execute(args));
@@ -62,6 +75,7 @@ export function createEstimatorServer() {
62
75
  register(statsPdfTools.getStats.name, { description: statsPdfTools.getStats.description, inputSchema: statsPdfTools.getStats.inputSchemaZod }, (args) => statsPdfTools.getStats.execute(args));
63
76
  register(statsPdfTools.exportPdf.name, { description: statsPdfTools.exportPdf.description, inputSchema: statsPdfTools.exportPdf.inputSchemaZod }, (args) => statsPdfTools.exportPdf.execute(args));
64
77
  register(statsPdfTools.updateOutputConfig.name, { description: statsPdfTools.updateOutputConfig.description, inputSchema: statsPdfTools.updateOutputConfig.inputSchemaZod }, (args) => statsPdfTools.updateOutputConfig.execute(args));
78
+ register(emailPdfTools.emailPdf.name, { description: emailPdfTools.emailPdf.description, inputSchema: emailPdfTools.emailPdf.inputSchemaZod }, (args) => emailPdfTools.emailPdf.execute(args));
65
79
  // --- Vision tools (2) ---
66
80
  register(visionTools.analyzePhotos.name, { description: visionTools.analyzePhotos.description, inputSchema: visionTools.analyzePhotos.inputSchemaZod }, (args) => visionTools.analyzePhotos.execute(args));
67
81
  register(visionTools.analyzeDocument.name, { description: visionTools.analyzeDocument.description, inputSchema: visionTools.analyzeDocument.inputSchemaZod }, (args) => visionTools.analyzeDocument.execute(args));
@@ -94,5 +108,7 @@ export function createEstimatorServer() {
94
108
  register(takeoffTools.requestEstimateApproval.name, { description: takeoffTools.requestEstimateApproval.description, inputSchema: takeoffTools.requestEstimateApproval.inputSchemaZod }, (args) => takeoffTools.requestEstimateApproval.execute(args));
95
109
  register(takeoffTools.approveEstimate.name, { description: takeoffTools.approveEstimate.description, inputSchema: takeoffTools.approveEstimate.inputSchemaZod }, (args) => takeoffTools.approveEstimate.execute(args));
96
110
  register(takeoffTools.getEstimateApproval.name, { description: takeoffTools.getEstimateApproval.description, inputSchema: takeoffTools.getEstimateApproval.inputSchemaZod }, (args) => takeoffTools.getEstimateApproval.execute(args));
111
+ // --- Intake tools (1) ---
112
+ register(intakeTools.normalizeRemodelIntake.name, { description: intakeTools.normalizeRemodelIntake.description, inputSchema: intakeTools.normalizeRemodelIntake.inputSchemaZod }, (args) => intakeTools.normalizeRemodelIntake.execute(args));
97
113
  return server;
98
114
  }
@@ -25,7 +25,7 @@ const reviewImportSchema = z.object({
25
25
  .array(z.object({
26
26
  index: z.number(),
27
27
  action: z.enum(["keep", "skip", "edit"]),
28
- edits: z.record(z.unknown()).optional(),
28
+ edits: z.record(z.string(), z.unknown()).optional(),
29
29
  }))
30
30
  .optional(),
31
31
  });
@@ -0,0 +1,45 @@
1
+ import { z } from "zod";
2
+ declare const emailPdfSchema: z.ZodObject<{
3
+ estimateId: z.ZodString;
4
+ recipient: z.ZodOptional<z.ZodString>;
5
+ subject: z.ZodOptional<z.ZodString>;
6
+ message: z.ZodOptional<z.ZodString>;
7
+ confirmExternalRecipient: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ estimateId: string;
10
+ confirmExternalRecipient: boolean;
11
+ message?: string | undefined;
12
+ recipient?: string | undefined;
13
+ subject?: string | undefined;
14
+ }, {
15
+ estimateId: string;
16
+ message?: string | undefined;
17
+ recipient?: string | undefined;
18
+ subject?: string | undefined;
19
+ confirmExternalRecipient?: boolean | undefined;
20
+ }>;
21
+ export declare const emailPdf: {
22
+ name: string;
23
+ description: string;
24
+ inputSchemaZod: z.ZodObject<{
25
+ estimateId: z.ZodString;
26
+ recipient: z.ZodOptional<z.ZodString>;
27
+ subject: z.ZodOptional<z.ZodString>;
28
+ message: z.ZodOptional<z.ZodString>;
29
+ confirmExternalRecipient: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ estimateId: string;
32
+ confirmExternalRecipient: boolean;
33
+ message?: string | undefined;
34
+ recipient?: string | undefined;
35
+ subject?: string | undefined;
36
+ }, {
37
+ estimateId: string;
38
+ message?: string | undefined;
39
+ recipient?: string | undefined;
40
+ subject?: string | undefined;
41
+ confirmExternalRecipient?: boolean | undefined;
42
+ }>;
43
+ execute: (args: z.infer<typeof emailPdfSchema>) => Promise<string>;
44
+ };
45
+ export {};
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ import * as client from "../lib/kynver-client.js";
3
+ const emailPdfSchema = z.object({
4
+ estimateId: z.string(),
5
+ recipient: z.string().email().optional(),
6
+ subject: z.string().min(1).max(200).optional(),
7
+ message: z.string().min(1).max(10_000).optional(),
8
+ confirmExternalRecipient: z.boolean().optional().default(false),
9
+ });
10
+ export const emailPdf = {
11
+ name: "estimator_email_pdf",
12
+ description: "Email an estimate PDF to a recipient. Fetches and attaches the PDF server-side (no secrets exposed). Defaults to the account owner's email when recipient is omitted. Estimate client emails and linked client records are trusted without extra confirmation; any other address requires confirmExternalRecipient=true after explicit user confirmation. Respects the estimate approval gate before customer send. Returns send status and audit metadata.",
13
+ inputSchemaZod: emailPdfSchema,
14
+ execute: async (args) => {
15
+ if (!client.hasApiKey())
16
+ return client.noApiKeyMessage();
17
+ const { estimateId, ...body } = args;
18
+ const data = await client.post(`/estimator/estimates/${estimateId}/email-pdf`, body);
19
+ return JSON.stringify(data);
20
+ },
21
+ };
@@ -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 {};