@disclosureos/records 1.0.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 +20 -0
- package/LICENSE +21 -0
- package/README.md +121 -0
- package/dist/attachment-Hrg8uHuf.d.ts +23 -0
- package/dist/confidence-level-CV3P1W5_.d.ts +25 -0
- package/dist/constants/index.d.ts +28 -0
- package/dist/constants/index.js +885 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/credibility-CcQ0MUfQ.d.ts +14 -0
- package/dist/digital-ADBJTqSi.d.ts +278 -0
- package/dist/domains-CjIFZGBh.d.ts +330 -0
- package/dist/enum-guard-DzPkp2oJ.d.ts +101 -0
- package/dist/extensions/document/index.d.ts +47 -0
- package/dist/extensions/document/index.js +31 -0
- package/dist/extensions/document/index.js.map +1 -0
- package/dist/extensions/identifiers/index.d.ts +139 -0
- package/dist/extensions/identifiers/index.js +47 -0
- package/dist/extensions/identifiers/index.js.map +1 -0
- package/dist/extensions/physical/index.d.ts +84 -0
- package/dist/extensions/physical/index.js +84 -0
- package/dist/extensions/physical/index.js.map +1 -0
- package/dist/extensions/provenance/index.d.ts +153 -0
- package/dist/extensions/provenance/index.js +120 -0
- package/dist/extensions/provenance/index.js.map +1 -0
- package/dist/extensions/testimony/index.d.ts +400 -0
- package/dist/extensions/testimony/index.js +203 -0
- package/dist/extensions/testimony/index.js.map +1 -0
- package/dist/factories/index.d.ts +31 -0
- package/dist/factories/index.js +905 -0
- package/dist/factories/index.js.map +1 -0
- package/dist/formatters/index.d.ts +18 -0
- package/dist/formatters/index.js +156 -0
- package/dist/formatters/index.js.map +1 -0
- package/dist/geo/index.d.ts +16 -0
- package/dist/geo/index.js +146 -0
- package/dist/geo/index.js.map +1 -0
- package/dist/guards/index.d.ts +74 -0
- package/dist/guards/index.js +892 -0
- package/dist/guards/index.js.map +1 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +1350 -0
- package/dist/index.js.map +1 -0
- package/dist/labels/index.d.ts +33 -0
- package/dist/labels/index.js +181 -0
- package/dist/labels/index.js.map +1 -0
- package/dist/location-56xtMNtC.d.ts +408 -0
- package/dist/media/index.d.ts +3 -0
- package/dist/media/index.js +21 -0
- package/dist/media/index.js.map +1 -0
- package/dist/observation/index.d.ts +7 -0
- package/dist/observation/index.js +865 -0
- package/dist/observation/index.js.map +1 -0
- package/dist/shared/index.d.ts +29 -0
- package/dist/shared/index.js +87 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/source/index.d.ts +51 -0
- package/dist/source/index.js +45 -0
- package/dist/source/index.js.map +1 -0
- package/dist/source/sensor/index.d.ts +170 -0
- package/dist/source/sensor/index.js +69 -0
- package/dist/source/sensor/index.js.map +1 -0
- package/dist/temporal/index.d.ts +20 -0
- package/dist/temporal/index.js +78 -0
- package/dist/temporal/index.js.map +1 -0
- package/dist/temporal-data-t8Mzu8Ui.d.ts +148 -0
- package/dist/time-of-day-DLDBwTrn.d.ts +165 -0
- package/dist/types-CzNfaip-.d.ts +1267 -0
- package/dist/types-DH_-SdHj.d.ts +11 -0
- package/dist/types-clxXEQOH.d.ts +27 -0
- package/dist/validation-C-_QLXXf.d.ts +34 -0
- package/dist/validators/index.d.ts +15 -0
- package/dist/validators/index.js +895 -0
- package/dist/validators/index.js.map +1 -0
- package/package.json +146 -0
- package/schema/records.schema.json +2538 -0
|
@@ -0,0 +1,865 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
// src/observation/types.ts
|
|
4
|
+
var TemporalCertaintySchema = z.enum(["exact", "approximate", "estimated", "unknown"]).describe("Confidence in a date or time value \u2014 the single certainty scale for all temporal values.");
|
|
5
|
+
var TimeOfDaySchema = z.enum([
|
|
6
|
+
"astronomical_dawn",
|
|
7
|
+
"nautical_dawn",
|
|
8
|
+
"civil_dawn",
|
|
9
|
+
"sunrise",
|
|
10
|
+
"morning",
|
|
11
|
+
"noon",
|
|
12
|
+
"afternoon",
|
|
13
|
+
"sunset",
|
|
14
|
+
"civil_dusk",
|
|
15
|
+
"nautical_dusk",
|
|
16
|
+
"astronomical_dusk",
|
|
17
|
+
"night",
|
|
18
|
+
"unknown"
|
|
19
|
+
]).describe("Twilight-aware time-of-day bucket for an observation.");
|
|
20
|
+
var DateGranularitySchema = z.enum(["exact", "month", "quarter", "year", "decade", "century", "unknown"]).describe("Precision of a date value, from calendar-day (`exact`) to `century`.");
|
|
21
|
+
var DateRangeTypeSchema = z.enum(["span", "uncertainty", "active_period", "investigation_period", "observation_window"]).describe("What a DateRange represents (a true span vs. an uncertainty window, etc.).");
|
|
22
|
+
var FuzzyDateSchema = z.object({
|
|
23
|
+
value: z.string().describe("Machine-comparable anchor (ISO-like, as precise as known, e.g. `1947`, `1947-07`)."),
|
|
24
|
+
granularity: DateGranularitySchema,
|
|
25
|
+
certainty: TemporalCertaintySchema,
|
|
26
|
+
quarter: z.union([z.literal(1), z.literal(2), z.literal(3), z.literal(4)]).optional().describe("Calendar quarter (1\u20134) when granularity is `quarter`."),
|
|
27
|
+
display: z.string().optional().describe('Human display override, e.g. "Summer 1947".'),
|
|
28
|
+
notes: z.string().optional().describe("Free-text caveats about how this date was determined.")
|
|
29
|
+
}).meta({ id: "FuzzyDate" }).describe('A date whose precision is coarser than a calendar day (e.g. "summer 1947").');
|
|
30
|
+
var DateRangeSchema = z.object({
|
|
31
|
+
start: FuzzyDateSchema,
|
|
32
|
+
end: FuzzyDateSchema,
|
|
33
|
+
type: DateRangeTypeSchema,
|
|
34
|
+
display: z.string().optional().describe('Human display override, e.g. "July\u2013August 1952".'),
|
|
35
|
+
inclusive: z.boolean().optional().describe("Whether the end date is included in the range. Defaults to true.")
|
|
36
|
+
}).meta({ id: "DateRange" }).describe("A period or uncertainty window bounded by two FuzzyDates.");
|
|
37
|
+
var RelativeDateSchema = z.object({
|
|
38
|
+
referenceEvent: z.string().describe('The event this date is anchored to (e.g. "the crash").'),
|
|
39
|
+
referenceDate: FuzzyDateSchema.optional(),
|
|
40
|
+
relation: z.enum(["before", "after", "during", "around"]).describe("How this date relates to the reference event."),
|
|
41
|
+
offset: z.object({
|
|
42
|
+
value: z.number(),
|
|
43
|
+
unit: z.enum(["minutes", "hours", "days", "weeks", "months", "years"]),
|
|
44
|
+
approximate: z.boolean().optional()
|
|
45
|
+
}).optional().describe('Distance from the reference event (e.g. value 3, unit "days").'),
|
|
46
|
+
display: z.string().optional().describe('Human display override, e.g. "three days after the crash".')
|
|
47
|
+
}).meta({ id: "RelativeDate" }).describe('A date known only relative to another event (e.g. "3 days after the crash").');
|
|
48
|
+
|
|
49
|
+
// src/temporal/temporal-data.ts
|
|
50
|
+
var TemporalDataSchema = z.object({
|
|
51
|
+
date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "must be a valid ISO date (YYYY-MM-DD)").describe(
|
|
52
|
+
"Canonical, machine-sortable date anchor in ISO YYYY-MM-DD form. ALWAYS present, even when the true date is fuzzy or a range \u2014 set it to the best single representative. Express nuance via dateGranularity, dateRange, or relativeDate."
|
|
53
|
+
),
|
|
54
|
+
dateCertainty: TemporalCertaintySchema,
|
|
55
|
+
dateGranularity: DateGranularitySchema.optional().describe(
|
|
56
|
+
'Precision of `date`. Defaults to day-level when omitted (e.g. "July 1947" \u2192 date "1947-07-01", dateGranularity "month").'
|
|
57
|
+
),
|
|
58
|
+
time: z.string().optional().describe("Local clock time of the observation (HH:MM or HH:MM:SS, 24-hour)."),
|
|
59
|
+
timezone: z.string().optional().describe('IANA timezone of the local time (e.g. "America/Los_Angeles").'),
|
|
60
|
+
utcTime: z.string().optional().describe("Observation time converted to UTC, when known."),
|
|
61
|
+
timeCertainty: TemporalCertaintySchema.optional(),
|
|
62
|
+
durationSeconds: z.number().optional().describe("How long the observation lasted, in seconds."),
|
|
63
|
+
durationDescription: z.string().optional().describe('Duration as reported when not precisely known (e.g. "several minutes").'),
|
|
64
|
+
timeOfDay: TimeOfDaySchema.optional(),
|
|
65
|
+
isDaylightSaving: z.boolean().optional().describe("Whether daylight saving time was in effect at the local time."),
|
|
66
|
+
moonPhase: z.number().optional().describe("Moon phase at the time of observation (0 = new moon, 0.5 = full, 1 = new)."),
|
|
67
|
+
moonIllumination: z.number().optional().describe("Fraction of the moon illuminated at the time of observation (0\u20131)."),
|
|
68
|
+
dateRange: DateRangeSchema.optional().describe(
|
|
69
|
+
"For events spanning a period or with a genuine uncertainty window. `date` should still anchor within/at the range."
|
|
70
|
+
),
|
|
71
|
+
relativeDate: RelativeDateSchema.optional().describe(
|
|
72
|
+
'For dates known only relative to another event (e.g. "3 days after the crash").'
|
|
73
|
+
)
|
|
74
|
+
}).meta({ id: "TemporalData" }).describe("When an observation occurred \u2014 a sortable anchor date plus optional fuzzy/range/relative nuance.");
|
|
75
|
+
var CoordinatePrecisionSchema = z.enum(["exact", "address", "locality", "region", "approximate", "unknown"]).describe("How precisely a coordinate is known.");
|
|
76
|
+
var SiteTypeSchema = z.enum([
|
|
77
|
+
"military_air_base",
|
|
78
|
+
"military_naval_base",
|
|
79
|
+
"military_army_base",
|
|
80
|
+
"military_missile_site",
|
|
81
|
+
"military_radar_station",
|
|
82
|
+
"military_research_facility",
|
|
83
|
+
"military_training_area",
|
|
84
|
+
"military_other",
|
|
85
|
+
"nuclear_power_plant",
|
|
86
|
+
"nuclear_weapons_storage",
|
|
87
|
+
"nuclear_research_facility",
|
|
88
|
+
"nuclear_waste_storage",
|
|
89
|
+
"nuclear_other",
|
|
90
|
+
"civilian_airport",
|
|
91
|
+
"private_airfield",
|
|
92
|
+
"heliport",
|
|
93
|
+
"seaport",
|
|
94
|
+
"offshore_platform",
|
|
95
|
+
"naval_vessel",
|
|
96
|
+
"government_facility",
|
|
97
|
+
"embassy",
|
|
98
|
+
"intelligence_facility",
|
|
99
|
+
"power_plant",
|
|
100
|
+
"dam",
|
|
101
|
+
"telecommunications",
|
|
102
|
+
"water_treatment",
|
|
103
|
+
"research_facility",
|
|
104
|
+
"test_range",
|
|
105
|
+
"space_station",
|
|
106
|
+
"archaeological_site",
|
|
107
|
+
"volcano",
|
|
108
|
+
"command_center",
|
|
109
|
+
"residential",
|
|
110
|
+
"commercial",
|
|
111
|
+
"industrial",
|
|
112
|
+
"agricultural",
|
|
113
|
+
"wilderness",
|
|
114
|
+
"ocean",
|
|
115
|
+
"lake",
|
|
116
|
+
"mountain",
|
|
117
|
+
"desert",
|
|
118
|
+
"forest",
|
|
119
|
+
"urban",
|
|
120
|
+
"suburban",
|
|
121
|
+
"rural",
|
|
122
|
+
"other",
|
|
123
|
+
"unknown"
|
|
124
|
+
]).describe("Category of site at or near the observation location (military, nuclear, civilian, natural, etc.).");
|
|
125
|
+
var TerrainTypeSchema = z.enum([
|
|
126
|
+
"ocean",
|
|
127
|
+
"coastal",
|
|
128
|
+
"lake",
|
|
129
|
+
"river",
|
|
130
|
+
"wetland",
|
|
131
|
+
"plains",
|
|
132
|
+
"hills",
|
|
133
|
+
"mountains",
|
|
134
|
+
"desert",
|
|
135
|
+
"forest",
|
|
136
|
+
"jungle",
|
|
137
|
+
"tundra",
|
|
138
|
+
"arctic",
|
|
139
|
+
"urban",
|
|
140
|
+
"suburban",
|
|
141
|
+
"rural",
|
|
142
|
+
"underground",
|
|
143
|
+
"underwater",
|
|
144
|
+
"airborne",
|
|
145
|
+
"space",
|
|
146
|
+
"unknown"
|
|
147
|
+
]).describe("Physical terrain at the observation location.");
|
|
148
|
+
var AirspaceClassSchema = z.enum([
|
|
149
|
+
"A",
|
|
150
|
+
"B",
|
|
151
|
+
"C",
|
|
152
|
+
"D",
|
|
153
|
+
"E",
|
|
154
|
+
"G",
|
|
155
|
+
"restricted",
|
|
156
|
+
"prohibited",
|
|
157
|
+
"warning",
|
|
158
|
+
"moa",
|
|
159
|
+
"alert",
|
|
160
|
+
"cfa",
|
|
161
|
+
"national_security",
|
|
162
|
+
"tfr",
|
|
163
|
+
"international",
|
|
164
|
+
"unknown"
|
|
165
|
+
]).describe("Airspace classification over the location (ICAO classes plus special-use airspace).");
|
|
166
|
+
var LocationSensitivitySchema = z.enum(["critical", "high", "moderate", "standard", "none"]).describe("How sensitive the location is (e.g. proximity to critical infrastructure).");
|
|
167
|
+
var ProximitySiteSchema = z.object({
|
|
168
|
+
siteType: SiteTypeSchema,
|
|
169
|
+
siteName: z.string().optional().describe('Name of the nearby site (e.g. "Naval Air Station Oceana").'),
|
|
170
|
+
distanceKm: z.number().describe("Distance from the observation location, in kilometers."),
|
|
171
|
+
bearing: z.number().optional().describe("Compass bearing from the observation location to the site, in degrees (0\u2013360).")
|
|
172
|
+
}).meta({ id: "ProximitySite" }).describe("A site of interest near the observation and its distance/bearing.");
|
|
173
|
+
var LocationDataSchema = z.object({
|
|
174
|
+
id: z.string().min(1).describe("Stable unique identifier for this location."),
|
|
175
|
+
name: z.string().min(1).describe('Human-readable place name (e.g. "Off the coast of San Diego").'),
|
|
176
|
+
country: z.string().min(1).describe("Country where the observation occurred."),
|
|
177
|
+
countryCode: z.string().optional().describe('ISO 3166-1 alpha-2 country code (e.g. "US").'),
|
|
178
|
+
region: z.string().optional().describe("State, province, or administrative region."),
|
|
179
|
+
city: z.string().optional().describe("Nearest city or town."),
|
|
180
|
+
address: z.string().optional().describe("Street address, when the location is that precise."),
|
|
181
|
+
longitude: z.number().min(-180).max(180).describe("Longitude in decimal degrees (WGS 84)."),
|
|
182
|
+
latitude: z.number().min(-90).max(90).describe("Latitude in decimal degrees (WGS 84)."),
|
|
183
|
+
coordinatePrecision: CoordinatePrecisionSchema.optional(),
|
|
184
|
+
coordinatePrecisionMeters: z.number().optional().describe("Numeric uncertainty radius of the coordinates, in meters."),
|
|
185
|
+
coordinatesApproximate: z.boolean().optional().describe("Whether the coordinates are an approximation rather than a measured fix."),
|
|
186
|
+
elevationMeters: z.number().optional().describe("Ground elevation at the location, in meters above sea level."),
|
|
187
|
+
elevationSource: z.enum(["gps", "map", "estimated", "unknown"]).optional().describe("How the elevation value was obtained."),
|
|
188
|
+
siteType: SiteTypeSchema,
|
|
189
|
+
secondarySiteTypes: z.array(SiteTypeSchema).optional().describe("Additional site categories that also apply to the location."),
|
|
190
|
+
terrain: TerrainTypeSchema.optional(),
|
|
191
|
+
airspaceClass: AirspaceClassSchema.optional(),
|
|
192
|
+
locationSensitivity: LocationSensitivitySchema.optional(),
|
|
193
|
+
proximitySites: z.array(ProximitySiteSchema).optional().describe("Named sites of interest near the observation, with distance and bearing."),
|
|
194
|
+
nearestMilitaryKm: z.number().optional().describe("Distance to the nearest military installation, in kilometers."),
|
|
195
|
+
nearestNuclearKm: z.number().optional().describe("Distance to the nearest nuclear facility, in kilometers."),
|
|
196
|
+
nearestAirportKm: z.number().optional().describe("Distance to the nearest airport, in kilometers."),
|
|
197
|
+
waterDepthMeters: z.number().optional().describe("Water depth at the location for maritime observations, in meters."),
|
|
198
|
+
vesselName: z.string().optional().describe("Name of the vessel the observer was aboard, if any."),
|
|
199
|
+
vesselType: z.string().optional().describe('Type of vessel (e.g. "aircraft carrier", "fishing trawler").'),
|
|
200
|
+
aircraftType: z.string().optional().describe("Type of aircraft the observer was aboard, if any."),
|
|
201
|
+
aircraftCallsign: z.string().optional().describe("Callsign of the observer\u2019s aircraft."),
|
|
202
|
+
flightNumber: z.string().optional().describe("Commercial flight number, for airline observations."),
|
|
203
|
+
observerAltitudeMeters: z.number().optional().describe("Altitude of an airborne observer at the time of observation, in meters.")
|
|
204
|
+
}).meta({ id: "LocationData" }).describe("Where an observation occurred \u2014 identity, coordinates, site classification, and proximity context.");
|
|
205
|
+
var MediaTypeSchema = z.enum(["image", "video", "document", "audio"]).describe("Kind of media attachment.");
|
|
206
|
+
|
|
207
|
+
// src/media/attachment.ts
|
|
208
|
+
var MediaAttachmentSchema = z.object({
|
|
209
|
+
id: z.string().min(1).describe('Stable id, addressable by a claim `evidenceRef` ("media:<id>").'),
|
|
210
|
+
type: MediaTypeSchema,
|
|
211
|
+
url: z.string().describe("Where the media file is hosted."),
|
|
212
|
+
thumbnailUrl: z.string().optional().describe("Preview/thumbnail image for the media."),
|
|
213
|
+
caption: z.string().optional().describe("Human-readable caption describing what the media shows."),
|
|
214
|
+
credit: z.string().optional().describe("Attribution for who captured or owns the media."),
|
|
215
|
+
mimeType: z.string().optional().describe('MIME type of the file (e.g. "video/mp4").'),
|
|
216
|
+
fileSize: z.number().optional().describe("File size, in bytes."),
|
|
217
|
+
duration: z.number().optional().describe("Playback duration for video/audio, in seconds."),
|
|
218
|
+
width: z.number().optional().describe("Pixel width for images and video."),
|
|
219
|
+
height: z.number().optional().describe("Pixel height for images and video.")
|
|
220
|
+
}).meta({ id: "MediaAttachment" }).describe("A media file associated with an observation (image, video, document, or audio).");
|
|
221
|
+
var DetectionMethodSchema = z.enum([
|
|
222
|
+
"radar_primary",
|
|
223
|
+
"radar_secondary",
|
|
224
|
+
"radar_doppler",
|
|
225
|
+
"radar_phased_array",
|
|
226
|
+
"infrared_flir",
|
|
227
|
+
"infrared_other",
|
|
228
|
+
"electro_optical",
|
|
229
|
+
"visual_camera",
|
|
230
|
+
"satellite_imagery",
|
|
231
|
+
"sonar_active",
|
|
232
|
+
"sonar_passive",
|
|
233
|
+
"electromagnetic",
|
|
234
|
+
"radiation_detector",
|
|
235
|
+
"magnetometer",
|
|
236
|
+
"gravimeter",
|
|
237
|
+
"acoustic",
|
|
238
|
+
"seismic",
|
|
239
|
+
"lidar",
|
|
240
|
+
"spectroscopic",
|
|
241
|
+
"radio_frequency",
|
|
242
|
+
"multiple",
|
|
243
|
+
"other",
|
|
244
|
+
"unknown"
|
|
245
|
+
]).describe("How a sensor detected the object.");
|
|
246
|
+
var SensorTypeSchema = z.enum([
|
|
247
|
+
"military_radar",
|
|
248
|
+
"civilian_radar",
|
|
249
|
+
"airborne_radar",
|
|
250
|
+
"shipborne_radar",
|
|
251
|
+
"ground_radar",
|
|
252
|
+
"flir",
|
|
253
|
+
"eo_sensor",
|
|
254
|
+
"satellite",
|
|
255
|
+
"sonar",
|
|
256
|
+
"electromagnetic_sensor",
|
|
257
|
+
"radiation_sensor",
|
|
258
|
+
"civilian_camera",
|
|
259
|
+
"security_camera",
|
|
260
|
+
"dashcam",
|
|
261
|
+
"phone_camera",
|
|
262
|
+
"other"
|
|
263
|
+
]).describe("Class of sensor that produced a reading.");
|
|
264
|
+
var SensorReadingSchema = z.object({
|
|
265
|
+
id: z.string().min(1).describe('Stable id, addressable by a claim `evidenceRef` ("sensor:<id>").'),
|
|
266
|
+
sensorType: SensorTypeSchema,
|
|
267
|
+
detectionMethod: DetectionMethodSchema,
|
|
268
|
+
platform: z.string().optional().describe('Platform carrying the sensor (e.g. "USS Princeton", "F/A-18F").'),
|
|
269
|
+
operator: z.string().optional().describe("Person or unit operating the sensor."),
|
|
270
|
+
timestamp: z.string().optional().describe("When the reading was recorded (ISO timestamp)."),
|
|
271
|
+
duration: z.number().optional().describe("How long the sensor held contact, in seconds."),
|
|
272
|
+
rawDataAvailable: z.boolean().optional().describe("Whether the raw sensor data still exists and is obtainable."),
|
|
273
|
+
calibrated: z.boolean().optional().describe("Whether the sensor was calibrated at the time of the reading."),
|
|
274
|
+
readings: z.record(z.string(), z.unknown()).optional().describe("Sensor-specific measured values, keyed by measurement name."),
|
|
275
|
+
notes: z.string().optional().describe("Free-text context about the reading.")
|
|
276
|
+
}).meta({ id: "SensorReading" }).describe("A single sensor reading and its provenance.");
|
|
277
|
+
var SensorEvidenceDataSchema = z.object({
|
|
278
|
+
sensors: z.array(SensorReadingSchema),
|
|
279
|
+
multiSensorCorrelation: z.boolean().optional().describe("Whether independent sensors corroborated the same object."),
|
|
280
|
+
dataRetentionStatus: z.enum(["available", "archived", "destroyed", "classified", "unknown"]).optional().describe("Current status of the underlying sensor data."),
|
|
281
|
+
anomalies: z.array(z.string()).optional().describe('Anomalies in the sensor data itself (e.g. "jamming indications", "signal dropout").')
|
|
282
|
+
}).meta({ id: "SensorEvidenceData" }).describe("Instrument-recorded evidence for an observation (radar, FLIR, EO, etc.).");
|
|
283
|
+
var ChainOfCustodySchema = z.enum([
|
|
284
|
+
"verified",
|
|
285
|
+
"partial",
|
|
286
|
+
"unverified",
|
|
287
|
+
"government_held",
|
|
288
|
+
"private_held",
|
|
289
|
+
"lost",
|
|
290
|
+
"destroyed",
|
|
291
|
+
"classified",
|
|
292
|
+
"unknown"
|
|
293
|
+
]).describe("Custody status of an evidence item.");
|
|
294
|
+
var CustodyActionSchema = z.enum([
|
|
295
|
+
"creation",
|
|
296
|
+
"collection",
|
|
297
|
+
"transfer",
|
|
298
|
+
"storage",
|
|
299
|
+
"analysis",
|
|
300
|
+
"release",
|
|
301
|
+
"classification",
|
|
302
|
+
"destruction",
|
|
303
|
+
"loss",
|
|
304
|
+
"recovery",
|
|
305
|
+
"other"
|
|
306
|
+
]).describe("An action recorded in a chain-of-custody entry.");
|
|
307
|
+
var CustodyEntrySchema = z.object({
|
|
308
|
+
entryId: z.string().describe("Stable unique identifier for this custody entry."),
|
|
309
|
+
date: z.string().describe("When the custody event occurred (ISO date)."),
|
|
310
|
+
action: CustodyActionSchema,
|
|
311
|
+
from: z.string().optional().describe("Party that held the evidence before this event."),
|
|
312
|
+
to: z.string().optional().describe("Party that held the evidence after this event."),
|
|
313
|
+
location: z.string().optional().describe("Where the custody event took place."),
|
|
314
|
+
reference: z.string().optional().describe("Document or record substantiating the event (e.g. transfer receipt, log entry)."),
|
|
315
|
+
notes: z.string().optional().describe("Free-text context about the event.")
|
|
316
|
+
}).meta({ id: "CustodyEntry" }).describe("A single custody event for an evidence item.");
|
|
317
|
+
var ChainOfCustodyRecordSchema = z.object({
|
|
318
|
+
evidenceId: z.string().describe("Identifier of the evidence item this custody history belongs to."),
|
|
319
|
+
status: ChainOfCustodySchema,
|
|
320
|
+
entries: z.array(CustodyEntrySchema)
|
|
321
|
+
}).meta({ id: "ChainOfCustodyRecord" }).describe("The full custody history for a piece of evidence.");
|
|
322
|
+
var HashAlgorithmSchema = z.enum(["sha256", "sha512", "sha1", "md5"]).describe("Cryptographic hash algorithm used to fingerprint a file.");
|
|
323
|
+
var FileHashSchema = z.object({
|
|
324
|
+
algorithm: HashAlgorithmSchema,
|
|
325
|
+
value: z.string().describe("Hex-encoded hash digest of the file contents.")
|
|
326
|
+
}).meta({ id: "FileHash" }).describe("A content hash of a file.");
|
|
327
|
+
var VerificationMethodSchema = z.enum([
|
|
328
|
+
"metadata_analysis",
|
|
329
|
+
"forensic_analysis",
|
|
330
|
+
"hash_verification",
|
|
331
|
+
"chain_of_custody",
|
|
332
|
+
"source_confirmation",
|
|
333
|
+
"expert_review",
|
|
334
|
+
"ai_analysis",
|
|
335
|
+
"other"
|
|
336
|
+
]).describe("Method used to verify media authenticity.");
|
|
337
|
+
var VerificationResultSchema = z.enum([
|
|
338
|
+
"authentic",
|
|
339
|
+
"likely_authentic",
|
|
340
|
+
"inconclusive",
|
|
341
|
+
"likely_manipulated",
|
|
342
|
+
"manipulated",
|
|
343
|
+
"ai_generated",
|
|
344
|
+
"deepfake",
|
|
345
|
+
"composite",
|
|
346
|
+
"unknown"
|
|
347
|
+
]).describe("Outcome of an authenticity verification.");
|
|
348
|
+
var ThirdPartyVerificationSchema = z.object({
|
|
349
|
+
verifier: z.string().describe("Name of the person who performed the verification."),
|
|
350
|
+
organization: z.string().optional().describe("Organization the verifier represents."),
|
|
351
|
+
credentials: z.string().optional().describe('Verifier\u2019s relevant qualifications (e.g. "certified forensic video analyst").'),
|
|
352
|
+
date: z.string().describe("When the verification was performed (ISO date)."),
|
|
353
|
+
method: VerificationMethodSchema,
|
|
354
|
+
methodDescription: z.string().optional().describe("Fuller description of how the verification was performed."),
|
|
355
|
+
result: VerificationResultSchema,
|
|
356
|
+
confidence: z.enum(["high", "medium", "low"]).optional().describe("Verifier\u2019s confidence in their own result."),
|
|
357
|
+
findings: z.string().optional().describe("Summary of what the verification found."),
|
|
358
|
+
reportUrl: z.string().optional().describe("Link to the full verification report.")
|
|
359
|
+
}).meta({ id: "ThirdPartyVerification" }).describe("An independent authenticity assessment of media or a document.");
|
|
360
|
+
var CaptureMetadataSchema = z.object({
|
|
361
|
+
device: z.string().optional().describe('Capture device as recorded in metadata (e.g. "iPhone 14 Pro").'),
|
|
362
|
+
manufacturer: z.string().optional().describe("Device manufacturer from metadata."),
|
|
363
|
+
model: z.string().optional().describe("Device model from metadata."),
|
|
364
|
+
software: z.string().optional().describe("Software that produced or processed the file."),
|
|
365
|
+
originalFilename: z.string().optional().describe("Filename as originally captured, before any renaming."),
|
|
366
|
+
originalCreationDate: z.string().optional().describe("Creation timestamp embedded in the file metadata."),
|
|
367
|
+
gpsCoordinates: z.object({
|
|
368
|
+
latitude: z.number(),
|
|
369
|
+
longitude: z.number(),
|
|
370
|
+
altitude: z.number().optional()
|
|
371
|
+
}).optional().describe("GPS position embedded in the file metadata."),
|
|
372
|
+
metadataPreserved: z.boolean().optional().describe("Whether the original metadata survives intact."),
|
|
373
|
+
metadataStripped: z.boolean().optional().describe("Whether metadata was removed at some point."),
|
|
374
|
+
strippedReason: z.string().optional().describe('Why metadata was stripped (e.g. "platform re-encoding", "privacy redaction").')
|
|
375
|
+
}).meta({ id: "CaptureMetadata" }).describe("Capture/EXIF-style metadata extracted from a media file.");
|
|
376
|
+
var DigitalProvenanceSchema = z.object({
|
|
377
|
+
hash: FileHashSchema.optional(),
|
|
378
|
+
additionalHashes: z.array(FileHashSchema).optional(),
|
|
379
|
+
captureMetadata: CaptureMetadataSchema.optional(),
|
|
380
|
+
verifications: z.array(ThirdPartyVerificationSchema).optional(),
|
|
381
|
+
provenanceChain: z.array(z.string()).optional().describe('Ordered hops the file took from capture to here (e.g. "witness phone \u2192 NYT \u2192 public release").'),
|
|
382
|
+
manipulationDetected: z.boolean().optional().describe("Whether any analysis found evidence of manipulation."),
|
|
383
|
+
manipulationDescription: z.string().optional().describe("What manipulation was found, if any."),
|
|
384
|
+
authenticityAssessment: VerificationResultSchema.optional(),
|
|
385
|
+
authenticityConfidence: z.enum(["high", "medium", "low", "unassessed"]).optional().describe("Overall confidence in the authenticity assessment."),
|
|
386
|
+
lastUpdated: z.string().optional().describe("When this provenance record was last updated (ISO timestamp)."),
|
|
387
|
+
notes: z.string().optional().describe("Free-text context about the provenance trail.")
|
|
388
|
+
}).meta({ id: "DigitalProvenance" }).describe("Digital authenticity trail for media: hashes, capture metadata, and verifications.");
|
|
389
|
+
|
|
390
|
+
// src/extensions/provenance/index.ts
|
|
391
|
+
var ProvenanceSchema = z.object({
|
|
392
|
+
custodyStatus: ChainOfCustodySchema.optional(),
|
|
393
|
+
custody: ChainOfCustodyRecordSchema.optional(),
|
|
394
|
+
digital: DigitalProvenanceSchema.optional()
|
|
395
|
+
}).meta({ id: "Provenance" }).describe("Forensic provenance for an observation: custody status/chain and digital authenticity.");
|
|
396
|
+
var IdentifierSystemSchema = z.enum([
|
|
397
|
+
"nuforc",
|
|
398
|
+
"mufon",
|
|
399
|
+
"geipan",
|
|
400
|
+
"cufos",
|
|
401
|
+
"nicap",
|
|
402
|
+
"bluebook",
|
|
403
|
+
"nara",
|
|
404
|
+
"foia",
|
|
405
|
+
"aaro",
|
|
406
|
+
"congress",
|
|
407
|
+
"doi",
|
|
408
|
+
"arxiv",
|
|
409
|
+
"orcid",
|
|
410
|
+
"pubmed",
|
|
411
|
+
"isbn",
|
|
412
|
+
"issn",
|
|
413
|
+
"youtube",
|
|
414
|
+
"vimeo",
|
|
415
|
+
"internet_archive",
|
|
416
|
+
"wayback",
|
|
417
|
+
"url",
|
|
418
|
+
"uri",
|
|
419
|
+
"custom"
|
|
420
|
+
]).describe("External identifier namespace (reporting centers, archives, academic registries, media hosts).");
|
|
421
|
+
var ExternalIdentifierSchema = z.object({
|
|
422
|
+
system: IdentifierSystemSchema,
|
|
423
|
+
systemName: z.string().optional().describe('Display name of the system, required when `system` is "custom".'),
|
|
424
|
+
value: z.string().describe("The identifier value within the external system (e.g. a case number)."),
|
|
425
|
+
url: z.string().optional().describe("Direct link to the record in the external system."),
|
|
426
|
+
verified: z.boolean().optional().describe("Whether the identifier has been confirmed to point at this observation."),
|
|
427
|
+
verifiedDate: z.string().optional().describe("When the identifier was last verified (ISO date)."),
|
|
428
|
+
accessible: z.boolean().optional().describe("Whether the external record is currently reachable."),
|
|
429
|
+
accessCheckedDate: z.string().optional().describe("When accessibility was last checked (ISO date)."),
|
|
430
|
+
notes: z.string().optional().describe("Free-text context about the cross-reference.")
|
|
431
|
+
}).meta({ id: "ExternalIdentifier" }).describe("A reference to this observation in an external system or archive.");
|
|
432
|
+
var CrossReferencesSchema = z.object({
|
|
433
|
+
primary: ExternalIdentifierSchema.optional(),
|
|
434
|
+
identifiers: z.array(ExternalIdentifierSchema)
|
|
435
|
+
}).meta({ id: "CrossReferences" }).describe("External identifiers cross-referencing this observation, with an optional primary.");
|
|
436
|
+
var WitnessCategorySchema = z.enum([
|
|
437
|
+
"military_pilot",
|
|
438
|
+
"military_aircrew",
|
|
439
|
+
"military_ground",
|
|
440
|
+
"military_naval",
|
|
441
|
+
"military_radar_operator",
|
|
442
|
+
"military_other",
|
|
443
|
+
"commercial_pilot",
|
|
444
|
+
"commercial_aircrew",
|
|
445
|
+
"private_pilot",
|
|
446
|
+
"air_traffic_controller",
|
|
447
|
+
"aviation_other",
|
|
448
|
+
"government_official",
|
|
449
|
+
"elected_official",
|
|
450
|
+
"intelligence_officer",
|
|
451
|
+
"law_enforcement",
|
|
452
|
+
"scientist",
|
|
453
|
+
"astronomer",
|
|
454
|
+
"meteorologist",
|
|
455
|
+
"engineer",
|
|
456
|
+
"medical_professional",
|
|
457
|
+
"maritime",
|
|
458
|
+
"civilian",
|
|
459
|
+
"civilian_group",
|
|
460
|
+
"anonymous",
|
|
461
|
+
"unknown"
|
|
462
|
+
]).describe("Professional/role category of a witness.");
|
|
463
|
+
var ConfidenceLevelSchema = z.enum(["very_high", "high", "moderate", "low", "very_low", "unassessed"]).describe("Qualitative confidence magnitude.");
|
|
464
|
+
ConfidenceLevelSchema.options;
|
|
465
|
+
|
|
466
|
+
// src/extensions/testimony/credibility.ts
|
|
467
|
+
var CredibilityFactorSchema = z.enum([
|
|
468
|
+
"professional_training",
|
|
469
|
+
"official_capacity",
|
|
470
|
+
"sworn_statement",
|
|
471
|
+
"contemporaneous_record",
|
|
472
|
+
"corroborating_witnesses",
|
|
473
|
+
"corroborating_evidence",
|
|
474
|
+
"consistent_account",
|
|
475
|
+
"no_apparent_motive",
|
|
476
|
+
"reputation_risk",
|
|
477
|
+
"security_clearance"
|
|
478
|
+
]).describe("A factor strengthening witness credibility.");
|
|
479
|
+
var CredibilityDetractorSchema = z.enum([
|
|
480
|
+
"anonymous",
|
|
481
|
+
"inconsistent_account",
|
|
482
|
+
"delayed_report",
|
|
483
|
+
"known_fabricator",
|
|
484
|
+
"financial_motive",
|
|
485
|
+
"single_witness",
|
|
486
|
+
"impaired_state",
|
|
487
|
+
"recovered_memory"
|
|
488
|
+
]).describe("A factor weakening witness credibility.");
|
|
489
|
+
var WitnessCredibilitySchema = z.object({
|
|
490
|
+
// The former `CredibilityRating` was byte-identical to the qualitative
|
|
491
|
+
// `ConfidenceLevel`; it is now the single shared scale (DRY #1).
|
|
492
|
+
rating: ConfidenceLevelSchema.optional(),
|
|
493
|
+
factors: z.array(CredibilityFactorSchema).optional(),
|
|
494
|
+
detractors: z.array(CredibilityDetractorSchema).optional(),
|
|
495
|
+
isProfessionalObserver: z.boolean().optional().describe("Whether the witness is a trained observer (pilot, astronomer, military)."),
|
|
496
|
+
hasAviationExperience: z.boolean().optional().describe("Whether the witness has aviation experience."),
|
|
497
|
+
hasMilitaryExperience: z.boolean().optional().describe("Whether the witness has military experience."),
|
|
498
|
+
hasScientificBackground: z.boolean().optional().describe("Whether the witness has a scientific background."),
|
|
499
|
+
hasPriorUAPKnowledge: z.boolean().optional().describe("Whether the witness had prior knowledge of or interest in UAP before the observation."),
|
|
500
|
+
wasSkepticPrior: z.boolean().optional().describe("Whether the witness was a skeptic before the observation."),
|
|
501
|
+
underOathTestimony: z.boolean().optional().describe("Whether the testimony was given under oath."),
|
|
502
|
+
polygraphAdministered: z.boolean().optional().describe("Whether a polygraph was administered."),
|
|
503
|
+
polygraphPassed: z.boolean().optional().describe("Whether the witness passed the polygraph."),
|
|
504
|
+
consistentTestimony: z.boolean().optional().describe("Whether the account has remained consistent across retellings."),
|
|
505
|
+
willingToBeIdentified: z.boolean().optional().describe("Whether the witness is willing to be publicly identified."),
|
|
506
|
+
notes: z.string().optional().describe("Free-text context about the credibility assessment.")
|
|
507
|
+
}).meta({ id: "WitnessCredibility" }).describe("Structured assessment of a witness's credibility (rating, factors, detractors).");
|
|
508
|
+
var SecurityClearanceSchema = z.enum(["none", "confidential", "secret", "top_secret", "sci", "unknown"]).describe("Security clearance level held by a witness.");
|
|
509
|
+
var WitnessSchema = z.object({
|
|
510
|
+
witnessId: z.string().describe("Stable unique identifier for this witness."),
|
|
511
|
+
category: WitnessCategorySchema,
|
|
512
|
+
anonymous: z.boolean().describe("Whether the witness\u2019s identity is withheld."),
|
|
513
|
+
publicName: z.string().optional().describe("Witness\u2019s name as publicly known, when not anonymous."),
|
|
514
|
+
pseudonym: z.string().optional().describe("Pseudonym used when the witness is anonymous."),
|
|
515
|
+
role: z.string().optional().describe('Witness\u2019s role at the time (e.g. "F/A-18F pilot", "radar operator").'),
|
|
516
|
+
organization: z.string().optional().describe("Organization the witness belonged to at the time."),
|
|
517
|
+
experienceYears: z.number().optional().describe("Years of relevant professional experience."),
|
|
518
|
+
securityClearance: SecurityClearanceSchema.optional(),
|
|
519
|
+
credibility: WitnessCredibilitySchema.optional(),
|
|
520
|
+
statementSummary: z.string().optional().describe("Brief summary of what the witness reported."),
|
|
521
|
+
interviewAvailable: z.boolean().optional().describe("Whether a recorded interview with the witness exists."),
|
|
522
|
+
writtenReportAvailable: z.boolean().optional().describe("Whether a written report from the witness exists.")
|
|
523
|
+
}).meta({ id: "Witness" }).describe("A person who reported or corroborated an observation.");
|
|
524
|
+
var SourceTypeSchema = z.enum([
|
|
525
|
+
"foia",
|
|
526
|
+
"official_report",
|
|
527
|
+
"official_statement",
|
|
528
|
+
"congressional_testimony",
|
|
529
|
+
"congressional_report",
|
|
530
|
+
"military_document",
|
|
531
|
+
"intelligence_document",
|
|
532
|
+
"whistleblower",
|
|
533
|
+
"firsthand_witness",
|
|
534
|
+
"secondhand_account",
|
|
535
|
+
"news_article",
|
|
536
|
+
"documentary",
|
|
537
|
+
"interview",
|
|
538
|
+
"book",
|
|
539
|
+
"academic_paper",
|
|
540
|
+
"investigation_report",
|
|
541
|
+
"database_entry",
|
|
542
|
+
"social_media",
|
|
543
|
+
"website",
|
|
544
|
+
"other"
|
|
545
|
+
]).describe("Kind of source backing an observation (document, testimony, media, etc.).");
|
|
546
|
+
var SourceCredibilitySchema = z.enum(["official", "verified", "credible", "unverified", "questionable", "disputed", "unknown"]).describe("Trust tier of a source \u2014 an orthogonal axis to confidence and temporal certainty.");
|
|
547
|
+
|
|
548
|
+
// src/source/reference.ts
|
|
549
|
+
var SourceReferenceSchema = z.object({
|
|
550
|
+
sourceId: z.string().describe("Stable unique identifier for this source."),
|
|
551
|
+
type: SourceTypeSchema,
|
|
552
|
+
title: z.string().describe("Title of the source document, article, or material."),
|
|
553
|
+
author: z.string().optional().describe("Author of the source material."),
|
|
554
|
+
organization: z.string().optional().describe("Organization that produced or published the source."),
|
|
555
|
+
date: z.string().optional().describe("Publication or creation date of the source (ISO date)."),
|
|
556
|
+
url: z.string().optional().describe("Link to the source material."),
|
|
557
|
+
archiveUrl: z.string().optional().describe("Archived copy of the source (e.g. Wayback Machine), in case the original disappears."),
|
|
558
|
+
reference: z.string().optional().describe("Citation locator within the source (e.g. page number, document section)."),
|
|
559
|
+
credibility: SourceCredibilitySchema,
|
|
560
|
+
isPrimarySource: z.boolean().optional().describe("Whether this is a primary source (original document/recording) rather than secondary reporting."),
|
|
561
|
+
classificationLevel: z.string().optional().describe("Government classification of the source, if it was ever classified."),
|
|
562
|
+
notes: z.string().optional().describe("Free-text context about the source.")
|
|
563
|
+
}).meta({ id: "SourceReference" }).describe("A citation/source backing an observation, with its credibility tier.");
|
|
564
|
+
|
|
565
|
+
// src/extensions/testimony/statement.ts
|
|
566
|
+
var TestimonyContextSchema = z.enum([
|
|
567
|
+
"sworn_affidavit",
|
|
568
|
+
"congressional_testimony",
|
|
569
|
+
"deposition",
|
|
570
|
+
"official_interview",
|
|
571
|
+
"written_statement",
|
|
572
|
+
"recorded_interview",
|
|
573
|
+
"informal_account",
|
|
574
|
+
"anonymous_tip",
|
|
575
|
+
"whistleblower_disclosure"
|
|
576
|
+
]).describe("The setting in which testimony was given.");
|
|
577
|
+
var TestimonyDateSchema = z.object({
|
|
578
|
+
date: z.string().describe("When the testimony was given (ISO date)."),
|
|
579
|
+
certainty: TemporalCertaintySchema
|
|
580
|
+
}).meta({ id: "TestimonyDate" }).describe("When testimony was given, with its certainty.");
|
|
581
|
+
var TestimonyStatementSchema = z.object({
|
|
582
|
+
statementId: z.string().describe('Stable id, addressable by a claim `evidenceRef` ("testimony:<statementId>").'),
|
|
583
|
+
witness: WitnessSchema,
|
|
584
|
+
context: TestimonyContextSchema,
|
|
585
|
+
date: TestimonyDateSchema,
|
|
586
|
+
content: z.string().optional().describe("Full text of the statement, when available."),
|
|
587
|
+
summary: z.string().optional().describe("Brief summary of what the statement asserts."),
|
|
588
|
+
sourceDocument: SourceReferenceSchema.optional(),
|
|
589
|
+
chainOfCustody: ChainOfCustodySchema.optional(),
|
|
590
|
+
additionalEvidenceIds: z.array(z.string()).optional().describe("Ids of other evidence items the statement references or supports.")
|
|
591
|
+
}).meta({ id: "TestimonyStatement" }).describe("A single witness statement, its context, and supporting documentation.");
|
|
592
|
+
var EvidenceTypeSchema = z.enum([
|
|
593
|
+
"material_sample",
|
|
594
|
+
"ground_trace",
|
|
595
|
+
"radiation_reading",
|
|
596
|
+
"electromagnetic_recording",
|
|
597
|
+
"photographic",
|
|
598
|
+
"video",
|
|
599
|
+
"audio_recording",
|
|
600
|
+
"biological_sample",
|
|
601
|
+
"implant",
|
|
602
|
+
"debris",
|
|
603
|
+
"soil_sample",
|
|
604
|
+
"water_sample",
|
|
605
|
+
"vegetation_sample",
|
|
606
|
+
"impression",
|
|
607
|
+
"burn_mark",
|
|
608
|
+
"other"
|
|
609
|
+
]).describe("Kind of physical evidence collected.");
|
|
610
|
+
var EvidenceQualitySchema = z.enum(["laboratory_grade", "field_collected", "uncontrolled", "degraded", "contaminated", "unknown"]).describe("Collection/handling quality of a physical evidence item.");
|
|
611
|
+
var PhysicalEvidenceItemSchema = z.object({
|
|
612
|
+
id: z.string().describe('Stable id, addressable by a claim `evidenceRef` ("physical:<id>").'),
|
|
613
|
+
type: EvidenceTypeSchema,
|
|
614
|
+
quality: EvidenceQualitySchema,
|
|
615
|
+
description: z.string().optional().describe("What the evidence item is and what makes it notable."),
|
|
616
|
+
collectionDate: z.string().optional().describe("When the evidence was collected (ISO date)."),
|
|
617
|
+
collectionMethod: z.string().optional().describe('How the evidence was collected (e.g. "sterile swab", "soil core sample").'),
|
|
618
|
+
collectorName: z.string().optional().describe("Person who collected the evidence."),
|
|
619
|
+
collectorOrganization: z.string().optional().describe("Organization the collector represents."),
|
|
620
|
+
storageLocation: z.string().optional().describe("Where the evidence is currently stored."),
|
|
621
|
+
chainOfCustody: ChainOfCustodySchema.optional(),
|
|
622
|
+
analysisPerformed: z.array(z.string()).optional().describe('Analyses run on the evidence (e.g. "isotopic analysis", "spectroscopy").'),
|
|
623
|
+
analysisResults: z.string().optional().describe("Summary of what the analyses found."),
|
|
624
|
+
photographed: z.boolean().optional().describe("Whether the evidence was photographed in situ or in the lab."),
|
|
625
|
+
labReport: z.boolean().optional().describe("Whether a formal laboratory report exists."),
|
|
626
|
+
notes: z.string().optional().describe("Free-text context about the evidence item.")
|
|
627
|
+
}).meta({ id: "PhysicalEvidenceItem" }).describe("A physical artifact associated with an observation and its handling record.");
|
|
628
|
+
var DocumentTypeSchema = z.enum([
|
|
629
|
+
"foia_release",
|
|
630
|
+
"official_report",
|
|
631
|
+
"congressional_record",
|
|
632
|
+
"military_memo",
|
|
633
|
+
"intelligence_assessment",
|
|
634
|
+
"inspector_general",
|
|
635
|
+
"presidential_directive",
|
|
636
|
+
"executive_order",
|
|
637
|
+
"declassified_cable",
|
|
638
|
+
"investigation_file",
|
|
639
|
+
"other"
|
|
640
|
+
]).describe("Kind of government/official document.");
|
|
641
|
+
var DocumentMetadataSchema = z.object({
|
|
642
|
+
documentType: DocumentTypeSchema,
|
|
643
|
+
classificationLevel: z.string().optional().describe('Current classification of the document (e.g. "UNCLASSIFIED", "SECRET//NOFORN").'),
|
|
644
|
+
originatingAgency: z.string().optional().describe("Agency that produced the document."),
|
|
645
|
+
controlNumbers: z.array(z.string()).optional().describe("Agency control or tracking numbers stamped on the document."),
|
|
646
|
+
foiaRequestNumber: z.string().optional().describe("FOIA request number that produced the document."),
|
|
647
|
+
declassificationDate: z.string().optional().describe("When the document was declassified (ISO date)."),
|
|
648
|
+
originalClassification: z.string().optional().describe("Classification the document carried when created."),
|
|
649
|
+
pageCount: z.number().optional().describe("Number of pages in the document."),
|
|
650
|
+
redactionLevel: z.enum(["none", "partial", "heavy", "unknown"]).optional().describe("How much of the document is redacted.")
|
|
651
|
+
}).meta({ id: "DocumentMetadata" }).describe("Provenance metadata for a source document (classification, agency, redaction).");
|
|
652
|
+
var ObjectShapeSchema = z.enum([
|
|
653
|
+
"sphere",
|
|
654
|
+
"orb",
|
|
655
|
+
"disc",
|
|
656
|
+
"saucer",
|
|
657
|
+
"oval",
|
|
658
|
+
"egg",
|
|
659
|
+
"cylinder",
|
|
660
|
+
"cigar",
|
|
661
|
+
"tic_tac",
|
|
662
|
+
"triangle",
|
|
663
|
+
"delta",
|
|
664
|
+
"boomerang",
|
|
665
|
+
"chevron",
|
|
666
|
+
"diamond",
|
|
667
|
+
"rectangle",
|
|
668
|
+
"square",
|
|
669
|
+
"cube",
|
|
670
|
+
"cross",
|
|
671
|
+
"star",
|
|
672
|
+
"amorphous",
|
|
673
|
+
"changing",
|
|
674
|
+
"light_only",
|
|
675
|
+
"other",
|
|
676
|
+
"unknown"
|
|
677
|
+
]).describe("Reported shape of the observed object.");
|
|
678
|
+
var ObjectCharacteristicsSchema = z.object({
|
|
679
|
+
shape: ObjectShapeSchema.optional(),
|
|
680
|
+
size: z.string().optional().describe('Apparent size as reported (e.g. "size of a commercial airliner").'),
|
|
681
|
+
sizeMeters: z.number().optional().describe("Estimated size of the object, in meters."),
|
|
682
|
+
color: z.string().optional().describe("Primary color of the object as reported."),
|
|
683
|
+
secondaryColors: z.array(z.string()).optional().describe("Additional colors observed on the object."),
|
|
684
|
+
luminosity: z.string().optional().describe('Light emission as reported (e.g. "glowing white", "self-luminous", "no lights").'),
|
|
685
|
+
sound: z.string().optional().describe('Whether and what sound the object produced (e.g. "silent", "humming").'),
|
|
686
|
+
soundDescription: z.string().optional().describe("Fuller free-text description of any sound."),
|
|
687
|
+
surfaceDetails: z.string().optional().describe('Visible surface features (e.g. "metallic, seamless, no rivets or seams").'),
|
|
688
|
+
numberObserved: z.number().optional().describe("How many objects were observed."),
|
|
689
|
+
formation: z.string().optional().describe('Geometric arrangement when multiple objects were observed (e.g. "triangular formation").'),
|
|
690
|
+
structuralFeatures: z.array(z.string()).optional().describe('Distinct structural elements reported (e.g. "dome", "portholes", "appendages").')
|
|
691
|
+
}).meta({ id: "ObjectCharacteristics" }).describe("Physical description of the observed object(s).");
|
|
692
|
+
var ManeuverTypeSchema = z.enum([
|
|
693
|
+
"hover",
|
|
694
|
+
"instant_acceleration",
|
|
695
|
+
"instant_stop",
|
|
696
|
+
"right_angle_turn",
|
|
697
|
+
"zigzag",
|
|
698
|
+
"pendulum",
|
|
699
|
+
"split",
|
|
700
|
+
"merge",
|
|
701
|
+
"disappear",
|
|
702
|
+
"appear",
|
|
703
|
+
"transmedium_entry",
|
|
704
|
+
"transmedium_exit",
|
|
705
|
+
"vertical_ascent",
|
|
706
|
+
"vertical_descent",
|
|
707
|
+
"rotation",
|
|
708
|
+
"wobble",
|
|
709
|
+
"other"
|
|
710
|
+
]).describe("A distinctive movement/maneuver exhibited by the object.");
|
|
711
|
+
var MovementSchema = z.object({
|
|
712
|
+
speed: z.string().optional().describe('Speed as reported (e.g. "faster than any known aircraft").'),
|
|
713
|
+
speedKmh: z.number().optional().describe("Estimated speed, in kilometers per hour."),
|
|
714
|
+
altitude: z.string().optional().describe('Altitude as reported (e.g. "treetop level", "very high").'),
|
|
715
|
+
altitudeMeters: z.number().optional().describe("Estimated altitude of the object, in meters."),
|
|
716
|
+
heading: z.number().optional().describe("Direction of travel, in compass degrees (0\u2013360)."),
|
|
717
|
+
flightPath: z.string().optional().describe('Narrative of the object\u2019s path through the encounter (e.g. "descended from 80,000 ft to sea level").'),
|
|
718
|
+
maneuvers: z.array(ManeuverTypeSchema).optional().describe("Distinctive maneuvers exhibited, from the typed vocabulary."),
|
|
719
|
+
maneuverDescriptions: z.array(z.string()).optional().describe("Free-text descriptions elaborating on the typed maneuvers."),
|
|
720
|
+
radarData: z.boolean().optional().describe("Whether the movement was tracked on radar."),
|
|
721
|
+
infraredSignature: z.boolean().optional().describe("Whether the object showed an infrared signature."),
|
|
722
|
+
trajectory: z.string().optional().describe('Overall trajectory summary (e.g. "erratic", "straight and level").')
|
|
723
|
+
}).meta({ id: "Movement" }).describe("How the object moved \u2014 kinematics and notable maneuvers.");
|
|
724
|
+
var InvestigationSchema = z.object({
|
|
725
|
+
investigatingBody: z.string().optional().describe('Primary organization that investigated (e.g. "AARO", "Project Blue Book").'),
|
|
726
|
+
investigatingBodies: z.array(z.string()).optional().describe("All organizations that investigated, when more than one."),
|
|
727
|
+
caseNumber: z.string().optional().describe("Case or file number assigned by the investigating body."),
|
|
728
|
+
investigationDate: z.string().optional().describe("When the investigation was conducted (ISO date)."),
|
|
729
|
+
conclusion: z.string().optional().describe('Official conclusion reached (e.g. "unidentified", "weather balloon").'),
|
|
730
|
+
confidence: ConfidenceLevelSchema.optional(),
|
|
731
|
+
methodologies: z.array(z.string()).optional().describe('Methods used (e.g. "witness interviews", "radar data analysis").'),
|
|
732
|
+
findings: z.string().optional().describe("Summary of what the investigation found."),
|
|
733
|
+
recommendations: z.string().optional().describe("Recommendations issued by the investigation.")
|
|
734
|
+
}).meta({ id: "Investigation" }).describe("Official/independent investigation of the observation.");
|
|
735
|
+
var WitnessesSchema = z.object({
|
|
736
|
+
count: z.number().optional().describe("Total number of witnesses."),
|
|
737
|
+
categories: z.array(z.string()).optional().describe('Kinds of witnesses present (e.g. "military pilots", "radar operators", "civilians").'),
|
|
738
|
+
militaryWitnesses: z.boolean().optional().describe("Whether any witnesses were military personnel."),
|
|
739
|
+
aviationWitnesses: z.boolean().optional().describe("Whether any witnesses were pilots or aviation professionals."),
|
|
740
|
+
multipleIndependent: z.boolean().optional().describe("Whether independent witnesses observed from separate vantage points."),
|
|
741
|
+
professionalObservers: z.boolean().optional().describe("Whether any witnesses were trained observers (pilots, astronomers, military)."),
|
|
742
|
+
descriptions: z.array(z.string()).optional().describe("Brief summaries of individual witness accounts.")
|
|
743
|
+
}).meta({ id: "Witnesses" }).describe("Aggregate summary of who witnessed the observation.");
|
|
744
|
+
var ResponseImpactSchema = z.object({
|
|
745
|
+
officialResponse: z.string().optional().describe("How officials responded (statements, denials, acknowledgments)."),
|
|
746
|
+
mediaAttention: z.boolean().optional().describe("Whether the observation received media coverage."),
|
|
747
|
+
publicImpact: z.string().optional().describe("Effect on public awareness or discourse."),
|
|
748
|
+
policyImpact: z.string().optional().describe("Policy consequences (e.g. hearings, legislation, reporting-process changes)."),
|
|
749
|
+
militaryResponse: z.string().optional().describe("Military actions taken (e.g. intercept scrambled, alert status changed)."),
|
|
750
|
+
coverUpAlleged: z.boolean().optional().describe("Whether suppression or concealment of the event has been alleged.")
|
|
751
|
+
}).meta({ id: "ResponseImpact" }).describe("Official, media, and public response to the observation.");
|
|
752
|
+
var EnvironmentSchema = z.object({
|
|
753
|
+
weather: z.string().optional().describe('General weather conditions (e.g. "clear", "overcast").'),
|
|
754
|
+
visibility: z.string().optional().describe('Visibility conditions (e.g. "unlimited", "10 miles", "hazy").'),
|
|
755
|
+
cloudCover: z.string().optional().describe('Cloud cover description (e.g. "scattered at 5,000 ft").'),
|
|
756
|
+
windSpeed: z.string().optional().describe("Wind conditions as reported."),
|
|
757
|
+
temperature: z.number().optional().describe("Air temperature, in degrees Celsius."),
|
|
758
|
+
humidity: z.number().optional().describe("Relative humidity, as a percentage (0\u2013100)."),
|
|
759
|
+
celestialConditions: z.string().optional().describe("Sky conditions relevant to identification (e.g. visible planets, meteor showers, satellites)."),
|
|
760
|
+
moonPhase: z.string().optional().describe("Moon phase description at the time of observation."),
|
|
761
|
+
precipitation: z.string().optional().describe("Precipitation at the time of observation, if any.")
|
|
762
|
+
}).meta({ id: "Environment" }).describe("Environmental and weather conditions at the time of observation.");
|
|
763
|
+
var RelationKindSchema = z.enum([
|
|
764
|
+
"corroborates",
|
|
765
|
+
"contradicts",
|
|
766
|
+
"duplicate_of",
|
|
767
|
+
"same_object",
|
|
768
|
+
"supersedes",
|
|
769
|
+
"superseded_by",
|
|
770
|
+
"re_analysis_of",
|
|
771
|
+
"part_of"
|
|
772
|
+
]).describe("How one observation relates to another (typed edge vocabulary).");
|
|
773
|
+
var RelationEdgeSchema = z.object({
|
|
774
|
+
kind: RelationKindSchema,
|
|
775
|
+
targetId: z.string().min(1).describe("The `Observation.id` this edge points at."),
|
|
776
|
+
note: z.string().optional().describe("Free-text context for why the link exists.")
|
|
777
|
+
}).meta({ id: "RelationEdge" }).describe("A typed link from this observation to another.");
|
|
778
|
+
var RelationsSchema = z.object({
|
|
779
|
+
/** Typed edges to other observations — the standardized way to link records. */
|
|
780
|
+
edges: z.array(RelationEdgeSchema).optional().describe("Typed edges to other observations \u2014 the standardized way to link records."),
|
|
781
|
+
/** Named grouping into a flap (a localized cluster of sightings). */
|
|
782
|
+
flap: z.string().optional().describe("Named grouping into a flap (a localized cluster of sightings)."),
|
|
783
|
+
/** Named grouping into a wave (a broad temporal surge of sightings). */
|
|
784
|
+
wave: z.string().optional().describe("Named grouping into a wave (a broad temporal surge of sightings)."),
|
|
785
|
+
/** Named grouping into an ad-hoc cluster. */
|
|
786
|
+
cluster: z.string().optional().describe("Named grouping into an ad-hoc cluster."),
|
|
787
|
+
/** @deprecated Use typed `edges` with `kind: 'corroborates' | 'same_object' | …`. */
|
|
788
|
+
relatedObservationIds: z.array(z.string()).optional().describe('Deprecated \u2014 use typed `edges` with `kind: "corroborates" | "same_object" | \u2026`.'),
|
|
789
|
+
/** @deprecated Use typed `edges` with `kind: 'supersedes' | 're_analysis_of' | …`. */
|
|
790
|
+
precedingEvents: z.array(z.string()).optional().describe('Deprecated \u2014 use typed `edges` with `kind: "supersedes" | "re_analysis_of" | \u2026`.'),
|
|
791
|
+
/** @deprecated Use typed `edges`. */
|
|
792
|
+
followingEvents: z.array(z.string()).optional().describe("Deprecated \u2014 use typed `edges`.")
|
|
793
|
+
}).meta({ id: "Relations" }).describe("Typed links to related observations, plus flap/wave/cluster groupings.");
|
|
794
|
+
var AviationSchema = z.object({
|
|
795
|
+
aircraftType: z.string().optional().describe('Type of aircraft involved (e.g. "F/A-18F Super Hornet").'),
|
|
796
|
+
aircraftDesignation: z.string().optional().describe("Military designation or tail number of the aircraft."),
|
|
797
|
+
squadron: z.string().optional().describe("Squadron or unit the aircraft belonged to."),
|
|
798
|
+
flightMission: z.string().optional().describe('Mission being flown at the time (e.g. "training exercise", "combat air patrol").'),
|
|
799
|
+
altitude: z.number().optional().describe("Aircraft altitude during the encounter, in meters."),
|
|
800
|
+
speed: z.number().optional().describe("Aircraft speed during the encounter, in kilometers per hour."),
|
|
801
|
+
heading: z.number().optional().describe("Aircraft heading during the encounter, in compass degrees (0\u2013360)."),
|
|
802
|
+
radarContact: z.boolean().optional().describe("Whether the aircraft\u2019s radar held contact with the object."),
|
|
803
|
+
weaponsSystemEngaged: z.boolean().optional().describe("Whether a weapons system locked onto or tracked the object."),
|
|
804
|
+
interceptAttempted: z.boolean().optional().describe("Whether an intercept of the object was attempted.")
|
|
805
|
+
}).meta({ id: "Aviation" }).describe("Aviation context when the observation involved aircraft.");
|
|
806
|
+
var SourceDataSchema = z.object({
|
|
807
|
+
primarySource: SourceReferenceSchema.optional(),
|
|
808
|
+
sources: z.array(SourceReferenceSchema).optional(),
|
|
809
|
+
originalClassification: z.string().optional().describe('Original government classification of the source material (e.g. "SECRET").'),
|
|
810
|
+
declassificationDate: z.string().optional().describe("When the source material was declassified (ISO date)."),
|
|
811
|
+
foiaRequestId: z.string().optional().describe("FOIA request number that produced the source material."),
|
|
812
|
+
archiveLocation: z.string().optional().describe("Physical or digital archive where the source material resides.")
|
|
813
|
+
}).meta({ id: "SourceData" }).describe(
|
|
814
|
+
"Where the observation data came from. Forensic custody/authenticity now lives in the optional `Observation.provenance` slot (@disclosureos/records/extensions/provenance)."
|
|
815
|
+
);
|
|
816
|
+
|
|
817
|
+
// src/observation/types.ts
|
|
818
|
+
var PublicationStatusSchema = z.enum(["draft", "review", "published", "archived", "retracted"]).describe("Lifecycle/publication state of an observation record.");
|
|
819
|
+
var ObservationSchema = z.object({
|
|
820
|
+
// === REQUIRED ===
|
|
821
|
+
id: z.string().min(1).describe("Stable unique identifier for this observation."),
|
|
822
|
+
temporal: TemporalDataSchema,
|
|
823
|
+
location: LocationDataSchema,
|
|
824
|
+
status: PublicationStatusSchema,
|
|
825
|
+
createdAt: z.string().describe("ISO timestamp when the record was created."),
|
|
826
|
+
updatedAt: z.string().describe("ISO timestamp when the record was last updated."),
|
|
827
|
+
// === DESCRIPTIVE ===
|
|
828
|
+
summary: z.string().optional().describe("One-or-two sentence summary of the observation."),
|
|
829
|
+
description: z.string().optional().describe("Full narrative account of the observation."),
|
|
830
|
+
objectCharacteristics: ObjectCharacteristicsSchema.optional(),
|
|
831
|
+
eventType: z.string().optional().describe(
|
|
832
|
+
'Local event-type tag (e.g. "multi-sensor military encounter"). The word "classification" is reserved for the origin taxonomy in @disclosureos/origins; this is just a free-text descriptor.'
|
|
833
|
+
),
|
|
834
|
+
sourceData: SourceDataSchema.optional(),
|
|
835
|
+
investigation: InvestigationSchema.optional(),
|
|
836
|
+
// === DETAILED ===
|
|
837
|
+
movement: MovementSchema.optional(),
|
|
838
|
+
witnesses: WitnessesSchema.optional(),
|
|
839
|
+
sensorEvidence: SensorEvidenceDataSchema.optional(),
|
|
840
|
+
responseImpact: ResponseImpactSchema.optional(),
|
|
841
|
+
environment: EnvironmentSchema.optional(),
|
|
842
|
+
relations: RelationsSchema.optional(),
|
|
843
|
+
aviation: AviationSchema.optional(),
|
|
844
|
+
// === MEDIA ===
|
|
845
|
+
media: z.array(MediaAttachmentSchema).optional(),
|
|
846
|
+
featuredMedia: MediaAttachmentSchema.optional(),
|
|
847
|
+
// === RECORDS-OWNED EXTENSION SLOTS ===
|
|
848
|
+
// Optional, off-the-hot-path forensic/clerical surfaces. Their schemas live
|
|
849
|
+
// under @disclosureos/records/extensions/* (subpath-only) and attach here as
|
|
850
|
+
// plain optional fields (cross-package slots use module augmentation instead).
|
|
851
|
+
provenance: ProvenanceSchema.optional(),
|
|
852
|
+
identifiers: CrossReferencesSchema.optional(),
|
|
853
|
+
testimony: z.array(TestimonyStatementSchema).optional(),
|
|
854
|
+
physicalEvidence: z.array(PhysicalEvidenceItemSchema).optional(),
|
|
855
|
+
documents: z.array(DocumentMetadataSchema).optional(),
|
|
856
|
+
// === METADATA ===
|
|
857
|
+
dataSourceId: z.string().optional().describe("Identifier of the dataset or pipeline this record came from."),
|
|
858
|
+
schemaVersion: z.string().optional().describe("Version of the records schema this record was authored against."),
|
|
859
|
+
extensions: z.record(z.string(), z.unknown()).optional().describe("Third-party extension bag for slots not owned by a first-party package."),
|
|
860
|
+
internalNotes: z.string().optional().describe("Private working notes for maintainers \u2014 not part of the public record.")
|
|
861
|
+
}).meta({ id: "Observation" }).describe("A single UAP observation record \u2014 the core unit of the DisclosureOS lexicon.");
|
|
862
|
+
|
|
863
|
+
export { AviationSchema, DetectionMethodSchema, EnvironmentSchema, InvestigationSchema, ManeuverTypeSchema, MovementSchema, ObjectCharacteristicsSchema, ObjectShapeSchema, ObservationSchema, PublicationStatusSchema, RelationEdgeSchema, RelationKindSchema, RelationsSchema, ResponseImpactSchema, SensorEvidenceDataSchema, SensorReadingSchema, SensorTypeSchema, SourceDataSchema, WitnessesSchema };
|
|
864
|
+
//# sourceMappingURL=index.js.map
|
|
865
|
+
//# sourceMappingURL=index.js.map
|