@ordis-dev/ordis 0.4.1 → 0.5.1
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/README.md +19 -28
- package/dist/core/coercion.d.ts +73 -0
- package/dist/core/coercion.d.ts.map +1 -0
- package/dist/core/coercion.js +461 -0
- package/dist/core/coercion.js.map +1 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/pipeline.d.ts.map +1 -1
- package/dist/core/pipeline.js +7 -2
- package/dist/core/pipeline.js.map +1 -1
- package/dist/core/types.d.ts +6 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/validator.d.ts +3 -0
- package/dist/core/validator.d.ts.map +1 -1
- package/dist/core/validator.js +86 -2
- package/dist/core/validator.js.map +1 -1
- package/dist/llm/client.d.ts +14 -0
- package/dist/llm/client.d.ts.map +1 -1
- package/dist/llm/client.js +82 -8
- package/dist/llm/client.js.map +1 -1
- package/dist/llm/prompt-builder.d.ts.map +1 -1
- package/dist/llm/prompt-builder.js +63 -19
- package/dist/llm/prompt-builder.js.map +1 -1
- package/dist/llm/token-counter.d.ts +1 -1
- package/dist/llm/token-counter.d.ts.map +1 -1
- package/dist/llm/token-counter.js +1 -1
- package/dist/llm/token-counter.js.map +1 -1
- package/dist/llm/types.d.ts +16 -1
- package/dist/llm/types.d.ts.map +1 -1
- package/dist/schemas/types.d.ts +18 -1
- package/dist/schemas/types.d.ts.map +1 -1
- package/dist/schemas/validator.js +61 -1
- package/dist/schemas/validator.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -217,43 +217,34 @@ npm run benchmark
|
|
|
217
217
|
|
|
218
218
|
## Roadmap
|
|
219
219
|
|
|
220
|
+
**Completed in v0.5.1:**
|
|
221
|
+
- ✅ Default context window increased to 32k (was 4096)
|
|
222
|
+
- ✅ Markdown-wrapped JSON parsing ([#74](https://github.com/ordis-dev/ordis/issues/74))
|
|
223
|
+
- ✅ AMD GPU support in benchmarks (rocm-smi detection)
|
|
224
|
+
- ✅ GPU health monitoring in benchmarks (VRAM pressure, utilization)
|
|
225
|
+
|
|
226
|
+
**Completed in v0.5.0:**
|
|
227
|
+
- ✅ Type coercion for LLM output ([#71](https://github.com/ordis-dev/ordis/issues/71))
|
|
228
|
+
- Automatic string-to-number/boolean coercion
|
|
229
|
+
- Null-like string handling ("null"/"none"/"n/a")
|
|
230
|
+
- Enum case-insensitive matching ("Series B" → "series_b")
|
|
231
|
+
- Date format normalization (US, EU, written formats)
|
|
232
|
+
- ✅ Array of objects support ([#70](https://github.com/ordis-dev/ordis/issues/70))
|
|
233
|
+
- Nested object schemas with recursive validation
|
|
234
|
+
- Proper error paths (e.g., "items[1].price")
|
|
235
|
+
- ✅ Ollama runtime options (num_ctx, num_gpu)
|
|
236
|
+
|
|
220
237
|
**Completed in v0.4.0:**
|
|
221
238
|
- ✅ User-friendly error messages ([#63](https://github.com/ordis-dev/ordis/issues/63))
|
|
222
239
|
- Emoji indicators (❌, 💡, ℹ️) for quick scanning
|
|
223
240
|
- Expected vs. actual values for validation errors
|
|
224
241
|
- Actionable suggestions for common issues
|
|
225
242
|
- Service-specific troubleshooting (Ollama, LM Studio, OpenAI)
|
|
226
|
-
- File system error handling (ENOENT, EACCES)
|
|
227
243
|
- ✅ Debug mode enhancements
|
|
228
244
|
- Full LLM request/response logging
|
|
229
245
|
- Token usage breakdown
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
**Completed in v0.2.0:**
|
|
234
|
-
- ✅ HTML stripping/preprocessing before extraction ([#59](https://github.com/ordis-dev/ordis/issues/59))
|
|
235
|
-
- `stripHtml: true` removes HTML tags, keeps text content
|
|
236
|
-
- `preserveStructure: true` converts headings/lists to markdown-like format
|
|
237
|
-
- `removeSelectors` for custom element removal
|
|
238
|
-
- Automatic removal of scripts, styles, nav, footer, ads
|
|
239
|
-
|
|
240
|
-
**Completed in v0.1.0:**
|
|
241
|
-
- ✅ Core extraction pipeline with schema validation
|
|
242
|
-
- ✅ Token budget awareness and management
|
|
243
|
-
- ✅ Confidence scoring for extracted data
|
|
244
|
-
- ✅ Programmatic API for library usage
|
|
245
|
-
- ✅ CLI tool with debug mode
|
|
246
|
-
- ✅ Comprehensive test suite and benchmarks
|
|
247
|
-
- ✅ Support for any OpenAI-compatible API
|
|
248
|
-
|
|
249
|
-
**Upcoming:**
|
|
250
|
-
- [ ] Schema validation error line numbers ([#64](https://github.com/ordis-dev/ordis/issues/64))
|
|
251
|
-
- [ ] Smart input truncation ([#40](https://github.com/ordis-dev/ordis/issues/40))
|
|
252
|
-
- [ ] Multi-pass extraction for large inputs ([#41](https://github.com/ordis-dev/ordis/issues/41))
|
|
253
|
-
- [ ] Config file support ([#16](https://github.com/ordis-dev/ordis/issues/16))
|
|
254
|
-
- [ ] Output formatting options ([#14](https://github.com/ordis-dev/ordis/issues/14))
|
|
255
|
-
- [ ] Batch extraction ([#19](https://github.com/ordis-dev/ordis/issues/19))
|
|
256
|
-
- [ ] More example schemas ([#13](https://github.com/ordis-dev/ordis/issues/13))
|
|
246
|
+
|
|
247
|
+
See [CHANGELOG.md](CHANGELOG.md) for complete version history.
|
|
257
248
|
|
|
258
249
|
## Contributing
|
|
259
250
|
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type coercion module - converts LLM output to expected types
|
|
3
|
+
*
|
|
4
|
+
* Handles common LLM quirks like:
|
|
5
|
+
* - String "null" instead of null
|
|
6
|
+
* - String numbers like "123" instead of 123
|
|
7
|
+
* - String booleans like "true" instead of true
|
|
8
|
+
* - Enum case mismatch like "Series A" instead of "series_a"
|
|
9
|
+
* - Date format variations like "11/20/24" instead of "2024-11-20"
|
|
10
|
+
*/
|
|
11
|
+
import type { FieldType, FieldDefinition } from '../schemas/types.js';
|
|
12
|
+
/**
|
|
13
|
+
* Warning generated during coercion
|
|
14
|
+
*/
|
|
15
|
+
export interface CoercionWarning {
|
|
16
|
+
field: string;
|
|
17
|
+
message: string;
|
|
18
|
+
originalValue: unknown;
|
|
19
|
+
coercedValue: unknown;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Result of coercing a value
|
|
23
|
+
*/
|
|
24
|
+
export interface CoercionResult {
|
|
25
|
+
value: unknown;
|
|
26
|
+
coerced: boolean;
|
|
27
|
+
warning?: CoercionWarning;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Coerce an enum value to match expected enum values (case-insensitive)
|
|
31
|
+
*
|
|
32
|
+
* @param value - The string value to coerce
|
|
33
|
+
* @param enumValues - Array of allowed enum values
|
|
34
|
+
* @param fieldName - Field name for warning messages
|
|
35
|
+
* @returns CoercionResult with matched enum value or original if no match
|
|
36
|
+
*/
|
|
37
|
+
export declare function coerceEnumValue(value: string, enumValues: string[], fieldName: string): CoercionResult;
|
|
38
|
+
/**
|
|
39
|
+
* Coerce a date string to ISO format (YYYY-MM-DD)
|
|
40
|
+
*
|
|
41
|
+
* @param value - The date string to coerce
|
|
42
|
+
* @param fieldName - Field name for warning messages
|
|
43
|
+
* @returns CoercionResult with ISO date or original if not parseable
|
|
44
|
+
*/
|
|
45
|
+
export declare function coerceDateValue(value: string, fieldName: string): CoercionResult;
|
|
46
|
+
/**
|
|
47
|
+
* Coerce a value to the expected type
|
|
48
|
+
*
|
|
49
|
+
* @param value - The value to coerce
|
|
50
|
+
* @param targetType - The expected field type
|
|
51
|
+
* @param fieldName - Field name for warning messages
|
|
52
|
+
* @param isOptional - Whether the field is optional (affects null coercion)
|
|
53
|
+
* @returns CoercionResult with the coerced value and any warnings
|
|
54
|
+
*/
|
|
55
|
+
export declare function coerceValue(value: unknown, targetType: FieldType, fieldName: string, isOptional?: boolean): CoercionResult;
|
|
56
|
+
/**
|
|
57
|
+
* Coerce all values in an extracted data object (recursive)
|
|
58
|
+
*
|
|
59
|
+
* Handles:
|
|
60
|
+
* - Top-level field coercion
|
|
61
|
+
* - Enum value normalization (case-insensitive)
|
|
62
|
+
* - Recursive coercion for array items
|
|
63
|
+
* - Recursive coercion for nested objects
|
|
64
|
+
*
|
|
65
|
+
* @param data - The extracted data object
|
|
66
|
+
* @param fields - Field definitions from schema
|
|
67
|
+
* @returns Coerced data and any warnings generated
|
|
68
|
+
*/
|
|
69
|
+
export declare function coerceExtractedData(data: Record<string, unknown>, fields: Record<string, FieldDefinition>): {
|
|
70
|
+
data: Record<string, unknown>;
|
|
71
|
+
warnings: CoercionWarning[];
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=coercion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coercion.d.ts","sourceRoot":"","sources":["../../src/core/coercion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAuB,MAAM,qBAAqB,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,eAAe,CAAC;CAC7B;AAyBD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC3B,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAAE,EACpB,SAAS,EAAE,MAAM,GAClB,cAAc,CAyBhB;AA6DD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC3B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAClB,cAAc,CA2ChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACvB,KAAK,EAAE,OAAO,EACd,UAAU,EAAE,SAAS,EACrB,SAAS,EAAE,MAAM,EACjB,UAAU,GAAE,OAAe,GAC5B,cAAc,CAuChB;AAyKD;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GACxC;IAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,QAAQ,EAAE,eAAe,EAAE,CAAA;CAAE,CA8EhE"}
|
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type coercion module - converts LLM output to expected types
|
|
3
|
+
*
|
|
4
|
+
* Handles common LLM quirks like:
|
|
5
|
+
* - String "null" instead of null
|
|
6
|
+
* - String numbers like "123" instead of 123
|
|
7
|
+
* - String booleans like "true" instead of true
|
|
8
|
+
* - Enum case mismatch like "Series A" instead of "series_a"
|
|
9
|
+
* - Date format variations like "11/20/24" instead of "2024-11-20"
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Null-like string values that should be coerced to null
|
|
13
|
+
*/
|
|
14
|
+
const NULL_STRINGS = new Set(['null', 'none', 'n/a', 'na', 'undefined', '']);
|
|
15
|
+
/**
|
|
16
|
+
* Boolean true string values
|
|
17
|
+
*/
|
|
18
|
+
const TRUE_STRINGS = new Set(['true', 'yes', '1']);
|
|
19
|
+
/**
|
|
20
|
+
* Boolean false string values
|
|
21
|
+
*/
|
|
22
|
+
const FALSE_STRINGS = new Set(['false', 'no', '0']);
|
|
23
|
+
/**
|
|
24
|
+
* Normalize a string for enum matching
|
|
25
|
+
* Converts to lowercase and replaces spaces/hyphens with underscores
|
|
26
|
+
*/
|
|
27
|
+
function normalizeEnumValue(value) {
|
|
28
|
+
return value.trim().toLowerCase().replace(/[\s-]+/g, '_');
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Coerce an enum value to match expected enum values (case-insensitive)
|
|
32
|
+
*
|
|
33
|
+
* @param value - The string value to coerce
|
|
34
|
+
* @param enumValues - Array of allowed enum values
|
|
35
|
+
* @param fieldName - Field name for warning messages
|
|
36
|
+
* @returns CoercionResult with matched enum value or original if no match
|
|
37
|
+
*/
|
|
38
|
+
export function coerceEnumValue(value, enumValues, fieldName) {
|
|
39
|
+
// Exact match - no coercion needed
|
|
40
|
+
if (enumValues.includes(value)) {
|
|
41
|
+
return { value, coerced: false };
|
|
42
|
+
}
|
|
43
|
+
// Try normalized match
|
|
44
|
+
const normalized = normalizeEnumValue(value);
|
|
45
|
+
const match = enumValues.find(e => normalizeEnumValue(e) === normalized);
|
|
46
|
+
if (match) {
|
|
47
|
+
return {
|
|
48
|
+
value: match,
|
|
49
|
+
coerced: true,
|
|
50
|
+
warning: {
|
|
51
|
+
field: fieldName,
|
|
52
|
+
message: `Coerced enum value '${value}' to '${match}'`,
|
|
53
|
+
originalValue: value,
|
|
54
|
+
coercedValue: match,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
// No match found - return original (validation will catch it)
|
|
59
|
+
return { value, coerced: false };
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Common date format patterns and their parsing logic
|
|
63
|
+
* Supports: MM/DD/YY, MM/DD/YYYY, DD-MM-YYYY, YYYY-MM-DD, etc.
|
|
64
|
+
*/
|
|
65
|
+
const DATE_PATTERNS = [
|
|
66
|
+
// ISO format: YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS
|
|
67
|
+
{
|
|
68
|
+
regex: /^(\d{4})-(\d{1,2})-(\d{1,2})(?:T[\d:]+)?$/,
|
|
69
|
+
parse: (m) => ({ year: parseInt(m[1]), month: parseInt(m[2]), day: parseInt(m[3]) }),
|
|
70
|
+
},
|
|
71
|
+
// US format: MM/DD/YYYY or MM/DD/YY
|
|
72
|
+
{
|
|
73
|
+
regex: /^(\d{1,2})\/(\d{1,2})\/(\d{2,4})$/,
|
|
74
|
+
parse: (m) => {
|
|
75
|
+
let year = parseInt(m[3]);
|
|
76
|
+
if (year < 100)
|
|
77
|
+
year += year < 50 ? 2000 : 1900;
|
|
78
|
+
return { year, month: parseInt(m[1]), day: parseInt(m[2]) };
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
// European format: DD-MM-YYYY or DD.MM.YYYY
|
|
82
|
+
{
|
|
83
|
+
regex: /^(\d{1,2})[-.](\d{1,2})[-.](\d{4})$/,
|
|
84
|
+
parse: (m) => ({ year: parseInt(m[3]), month: parseInt(m[2]), day: parseInt(m[1]) }),
|
|
85
|
+
},
|
|
86
|
+
// Written format: January 15, 2024 or Jan 15, 2024
|
|
87
|
+
{
|
|
88
|
+
regex: /^([A-Za-z]+)\s+(\d{1,2}),?\s+(\d{4})$/,
|
|
89
|
+
parse: (m) => {
|
|
90
|
+
const monthNames = {
|
|
91
|
+
january: 1, jan: 1, february: 2, feb: 2, march: 3, mar: 3,
|
|
92
|
+
april: 4, apr: 4, may: 5, june: 6, jun: 6,
|
|
93
|
+
july: 7, jul: 7, august: 8, aug: 8, september: 9, sep: 9, sept: 9,
|
|
94
|
+
october: 10, oct: 10, november: 11, nov: 11, december: 12, dec: 12,
|
|
95
|
+
};
|
|
96
|
+
const month = monthNames[m[1].toLowerCase()];
|
|
97
|
+
if (!month)
|
|
98
|
+
return null;
|
|
99
|
+
return { year: parseInt(m[3]), month, day: parseInt(m[2]) };
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
// Written format: 15 January 2024 or 15 Jan 2024
|
|
103
|
+
{
|
|
104
|
+
regex: /^(\d{1,2})\s+([A-Za-z]+)\s+(\d{4})$/,
|
|
105
|
+
parse: (m) => {
|
|
106
|
+
const monthNames = {
|
|
107
|
+
january: 1, jan: 1, february: 2, feb: 2, march: 3, mar: 3,
|
|
108
|
+
april: 4, apr: 4, may: 5, june: 6, jun: 6,
|
|
109
|
+
july: 7, jul: 7, august: 8, aug: 8, september: 9, sep: 9, sept: 9,
|
|
110
|
+
october: 10, oct: 10, november: 11, nov: 11, december: 12, dec: 12,
|
|
111
|
+
};
|
|
112
|
+
const month = monthNames[m[2].toLowerCase()];
|
|
113
|
+
if (!month)
|
|
114
|
+
return null;
|
|
115
|
+
return { year: parseInt(m[3]), month, day: parseInt(m[1]) };
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
];
|
|
119
|
+
/**
|
|
120
|
+
* Coerce a date string to ISO format (YYYY-MM-DD)
|
|
121
|
+
*
|
|
122
|
+
* @param value - The date string to coerce
|
|
123
|
+
* @param fieldName - Field name for warning messages
|
|
124
|
+
* @returns CoercionResult with ISO date or original if not parseable
|
|
125
|
+
*/
|
|
126
|
+
export function coerceDateValue(value, fieldName) {
|
|
127
|
+
const trimmed = value.trim();
|
|
128
|
+
// Already in ISO format without time - no coercion needed
|
|
129
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(trimmed)) {
|
|
130
|
+
return { value: trimmed, coerced: false };
|
|
131
|
+
}
|
|
132
|
+
// Try each pattern
|
|
133
|
+
for (const pattern of DATE_PATTERNS) {
|
|
134
|
+
const match = trimmed.match(pattern.regex);
|
|
135
|
+
if (match) {
|
|
136
|
+
const parsed = pattern.parse(match);
|
|
137
|
+
if (parsed) {
|
|
138
|
+
// Validate the date components
|
|
139
|
+
if (parsed.month >= 1 && parsed.month <= 12 &&
|
|
140
|
+
parsed.day >= 1 && parsed.day <= 31 &&
|
|
141
|
+
parsed.year >= 1900 && parsed.year <= 2100) {
|
|
142
|
+
const isoDate = `${parsed.year}-${String(parsed.month).padStart(2, '0')}-${String(parsed.day).padStart(2, '0')}`;
|
|
143
|
+
// Check if it's different from original (ignoring time component)
|
|
144
|
+
if (isoDate !== trimmed && !trimmed.startsWith(isoDate)) {
|
|
145
|
+
return {
|
|
146
|
+
value: isoDate,
|
|
147
|
+
coerced: true,
|
|
148
|
+
warning: {
|
|
149
|
+
field: fieldName,
|
|
150
|
+
message: `Coerced date '${value}' to ISO format '${isoDate}'`,
|
|
151
|
+
originalValue: value,
|
|
152
|
+
coercedValue: isoDate,
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
return { value: isoDate, coerced: false };
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
// No pattern matched - return original
|
|
162
|
+
return { value, coerced: false };
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Coerce a value to the expected type
|
|
166
|
+
*
|
|
167
|
+
* @param value - The value to coerce
|
|
168
|
+
* @param targetType - The expected field type
|
|
169
|
+
* @param fieldName - Field name for warning messages
|
|
170
|
+
* @param isOptional - Whether the field is optional (affects null coercion)
|
|
171
|
+
* @returns CoercionResult with the coerced value and any warnings
|
|
172
|
+
*/
|
|
173
|
+
export function coerceValue(value, targetType, fieldName, isOptional = false) {
|
|
174
|
+
// Already null/undefined - no coercion needed
|
|
175
|
+
if (value === null || value === undefined) {
|
|
176
|
+
return { value, coerced: false };
|
|
177
|
+
}
|
|
178
|
+
// Check for null-like strings first (applies to all types)
|
|
179
|
+
if (typeof value === 'string') {
|
|
180
|
+
const normalized = value.trim().toLowerCase();
|
|
181
|
+
if (NULL_STRINGS.has(normalized)) {
|
|
182
|
+
// Only coerce to null if field is optional
|
|
183
|
+
if (isOptional) {
|
|
184
|
+
return {
|
|
185
|
+
value: null,
|
|
186
|
+
coerced: true,
|
|
187
|
+
warning: {
|
|
188
|
+
field: fieldName,
|
|
189
|
+
message: `Coerced '${value}' string to null`,
|
|
190
|
+
originalValue: value,
|
|
191
|
+
coercedValue: null,
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
// For required fields, try type-specific coercion below
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
switch (targetType) {
|
|
199
|
+
case 'number':
|
|
200
|
+
return coerceToNumber(value, fieldName);
|
|
201
|
+
case 'integer':
|
|
202
|
+
return coerceToInteger(value, fieldName);
|
|
203
|
+
case 'boolean':
|
|
204
|
+
return coerceToBoolean(value, fieldName);
|
|
205
|
+
case 'string':
|
|
206
|
+
return coerceToString(value, fieldName);
|
|
207
|
+
default:
|
|
208
|
+
return { value, coerced: false };
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Coerce value to number
|
|
213
|
+
*/
|
|
214
|
+
function coerceToNumber(value, fieldName) {
|
|
215
|
+
// Already a number
|
|
216
|
+
if (typeof value === 'number') {
|
|
217
|
+
return { value, coerced: false };
|
|
218
|
+
}
|
|
219
|
+
// String to number
|
|
220
|
+
if (typeof value === 'string') {
|
|
221
|
+
const trimmed = value.trim();
|
|
222
|
+
// Handle empty or null-like strings
|
|
223
|
+
if (NULL_STRINGS.has(trimmed.toLowerCase())) {
|
|
224
|
+
return { value, coerced: false }; // Let validation handle it
|
|
225
|
+
}
|
|
226
|
+
// Try to parse as number
|
|
227
|
+
const parsed = parseFloat(trimmed);
|
|
228
|
+
if (!isNaN(parsed)) {
|
|
229
|
+
return {
|
|
230
|
+
value: parsed,
|
|
231
|
+
coerced: true,
|
|
232
|
+
warning: {
|
|
233
|
+
field: fieldName,
|
|
234
|
+
message: `Coerced string '${value}' to number ${parsed}`,
|
|
235
|
+
originalValue: value,
|
|
236
|
+
coercedValue: parsed,
|
|
237
|
+
},
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
// Boolean to number
|
|
242
|
+
if (typeof value === 'boolean') {
|
|
243
|
+
const num = value ? 1 : 0;
|
|
244
|
+
return {
|
|
245
|
+
value: num,
|
|
246
|
+
coerced: true,
|
|
247
|
+
warning: {
|
|
248
|
+
field: fieldName,
|
|
249
|
+
message: `Coerced boolean ${value} to number ${num}`,
|
|
250
|
+
originalValue: value,
|
|
251
|
+
coercedValue: num,
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
return { value, coerced: false };
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Coerce value to integer
|
|
259
|
+
*/
|
|
260
|
+
function coerceToInteger(value, fieldName) {
|
|
261
|
+
// First coerce to number
|
|
262
|
+
const numberResult = coerceToNumber(value, fieldName);
|
|
263
|
+
if (typeof numberResult.value === 'number') {
|
|
264
|
+
// If it's already an integer, keep as-is
|
|
265
|
+
if (Number.isInteger(numberResult.value)) {
|
|
266
|
+
return numberResult;
|
|
267
|
+
}
|
|
268
|
+
// Truncate to integer
|
|
269
|
+
const intValue = Math.trunc(numberResult.value);
|
|
270
|
+
return {
|
|
271
|
+
value: intValue,
|
|
272
|
+
coerced: true,
|
|
273
|
+
warning: {
|
|
274
|
+
field: fieldName,
|
|
275
|
+
message: `Coerced ${value} to integer ${intValue}`,
|
|
276
|
+
originalValue: value,
|
|
277
|
+
coercedValue: intValue,
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
return { value, coerced: false };
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Coerce value to boolean
|
|
285
|
+
*/
|
|
286
|
+
function coerceToBoolean(value, fieldName) {
|
|
287
|
+
// Already a boolean
|
|
288
|
+
if (typeof value === 'boolean') {
|
|
289
|
+
return { value, coerced: false };
|
|
290
|
+
}
|
|
291
|
+
// String to boolean
|
|
292
|
+
if (typeof value === 'string') {
|
|
293
|
+
const normalized = value.trim().toLowerCase();
|
|
294
|
+
if (TRUE_STRINGS.has(normalized)) {
|
|
295
|
+
return {
|
|
296
|
+
value: true,
|
|
297
|
+
coerced: true,
|
|
298
|
+
warning: {
|
|
299
|
+
field: fieldName,
|
|
300
|
+
message: `Coerced string '${value}' to boolean true`,
|
|
301
|
+
originalValue: value,
|
|
302
|
+
coercedValue: true,
|
|
303
|
+
},
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
if (FALSE_STRINGS.has(normalized)) {
|
|
307
|
+
return {
|
|
308
|
+
value: false,
|
|
309
|
+
coerced: true,
|
|
310
|
+
warning: {
|
|
311
|
+
field: fieldName,
|
|
312
|
+
message: `Coerced string '${value}' to boolean false`,
|
|
313
|
+
originalValue: value,
|
|
314
|
+
coercedValue: false,
|
|
315
|
+
},
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
// Number to boolean
|
|
320
|
+
if (typeof value === 'number') {
|
|
321
|
+
const boolValue = value !== 0;
|
|
322
|
+
return {
|
|
323
|
+
value: boolValue,
|
|
324
|
+
coerced: true,
|
|
325
|
+
warning: {
|
|
326
|
+
field: fieldName,
|
|
327
|
+
message: `Coerced number ${value} to boolean ${boolValue}`,
|
|
328
|
+
originalValue: value,
|
|
329
|
+
coercedValue: boolValue,
|
|
330
|
+
},
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
return { value, coerced: false };
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Coerce value to string
|
|
337
|
+
*/
|
|
338
|
+
function coerceToString(value, fieldName) {
|
|
339
|
+
// Already a string
|
|
340
|
+
if (typeof value === 'string') {
|
|
341
|
+
return { value, coerced: false };
|
|
342
|
+
}
|
|
343
|
+
// Number or boolean to string
|
|
344
|
+
if (typeof value === 'number' || typeof value === 'boolean') {
|
|
345
|
+
const strValue = String(value);
|
|
346
|
+
return {
|
|
347
|
+
value: strValue,
|
|
348
|
+
coerced: true,
|
|
349
|
+
warning: {
|
|
350
|
+
field: fieldName,
|
|
351
|
+
message: `Coerced ${typeof value} ${value} to string '${strValue}'`,
|
|
352
|
+
originalValue: value,
|
|
353
|
+
coercedValue: strValue,
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
return { value, coerced: false };
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Coerce all values in an extracted data object (recursive)
|
|
361
|
+
*
|
|
362
|
+
* Handles:
|
|
363
|
+
* - Top-level field coercion
|
|
364
|
+
* - Enum value normalization (case-insensitive)
|
|
365
|
+
* - Recursive coercion for array items
|
|
366
|
+
* - Recursive coercion for nested objects
|
|
367
|
+
*
|
|
368
|
+
* @param data - The extracted data object
|
|
369
|
+
* @param fields - Field definitions from schema
|
|
370
|
+
* @returns Coerced data and any warnings generated
|
|
371
|
+
*/
|
|
372
|
+
export function coerceExtractedData(data, fields) {
|
|
373
|
+
const coercedData = { ...data };
|
|
374
|
+
const warnings = [];
|
|
375
|
+
for (const [fieldName, fieldDef] of Object.entries(fields)) {
|
|
376
|
+
if (!(fieldName in data))
|
|
377
|
+
continue;
|
|
378
|
+
const value = data[fieldName];
|
|
379
|
+
// Handle null/undefined - no coercion needed
|
|
380
|
+
if (value === null || value === undefined) {
|
|
381
|
+
coercedData[fieldName] = value;
|
|
382
|
+
continue;
|
|
383
|
+
}
|
|
384
|
+
// Handle array type - recursively coerce items
|
|
385
|
+
if (fieldDef.type === 'array' && Array.isArray(value) && fieldDef.items) {
|
|
386
|
+
const { array: coercedArray, warnings: arrayWarnings } = coerceArrayItems(value, fieldDef.items, fieldName);
|
|
387
|
+
coercedData[fieldName] = coercedArray;
|
|
388
|
+
warnings.push(...arrayWarnings);
|
|
389
|
+
continue;
|
|
390
|
+
}
|
|
391
|
+
// Handle object type - recursively coerce properties
|
|
392
|
+
if (fieldDef.type === 'object' && typeof value === 'object' && !Array.isArray(value) && fieldDef.properties) {
|
|
393
|
+
const { data: coercedObj, warnings: objWarnings } = coerceExtractedData(value, fieldDef.properties);
|
|
394
|
+
// Update warning field paths
|
|
395
|
+
for (const w of objWarnings) {
|
|
396
|
+
w.field = `${fieldName}.${w.field}`;
|
|
397
|
+
}
|
|
398
|
+
coercedData[fieldName] = coercedObj;
|
|
399
|
+
warnings.push(...objWarnings);
|
|
400
|
+
continue;
|
|
401
|
+
}
|
|
402
|
+
// Handle string with enum - try enum coercion first
|
|
403
|
+
if (fieldDef.type === 'string' && typeof value === 'string' && fieldDef.enum) {
|
|
404
|
+
const enumResult = coerceEnumValue(value, fieldDef.enum, fieldName);
|
|
405
|
+
coercedData[fieldName] = enumResult.value;
|
|
406
|
+
if (enumResult.warning) {
|
|
407
|
+
warnings.push(enumResult.warning);
|
|
408
|
+
}
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
// Handle string with date/date-time format - normalize to ISO
|
|
412
|
+
if (fieldDef.type === 'string' && typeof value === 'string' &&
|
|
413
|
+
(fieldDef.format === 'date' || fieldDef.format === 'date-time')) {
|
|
414
|
+
const dateResult = coerceDateValue(value, fieldName);
|
|
415
|
+
coercedData[fieldName] = dateResult.value;
|
|
416
|
+
if (dateResult.warning) {
|
|
417
|
+
warnings.push(dateResult.warning);
|
|
418
|
+
}
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
// Standard type coercion
|
|
422
|
+
const result = coerceValue(value, fieldDef.type, fieldName, fieldDef.optional ?? false);
|
|
423
|
+
coercedData[fieldName] = result.value;
|
|
424
|
+
if (result.warning) {
|
|
425
|
+
warnings.push(result.warning);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return { data: coercedData, warnings };
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Coerce array items recursively
|
|
432
|
+
*
|
|
433
|
+
* @param array - The array to coerce
|
|
434
|
+
* @param itemDef - Definition of array items
|
|
435
|
+
* @param fieldName - Parent field name for error paths
|
|
436
|
+
* @returns Coerced array and any warnings
|
|
437
|
+
*/
|
|
438
|
+
function coerceArrayItems(array, itemDef, fieldName) {
|
|
439
|
+
const coercedArray = [];
|
|
440
|
+
const warnings = [];
|
|
441
|
+
for (let i = 0; i < array.length; i++) {
|
|
442
|
+
const item = array[i];
|
|
443
|
+
const itemPath = `${fieldName}[${i}]`;
|
|
444
|
+
// Only handle object items for now (as per ArrayItemDefinition)
|
|
445
|
+
if (itemDef.type === 'object' && typeof item === 'object' && item !== null && !Array.isArray(item) && itemDef.properties) {
|
|
446
|
+
const { data: coercedItem, warnings: itemWarnings } = coerceExtractedData(item, itemDef.properties);
|
|
447
|
+
// Update warning field paths
|
|
448
|
+
for (const w of itemWarnings) {
|
|
449
|
+
w.field = `${itemPath}.${w.field}`;
|
|
450
|
+
}
|
|
451
|
+
coercedArray.push(coercedItem);
|
|
452
|
+
warnings.push(...itemWarnings);
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
// Non-object items are passed through as-is
|
|
456
|
+
coercedArray.push(item);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
return { array: coercedArray, warnings };
|
|
460
|
+
}
|
|
461
|
+
//# sourceMappingURL=coercion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coercion.js","sourceRoot":"","sources":["../../src/core/coercion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAuBH;;GAEG;AACH,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;AAE7E;;GAEG;AACH,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;AAEnD;;GAEG;AACH,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;AAEpD;;;GAGG;AACH,SAAS,kBAAkB,CAAC,KAAa;IACrC,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC3B,KAAa,EACb,UAAoB,EACpB,SAAiB;IAEjB,mCAAmC;IACnC,IAAI,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACrC,CAAC;IAED,uBAAuB;IACvB,MAAM,UAAU,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;I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AQ,GAAG,GAAG,SAAS,IAAI,CAAC,GAAG,CAAC;QAEtC,gEAAgE;QAChE,IAAI,OAAO,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YACvH,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,mBAAmB,CACrE,IAA+B,EAC/B,OAAO,CAAC,UAAU,CACrB,CAAC;YACF,6BAA6B;YAC7B,KAAK,MAAM,CAAC,IAAI,YAAY,EAAE,CAAC;gBAC3B,CAAC,CAAC,KAAK,GAAG,GAAG,QAAQ,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;YACvC,CAAC;YACD,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC/B,QAAQ,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACJ,4CAA4C;YAC5C,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACL,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;AAC7C,CAAC"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { ExtractionPipeline, extract } from './pipeline.js';
|
|
5
5
|
export { validateExtractedData } from './validator.js';
|
|
6
|
+
export { coerceValue, coerceExtractedData, coerceEnumValue, coerceDateValue } from './coercion.js';
|
|
6
7
|
export { PipelineError, PipelineErrorCodes } from './errors.js';
|
|
7
8
|
export { stripHtml, preprocess, preprocessWithDetails, resolveHtmlStripOptions, } from './preprocessor.js';
|
|
8
9
|
export type { PreprocessResult } from './preprocessor.js';
|
|
9
10
|
export type { PipelineConfig, ExtractionRequest, PipelineResult, StepResult, HtmlStripOptions, PreprocessingConfig, } from './types.js';
|
|
11
|
+
export type { CoercionWarning, CoercionResult } from './coercion.js';
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EACH,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,uBAAuB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,YAAY,EACR,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,mBAAmB,GACtB,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EACH,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,uBAAuB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,YAAY,EACR,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,mBAAmB,GACtB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { ExtractionPipeline, extract } from './pipeline.js';
|
|
5
5
|
export { validateExtractedData } from './validator.js';
|
|
6
|
+
export { coerceValue, coerceExtractedData, coerceEnumValue, coerceDateValue } from './coercion.js';
|
|
6
7
|
export { PipelineError, PipelineErrorCodes } from './errors.js';
|
|
7
8
|
export { stripHtml, preprocess, preprocessWithDetails, resolveHtmlStripOptions, } from './preprocessor.js';
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EACH,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,uBAAuB,GAC1B,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EACH,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,uBAAuB,GAC1B,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/core/pipeline.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/core/pipeline.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAc,MAAM,YAAY,CAAC;AAEhF;;GAEG;AACH,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,KAAK,CAAU;gBAEX,KAAK,GAAE,OAAe;IAIlC;;OAEG;IACG,OAAO,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;IAqMlE;;OAEG;IACH,OAAO,CAAC,UAAU;IAsBlB;;OAEG;YACW,eAAe;CAqBhC;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAGjF"}
|