@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.
Files changed (75) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/LICENSE +21 -0
  3. package/README.md +121 -0
  4. package/dist/attachment-Hrg8uHuf.d.ts +23 -0
  5. package/dist/confidence-level-CV3P1W5_.d.ts +25 -0
  6. package/dist/constants/index.d.ts +28 -0
  7. package/dist/constants/index.js +885 -0
  8. package/dist/constants/index.js.map +1 -0
  9. package/dist/credibility-CcQ0MUfQ.d.ts +14 -0
  10. package/dist/digital-ADBJTqSi.d.ts +278 -0
  11. package/dist/domains-CjIFZGBh.d.ts +330 -0
  12. package/dist/enum-guard-DzPkp2oJ.d.ts +101 -0
  13. package/dist/extensions/document/index.d.ts +47 -0
  14. package/dist/extensions/document/index.js +31 -0
  15. package/dist/extensions/document/index.js.map +1 -0
  16. package/dist/extensions/identifiers/index.d.ts +139 -0
  17. package/dist/extensions/identifiers/index.js +47 -0
  18. package/dist/extensions/identifiers/index.js.map +1 -0
  19. package/dist/extensions/physical/index.d.ts +84 -0
  20. package/dist/extensions/physical/index.js +84 -0
  21. package/dist/extensions/physical/index.js.map +1 -0
  22. package/dist/extensions/provenance/index.d.ts +153 -0
  23. package/dist/extensions/provenance/index.js +120 -0
  24. package/dist/extensions/provenance/index.js.map +1 -0
  25. package/dist/extensions/testimony/index.d.ts +400 -0
  26. package/dist/extensions/testimony/index.js +203 -0
  27. package/dist/extensions/testimony/index.js.map +1 -0
  28. package/dist/factories/index.d.ts +31 -0
  29. package/dist/factories/index.js +905 -0
  30. package/dist/factories/index.js.map +1 -0
  31. package/dist/formatters/index.d.ts +18 -0
  32. package/dist/formatters/index.js +156 -0
  33. package/dist/formatters/index.js.map +1 -0
  34. package/dist/geo/index.d.ts +16 -0
  35. package/dist/geo/index.js +146 -0
  36. package/dist/geo/index.js.map +1 -0
  37. package/dist/guards/index.d.ts +74 -0
  38. package/dist/guards/index.js +892 -0
  39. package/dist/guards/index.js.map +1 -0
  40. package/dist/index.d.ts +42 -0
  41. package/dist/index.js +1350 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/labels/index.d.ts +33 -0
  44. package/dist/labels/index.js +181 -0
  45. package/dist/labels/index.js.map +1 -0
  46. package/dist/location-56xtMNtC.d.ts +408 -0
  47. package/dist/media/index.d.ts +3 -0
  48. package/dist/media/index.js +21 -0
  49. package/dist/media/index.js.map +1 -0
  50. package/dist/observation/index.d.ts +7 -0
  51. package/dist/observation/index.js +865 -0
  52. package/dist/observation/index.js.map +1 -0
  53. package/dist/shared/index.d.ts +29 -0
  54. package/dist/shared/index.js +87 -0
  55. package/dist/shared/index.js.map +1 -0
  56. package/dist/source/index.d.ts +51 -0
  57. package/dist/source/index.js +45 -0
  58. package/dist/source/index.js.map +1 -0
  59. package/dist/source/sensor/index.d.ts +170 -0
  60. package/dist/source/sensor/index.js +69 -0
  61. package/dist/source/sensor/index.js.map +1 -0
  62. package/dist/temporal/index.d.ts +20 -0
  63. package/dist/temporal/index.js +78 -0
  64. package/dist/temporal/index.js.map +1 -0
  65. package/dist/temporal-data-t8Mzu8Ui.d.ts +148 -0
  66. package/dist/time-of-day-DLDBwTrn.d.ts +165 -0
  67. package/dist/types-CzNfaip-.d.ts +1267 -0
  68. package/dist/types-DH_-SdHj.d.ts +11 -0
  69. package/dist/types-clxXEQOH.d.ts +27 -0
  70. package/dist/validation-C-_QLXXf.d.ts +34 -0
  71. package/dist/validators/index.d.ts +15 -0
  72. package/dist/validators/index.js +895 -0
  73. package/dist/validators/index.js.map +1 -0
  74. package/package.json +146 -0
  75. package/schema/records.schema.json +2538 -0
