@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.
- package/dist/server.js +16 -0
- package/dist/tools/catalog-tools.js +1 -1
- package/dist/tools/email-pdf-tools.d.ts +45 -0
- package/dist/tools/email-pdf-tools.js +21 -0
- package/dist/tools/intake-tools.d.ts +463 -0
- package/dist/tools/intake-tools.js +82 -0
- package/dist/tools/price-catalog-tools.d.ts +96 -0
- package/dist/tools/price-catalog-tools.js +72 -0
- package/dist/tools/remodel-deliverable-tools.d.ts +1868 -0
- package/dist/tools/remodel-deliverable-tools.js +138 -0
- package/dist/tools/remodel-estimate-tools.d.ts +525 -0
- package/dist/tools/remodel-estimate-tools.js +71 -0
- package/dist/tools/takeoff-tools.d.ts +274 -0
- package/dist/tools/takeoff-tools.js +38 -4
- package/dist/tools/vision-tools.js +2 -2
- package/package.json +6 -1
- package/src/index.ts +0 -18
- package/src/lib/kynver-client.ts +0 -136
- package/src/lib/mcp-sse-server.ts +0 -249
- package/src/lib/package-version.ts +0 -55
- package/src/server.ts +0 -141
- package/src/sse.ts +0 -10
- package/src/tools/catalog-tools.ts +0 -217
- package/src/tools/client-tools.ts +0 -114
- package/src/tools/company-tools.ts +0 -108
- package/src/tools/email-pdf-tools.ts +0 -27
- package/src/tools/estimate-tools.ts +0 -281
- package/src/tools/intake-tools.ts +0 -95
- package/src/tools/photo-tools.ts +0 -60
- package/src/tools/price-catalog-tools.ts +0 -80
- package/src/tools/remodel-deliverable-tools.ts +0 -163
- package/src/tools/remodel-estimate-tools.ts +0 -80
- package/src/tools/stats-pdf-tools.ts +0 -80
- package/src/tools/takeoff-tools.ts +0 -319
- package/src/tools/template-tools.ts +0 -80
- package/src/tools/version-tools.ts +0 -39
- package/src/tools/vision-tools.ts +0 -48
- package/tsconfig.json +0 -15
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import * as client from "../lib/kynver-client.js";
|
|
3
|
+
const packageSchema = z.object({
|
|
4
|
+
intake: z.object({
|
|
5
|
+
projectName: z.string().optional(),
|
|
6
|
+
scopes: z.array(z.object({
|
|
7
|
+
key: z.string(),
|
|
8
|
+
label: z.string().optional(),
|
|
9
|
+
quantity: z.number().optional(),
|
|
10
|
+
unit: z.string().optional(),
|
|
11
|
+
serviceCode: z.string().optional(),
|
|
12
|
+
budgetLump: z.number().optional(),
|
|
13
|
+
notes: z.string().optional(),
|
|
14
|
+
})),
|
|
15
|
+
expandScopeComponents: z.boolean().optional(),
|
|
16
|
+
includeStandardAlternates: z.boolean().optional(),
|
|
17
|
+
exclusions: z.array(z.string()).optional(),
|
|
18
|
+
assumptions: z.array(z.string()).optional(),
|
|
19
|
+
notes: z.string().optional(),
|
|
20
|
+
}),
|
|
21
|
+
pricing: z
|
|
22
|
+
.object({
|
|
23
|
+
contingencyPercent: z.number().optional(),
|
|
24
|
+
markupPercent: z.number().optional(),
|
|
25
|
+
profitPercent: z.number().optional(),
|
|
26
|
+
})
|
|
27
|
+
.optional(),
|
|
28
|
+
});
|
|
29
|
+
const buildDeliverableSchema = z.object({
|
|
30
|
+
preset: z.enum(["matthew-portland-2026-06"]).optional(),
|
|
31
|
+
client: z.object({
|
|
32
|
+
projectTitle: z.string(),
|
|
33
|
+
clientName: z.string().optional(),
|
|
34
|
+
preparedBy: z.string().optional(),
|
|
35
|
+
location: z.string().optional(),
|
|
36
|
+
documentType: z.string().optional(),
|
|
37
|
+
validityNote: z.string().optional(),
|
|
38
|
+
}),
|
|
39
|
+
budgetPackage: packageSchema.optional(),
|
|
40
|
+
fullPackage: packageSchema.optional(),
|
|
41
|
+
alternates: z
|
|
42
|
+
.array(z.object({
|
|
43
|
+
key: z.string(),
|
|
44
|
+
label: z.string(),
|
|
45
|
+
description: z.string(),
|
|
46
|
+
budgetPlaceholder: z.number().nullable(),
|
|
47
|
+
}))
|
|
48
|
+
.optional(),
|
|
49
|
+
correctionNote: z.string().optional(),
|
|
50
|
+
scopeBasis: z.array(z.string()).optional(),
|
|
51
|
+
});
|
|
52
|
+
export const buildRemodelDeliverable = {
|
|
53
|
+
name: "estimator_build_remodel_deliverable",
|
|
54
|
+
description: "Build a residential remodel deliverable package using the Matthew v3 golden output standard: contractor planning-budget tone, cover/header, executive summary option cards, scope basis, pricing summary, numbered detailed line items, key allowances, assumptions, exclusions, separated Option C alternates (never in headline totals), recommended next steps, and footer/validity language. Returns clientMarkdown + clientHtml + handoff JSON. Use preset matthew-portland-2026-06 for the reviewed Matthew Portland fixture ($339,025 full / $167,200 bank-budget; golden fixture at remodel-estimates/saved/2026-06-03-matthew-remodel-reviewed-v3/). Guards against superseded totals and generic AI prose. Does not persist — use clientHtml or handoff for PDF. For single-scope preview only, use estimator_build_remodel_estimate. Prefer estimator_draft_remodel_deliverable when you have scope notes and want the tool to assemble budget/full intakes.",
|
|
55
|
+
inputSchemaZod: buildDeliverableSchema,
|
|
56
|
+
execute: async (args) => {
|
|
57
|
+
if (!client.hasApiKey())
|
|
58
|
+
return client.noApiKeyMessage();
|
|
59
|
+
const data = await client.post("/estimator/estimates/build-remodel-deliverable", args);
|
|
60
|
+
return JSON.stringify(data);
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
const draftScopeSchema = z.object({
|
|
64
|
+
key: z.string().min(1),
|
|
65
|
+
label: z.string().optional(),
|
|
66
|
+
quantity: z.number().positive().optional(),
|
|
67
|
+
unit: z.string().optional(),
|
|
68
|
+
serviceCode: z.string().optional(),
|
|
69
|
+
budgetLump: z.number().nonnegative().optional(),
|
|
70
|
+
notes: z.string().optional(),
|
|
71
|
+
});
|
|
72
|
+
const draftPricingSchema = z
|
|
73
|
+
.object({
|
|
74
|
+
contingencyPercent: z.number().optional(),
|
|
75
|
+
markupPercent: z.number().optional(),
|
|
76
|
+
profitPercent: z.number().optional(),
|
|
77
|
+
})
|
|
78
|
+
.optional();
|
|
79
|
+
const draftScopeBundleSchema = z.object({
|
|
80
|
+
label: z.string().optional(),
|
|
81
|
+
whatsIncluded: z.string().optional(),
|
|
82
|
+
projectName: z.string().optional(),
|
|
83
|
+
scopes: z.array(draftScopeSchema),
|
|
84
|
+
assumptions: z.array(z.string()).optional(),
|
|
85
|
+
exclusions: z.array(z.string()).optional(),
|
|
86
|
+
notes: z.string().optional(),
|
|
87
|
+
expandScopeComponents: z.boolean().optional(),
|
|
88
|
+
pricing: draftPricingSchema,
|
|
89
|
+
});
|
|
90
|
+
const draftBudgetBundleSchema = draftScopeBundleSchema.extend({
|
|
91
|
+
derivedFromFull: z
|
|
92
|
+
.object({
|
|
93
|
+
omitFromFullKeys: z.array(z.string()).optional(),
|
|
94
|
+
replaceWithAllowanceLump: z
|
|
95
|
+
.array(z.object({
|
|
96
|
+
key: z.string().min(1),
|
|
97
|
+
label: z.string().optional(),
|
|
98
|
+
budgetLump: z.number().nonnegative(),
|
|
99
|
+
notes: z.string().optional(),
|
|
100
|
+
}))
|
|
101
|
+
.optional(),
|
|
102
|
+
additionalScopes: z.array(draftScopeSchema).optional(),
|
|
103
|
+
})
|
|
104
|
+
.optional(),
|
|
105
|
+
});
|
|
106
|
+
const draftDeliverableSchema = z.object({
|
|
107
|
+
client: z.object({
|
|
108
|
+
projectTitle: z.string().min(1),
|
|
109
|
+
clientName: z.string().optional(),
|
|
110
|
+
preparedBy: z.string().optional(),
|
|
111
|
+
location: z.string().optional(),
|
|
112
|
+
documentType: z.string().optional(),
|
|
113
|
+
validityNote: z.string().optional(),
|
|
114
|
+
}),
|
|
115
|
+
fullScope: draftScopeBundleSchema,
|
|
116
|
+
budgetScope: draftBudgetBundleSchema.optional(),
|
|
117
|
+
alternates: z
|
|
118
|
+
.array(z.object({
|
|
119
|
+
key: z.string(),
|
|
120
|
+
label: z.string(),
|
|
121
|
+
description: z.string(),
|
|
122
|
+
budgetPlaceholder: z.number().nullable(),
|
|
123
|
+
}))
|
|
124
|
+
.optional(),
|
|
125
|
+
correctionNote: z.string().optional(),
|
|
126
|
+
scopeBasis: z.array(z.string()).optional(),
|
|
127
|
+
});
|
|
128
|
+
export const draftRemodelDeliverable = {
|
|
129
|
+
name: "estimator_draft_remodel_deliverable",
|
|
130
|
+
description: "Draft a sendable residential remodel deliverable from scope notes in a single call, following the Matthew v3 client-output section contract when scopeBasis/next steps are provided. Provide one fullScope.scopes list (each scope is a key like 'kitchen', 'bath_primary', 'drywall', or a custom slug, plus optional budgetLump/notes — the built-in catalog supplies label/unit/default rate). Budget package can be (a) explicit via budgetScope.scopes, (b) derived from full via budgetScope.derivedFromFull.omitFromFullKeys and/or replaceWithAllowanceLump, or (c) omitted to mirror full as collapsed allowances. Returns RemodelDeliverablePackage with clientMarkdown, clientHtml, handoff metadata, and reviewMarkdown (agent-facing, includes MCP guidance). Does not persist. Use for fresh remodel intakes instead of estimator_build_remodel_deliverable when you have not yet authored both intakes by hand.",
|
|
131
|
+
inputSchemaZod: draftDeliverableSchema,
|
|
132
|
+
execute: async (args) => {
|
|
133
|
+
if (!client.hasApiKey())
|
|
134
|
+
return client.noApiKeyMessage();
|
|
135
|
+
const data = await client.post("/estimator/estimates/draft-remodel-deliverable", args);
|
|
136
|
+
return JSON.stringify(data);
|
|
137
|
+
},
|
|
138
|
+
};
|
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
declare const buildRemodelSchema: z.ZodObject<{
|
|
3
|
+
intake: z.ZodObject<{
|
|
4
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
5
|
+
scopes: z.ZodArray<z.ZodObject<{
|
|
6
|
+
key: z.ZodString;
|
|
7
|
+
label: z.ZodOptional<z.ZodString>;
|
|
8
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
10
|
+
serviceCode: z.ZodOptional<z.ZodString>;
|
|
11
|
+
budgetLump: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
key: string;
|
|
15
|
+
serviceCode?: string | undefined;
|
|
16
|
+
unit?: string | undefined;
|
|
17
|
+
notes?: string | undefined;
|
|
18
|
+
quantity?: number | undefined;
|
|
19
|
+
label?: string | undefined;
|
|
20
|
+
budgetLump?: number | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
key: string;
|
|
23
|
+
serviceCode?: string | undefined;
|
|
24
|
+
unit?: string | undefined;
|
|
25
|
+
notes?: string | undefined;
|
|
26
|
+
quantity?: number | undefined;
|
|
27
|
+
label?: string | undefined;
|
|
28
|
+
budgetLump?: number | undefined;
|
|
29
|
+
}>, "many">;
|
|
30
|
+
alternates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
|
+
key: z.ZodString;
|
|
32
|
+
label: z.ZodString;
|
|
33
|
+
scopeKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
34
|
+
lumpAdd: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
label: string;
|
|
38
|
+
key: string;
|
|
39
|
+
notes?: string | undefined;
|
|
40
|
+
scopeKeys?: string[] | undefined;
|
|
41
|
+
lumpAdd?: number | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
label: string;
|
|
44
|
+
key: string;
|
|
45
|
+
notes?: string | undefined;
|
|
46
|
+
scopeKeys?: string[] | undefined;
|
|
47
|
+
lumpAdd?: number | undefined;
|
|
48
|
+
}>, "many">>;
|
|
49
|
+
includeStandardAlternates: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
expandScopeComponents: z.ZodOptional<z.ZodBoolean>;
|
|
51
|
+
exclusions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
52
|
+
assumptions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
53
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
scopes: {
|
|
56
|
+
key: string;
|
|
57
|
+
serviceCode?: string | undefined;
|
|
58
|
+
unit?: string | undefined;
|
|
59
|
+
notes?: string | undefined;
|
|
60
|
+
quantity?: number | undefined;
|
|
61
|
+
label?: string | undefined;
|
|
62
|
+
budgetLump?: number | undefined;
|
|
63
|
+
}[];
|
|
64
|
+
notes?: string | undefined;
|
|
65
|
+
projectName?: string | undefined;
|
|
66
|
+
alternates?: {
|
|
67
|
+
label: string;
|
|
68
|
+
key: string;
|
|
69
|
+
notes?: string | undefined;
|
|
70
|
+
scopeKeys?: string[] | undefined;
|
|
71
|
+
lumpAdd?: number | undefined;
|
|
72
|
+
}[] | undefined;
|
|
73
|
+
exclusions?: string[] | undefined;
|
|
74
|
+
includeStandardAlternates?: boolean | undefined;
|
|
75
|
+
expandScopeComponents?: boolean | undefined;
|
|
76
|
+
assumptions?: string[] | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
scopes: {
|
|
79
|
+
key: string;
|
|
80
|
+
serviceCode?: string | undefined;
|
|
81
|
+
unit?: string | undefined;
|
|
82
|
+
notes?: string | undefined;
|
|
83
|
+
quantity?: number | undefined;
|
|
84
|
+
label?: string | undefined;
|
|
85
|
+
budgetLump?: number | undefined;
|
|
86
|
+
}[];
|
|
87
|
+
notes?: string | undefined;
|
|
88
|
+
projectName?: string | undefined;
|
|
89
|
+
alternates?: {
|
|
90
|
+
label: string;
|
|
91
|
+
key: string;
|
|
92
|
+
notes?: string | undefined;
|
|
93
|
+
scopeKeys?: string[] | undefined;
|
|
94
|
+
lumpAdd?: number | undefined;
|
|
95
|
+
}[] | undefined;
|
|
96
|
+
exclusions?: string[] | undefined;
|
|
97
|
+
includeStandardAlternates?: boolean | undefined;
|
|
98
|
+
expandScopeComponents?: boolean | undefined;
|
|
99
|
+
assumptions?: string[] | undefined;
|
|
100
|
+
}>;
|
|
101
|
+
takeoffRows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
+
id: z.ZodOptional<z.ZodString>;
|
|
103
|
+
description: z.ZodString;
|
|
104
|
+
quantity: z.ZodNumber;
|
|
105
|
+
unit: z.ZodString;
|
|
106
|
+
serviceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
107
|
+
materialType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
unit: string;
|
|
110
|
+
quantity: number;
|
|
111
|
+
description: string;
|
|
112
|
+
serviceCode?: string | null | undefined;
|
|
113
|
+
materialType?: string | null | undefined;
|
|
114
|
+
id?: string | undefined;
|
|
115
|
+
}, {
|
|
116
|
+
unit: string;
|
|
117
|
+
quantity: number;
|
|
118
|
+
description: string;
|
|
119
|
+
serviceCode?: string | null | undefined;
|
|
120
|
+
materialType?: string | null | undefined;
|
|
121
|
+
id?: string | undefined;
|
|
122
|
+
}>, "many">>;
|
|
123
|
+
overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
124
|
+
scopeKey: z.ZodOptional<z.ZodString>;
|
|
125
|
+
serviceCode: z.ZodOptional<z.ZodString>;
|
|
126
|
+
description: z.ZodOptional<z.ZodString>;
|
|
127
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
unitMaterial: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
unitLabor: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
lumpTotal: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
132
|
+
}, "strip", z.ZodTypeAny, {
|
|
133
|
+
serviceCode?: string | undefined;
|
|
134
|
+
notes?: string | undefined;
|
|
135
|
+
quantity?: number | undefined;
|
|
136
|
+
description?: string | undefined;
|
|
137
|
+
scopeKey?: string | undefined;
|
|
138
|
+
unitMaterial?: number | undefined;
|
|
139
|
+
unitLabor?: number | undefined;
|
|
140
|
+
lumpTotal?: number | undefined;
|
|
141
|
+
}, {
|
|
142
|
+
serviceCode?: string | undefined;
|
|
143
|
+
notes?: string | undefined;
|
|
144
|
+
quantity?: number | undefined;
|
|
145
|
+
description?: string | undefined;
|
|
146
|
+
scopeKey?: string | undefined;
|
|
147
|
+
unitMaterial?: number | undefined;
|
|
148
|
+
unitLabor?: number | undefined;
|
|
149
|
+
lumpTotal?: number | undefined;
|
|
150
|
+
}>, "many">>;
|
|
151
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
152
|
+
contingencyPercent: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
markupPercent: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
profitPercent: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
contingencyPercent?: number | undefined;
|
|
157
|
+
markupPercent?: number | undefined;
|
|
158
|
+
profitPercent?: number | undefined;
|
|
159
|
+
}, {
|
|
160
|
+
contingencyPercent?: number | undefined;
|
|
161
|
+
markupPercent?: number | undefined;
|
|
162
|
+
profitPercent?: number | undefined;
|
|
163
|
+
}>>;
|
|
164
|
+
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
intake: {
|
|
166
|
+
scopes: {
|
|
167
|
+
key: string;
|
|
168
|
+
serviceCode?: string | undefined;
|
|
169
|
+
unit?: string | undefined;
|
|
170
|
+
notes?: string | undefined;
|
|
171
|
+
quantity?: number | undefined;
|
|
172
|
+
label?: string | undefined;
|
|
173
|
+
budgetLump?: number | undefined;
|
|
174
|
+
}[];
|
|
175
|
+
notes?: string | undefined;
|
|
176
|
+
projectName?: string | undefined;
|
|
177
|
+
alternates?: {
|
|
178
|
+
label: string;
|
|
179
|
+
key: string;
|
|
180
|
+
notes?: string | undefined;
|
|
181
|
+
scopeKeys?: string[] | undefined;
|
|
182
|
+
lumpAdd?: number | undefined;
|
|
183
|
+
}[] | undefined;
|
|
184
|
+
exclusions?: string[] | undefined;
|
|
185
|
+
includeStandardAlternates?: boolean | undefined;
|
|
186
|
+
expandScopeComponents?: boolean | undefined;
|
|
187
|
+
assumptions?: string[] | undefined;
|
|
188
|
+
};
|
|
189
|
+
takeoffRows?: {
|
|
190
|
+
unit: string;
|
|
191
|
+
quantity: number;
|
|
192
|
+
description: string;
|
|
193
|
+
serviceCode?: string | null | undefined;
|
|
194
|
+
materialType?: string | null | undefined;
|
|
195
|
+
id?: string | undefined;
|
|
196
|
+
}[] | undefined;
|
|
197
|
+
overrides?: {
|
|
198
|
+
serviceCode?: string | undefined;
|
|
199
|
+
notes?: string | undefined;
|
|
200
|
+
quantity?: number | undefined;
|
|
201
|
+
description?: string | undefined;
|
|
202
|
+
scopeKey?: string | undefined;
|
|
203
|
+
unitMaterial?: number | undefined;
|
|
204
|
+
unitLabor?: number | undefined;
|
|
205
|
+
lumpTotal?: number | undefined;
|
|
206
|
+
}[] | undefined;
|
|
207
|
+
pricing?: {
|
|
208
|
+
contingencyPercent?: number | undefined;
|
|
209
|
+
markupPercent?: number | undefined;
|
|
210
|
+
profitPercent?: number | undefined;
|
|
211
|
+
} | undefined;
|
|
212
|
+
}, {
|
|
213
|
+
intake: {
|
|
214
|
+
scopes: {
|
|
215
|
+
key: string;
|
|
216
|
+
serviceCode?: string | undefined;
|
|
217
|
+
unit?: string | undefined;
|
|
218
|
+
notes?: string | undefined;
|
|
219
|
+
quantity?: number | undefined;
|
|
220
|
+
label?: string | undefined;
|
|
221
|
+
budgetLump?: number | undefined;
|
|
222
|
+
}[];
|
|
223
|
+
notes?: string | undefined;
|
|
224
|
+
projectName?: string | undefined;
|
|
225
|
+
alternates?: {
|
|
226
|
+
label: string;
|
|
227
|
+
key: string;
|
|
228
|
+
notes?: string | undefined;
|
|
229
|
+
scopeKeys?: string[] | undefined;
|
|
230
|
+
lumpAdd?: number | undefined;
|
|
231
|
+
}[] | undefined;
|
|
232
|
+
exclusions?: string[] | undefined;
|
|
233
|
+
includeStandardAlternates?: boolean | undefined;
|
|
234
|
+
expandScopeComponents?: boolean | undefined;
|
|
235
|
+
assumptions?: string[] | undefined;
|
|
236
|
+
};
|
|
237
|
+
takeoffRows?: {
|
|
238
|
+
unit: string;
|
|
239
|
+
quantity: number;
|
|
240
|
+
description: string;
|
|
241
|
+
serviceCode?: string | null | undefined;
|
|
242
|
+
materialType?: string | null | undefined;
|
|
243
|
+
id?: string | undefined;
|
|
244
|
+
}[] | undefined;
|
|
245
|
+
overrides?: {
|
|
246
|
+
serviceCode?: string | undefined;
|
|
247
|
+
notes?: string | undefined;
|
|
248
|
+
quantity?: number | undefined;
|
|
249
|
+
description?: string | undefined;
|
|
250
|
+
scopeKey?: string | undefined;
|
|
251
|
+
unitMaterial?: number | undefined;
|
|
252
|
+
unitLabor?: number | undefined;
|
|
253
|
+
lumpTotal?: number | undefined;
|
|
254
|
+
}[] | undefined;
|
|
255
|
+
pricing?: {
|
|
256
|
+
contingencyPercent?: number | undefined;
|
|
257
|
+
markupPercent?: number | undefined;
|
|
258
|
+
profitPercent?: number | undefined;
|
|
259
|
+
} | undefined;
|
|
260
|
+
}>;
|
|
261
|
+
export declare const buildRemodelEstimate: {
|
|
262
|
+
name: string;
|
|
263
|
+
description: string;
|
|
264
|
+
inputSchemaZod: z.ZodObject<{
|
|
265
|
+
intake: z.ZodObject<{
|
|
266
|
+
projectName: z.ZodOptional<z.ZodString>;
|
|
267
|
+
scopes: z.ZodArray<z.ZodObject<{
|
|
268
|
+
key: z.ZodString;
|
|
269
|
+
label: z.ZodOptional<z.ZodString>;
|
|
270
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
271
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
272
|
+
serviceCode: z.ZodOptional<z.ZodString>;
|
|
273
|
+
budgetLump: z.ZodOptional<z.ZodNumber>;
|
|
274
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
275
|
+
}, "strip", z.ZodTypeAny, {
|
|
276
|
+
key: string;
|
|
277
|
+
serviceCode?: string | undefined;
|
|
278
|
+
unit?: string | undefined;
|
|
279
|
+
notes?: string | undefined;
|
|
280
|
+
quantity?: number | undefined;
|
|
281
|
+
label?: string | undefined;
|
|
282
|
+
budgetLump?: number | undefined;
|
|
283
|
+
}, {
|
|
284
|
+
key: string;
|
|
285
|
+
serviceCode?: string | undefined;
|
|
286
|
+
unit?: string | undefined;
|
|
287
|
+
notes?: string | undefined;
|
|
288
|
+
quantity?: number | undefined;
|
|
289
|
+
label?: string | undefined;
|
|
290
|
+
budgetLump?: number | undefined;
|
|
291
|
+
}>, "many">;
|
|
292
|
+
alternates: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
293
|
+
key: z.ZodString;
|
|
294
|
+
label: z.ZodString;
|
|
295
|
+
scopeKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
296
|
+
lumpAdd: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
298
|
+
}, "strip", z.ZodTypeAny, {
|
|
299
|
+
label: string;
|
|
300
|
+
key: string;
|
|
301
|
+
notes?: string | undefined;
|
|
302
|
+
scopeKeys?: string[] | undefined;
|
|
303
|
+
lumpAdd?: number | undefined;
|
|
304
|
+
}, {
|
|
305
|
+
label: string;
|
|
306
|
+
key: string;
|
|
307
|
+
notes?: string | undefined;
|
|
308
|
+
scopeKeys?: string[] | undefined;
|
|
309
|
+
lumpAdd?: number | undefined;
|
|
310
|
+
}>, "many">>;
|
|
311
|
+
includeStandardAlternates: z.ZodOptional<z.ZodBoolean>;
|
|
312
|
+
expandScopeComponents: z.ZodOptional<z.ZodBoolean>;
|
|
313
|
+
exclusions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
314
|
+
assumptions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
315
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
316
|
+
}, "strip", z.ZodTypeAny, {
|
|
317
|
+
scopes: {
|
|
318
|
+
key: string;
|
|
319
|
+
serviceCode?: string | undefined;
|
|
320
|
+
unit?: string | undefined;
|
|
321
|
+
notes?: string | undefined;
|
|
322
|
+
quantity?: number | undefined;
|
|
323
|
+
label?: string | undefined;
|
|
324
|
+
budgetLump?: number | undefined;
|
|
325
|
+
}[];
|
|
326
|
+
notes?: string | undefined;
|
|
327
|
+
projectName?: string | undefined;
|
|
328
|
+
alternates?: {
|
|
329
|
+
label: string;
|
|
330
|
+
key: string;
|
|
331
|
+
notes?: string | undefined;
|
|
332
|
+
scopeKeys?: string[] | undefined;
|
|
333
|
+
lumpAdd?: number | undefined;
|
|
334
|
+
}[] | undefined;
|
|
335
|
+
exclusions?: string[] | undefined;
|
|
336
|
+
includeStandardAlternates?: boolean | undefined;
|
|
337
|
+
expandScopeComponents?: boolean | undefined;
|
|
338
|
+
assumptions?: string[] | undefined;
|
|
339
|
+
}, {
|
|
340
|
+
scopes: {
|
|
341
|
+
key: string;
|
|
342
|
+
serviceCode?: string | undefined;
|
|
343
|
+
unit?: string | undefined;
|
|
344
|
+
notes?: string | undefined;
|
|
345
|
+
quantity?: number | undefined;
|
|
346
|
+
label?: string | undefined;
|
|
347
|
+
budgetLump?: number | undefined;
|
|
348
|
+
}[];
|
|
349
|
+
notes?: string | undefined;
|
|
350
|
+
projectName?: string | undefined;
|
|
351
|
+
alternates?: {
|
|
352
|
+
label: string;
|
|
353
|
+
key: string;
|
|
354
|
+
notes?: string | undefined;
|
|
355
|
+
scopeKeys?: string[] | undefined;
|
|
356
|
+
lumpAdd?: number | undefined;
|
|
357
|
+
}[] | undefined;
|
|
358
|
+
exclusions?: string[] | undefined;
|
|
359
|
+
includeStandardAlternates?: boolean | undefined;
|
|
360
|
+
expandScopeComponents?: boolean | undefined;
|
|
361
|
+
assumptions?: string[] | undefined;
|
|
362
|
+
}>;
|
|
363
|
+
takeoffRows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
364
|
+
id: z.ZodOptional<z.ZodString>;
|
|
365
|
+
description: z.ZodString;
|
|
366
|
+
quantity: z.ZodNumber;
|
|
367
|
+
unit: z.ZodString;
|
|
368
|
+
serviceCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
369
|
+
materialType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
370
|
+
}, "strip", z.ZodTypeAny, {
|
|
371
|
+
unit: string;
|
|
372
|
+
quantity: number;
|
|
373
|
+
description: string;
|
|
374
|
+
serviceCode?: string | null | undefined;
|
|
375
|
+
materialType?: string | null | undefined;
|
|
376
|
+
id?: string | undefined;
|
|
377
|
+
}, {
|
|
378
|
+
unit: string;
|
|
379
|
+
quantity: number;
|
|
380
|
+
description: string;
|
|
381
|
+
serviceCode?: string | null | undefined;
|
|
382
|
+
materialType?: string | null | undefined;
|
|
383
|
+
id?: string | undefined;
|
|
384
|
+
}>, "many">>;
|
|
385
|
+
overrides: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
386
|
+
scopeKey: z.ZodOptional<z.ZodString>;
|
|
387
|
+
serviceCode: z.ZodOptional<z.ZodString>;
|
|
388
|
+
description: z.ZodOptional<z.ZodString>;
|
|
389
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
390
|
+
unitMaterial: z.ZodOptional<z.ZodNumber>;
|
|
391
|
+
unitLabor: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
lumpTotal: z.ZodOptional<z.ZodNumber>;
|
|
393
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
394
|
+
}, "strip", z.ZodTypeAny, {
|
|
395
|
+
serviceCode?: string | undefined;
|
|
396
|
+
notes?: string | undefined;
|
|
397
|
+
quantity?: number | undefined;
|
|
398
|
+
description?: string | undefined;
|
|
399
|
+
scopeKey?: string | undefined;
|
|
400
|
+
unitMaterial?: number | undefined;
|
|
401
|
+
unitLabor?: number | undefined;
|
|
402
|
+
lumpTotal?: number | undefined;
|
|
403
|
+
}, {
|
|
404
|
+
serviceCode?: string | undefined;
|
|
405
|
+
notes?: string | undefined;
|
|
406
|
+
quantity?: number | undefined;
|
|
407
|
+
description?: string | undefined;
|
|
408
|
+
scopeKey?: string | undefined;
|
|
409
|
+
unitMaterial?: number | undefined;
|
|
410
|
+
unitLabor?: number | undefined;
|
|
411
|
+
lumpTotal?: number | undefined;
|
|
412
|
+
}>, "many">>;
|
|
413
|
+
pricing: z.ZodOptional<z.ZodObject<{
|
|
414
|
+
contingencyPercent: z.ZodOptional<z.ZodNumber>;
|
|
415
|
+
markupPercent: z.ZodOptional<z.ZodNumber>;
|
|
416
|
+
profitPercent: z.ZodOptional<z.ZodNumber>;
|
|
417
|
+
}, "strip", z.ZodTypeAny, {
|
|
418
|
+
contingencyPercent?: number | undefined;
|
|
419
|
+
markupPercent?: number | undefined;
|
|
420
|
+
profitPercent?: number | undefined;
|
|
421
|
+
}, {
|
|
422
|
+
contingencyPercent?: number | undefined;
|
|
423
|
+
markupPercent?: number | undefined;
|
|
424
|
+
profitPercent?: number | undefined;
|
|
425
|
+
}>>;
|
|
426
|
+
}, "strip", z.ZodTypeAny, {
|
|
427
|
+
intake: {
|
|
428
|
+
scopes: {
|
|
429
|
+
key: string;
|
|
430
|
+
serviceCode?: string | undefined;
|
|
431
|
+
unit?: string | undefined;
|
|
432
|
+
notes?: string | undefined;
|
|
433
|
+
quantity?: number | undefined;
|
|
434
|
+
label?: string | undefined;
|
|
435
|
+
budgetLump?: number | undefined;
|
|
436
|
+
}[];
|
|
437
|
+
notes?: string | undefined;
|
|
438
|
+
projectName?: string | undefined;
|
|
439
|
+
alternates?: {
|
|
440
|
+
label: string;
|
|
441
|
+
key: string;
|
|
442
|
+
notes?: string | undefined;
|
|
443
|
+
scopeKeys?: string[] | undefined;
|
|
444
|
+
lumpAdd?: number | undefined;
|
|
445
|
+
}[] | undefined;
|
|
446
|
+
exclusions?: string[] | undefined;
|
|
447
|
+
includeStandardAlternates?: boolean | undefined;
|
|
448
|
+
expandScopeComponents?: boolean | undefined;
|
|
449
|
+
assumptions?: string[] | undefined;
|
|
450
|
+
};
|
|
451
|
+
takeoffRows?: {
|
|
452
|
+
unit: string;
|
|
453
|
+
quantity: number;
|
|
454
|
+
description: string;
|
|
455
|
+
serviceCode?: string | null | undefined;
|
|
456
|
+
materialType?: string | null | undefined;
|
|
457
|
+
id?: string | undefined;
|
|
458
|
+
}[] | undefined;
|
|
459
|
+
overrides?: {
|
|
460
|
+
serviceCode?: string | undefined;
|
|
461
|
+
notes?: string | undefined;
|
|
462
|
+
quantity?: number | undefined;
|
|
463
|
+
description?: string | undefined;
|
|
464
|
+
scopeKey?: string | undefined;
|
|
465
|
+
unitMaterial?: number | undefined;
|
|
466
|
+
unitLabor?: number | undefined;
|
|
467
|
+
lumpTotal?: number | undefined;
|
|
468
|
+
}[] | undefined;
|
|
469
|
+
pricing?: {
|
|
470
|
+
contingencyPercent?: number | undefined;
|
|
471
|
+
markupPercent?: number | undefined;
|
|
472
|
+
profitPercent?: number | undefined;
|
|
473
|
+
} | undefined;
|
|
474
|
+
}, {
|
|
475
|
+
intake: {
|
|
476
|
+
scopes: {
|
|
477
|
+
key: string;
|
|
478
|
+
serviceCode?: string | undefined;
|
|
479
|
+
unit?: string | undefined;
|
|
480
|
+
notes?: string | undefined;
|
|
481
|
+
quantity?: number | undefined;
|
|
482
|
+
label?: string | undefined;
|
|
483
|
+
budgetLump?: number | undefined;
|
|
484
|
+
}[];
|
|
485
|
+
notes?: string | undefined;
|
|
486
|
+
projectName?: string | undefined;
|
|
487
|
+
alternates?: {
|
|
488
|
+
label: string;
|
|
489
|
+
key: string;
|
|
490
|
+
notes?: string | undefined;
|
|
491
|
+
scopeKeys?: string[] | undefined;
|
|
492
|
+
lumpAdd?: number | undefined;
|
|
493
|
+
}[] | undefined;
|
|
494
|
+
exclusions?: string[] | undefined;
|
|
495
|
+
includeStandardAlternates?: boolean | undefined;
|
|
496
|
+
expandScopeComponents?: boolean | undefined;
|
|
497
|
+
assumptions?: string[] | undefined;
|
|
498
|
+
};
|
|
499
|
+
takeoffRows?: {
|
|
500
|
+
unit: string;
|
|
501
|
+
quantity: number;
|
|
502
|
+
description: string;
|
|
503
|
+
serviceCode?: string | null | undefined;
|
|
504
|
+
materialType?: string | null | undefined;
|
|
505
|
+
id?: string | undefined;
|
|
506
|
+
}[] | undefined;
|
|
507
|
+
overrides?: {
|
|
508
|
+
serviceCode?: string | undefined;
|
|
509
|
+
notes?: string | undefined;
|
|
510
|
+
quantity?: number | undefined;
|
|
511
|
+
description?: string | undefined;
|
|
512
|
+
scopeKey?: string | undefined;
|
|
513
|
+
unitMaterial?: number | undefined;
|
|
514
|
+
unitLabor?: number | undefined;
|
|
515
|
+
lumpTotal?: number | undefined;
|
|
516
|
+
}[] | undefined;
|
|
517
|
+
pricing?: {
|
|
518
|
+
contingencyPercent?: number | undefined;
|
|
519
|
+
markupPercent?: number | undefined;
|
|
520
|
+
profitPercent?: number | undefined;
|
|
521
|
+
} | undefined;
|
|
522
|
+
}>;
|
|
523
|
+
execute: (args: z.infer<typeof buildRemodelSchema>) => Promise<string>;
|
|
524
|
+
};
|
|
525
|
+
export {};
|