@empressaio/atom-contract 1.8.0 → 1.10.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 +71 -0
- package/README.md +39 -0
- package/dist/conformance/common.d.ts +5 -0
- package/dist/conformance/common.d.ts.map +1 -1
- package/dist/conformance/common.js +4 -0
- package/dist/conformance/common.js.map +1 -1
- package/dist/conformance/index.d.ts +1 -1
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +1 -1
- package/dist/conformance/index.js.map +1 -1
- package/dist/property/buildable-envelope.d.ts +464 -0
- package/dist/property/buildable-envelope.d.ts.map +1 -0
- package/dist/property/buildable-envelope.js +63 -0
- package/dist/property/buildable-envelope.js.map +1 -0
- package/dist/property/common.d.ts +513 -0
- package/dist/property/common.d.ts.map +1 -0
- package/dist/property/common.js +66 -0
- package/dist/property/common.js.map +1 -0
- package/dist/property/fixtures.d.ts +141 -0
- package/dist/property/fixtures.d.ts.map +1 -0
- package/dist/property/fixtures.js +438 -0
- package/dist/property/fixtures.js.map +1 -0
- package/dist/property/index.d.ts +24 -0
- package/dist/property/index.d.ts.map +1 -0
- package/dist/property/index.js +20 -0
- package/dist/property/index.js.map +1 -0
- package/dist/property/parcel-terrain-model.d.ts +922 -0
- package/dist/property/parcel-terrain-model.d.ts.map +1 -0
- package/dist/property/parcel-terrain-model.js +117 -0
- package/dist/property/parcel-terrain-model.js.map +1 -0
- package/dist/property/setback-rule.d.ts +887 -0
- package/dist/property/setback-rule.d.ts.map +1 -0
- package/dist/property/setback-rule.js +53 -0
- package/dist/property/setback-rule.js.map +1 -0
- package/dist/property/zoning-fact.d.ts +538 -0
- package/dist/property/zoning-fact.d.ts.map +1 -0
- package/dist/property/zoning-fact.js +48 -0
- package/dist/property/zoning-fact.js.map +1 -0
- package/package.json +5 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setback-rule.d.ts","sourceRoot":"","sources":["../../src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BSERVED_SCHEMA } from "../reasoning-chain.js";
|
|
4
|
+
import { PARCEL_NODE_ID_PATTERN, PROPERTY_ACCESS_POLICY_SCHEMA, PROPERTY_ATOM_TIER, PROPERTY_QUALITY_GATE_FIELDS, PROPERTY_READ_CONTRACT_SCHEMA, SETBACK_ABSENCE_SCHEMA, SETBACK_FIELD_PROVENANCE_SCHEMA, SETBACK_MATCH_BASIS_SCHEMA, } from "./common.js";
|
|
5
|
+
export const SETBACK_RULE_SCHEMA = z
|
|
6
|
+
.object({
|
|
7
|
+
entityType: z.literal("setback-rule"),
|
|
8
|
+
atomDid: z
|
|
9
|
+
.string()
|
|
10
|
+
.min(1)
|
|
11
|
+
.refine((val) => /^sbrule_[0-9a-f]{16}$/.test(val), {
|
|
12
|
+
message: "atomDid must be in format sbrule_<16-hex-chars>",
|
|
13
|
+
}),
|
|
14
|
+
parcelNodeId: z
|
|
15
|
+
.string()
|
|
16
|
+
.min(1)
|
|
17
|
+
.refine((val) => PARCEL_NODE_ID_PATTERN.test(val), {
|
|
18
|
+
message: "parcelNodeId must match {county_fips}:{prop_id}",
|
|
19
|
+
}),
|
|
20
|
+
reasoningChain: REASONING_CHAIN_OBSERVED_SCHEMA,
|
|
21
|
+
front: z.number().nonnegative(),
|
|
22
|
+
side: z.number().nonnegative(),
|
|
23
|
+
rear: z.number().nonnegative(),
|
|
24
|
+
sourceCodeAtomRef: ATOM_INPUT_REF_SCHEMA.superRefine((ref, ctx) => {
|
|
25
|
+
if (ref.role !== "rule" && ref.role !== "fact") {
|
|
26
|
+
ctx.addIssue({
|
|
27
|
+
code: z.ZodIssueCode.custom,
|
|
28
|
+
message: "sourceCodeAtomRef role must be rule or fact",
|
|
29
|
+
path: ["role"],
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}),
|
|
33
|
+
fieldProvenance: SETBACK_FIELD_PROVENANCE_SCHEMA.optional(),
|
|
34
|
+
matchBasis: SETBACK_MATCH_BASIS_SCHEMA,
|
|
35
|
+
absence: SETBACK_ABSENCE_SCHEMA.optional(),
|
|
36
|
+
accessPolicy: PROPERTY_ACCESS_POLICY_SCHEMA,
|
|
37
|
+
...PROPERTY_QUALITY_GATE_FIELDS,
|
|
38
|
+
atomTier: z.literal(PROPERTY_ATOM_TIER),
|
|
39
|
+
readContract: PROPERTY_READ_CONTRACT_SCHEMA.optional(),
|
|
40
|
+
})
|
|
41
|
+
.superRefine((data, ctx) => {
|
|
42
|
+
if (data.matchBasis === "fallback" && !data.absence) {
|
|
43
|
+
ctx.addIssue({
|
|
44
|
+
code: z.ZodIssueCode.custom,
|
|
45
|
+
message: "matchBasis fallback requires honest-absence",
|
|
46
|
+
path: ["absence"],
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export function createSetbackRule(input) {
|
|
51
|
+
return SETBACK_RULE_SCHEMA.parse(input);
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=setback-rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setback-rule.js","sourceRoot":"","sources":["../../src/property/setback-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AAGxE,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,kBAAkB,EAClB,4BAA4B,EAC5B,6BAA6B,EAC7B,sBAAsB,EACtB,+BAA+B,EAC/B,0BAA0B,GAI3B,MAAM,aAAa,CAAC;AAgCrB,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IACrC,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CAAC,CAAC,GAAG,EAAE,EA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,UAAU,KAAK,UAAU,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QACpD,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,OAAO,EAAE,6CAA6C;YACtD,IAAI,EAAE,CAAC,SAAS,CAAC;SAClB,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,MAAM,UAAU,iBAAiB,CAC/B,KAA0C;IAE1C,OAAO,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAA4B,CAAC;AACrE,CAAC"}
|
|
@@ -0,0 +1,538 @@
|
|
|
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 ZoningAbsence } from "./common.js";
|
|
7
|
+
/**
|
|
8
|
+
* Zoning FACT atom — observed district value or honest absence.
|
|
9
|
+
*
|
|
10
|
+
* `calibratedConfidence` on an optional {@link readContract} snapshot is a
|
|
11
|
+
* write-time placeholder; at READ the calibrated axis resolves via the
|
|
12
|
+
* calibration overlay (I-E), not a frozen multiply.
|
|
13
|
+
*/
|
|
14
|
+
export interface ZoningFactAtomInstance {
|
|
15
|
+
entityType: "zoning-fact";
|
|
16
|
+
atomDid: string;
|
|
17
|
+
/** Parcel node anchor, e.g. `48209:156346` (Hays County). */
|
|
18
|
+
parcelNodeId: string;
|
|
19
|
+
reasoningChain: Extract<ReasoningChain, {
|
|
20
|
+
reasoningKind: "observed";
|
|
21
|
+
}>;
|
|
22
|
+
/** Present when a zoning polygon stamps the parcel. */
|
|
23
|
+
district?: string;
|
|
24
|
+
/** Present when no zoning polygon covers the parcel (honest-absence). */
|
|
25
|
+
absence?: ZoningAbsence;
|
|
26
|
+
accessPolicy: AccessPolicy;
|
|
27
|
+
sourceCitation: string;
|
|
28
|
+
extractedAt: string;
|
|
29
|
+
asOf?: string;
|
|
30
|
+
atomTier: AtomTier;
|
|
31
|
+
/** Optional asserted snapshot; calibrated axis resolves at READ. */
|
|
32
|
+
readContract?: ReasoningReadContract;
|
|
33
|
+
}
|
|
34
|
+
export declare const ZONING_FACT_SCHEMA: z.ZodEffects<z.ZodObject<{
|
|
35
|
+
atomTier: z.ZodLiteral<AtomTier>;
|
|
36
|
+
readContract: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
37
|
+
axes: z.ZodReadonly<z.ZodObject<{
|
|
38
|
+
calibratedConfidence: z.ZodReadonly<z.ZodObject<{
|
|
39
|
+
readonly estimate: z.ZodNumber;
|
|
40
|
+
readonly n: z.ZodNumber;
|
|
41
|
+
readonly intervalWidth: z.ZodNumber;
|
|
42
|
+
readonly provenance: z.ZodEnum<["asserted", "backtest", "seed", "live"]>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
estimate: number;
|
|
45
|
+
n: number;
|
|
46
|
+
intervalWidth: number;
|
|
47
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
48
|
+
}, {
|
|
49
|
+
estimate: number;
|
|
50
|
+
n: number;
|
|
51
|
+
intervalWidth: number;
|
|
52
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
53
|
+
}>>;
|
|
54
|
+
assertedConfidence: z.ZodReadonly<z.ZodObject<{
|
|
55
|
+
readonly estimate: z.ZodNumber;
|
|
56
|
+
readonly n: z.ZodNumber;
|
|
57
|
+
readonly intervalWidth: z.ZodNumber;
|
|
58
|
+
readonly provenance: z.ZodEnum<["asserted", "backtest", "seed", "live"]>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
estimate: number;
|
|
61
|
+
n: number;
|
|
62
|
+
intervalWidth: number;
|
|
63
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
64
|
+
}, {
|
|
65
|
+
estimate: number;
|
|
66
|
+
n: number;
|
|
67
|
+
intervalWidth: number;
|
|
68
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
69
|
+
}>>;
|
|
70
|
+
consequence: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
71
|
+
kind: z.ZodLiteral<"property-risk">;
|
|
72
|
+
stratum: z.ZodEnum<[import("../read-contract/reasoning-axes.js").PropertyRiskStratum, ...import("../read-contract/reasoning-axes.js").PropertyRiskStratum[]]>;
|
|
73
|
+
basis: z.ZodString;
|
|
74
|
+
assertedAt: z.ZodString;
|
|
75
|
+
auditRef: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
78
|
+
assertedAt: string;
|
|
79
|
+
kind: "property-risk";
|
|
80
|
+
basis: string;
|
|
81
|
+
auditRef?: string | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
84
|
+
assertedAt: string;
|
|
85
|
+
kind: "property-risk";
|
|
86
|
+
basis: string;
|
|
87
|
+
auditRef?: string | undefined;
|
|
88
|
+
}>, z.ZodObject<{
|
|
89
|
+
kind: z.ZodLiteral<"not-applicable">;
|
|
90
|
+
reason: z.ZodString;
|
|
91
|
+
assertedAt: z.ZodString;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
assertedAt: string;
|
|
94
|
+
kind: "not-applicable";
|
|
95
|
+
reason: string;
|
|
96
|
+
}, {
|
|
97
|
+
assertedAt: string;
|
|
98
|
+
kind: "not-applicable";
|
|
99
|
+
reason: string;
|
|
100
|
+
}>]>;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
calibratedConfidence: Readonly<{
|
|
103
|
+
estimate: number;
|
|
104
|
+
n: number;
|
|
105
|
+
intervalWidth: number;
|
|
106
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
107
|
+
}>;
|
|
108
|
+
assertedConfidence: Readonly<{
|
|
109
|
+
estimate: number;
|
|
110
|
+
n: number;
|
|
111
|
+
intervalWidth: number;
|
|
112
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
113
|
+
}>;
|
|
114
|
+
consequence: {
|
|
115
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
116
|
+
assertedAt: string;
|
|
117
|
+
kind: "property-risk";
|
|
118
|
+
basis: string;
|
|
119
|
+
auditRef?: string | undefined;
|
|
120
|
+
} | {
|
|
121
|
+
assertedAt: string;
|
|
122
|
+
kind: "not-applicable";
|
|
123
|
+
reason: string;
|
|
124
|
+
};
|
|
125
|
+
}, {
|
|
126
|
+
calibratedConfidence: Readonly<{
|
|
127
|
+
estimate: number;
|
|
128
|
+
n: number;
|
|
129
|
+
intervalWidth: number;
|
|
130
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
131
|
+
}>;
|
|
132
|
+
assertedConfidence: Readonly<{
|
|
133
|
+
estimate: number;
|
|
134
|
+
n: number;
|
|
135
|
+
intervalWidth: number;
|
|
136
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
137
|
+
}>;
|
|
138
|
+
consequence: {
|
|
139
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
140
|
+
assertedAt: string;
|
|
141
|
+
kind: "property-risk";
|
|
142
|
+
basis: string;
|
|
143
|
+
auditRef?: string | undefined;
|
|
144
|
+
} | {
|
|
145
|
+
assertedAt: string;
|
|
146
|
+
kind: "not-applicable";
|
|
147
|
+
reason: string;
|
|
148
|
+
};
|
|
149
|
+
}>>;
|
|
150
|
+
assembledAt: z.ZodString;
|
|
151
|
+
modelAttribution: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
152
|
+
modelId: z.ZodString;
|
|
153
|
+
modelVersion: z.ZodString;
|
|
154
|
+
promptTemplateVersion: z.ZodString;
|
|
155
|
+
contextTemplateVersion: z.ZodString;
|
|
156
|
+
samplingParams: z.ZodReadonly<z.ZodObject<{
|
|
157
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
161
|
+
}, "strip", z.ZodUnknown, z.objectOutputType<{
|
|
162
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
}, z.ZodUnknown, "strip">, z.objectInputType<{
|
|
167
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
}, z.ZodUnknown, "strip">>>;
|
|
172
|
+
retrievedAtomSetId: z.ZodString;
|
|
173
|
+
}, "strip", z.ZodTypeAny, {
|
|
174
|
+
modelId: string;
|
|
175
|
+
modelVersion: string;
|
|
176
|
+
promptTemplateVersion: string;
|
|
177
|
+
contextTemplateVersion: string;
|
|
178
|
+
samplingParams: Readonly<z.objectOutputType<{
|
|
179
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
180
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
181
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
182
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
183
|
+
}, z.ZodUnknown, "strip">>;
|
|
184
|
+
retrievedAtomSetId: string;
|
|
185
|
+
}, {
|
|
186
|
+
modelId: string;
|
|
187
|
+
modelVersion: string;
|
|
188
|
+
promptTemplateVersion: string;
|
|
189
|
+
contextTemplateVersion: string;
|
|
190
|
+
samplingParams: Readonly<z.objectInputType<{
|
|
191
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
}, z.ZodUnknown, "strip">>;
|
|
196
|
+
retrievedAtomSetId: string;
|
|
197
|
+
}>>>;
|
|
198
|
+
}, "strip", z.ZodTypeAny, {
|
|
199
|
+
axes: Readonly<{
|
|
200
|
+
calibratedConfidence: Readonly<{
|
|
201
|
+
estimate: number;
|
|
202
|
+
n: number;
|
|
203
|
+
intervalWidth: number;
|
|
204
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
205
|
+
}>;
|
|
206
|
+
assertedConfidence: Readonly<{
|
|
207
|
+
estimate: number;
|
|
208
|
+
n: number;
|
|
209
|
+
intervalWidth: number;
|
|
210
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
211
|
+
}>;
|
|
212
|
+
consequence: {
|
|
213
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
214
|
+
assertedAt: string;
|
|
215
|
+
kind: "property-risk";
|
|
216
|
+
basis: string;
|
|
217
|
+
auditRef?: string | undefined;
|
|
218
|
+
} | {
|
|
219
|
+
assertedAt: string;
|
|
220
|
+
kind: "not-applicable";
|
|
221
|
+
reason: string;
|
|
222
|
+
};
|
|
223
|
+
}>;
|
|
224
|
+
assembledAt: string;
|
|
225
|
+
modelAttribution?: Readonly<{
|
|
226
|
+
modelId: string;
|
|
227
|
+
modelVersion: string;
|
|
228
|
+
promptTemplateVersion: string;
|
|
229
|
+
contextTemplateVersion: string;
|
|
230
|
+
samplingParams: Readonly<z.objectOutputType<{
|
|
231
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
233
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
235
|
+
}, z.ZodUnknown, "strip">>;
|
|
236
|
+
retrievedAtomSetId: string;
|
|
237
|
+
}> | undefined;
|
|
238
|
+
}, {
|
|
239
|
+
axes: Readonly<{
|
|
240
|
+
calibratedConfidence: Readonly<{
|
|
241
|
+
estimate: number;
|
|
242
|
+
n: number;
|
|
243
|
+
intervalWidth: number;
|
|
244
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
245
|
+
}>;
|
|
246
|
+
assertedConfidence: Readonly<{
|
|
247
|
+
estimate: number;
|
|
248
|
+
n: number;
|
|
249
|
+
intervalWidth: number;
|
|
250
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
251
|
+
}>;
|
|
252
|
+
consequence: {
|
|
253
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
254
|
+
assertedAt: string;
|
|
255
|
+
kind: "property-risk";
|
|
256
|
+
basis: string;
|
|
257
|
+
auditRef?: string | undefined;
|
|
258
|
+
} | {
|
|
259
|
+
assertedAt: string;
|
|
260
|
+
kind: "not-applicable";
|
|
261
|
+
reason: string;
|
|
262
|
+
};
|
|
263
|
+
}>;
|
|
264
|
+
assembledAt: string;
|
|
265
|
+
modelAttribution?: Readonly<{
|
|
266
|
+
modelId: string;
|
|
267
|
+
modelVersion: string;
|
|
268
|
+
promptTemplateVersion: string;
|
|
269
|
+
contextTemplateVersion: string;
|
|
270
|
+
samplingParams: Readonly<z.objectInputType<{
|
|
271
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
272
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
273
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
274
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
275
|
+
}, z.ZodUnknown, "strip">>;
|
|
276
|
+
retrievedAtomSetId: string;
|
|
277
|
+
}> | undefined;
|
|
278
|
+
}>>>;
|
|
279
|
+
sourceCitation: z.ZodString;
|
|
280
|
+
extractedAt: z.ZodString;
|
|
281
|
+
asOf: z.ZodOptional<z.ZodString>;
|
|
282
|
+
entityType: z.ZodLiteral<"zoning-fact">;
|
|
283
|
+
atomDid: z.ZodEffects<z.ZodString, string, string>;
|
|
284
|
+
parcelNodeId: z.ZodEffects<z.ZodString, string, string>;
|
|
285
|
+
reasoningChain: z.ZodObject<{
|
|
286
|
+
reasoningKind: z.ZodLiteral<"observed">;
|
|
287
|
+
}, "strip", z.ZodTypeAny, {
|
|
288
|
+
reasoningKind: "observed";
|
|
289
|
+
}, {
|
|
290
|
+
reasoningKind: "observed";
|
|
291
|
+
}>;
|
|
292
|
+
district: z.ZodOptional<z.ZodString>;
|
|
293
|
+
absence: z.ZodOptional<z.ZodObject<{
|
|
294
|
+
kind: z.ZodLiteral<"no-zoning-stamp">;
|
|
295
|
+
reason: z.ZodString;
|
|
296
|
+
}, "strip", z.ZodTypeAny, {
|
|
297
|
+
kind: "no-zoning-stamp";
|
|
298
|
+
reason: string;
|
|
299
|
+
}, {
|
|
300
|
+
kind: "no-zoning-stamp";
|
|
301
|
+
reason: string;
|
|
302
|
+
}>>;
|
|
303
|
+
accessPolicy: z.ZodEnum<["public-free", "public-paid", "platform-internal", "tenant-private", "tenant-shared"]>;
|
|
304
|
+
}, "strip", z.ZodTypeAny, {
|
|
305
|
+
accessPolicy: "public-free" | "public-paid" | "platform-internal" | "tenant-private" | "tenant-shared";
|
|
306
|
+
entityType: "zoning-fact";
|
|
307
|
+
sourceCitation: string;
|
|
308
|
+
extractedAt: string;
|
|
309
|
+
atomDid: string;
|
|
310
|
+
parcelNodeId: string;
|
|
311
|
+
reasoningChain: {
|
|
312
|
+
reasoningKind: "observed";
|
|
313
|
+
};
|
|
314
|
+
atomTier: AtomTier;
|
|
315
|
+
asOf?: string | undefined;
|
|
316
|
+
readContract?: Readonly<{
|
|
317
|
+
axes: Readonly<{
|
|
318
|
+
calibratedConfidence: Readonly<{
|
|
319
|
+
estimate: number;
|
|
320
|
+
n: number;
|
|
321
|
+
intervalWidth: number;
|
|
322
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
323
|
+
}>;
|
|
324
|
+
assertedConfidence: Readonly<{
|
|
325
|
+
estimate: number;
|
|
326
|
+
n: number;
|
|
327
|
+
intervalWidth: number;
|
|
328
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
329
|
+
}>;
|
|
330
|
+
consequence: {
|
|
331
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
332
|
+
assertedAt: string;
|
|
333
|
+
kind: "property-risk";
|
|
334
|
+
basis: string;
|
|
335
|
+
auditRef?: string | undefined;
|
|
336
|
+
} | {
|
|
337
|
+
assertedAt: string;
|
|
338
|
+
kind: "not-applicable";
|
|
339
|
+
reason: string;
|
|
340
|
+
};
|
|
341
|
+
}>;
|
|
342
|
+
assembledAt: string;
|
|
343
|
+
modelAttribution?: Readonly<{
|
|
344
|
+
modelId: string;
|
|
345
|
+
modelVersion: string;
|
|
346
|
+
promptTemplateVersion: string;
|
|
347
|
+
contextTemplateVersion: string;
|
|
348
|
+
samplingParams: Readonly<z.objectOutputType<{
|
|
349
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
350
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
351
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
352
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
353
|
+
}, z.ZodUnknown, "strip">>;
|
|
354
|
+
retrievedAtomSetId: string;
|
|
355
|
+
}> | undefined;
|
|
356
|
+
}> | undefined;
|
|
357
|
+
district?: string | undefined;
|
|
358
|
+
absence?: {
|
|
359
|
+
kind: "no-zoning-stamp";
|
|
360
|
+
reason: string;
|
|
361
|
+
} | undefined;
|
|
362
|
+
}, {
|
|
363
|
+
accessPolicy: "public-free" | "public-paid" | "platform-internal" | "tenant-private" | "tenant-shared";
|
|
364
|
+
entityType: "zoning-fact";
|
|
365
|
+
sourceCitation: string;
|
|
366
|
+
extractedAt: string;
|
|
367
|
+
atomDid: string;
|
|
368
|
+
parcelNodeId: string;
|
|
369
|
+
reasoningChain: {
|
|
370
|
+
reasoningKind: "observed";
|
|
371
|
+
};
|
|
372
|
+
atomTier: AtomTier;
|
|
373
|
+
asOf?: string | undefined;
|
|
374
|
+
readContract?: Readonly<{
|
|
375
|
+
axes: Readonly<{
|
|
376
|
+
calibratedConfidence: Readonly<{
|
|
377
|
+
estimate: number;
|
|
378
|
+
n: number;
|
|
379
|
+
intervalWidth: number;
|
|
380
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
381
|
+
}>;
|
|
382
|
+
assertedConfidence: Readonly<{
|
|
383
|
+
estimate: number;
|
|
384
|
+
n: number;
|
|
385
|
+
intervalWidth: number;
|
|
386
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
387
|
+
}>;
|
|
388
|
+
consequence: {
|
|
389
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
390
|
+
assertedAt: string;
|
|
391
|
+
kind: "property-risk";
|
|
392
|
+
basis: string;
|
|
393
|
+
auditRef?: string | undefined;
|
|
394
|
+
} | {
|
|
395
|
+
assertedAt: string;
|
|
396
|
+
kind: "not-applicable";
|
|
397
|
+
reason: string;
|
|
398
|
+
};
|
|
399
|
+
}>;
|
|
400
|
+
assembledAt: string;
|
|
401
|
+
modelAttribution?: Readonly<{
|
|
402
|
+
modelId: string;
|
|
403
|
+
modelVersion: string;
|
|
404
|
+
promptTemplateVersion: string;
|
|
405
|
+
contextTemplateVersion: string;
|
|
406
|
+
samplingParams: Readonly<z.objectInputType<{
|
|
407
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
408
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
409
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
410
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
411
|
+
}, z.ZodUnknown, "strip">>;
|
|
412
|
+
retrievedAtomSetId: string;
|
|
413
|
+
}> | undefined;
|
|
414
|
+
}> | undefined;
|
|
415
|
+
district?: string | undefined;
|
|
416
|
+
absence?: {
|
|
417
|
+
kind: "no-zoning-stamp";
|
|
418
|
+
reason: string;
|
|
419
|
+
} | undefined;
|
|
420
|
+
}>, {
|
|
421
|
+
accessPolicy: "public-free" | "public-paid" | "platform-internal" | "tenant-private" | "tenant-shared";
|
|
422
|
+
entityType: "zoning-fact";
|
|
423
|
+
sourceCitation: string;
|
|
424
|
+
extractedAt: string;
|
|
425
|
+
atomDid: string;
|
|
426
|
+
parcelNodeId: string;
|
|
427
|
+
reasoningChain: {
|
|
428
|
+
reasoningKind: "observed";
|
|
429
|
+
};
|
|
430
|
+
atomTier: AtomTier;
|
|
431
|
+
asOf?: string | undefined;
|
|
432
|
+
readContract?: Readonly<{
|
|
433
|
+
axes: Readonly<{
|
|
434
|
+
calibratedConfidence: Readonly<{
|
|
435
|
+
estimate: number;
|
|
436
|
+
n: number;
|
|
437
|
+
intervalWidth: number;
|
|
438
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
439
|
+
}>;
|
|
440
|
+
assertedConfidence: Readonly<{
|
|
441
|
+
estimate: number;
|
|
442
|
+
n: number;
|
|
443
|
+
intervalWidth: number;
|
|
444
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
445
|
+
}>;
|
|
446
|
+
consequence: {
|
|
447
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
448
|
+
assertedAt: string;
|
|
449
|
+
kind: "property-risk";
|
|
450
|
+
basis: string;
|
|
451
|
+
auditRef?: string | undefined;
|
|
452
|
+
} | {
|
|
453
|
+
assertedAt: string;
|
|
454
|
+
kind: "not-applicable";
|
|
455
|
+
reason: string;
|
|
456
|
+
};
|
|
457
|
+
}>;
|
|
458
|
+
assembledAt: string;
|
|
459
|
+
modelAttribution?: Readonly<{
|
|
460
|
+
modelId: string;
|
|
461
|
+
modelVersion: string;
|
|
462
|
+
promptTemplateVersion: string;
|
|
463
|
+
contextTemplateVersion: string;
|
|
464
|
+
samplingParams: Readonly<z.objectOutputType<{
|
|
465
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
466
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
467
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
468
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
469
|
+
}, z.ZodUnknown, "strip">>;
|
|
470
|
+
retrievedAtomSetId: string;
|
|
471
|
+
}> | undefined;
|
|
472
|
+
}> | undefined;
|
|
473
|
+
district?: string | undefined;
|
|
474
|
+
absence?: {
|
|
475
|
+
kind: "no-zoning-stamp";
|
|
476
|
+
reason: string;
|
|
477
|
+
} | undefined;
|
|
478
|
+
}, {
|
|
479
|
+
accessPolicy: "public-free" | "public-paid" | "platform-internal" | "tenant-private" | "tenant-shared";
|
|
480
|
+
entityType: "zoning-fact";
|
|
481
|
+
sourceCitation: string;
|
|
482
|
+
extractedAt: string;
|
|
483
|
+
atomDid: string;
|
|
484
|
+
parcelNodeId: string;
|
|
485
|
+
reasoningChain: {
|
|
486
|
+
reasoningKind: "observed";
|
|
487
|
+
};
|
|
488
|
+
atomTier: AtomTier;
|
|
489
|
+
asOf?: string | undefined;
|
|
490
|
+
readContract?: Readonly<{
|
|
491
|
+
axes: Readonly<{
|
|
492
|
+
calibratedConfidence: Readonly<{
|
|
493
|
+
estimate: number;
|
|
494
|
+
n: number;
|
|
495
|
+
intervalWidth: number;
|
|
496
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
497
|
+
}>;
|
|
498
|
+
assertedConfidence: Readonly<{
|
|
499
|
+
estimate: number;
|
|
500
|
+
n: number;
|
|
501
|
+
intervalWidth: number;
|
|
502
|
+
provenance: "asserted" | "backtest" | "seed" | "live";
|
|
503
|
+
}>;
|
|
504
|
+
consequence: {
|
|
505
|
+
stratum: import("../read-contract/reasoning-axes.js").PropertyRiskStratum;
|
|
506
|
+
assertedAt: string;
|
|
507
|
+
kind: "property-risk";
|
|
508
|
+
basis: string;
|
|
509
|
+
auditRef?: string | undefined;
|
|
510
|
+
} | {
|
|
511
|
+
assertedAt: string;
|
|
512
|
+
kind: "not-applicable";
|
|
513
|
+
reason: string;
|
|
514
|
+
};
|
|
515
|
+
}>;
|
|
516
|
+
assembledAt: string;
|
|
517
|
+
modelAttribution?: Readonly<{
|
|
518
|
+
modelId: string;
|
|
519
|
+
modelVersion: string;
|
|
520
|
+
promptTemplateVersion: string;
|
|
521
|
+
contextTemplateVersion: string;
|
|
522
|
+
samplingParams: Readonly<z.objectInputType<{
|
|
523
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
524
|
+
topP: z.ZodOptional<z.ZodNumber>;
|
|
525
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
526
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
527
|
+
}, z.ZodUnknown, "strip">>;
|
|
528
|
+
retrievedAtomSetId: string;
|
|
529
|
+
}> | undefined;
|
|
530
|
+
}> | undefined;
|
|
531
|
+
district?: string | undefined;
|
|
532
|
+
absence?: {
|
|
533
|
+
kind: "no-zoning-stamp";
|
|
534
|
+
reason: string;
|
|
535
|
+
} | undefined;
|
|
536
|
+
}>;
|
|
537
|
+
export declare function createZoningFact(input: z.input<typeof ZONING_FACT_SCHEMA>): ZoningFactAtomInstance;
|
|
538
|
+
//# sourceMappingURL=zoning-fact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoning-fact.d.ts","sourceRoot":"","sources":["../../src/property/zoning-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,uB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwC3B,CAAC;AAEL,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,GACxC,sBAAsB,CAExB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { REASONING_CHAIN_OBSERVED_SCHEMA } from "../reasoning-chain.js";
|
|
3
|
+
import { PARCEL_NODE_ID_PATTERN, PROPERTY_ACCESS_POLICY_SCHEMA, PROPERTY_ATOM_TIER, PROPERTY_QUALITY_GATE_FIELDS, PROPERTY_READ_CONTRACT_SCHEMA, ZONING_ABSENCE_SCHEMA, } from "./common.js";
|
|
4
|
+
export const ZONING_FACT_SCHEMA = z
|
|
5
|
+
.object({
|
|
6
|
+
entityType: z.literal("zoning-fact"),
|
|
7
|
+
atomDid: z
|
|
8
|
+
.string()
|
|
9
|
+
.min(1)
|
|
10
|
+
.refine((val) => /^zfact_[0-9a-f]{16}$/.test(val), {
|
|
11
|
+
message: "atomDid must be in format zfact_<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
|
+
reasoningChain: REASONING_CHAIN_OBSERVED_SCHEMA,
|
|
20
|
+
district: z.string().min(1).optional(),
|
|
21
|
+
absence: ZONING_ABSENCE_SCHEMA.optional(),
|
|
22
|
+
accessPolicy: PROPERTY_ACCESS_POLICY_SCHEMA,
|
|
23
|
+
...PROPERTY_QUALITY_GATE_FIELDS,
|
|
24
|
+
atomTier: z.literal(PROPERTY_ATOM_TIER),
|
|
25
|
+
readContract: PROPERTY_READ_CONTRACT_SCHEMA.optional(),
|
|
26
|
+
})
|
|
27
|
+
.superRefine((data, ctx) => {
|
|
28
|
+
const hasDistrict = data.district !== undefined && data.district.length > 0;
|
|
29
|
+
const hasAbsence = data.absence !== undefined;
|
|
30
|
+
if (hasDistrict && hasAbsence) {
|
|
31
|
+
ctx.addIssue({
|
|
32
|
+
code: z.ZodIssueCode.custom,
|
|
33
|
+
message: "district and absence are mutually exclusive",
|
|
34
|
+
path: ["district"],
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
if (!hasDistrict && !hasAbsence) {
|
|
38
|
+
ctx.addIssue({
|
|
39
|
+
code: z.ZodIssueCode.custom,
|
|
40
|
+
message: "zoning-fact requires district value OR honest-absence",
|
|
41
|
+
path: ["district"],
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export function createZoningFact(input) {
|
|
46
|
+
return ZONING_FACT_SCHEMA.parse(input);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=zoning-fact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoning-fact.js","sourceRoot":"","sources":["../../src/property/zoning-fact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,+BAA+B,EAAE,MAAM,uBAAuB,CAAC;AAGxE,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,kBAAkB,EAClB,4BAA4B,EAC5B,6BAA6B,EAC7B,qBAAqB,GAEtB,MAAM,aAAa,CAAC;AA4BrB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,CAAC;IACN,UAAU,EAAE,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC;IACpC,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,sBAAsB,CAAC,IAAI,CAAC,GAAG,CAAC,E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ACL,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,MAAM,UAAU,gBAAgB,CAC9B,KAAyC;IAEzC,OAAO,kBAAkB,CAAC,KAAK,CAAC,KAAK,CAA2B,CAAC;AACnE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empressaio/atom-contract",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "The typed-data substrate every Empressa atom satisfies: identity, context interface, composition declaration, and history anchoring. Peer to the Hauska SDK (`@hauska-sdk/*`); consumed directly by every product surface and MCP server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -46,6 +46,10 @@
|
|
|
46
46
|
"types": "./dist/reasoning/index.d.ts",
|
|
47
47
|
"import": "./dist/reasoning/index.js"
|
|
48
48
|
},
|
|
49
|
+
"./property": {
|
|
50
|
+
"types": "./dist/property/index.d.ts",
|
|
51
|
+
"import": "./dist/property/index.js"
|
|
52
|
+
},
|
|
49
53
|
"./package.json": "./package.json"
|
|
50
54
|
},
|
|
51
55
|
"files": [
|