@@ -0,0 +1,330 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const ObjectShapeSchema: z.ZodEnum<{
4
+ unknown: "unknown";
5
+ other: "other";
6
+ sphere: "sphere";
7
+ orb: "orb";
8
+ disc: "disc";
9
+ saucer: "saucer";
10
+ oval: "oval";
11
+ egg: "egg";
12
+ cylinder: "cylinder";
13
+ cigar: "cigar";
14
+ tic_tac: "tic_tac";
15
+ triangle: "triangle";
16
+ delta: "delta";
17
+ boomerang: "boomerang";
18
+ chevron: "chevron";
19
+ diamond: "diamond";
20
+ rectangle: "rectangle";
21
+ square: "square";
22
+ cube: "cube";
23
+ cross: "cross";
24
+ star: "star";
25
+ amorphous: "amorphous";
26
+ changing: "changing";
27
+ light_only: "light_only";
28
+ }>;
29
+ type ObjectShape = z.infer<typeof ObjectShapeSchema>;
30
+ declare const ObjectCharacteristicsSchema: z.ZodObject<{
31
+ shape: z.ZodOptional<z.ZodEnum<{
32
+ unknown: "unknown";
33
+ other: "other";
34
+ sphere: "sphere";
35
+ orb: "orb";
36
+ disc: "disc";
37
+ saucer: "saucer";
38
+ oval: "oval";
39
+ egg: "egg";
40
+ cylinder: "cylinder";
41
+ cigar: "cigar";
42
+ tic_tac: "tic_tac";
43
+ triangle: "triangle";
44
+ delta: "delta";
45
+ boomerang: "boomerang";
46
+ chevron: "chevron";
47
+ diamond: "diamond";
48
+ rectangle: "rectangle";
49
+ square: "square";
50
+ cube: "cube";
51
+ cross: "cross";
52
+ star: "star";
53
+ amorphous: "amorphous";
54
+ changing: "changing";
55
+ light_only: "light_only";
56
+ }>>;
57
+ size: z.ZodOptional<z.ZodString>;
58
+ sizeMeters: z.ZodOptional<z.ZodNumber>;
59
+ color: z.ZodOptional<z.ZodString>;
60
+ secondaryColors: z.ZodOptional<z.ZodArray<z.ZodString>>;
61
+ luminosity: z.ZodOptional<z.ZodString>;
62
+ sound: z.ZodOptional<z.ZodString>;
63
+ soundDescription: z.ZodOptional<z.ZodString>;
64
+ surfaceDetails: z.ZodOptional<z.ZodString>;
65
+ numberObserved: z.ZodOptional<z.ZodNumber>;
66
+ formation: z.ZodOptional<z.ZodString>;
67
+ structuralFeatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
68
+ }, z.core.$strip>;
69
+ type ObjectCharacteristics = z.infer<typeof ObjectCharacteristicsSchema>;
70
+ declare const ManeuverTypeSchema: z.ZodEnum<{
71
+ other: "other";
72
+ hover: "hover";
73
+ instant_acceleration: "instant_acceleration";
74
+ instant_stop: "instant_stop";
75
+ right_angle_turn: "right_angle_turn";
76
+ zigzag: "zigzag";
77
+ pendulum: "pendulum";
78
+ split: "split";
79
+ merge: "merge";
80
+ disappear: "disappear";
81
+ appear: "appear";
82
+ transmedium_entry: "transmedium_entry";
83
+ transmedium_exit: "transmedium_exit";
84
+ vertical_ascent: "vertical_ascent";
85
+ vertical_descent: "vertical_descent";
86
+ rotation: "rotation";
87
+ wobble: "wobble";
88
+ }>;
89
+ type ManeuverType = z.infer<typeof ManeuverTypeSchema>;
90
+ declare const MovementSchema: z.ZodObject<{
91
+ speed: z.ZodOptional<z.ZodString>;
92
+ speedKmh: z.ZodOptional<z.ZodNumber>;
93
+ altitude: z.ZodOptional<z.ZodString>;
94
+ altitudeMeters: z.ZodOptional<z.ZodNumber>;
95
+ heading: z.ZodOptional<z.ZodNumber>;
96
+ flightPath: z.ZodOptional<z.ZodString>;
97
+ maneuvers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
98
+ other: "other";
99
+ hover: "hover";
100
+ instant_acceleration: "instant_acceleration";
101
+ instant_stop: "instant_stop";
102
+ right_angle_turn: "right_angle_turn";
103
+ zigzag: "zigzag";
104
+ pendulum: "pendulum";
105
+ split: "split";
106
+ merge: "merge";
107
+ disappear: "disappear";
108
+ appear: "appear";
109
+ transmedium_entry: "transmedium_entry";
110
+ transmedium_exit: "transmedium_exit";
111
+ vertical_ascent: "vertical_ascent";
112
+ vertical_descent: "vertical_descent";
113
+ rotation: "rotation";
114
+ wobble: "wobble";
115
+ }>>>;
116
+ maneuverDescriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
117
+ radarData: z.ZodOptional<z.ZodBoolean>;
118
+ infraredSignature: z.ZodOptional<z.ZodBoolean>;
119
+ trajectory: z.ZodOptional<z.ZodString>;
120
+ }, z.core.$strip>;
121
+ type Movement = z.infer<typeof MovementSchema>;
122
+ declare const InvestigationSchema: z.ZodObject<{
123
+ investigatingBody: z.ZodOptional<z.ZodString>;
124
+ investigatingBodies: z.ZodOptional<z.ZodArray<z.ZodString>>;
125
+ caseNumber: z.ZodOptional<z.ZodString>;
126
+ investigationDate: z.ZodOptional<z.ZodString>;
127
+ conclusion: z.ZodOptional<z.ZodString>;
128
+ confidence: z.ZodOptional<z.ZodEnum<{
129
+ high: "high";
130
+ moderate: "moderate";
131
+ low: "low";
132
+ unassessed: "unassessed";
133
+ very_high: "very_high";
134
+ very_low: "very_low";
135
+ }>>;
136
+ methodologies: z.ZodOptional<z.ZodArray<z.ZodString>>;
137
+ findings: z.ZodOptional<z.ZodString>;
138
+ recommendations: z.ZodOptional<z.ZodString>;
139
+ }, z.core.$strip>;
140
+ type Investigation = z.infer<typeof InvestigationSchema>;
141
+ declare const WitnessesSchema: z.ZodObject<{
142
+ count: z.ZodOptional<z.ZodNumber>;
143
+ categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
144
+ militaryWitnesses: z.ZodOptional<z.ZodBoolean>;
145
+ aviationWitnesses: z.ZodOptional<z.ZodBoolean>;
146
+ multipleIndependent: z.ZodOptional<z.ZodBoolean>;
147
+ professionalObservers: z.ZodOptional<z.ZodBoolean>;
148
+ descriptions: z.ZodOptional<z.ZodArray<z.ZodString>>;
149
+ }, z.core.$strip>;
150
+ type Witnesses = z.infer<typeof WitnessesSchema>;
151
+ declare const ResponseImpactSchema: z.ZodObject<{
152
+ officialResponse: z.ZodOptional<z.ZodString>;
153
+ mediaAttention: z.ZodOptional<z.ZodBoolean>;
154
+ publicImpact: z.ZodOptional<z.ZodString>;
155
+ policyImpact: z.ZodOptional<z.ZodString>;
156
+ militaryResponse: z.ZodOptional<z.ZodString>;
157
+ coverUpAlleged: z.ZodOptional<z.ZodBoolean>;
158
+ }, z.core.$strip>;
159
+ type ResponseImpact = z.infer<typeof ResponseImpactSchema>;
160
+ declare const EnvironmentSchema: z.ZodObject<{
161
+ weather: z.ZodOptional<z.ZodString>;
162
+ visibility: z.ZodOptional<z.ZodString>;
163
+ cloudCover: z.ZodOptional<z.ZodString>;
164
+ windSpeed: z.ZodOptional<z.ZodString>;
165
+ temperature: z.ZodOptional<z.ZodNumber>;
166
+ humidity: z.ZodOptional<z.ZodNumber>;
167
+ celestialConditions: z.ZodOptional<z.ZodString>;
168
+ moonPhase: z.ZodOptional<z.ZodString>;
169
+ precipitation: z.ZodOptional<z.ZodString>;
170
+ }, z.core.$strip>;
171
+ type Environment = z.infer<typeof EnvironmentSchema>;
172
+ declare const RelationKindSchema: z.ZodEnum<{
173
+ corroborates: "corroborates";
174
+ contradicts: "contradicts";
175
+ duplicate_of: "duplicate_of";
176
+ same_object: "same_object";
177
+ supersedes: "supersedes";
178
+ superseded_by: "superseded_by";
179
+ re_analysis_of: "re_analysis_of";
180
+ part_of: "part_of";
181
+ }>;
182
+ type RelationKind = z.infer<typeof RelationKindSchema>;
183
+ declare const RelationEdgeSchema: z.ZodObject<{
184
+ kind: z.ZodEnum<{
185
+ corroborates: "corroborates";
186
+ contradicts: "contradicts";
187
+ duplicate_of: "duplicate_of";
188
+ same_object: "same_object";
189
+ supersedes: "supersedes";
190
+ superseded_by: "superseded_by";
191
+ re_analysis_of: "re_analysis_of";
192
+ part_of: "part_of";
193
+ }>;
194
+ targetId: z.ZodString;
195
+ note: z.ZodOptional<z.ZodString>;
196
+ }, z.core.$strip>;
197
+ type RelationEdge = z.infer<typeof RelationEdgeSchema>;
198
+ declare const RelationsSchema: z.ZodObject<{
199
+ edges: z.ZodOptional<z.ZodArray<z.ZodObject<{
200
+ kind: z.ZodEnum<{
201
+ corroborates: "corroborates";
202
+ contradicts: "contradicts";
203
+ duplicate_of: "duplicate_of";
204
+ same_object: "same_object";
205
+ supersedes: "supersedes";
206
+ superseded_by: "superseded_by";
207
+ re_analysis_of: "re_analysis_of";
208
+ part_of: "part_of";
209
+ }>;
210
+ targetId: z.ZodString;
211
+ note: z.ZodOptional<z.ZodString>;
212
+ }, z.core.$strip>>>;
213
+ flap: z.ZodOptional<z.ZodString>;
214
+ wave: z.ZodOptional<z.ZodString>;
215
+ cluster: z.ZodOptional<z.ZodString>;
216
+ relatedObservationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
217
+ precedingEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
218
+ followingEvents: z.ZodOptional<z.ZodArray<z.ZodString>>;
219
+ }, z.core.$strip>;
220
+ type Relations = z.infer<typeof RelationsSchema>;
221
+ declare const AviationSchema: z.ZodObject<{
222
+ aircraftType: z.ZodOptional<z.ZodString>;
223
+ aircraftDesignation: z.ZodOptional<z.ZodString>;
224
+ squadron: z.ZodOptional<z.ZodString>;
225
+ flightMission: z.ZodOptional<z.ZodString>;
226
+ altitude: z.ZodOptional<z.ZodNumber>;
227
+ speed: z.ZodOptional<z.ZodNumber>;
228
+ heading: z.ZodOptional<z.ZodNumber>;
229
+ radarContact: z.ZodOptional<z.ZodBoolean>;
230
+ weaponsSystemEngaged: z.ZodOptional<z.ZodBoolean>;
231
+ interceptAttempted: z.ZodOptional<z.ZodBoolean>;
232
+ }, z.core.$strip>;
233
+ type Aviation = z.infer<typeof AviationSchema>;
234
+ declare const SourceDataSchema: z.ZodObject<{
235
+ primarySource: z.ZodOptional<z.ZodObject<{
236
+ sourceId: z.ZodString;
237
+ type: z.ZodEnum<{
238
+ other: "other";
239
+ foia: "foia";
240
+ official_report: "official_report";
241
+ official_statement: "official_statement";
242
+ congressional_testimony: "congressional_testimony";
243
+ congressional_report: "congressional_report";
244
+ military_document: "military_document";
245
+ intelligence_document: "intelligence_document";
246
+ whistleblower: "whistleblower";
247
+ firsthand_witness: "firsthand_witness";
248
+ secondhand_account: "secondhand_account";
249
+ news_article: "news_article";
250
+ documentary: "documentary";
251
+ interview: "interview";
252
+ book: "book";
253
+ academic_paper: "academic_paper";
254
+ investigation_report: "investigation_report";
255
+ database_entry: "database_entry";
256
+ social_media: "social_media";
257
+ website: "website";
258
+ }>;
259
+ title: z.ZodString;
260
+ author: z.ZodOptional<z.ZodString>;
261
+ organization: z.ZodOptional<z.ZodString>;
262
+ date: z.ZodOptional<z.ZodString>;
263
+ url: z.ZodOptional<z.ZodString>;
264
+ archiveUrl: z.ZodOptional<z.ZodString>;
265
+ reference: z.ZodOptional<z.ZodString>;
266
+ credibility: z.ZodEnum<{
267
+ unknown: "unknown";
268
+ verified: "verified";
269
+ unverified: "unverified";
270
+ official: "official";
271
+ credible: "credible";
272
+ questionable: "questionable";
273
+ disputed: "disputed";
274
+ }>;
275
+ isPrimarySource: z.ZodOptional<z.ZodBoolean>;
276
+ classificationLevel: z.ZodOptional<z.ZodString>;
277
+ notes: z.ZodOptional<z.ZodString>;
278
+ }, z.core.$strip>>;
279
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
280
+ sourceId: z.ZodString;
281
+ type: z.ZodEnum<{
282
+ other: "other";
283
+ foia: "foia";
284
+ official_report: "official_report";
285
+ official_statement: "official_statement";
286
+ congressional_testimony: "congressional_testimony";
287
+ congressional_report: "congressional_report";
288
+ military_document: "military_document";
289
+ intelligence_document: "intelligence_document";
290
+ whistleblower: "whistleblower";
291
+ firsthand_witness: "firsthand_witness";
292
+ secondhand_account: "secondhand_account";
293
+ news_article: "news_article";
294
+ documentary: "documentary";
295
+ interview: "interview";
296
+ book: "book";
297
+ academic_paper: "academic_paper";
298
+ investigation_report: "investigation_report";
299
+ database_entry: "database_entry";
300
+ social_media: "social_media";
301
+ website: "website";
302
+ }>;
303
+ title: z.ZodString;
304
+ author: z.ZodOptional<z.ZodString>;
305
+ organization: z.ZodOptional<z.ZodString>;
306
+ date: z.ZodOptional<z.ZodString>;
307
+ url: z.ZodOptional<z.ZodString>;
308
+ archiveUrl: z.ZodOptional<z.ZodString>;
309
+ reference: z.ZodOptional<z.ZodString>;
310
+ credibility: z.ZodEnum<{
311
+ unknown: "unknown";
312
+ verified: "verified";
313
+ unverified: "unverified";
314
+ official: "official";
315
+ credible: "credible";
316
+ questionable: "questionable";
317
+ disputed: "disputed";
318
+ }>;
319
+ isPrimarySource: z.ZodOptional<z.ZodBoolean>;
320
+ classificationLevel: z.ZodOptional<z.ZodString>;
321
+ notes: z.ZodOptional<z.ZodString>;
322
+ }, z.core.$strip>>>;
323
+ originalClassification: z.ZodOptional<z.ZodString>;
324
+ declassificationDate: z.ZodOptional<z.ZodString>;
325
+ foiaRequestId: z.ZodOptional<z.ZodString>;
326
+ archiveLocation: z.ZodOptional<z.ZodString>;
327
+ }, z.core.$strip>;
328
+ type SourceData = z.infer<typeof SourceDataSchema>;
329
+
330
+ export { type Aviation as A, type Environment as E, type Investigation as I, type ManeuverType as M, type ObjectCharacteristics as O, type RelationEdge as R, type SourceData as S, type Witnesses as W, AviationSchema as a, EnvironmentSchema as b, InvestigationSchema as c, ManeuverTypeSchema as d, type Movement as e, MovementSchema as f, ObjectCharacteristicsSchema as g, type ObjectShape as h, ObjectShapeSchema as i, RelationEdgeSchema as j, type RelationKind as k, RelationKindSchema as l, type Relations as m, RelationsSchema as n, type ResponseImpact as o, ResponseImpactSchema as p, SourceDataSchema as q, WitnessesSchema as r };
@@ -0,0 +1,101 @@
1
+ import { z, ZodType } from 'zod';
2
+
3
+ /**
4
+ * Nominal "branded" types — TS-only ergonomics that never touch the emitted
5
+ * JSON Schema (Phase 0 confirmed brands are safe but we keep them out of the
6
+ * schema layer for composition clarity). A branded value is the base type at
7
+ * runtime; the brand only constrains assignment at compile time.
8
+ */
9
+ declare const __brand: unique symbol;
10
+ type Brand<T, B extends string> = T & {
11
+ readonly [__brand]: B;
12
+ };
13
+ /** Validated UUID/identifier for an `Observation`. */
14
+ type ObservationId = Brand<string, 'ObservationId'>;
15
+ declare function asObservationId(value: string): ObservationId;
16
+
17
+ /**
18
+ * The single continuous confidence primitive for the whole ecosystem.
19
+ * A normalized probability in [0,1]. Plain number in the schema (serializable);
20
+ * the branded {@link Confidence} alias is the TS-only ergonomic layer.
21
+ *
22
+ * Replaces the independently-defined `confidence: number` + ad-hoc validators
23
+ * in `@disclosureos/observables` and `@disclosureos/origins`.
24
+ */
25
+ declare const ConfidenceSchema: z.ZodNumber;
26
+ type Confidence = Brand<number, 'Confidence'>;
27
+ declare function isConfidence(value: unknown): value is Confidence;
28
+ declare function assertConfidence(value: number, label?: string): asserts value is Confidence;
29
+ declare function asConfidence(value: number, label?: string): Confidence;
30
+
31
+ /**
32
+ * Shared "who evaluated this, when, and why" mixin.
33
+ *
34
+ * Replaces the divergent metadata that observables (`assessedAt`/`assessedBy`/
35
+ * `notes`) and origins (`assignedAt`/`assignedBy`/`reasoning`) each invented.
36
+ * Any human/agent judgement surface composes these fields rather than
37
+ * re-declaring its own.
38
+ */
39
+ declare const AttributionSchema: z.ZodObject<{
40
+ evaluatedAt: z.ZodOptional<z.ZodISODateTime>;
41
+ evaluatedBy: z.ZodOptional<z.ZodString>;
42
+ rationale: z.ZodOptional<z.ZodString>;
43
+ }, z.core.$strip>;
44
+ type Attribution = z.infer<typeof AttributionSchema>;
45
+
46
+ /**
47
+ * Kinds of in-record evidence an `evidenceRef` can point at. Each maps to a
48
+ * collection on the `Observation`:
49
+ * - `media` → `Observation.media[].id` / `featuredMedia.id`
50
+ * - `sensor` → `Observation.sensorEvidence.sensors[].id`
51
+ * - `physical` → `Observation.physicalEvidence[].id` (extension slot)
52
+ * - `testimony` → `Observation.testimony[].statementId` (extension slot)
53
+ */
54
+ declare const EVIDENCE_REF_KINDS: readonly ["media", "sensor", "physical", "testimony"];
55
+ type EvidenceRefKind = (typeof EVIDENCE_REF_KINDS)[number];
56
+ /**
57
+ * Build a typed evidence reference string, e.g. `evidenceRef('media', 'm1')`
58
+ * → `"media:m1"`. Keep refs as plain strings in the schema so they remain
59
+ * portable to JSON Schema; the `<kind>:<id>` convention is enforced by
60
+ * {@link isEvidenceRef} and produced by this helper.
61
+ */
62
+ declare function evidenceRef(kind: EvidenceRefKind, id: string): string;
63
+ /** True if `value` matches the `<kind>:<id>` evidence-ref convention. */
64
+ declare function isEvidenceRef(value: unknown): value is string;
65
+ /** Split an evidence ref into its `{ kind, id }` parts, or `null` if malformed. */
66
+ declare function parseEvidenceRef(value: string): {
67
+ kind: EvidenceRefKind;
68
+ id: string;
69
+ } | null;
70
+ /**
71
+ * A `Claim` is the teachable unit of judgement in DisclosureOS: an
72
+ * {@link AttributionSchema | Attribution} (who evaluated this, when, why) plus
73
+ * the in-record evidence that justifies it. Every evaluative slot
74
+ * (`observableAssessments`, `origin`) is a *list* of claims so the framework can
75
+ * represent the contested verdicts that define UAP data. Opinion/endorsement
76
+ * lives in the scoring layer, never here.
77
+ */
78
+ declare const ClaimSchema: z.ZodObject<{
79
+ evaluatedAt: z.ZodOptional<z.ZodISODateTime>;
80
+ evaluatedBy: z.ZodOptional<z.ZodString>;
81
+ rationale: z.ZodOptional<z.ZodString>;
82
+ evidenceRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
83
+ }, z.core.$strip>;
84
+ type Claim = z.infer<typeof ClaimSchema>;
85
+
86
+ /**
87
+ * One canonical enum-guard factory for the whole ecosystem.
88
+ *
89
+ * Replaces the three byte-identical private copies that lived in
90
+ * `records/guards`, `observables/guards`, and `origins/guards`.
91
+ */
92
+ declare function createEnumGuard<T extends string>(values: readonly T[]): (value: unknown) => value is T;
93
+
94
+ /**
95
+ * Schema-derived type guard. Replaces hand-maintained `createEnumGuard(ARRAY)`
96
+ * calls once a Zod schema is the source of truth — `makeGuard(XSchema)` narrows
97
+ * to the schema's inferred type with no parallel value array to drift.
98
+ */
99
+ declare function makeGuard<T>(schema: ZodType<T>): (value: unknown) => value is T;
100
+
101
+ export { type Attribution as A, type Brand as B, type Claim as C, EVIDENCE_REF_KINDS as E, type ObservationId as O, AttributionSchema as a, ClaimSchema as b, type Confidence as c, ConfidenceSchema as d, type EvidenceRefKind as e, asConfidence as f, asObservationId as g, assertConfidence as h, createEnumGuard as i, evidenceRef as j, isConfidence as k, isEvidenceRef as l, makeGuard as m, parseEvidenceRef as p };
@@ -0,0 +1,47 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const DocumentTypeSchema: z.ZodEnum<{
4
+ other: "other";
5
+ official_report: "official_report";
6
+ foia_release: "foia_release";
7
+ congressional_record: "congressional_record";
8
+ military_memo: "military_memo";
9
+ intelligence_assessment: "intelligence_assessment";
10
+ inspector_general: "inspector_general";
11
+ presidential_directive: "presidential_directive";
12
+ executive_order: "executive_order";
13
+ declassified_cable: "declassified_cable";
14
+ investigation_file: "investigation_file";
15
+ }>;
16
+ type DocumentType = z.infer<typeof DocumentTypeSchema>;
17
+ declare const DocumentMetadataSchema: z.ZodObject<{
18
+ documentType: z.ZodEnum<{
19
+ other: "other";
20
+ official_report: "official_report";
21
+ foia_release: "foia_release";
22
+ congressional_record: "congressional_record";
23
+ military_memo: "military_memo";
24
+ intelligence_assessment: "intelligence_assessment";
25
+ inspector_general: "inspector_general";
26
+ presidential_directive: "presidential_directive";
27
+ executive_order: "executive_order";
28
+ declassified_cable: "declassified_cable";
29
+ investigation_file: "investigation_file";
30
+ }>;
31
+ classificationLevel: z.ZodOptional<z.ZodString>;
32
+ originatingAgency: z.ZodOptional<z.ZodString>;
33
+ controlNumbers: z.ZodOptional<z.ZodArray<z.ZodString>>;
34
+ foiaRequestNumber: z.ZodOptional<z.ZodString>;
35
+ declassificationDate: z.ZodOptional<z.ZodString>;
36
+ originalClassification: z.ZodOptional<z.ZodString>;
37
+ pageCount: z.ZodOptional<z.ZodNumber>;
38
+ redactionLevel: z.ZodOptional<z.ZodEnum<{
39
+ unknown: "unknown";
40
+ none: "none";
41
+ partial: "partial";
42
+ heavy: "heavy";
43
+ }>>;
44
+ }, z.core.$strip>;
45
+ type DocumentMetadata = z.infer<typeof DocumentMetadataSchema>;
46
+
47
+ export { type DocumentMetadata, DocumentMetadataSchema, type DocumentType, DocumentTypeSchema };
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+
3
+ // src/extensions/document/types.ts
4
+ var DocumentTypeSchema = z.enum([
5
+ "foia_release",
6
+ "official_report",
7
+ "congressional_record",
8
+ "military_memo",
9
+ "intelligence_assessment",
10
+ "inspector_general",
11
+ "presidential_directive",
12
+ "executive_order",
13
+ "declassified_cable",
14
+ "investigation_file",
15
+ "other"
16
+ ]).describe("Kind of government/official document.");
17
+ var DocumentMetadataSchema = z.object({
18
+ documentType: DocumentTypeSchema,
19
+ classificationLevel: z.string().optional().describe('Current classification of the document (e.g. "UNCLASSIFIED", "SECRET//NOFORN").'),
20
+ originatingAgency: z.string().optional().describe("Agency that produced the document."),
21
+ controlNumbers: z.array(z.string()).optional().describe("Agency control or tracking numbers stamped on the document."),
22
+ foiaRequestNumber: z.string().optional().describe("FOIA request number that produced the document."),
23
+ declassificationDate: z.string().optional().describe("When the document was declassified (ISO date)."),
24
+ originalClassification: z.string().optional().describe("Classification the document carried when created."),
25
+ pageCount: z.number().optional().describe("Number of pages in the document."),
26
+ redactionLevel: z.enum(["none", "partial", "heavy", "unknown"]).optional().describe("How much of the document is redacted.")
27
+ }).meta({ id: "DocumentMetadata" }).describe("Provenance metadata for a source document (classification, agency, redaction).");
28
+
29
+ export { DocumentMetadataSchema, DocumentTypeSchema };
30
+ //# sourceMappingURL=index.js.map
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/extensions/document/types.ts"],"names":[],"mappings":";;;AAEO,IAAM,kBAAA,GAAqB,EAC/B,IAAA,CAAK;AAAA,EACJ,cAAA;AAAA,EACA,iBAAA;AAAA,EACA,sBAAA;AAAA,EACA,eAAA;AAAA,EACA,yBAAA;AAAA,EACA,mBAAA;AAAA,EACA,wBAAA;AAAA,EACA,iBAAA;AAAA,EACA,oBAAA;AAAA,EACA,oBAAA;AAAA,EACA;AACF,CAAC,CAAA,CACA,SAAS,uCAAuC;AAI5C,IAAM,sBAAA,GAAyB,EACnC,MAAA,CAAO;AAAA,EACN,YAAA,EAAc,kBAAA;AAAA,EACd,qBAAqB,CAAA,CAClB,MAAA,GACA,QAAA,EAAS,CACT,SAAS,iFAAiF,CAAA;AAAA,EAC7F,mBAAmB,CAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CAAE,SAAS,oCAAoC,CAAA;AAAA,EACtF,cAAA,EAAgB,CAAA,CACb,KAAA,CAAM,CAAA,CAAE,MAAA,EAAQ,CAAA,CAChB,QAAA,EAAS,CACT,QAAA,CAAS,6DAA6D,CAAA;AAAA,EACzE,mBAAmB,CAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CAAE,SAAS,iDAAiD,CAAA;AAAA,EACnG,sBAAsB,CAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CAAE,SAAS,gDAAgD,CAAA;AAAA,EACrG,wBAAwB,CAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CAAE,SAAS,mDAAmD,CAAA;AAAA,EAC1G,WAAW,CAAA,CAAE,MAAA,GAAS,QAAA,EAAS,CAAE,SAAS,kCAAkC,CAAA;AAAA,EAC5E,cAAA,EAAgB,CAAA,CACb,IAAA,CAAK,CAAC,MAAA,EAAQ,SAAA,EAAW,OAAA,EAAS,SAAS,CAAC,CAAA,CAC5C,QAAA,EAAS,CACT,SAAS,uCAAuC;AACrD,CAAC,CAAA,CACA,KAAK,EAAE,EAAA,EAAI,oBAAoB,CAAA,CAC/B,SAAS,gFAAgF","file":"index.js","sourcesContent":["import { z } from 'zod';\n\nexport const DocumentTypeSchema = z\n .enum([\n 'foia_release',\n 'official_report',\n 'congressional_record',\n 'military_memo',\n 'intelligence_assessment',\n 'inspector_general',\n 'presidential_directive',\n 'executive_order',\n 'declassified_cable',\n 'investigation_file',\n 'other',\n ])\n .describe('Kind of government/official document.');\n\nexport type DocumentType = z.infer<typeof DocumentTypeSchema>;\n\nexport const DocumentMetadataSchema = z\n .object({\n documentType: DocumentTypeSchema,\n classificationLevel: z\n .string()\n .optional()\n .describe('Current classification of the document (e.g. \"UNCLASSIFIED\", \"SECRET//NOFORN\").'),\n originatingAgency: z.string().optional().describe('Agency that produced the document.'),\n controlNumbers: z\n .array(z.string())\n .optional()\n .describe('Agency control or tracking numbers stamped on the document.'),\n foiaRequestNumber: z.string().optional().describe('FOIA request number that produced the document.'),\n declassificationDate: z.string().optional().describe('When the document was declassified (ISO date).'),\n originalClassification: z.string().optional().describe('Classification the document carried when created.'),\n pageCount: z.number().optional().describe('Number of pages in the document.'),\n redactionLevel: z\n .enum(['none', 'partial', 'heavy', 'unknown'])\n .optional()\n .describe('How much of the document is redacted.'),\n })\n .meta({ id: 'DocumentMetadata' })\n .describe('Provenance metadata for a source document (classification, agency, redaction).');\n\nexport type DocumentMetadata = z.infer<typeof DocumentMetadataSchema>;\n"]}
@@ -0,0 +1,139 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const IdentifierSystemSchema: z.ZodEnum<{
4
+ custom: "custom";
5
+ url: "url";
6
+ nuforc: "nuforc";
7
+ mufon: "mufon";
8
+ geipan: "geipan";
9
+ cufos: "cufos";
10
+ nicap: "nicap";
11
+ bluebook: "bluebook";
12
+ nara: "nara";
13
+ foia: "foia";
14
+ aaro: "aaro";
15
+ congress: "congress";
16
+ doi: "doi";
17
+ arxiv: "arxiv";
18
+ orcid: "orcid";
19
+ pubmed: "pubmed";
20
+ isbn: "isbn";
21
+ issn: "issn";
22
+ youtube: "youtube";
23
+ vimeo: "vimeo";
24
+ internet_archive: "internet_archive";
25
+ wayback: "wayback";
26
+ uri: "uri";
27
+ }>;
28
+ type IdentifierSystem = z.infer<typeof IdentifierSystemSchema>;
29
+ declare const ExternalIdentifierSchema: z.ZodObject<{
30
+ system: z.ZodEnum<{
31
+ custom: "custom";
32
+ url: "url";
33
+ nuforc: "nuforc";
34
+ mufon: "mufon";
35
+ geipan: "geipan";
36
+ cufos: "cufos";
37
+ nicap: "nicap";
38
+ bluebook: "bluebook";
39
+ nara: "nara";
40
+ foia: "foia";
41
+ aaro: "aaro";
42
+ congress: "congress";
43
+ doi: "doi";
44
+ arxiv: "arxiv";
45
+ orcid: "orcid";
46
+ pubmed: "pubmed";
47
+ isbn: "isbn";
48
+ issn: "issn";
49
+ youtube: "youtube";
50
+ vimeo: "vimeo";
51
+ internet_archive: "internet_archive";
52
+ wayback: "wayback";
53
+ uri: "uri";
54
+ }>;
55
+ systemName: z.ZodOptional<z.ZodString>;
56
+ value: z.ZodString;
57
+ url: z.ZodOptional<z.ZodString>;
58
+ verified: z.ZodOptional<z.ZodBoolean>;
59
+ verifiedDate: z.ZodOptional<z.ZodString>;
60
+ accessible: z.ZodOptional<z.ZodBoolean>;
61
+ accessCheckedDate: z.ZodOptional<z.ZodString>;
62
+ notes: z.ZodOptional<z.ZodString>;
63
+ }, z.core.$strip>;
64
+ type ExternalIdentifier = z.infer<typeof ExternalIdentifierSchema>;
65
+ declare const CrossReferencesSchema: z.ZodObject<{
66
+ primary: z.ZodOptional<z.ZodObject<{
67
+ system: z.ZodEnum<{
68
+ custom: "custom";
69
+ url: "url";
70
+ nuforc: "nuforc";
71
+ mufon: "mufon";
72
+ geipan: "geipan";
73
+ cufos: "cufos";
74
+ nicap: "nicap";
75
+ bluebook: "bluebook";
76
+ nara: "nara";
77
+ foia: "foia";
78
+ aaro: "aaro";
79
+ congress: "congress";
80
+ doi: "doi";
81
+ arxiv: "arxiv";
82
+ orcid: "orcid";
83
+ pubmed: "pubmed";
84
+ isbn: "isbn";
85
+ issn: "issn";
86
+ youtube: "youtube";
87
+ vimeo: "vimeo";
88
+ internet_archive: "internet_archive";
89
+ wayback: "wayback";
90
+ uri: "uri";
91
+ }>;
92
+ systemName: z.ZodOptional<z.ZodString>;
93
+ value: z.ZodString;
94
+ url: z.ZodOptional<z.ZodString>;
95
+ verified: z.ZodOptional<z.ZodBoolean>;
96
+ verifiedDate: z.ZodOptional<z.ZodString>;
97
+ accessible: z.ZodOptional<z.ZodBoolean>;
98
+ accessCheckedDate: z.ZodOptional<z.ZodString>;
99
+ notes: z.ZodOptional<z.ZodString>;
100
+ }, z.core.$strip>>;
101
+ identifiers: z.ZodArray<z.ZodObject<{
102
+ system: z.ZodEnum<{
103
+ custom: "custom";
104
+ url: "url";
105
+ nuforc: "nuforc";
106
+ mufon: "mufon";
107
+ geipan: "geipan";
108
+ cufos: "cufos";
109
+ nicap: "nicap";
110
+ bluebook: "bluebook";
111
+ nara: "nara";
112
+ foia: "foia";
113
+ aaro: "aaro";
114
+ congress: "congress";
115
+ doi: "doi";
116
+ arxiv: "arxiv";
117
+ orcid: "orcid";
118
+ pubmed: "pubmed";
119
+ isbn: "isbn";
120
+ issn: "issn";
121
+ youtube: "youtube";
122
+ vimeo: "vimeo";
123
+ internet_archive: "internet_archive";
124
+ wayback: "wayback";
125
+ uri: "uri";
126
+ }>;
127
+ systemName: z.ZodOptional<z.ZodString>;
128
+ value: z.ZodString;
129
+ url: z.ZodOptional<z.ZodString>;
130
+ verified: z.ZodOptional<z.ZodBoolean>;
131
+ verifiedDate: z.ZodOptional<z.ZodString>;
132
+ accessible: z.ZodOptional<z.ZodBoolean>;
133
+ accessCheckedDate: z.ZodOptional<z.ZodString>;
134
+ notes: z.ZodOptional<z.ZodString>;
135
+ }, z.core.$strip>>;
136
+ }, z.core.$strip>;
137
+ type CrossReferences = z.infer<typeof CrossReferencesSchema>;
138
+
139
+ export { type CrossReferences, CrossReferencesSchema, type ExternalIdentifier, ExternalIdentifierSchema, type IdentifierSystem, IdentifierSystemSchema };