avantgate 1.6.1 → 1.8.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/README.md +21 -59
- package/dist/agent/index.js +97 -24
- package/dist/agent/index.mjs +5 -2
- package/dist/agent/isolated-tool.d.ts +8 -3
- package/dist/agent/isolated-tool.d.ts.map +1 -1
- package/dist/agent/types.d.ts +16 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/{chunk-CO26LNFD.mjs → chunk-36ULFTM2.mjs} +8 -8
- package/dist/{chunk-4XWO3NZW.mjs → chunk-AH5XXSS4.mjs} +1 -1
- package/dist/{chunk-5VA3EKPJ.mjs → chunk-W27A25DK.mjs} +97 -25
- package/dist/chunk-Y6FXYEAI.mjs +10 -0
- package/dist/client/index.mjs +2 -0
- package/dist/control-layer.d.ts +8 -7
- package/dist/control-layer.d.ts.map +1 -1
- package/dist/finance/index.js +6 -6
- package/dist/finance/index.mjs +2 -1
- package/dist/finance/normalizer.d.ts +2 -2
- package/dist/finance/normalizer.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +558 -133
- package/dist/index.mjs +451 -106
- package/dist/input-guard.d.ts +2 -2
- package/dist/input-guard.d.ts.map +1 -1
- package/dist/pricing.d.ts +17 -16
- package/dist/pricing.d.ts.map +1 -1
- package/dist/providers/http-client.d.ts +2 -2
- package/dist/providers/http-client.d.ts.map +1 -1
- package/dist/response-validator.d.ts +2 -2
- package/dist/response-validator.d.ts.map +1 -1
- package/dist/sanitizer.d.ts +1 -1
- package/dist/sanitizer.d.ts.map +1 -1
- package/dist/secret-guard.d.ts +29 -0
- package/dist/secret-guard.d.ts.map +1 -0
- package/dist/sqlite-pricing-adapter.d.ts +87 -0
- package/dist/sqlite-pricing-adapter.d.ts.map +1 -0
- package/dist/types.d.ts +14 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/workflow/index.js +92 -24
- package/dist/workflow/index.mjs +3 -2
- package/package.json +5 -2
|
@@ -6,7 +6,7 @@ var SPI_LABELLED_REGEX = /(?:(?:num[ée]ro\s+fiscal|spi|n[°o]\s*fiscal|d[ée]cl
|
|
|
6
6
|
var SPI_FORMATTED_REGEX = /\b[0-3]\d(?:\s+\d{2}){5}\s+\d\b/g;
|
|
7
7
|
var IBAN_REGEX = /\b[A-Z]{2}\s*[0-9]{2}(?:[\s\r\n.-]*[A-Z0-9]){11,30}\b/g;
|
|
8
8
|
var BIC_LABELLED_REGEX = /(?:(?:bic|swift)\s*[:=]?\s*)\b([A-Z]{4}[A-Z]{2}[A-Z0-9]{2}(?:[A-Z0-9]{3})?)\b/gi;
|
|
9
|
-
|
|
9
|
+
var sanitizePII = (input) => {
|
|
10
10
|
let count = 0;
|
|
11
11
|
let result = input;
|
|
12
12
|
result = result.replace(EMAIL_REGEX, () => {
|
|
@@ -49,7 +49,7 @@ function sanitizePII(input) {
|
|
|
49
49
|
return match;
|
|
50
50
|
});
|
|
51
51
|
return { text: result, maskedCount: count };
|
|
52
|
-
}
|
|
52
|
+
};
|
|
53
53
|
|
|
54
54
|
// src/agent/errors.ts
|
|
55
55
|
var StepSuspendedError = class extends Error {
|
|
@@ -204,7 +204,23 @@ function auditToolResult(data, options) {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
// src/agent/isolated-tool.ts
|
|
207
|
-
|
|
207
|
+
var verifyRoles = (configuredRoles, context, toolIdentifier) => {
|
|
208
|
+
if (!configuredRoles || configuredRoles.length === 0) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
const userRoles = [
|
|
212
|
+
...context.roles ?? [],
|
|
213
|
+
...context.role ? [context.role] : []
|
|
214
|
+
];
|
|
215
|
+
const hasAllowedRole = configuredRoles.some((role) => userRoles.includes(role));
|
|
216
|
+
if (!hasAllowedRole) {
|
|
217
|
+
throw new ToolAccessDeniedError(
|
|
218
|
+
toolIdentifier,
|
|
219
|
+
"Access denied: insufficient role permissions"
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
var verifyDataAccessGuard = async (guard, args, context, toolIdentifier) => {
|
|
208
224
|
if (!guard) {
|
|
209
225
|
return;
|
|
210
226
|
}
|
|
@@ -212,8 +228,55 @@ async function verifyDataAccessGuard(guard, args, context, toolIdentifier) {
|
|
|
212
228
|
if (!isAllowed) {
|
|
213
229
|
throw new ToolAccessDeniedError(toolIdentifier, "Access denied by data access guard");
|
|
214
230
|
}
|
|
215
|
-
}
|
|
216
|
-
|
|
231
|
+
};
|
|
232
|
+
var verifyTenantIsolation = (assertTenant, rawResult, context, toolIdentifier) => {
|
|
233
|
+
if (!assertTenant) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
if (!context.tenantId) {
|
|
237
|
+
throw new ToolAccessDeniedError(
|
|
238
|
+
toolIdentifier,
|
|
239
|
+
"Access denied: missing session tenantId in execution context for multi-tenant tool"
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
const recordTenantId = assertTenant(rawResult);
|
|
243
|
+
if (recordTenantId && recordTenantId !== context.tenantId) {
|
|
244
|
+
throw new ToolAccessDeniedError(
|
|
245
|
+
toolIdentifier,
|
|
246
|
+
`Cross-tenant IDOR access violation: record tenant '${recordTenantId}' does not match session tenant '${context.tenantId}'`
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
var verifyResourceOwnership = async (assertOwnership, rawResult, context, toolIdentifier) => {
|
|
251
|
+
if (!assertOwnership) {
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
const isOwner = await assertOwnership(rawResult, context);
|
|
255
|
+
if (!isOwner) {
|
|
256
|
+
throw new ToolAccessDeniedError(
|
|
257
|
+
toolIdentifier,
|
|
258
|
+
"Ownership IDOR access violation: user does not own or have access to this resource"
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
var checkSuspiciousParameters = (parameters, toolName) => {
|
|
263
|
+
if (!parameters || typeof parameters !== "object") {
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
const zodShape = parameters.shape;
|
|
267
|
+
if (!zodShape || typeof zodShape !== "object") {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
const suspiciousKeys = ["tenantId", "tenant_id", "ownerTenantId"];
|
|
271
|
+
for (const key of suspiciousKeys) {
|
|
272
|
+
if (key in zodShape) {
|
|
273
|
+
console.warn(
|
|
274
|
+
`[avantGate Security Warning] Tool '${toolName}' defines '${key}' as a model parameter. Tenancy should be inferred from the trusted server context (context.tenantId) rather than supplied by the untrusted model to prevent IDOR attacks.`
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
var resolveInvalidationTags = async (config, args, rawResult, context) => {
|
|
217
280
|
if (!config.invalidationTags) {
|
|
218
281
|
return void 0;
|
|
219
282
|
}
|
|
@@ -222,33 +285,29 @@ async function resolveInvalidationTags(config, args, rawResult, context) {
|
|
|
222
285
|
await context.onInvalidationTags(tags);
|
|
223
286
|
}
|
|
224
287
|
return tags;
|
|
225
|
-
}
|
|
226
|
-
async
|
|
288
|
+
};
|
|
289
|
+
var dispatchClientData = async (rawResult, callback) => {
|
|
227
290
|
if (!callback) {
|
|
228
291
|
return;
|
|
229
292
|
}
|
|
230
293
|
await callback(rawResult);
|
|
231
|
-
}
|
|
232
|
-
async
|
|
294
|
+
};
|
|
295
|
+
var produceLlmPayload = async (rawResult, args, context, transformer) => {
|
|
233
296
|
if (transformer) {
|
|
234
297
|
return await transformer(rawResult, args, context);
|
|
235
298
|
}
|
|
236
299
|
return rawResult;
|
|
237
|
-
}
|
|
238
|
-
|
|
300
|
+
};
|
|
301
|
+
var validateLlmDto = (payload, schema, toolIdentifier) => {
|
|
239
302
|
const parseResult = schema.safeParse(payload);
|
|
240
303
|
if (!parseResult.success) {
|
|
241
304
|
const issues = parseResult.error.issues ?? [];
|
|
242
305
|
const errorMessages = issues.map((issue) => `${issue.path.join(".") || "root"}: ${issue.message}`).join(", ");
|
|
243
|
-
throw new DtoValidationError(
|
|
244
|
-
toolIdentifier,
|
|
245
|
-
errorMessages,
|
|
246
|
-
issues
|
|
247
|
-
);
|
|
306
|
+
throw new DtoValidationError(toolIdentifier, errorMessages, issues);
|
|
248
307
|
}
|
|
249
308
|
return parseResult.data;
|
|
250
|
-
}
|
|
251
|
-
|
|
309
|
+
};
|
|
310
|
+
var protectLlmPayload = (payload, toolIdentifier, sanitizePii = true, throwOnPii = false) => {
|
|
252
311
|
if (!sanitizePii) {
|
|
253
312
|
return { sanitized: payload, count: 0 };
|
|
254
313
|
}
|
|
@@ -257,8 +316,8 @@ function protectLlmPayload(payload, toolIdentifier, sanitizePii = true, throwOnP
|
|
|
257
316
|
throwOnPii
|
|
258
317
|
});
|
|
259
318
|
return { sanitized: sanitizedData, count: maskedCount };
|
|
260
|
-
}
|
|
261
|
-
async
|
|
319
|
+
};
|
|
320
|
+
var processLlmPayload = async (rawResult, args, context, config, toolIdentifier) => {
|
|
262
321
|
let payload = await produceLlmPayload(rawResult, args, context, config.llmDto);
|
|
263
322
|
if (config.llmDtoSchema) {
|
|
264
323
|
payload = validateLlmDto(payload, config.llmDtoSchema, toolIdentifier);
|
|
@@ -269,14 +328,15 @@ async function processLlmPayload(rawResult, args, context, config, toolIdentifie
|
|
|
269
328
|
config.sanitizePii !== false,
|
|
270
329
|
config.throwOnPii === true
|
|
271
330
|
);
|
|
272
|
-
}
|
|
273
|
-
|
|
331
|
+
};
|
|
332
|
+
var createIsolatedTool = (config) => {
|
|
274
333
|
const toolId = config.id || config.name;
|
|
275
334
|
const toolAlias = config.alias;
|
|
276
335
|
const clientCallback = config.clientDto;
|
|
277
336
|
const toolIdentifier = toolAlias || config.name;
|
|
278
337
|
const toolImpact = config.impact ?? "READ_ONLY";
|
|
279
338
|
const requireApproval = config.requireApproval ?? toolImpact === "DESTRUCTIVE";
|
|
339
|
+
checkSuspiciousParameters(config.parameters, config.name);
|
|
280
340
|
const tool = {
|
|
281
341
|
description: config.description,
|
|
282
342
|
parameters: config.parameters,
|
|
@@ -292,11 +352,12 @@ function createIsolatedTool(config) {
|
|
|
292
352
|
_requireApproval: requireApproval,
|
|
293
353
|
_lastPiiFilteredCount: 0,
|
|
294
354
|
_lastInvalidationTags: void 0,
|
|
295
|
-
async
|
|
355
|
+
execute: async (args, context) => {
|
|
296
356
|
const updatedContext = {
|
|
297
357
|
...context,
|
|
298
358
|
callChain: context?.callChain ?? Object.freeze([toolId])
|
|
299
359
|
};
|
|
360
|
+
verifyRoles(config.roles, updatedContext, toolIdentifier);
|
|
300
361
|
await verifyDataAccessGuard(
|
|
301
362
|
config.dataAccessGuard,
|
|
302
363
|
args,
|
|
@@ -304,6 +365,13 @@ function createIsolatedTool(config) {
|
|
|
304
365
|
toolIdentifier
|
|
305
366
|
);
|
|
306
367
|
const rawResult = await config.execute(args, updatedContext);
|
|
368
|
+
verifyTenantIsolation(config.assertTenant, rawResult, updatedContext, toolIdentifier);
|
|
369
|
+
await verifyResourceOwnership(
|
|
370
|
+
config.assertOwnership,
|
|
371
|
+
rawResult,
|
|
372
|
+
updatedContext,
|
|
373
|
+
toolIdentifier
|
|
374
|
+
);
|
|
307
375
|
const tags = await resolveInvalidationTags(
|
|
308
376
|
config,
|
|
309
377
|
args,
|
|
@@ -326,7 +394,10 @@ function createIsolatedTool(config) {
|
|
|
326
394
|
}
|
|
327
395
|
};
|
|
328
396
|
return tool;
|
|
329
|
-
}
|
|
397
|
+
};
|
|
398
|
+
var createTenantTool = (config) => {
|
|
399
|
+
return createIsolatedTool(config);
|
|
400
|
+
};
|
|
330
401
|
|
|
331
402
|
export {
|
|
332
403
|
sanitizePII,
|
|
@@ -340,5 +411,6 @@ export {
|
|
|
340
411
|
ToolNotFoundError,
|
|
341
412
|
DtoValidationError,
|
|
342
413
|
auditToolResult,
|
|
343
|
-
createIsolatedTool
|
|
414
|
+
createIsolatedTool,
|
|
415
|
+
createTenantTool
|
|
344
416
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
__require
|
|
10
|
+
};
|
package/dist/client/index.mjs
CHANGED
package/dist/control-layer.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare class AvantGateControlLayer {
|
|
|
8
8
|
private findProviderConfig;
|
|
9
9
|
private calculateCost;
|
|
10
10
|
private applySecurityGuards;
|
|
11
|
+
private applyOutputSecurityGuards;
|
|
11
12
|
private checkPreflightBudget;
|
|
12
13
|
private checkPostExecutionBudget;
|
|
13
14
|
private buildMessages;
|
|
@@ -21,29 +22,29 @@ export declare class AvantGateControlLayer {
|
|
|
21
22
|
/**
|
|
22
23
|
* Exécute une requête avec garde d'entrée, masquage PII, garde pré-vol et calcul des coûts.
|
|
23
24
|
*/
|
|
24
|
-
execute(options: {
|
|
25
|
+
execute: (options: {
|
|
25
26
|
userQuery: string;
|
|
26
27
|
systemPrompt?: string;
|
|
27
28
|
temperature?: number;
|
|
28
29
|
providerOverride?: LLMProviderPort;
|
|
29
|
-
})
|
|
30
|
+
}) => Promise<ExecutionResult>;
|
|
30
31
|
/**
|
|
31
32
|
* Exécute une requête et valide/répare le résultat selon un schéma Zod.
|
|
32
33
|
*/
|
|
33
|
-
executeStructured<T>(options: {
|
|
34
|
+
executeStructured: <T>(options: {
|
|
34
35
|
userQuery: string;
|
|
35
36
|
systemPrompt?: string;
|
|
36
37
|
schema: z.ZodType<T>;
|
|
37
38
|
temperature?: number;
|
|
38
39
|
providerOverride?: LLMProviderPort;
|
|
39
|
-
})
|
|
40
|
+
}) => Promise<StructuredExecutionResult<T>>;
|
|
40
41
|
/**
|
|
41
42
|
* Méthode unifiée de premier niveau pour l'extraction structurée sans code boilerplate.
|
|
42
43
|
* Gère le failover multi-fournisseurs, les retries, la validation Zod et la normalisation financière.
|
|
43
44
|
*/
|
|
44
|
-
generateStructuredOutput<T>(options: GenerateStructuredOutputOptions<T>)
|
|
45
|
+
generateStructuredOutput: <T>(options: GenerateStructuredOutputOptions<T>) => Promise<StructuredExecutionResult<T>>;
|
|
45
46
|
}
|
|
46
|
-
export declare
|
|
47
|
-
export declare const createAvantGate:
|
|
47
|
+
export declare const createLLMControlLayer: (config: ControlLayerConfig) => AvantGateControlLayer;
|
|
48
|
+
export declare const createAvantGate: (config: ControlLayerConfig) => AvantGateControlLayer;
|
|
48
49
|
export { AvantGateControlLayer as ZenLLMControlLayer };
|
|
49
50
|
//# sourceMappingURL=control-layer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-layer.d.ts","sourceRoot":"","sources":["../src/control-layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,yBAAyB,EACzB,+BAA+B,EAC/B,eAAe,EAIhB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"control-layer.d.ts","sourceRoot":"","sources":["../src/control-layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,yBAAyB,EACzB,+BAA+B,EAC/B,eAAe,EAIhB,MAAM,SAAS,CAAC;AAiBjB,qBAAa,qBAAqB;IAChC,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,oBAAoB,CAAC,CAAuB;gBAExC,MAAM,EAAE,kBAAkB;IAgBtC,OAAO,CAAC,qBAAqB,CAU3B;IAEF,OAAO,CAAC,kBAAkB,CAaxB;IAEF,OAAO,CAAC,aAAa,CAcnB;IAEF,OAAO,CAAC,mBAAmB,CAezB;IAEF,OAAO,CAAC,yBAAyB,CAe/B;IAEF,OAAO,CAAC,oBAAoB,CAkC1B;IAEF,OAAO,CAAC,wBAAwB,CAW9B;IAEF,OAAO,CAAC,aAAa,CAOnB;IAEF,OAAO,CAAC,aAAa,CAUnB;IAEF,OAAO,CAAC,gBAAgB,CAMtB;IAEF,OAAO,CAAC,iBAAiB,CAiBvB;IAEF,OAAO,CAAC,uBAAuB,CAmB7B;IAEF,OAAO,CAAC,uBAAuB,CA+B7B;IAEF,OAAO,CAAC,cAAc,CAqBpB;IAEF,OAAO,CAAC,eAAe,CAarB;IAEF;;OAEG;IACH,OAAO,GAAU,SAAS;QACxB,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,gBAAgB,CAAC,EAAE,eAAe,CAAC;KACpC,KAAG,OAAO,CAAC,eAAe,CAAC,CA2B1B;IAEF;;OAEG;IACH,iBAAiB,GAAU,CAAC,EAAE,SAAS;QACrC,SAAS,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,gBAAgB,CAAC,EAAE,eAAe,CAAC;KACpC,KAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAyBvC;IAEF;;;OAGG;IACH,wBAAwB,GAAU,CAAC,EACjC,SAAS,+BAA+B,CAAC,CAAC,CAAC,KAC1C,OAAO,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAuHtC;CACH;AAED,eAAO,MAAM,qBAAqB,GAAI,QAAQ,kBAAkB,KAAG,qBAElE,CAAC;AAEF,eAAO,MAAM,eAAe,WAJkB,kBAAkB,KAAG,qBAIf,CAAC;AACrD,OAAO,EAAE,qBAAqB,IAAI,kBAAkB,EAAE,CAAC"}
|
package/dist/finance/index.js
CHANGED
|
@@ -485,7 +485,7 @@ var AccountingFactory = class {
|
|
|
485
485
|
};
|
|
486
486
|
|
|
487
487
|
// src/response-validator.ts
|
|
488
|
-
|
|
488
|
+
var extractAndCleanJSON = (rawText) => {
|
|
489
489
|
let cleaned = rawText.trim();
|
|
490
490
|
cleaned = cleaned.replace(/<think>[\s\S]*?<\/think>/gi, "").trim();
|
|
491
491
|
const codeBlockMatch = cleaned.match(/```(?:json)?\s*([\s\S]*?)\s*```/i);
|
|
@@ -509,20 +509,20 @@ function extractAndCleanJSON(rawText) {
|
|
|
509
509
|
cleaned = cleaned.slice(startIndex, endIndex + 1);
|
|
510
510
|
}
|
|
511
511
|
return cleaned;
|
|
512
|
-
}
|
|
512
|
+
};
|
|
513
513
|
|
|
514
514
|
// src/finance/normalizer.ts
|
|
515
|
-
|
|
515
|
+
var cleanFinancialJSON = (rawText, options) => {
|
|
516
516
|
if (!rawText) {
|
|
517
517
|
return "";
|
|
518
518
|
}
|
|
519
519
|
const jsonBlock = extractAndCleanJSON(rawText);
|
|
520
520
|
const strategy = options?.jurisdiction ? AccountingFactory.getStrategy(options.jurisdiction) : options?.autoDetect !== false ? AccountingFactory.detectStrategy(rawText) : AccountingFactory.getStrategy("FR");
|
|
521
521
|
return strategy.cleanJSON(jsonBlock);
|
|
522
|
-
}
|
|
523
|
-
|
|
522
|
+
};
|
|
523
|
+
var withFinancialNormalizer = (options) => {
|
|
524
524
|
return (rawText) => cleanFinancialJSON(rawText, options);
|
|
525
|
-
}
|
|
525
|
+
};
|
|
526
526
|
// Annotate the CommonJS export names for ESM import in node:
|
|
527
527
|
0 && (module.exports = {
|
|
528
528
|
AccountingFactory,
|
package/dist/finance/index.mjs
CHANGED
|
@@ -11,9 +11,9 @@ export interface FinancialNormalizerOptions {
|
|
|
11
11
|
* - Suppression des symboles de devises dans les positions numériques
|
|
12
12
|
* - Préservation stricte des chaînes descriptives normales contenant des parenthèses
|
|
13
13
|
*/
|
|
14
|
-
export declare
|
|
14
|
+
export declare const cleanFinancialJSON: (rawText: string, options?: FinancialNormalizerOptions) => string;
|
|
15
15
|
/**
|
|
16
16
|
* Crée une fonction de transformation financière réutilisable.
|
|
17
17
|
*/
|
|
18
|
-
export declare
|
|
18
|
+
export declare const withFinancialNormalizer: (options?: FinancialNormalizerOptions) => ((rawText: string) => string);
|
|
19
19
|
//# sourceMappingURL=normalizer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../src/finance/normalizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAItE,MAAM,WAAW,0BAA0B;IACzC,YAAY,CAAC,EAAE,yBAAyB,CAAC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,
|
|
1
|
+
{"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../src/finance/normalizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAItE,MAAM,WAAW,0BAA0B;IACzC,YAAY,CAAC,EAAE,yBAAyB,CAAC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAC7B,SAAS,MAAM,EACf,UAAU,0BAA0B,KACnC,MAiBF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,UAAU,0BAA0B,KACnC,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,CAE9B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./types";
|
|
2
2
|
export * from "./pricing";
|
|
3
|
+
export * from "./sqlite-pricing-adapter";
|
|
3
4
|
export * from "./sanitizer";
|
|
4
5
|
export * from "./input-guard";
|
|
5
6
|
export * from "./response-validator";
|
|
@@ -7,4 +8,5 @@ export * from "./control-layer";
|
|
|
7
8
|
export * from "./prompts";
|
|
8
9
|
export * from "./providers/http-client";
|
|
9
10
|
export * from "./workflow";
|
|
11
|
+
export * from "./secret-guard";
|
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
|