@empressaio/atom-contract 1.12.0 → 1.14.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.
- package/CHANGELOG.md +80 -0
- package/README.md +7 -1
- package/dist/conformance/common.d.ts +1 -1
- package/dist/conformance/common.js +1 -1
- package/dist/property/cad-parcel-roll.d.ts +710 -0
- package/dist/property/cad-parcel-roll.d.ts.map +1 -0
- package/dist/property/cad-parcel-roll.js +147 -0
- package/dist/property/cad-parcel-roll.js.map +1 -0
- package/dist/property/common.d.ts +131 -0
- package/dist/property/common.d.ts.map +1 -1
- package/dist/property/common.js +92 -0
- package/dist/property/common.js.map +1 -1
- package/dist/property/fixtures.d.ts +324 -0
- package/dist/property/fixtures.d.ts.map +1 -1
- package/dist/property/fixtures.js +621 -0
- package/dist/property/fixtures.js.map +1 -1
- package/dist/property/flood-hazard-fact.d.ts +610 -0
- package/dist/property/flood-hazard-fact.d.ts.map +1 -0
- package/dist/property/flood-hazard-fact.js +102 -0
- package/dist/property/flood-hazard-fact.js.map +1 -0
- package/dist/property/index.d.ts +4 -0
- package/dist/property/index.d.ts.map +1 -1
- package/dist/property/index.js +4 -0
- package/dist/property/index.js.map +1 -1
- package/dist/property/land-use-fact.d.ts +602 -0
- package/dist/property/land-use-fact.d.ts.map +1 -0
- package/dist/property/land-use-fact.js +87 -0
- package/dist/property/land-use-fact.js.map +1 -0
- package/dist/property/parcel-node.d.ts +710 -0
- package/dist/property/parcel-node.d.ts.map +1 -0
- package/dist/property/parcel-node.js +156 -0
- package/dist/property/parcel-node.js.map +1 -0
- package/dist/property/road-node.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { AccessPolicy } from "../registration.js";
|
|
3
|
+
import type { AtomTier } from "../conformance/common.js";
|
|
4
|
+
import type { ReasoningChain } from "../reasoning-chain.js";
|
|
5
|
+
import type { ReasoningReadContract } from "../read-contract/reasoning-axes.js";
|
|
6
|
+
import { type CadRollSourceTier, type LandUseAbsence, type SiteLayerVerifiedAbsence } from "./common.js";
|
|
7
|
+
/**
|
|
8
|
+
* Land use FACT atom — CAD `property_use_code` or honest absence.
|
|
9
|
+
*
|
|
10
|
+
* Cotality `land_use_code` is dead; writers read `cad_property.property_use_code`
|
|
11
|
+
* only. Never add a cotality sourceTier — Cotality is extinguished.
|
|
12
|
+
*/
|
|
13
|
+
export interface LandUseFactAtomInstance {
|
|
14
|
+
entityType: "land-use-fact";
|
|
15
|
+
atomDid: string;
|
|
16
|
+
parcelNodeId: string;
|
|
17
|
+
taxYear: number;
|
|
18
|
+
reasoningChain: Extract<ReasoningChain, {
|
|
19
|
+
reasoningKind: "observed";
|
|
20
|
+
}>;
|
|
21
|
+
sourceTier: CadRollSourceTier;
|
|
22
|
+
landUseCode?: string;
|
|
23
|
+
landUseLabel?: string;
|
|
24
|
+
absence?: LandUseAbsence;
|
|
25
|
+
verifiedAbsence?: SiteLayerVerifiedAbsence;
|
|
26
|
+
accessPolicy: AccessPolicy;
|
|
27
|
+
sourceCitation: string;
|
|
28
|
+
extractedAt: string;
|
|
29
|
+
asOf?: string;
|
|
30
|
+
sourceVintage?: string;
|
|
31
|
+
verificationStatus: "machine" | "human" | "unsurveyed";
|
|
32
|
+
sourceAdapter: string;
|
|
33
|
+
evaluatedAt: string;
|
|
34
|
+
atomTier: AtomTier;
|
|
35
|
+
readContract?: ReasoningReadContract;
|
|
36
|
+
}
|
|
37
|
+
export declare const LAND_USE_FACT_SCHEMA: z.ZodEffects<z.ZodObject<{
|
|
38
|
+
atomTier: z.ZodLiteral<AtomTier>;
|
|
39
|
+
readContract: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
40
|
+
axes: z.ZodReadonly<z.ZodObject<{
|
|
41
|
+
calibratedConfidence: z.ZodReadonly<z.ZodObject<{
|
|
42
|
+
readonly estimate: z.ZodNumber;
|
|
43
|
+
readonly n: z.ZodNumber;
|
|
44
|
+
readonly intervalWidth: z.ZodNumber;
|
|
45
|
+
readonly provenance: z.ZodEnum<["asserted", "backtest", "seed", "live"]>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
estimate: number;
|
|
48
|
+
n: number;
|
|
49
|
+
intervalWidth: number;
|
|
50
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
51
|
+
}, {
|
|
52
|
+
estimate: number;
|
|
53
|
+
n: number;
|
|
54
|
+
intervalWidth: number;
|
|
55
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
56
|
+
}>>;
|
|
57
|
+
assertedConfidence: z.ZodReadonly<z.ZodObject<{
|
|
58
|
+
readonly estimate: z.ZodNumber;
|
|
59
|
+
readonly n: z.ZodNumber;
|
|
60
|
+
readonly intervalWidth: z.ZodNumber;
|
|
61
|
+
readonly provenance: z.ZodEnum<["asserted", "backtest", "seed", "live"]>;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
estimate: number;
|
|
64
|
+
n: number;
|
|
65
|
+
intervalWidth: number;
|
|
66
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
67
|
+
}, {
|
|
68
|
+
estimate: number;
|
|
69
|
+
n: number;
|
|
70
|
+
intervalWidth: number;
|
|
71
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
72
|
+
}>>;
|
|
73
|
+
consequence: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
74
|
+
kind: z.ZodLiteral<"property-risk">;
|
|
75
|
+
stratum: z.ZodEnum<[import("../read-contract/reasoning-axes.js").PropertyRiskStratum, ...import("../read-contract/reasoning-axes.js").PropertyRiskStratum[]]>;
|
|
76
|
+
basis: z.ZodString;
|
|
77
|
+
assertedAt: z.ZodString;
|
|
78
|
+
auditRef: z.ZodOptional<z.ZodString>;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
81
|
+
assertedAt: string;
|
|
82
|
+
kind: "property-risk";
|
|
83
|
+
basis: string;
|
|
84
|
+
auditRef?: string | undefined;
|
|
85
|
+
}, {
|
|
86
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
87
|
+
assertedAt: string;
|
|
88
|
+
kind: "property-risk";
|
|
89
|
+
basis: string;
|
|
90
|
+
auditRef?: string | undefined;
|
|
91
|
+
}>, z.ZodObject<{
|
|
92
|
+
kind: z.ZodLiteral<"not-applicable">;
|
|
93
|
+
reason: z.ZodString;
|
|
94
|
+
assertedAt: z.ZodString;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
assertedAt: string;
|
|
97
|
+
kind: "not-applicable";
|
|
98
|
+
reason: string;
|
|
99
|
+
}, {
|
|
100
|
+
assertedAt: string;
|
|
101
|
+
kind: "not-applicable";
|
|
102
|
+
reason: string;
|
|
103
|
+
}>]>;
|
|
104
|
+
}, "strip", z.ZodTypeAny, {
|
|
105
|
+
calibratedConfidence: Readonly<{
|
|
106
|
+
estimate: number;
|
|
107
|
+
n: number;
|
|
108
|
+
intervalWidth: number;
|
|
109
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
110
|
+
}>;
|
|
111
|
+
assertedConfidence: Readonly<{
|
|
112
|
+
estimate: number;
|
|
113
|
+
n: number;
|
|
114
|
+
intervalWidth: number;
|
|
115
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
116
|
+
}>;
|
|
117
|
+
consequence: {
|
|
118
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
119
|
+
assertedAt: string;
|
|
120
|
+
kind: "property-risk";
|
|
121
|
+
basis: string;
|
|
122
|
+
auditRef?: string | undefined;
|
|
123
|
+
} | {
|
|
124
|
+
assertedAt: string;
|
|
125
|
+
kind: "not-applicable";
|
|
126
|
+
reason: string;
|
|
127
|
+
};
|
|
128
|
+
}, {
|
|
129
|
+
calibratedConfidence: Readonly<{
|
|
130
|
+
estimate: number;
|
|
131
|
+
n: number;
|
|
132
|
+
intervalWidth: number;
|
|
133
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
134
|
+
}>;
|
|
135
|
+
assertedConfidence: Readonly<{
|
|
136
|
+
estimate: number;
|
|
137
|
+
n: number;
|
|
138
|
+
intervalWidth: number;
|
|
139
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
140
|
+
}>;
|
|
141
|
+
consequence: {
|
|
142
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
143
|
+
assertedAt: string;
|
|
144
|
+
kind: "property-risk";
|
|
145
|
+
basis: string;
|
|
146
|
+
auditRef?: string | undefined;
|
|
147
|
+
} | {
|
|
148
|
+
assertedAt: string;
|
|
149
|
+
kind: "not-applicable";
|
|
150
|
+
reason: string;
|
|
151
|
+
};
|
|
152
|
+
}>>;
|
|
153
|
+
assembledAt: z.ZodString;
|
|
154
|
+
modelAttribution: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
155
|
+
modelId: z.ZodString;
|
|
156
|
+
modelVersion: z.ZodString;
|
|
157
|
+
promptTemplateVersion: z.ZodString;
|
|
158
|
+
contextTemplateVersion: z.ZodString;
|
|
159
|
+
samplingParams: z.ZodReadonly<z.ZodObject<{
|
|
160
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
165
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
170
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
}, z.ZodUnknown, "strip">>>;
|
|
175
|
+
retrievedAtomSetId: z.ZodString;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
modelId: string;
|
|
178
|
+
modelVersion: string;
|
|
179
|
+
promptTemplateVersion: string;
|
|
180
|
+
contextTemplateVersion: string;
|
|
181
|
+
samplingParams: Readonly<z.objectOutputType<{
|
|
182
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
183
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
184
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
185
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
186
|
+
}, z.ZodUnknown, "strip">>;
|
|
187
|
+
retrievedAtomSetId: string;
|
|
188
|
+
}, {
|
|
189
|
+
modelId: string;
|
|
190
|
+
modelVersion: string;
|
|
191
|
+
promptTemplateVersion: string;
|
|
192
|
+
contextTemplateVersion: string;
|
|
193
|
+
samplingParams: Readonly<z.objectInputType<{
|
|
194
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
196
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
197
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
198
|
+
}, z.ZodUnknown, "strip">>;
|
|
199
|
+
retrievedAtomSetId: string;
|
|
200
|
+
}>>>;
|
|
201
|
+
}, "strip", z.ZodTypeAny, {
|
|
202
|
+
axes: Readonly<{
|
|
203
|
+
calibratedConfidence: Readonly<{
|
|
204
|
+
estimate: number;
|
|
205
|
+
n: number;
|
|
206
|
+
intervalWidth: number;
|
|
207
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
208
|
+
}>;
|
|
209
|
+
assertedConfidence: Readonly<{
|
|
210
|
+
estimate: number;
|
|
211
|
+
n: number;
|
|
212
|
+
intervalWidth: number;
|
|
213
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
214
|
+
}>;
|
|
215
|
+
consequence: {
|
|
216
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
217
|
+
assertedAt: string;
|
|
218
|
+
kind: "property-risk";
|
|
219
|
+
basis: string;
|
|
220
|
+
auditRef?: string | undefined;
|
|
221
|
+
} | {
|
|
222
|
+
assertedAt: string;
|
|
223
|
+
kind: "not-applicable";
|
|
224
|
+
reason: string;
|
|
225
|
+
};
|
|
226
|
+
}>;
|
|
227
|
+
assembledAt: string;
|
|
228
|
+
modelAttribution?: Readonly<{
|
|
229
|
+
modelId: string;
|
|
230
|
+
modelVersion: string;
|
|
231
|
+
promptTemplateVersion: string;
|
|
232
|
+
contextTemplateVersion: string;
|
|
233
|
+
samplingParams: Readonly<z.objectOutputType<{
|
|
234
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
235
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
236
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
237
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
238
|
+
}, z.ZodUnknown, "strip">>;
|
|
239
|
+
retrievedAtomSetId: string;
|
|
240
|
+
}> | undefined;
|
|
241
|
+
}, {
|
|
242
|
+
axes: Readonly<{
|
|
243
|
+
calibratedConfidence: Readonly<{
|
|
244
|
+
estimate: number;
|
|
245
|
+
n: number;
|
|
246
|
+
intervalWidth: number;
|
|
247
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
248
|
+
}>;
|
|
249
|
+
assertedConfidence: Readonly<{
|
|
250
|
+
estimate: number;
|
|
251
|
+
n: number;
|
|
252
|
+
intervalWidth: number;
|
|
253
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
254
|
+
}>;
|
|
255
|
+
consequence: {
|
|
256
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
257
|
+
assertedAt: string;
|
|
258
|
+
kind: "property-risk";
|
|
259
|
+
basis: string;
|
|
260
|
+
auditRef?: string | undefined;
|
|
261
|
+
} | {
|
|
262
|
+
assertedAt: string;
|
|
263
|
+
kind: "not-applicable";
|
|
264
|
+
reason: string;
|
|
265
|
+
};
|
|
266
|
+
}>;
|
|
267
|
+
assembledAt: string;
|
|
268
|
+
modelAttribution?: Readonly<{
|
|
269
|
+
modelId: string;
|
|
270
|
+
modelVersion: string;
|
|
271
|
+
promptTemplateVersion: string;
|
|
272
|
+
contextTemplateVersion: string;
|
|
273
|
+
samplingParams: Readonly<z.objectInputType<{
|
|
274
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
275
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
276
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
277
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
278
|
+
}, z.ZodUnknown, "strip">>;
|
|
279
|
+
retrievedAtomSetId: string;
|
|
280
|
+
}> | undefined;
|
|
281
|
+
}>>>;
|
|
282
|
+
sourceVintage: z.ZodOptional<z.ZodString>;
|
|
283
|
+
verificationStatus: z.ZodEnum<["machine", "human", "unsurveyed"]>;
|
|
284
|
+
sourceAdapter: z.ZodString;
|
|
285
|
+
evaluatedAt: z.ZodString;
|
|
286
|
+
sourceCitation: z.ZodString;
|
|
287
|
+
extractedAt: z.ZodString;
|
|
288
|
+
asOf: z.ZodOptional<z.ZodString>;
|
|
289
|
+
entityType: z.ZodLiteral<"land-use-fact">;
|
|
290
|
+
atomDid: z.ZodEffects<z.ZodString, string, string>;
|
|
291
|
+
parcelNodeId: z.ZodEffects<z.ZodString, string, string>;
|
|
292
|
+
taxYear: z.ZodNumber;
|
|
293
|
+
reasoningChain: z.ZodObject<{
|
|
294
|
+
reasoningKind: z.ZodLiteral<"observed">;
|
|
295
|
+
}, "strip", z.ZodTypeAny, {
|
|
296
|
+
reasoningKind: "observed";
|
|
297
|
+
}, {
|
|
298
|
+
reasoningKind: "observed";
|
|
299
|
+
}>;
|
|
300
|
+
sourceTier: z.ZodEnum<["cad-authoritative", "absent"]>;
|
|
301
|
+
landUseCode: z.ZodOptional<z.ZodString>;
|
|
302
|
+
landUseLabel: z.ZodOptional<z.ZodString>;
|
|
303
|
+
absence: z.ZodOptional<z.ZodObject<{
|
|
304
|
+
kind: z.ZodEnum<["no-land-use-code", "no-cad-row", "join-hold"]>;
|
|
305
|
+
reason: z.ZodString;
|
|
306
|
+
}, "strict", z.ZodTypeAny, {
|
|
307
|
+
kind: "no-cad-row" | "join-hold" | "no-land-use-code";
|
|
308
|
+
reason: string;
|
|
309
|
+
}, {
|
|
310
|
+
kind: "no-cad-row" | "join-hold" | "no-land-use-code";
|
|
311
|
+
reason: string;
|
|
312
|
+
}>>;
|
|
313
|
+
verifiedAbsence: z.ZodOptional<z.ZodObject<{
|
|
314
|
+
evaluated: z.ZodLiteral<true>;
|
|
315
|
+
provenanceScope: z.ZodArray<z.ZodString, "many">;
|
|
316
|
+
}, "strict", z.ZodTypeAny, {
|
|
317
|
+
evaluated: true;
|
|
318
|
+
provenanceScope: string[];
|
|
319
|
+
}, {
|
|
320
|
+
evaluated: true;
|
|
321
|
+
provenanceScope: string[];
|
|
322
|
+
}>>;
|
|
323
|
+
accessPolicy: z.ZodEnum<["public-free", "public-paid", "platform-internal", "tenant-private", "tenant-shared"]>;
|
|
324
|
+
}, "strip", z.ZodTypeAny, {
|
|
325
|
+
accessPolicy: "public-free" | "public-paid" | "platform-internal" | "tenant-private" | "tenant-shared";
|
|
326
|
+
entityType: "land-use-fact";
|
|
327
|
+
sourceCitation: string;
|
|
328
|
+
extractedAt: string;
|
|
329
|
+
atomDid: string;
|
|
330
|
+
evaluatedAt: string;
|
|
331
|
+
verificationStatus: "machine" | "human" | "unsurveyed";
|
|
332
|
+
sourceAdapter: string;
|
|
333
|
+
parcelNodeId: string;
|
|
334
|
+
reasoningChain: {
|
|
335
|
+
reasoningKind: "observed";
|
|
336
|
+
};
|
|
337
|
+
atomTier: AtomTier;
|
|
338
|
+
sourceTier: "cad-authoritative" | "absent";
|
|
339
|
+
taxYear: number;
|
|
340
|
+
asOf?: string | undefined;
|
|
341
|
+
readContract?: Readonly<{
|
|
342
|
+
axes: Readonly<{
|
|
343
|
+
calibratedConfidence: Readonly<{
|
|
344
|
+
estimate: number;
|
|
345
|
+
n: number;
|
|
346
|
+
intervalWidth: number;
|
|
347
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
348
|
+
}>;
|
|
349
|
+
assertedConfidence: Readonly<{
|
|
350
|
+
estimate: number;
|
|
351
|
+
n: number;
|
|
352
|
+
intervalWidth: number;
|
|
353
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
354
|
+
}>;
|
|
355
|
+
consequence: {
|
|
356
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
357
|
+
assertedAt: string;
|
|
358
|
+
kind: "property-risk";
|
|
359
|
+
basis: string;
|
|
360
|
+
auditRef?: string | undefined;
|
|
361
|
+
} | {
|
|
362
|
+
assertedAt: string;
|
|
363
|
+
kind: "not-applicable";
|
|
364
|
+
reason: string;
|
|
365
|
+
};
|
|
366
|
+
}>;
|
|
367
|
+
assembledAt: string;
|
|
368
|
+
modelAttribution?: Readonly<{
|
|
369
|
+
modelId: string;
|
|
370
|
+
modelVersion: string;
|
|
371
|
+
promptTemplateVersion: string;
|
|
372
|
+
contextTemplateVersion: string;
|
|
373
|
+
samplingParams: Readonly<z.objectOutputType<{
|
|
374
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
375
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
376
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
377
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
378
|
+
}, z.ZodUnknown, "strip">>;
|
|
379
|
+
retrievedAtomSetId: string;
|
|
380
|
+
}> | undefined;
|
|
381
|
+
}> | undefined;
|
|
382
|
+
absence?: {
|
|
383
|
+
kind: "no-cad-row" | "join-hold" | "no-land-use-code";
|
|
384
|
+
reason: string;
|
|
385
|
+
} | undefined;
|
|
386
|
+
verifiedAbsence?: {
|
|
387
|
+
evaluated: true;
|
|
388
|
+
provenanceScope: string[];
|
|
389
|
+
} | undefined;
|
|
390
|
+
sourceVintage?: string | undefined;
|
|
391
|
+
landUseCode?: string | undefined;
|
|
392
|
+
landUseLabel?: string | undefined;
|
|
393
|
+
}, {
|
|
394
|
+
accessPolicy: "public-free" | "public-paid" | "platform-internal" | "tenant-private" | "tenant-shared";
|
|
395
|
+
entityType: "land-use-fact";
|
|
396
|
+
sourceCitation: string;
|
|
397
|
+
extractedAt: string;
|
|
398
|
+
atomDid: string;
|
|
399
|
+
evaluatedAt: string;
|
|
400
|
+
verificationStatus: "machine" | "human" | "unsurveyed";
|
|
401
|
+
sourceAdapter: string;
|
|
402
|
+
parcelNodeId: string;
|
|
403
|
+
reasoningChain: {
|
|
404
|
+
reasoningKind: "observed";
|
|
405
|
+
};
|
|
406
|
+
atomTier: AtomTier;
|
|
407
|
+
sourceTier: "cad-authoritative" | "absent";
|
|
408
|
+
taxYear: number;
|
|
409
|
+
asOf?: string | undefined;
|
|
410
|
+
readContract?: Readonly<{
|
|
411
|
+
axes: Readonly<{
|
|
412
|
+
calibratedConfidence: Readonly<{
|
|
413
|
+
estimate: number;
|
|
414
|
+
n: number;
|
|
415
|
+
intervalWidth: number;
|
|
416
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
417
|
+
}>;
|
|
418
|
+
assertedConfidence: Readonly<{
|
|
419
|
+
estimate: number;
|
|
420
|
+
n: number;
|
|
421
|
+
intervalWidth: number;
|
|
422
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
423
|
+
}>;
|
|
424
|
+
consequence: {
|
|
425
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
426
|
+
assertedAt: string;
|
|
427
|
+
kind: "property-risk";
|
|
428
|
+
basis: string;
|
|
429
|
+
auditRef?: string | undefined;
|
|
430
|
+
} | {
|
|
431
|
+
assertedAt: string;
|
|
432
|
+
kind: "not-applicable";
|
|
433
|
+
reason: string;
|
|
434
|
+
};
|
|
435
|
+
}>;
|
|
436
|
+
assembledAt: string;
|
|
437
|
+
modelAttribution?: Readonly<{
|
|
438
|
+
modelId: string;
|
|
439
|
+
modelVersion: string;
|
|
440
|
+
promptTemplateVersion: string;
|
|
441
|
+
contextTemplateVersion: string;
|
|
442
|
+
samplingParams: Readonly<z.objectInputType<{
|
|
443
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
444
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
445
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
446
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
447
|
+
}, z.ZodUnknown, "strip">>;
|
|
448
|
+
retrievedAtomSetId: string;
|
|
449
|
+
}> | undefined;
|
|
450
|
+
}> | undefined;
|
|
451
|
+
absence?: {
|
|
452
|
+
kind: "no-cad-row" | "join-hold" | "no-land-use-code";
|
|
453
|
+
reason: string;
|
|
454
|
+
} | undefined;
|
|
455
|
+
verifiedAbsence?: {
|
|
456
|
+
evaluated: true;
|
|
457
|
+
provenanceScope: string[];
|
|
458
|
+
} | undefined;
|
|
459
|
+
sourceVintage?: string | undefined;
|
|
460
|
+
landUseCode?: string | undefined;
|
|
461
|
+
landUseLabel?: string | undefined;
|
|
462
|
+
}>, {
|
|
463
|
+
accessPolicy: "public-free" | "public-paid" | "platform-internal" | "tenant-private" | "tenant-shared";
|
|
464
|
+
entityType: "land-use-fact";
|
|
465
|
+
sourceCitation: string;
|
|
466
|
+
extractedAt: string;
|
|
467
|
+
atomDid: string;
|
|
468
|
+
evaluatedAt: string;
|
|
469
|
+
verificationStatus: "machine" | "human" | "unsurveyed";
|
|
470
|
+
sourceAdapter: string;
|
|
471
|
+
parcelNodeId: string;
|
|
472
|
+
reasoningChain: {
|
|
473
|
+
reasoningKind: "observed";
|
|
474
|
+
};
|
|
475
|
+
atomTier: AtomTier;
|
|
476
|
+
sourceTier: "cad-authoritative" | "absent";
|
|
477
|
+
taxYear: number;
|
|
478
|
+
asOf?: string | undefined;
|
|
479
|
+
readContract?: Readonly<{
|
|
480
|
+
axes: Readonly<{
|
|
481
|
+
calibratedConfidence: Readonly<{
|
|
482
|
+
estimate: number;
|
|
483
|
+
n: number;
|
|
484
|
+
intervalWidth: number;
|
|
485
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
486
|
+
}>;
|
|
487
|
+
assertedConfidence: Readonly<{
|
|
488
|
+
estimate: number;
|
|
489
|
+
n: number;
|
|
490
|
+
intervalWidth: number;
|
|
491
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
492
|
+
}>;
|
|
493
|
+
consequence: {
|
|
494
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
495
|
+
assertedAt: string;
|
|
496
|
+
kind: "property-risk";
|
|
497
|
+
basis: string;
|
|
498
|
+
auditRef?: string | undefined;
|
|
499
|
+
} | {
|
|
500
|
+
assertedAt: string;
|
|
501
|
+
kind: "not-applicable";
|
|
502
|
+
reason: string;
|
|
503
|
+
};
|
|
504
|
+
}>;
|
|
505
|
+
assembledAt: string;
|
|
506
|
+
modelAttribution?: Readonly<{
|
|
507
|
+
modelId: string;
|
|
508
|
+
modelVersion: string;
|
|
509
|
+
promptTemplateVersion: string;
|
|
510
|
+
contextTemplateVersion: string;
|
|
511
|
+
samplingParams: Readonly<z.objectOutputType<{
|
|
512
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
513
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
514
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
515
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
516
|
+
}, z.ZodUnknown, "strip">>;
|
|
517
|
+
retrievedAtomSetId: string;
|
|
518
|
+
}> | undefined;
|
|
519
|
+
}> | undefined;
|
|
520
|
+
absence?: {
|
|
521
|
+
kind: "no-cad-row" | "join-hold" | "no-land-use-code";
|
|
522
|
+
reason: string;
|
|
523
|
+
} | undefined;
|
|
524
|
+
verifiedAbsence?: {
|
|
525
|
+
evaluated: true;
|
|
526
|
+
provenanceScope: string[];
|
|
527
|
+
} | undefined;
|
|
528
|
+
sourceVintage?: string | undefined;
|
|
529
|
+
landUseCode?: string | undefined;
|
|
530
|
+
landUseLabel?: string | undefined;
|
|
531
|
+
}, {
|
|
532
|
+
accessPolicy: "public-free" | "public-paid" | "platform-internal" | "tenant-private" | "tenant-shared";
|
|
533
|
+
entityType: "land-use-fact";
|
|
534
|
+
sourceCitation: string;
|
|
535
|
+
extractedAt: string;
|
|
536
|
+
atomDid: string;
|
|
537
|
+
evaluatedAt: string;
|
|
538
|
+
verificationStatus: "machine" | "human" | "unsurveyed";
|
|
539
|
+
sourceAdapter: string;
|
|
540
|
+
parcelNodeId: string;
|
|
541
|
+
reasoningChain: {
|
|
542
|
+
reasoningKind: "observed";
|
|
543
|
+
};
|
|
544
|
+
atomTier: AtomTier;
|
|
545
|
+
sourceTier: "cad-authoritative" | "absent";
|
|
546
|
+
taxYear: number;
|
|
547
|
+
asOf?: string | undefined;
|
|
548
|
+
readContract?: Readonly<{
|
|
549
|
+
axes: Readonly<{
|
|
550
|
+
calibratedConfidence: Readonly<{
|
|
551
|
+
estimate: number;
|
|
552
|
+
n: number;
|
|
553
|
+
intervalWidth: number;
|
|
554
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
555
|
+
}>;
|
|
556
|
+
assertedConfidence: Readonly<{
|
|
557
|
+
estimate: number;
|
|
558
|
+
n: number;
|
|
559
|
+
intervalWidth: number;
|
|
560
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
561
|
+
}>;
|
|
562
|
+
consequence: {
|
|
563
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
564
|
+
assertedAt: string;
|
|
565
|
+
kind: "property-risk";
|
|
566
|
+
basis: string;
|
|
567
|
+
auditRef?: string | undefined;
|
|
568
|
+
} | {
|
|
569
|
+
assertedAt: string;
|
|
570
|
+
kind: "not-applicable";
|
|
571
|
+
reason: string;
|
|
572
|
+
};
|
|
573
|
+
}>;
|
|
574
|
+
assembledAt: string;
|
|
575
|
+
modelAttribution?: Readonly<{
|
|
576
|
+
modelId: string;
|
|
577
|
+
modelVersion: string;
|
|
578
|
+
promptTemplateVersion: string;
|
|
579
|
+
contextTemplateVersion: string;
|
|
580
|
+
samplingParams: Readonly<z.objectInputType<{
|
|
581
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
582
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
583
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
584
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
585
|
+
}, z.ZodUnknown, "strip">>;
|
|
586
|
+
retrievedAtomSetId: string;
|
|
587
|
+
}> | undefined;
|
|
588
|
+
}> | undefined;
|
|
589
|
+
absence?: {
|
|
590
|
+
kind: "no-cad-row" | "join-hold" | "no-land-use-code";
|
|
591
|
+
reason: string;
|
|
592
|
+
} | undefined;
|
|
593
|
+
verifiedAbsence?: {
|
|
594
|
+
evaluated: true;
|
|
595
|
+
provenanceScope: string[];
|
|
596
|
+
} | undefined;
|
|
597
|
+
sourceVintage?: string | undefined;
|
|
598
|
+
landUseCode?: string | undefined;
|
|
599
|
+
landUseLabel?: string | undefined;
|
|
600
|
+
}>;
|
|
601
|
+
export declare function createLandUseFact(input: z.input<typeof LAND_USE_FACT_SCHEMA>): LandUseFactAtomInstance;
|
|
602
|
+
//# sourceMappingURL=land-use-fact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"land-use-fact.d.ts","sourceRoot":"","sources":["../../src/property/land-use-fact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,EAWL,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC9B,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,eAAe,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,OAAO,CAAC,cAAc,EAAE;QAAE,aAAa,EAAE,UAAU,CAAA;KAAE,CAAC,CAAC;IACvE,UAAU,EAAE,iBAAiB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,eAAe,CAAC,EAAE,wBAAwB,CAAC;IAC3C,YAAY,EAAE,YAAY,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,SAAS,GAAG,OAAO,GAAG,YAAY,CAAC;IACvD,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACtC;AAED,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkF7B,CAAC;AAEL,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,GAC1C,uBAAuB,CAEzB"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { REASONING_CHAIN_OBSERVED_SCHEMA } from "../reasoning-chain.js";
|
|
3
|
+
import { CAD_ROLL_SOURCE_TIER_SCHEMA, LAND_USE_ABSENCE_SCHEMA, PARCEL_NODE_ID_PATTERN, PROPERTY_ACCESS_POLICY_SCHEMA, PROPERTY_ATOM_TIER, PROPERTY_DEFAULT_ACCESS_POLICY, PROPERTY_QUALITY_GATE_FIELDS, PROPERTY_READ_CONTRACT_SCHEMA, SITE_LAYER_PROVENANCE_FIELDS, SITE_LAYER_VERIFIED_ABSENCE_SCHEMA, } from "./common.js";
|
|
4
|
+
export const LAND_USE_FACT_SCHEMA = z
|
|
5
|
+
.object({
|
|
6
|
+
entityType: z.literal("land-use-fact"),
|
|
7
|
+
atomDid: z
|
|
8
|
+
.string()
|
|
9
|
+
.min(1)
|
|
10
|
+
.refine((val) => /^lufact_[0-9a-f]{16}$/.test(val), {
|
|
11
|
+
message: "atomDid must be in format lufact_<16-hex-chars>",
|
|
12
|
+
}),
|
|
13
|
+
parcelNodeId: z
|
|
14
|
+
.string()
|
|
15
|
+
.min(1)
|
|
16
|
+
.refine((val) => PARCEL_NODE_ID_PATTERN.test(val), {
|
|
17
|
+
message: "parcelNodeId must match {county_fips}:{prop_id}",
|
|
18
|
+
}),
|
|
19
|
+
taxYear: z.number().int(),
|
|
20
|
+
reasoningChain: REASONING_CHAIN_OBSERVED_SCHEMA,
|
|
21
|
+
sourceTier: CAD_ROLL_SOURCE_TIER_SCHEMA,
|
|
22
|
+
landUseCode: z.string().min(1).optional(),
|
|
23
|
+
landUseLabel: z.string().min(1).optional(),
|
|
24
|
+
absence: LAND_USE_ABSENCE_SCHEMA.optional(),
|
|
25
|
+
verifiedAbsence: SITE_LAYER_VERIFIED_ABSENCE_SCHEMA.optional(),
|
|
26
|
+
accessPolicy: PROPERTY_ACCESS_POLICY_SCHEMA,
|
|
27
|
+
...PROPERTY_QUALITY_GATE_FIELDS,
|
|
28
|
+
...SITE_LAYER_PROVENANCE_FIELDS,
|
|
29
|
+
atomTier: z.literal(PROPERTY_ATOM_TIER),
|
|
30
|
+
readContract: PROPERTY_READ_CONTRACT_SCHEMA.optional(),
|
|
31
|
+
})
|
|
32
|
+
.superRefine((data, ctx) => {
|
|
33
|
+
const hasAbsence = data.absence !== undefined;
|
|
34
|
+
const isAbsentTier = data.sourceTier === "absent";
|
|
35
|
+
const hasLandUseCode = data.landUseCode !== undefined;
|
|
36
|
+
const hasLandUseLabel = data.landUseLabel !== undefined;
|
|
37
|
+
if (data.accessPolicy !== PROPERTY_DEFAULT_ACCESS_POLICY) {
|
|
38
|
+
ctx.addIssue({
|
|
39
|
+
code: z.ZodIssueCode.custom,
|
|
40
|
+
message: "land-use-fact must use accessPolicy public-free",
|
|
41
|
+
path: ["accessPolicy"],
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
if ((hasLandUseCode || hasLandUseLabel) && hasAbsence) {
|
|
45
|
+
ctx.addIssue({
|
|
46
|
+
code: z.ZodIssueCode.custom,
|
|
47
|
+
message: "land use fields and absence are mutually exclusive",
|
|
48
|
+
path: ["absence"],
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
if (isAbsentTier) {
|
|
52
|
+
if (!data.verifiedAbsence) {
|
|
53
|
+
ctx.addIssue({
|
|
54
|
+
code: z.ZodIssueCode.custom,
|
|
55
|
+
message: "sourceTier absent requires verifiedAbsence (evaluated + provenanceScope)",
|
|
56
|
+
path: ["verifiedAbsence"],
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (hasLandUseCode || hasLandUseLabel) {
|
|
60
|
+
ctx.addIssue({
|
|
61
|
+
code: z.ZodIssueCode.custom,
|
|
62
|
+
message: "sourceTier absent must not carry land use claim fields",
|
|
63
|
+
path: ["sourceTier"],
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else if (hasAbsence) {
|
|
68
|
+
if (hasLandUseCode || hasLandUseLabel) {
|
|
69
|
+
ctx.addIssue({
|
|
70
|
+
code: z.ZodIssueCode.custom,
|
|
71
|
+
message: "absence must not coexist with land use claim fields",
|
|
72
|
+
path: ["absence"],
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else if (!hasLandUseCode) {
|
|
77
|
+
ctx.addIssue({
|
|
78
|
+
code: z.ZodIssueCode.custom,
|
|
79
|
+
message: "cad-authoritative tier requires landUseCode when no absence",
|
|
80
|
+
path: ["landUseCode"],
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
export function createLandUseFact(input) {
|
|
85
|
+
return LAND_USE_FACT_SCHEMA.parse(input);
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=land-use-fact.js.map
|