@empressaio/atom-contract 1.30.0 → 1.32.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 +79 -0
- package/README.md +33 -0
- package/dist/display/buildable.d.ts +74 -0
- package/dist/display/buildable.d.ts.map +1 -0
- package/dist/display/buildable.js +227 -0
- package/dist/display/buildable.js.map +1 -0
- package/dist/display/index.d.ts +17 -0
- package/dist/display/index.d.ts.map +1 -0
- package/dist/display/index.js +17 -0
- package/dist/display/index.js.map +1 -0
- package/dist/display/wire.d.ts +110 -0
- package/dist/display/wire.d.ts.map +1 -0
- package/dist/display/wire.js +341 -0
- package/dist/display/wire.js.map +1 -0
- package/dist/property/boundary-edge.d.ts +802 -0
- package/dist/property/boundary-edge.d.ts.map +1 -0
- package/dist/property/boundary-edge.js +145 -0
- package/dist/property/boundary-edge.js.map +1 -0
- package/dist/property/buildable-envelope.d.ts +4 -4
- package/dist/property/building-footprint.d.ts +8 -8
- package/dist/property/cad-parcel-roll.d.ts +8 -8
- package/dist/property/fixtures.d.ts +13 -0
- package/dist/property/fixtures.d.ts.map +1 -1
- package/dist/property/fixtures.js +96 -0
- package/dist/property/fixtures.js.map +1 -1
- package/dist/property/flood-hazard-fact.d.ts +4 -4
- package/dist/property/index.d.ts +1 -0
- package/dist/property/index.d.ts.map +1 -1
- package/dist/property/index.js +1 -0
- package/dist/property/index.js.map +1 -1
- package/dist/property/land-use-fact.d.ts +8 -8
- package/dist/property/owner-fact.d.ts +8 -8
- package/dist/property/parcel-node.d.ts +4 -4
- package/dist/property/parcel-terrain-model.d.ts +4 -4
- package/dist/property/rail-corridor-fact.d.ts +4 -4
- package/dist/property/road-node.d.ts +10 -10
- package/dist/property/rrc-pipeline-fact.d.ts +4 -4
- package/dist/property/setback-rule.d.ts +4 -4
- package/dist/property/special-district-fact.d.ts +4 -4
- package/dist/property/utility-easement.d.ts +4 -4
- package/dist/property/well-fact.d.ts +4 -4
- package/dist/property/zoning-fact.d.ts +4 -4
- package/package.json +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,85 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@empressaio/atom-contract` (formerly `@hauska/atom-contract`) are documented here.
|
|
4
4
|
|
|
5
|
+
## [1.32.0] - 2026-09-11
|
|
6
|
+
|
|
7
|
+
Additive minor — display vocabulary substrate (OPS-23 R-6 / P-167, wave 1
|
|
8
|
+
package half). Before this release, the human-facing display strings for a
|
|
9
|
+
buildable/setback claim existed as five byte-identical, hand-synced copies
|
|
10
|
+
(hauska-map, twice in hauska-engine) locked together by two parity-lock
|
|
11
|
+
files and a vendor-drift test that silently skips in CI without a local
|
|
12
|
+
map checkout, and the Smart Site MCP wire-token vocabulary existed only in
|
|
13
|
+
legacy-design-tools with no package dependency at all. This release does
|
|
14
|
+
not yet retire any of those copies — that is P-167 steps 3-4, gated on
|
|
15
|
+
P-153 DRAW merging in hauska-map and legacy-design-tools — it only stands
|
|
16
|
+
up the one place both are meant to move to.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **`./display`** subpath. Two modules, both moved verbatim from their
|
|
21
|
+
source-of-truth copies (see the finding record,
|
|
22
|
+
`_inbox/2026-09-11_ops23_wave1_verify_p167.md`, for the exact SHAs and
|
|
23
|
+
line numbers this was moved from):
|
|
24
|
+
- `buildable`: `BuildableDisplayKind`, `EnvelopeStatusInput`,
|
|
25
|
+
`WarmEnvelopeKind`, `BuildableDisplayInput`, `BuildableDisplayVocab`,
|
|
26
|
+
`resolveBuildableAreaSqFt`, `mapBuildableDisplay`,
|
|
27
|
+
`violatesHistoricalDisagreementGuard` — moved from hauska-map
|
|
28
|
+
`apps/property-explorer/src/lib/buildable-display-vocab.ts` (origin/main
|
|
29
|
+
6ab6914, sha256 `45c277d7...29cac`, byte-identical across all five
|
|
30
|
+
prior copies). No string or branch changed.
|
|
31
|
+
- `wire`: `VocabularyEntry`, `WIRE_DISPOSITION_DISPLAY_TEXT`,
|
|
32
|
+
`DERIVED_FIGURES_POLICY`, `VOCABULARY` (34 entries — the source
|
|
33
|
+
table's own comment said 19; corrected here and enforced by a counting
|
|
34
|
+
test, `DOCUMENTED_VOCABULARY_COUNT`) — moved from legacy-design-tools
|
|
35
|
+
`artifacts/smartsite-mcp/src/vocabulary.ts` (origin/main 55c4ad44), the
|
|
36
|
+
P-91 v3 table. The nine display constants that table used to import as
|
|
37
|
+
values from the MCP server's own `mcp-app.ts` (`STATE_WORDS`,
|
|
38
|
+
`OPEN_DID_NOT_REACH_ME`, `NOT_ON_FILE_PREFIX`,
|
|
39
|
+
`NO_BAKED_SNAPSHOT_PREFIX`, `UPGRADE_TO_OPEN`,
|
|
40
|
+
`NOT_IMPLEMENTED_PREFIX`, `CITATION_DEGRADED`, `EDGE_WORDS`,
|
|
41
|
+
`envelopeHuman`) moved in with it, so this module has no dependency on
|
|
42
|
+
the MCP server. Not moved: `VOCABULARY_RESOURCE_URI`,
|
|
43
|
+
`buildVocabularyResourceText`, `registerVocabularyResource`,
|
|
44
|
+
`STANDING_VOCAB_BLOCK_TEXT`, `STANDING_VOCAB_CONTENT_PART` — these stay
|
|
45
|
+
MCP-specific per the mission; legacy-design-tools' `vocabulary.ts`
|
|
46
|
+
becomes a thin re-export of this subpath plus that resource
|
|
47
|
+
registration in a later step of this row.
|
|
48
|
+
- Self-tests: every `VOCABULARY` token unique, the documented count matches
|
|
49
|
+
the real count, every entry has non-empty fields, a snapshot of the full
|
|
50
|
+
string table; an exhaustiveness self-test that every `BuildableDisplayKind`
|
|
51
|
+
produces a non-empty `pdfLabel`, plus a snapshot of the canonical
|
|
52
|
+
per-kind output table.
|
|
53
|
+
|
|
54
|
+
## [1.31.0] - 2026-09-07
|
|
55
|
+
|
|
56
|
+
Additive minor — property boundary edge atom (27f S2-U2 / WDLL 4-5).
|
|
57
|
+
Per-parcel boundary edges (front/side/rear/side_corner) with role,
|
|
58
|
+
adjacency classification, resolved setback (or typed absence), and
|
|
59
|
+
local-ENU interior-frame geometry. A parcel normally carries several
|
|
60
|
+
of these, one per boundary side, unlike most other property atom
|
|
61
|
+
kinds which are one-per-parcel. Real writer and serving code have
|
|
62
|
+
existed in hauska-engine since before this registration — this
|
|
63
|
+
package previously had no published shape for it at all (see
|
|
64
|
+
hauska-engine#394, which registers the type in `PROPERTY_ENTITY_TYPES`,
|
|
65
|
+
and hauska-mcp-server#81, which mirrors it into
|
|
66
|
+
`ENGINE_PROPERTY_ENTITY_TYPES_MIRROR` so `get_property_atom_chain`
|
|
67
|
+
can reach it).
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
|
|
71
|
+
- **`BoundaryEdgeAtomInstance`**, **`BOUNDARY_EDGE_SCHEMA`** on `.` and
|
|
72
|
+
`./property`.
|
|
73
|
+
- `createBoundaryEdge`, `boundaryEdgeIdFromParts`,
|
|
74
|
+
`BOUNDARY_EDGE_ID_PATTERN`.
|
|
75
|
+
- `BoundaryEdgeRole`, `BoundaryAdjacencyKind`, `BoundaryFrontBasis`,
|
|
76
|
+
`BoundaryFacingRoad`, `BoundaryResolvedSetback`,
|
|
77
|
+
`BoundarySetbackAbsence` / `BOUNDARY_SETBACK_ABSENCE_KINDS`,
|
|
78
|
+
`BoundaryInteriorFrame`, `BoundaryPropertyLineTags`.
|
|
79
|
+
- Fixtures `BASTROP_BOUNDARY_EDGE_FRONT_FIXTURE` (resolved setback,
|
|
80
|
+
situs-street-matched front edge) and
|
|
81
|
+
`BASTROP_BOUNDARY_EDGE_NO_SETBACK_FIXTURE` (typed setback absence,
|
|
82
|
+
no facing road).
|
|
83
|
+
|
|
5
84
|
## [1.30.0] - 2026-08-27
|
|
6
85
|
|
|
7
86
|
Additive minor — Track 2.12 access as two fields (F-15).
|
package/README.md
CHANGED
|
@@ -338,6 +338,39 @@ Engine `AtomRegistration` literals and ingest producers belong in
|
|
|
338
338
|
`hauska-engine/packages/atoms/` (cc-agent-E); Cortex Phase 1 may
|
|
339
339
|
validate uploads with these schemas before the engine registry lands.
|
|
340
340
|
|
|
341
|
+
## Display vocabulary (OPS-23 R-6 / P-167)
|
|
342
|
+
|
|
343
|
+
The human-facing display strings for a claim ship on the `./display`
|
|
344
|
+
subpath (v1.32.0+), so the Property Explorer panel, the feasibility PDF,
|
|
345
|
+
and the Smart Site MCP connector render the same words for the same atom
|
|
346
|
+
from one place instead of hand-synced copies. Two modules:
|
|
347
|
+
|
|
348
|
+
- `buildable`: `mapBuildableDisplay` and its types — the buildable/setback
|
|
349
|
+
card, PDF, and cross-surface agreement-token vocabulary. Moved verbatim
|
|
350
|
+
from the five byte-identical `buildable-display-vocab.ts` copies that
|
|
351
|
+
used to live in hauska-map and hauska-engine, locked together by parity
|
|
352
|
+
fixtures.
|
|
353
|
+
- `wire`: `VOCABULARY`, `WIRE_DISPOSITION_DISPLAY_TEXT`,
|
|
354
|
+
`DERIVED_FIGURES_POLICY` — the Smart Site MCP wire-token vocabulary
|
|
355
|
+
table. Moved verbatim from legacy-design-tools
|
|
356
|
+
`artifacts/smartsite-mcp/src/vocabulary.ts` (the P-91 v3 table), along
|
|
357
|
+
with the nine display constants it used to import from the MCP server's
|
|
358
|
+
own `mcp-app.ts`, so this module has no dependency on the MCP server.
|
|
359
|
+
|
|
360
|
+
```ts
|
|
361
|
+
import {
|
|
362
|
+
mapBuildableDisplay,
|
|
363
|
+
type BuildableDisplayInput,
|
|
364
|
+
VOCABULARY,
|
|
365
|
+
WIRE_DISPOSITION_DISPLAY_TEXT,
|
|
366
|
+
} from "@empressaio/atom-contract/display";
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
As of 1.32.0 no consumer imports this subpath yet and the prior copies
|
|
370
|
+
still exist; retiring them (deleting the copies, the parity locks, and the
|
|
371
|
+
skipping vendor-drift test) is a later step of the same plan row, gated on
|
|
372
|
+
`P-153` merging in hauska-map and legacy-design-tools.
|
|
373
|
+
|
|
341
374
|
## Read-contract types (Calibrated Spine F4 / F6 / K6)
|
|
342
375
|
|
|
343
376
|
Widthed, three-axis confidence returned at read time. Unwidthed,
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared customer-facing buildable / setback vocabulary (Track B3 / WDLL 5).
|
|
3
|
+
*
|
|
4
|
+
* Map card, inspect, and site-plan PDF must speak ONE truth for the same
|
|
5
|
+
* envelope inputs. Surfaces MUST call `mapBuildableDisplay` rather than
|
|
6
|
+
* re-deriving "pending" / "consumes lot" / provisional copy independently.
|
|
7
|
+
*
|
|
8
|
+
* Axes (cannot disagree across surfaces for identical inputs):
|
|
9
|
+
* pending | provisional | buildable-with-area | declined-consume | not_specified
|
|
10
|
+
* (+ absent / loading for non-envelope shells)
|
|
11
|
+
*
|
|
12
|
+
* Historical disagreement class (FIX1 symptom): envelope area present on the
|
|
13
|
+
* warm facet while PDF said "setback-consumes-lot" and the card said bare
|
|
14
|
+
* "buildable % pending". Guard: area present → never those two strings.
|
|
15
|
+
*
|
|
16
|
+
* P-167 (OPS-23 R-6): moved verbatim into `@empressaio/atom-contract/display`
|
|
17
|
+
* from the five byte-identical copies this module used to have (hauska-map
|
|
18
|
+
* `apps/property-explorer/src/lib/buildable-display-vocab.ts`, hauska-engine
|
|
19
|
+
* `packages/engine-core/src/site-plan/buildable-display-vocab.ts` and
|
|
20
|
+
* `packages/retrieval/src/serving-sweep/vendor/buildable-display-vocab.ts`,
|
|
21
|
+
* sha256 `45c277d7...29cac`). No export, string, or branch below changed in
|
|
22
|
+
* the move.
|
|
23
|
+
*/
|
|
24
|
+
export type BuildableDisplayKind = "absent" | "loading" | "pending" | "provisional" | "buildable-with-area" | "declined-consume" | "not_specified"
|
|
25
|
+
/** Unincorporated land — no zoning ordinance to derive a setback from. */
|
|
26
|
+
| "not-applicable";
|
|
27
|
+
export type EnvelopeStatusInput = "ok" | "no-buildable-area" | "declined" | null | undefined;
|
|
28
|
+
export type WarmEnvelopeKind = "buildable" | "no-buildable-area" | "provisional-front-edge" | "not-applicable" | null | undefined;
|
|
29
|
+
export interface BuildableDisplayInput {
|
|
30
|
+
/** Baked / atom-chain envelope.status */
|
|
31
|
+
envelopeStatus?: EnvelopeStatusInput;
|
|
32
|
+
declineReason?: string | null;
|
|
33
|
+
/** True when F/S/R includes a silent (build-to-line) axis. */
|
|
34
|
+
notSpecifiedAxes?: boolean;
|
|
35
|
+
buildableAreaPct?: number | null;
|
|
36
|
+
buildableAreaSqFt?: number | null;
|
|
37
|
+
/** GeoJSON / drawable envelope present on the warm facet. */
|
|
38
|
+
hasGeometry?: boolean;
|
|
39
|
+
/** Envelope flagged provisional (or warm provisional-front-edge). */
|
|
40
|
+
provisional?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Warm buildable-envelope atom outcome — preferred over per-surface
|
|
43
|
+
* re-derive when present (PDF offset vs depth-warm).
|
|
44
|
+
*/
|
|
45
|
+
warmEnvelopeKind?: WarmEnvelopeKind;
|
|
46
|
+
warmEnvelopeAreaSqFt?: number | null;
|
|
47
|
+
/** PDF-only: local offset collapsed. Ignored when warm/area says otherwise. */
|
|
48
|
+
offsetDegenerate?: boolean;
|
|
49
|
+
offsetDegenerateReason?: string | null;
|
|
50
|
+
}
|
|
51
|
+
export interface BuildableDisplayVocab {
|
|
52
|
+
kind: BuildableDisplayKind;
|
|
53
|
+
/** Inspect / map-card FacetState for the Buildable row. */
|
|
54
|
+
cardState: "present" | "absent" | "pending";
|
|
55
|
+
/** Customer string for map card + inspect Buildable row. */
|
|
56
|
+
cardLabel: string | null;
|
|
57
|
+
/** Customer string for site-plan PDF SUMMARY "Buildable Area". */
|
|
58
|
+
pdfLabel: string;
|
|
59
|
+
/**
|
|
60
|
+
* Stable probe token — planner pastes this across map / inspect / PDF.
|
|
61
|
+
* Same inputs → same token on every surface.
|
|
62
|
+
*/
|
|
63
|
+
agreementToken: string;
|
|
64
|
+
}
|
|
65
|
+
/** Resolve the best area signal — prefer warm envelope when it has area. */
|
|
66
|
+
export declare function resolveBuildableAreaSqFt(input: BuildableDisplayInput): number | null;
|
|
67
|
+
/**
|
|
68
|
+
* Pure mapper: envelope / warm / offset inputs → one customer vocabulary.
|
|
69
|
+
* Do not invent a % when no area signal exists (honest shared pending OK).
|
|
70
|
+
*/
|
|
71
|
+
export declare function mapBuildableDisplay(input: BuildableDisplayInput): BuildableDisplayVocab;
|
|
72
|
+
/** True when copy would revive the historical map/PDF disagreement. */
|
|
73
|
+
export declare function violatesHistoricalDisagreementGuard(vocab: BuildableDisplayVocab, input: BuildableDisplayInput): boolean;
|
|
74
|
+
//# sourceMappingURL=buildable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildable.d.ts","sourceRoot":"","sources":["../../src/display/buildable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,MAAM,MAAM,oBAAoB,GAC5B,QAAQ,GACR,SAAS,GACT,SAAS,GACT,aAAa,GACb,qBAAqB,GACrB,kBAAkB,GAClB,eAAe;AACjB,0EAA0E;GACxE,gBAAgB,CAAC;AAErB,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG,mBAAmB,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC;AAE7F,MAAM,MAAM,gBAAgB,GACxB,WAAW,GACX,mBAAmB,GACnB,wBAAwB,GACxB,gBAAgB,GAChB,IAAI,GACJ,SAAS,CAAC;AAEd,MAAM,WAAW,qBAAqB;IACpC,yCAAyC;IACzC,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,6DAA6D;IAC7D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qEAAqE;IACrE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,2DAA2D;IAC3D,SAAS,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC5C,4DAA4D;IAC5D,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB;AAUD,4EAA4E;AAC5E,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,qBAAqB,GAAG,MAAM,GAAG,IAAI,CASpF;AA2BD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,qBAAqB,GAAG,qBAAqB,CAmKvF;AAED,uEAAuE;AACvE,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,qBAAqB,EAC5B,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAST"}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared customer-facing buildable / setback vocabulary (Track B3 / WDLL 5).
|
|
3
|
+
*
|
|
4
|
+
* Map card, inspect, and site-plan PDF must speak ONE truth for the same
|
|
5
|
+
* envelope inputs. Surfaces MUST call `mapBuildableDisplay` rather than
|
|
6
|
+
* re-deriving "pending" / "consumes lot" / provisional copy independently.
|
|
7
|
+
*
|
|
8
|
+
* Axes (cannot disagree across surfaces for identical inputs):
|
|
9
|
+
* pending | provisional | buildable-with-area | declined-consume | not_specified
|
|
10
|
+
* (+ absent / loading for non-envelope shells)
|
|
11
|
+
*
|
|
12
|
+
* Historical disagreement class (FIX1 symptom): envelope area present on the
|
|
13
|
+
* warm facet while PDF said "setback-consumes-lot" and the card said bare
|
|
14
|
+
* "buildable % pending". Guard: area present → never those two strings.
|
|
15
|
+
*
|
|
16
|
+
* P-167 (OPS-23 R-6): moved verbatim into `@empressaio/atom-contract/display`
|
|
17
|
+
* from the five byte-identical copies this module used to have (hauska-map
|
|
18
|
+
* `apps/property-explorer/src/lib/buildable-display-vocab.ts`, hauska-engine
|
|
19
|
+
* `packages/engine-core/src/site-plan/buildable-display-vocab.ts` and
|
|
20
|
+
* `packages/retrieval/src/serving-sweep/vendor/buildable-display-vocab.ts`,
|
|
21
|
+
* sha256 `45c277d7...29cac`). No export, string, or branch below changed in
|
|
22
|
+
* the move.
|
|
23
|
+
*/
|
|
24
|
+
function positiveNumber(n) {
|
|
25
|
+
return typeof n === "number" && Number.isFinite(n) && n > 0;
|
|
26
|
+
}
|
|
27
|
+
function nonNegativeNumber(n) {
|
|
28
|
+
return typeof n === "number" && Number.isFinite(n) && n >= 0;
|
|
29
|
+
}
|
|
30
|
+
/** Resolve the best area signal — prefer warm envelope when it has area. */
|
|
31
|
+
export function resolveBuildableAreaSqFt(input) {
|
|
32
|
+
if (input.warmEnvelopeKind === "buildable" &&
|
|
33
|
+
positiveNumber(input.warmEnvelopeAreaSqFt)) {
|
|
34
|
+
return input.warmEnvelopeAreaSqFt;
|
|
35
|
+
}
|
|
36
|
+
if (positiveNumber(input.buildableAreaSqFt))
|
|
37
|
+
return input.buildableAreaSqFt;
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
function areaPresent(input) {
|
|
41
|
+
if (positiveNumber(input.buildableAreaPct))
|
|
42
|
+
return true;
|
|
43
|
+
if (resolveBuildableAreaSqFt(input) != null)
|
|
44
|
+
return true;
|
|
45
|
+
if (input.warmEnvelopeKind === "buildable" &&
|
|
46
|
+
positiveNumber(input.warmEnvelopeAreaSqFt)) {
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
/** Numeric area OR drawable warm geojson — never leave as bare pending. */
|
|
52
|
+
function drawableOrAreaPresent(input) {
|
|
53
|
+
return areaPresent(input) || input.hasGeometry === true;
|
|
54
|
+
}
|
|
55
|
+
function formatPct(pct) {
|
|
56
|
+
return `${Math.round(pct)}%`;
|
|
57
|
+
}
|
|
58
|
+
function formatSqFt(sqFt) {
|
|
59
|
+
return `${Math.round(sqFt).toLocaleString("en-US")} sq ft`;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Pure mapper: envelope / warm / offset inputs → one customer vocabulary.
|
|
63
|
+
* Do not invent a % when no area signal exists (honest shared pending OK).
|
|
64
|
+
*/
|
|
65
|
+
export function mapBuildableDisplay(input) {
|
|
66
|
+
const decline = input.declineReason ?? null;
|
|
67
|
+
const silent = input.notSpecifiedAxes === true;
|
|
68
|
+
const areaSqFt = resolveBuildableAreaSqFt(input);
|
|
69
|
+
const hasDrawable = drawableOrAreaPresent(input);
|
|
70
|
+
const provisional = input.provisional === true ||
|
|
71
|
+
input.warmEnvelopeKind === "provisional-front-edge";
|
|
72
|
+
// Loading shell (Gate C) — never "not verified" / consume.
|
|
73
|
+
if (decline === "atom_path_pending") {
|
|
74
|
+
return {
|
|
75
|
+
kind: "loading",
|
|
76
|
+
cardState: "pending",
|
|
77
|
+
cardLabel: "Loading buildable area…",
|
|
78
|
+
pdfLabel: "pending — atom path loading",
|
|
79
|
+
agreementToken: "loading",
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// Declined envelope (honest absence of setbacks/zoning path).
|
|
83
|
+
if (input.envelopeStatus === "declined") {
|
|
84
|
+
return {
|
|
85
|
+
kind: "absent",
|
|
86
|
+
cardState: "absent",
|
|
87
|
+
cardLabel: null,
|
|
88
|
+
pdfLabel: `unavailable — ${decline ?? "envelope declined"}`,
|
|
89
|
+
agreementToken: `absent:${decline ?? "declined"}`,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
// Unincorporated land — no zoning ordinance to derive a setback from.
|
|
93
|
+
// Checked before the drawable/consume-lot branches: there is no area
|
|
94
|
+
// signal to have an opinion on here, and "setbacks consume lot" would be
|
|
95
|
+
// a false claim (no setback assessment happened at all).
|
|
96
|
+
if (input.warmEnvelopeKind === "not-applicable") {
|
|
97
|
+
return {
|
|
98
|
+
kind: "not-applicable",
|
|
99
|
+
cardState: "absent",
|
|
100
|
+
cardLabel: "Not zoned — no setback requirements",
|
|
101
|
+
pdfLabel: "not applicable — unincorporated, no zoning ordinance",
|
|
102
|
+
agreementToken: "not-applicable",
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
// Silent axes (build-to-line) with NO drawable/area — never consume-lot.
|
|
106
|
+
if (silent && !hasDrawable) {
|
|
107
|
+
return {
|
|
108
|
+
kind: "not_specified",
|
|
109
|
+
cardState: "pending",
|
|
110
|
+
cardLabel: "build-to-line · buildable % pending",
|
|
111
|
+
pdfLabel: "pending — build-to-line governs (scalar setback silent)",
|
|
112
|
+
agreementToken: "not_specified",
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
// Area or warm geojson wins over any local "consumes lot" / bare pending (B3).
|
|
116
|
+
if (hasDrawable) {
|
|
117
|
+
const pct = positiveNumber(input.buildableAreaPct)
|
|
118
|
+
? input.buildableAreaPct
|
|
119
|
+
: null;
|
|
120
|
+
const cardCore = pct != null
|
|
121
|
+
? formatPct(pct)
|
|
122
|
+
: areaSqFt != null
|
|
123
|
+
? `~${formatSqFt(areaSqFt)}`
|
|
124
|
+
: silent
|
|
125
|
+
? "buildable envelope on file (build-to-line)"
|
|
126
|
+
: "buildable envelope on file";
|
|
127
|
+
const pdfCore = areaSqFt != null
|
|
128
|
+
? formatSqFt(areaSqFt)
|
|
129
|
+
: pct != null
|
|
130
|
+
? `${formatPct(pct)} of lot`
|
|
131
|
+
: silent
|
|
132
|
+
? "buildable envelope on file (build-to-line)"
|
|
133
|
+
: "buildable envelope on file";
|
|
134
|
+
if (provisional) {
|
|
135
|
+
return {
|
|
136
|
+
kind: "provisional",
|
|
137
|
+
cardState: "present",
|
|
138
|
+
cardLabel: `${cardCore} (provisional)`,
|
|
139
|
+
pdfLabel: `${pdfCore} (PROVISIONAL)`,
|
|
140
|
+
agreementToken: `provisional:${pct ?? (areaSqFt != null ? Math.round(areaSqFt) : "envelope")}`,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
kind: "buildable-with-area",
|
|
145
|
+
cardState: "present",
|
|
146
|
+
cardLabel: cardCore,
|
|
147
|
+
pdfLabel: pdfCore,
|
|
148
|
+
agreementToken: `buildable:${pct ?? (areaSqFt != null ? Math.round(areaSqFt) : "envelope")}`,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
// Honest consume-lot — only when no area signal and status / warm / offset agree.
|
|
152
|
+
const warmConsumes = input.warmEnvelopeKind === "no-buildable-area";
|
|
153
|
+
const statusConsumes = input.envelopeStatus === "no-buildable-area";
|
|
154
|
+
const offsetConsumes = input.offsetDegenerate === true &&
|
|
155
|
+
input.warmEnvelopeKind !== "buildable" &&
|
|
156
|
+
input.warmEnvelopeKind !== "provisional-front-edge";
|
|
157
|
+
if ((statusConsumes || warmConsumes || offsetConsumes) && !silent) {
|
|
158
|
+
const reason = input.offsetDegenerateReason ??
|
|
159
|
+
(warmConsumes ? "warm envelope: no-buildable-area" : null) ??
|
|
160
|
+
"setbacks consume lot";
|
|
161
|
+
return {
|
|
162
|
+
kind: "declined-consume",
|
|
163
|
+
cardState: "present",
|
|
164
|
+
cardLabel: "0% — setbacks consume lot",
|
|
165
|
+
pdfLabel: `unavailable — ${reason}`,
|
|
166
|
+
agreementToken: "declined-consume",
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
// Explicit zero pct with consume status.
|
|
170
|
+
if (nonNegativeNumber(input.buildableAreaPct) &&
|
|
171
|
+
input.buildableAreaPct === 0 &&
|
|
172
|
+
statusConsumes) {
|
|
173
|
+
return {
|
|
174
|
+
kind: "declined-consume",
|
|
175
|
+
cardState: "present",
|
|
176
|
+
cardLabel: "0% — setbacks consume lot",
|
|
177
|
+
pdfLabel: "unavailable — setbacks consume lot",
|
|
178
|
+
agreementToken: "declined-consume",
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
// Setbacks / ok envelope present but no area yet — honest shared pending.
|
|
182
|
+
if (input.envelopeStatus === "ok" ||
|
|
183
|
+
input.hasGeometry === true ||
|
|
184
|
+
input.warmEnvelopeKind === "provisional-front-edge") {
|
|
185
|
+
if (provisional) {
|
|
186
|
+
return {
|
|
187
|
+
kind: "provisional",
|
|
188
|
+
cardState: "pending",
|
|
189
|
+
cardLabel: "provisional · buildable % pending",
|
|
190
|
+
pdfLabel: "provisional — buildable area pending front-edge resolution",
|
|
191
|
+
agreementToken: "provisional:pending",
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
return {
|
|
195
|
+
kind: "pending",
|
|
196
|
+
cardState: "pending",
|
|
197
|
+
cardLabel: "setbacks present · buildable % pending",
|
|
198
|
+
pdfLabel: "pending — setbacks on file; buildable area not yet derived",
|
|
199
|
+
agreementToken: "pending",
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
// No envelope signal at all.
|
|
203
|
+
return {
|
|
204
|
+
kind: "absent",
|
|
205
|
+
cardState: "absent",
|
|
206
|
+
cardLabel: null,
|
|
207
|
+
pdfLabel: "unavailable — no buildable envelope on file",
|
|
208
|
+
agreementToken: "absent",
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
/** True when copy would revive the historical map/PDF disagreement. */
|
|
212
|
+
export function violatesHistoricalDisagreementGuard(vocab, input) {
|
|
213
|
+
if (!drawableOrAreaPresent(input))
|
|
214
|
+
return false;
|
|
215
|
+
const blob = `${vocab.cardLabel ?? ""} ${vocab.pdfLabel}`.toLowerCase();
|
|
216
|
+
if (/consumes?\s+lot/.test(blob))
|
|
217
|
+
return true;
|
|
218
|
+
if (vocab.kind === "declined-consume")
|
|
219
|
+
return true;
|
|
220
|
+
// Bare pending % while drawable/area exists is the other half of the disagreement.
|
|
221
|
+
if (vocab.kind === "pending" || vocab.kind === "not_specified")
|
|
222
|
+
return true;
|
|
223
|
+
if (/buildable % pending/.test(blob) && !/provisional/.test(blob))
|
|
224
|
+
return true;
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=buildable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildable.js","sourceRoot":"","sources":["../../src/display/buildable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AA6DH,SAAS,cAAc,CAAC,CAA4B;IAClD,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC9D,CAAC;AAED,SAAS,iBAAiB,CAAC,CAA4B;IACrD,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/D,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,wBAAwB,CAAC,KAA4B;IACnE,IACE,KAAK,CAAC,gBAAgB,KAAK,WAAW;QACtC,cAAc,CAAC,KAAK,CAAC,oBAAoB,CAAC,EAC1C,CAAC;QACD,OAAO,KAAK,CAAC,oBAAoB,CAAC;IACpC,CAAC;IACD,IAAI,cAAc,CAAC,KAAK,CAAC,iBAAiB,CAAC;QAAE,OAAO,KAAK,CAAC,iBAAiB,CAAC;IAC5E,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,WAAW,CAAC,KAA4B;IAC/C,IAAI,cAAc,CAAC,KAAK,CAAC,gBAAgB,CAAC;QAAE,OAAO,IAAI,CAAC;IACxD,IAAI,wBAAwB,CAAC,KAAK,CAAC,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IACzD,IACE,KAAK,CAAC,g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zB,CAAC;AACJ,CAAC;AAED,uEAAuE;AACvE,MAAM,UAAU,mCAAmC,CACjD,KAA4B,EAC5B,KAA4B;IAE5B,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAChD,MAAM,IAAI,GAAG,GAAG,KAAK,CAAC,SAAS,IAAI,EAAE,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC;IACxE,IAAI,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC9C,IAAI,KAAK,CAAC,IAAI,KAAK,kBAAkB;QAAE,OAAO,IAAI,CAAC;IACnD,mFAAmF;IACnF,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,KAAK,eAAe;QAAE,OAAO,IAAI,CAAC;IAC5E,IAAI,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/E,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display vocabulary — the human face of every atom (OPS-23 R-6, P-167).
|
|
3
|
+
*
|
|
4
|
+
* Import from `@empressaio/atom-contract/display`.
|
|
5
|
+
*
|
|
6
|
+
* One versioned subpath producing the display strings that every surface
|
|
7
|
+
* (the Property Explorer panel, the feasibility PDF, and the Smart Site MCP
|
|
8
|
+
* connector) renders for the same claim, so the row moves strings between
|
|
9
|
+
* repos instead of letting them diverge into copies. See `buildable.ts`
|
|
10
|
+
* (the buildable/setback card, PDF, and agreement-token vocabulary,
|
|
11
|
+
* previously five byte-identical copies across hauska-map and
|
|
12
|
+
* hauska-engine) and `wire.ts` (the Smart Site MCP wire-token vocabulary
|
|
13
|
+
* table, previously owned only by legacy-design-tools).
|
|
14
|
+
*/
|
|
15
|
+
export * from "./buildable.js";
|
|
16
|
+
export * from "./wire.js";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display vocabulary — the human face of every atom (OPS-23 R-6, P-167).
|
|
3
|
+
*
|
|
4
|
+
* Import from `@empressaio/atom-contract/display`.
|
|
5
|
+
*
|
|
6
|
+
* One versioned subpath producing the display strings that every surface
|
|
7
|
+
* (the Property Explorer panel, the feasibility PDF, and the Smart Site MCP
|
|
8
|
+
* connector) renders for the same claim, so the row moves strings between
|
|
9
|
+
* repos instead of letting them diverge into copies. See `buildable.ts`
|
|
10
|
+
* (the buildable/setback card, PDF, and agreement-token vocabulary,
|
|
11
|
+
* previously five byte-identical copies across hauska-map and
|
|
12
|
+
* hauska-engine) and `wire.ts` (the Smart Site MCP wire-token vocabulary
|
|
13
|
+
* table, previously owned only by legacy-design-tools).
|
|
14
|
+
*/
|
|
15
|
+
export * from "./buildable.js";
|
|
16
|
+
export * from "./wire.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* P-167 (OPS-23 R-6). Moved verbatim from legacy-design-tools
|
|
3
|
+
* `artifacts/smartsite-mcp/src/vocabulary.ts` (origin/main 55c4ad44, the
|
|
4
|
+
* P-91 v3 table): the disposition enum, the refusal codes, the two Open
|
|
5
|
+
* failure sentences, citationsDegraded, confidence "seed", edge role
|
|
6
|
+
* side_corner, and frame quality gis-approximate. No display string below
|
|
7
|
+
* was reworded in the move; only the import mechanism changed (see next
|
|
8
|
+
* paragraph) and the stale entry-count comment was corrected (see
|
|
9
|
+
* `DOCUMENTED_VOCABULARY_COUNT`, enforced by a test that counts).
|
|
10
|
+
*
|
|
11
|
+
* The nine display constants this table used to import as VALUES from the
|
|
12
|
+
* MCP server's own `mcp-app.ts` (STATE_WORDS, OPEN_DID_NOT_REACH_ME,
|
|
13
|
+
* NOT_ON_FILE_PREFIX, NO_BAKED_SNAPSHOT_PREFIX, UPGRADE_TO_OPEN,
|
|
14
|
+
* NOT_IMPLEMENTED_PREFIX, CITATION_DEGRADED, EDGE_WORDS, envelopeHuman) are
|
|
15
|
+
* moved in below, verbatim, so this module has no dependency on the MCP
|
|
16
|
+
* server. This is now the one place these strings are owned; a consumer
|
|
17
|
+
* (the panel included) imports the value from here rather than retyping it.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* The panel's five-state PAINT vocabulary (originally typed against
|
|
21
|
+
* mcp-app.ts's local `CellState`). Renamed here to make explicit that this
|
|
22
|
+
* is the MCP panel's own paint-state enum, not the ledger's six-state cell
|
|
23
|
+
* vocabulary (OPS-21, `_catalog/program_preambles/OPS-21.md`) — a
|
|
24
|
+
* deliberately different, narrower concept this table happens to need for
|
|
25
|
+
* one Record's key type. Not exported: nothing outside this module typed
|
|
26
|
+
* against the original `CellState` name (vocabulary.ts imported only the
|
|
27
|
+
* STATE_WORDS value, never the type), so the rename is invisible to every
|
|
28
|
+
* existing importer.
|
|
29
|
+
*/
|
|
30
|
+
type PanelPaintState = "present" | "absent-verified" | "unknown" | "refused" | "unread";
|
|
31
|
+
/** mcp-app.ts:304. */
|
|
32
|
+
export declare const NOT_ON_FILE_PREFIX = "Not on file in";
|
|
33
|
+
/** mcp-app.ts:305. */
|
|
34
|
+
export declare const NO_BAKED_SNAPSHOT_PREFIX = "No baked snapshot yet for";
|
|
35
|
+
/** mcp-app.ts:307. */
|
|
36
|
+
export declare const UPGRADE_TO_OPEN = "Upgrade to open this parcel";
|
|
37
|
+
/** mcp-app.ts:333. */
|
|
38
|
+
export declare const NOT_IMPLEMENTED_PREFIX = "Not implemented";
|
|
39
|
+
/** mcp-app.ts:3023. */
|
|
40
|
+
export declare const OPEN_DID_NOT_REACH_ME = "Open did not reach me";
|
|
41
|
+
/**
|
|
42
|
+
* mcp-app.ts:448-451. Maps exactly one token, `atom_path_pending`, to its
|
|
43
|
+
* display sentence; every other reason passes through unchanged.
|
|
44
|
+
*/
|
|
45
|
+
export declare function envelopeHuman(reason: string | undefined): string | undefined;
|
|
46
|
+
/** mcp-app.ts:523. D1: adjacency and role words. Keys are the wire enum; any other value prints verbatim. */
|
|
47
|
+
export declare const EDGE_WORDS: Record<string, string>;
|
|
48
|
+
/** mcp-app.ts:550. F1: a section or overlay that claims a fact without an https citation says so; the text, never a link. */
|
|
49
|
+
export declare const CITATION_DEGRADED = "citation degraded";
|
|
50
|
+
/** mcp-app.ts:575. The five-state legend words, one per paint state. */
|
|
51
|
+
export declare const STATE_WORDS: Record<PanelPaintState, string>;
|
|
52
|
+
export type VocabularyEntry = {
|
|
53
|
+
/** The exact machine token as it appears in code or on the wire. */
|
|
54
|
+
token: string;
|
|
55
|
+
/** The exact string a lay reader gets. Sourced from the panel's own copy where one exists. */
|
|
56
|
+
displayText: string;
|
|
57
|
+
/** One line: what the token means, and where it matters, what it does not claim. */
|
|
58
|
+
meaning: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Wire-level section disposition words (tool-honesty.ts sectionDisposition
|
|
62
|
+
* / ExternalBriefSectionDisposition). Distinct from the panel's five-state
|
|
63
|
+
* PAINT vocabulary (STATE_WORDS / PanelPaintState above), though as of P-91
|
|
64
|
+
* v3 item 1 the two now overlap: `unknown` and `absent-verified` are the
|
|
65
|
+
* union's own display words, not the panel's earned-locally versions of
|
|
66
|
+
* them (a section that CLAIMS one of those two is preserved as claimed, not
|
|
67
|
+
* re-derived -- see tool-honesty.ts sectionDisposition). Cortex does not
|
|
68
|
+
* emit either at section level today (confirmed against
|
|
69
|
+
* artifacts/api-server's own R1BriefSectionDisposition type and the WDLL
|
|
70
|
+
* item 5 ruling withholding absent-verified there), so in practice the wire
|
|
71
|
+
* still only ever carries the original four; this table's other two rows
|
|
72
|
+
* exist so the display text is correct the day a section does. Both rows
|
|
73
|
+
* reuse STATE_WORDS' own strings rather than retype them, so the panel's
|
|
74
|
+
* word and the wire's word for the same token cannot drift apart.
|
|
75
|
+
*/
|
|
76
|
+
export declare const WIRE_DISPOSITION_DISPLAY_TEXT: Record<"present" | "refused" | "absent" | "unread" | "unknown" | "absent-verified", string>;
|
|
77
|
+
/**
|
|
78
|
+
* V5 (P-91 v3). Nothing in the wire shape prohibited computing an area or a
|
|
79
|
+
* coverage ratio from draw.ring; a session did exactly that. This is the
|
|
80
|
+
* stated policy, carried in the payload next to the geometry it governs
|
|
81
|
+
* (see sanitizeExternalDraw), not left as a convention nobody reads.
|
|
82
|
+
*/
|
|
83
|
+
export declare const DERIVED_FIGURES_POLICY: {
|
|
84
|
+
readonly denies: readonly ["area", "coverage_ratio", "lot_coverage_pct", "setback_distance", "buildable_area"];
|
|
85
|
+
readonly reason: "ring, edges, and overlays are for rendering only. Do not compute an area, a coverage ratio, a percentage, or a distance from them; use a brief section's own figure, or say the figure is not on record.";
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* The real, current entry count of VOCABULARY below, checked by a test
|
|
89
|
+
* (`wire.test.ts`) so this number cannot go stale the way the source
|
|
90
|
+
* table's own comment did (it said "19 entries" while the table had grown
|
|
91
|
+
* to 34; see `_inbox/2026-09-11_ops23_wave1_verify_p167.md` finding 4).
|
|
92
|
+
*/
|
|
93
|
+
export declare const DOCUMENTED_VOCABULARY_COUNT = 34;
|
|
94
|
+
/**
|
|
95
|
+
* V1. 34 entries (`DOCUMENTED_VOCABULARY_COUNT`, enforced by a counting
|
|
96
|
+
* test): the disposition enum, the panel-only paint additions
|
|
97
|
+
* (absent-verified, unknown), the two Open failure sentences (kept
|
|
98
|
+
* distinct, checked by tests), citationsDegraded, confidence "seed", frame
|
|
99
|
+
* quality gis-approximate, edge role side_corner, the refusal/reason codes
|
|
100
|
+
* read out of tool-honesty.ts, mcp-app.ts and their tests
|
|
101
|
+
* (declined-in-bake, not-in-bake, atom_path_pending, upgrade_required,
|
|
102
|
+
* parcel_not_found, baked_snapshot_not_found, parcel_batch_cap,
|
|
103
|
+
* depth_not_implemented), the P-91 v3 Q1 near/street refusal codes, the
|
|
104
|
+
* P-106 find_parcels refusal codes, and the P-107 out_of_coverage miss
|
|
105
|
+
* class. Every token here is grepped out of the source, not invented; see
|
|
106
|
+
* the P-91 v3 handback for the grep trail.
|
|
107
|
+
*/
|
|
108
|
+
export declare const VOCABULARY: readonly VocabularyEntry[];
|
|
109
|
+
export {};
|
|
110
|
+
//# sourceMappingURL=wire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wire.d.ts","sourceRoot":"","sources":["../../src/display/wire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;;GAUG;AACH,KAAK,eAAe,GAAG,SAAS,GAAG,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAExF,sBAAsB;AACtB,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AACnD,sBAAsB;AACtB,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AACpE,sBAAsB;AACtB,eAAO,MAAM,eAAe,gCAAgC,CAAC;AAC7D,sBAAsB;AACtB,eAAO,MAAM,sBAAsB,oBAAoB,CAAC;AACxD,uBAAuB;AACvB,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAA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