@utilix-tech/sdk 0.1.2 → 0.2.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/dist/ai_agent-CcpkV2DR.d.cts +393 -0
- package/dist/ai_agent-CcpkV2DR.d.ts +393 -0
- package/dist/chunk-M35VJETW.js +953 -0
- package/dist/{chunk-ZKL2VX2G.js → chunk-NSOARQCM.js} +68 -1
- package/dist/{chunk-L6KCTHUW.js → chunk-OKSWDVOM.js} +133 -2
- package/dist/{code-QNrdLIR3.d.cts → code-BUqyaofO.d.cts} +18 -2
- package/dist/{code-QNrdLIR3.d.ts → code-BUqyaofO.d.ts} +18 -2
- package/dist/index.cjs +1158 -10
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/{misc-DcVBManm.d.cts → misc-CA3N198T.d.cts} +67 -2
- package/dist/{misc-DcVBManm.d.ts → misc-CA3N198T.d.ts} +67 -2
- package/dist/tools/ai_agent.cjs +949 -0
- package/dist/tools/ai_agent.d.cts +1 -0
- package/dist/tools/ai_agent.d.ts +1 -0
- package/dist/tools/ai_agent.js +2 -0
- package/dist/tools/code.cjs +67 -0
- package/dist/tools/code.d.cts +1 -1
- package/dist/tools/code.d.ts +1 -1
- package/dist/tools/code.js +1 -1
- package/dist/tools/misc.cjs +136 -0
- package/dist/tools/misc.d.cts +1 -1
- package/dist/tools/misc.d.ts +1 -1
- package/dist/tools/misc.js +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ai_agent
|
|
3
|
+
* AI agent utility tools for the @utilix/sdk Node.js SDK.
|
|
4
|
+
*
|
|
5
|
+
* Tools covered:
|
|
6
|
+
* - estimate-tokens : estimateTokens, estimateCost
|
|
7
|
+
* - pii-detector : detectPii, redactPii
|
|
8
|
+
* - secret-detector : detectSecrets
|
|
9
|
+
* - prompt-injection : detectPromptInjection
|
|
10
|
+
* - json-repair : repairJson
|
|
11
|
+
*/
|
|
12
|
+
interface ModelPricing {
|
|
13
|
+
model: string;
|
|
14
|
+
label: string;
|
|
15
|
+
inputPer1M: number;
|
|
16
|
+
outputPer1M: number;
|
|
17
|
+
}
|
|
18
|
+
declare const MODEL_PRICING: ModelPricing[];
|
|
19
|
+
interface TokenEstimate {
|
|
20
|
+
tokens: number;
|
|
21
|
+
chars: number;
|
|
22
|
+
words: number;
|
|
23
|
+
method: 'approximate';
|
|
24
|
+
}
|
|
25
|
+
interface CostEstimate {
|
|
26
|
+
model: string;
|
|
27
|
+
label: string;
|
|
28
|
+
inputCost: number;
|
|
29
|
+
outputCost: number;
|
|
30
|
+
totalCost: number;
|
|
31
|
+
}
|
|
32
|
+
interface TokenEstimateResult {
|
|
33
|
+
estimate: TokenEstimate;
|
|
34
|
+
costs: CostEstimate[];
|
|
35
|
+
model?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Estimate token count using cl100k_base approximation.
|
|
39
|
+
* ~1 token per 4 chars, adjusted for whitespace and punctuation patterns.
|
|
40
|
+
*/
|
|
41
|
+
declare function estimateTokens(text: string): TokenEstimate;
|
|
42
|
+
/**
|
|
43
|
+
* Estimate cost across all models for a given token count.
|
|
44
|
+
* Pass outputTokens to estimate output cost (defaults to same as input).
|
|
45
|
+
*/
|
|
46
|
+
declare function estimateCost(inputTokens: number, outputTokens?: number, model?: string): TokenEstimateResult;
|
|
47
|
+
type PiiType = 'email' | 'phone' | 'ssn' | 'credit_card' | 'ip_address' | 'date_of_birth' | 'passport' | 'driver_license' | 'iban' | 'crypto_wallet';
|
|
48
|
+
interface PiiFinding {
|
|
49
|
+
type: PiiType;
|
|
50
|
+
label: string;
|
|
51
|
+
value: string;
|
|
52
|
+
masked: string;
|
|
53
|
+
start: number;
|
|
54
|
+
end: number;
|
|
55
|
+
}
|
|
56
|
+
interface PiiDetectResult {
|
|
57
|
+
found: boolean;
|
|
58
|
+
count: number;
|
|
59
|
+
findings: PiiFinding[];
|
|
60
|
+
redacted?: string;
|
|
61
|
+
}
|
|
62
|
+
declare function detectPii(text: string): PiiDetectResult;
|
|
63
|
+
declare function redactPii(text: string, replacement?: string): PiiDetectResult;
|
|
64
|
+
type SecretType = 'openai_key' | 'anthropic_key' | 'aws_key' | 'github_token' | 'stripe_key' | 'google_api_key' | 'twilio_key' | 'jwt_token' | 'private_key' | 'generic_api_key' | 'slack_token' | 'sendgrid_key' | 'mailgun_key' | 'heroku_key' | 'npm_token';
|
|
65
|
+
interface SecretFinding {
|
|
66
|
+
type: SecretType;
|
|
67
|
+
label: string;
|
|
68
|
+
value: string;
|
|
69
|
+
masked: string;
|
|
70
|
+
line: number;
|
|
71
|
+
column: number;
|
|
72
|
+
}
|
|
73
|
+
interface SecretDetectResult {
|
|
74
|
+
found: boolean;
|
|
75
|
+
count: number;
|
|
76
|
+
findings: SecretFinding[];
|
|
77
|
+
riskLevel: 'none' | 'low' | 'medium' | 'high' | 'critical';
|
|
78
|
+
}
|
|
79
|
+
declare function detectSecrets(text: string): SecretDetectResult;
|
|
80
|
+
interface InjectionFinding {
|
|
81
|
+
pattern: string;
|
|
82
|
+
matched: string;
|
|
83
|
+
severity: 'low' | 'medium' | 'high';
|
|
84
|
+
}
|
|
85
|
+
interface InjectionDetectResult {
|
|
86
|
+
isInjection: boolean;
|
|
87
|
+
score: number;
|
|
88
|
+
severity: 'none' | 'low' | 'medium' | 'high';
|
|
89
|
+
findings: InjectionFinding[];
|
|
90
|
+
}
|
|
91
|
+
declare function detectPromptInjection(text: string): InjectionDetectResult;
|
|
92
|
+
interface JsonRepairResult {
|
|
93
|
+
ok: boolean;
|
|
94
|
+
repaired: string;
|
|
95
|
+
original: string;
|
|
96
|
+
fixes: string[];
|
|
97
|
+
error?: string;
|
|
98
|
+
}
|
|
99
|
+
declare function repairJson(input: string): JsonRepairResult;
|
|
100
|
+
type TrimStrategy = 'end' | 'start' | 'middle';
|
|
101
|
+
interface TrimResult {
|
|
102
|
+
trimmed: string;
|
|
103
|
+
originalTokens: number;
|
|
104
|
+
trimmedTokens: number;
|
|
105
|
+
truncated: boolean;
|
|
106
|
+
removedChars: number;
|
|
107
|
+
}
|
|
108
|
+
declare function trimToTokens(text: string, maxTokens: number, strategy?: TrimStrategy): TrimResult;
|
|
109
|
+
type ChunkStrategy = 'sentence' | 'paragraph' | 'fixed';
|
|
110
|
+
interface TextChunk {
|
|
111
|
+
index: number;
|
|
112
|
+
text: string;
|
|
113
|
+
tokens: number;
|
|
114
|
+
startChar: number;
|
|
115
|
+
endChar: number;
|
|
116
|
+
}
|
|
117
|
+
declare function chunkText(text: string, chunkSize?: number, overlap?: number, strategy?: ChunkStrategy): TextChunk[];
|
|
118
|
+
interface UrlMatch {
|
|
119
|
+
url: string;
|
|
120
|
+
protocol: string;
|
|
121
|
+
domain: string;
|
|
122
|
+
path: string;
|
|
123
|
+
position: number;
|
|
124
|
+
}
|
|
125
|
+
interface ExtractUrlsResult {
|
|
126
|
+
urls: UrlMatch[];
|
|
127
|
+
count: number;
|
|
128
|
+
}
|
|
129
|
+
declare function extractUrls(text: string): ExtractUrlsResult;
|
|
130
|
+
interface SanitizeResult {
|
|
131
|
+
text: string;
|
|
132
|
+
removedTags: number;
|
|
133
|
+
removedScripts: number;
|
|
134
|
+
removedStyles: number;
|
|
135
|
+
originalLength: number;
|
|
136
|
+
cleanLength: number;
|
|
137
|
+
}
|
|
138
|
+
declare function sanitizeHtml(html: string, keepLinks?: boolean): SanitizeResult;
|
|
139
|
+
declare function flattenJson(obj: unknown, separator?: string, prefix?: string): Record<string, unknown>;
|
|
140
|
+
declare function unflattenJson(flat: Record<string, unknown>, separator?: string): unknown;
|
|
141
|
+
type MergeStrategy = 'deep' | 'shallow' | 'replace-arrays';
|
|
142
|
+
interface MergeResult {
|
|
143
|
+
merged: unknown;
|
|
144
|
+
conflicts: Array<{
|
|
145
|
+
path: string;
|
|
146
|
+
base: unknown;
|
|
147
|
+
override: unknown;
|
|
148
|
+
}>;
|
|
149
|
+
}
|
|
150
|
+
declare function mergeJson(base: unknown, override: unknown, strategy?: MergeStrategy): MergeResult;
|
|
151
|
+
interface JsonBlock {
|
|
152
|
+
index: number;
|
|
153
|
+
raw: string;
|
|
154
|
+
parsed: unknown;
|
|
155
|
+
type: string;
|
|
156
|
+
source: 'code-block' | 'inline';
|
|
157
|
+
startPos: number;
|
|
158
|
+
}
|
|
159
|
+
interface ExtractJsonResult {
|
|
160
|
+
blocks: JsonBlock[];
|
|
161
|
+
count: number;
|
|
162
|
+
}
|
|
163
|
+
declare function extractJson(text: string): ExtractJsonResult;
|
|
164
|
+
type DedupeStrategy = 'exact' | 'case-insensitive' | 'trimmed' | 'normalized';
|
|
165
|
+
interface DedupeResult {
|
|
166
|
+
lines: string[];
|
|
167
|
+
originalCount: number;
|
|
168
|
+
uniqueCount: number;
|
|
169
|
+
removedCount: number;
|
|
170
|
+
duplicates: Array<{
|
|
171
|
+
line: string;
|
|
172
|
+
count: number;
|
|
173
|
+
firstLine: number;
|
|
174
|
+
}>;
|
|
175
|
+
}
|
|
176
|
+
declare function deduplicateLines(text: string, strategy?: DedupeStrategy): DedupeResult;
|
|
177
|
+
interface Keyword {
|
|
178
|
+
word: string;
|
|
179
|
+
count: number;
|
|
180
|
+
score: number;
|
|
181
|
+
positions: number[];
|
|
182
|
+
}
|
|
183
|
+
interface ExtractKeywordsResult {
|
|
184
|
+
keywords: Keyword[];
|
|
185
|
+
totalWords: number;
|
|
186
|
+
uniqueWords: number;
|
|
187
|
+
}
|
|
188
|
+
declare function extractKeywords(text: string, maxKeywords?: number, minWordLen?: number): ExtractKeywordsResult;
|
|
189
|
+
interface ValidationError {
|
|
190
|
+
path: string;
|
|
191
|
+
message: string;
|
|
192
|
+
value?: unknown;
|
|
193
|
+
}
|
|
194
|
+
interface ValidationResult {
|
|
195
|
+
valid: boolean;
|
|
196
|
+
errors: ValidationError[];
|
|
197
|
+
}
|
|
198
|
+
declare function validateJsonSchema(data: unknown, schema: Record<string, unknown>): ValidationResult;
|
|
199
|
+
type DiffOp2 = 'added' | 'removed' | 'changed' | 'unchanged';
|
|
200
|
+
interface DiffEntry2 {
|
|
201
|
+
path: string;
|
|
202
|
+
op: DiffOp2;
|
|
203
|
+
oldValue?: unknown;
|
|
204
|
+
newValue?: unknown;
|
|
205
|
+
}
|
|
206
|
+
interface DiffResult2 {
|
|
207
|
+
entries: DiffEntry2[];
|
|
208
|
+
added: number;
|
|
209
|
+
removed: number;
|
|
210
|
+
changed: number;
|
|
211
|
+
unchanged: number;
|
|
212
|
+
totalPaths: number;
|
|
213
|
+
}
|
|
214
|
+
declare function diffJson(a: unknown, b: unknown): DiffResult2;
|
|
215
|
+
interface TableResult2 {
|
|
216
|
+
index: number;
|
|
217
|
+
caption: string;
|
|
218
|
+
headers: string[];
|
|
219
|
+
rows: string[][];
|
|
220
|
+
rowCount: number;
|
|
221
|
+
colCount: number;
|
|
222
|
+
}
|
|
223
|
+
declare function extractTables(html: string): {
|
|
224
|
+
tables: TableResult2[];
|
|
225
|
+
count: number;
|
|
226
|
+
};
|
|
227
|
+
type EntityType2 = 'email' | 'phone' | 'date' | 'ip' | 'creditCard' | 'ssn' | 'iban' | 'hashtag' | 'mention' | 'currency';
|
|
228
|
+
interface Entity2 {
|
|
229
|
+
type: EntityType2;
|
|
230
|
+
value: string;
|
|
231
|
+
position: number;
|
|
232
|
+
}
|
|
233
|
+
declare function extractEntities(text: string): {
|
|
234
|
+
entities: Entity2[];
|
|
235
|
+
byType: Partial<Record<EntityType2, Entity2[]>>;
|
|
236
|
+
count: number;
|
|
237
|
+
};
|
|
238
|
+
interface CompressHtmlResult {
|
|
239
|
+
compressed: string;
|
|
240
|
+
originalBytes: number;
|
|
241
|
+
compressedBytes: number;
|
|
242
|
+
originalTokens: number;
|
|
243
|
+
compressedTokens: number;
|
|
244
|
+
savings: number;
|
|
245
|
+
savingsPct: number;
|
|
246
|
+
}
|
|
247
|
+
declare function compressHtml(html: string, opts?: {
|
|
248
|
+
removeComments?: boolean;
|
|
249
|
+
removeScripts?: boolean;
|
|
250
|
+
removeStyles?: boolean;
|
|
251
|
+
collapseWhitespace?: boolean;
|
|
252
|
+
}): CompressHtmlResult;
|
|
253
|
+
interface CompressMarkdownResult {
|
|
254
|
+
compressed: string;
|
|
255
|
+
originalTokens: number;
|
|
256
|
+
compressedTokens: number;
|
|
257
|
+
savings: number;
|
|
258
|
+
savingsPct: number;
|
|
259
|
+
changes: string[];
|
|
260
|
+
}
|
|
261
|
+
declare function compressMarkdown(md: string, opts?: {
|
|
262
|
+
collapseBlankLines?: boolean;
|
|
263
|
+
removeComments?: boolean;
|
|
264
|
+
stripFrontmatter?: boolean;
|
|
265
|
+
trimLines?: boolean;
|
|
266
|
+
removeHorizontalRules?: boolean;
|
|
267
|
+
}): CompressMarkdownResult;
|
|
268
|
+
interface CompressJsonResult {
|
|
269
|
+
compressed: string;
|
|
270
|
+
originalTokens: number;
|
|
271
|
+
compressedTokens: number;
|
|
272
|
+
savings: number;
|
|
273
|
+
savingsPct: number;
|
|
274
|
+
removedNulls: number;
|
|
275
|
+
removedEmptyArrays: number;
|
|
276
|
+
removedEmptyObjects: number;
|
|
277
|
+
}
|
|
278
|
+
declare function compressJson(json: unknown, opts?: {
|
|
279
|
+
removeNulls?: boolean;
|
|
280
|
+
removeEmptyArrays?: boolean;
|
|
281
|
+
removeEmptyObjects?: boolean;
|
|
282
|
+
sortKeys?: boolean;
|
|
283
|
+
}): CompressJsonResult;
|
|
284
|
+
interface RankedChunk {
|
|
285
|
+
index: number;
|
|
286
|
+
text: string;
|
|
287
|
+
score: number;
|
|
288
|
+
matchedTerms: string[];
|
|
289
|
+
}
|
|
290
|
+
declare function rerankChunks(query: string, chunks: string[], topK?: number): {
|
|
291
|
+
ranked: RankedChunk[];
|
|
292
|
+
query: string;
|
|
293
|
+
totalChunks: number;
|
|
294
|
+
};
|
|
295
|
+
interface RelevanceResult {
|
|
296
|
+
score: number;
|
|
297
|
+
grade: 'high' | 'medium' | 'low' | 'none';
|
|
298
|
+
matchedTerms: string[];
|
|
299
|
+
coverage: number;
|
|
300
|
+
}
|
|
301
|
+
declare function scoreRelevance(query: string, passage: string): RelevanceResult;
|
|
302
|
+
declare function expandQuery(query: string, maxSynonyms?: number): {
|
|
303
|
+
original: string;
|
|
304
|
+
expanded: string;
|
|
305
|
+
terms: string[];
|
|
306
|
+
synonymsAdded: string[];
|
|
307
|
+
};
|
|
308
|
+
interface SummaryResult {
|
|
309
|
+
summary: string;
|
|
310
|
+
originalTokens: number;
|
|
311
|
+
summaryTokens: number;
|
|
312
|
+
compressionRatio: number;
|
|
313
|
+
sentencesKept: number;
|
|
314
|
+
sentencesTotal: number;
|
|
315
|
+
}
|
|
316
|
+
declare function summarizeForLlm(text: string, maxTokens?: number, strategy?: 'extractive' | 'first' | 'last'): SummaryResult;
|
|
317
|
+
|
|
318
|
+
type ai_agent_ChunkStrategy = ChunkStrategy;
|
|
319
|
+
type ai_agent_CompressHtmlResult = CompressHtmlResult;
|
|
320
|
+
type ai_agent_CompressJsonResult = CompressJsonResult;
|
|
321
|
+
type ai_agent_CompressMarkdownResult = CompressMarkdownResult;
|
|
322
|
+
type ai_agent_CostEstimate = CostEstimate;
|
|
323
|
+
type ai_agent_DedupeResult = DedupeResult;
|
|
324
|
+
type ai_agent_DedupeStrategy = DedupeStrategy;
|
|
325
|
+
type ai_agent_DiffEntry2 = DiffEntry2;
|
|
326
|
+
type ai_agent_DiffOp2 = DiffOp2;
|
|
327
|
+
type ai_agent_DiffResult2 = DiffResult2;
|
|
328
|
+
type ai_agent_Entity2 = Entity2;
|
|
329
|
+
type ai_agent_EntityType2 = EntityType2;
|
|
330
|
+
type ai_agent_ExtractJsonResult = ExtractJsonResult;
|
|
331
|
+
type ai_agent_ExtractKeywordsResult = ExtractKeywordsResult;
|
|
332
|
+
type ai_agent_ExtractUrlsResult = ExtractUrlsResult;
|
|
333
|
+
type ai_agent_InjectionDetectResult = InjectionDetectResult;
|
|
334
|
+
type ai_agent_InjectionFinding = InjectionFinding;
|
|
335
|
+
type ai_agent_JsonBlock = JsonBlock;
|
|
336
|
+
type ai_agent_JsonRepairResult = JsonRepairResult;
|
|
337
|
+
type ai_agent_Keyword = Keyword;
|
|
338
|
+
declare const ai_agent_MODEL_PRICING: typeof MODEL_PRICING;
|
|
339
|
+
type ai_agent_MergeResult = MergeResult;
|
|
340
|
+
type ai_agent_MergeStrategy = MergeStrategy;
|
|
341
|
+
type ai_agent_ModelPricing = ModelPricing;
|
|
342
|
+
type ai_agent_PiiDetectResult = PiiDetectResult;
|
|
343
|
+
type ai_agent_PiiFinding = PiiFinding;
|
|
344
|
+
type ai_agent_PiiType = PiiType;
|
|
345
|
+
type ai_agent_RankedChunk = RankedChunk;
|
|
346
|
+
type ai_agent_RelevanceResult = RelevanceResult;
|
|
347
|
+
type ai_agent_SanitizeResult = SanitizeResult;
|
|
348
|
+
type ai_agent_SecretDetectResult = SecretDetectResult;
|
|
349
|
+
type ai_agent_SecretFinding = SecretFinding;
|
|
350
|
+
type ai_agent_SecretType = SecretType;
|
|
351
|
+
type ai_agent_SummaryResult = SummaryResult;
|
|
352
|
+
type ai_agent_TableResult2 = TableResult2;
|
|
353
|
+
type ai_agent_TextChunk = TextChunk;
|
|
354
|
+
type ai_agent_TokenEstimate = TokenEstimate;
|
|
355
|
+
type ai_agent_TokenEstimateResult = TokenEstimateResult;
|
|
356
|
+
type ai_agent_TrimResult = TrimResult;
|
|
357
|
+
type ai_agent_TrimStrategy = TrimStrategy;
|
|
358
|
+
type ai_agent_UrlMatch = UrlMatch;
|
|
359
|
+
type ai_agent_ValidationError = ValidationError;
|
|
360
|
+
type ai_agent_ValidationResult = ValidationResult;
|
|
361
|
+
declare const ai_agent_chunkText: typeof chunkText;
|
|
362
|
+
declare const ai_agent_compressHtml: typeof compressHtml;
|
|
363
|
+
declare const ai_agent_compressJson: typeof compressJson;
|
|
364
|
+
declare const ai_agent_compressMarkdown: typeof compressMarkdown;
|
|
365
|
+
declare const ai_agent_deduplicateLines: typeof deduplicateLines;
|
|
366
|
+
declare const ai_agent_detectPii: typeof detectPii;
|
|
367
|
+
declare const ai_agent_detectPromptInjection: typeof detectPromptInjection;
|
|
368
|
+
declare const ai_agent_detectSecrets: typeof detectSecrets;
|
|
369
|
+
declare const ai_agent_diffJson: typeof diffJson;
|
|
370
|
+
declare const ai_agent_estimateCost: typeof estimateCost;
|
|
371
|
+
declare const ai_agent_estimateTokens: typeof estimateTokens;
|
|
372
|
+
declare const ai_agent_expandQuery: typeof expandQuery;
|
|
373
|
+
declare const ai_agent_extractEntities: typeof extractEntities;
|
|
374
|
+
declare const ai_agent_extractJson: typeof extractJson;
|
|
375
|
+
declare const ai_agent_extractKeywords: typeof extractKeywords;
|
|
376
|
+
declare const ai_agent_extractTables: typeof extractTables;
|
|
377
|
+
declare const ai_agent_extractUrls: typeof extractUrls;
|
|
378
|
+
declare const ai_agent_flattenJson: typeof flattenJson;
|
|
379
|
+
declare const ai_agent_mergeJson: typeof mergeJson;
|
|
380
|
+
declare const ai_agent_redactPii: typeof redactPii;
|
|
381
|
+
declare const ai_agent_repairJson: typeof repairJson;
|
|
382
|
+
declare const ai_agent_rerankChunks: typeof rerankChunks;
|
|
383
|
+
declare const ai_agent_sanitizeHtml: typeof sanitizeHtml;
|
|
384
|
+
declare const ai_agent_scoreRelevance: typeof scoreRelevance;
|
|
385
|
+
declare const ai_agent_summarizeForLlm: typeof summarizeForLlm;
|
|
386
|
+
declare const ai_agent_trimToTokens: typeof trimToTokens;
|
|
387
|
+
declare const ai_agent_unflattenJson: typeof unflattenJson;
|
|
388
|
+
declare const ai_agent_validateJsonSchema: typeof validateJsonSchema;
|
|
389
|
+
declare namespace ai_agent {
|
|
390
|
+
export { type ai_agent_ChunkStrategy as ChunkStrategy, type ai_agent_CompressHtmlResult as CompressHtmlResult, type ai_agent_CompressJsonResult as CompressJsonResult, type ai_agent_CompressMarkdownResult as CompressMarkdownResult, type ai_agent_CostEstimate as CostEstimate, type ai_agent_DedupeResult as DedupeResult, type ai_agent_DedupeStrategy as DedupeStrategy, type ai_agent_DiffEntry2 as DiffEntry2, type ai_agent_DiffOp2 as DiffOp2, type ai_agent_DiffResult2 as DiffResult2, type ai_agent_Entity2 as Entity2, type ai_agent_EntityType2 as EntityType2, type ai_agent_ExtractJsonResult as ExtractJsonResult, type ai_agent_ExtractKeywordsResult as ExtractKeywordsResult, type ai_agent_ExtractUrlsResult as ExtractUrlsResult, type ai_agent_InjectionDetectResult as InjectionDetectResult, type ai_agent_InjectionFinding as InjectionFinding, type ai_agent_JsonBlock as JsonBlock, type ai_agent_JsonRepairResult as JsonRepairResult, type ai_agent_Keyword as Keyword, ai_agent_MODEL_PRICING as MODEL_PRICING, type ai_agent_MergeResult as MergeResult, type ai_agent_MergeStrategy as MergeStrategy, type ai_agent_ModelPricing as ModelPricing, type ai_agent_PiiDetectResult as PiiDetectResult, type ai_agent_PiiFinding as PiiFinding, type ai_agent_PiiType as PiiType, type ai_agent_RankedChunk as RankedChunk, type ai_agent_RelevanceResult as RelevanceResult, type ai_agent_SanitizeResult as SanitizeResult, type ai_agent_SecretDetectResult as SecretDetectResult, type ai_agent_SecretFinding as SecretFinding, type ai_agent_SecretType as SecretType, type ai_agent_SummaryResult as SummaryResult, type ai_agent_TableResult2 as TableResult2, type ai_agent_TextChunk as TextChunk, type ai_agent_TokenEstimate as TokenEstimate, type ai_agent_TokenEstimateResult as TokenEstimateResult, type ai_agent_TrimResult as TrimResult, type ai_agent_TrimStrategy as TrimStrategy, type ai_agent_UrlMatch as UrlMatch, type ai_agent_ValidationError as ValidationError, type ai_agent_ValidationResult as ValidationResult, ai_agent_chunkText as chunkText, ai_agent_compressHtml as compressHtml, ai_agent_compressJson as compressJson, ai_agent_compressMarkdown as compressMarkdown, ai_agent_deduplicateLines as deduplicateLines, ai_agent_detectPii as detectPii, ai_agent_detectPromptInjection as detectPromptInjection, ai_agent_detectSecrets as detectSecrets, ai_agent_diffJson as diffJson, ai_agent_estimateCost as estimateCost, ai_agent_estimateTokens as estimateTokens, ai_agent_expandQuery as expandQuery, ai_agent_extractEntities as extractEntities, ai_agent_extractJson as extractJson, ai_agent_extractKeywords as extractKeywords, ai_agent_extractTables as extractTables, ai_agent_extractUrls as extractUrls, ai_agent_flattenJson as flattenJson, ai_agent_mergeJson as mergeJson, ai_agent_redactPii as redactPii, ai_agent_repairJson as repairJson, ai_agent_rerankChunks as rerankChunks, ai_agent_sanitizeHtml as sanitizeHtml, ai_agent_scoreRelevance as scoreRelevance, ai_agent_summarizeForLlm as summarizeForLlm, ai_agent_trimToTokens as trimToTokens, ai_agent_unflattenJson as unflattenJson, ai_agent_validateJsonSchema as validateJsonSchema };
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
export { estimateCost as $, type TokenEstimate as A, type TokenEstimateResult as B, type ChunkStrategy as C, type DedupeResult as D, type Entity2 as E, type TrimResult as F, type TrimStrategy as G, type ValidationResult as H, type InjectionDetectResult as I, type JsonBlock as J, type Keyword as K, chunkText as L, MODEL_PRICING as M, compressHtml as N, compressJson as O, type PiiDetectResult as P, compressMarkdown as Q, type RankedChunk as R, type SanitizeResult as S, type TableResult2 as T, type UrlMatch as U, type ValidationError as V, deduplicateLines as W, detectPii as X, detectPromptInjection as Y, detectSecrets as Z, diffJson as _, ai_agent as a, estimateTokens as a0, expandQuery as a1, extractEntities as a2, extractJson as a3, extractKeywords as a4, extractTables as a5, extractUrls as a6, flattenJson as a7, mergeJson as a8, redactPii as a9, repairJson as aa, rerankChunks as ab, sanitizeHtml as ac, scoreRelevance as ad, summarizeForLlm as ae, trimToTokens as af, unflattenJson as ag, validateJsonSchema as ah, type CompressHtmlResult as b, type CompressJsonResult as c, type CompressMarkdownResult as d, type CostEstimate as e, type DedupeStrategy as f, type DiffEntry2 as g, type DiffOp2 as h, type DiffResult2 as i, type EntityType2 as j, type ExtractJsonResult as k, type ExtractKeywordsResult as l, type ExtractUrlsResult as m, type InjectionFinding as n, type JsonRepairResult as o, type MergeResult as p, type MergeStrategy as q, type ModelPricing as r, type PiiFinding as s, type PiiType as t, type RelevanceResult as u, type SecretDetectResult as v, type SecretFinding as w, type SecretType as x, type SummaryResult as y, type TextChunk as z };
|