openred 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.
@@ -0,0 +1,50 @@
1
+ import { RedactionPipeline } from '../chunk-65T2K4W6.js';
2
+
3
+ // src/integrations/anthropic.ts
4
+ function wrapAnthropic(client, options = {}) {
5
+ const autoRestore = options.autoRestore ?? true;
6
+ const pipeline = new RedactionPipeline({
7
+ ...options,
8
+ vault: autoRestore ? true : options.vault ?? false
9
+ });
10
+ const vault = pipeline.getVault();
11
+ const originalCreate = client.messages.create.bind(client.messages);
12
+ const wrappedCreate = async (params) => {
13
+ const redactedMessages = params.messages.map((msg) => {
14
+ if (typeof msg.content === "string") {
15
+ return { ...msg, content: pipeline.redact(msg.content).text };
16
+ }
17
+ if (Array.isArray(msg.content)) {
18
+ return {
19
+ ...msg,
20
+ content: msg.content.map((block) => {
21
+ if (block.type === "text" && typeof block.text === "string") {
22
+ return { ...block, text: pipeline.redact(block.text).text };
23
+ }
24
+ return block;
25
+ })
26
+ };
27
+ }
28
+ return msg;
29
+ });
30
+ const response = await originalCreate({
31
+ ...params,
32
+ messages: redactedMessages
33
+ });
34
+ if (autoRestore && vault && response.content) {
35
+ for (const block of response.content) {
36
+ if (block.type === "text" && typeof block.text === "string") {
37
+ block.text = vault.restore(block.text);
38
+ }
39
+ }
40
+ }
41
+ return response;
42
+ };
43
+ const proxy = Object.create(client);
44
+ proxy.messages = Object.create(client.messages);
45
+ proxy.messages.create = wrappedCreate;
46
+ proxy.pipeline = pipeline;
47
+ return proxy;
48
+ }
49
+
50
+ export { wrapAnthropic };
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var chunkVAXUQISI_cjs = require('../chunk-VAXUQISI.cjs');
4
+
5
+ // src/integrations/langchain.ts
6
+ function wrapLangChain(llm, options = {}) {
7
+ const autoRestore = options.autoRestore ?? true;
8
+ const pipeline = new chunkVAXUQISI_cjs.RedactionPipeline({
9
+ ...options,
10
+ vault: autoRestore ? true : options.vault ?? false
11
+ });
12
+ const vault = pipeline.getVault();
13
+ const originalInvoke = llm.invoke.bind(llm);
14
+ const wrappedInvoke = async (input, invokeOptions) => {
15
+ const redacted = pipeline.redact(input);
16
+ let response = await originalInvoke(redacted.text, invokeOptions);
17
+ if (autoRestore && vault && typeof response === "string") {
18
+ response = vault.restore(response);
19
+ }
20
+ return response;
21
+ };
22
+ const proxy = Object.create(llm);
23
+ proxy.invoke = wrappedInvoke;
24
+ proxy.pipeline = pipeline;
25
+ return proxy;
26
+ }
27
+
28
+ exports.wrapLangChain = wrapLangChain;
@@ -0,0 +1,18 @@
1
+ import { R as RedactionPipeline } from '../pipeline-D_6YC4Us.cjs';
2
+ import { d as PipelineConfig } from '../vault-CDr54-Ev.cjs';
3
+
4
+ interface BaseLLM {
5
+ invoke(input: string, options?: unknown): Promise<string>;
6
+ }
7
+ interface WrapLangChainOptions extends Partial<PipelineConfig> {
8
+ autoRestore?: boolean;
9
+ }
10
+ /**
11
+ * Wraps a LangChain-compatible LLM with PII redaction.
12
+ * Works with any object that has an invoke(string) method.
13
+ */
14
+ declare function wrapLangChain<T extends BaseLLM>(llm: T, options?: WrapLangChainOptions): T & {
15
+ pipeline: RedactionPipeline;
16
+ };
17
+
18
+ export { type WrapLangChainOptions, wrapLangChain };
@@ -0,0 +1,18 @@
1
+ import { R as RedactionPipeline } from '../pipeline-gWjT4cYU.js';
2
+ import { d as PipelineConfig } from '../vault-CDr54-Ev.js';
3
+
4
+ interface BaseLLM {
5
+ invoke(input: string, options?: unknown): Promise<string>;
6
+ }
7
+ interface WrapLangChainOptions extends Partial<PipelineConfig> {
8
+ autoRestore?: boolean;
9
+ }
10
+ /**
11
+ * Wraps a LangChain-compatible LLM with PII redaction.
12
+ * Works with any object that has an invoke(string) method.
13
+ */
14
+ declare function wrapLangChain<T extends BaseLLM>(llm: T, options?: WrapLangChainOptions): T & {
15
+ pipeline: RedactionPipeline;
16
+ };
17
+
18
+ export { type WrapLangChainOptions, wrapLangChain };
@@ -0,0 +1,26 @@
1
+ import { RedactionPipeline } from '../chunk-65T2K4W6.js';
2
+
3
+ // src/integrations/langchain.ts
4
+ function wrapLangChain(llm, options = {}) {
5
+ const autoRestore = options.autoRestore ?? true;
6
+ const pipeline = new RedactionPipeline({
7
+ ...options,
8
+ vault: autoRestore ? true : options.vault ?? false
9
+ });
10
+ const vault = pipeline.getVault();
11
+ const originalInvoke = llm.invoke.bind(llm);
12
+ const wrappedInvoke = async (input, invokeOptions) => {
13
+ const redacted = pipeline.redact(input);
14
+ let response = await originalInvoke(redacted.text, invokeOptions);
15
+ if (autoRestore && vault && typeof response === "string") {
16
+ response = vault.restore(response);
17
+ }
18
+ return response;
19
+ };
20
+ const proxy = Object.create(llm);
21
+ proxy.invoke = wrappedInvoke;
22
+ proxy.pipeline = pipeline;
23
+ return proxy;
24
+ }
25
+
26
+ export { wrapLangChain };
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ var chunkVAXUQISI_cjs = require('../chunk-VAXUQISI.cjs');
4
+
5
+ // src/integrations/openai.ts
6
+ function wrapOpenAI(client, options = {}) {
7
+ const autoRestore = options.autoRestore ?? true;
8
+ const pipeline = new chunkVAXUQISI_cjs.RedactionPipeline({
9
+ ...options,
10
+ vault: autoRestore ? true : options.vault ?? false
11
+ });
12
+ const vault = pipeline.getVault();
13
+ const originalCreate = client.chat.completions.create.bind(client.chat.completions);
14
+ const wrappedCreate = async (params) => {
15
+ const redactedMessages = params.messages.map((msg) => ({
16
+ ...msg,
17
+ content: typeof msg.content === "string" ? pipeline.redact(msg.content).text : msg.content
18
+ }));
19
+ const response = await originalCreate({
20
+ ...params,
21
+ messages: redactedMessages
22
+ });
23
+ if (autoRestore && vault && response.choices) {
24
+ for (const choice of response.choices) {
25
+ if (choice.message && typeof choice.message.content === "string") {
26
+ choice.message.content = vault.restore(choice.message.content);
27
+ }
28
+ }
29
+ }
30
+ return response;
31
+ };
32
+ const proxy = Object.create(client);
33
+ proxy.chat = Object.create(client.chat);
34
+ proxy.chat.completions = Object.create(client.chat.completions);
35
+ proxy.chat.completions.create = wrappedCreate;
36
+ proxy.pipeline = pipeline;
37
+ return proxy;
38
+ }
39
+
40
+ exports.wrapOpenAI = wrapOpenAI;
@@ -0,0 +1,38 @@
1
+ import { R as RedactionPipeline } from '../pipeline-D_6YC4Us.cjs';
2
+ import { d as PipelineConfig } from '../vault-CDr54-Ev.cjs';
3
+
4
+ interface ChatMessage {
5
+ role: string;
6
+ content: string | null;
7
+ }
8
+ interface Choice {
9
+ message?: {
10
+ content?: string | null;
11
+ };
12
+ [key: string]: unknown;
13
+ }
14
+ interface ChatCompletion {
15
+ choices: Choice[];
16
+ [key: string]: unknown;
17
+ }
18
+ interface CreateParams {
19
+ messages: ChatMessage[];
20
+ [key: string]: unknown;
21
+ }
22
+ interface ChatCompletions {
23
+ create(params: CreateParams): Promise<ChatCompletion>;
24
+ }
25
+ interface Chat {
26
+ completions: ChatCompletions;
27
+ }
28
+ interface OpenAILike {
29
+ chat: Chat;
30
+ }
31
+ interface WrapOpenAIOptions extends Partial<PipelineConfig> {
32
+ autoRestore?: boolean;
33
+ }
34
+ declare function wrapOpenAI<T extends OpenAILike>(client: T, options?: WrapOpenAIOptions): T & {
35
+ pipeline: RedactionPipeline;
36
+ };
37
+
38
+ export { type WrapOpenAIOptions, wrapOpenAI };
@@ -0,0 +1,38 @@
1
+ import { R as RedactionPipeline } from '../pipeline-gWjT4cYU.js';
2
+ import { d as PipelineConfig } from '../vault-CDr54-Ev.js';
3
+
4
+ interface ChatMessage {
5
+ role: string;
6
+ content: string | null;
7
+ }
8
+ interface Choice {
9
+ message?: {
10
+ content?: string | null;
11
+ };
12
+ [key: string]: unknown;
13
+ }
14
+ interface ChatCompletion {
15
+ choices: Choice[];
16
+ [key: string]: unknown;
17
+ }
18
+ interface CreateParams {
19
+ messages: ChatMessage[];
20
+ [key: string]: unknown;
21
+ }
22
+ interface ChatCompletions {
23
+ create(params: CreateParams): Promise<ChatCompletion>;
24
+ }
25
+ interface Chat {
26
+ completions: ChatCompletions;
27
+ }
28
+ interface OpenAILike {
29
+ chat: Chat;
30
+ }
31
+ interface WrapOpenAIOptions extends Partial<PipelineConfig> {
32
+ autoRestore?: boolean;
33
+ }
34
+ declare function wrapOpenAI<T extends OpenAILike>(client: T, options?: WrapOpenAIOptions): T & {
35
+ pipeline: RedactionPipeline;
36
+ };
37
+
38
+ export { type WrapOpenAIOptions, wrapOpenAI };
@@ -0,0 +1,38 @@
1
+ import { RedactionPipeline } from '../chunk-65T2K4W6.js';
2
+
3
+ // src/integrations/openai.ts
4
+ function wrapOpenAI(client, options = {}) {
5
+ const autoRestore = options.autoRestore ?? true;
6
+ const pipeline = new RedactionPipeline({
7
+ ...options,
8
+ vault: autoRestore ? true : options.vault ?? false
9
+ });
10
+ const vault = pipeline.getVault();
11
+ const originalCreate = client.chat.completions.create.bind(client.chat.completions);
12
+ const wrappedCreate = async (params) => {
13
+ const redactedMessages = params.messages.map((msg) => ({
14
+ ...msg,
15
+ content: typeof msg.content === "string" ? pipeline.redact(msg.content).text : msg.content
16
+ }));
17
+ const response = await originalCreate({
18
+ ...params,
19
+ messages: redactedMessages
20
+ });
21
+ if (autoRestore && vault && response.choices) {
22
+ for (const choice of response.choices) {
23
+ if (choice.message && typeof choice.message.content === "string") {
24
+ choice.message.content = vault.restore(choice.message.content);
25
+ }
26
+ }
27
+ }
28
+ return response;
29
+ };
30
+ const proxy = Object.create(client);
31
+ proxy.chat = Object.create(client.chat);
32
+ proxy.chat.completions = Object.create(client.chat.completions);
33
+ proxy.chat.completions.create = wrappedCreate;
34
+ proxy.pipeline = pipeline;
35
+ return proxy;
36
+ }
37
+
38
+ export { wrapOpenAI };
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var chunkDWYPLA6C_cjs = require('../chunk-DWYPLA6C.cjs');
4
+ var chunkVAXUQISI_cjs = require('../chunk-VAXUQISI.cjs');
5
+
6
+ // src/middleware/express.ts
7
+ function piiMiddleware(options = {}) {
8
+ const pipeline = new chunkVAXUQISI_cjs.RedactionPipeline({
9
+ ...options,
10
+ vault: options.passVault ? true : options.vault ?? false
11
+ });
12
+ return (req, _res, next) => {
13
+ if (options.passVault) {
14
+ req.openredVault = pipeline.getVault() ?? void 0;
15
+ }
16
+ if (options.fields && options.fields.length > 0) {
17
+ for (const fieldPath of options.fields) {
18
+ const value = chunkDWYPLA6C_cjs.getNestedValue(req, fieldPath);
19
+ if (typeof value === "string") {
20
+ chunkDWYPLA6C_cjs.setNestedValue(req, fieldPath, pipeline.redact(value).text);
21
+ }
22
+ }
23
+ } else if (req.body) {
24
+ chunkDWYPLA6C_cjs.transformStrings(req.body, (s) => pipeline.redact(s).text);
25
+ }
26
+ next();
27
+ };
28
+ }
29
+
30
+ exports.piiMiddleware = piiMiddleware;
@@ -0,0 +1,16 @@
1
+ import { d as PipelineConfig, V as Vault } from '../vault-CDr54-Ev.cjs';
2
+
3
+ interface PiiMiddlewareOptions extends Partial<PipelineConfig> {
4
+ /** Specific dot-notation field paths to redact. If not set, redacts all string values in body. */
5
+ fields?: string[];
6
+ /** Attach vault to req.openredVault for de-redaction in response handlers. */
7
+ passVault?: boolean;
8
+ }
9
+ interface OpenredRequest {
10
+ body?: unknown;
11
+ query?: unknown;
12
+ openredVault?: Vault;
13
+ }
14
+ declare function piiMiddleware(options?: PiiMiddlewareOptions): (req: OpenredRequest, _res: unknown, next: () => void) => void;
15
+
16
+ export { type PiiMiddlewareOptions, piiMiddleware };
@@ -0,0 +1,16 @@
1
+ import { d as PipelineConfig, V as Vault } from '../vault-CDr54-Ev.js';
2
+
3
+ interface PiiMiddlewareOptions extends Partial<PipelineConfig> {
4
+ /** Specific dot-notation field paths to redact. If not set, redacts all string values in body. */
5
+ fields?: string[];
6
+ /** Attach vault to req.openredVault for de-redaction in response handlers. */
7
+ passVault?: boolean;
8
+ }
9
+ interface OpenredRequest {
10
+ body?: unknown;
11
+ query?: unknown;
12
+ openredVault?: Vault;
13
+ }
14
+ declare function piiMiddleware(options?: PiiMiddlewareOptions): (req: OpenredRequest, _res: unknown, next: () => void) => void;
15
+
16
+ export { type PiiMiddlewareOptions, piiMiddleware };
@@ -0,0 +1,28 @@
1
+ import { getNestedValue, setNestedValue, transformStrings } from '../chunk-ABSJVCYK.js';
2
+ import { RedactionPipeline } from '../chunk-65T2K4W6.js';
3
+
4
+ // src/middleware/express.ts
5
+ function piiMiddleware(options = {}) {
6
+ const pipeline = new RedactionPipeline({
7
+ ...options,
8
+ vault: options.passVault ? true : options.vault ?? false
9
+ });
10
+ return (req, _res, next) => {
11
+ if (options.passVault) {
12
+ req.openredVault = pipeline.getVault() ?? void 0;
13
+ }
14
+ if (options.fields && options.fields.length > 0) {
15
+ for (const fieldPath of options.fields) {
16
+ const value = getNestedValue(req, fieldPath);
17
+ if (typeof value === "string") {
18
+ setNestedValue(req, fieldPath, pipeline.redact(value).text);
19
+ }
20
+ }
21
+ } else if (req.body) {
22
+ transformStrings(req.body, (s) => pipeline.redact(s).text);
23
+ }
24
+ next();
25
+ };
26
+ }
27
+
28
+ export { piiMiddleware };
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var chunkDWYPLA6C_cjs = require('../chunk-DWYPLA6C.cjs');
4
+ var chunkVAXUQISI_cjs = require('../chunk-VAXUQISI.cjs');
5
+
6
+ // src/middleware/fastify.ts
7
+ function piiFastifyHook(options = {}) {
8
+ const pipeline = new chunkVAXUQISI_cjs.RedactionPipeline({
9
+ ...options,
10
+ vault: options.passVault ? true : options.vault ?? false
11
+ });
12
+ return (req, _reply, done) => {
13
+ if (options.passVault) {
14
+ req.openredVault = pipeline.getVault() ?? void 0;
15
+ }
16
+ if (req.body) {
17
+ chunkDWYPLA6C_cjs.transformStrings(req.body, (s) => pipeline.redact(s).text);
18
+ }
19
+ done();
20
+ };
21
+ }
22
+
23
+ exports.piiFastifyHook = piiFastifyHook;
@@ -0,0 +1,27 @@
1
+ import { d as PipelineConfig, V as Vault } from '../vault-CDr54-Ev.cjs';
2
+
3
+ interface PiiFastifyOptions extends Partial<PipelineConfig> {
4
+ passVault?: boolean;
5
+ }
6
+ interface FastifyRequest {
7
+ body?: unknown;
8
+ openredVault?: Vault;
9
+ }
10
+ interface FastifyReply {
11
+ [key: string]: unknown;
12
+ }
13
+ /**
14
+ * Fastify plugin-style hook for PII redaction.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * import Fastify from 'fastify';
19
+ * import { piiFastifyHook } from 'openred/middleware/fastify';
20
+ *
21
+ * const app = Fastify();
22
+ * app.addHook('preHandler', piiFastifyHook({ strategy: 'placeholder' }));
23
+ * ```
24
+ */
25
+ declare function piiFastifyHook(options?: PiiFastifyOptions): (req: FastifyRequest, _reply: FastifyReply, done: () => void) => void;
26
+
27
+ export { type PiiFastifyOptions, piiFastifyHook };
@@ -0,0 +1,27 @@
1
+ import { d as PipelineConfig, V as Vault } from '../vault-CDr54-Ev.js';
2
+
3
+ interface PiiFastifyOptions extends Partial<PipelineConfig> {
4
+ passVault?: boolean;
5
+ }
6
+ interface FastifyRequest {
7
+ body?: unknown;
8
+ openredVault?: Vault;
9
+ }
10
+ interface FastifyReply {
11
+ [key: string]: unknown;
12
+ }
13
+ /**
14
+ * Fastify plugin-style hook for PII redaction.
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * import Fastify from 'fastify';
19
+ * import { piiFastifyHook } from 'openred/middleware/fastify';
20
+ *
21
+ * const app = Fastify();
22
+ * app.addHook('preHandler', piiFastifyHook({ strategy: 'placeholder' }));
23
+ * ```
24
+ */
25
+ declare function piiFastifyHook(options?: PiiFastifyOptions): (req: FastifyRequest, _reply: FastifyReply, done: () => void) => void;
26
+
27
+ export { type PiiFastifyOptions, piiFastifyHook };
@@ -0,0 +1,21 @@
1
+ import { transformStrings } from '../chunk-ABSJVCYK.js';
2
+ import { RedactionPipeline } from '../chunk-65T2K4W6.js';
3
+
4
+ // src/middleware/fastify.ts
5
+ function piiFastifyHook(options = {}) {
6
+ const pipeline = new RedactionPipeline({
7
+ ...options,
8
+ vault: options.passVault ? true : options.vault ?? false
9
+ });
10
+ return (req, _reply, done) => {
11
+ if (options.passVault) {
12
+ req.openredVault = pipeline.getVault() ?? void 0;
13
+ }
14
+ if (req.body) {
15
+ transformStrings(req.body, (s) => pipeline.redact(s).text);
16
+ }
17
+ done();
18
+ };
19
+ }
20
+
21
+ export { piiFastifyHook };
@@ -0,0 +1,16 @@
1
+ import { d as PipelineConfig, a as PIIDetector, e as RedactionResult, V as Vault } from './vault-CDr54-Ev.cjs';
2
+
3
+ declare class RedactionPipeline {
4
+ private detectors;
5
+ private strategyFn;
6
+ private vault;
7
+ private config;
8
+ constructor(config?: Partial<PipelineConfig>);
9
+ addDetector(detector: PIIDetector): void;
10
+ redact(text: string): RedactionResult;
11
+ /** Get the vault instance (only available if vault: true). */
12
+ getVault(): Vault | null;
13
+ private applyLists;
14
+ }
15
+
16
+ export { RedactionPipeline as R };
@@ -0,0 +1,16 @@
1
+ import { d as PipelineConfig, a as PIIDetector, e as RedactionResult, V as Vault } from './vault-CDr54-Ev.js';
2
+
3
+ declare class RedactionPipeline {
4
+ private detectors;
5
+ private strategyFn;
6
+ private vault;
7
+ private config;
8
+ constructor(config?: Partial<PipelineConfig>);
9
+ addDetector(detector: PIIDetector): void;
10
+ redact(text: string): RedactionResult;
11
+ /** Get the vault instance (only available if vault: true). */
12
+ getVault(): Vault | null;
13
+ private applyLists;
14
+ }
15
+
16
+ export { RedactionPipeline as R };
@@ -0,0 +1,80 @@
1
+ type PIIType = 'EMAIL' | 'PHONE' | 'SSN' | 'CREDIT_CARD' | 'IP_ADDRESS' | 'DATE_OF_BIRTH' | 'ADDRESS' | 'URL' | (string & {});
2
+ type ConfidenceLevel = 'high' | 'medium' | 'low';
3
+ interface PIIMatch {
4
+ type: PIIType;
5
+ value: string;
6
+ start: number;
7
+ end: number;
8
+ confidence: number;
9
+ detector: string;
10
+ }
11
+ interface PIIDetector {
12
+ name: string;
13
+ type: PIIType;
14
+ confidence: ConfidenceLevel;
15
+ detect(text: string, context?: DetectionContext): PIIMatch[];
16
+ }
17
+ interface DetectionContext {
18
+ locale?: string;
19
+ }
20
+ type RedactorFn = (match: PIIMatch) => string;
21
+ type RedactionStrategy = 'placeholder' | 'hash' | 'mask' | 'category' | RedactorFn;
22
+ interface TokenMapping {
23
+ original: string;
24
+ replacement: string;
25
+ type: PIIType;
26
+ confidence: number;
27
+ }
28
+ interface RedactionResult {
29
+ text: string;
30
+ matches: PIIMatch[];
31
+ tokens: TokenMapping[];
32
+ stats: {
33
+ totalDetected: number;
34
+ byType: Record<string, number>;
35
+ processingTimeMs: number;
36
+ };
37
+ }
38
+ interface VaultEntry {
39
+ original: string;
40
+ replacement: string;
41
+ type: PIIType;
42
+ }
43
+ interface AggregatorConfig {
44
+ overlapResolution: 'longest' | 'highest-confidence' | 'first';
45
+ minConfidence: number;
46
+ mergeAdjacent: boolean;
47
+ }
48
+ interface PipelineConfig {
49
+ detectors: PIIDetector[];
50
+ locale?: string;
51
+ minConfidence?: number;
52
+ strategy?: RedactionStrategy;
53
+ vault?: boolean;
54
+ vaultTTL?: number;
55
+ allowList?: string[];
56
+ denyList?: string[];
57
+ overlapResolution?: 'longest' | 'highest-confidence' | 'first';
58
+ onDetection?: (match: PIIMatch) => void;
59
+ onRedaction?: (result: RedactionResult) => void;
60
+ }
61
+
62
+ declare class Vault {
63
+ private replacementToOriginal;
64
+ private originalToReplacement;
65
+ private ttl?;
66
+ private timers;
67
+ constructor(options?: {
68
+ ttl?: number;
69
+ });
70
+ store(original: string, replacement: string, type: PIIType): void;
71
+ getReplacementFor(original: string): string | undefined;
72
+ restore(text: string): string;
73
+ getMapping(): Map<string, VaultEntry>;
74
+ getEntries(): VaultEntry[];
75
+ clear(): void;
76
+ export(): string;
77
+ import(data: string): void;
78
+ }
79
+
80
+ export { type AggregatorConfig as A, type ConfidenceLevel as C, type DetectionContext as D, type PIIMatch as P, type RedactorFn as R, type TokenMapping as T, Vault as V, type PIIDetector as a, type RedactionStrategy as b, type PIIType as c, type PipelineConfig as d, type RedactionResult as e, type VaultEntry as f };