@stll/anonymize-wasm 2.2.0 → 2.4.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.
@@ -1,11 +1,95 @@
1
1
  import { o as ENTITY_CAPABILITIES } from "./constants2.mjs";
2
2
  //#region src/capabilities.d.ts
3
- declare const CAPABILITY_MANIFEST_SCHEMA_VERSION: 1;
3
+ declare const CAPABILITY_MANIFEST_SCHEMA_VERSION: 2;
4
4
  declare const CAPABILITY_RUNTIMES: readonly ["node", "python", "wasm"];
5
5
  type CapabilityRuntime = (typeof CAPABILITY_RUNTIMES)[number];
6
+ declare const CAPABILITY_PARITY_PROFILES: {
7
+ readonly core: readonly ["node", "python", "wasm"];
8
+ readonly local: readonly ["node", "python"];
9
+ readonly nodeLocal: readonly ["node"];
10
+ readonly document: readonly ["node", "python"];
11
+ };
12
+ type CapabilityParityProfile = keyof typeof CAPABILITY_PARITY_PROFILES;
13
+ declare const CAPABILITY_SURFACES: readonly [{
14
+ readonly id: "package.prepare";
15
+ readonly profile: "core";
16
+ }, {
17
+ readonly id: "package.load";
18
+ readonly profile: "core";
19
+ }, {
20
+ readonly id: "package.load-file";
21
+ readonly profile: "local";
22
+ }, {
23
+ readonly id: "text.normalize";
24
+ readonly profile: "core";
25
+ }, {
26
+ readonly id: "text.redact";
27
+ readonly profile: "core";
28
+ }, {
29
+ readonly id: "text.redact-stream";
30
+ readonly profile: "core";
31
+ }, {
32
+ readonly id: "text.diagnostics";
33
+ readonly profile: "core";
34
+ }, {
35
+ readonly id: "text.summary-diagnostics";
36
+ readonly profile: "core";
37
+ }, {
38
+ readonly id: "text.caller-detections";
39
+ readonly profile: "core";
40
+ }, {
41
+ readonly id: "text.external-detection-batch";
42
+ readonly profile: "core";
43
+ }, {
44
+ readonly id: "text.operators";
45
+ readonly profile: "core";
46
+ }, {
47
+ readonly id: "package.default";
48
+ readonly profile: "core";
49
+ }, {
50
+ readonly id: "session.cross-document";
51
+ readonly profile: "core";
52
+ }, {
53
+ readonly id: "session.lifecycle";
54
+ readonly profile: "core";
55
+ }, {
56
+ readonly id: "session.plaintext-transfer";
57
+ readonly profile: "core";
58
+ }, {
59
+ readonly id: "session.encrypted-archive";
60
+ readonly profile: "core";
61
+ }, {
62
+ readonly id: "document.docx.extract";
63
+ readonly profile: "document";
64
+ }, {
65
+ readonly id: "document.docx.rewrite";
66
+ readonly profile: "document";
67
+ }, {
68
+ readonly id: "document.docx.anonymize";
69
+ readonly profile: "document";
70
+ }, {
71
+ readonly id: "document.docx.restore";
72
+ readonly profile: "document";
73
+ }, {
74
+ readonly id: "document.pdf.inspect";
75
+ readonly profile: "core";
76
+ }, {
77
+ readonly id: "document.pdf.anonymize-raster";
78
+ readonly profile: "document";
79
+ }, {
80
+ readonly id: "document.pdf.rewrite-raster";
81
+ readonly profile: "document";
82
+ }, {
83
+ readonly id: "document.pdf.observe-raster-local";
84
+ readonly profile: "nodeLocal";
85
+ }];
86
+ type CapabilitySurface = (typeof CAPABILITY_SURFACES)[number];
87
+ type CapabilitySurfaceId = CapabilitySurface["id"];
6
88
  type CapabilityManifest = {
7
89
  schemaVersion: typeof CAPABILITY_MANIFEST_SCHEMA_VERSION;
8
90
  runtimes: readonly CapabilityRuntime[];
91
+ parityProfiles: typeof CAPABILITY_PARITY_PROFILES;
92
+ surfaces: typeof CAPABILITY_SURFACES;
9
93
  entities: typeof ENTITY_CAPABILITIES;
10
94
  };
11
95
  /**
@@ -14,8 +98,87 @@ type CapabilityManifest = {
14
98
  * activation, provenance sources, and runtime parity only.
15
99
  */
16
100
  declare const CAPABILITY_MANIFEST: {
17
- readonly schemaVersion: 1;
101
+ readonly schemaVersion: 2;
18
102
  readonly runtimes: readonly ["node", "python", "wasm"];
103
+ readonly parityProfiles: {
104
+ readonly core: readonly ["node", "python", "wasm"];
105
+ readonly local: readonly ["node", "python"];
106
+ readonly nodeLocal: readonly ["node"];
107
+ readonly document: readonly ["node", "python"];
108
+ };
109
+ readonly surfaces: readonly [{
110
+ readonly id: "package.prepare";
111
+ readonly profile: "core";
112
+ }, {
113
+ readonly id: "package.load";
114
+ readonly profile: "core";
115
+ }, {
116
+ readonly id: "package.load-file";
117
+ readonly profile: "local";
118
+ }, {
119
+ readonly id: "text.normalize";
120
+ readonly profile: "core";
121
+ }, {
122
+ readonly id: "text.redact";
123
+ readonly profile: "core";
124
+ }, {
125
+ readonly id: "text.redact-stream";
126
+ readonly profile: "core";
127
+ }, {
128
+ readonly id: "text.diagnostics";
129
+ readonly profile: "core";
130
+ }, {
131
+ readonly id: "text.summary-diagnostics";
132
+ readonly profile: "core";
133
+ }, {
134
+ readonly id: "text.caller-detections";
135
+ readonly profile: "core";
136
+ }, {
137
+ readonly id: "text.external-detection-batch";
138
+ readonly profile: "core";
139
+ }, {
140
+ readonly id: "text.operators";
141
+ readonly profile: "core";
142
+ }, {
143
+ readonly id: "package.default";
144
+ readonly profile: "core";
145
+ }, {
146
+ readonly id: "session.cross-document";
147
+ readonly profile: "core";
148
+ }, {
149
+ readonly id: "session.lifecycle";
150
+ readonly profile: "core";
151
+ }, {
152
+ readonly id: "session.plaintext-transfer";
153
+ readonly profile: "core";
154
+ }, {
155
+ readonly id: "session.encrypted-archive";
156
+ readonly profile: "core";
157
+ }, {
158
+ readonly id: "document.docx.extract";
159
+ readonly profile: "document";
160
+ }, {
161
+ readonly id: "document.docx.rewrite";
162
+ readonly profile: "document";
163
+ }, {
164
+ readonly id: "document.docx.anonymize";
165
+ readonly profile: "document";
166
+ }, {
167
+ readonly id: "document.docx.restore";
168
+ readonly profile: "document";
169
+ }, {
170
+ readonly id: "document.pdf.inspect";
171
+ readonly profile: "core";
172
+ }, {
173
+ readonly id: "document.pdf.anonymize-raster";
174
+ readonly profile: "document";
175
+ }, {
176
+ readonly id: "document.pdf.rewrite-raster";
177
+ readonly profile: "document";
178
+ }, {
179
+ readonly id: "document.pdf.observe-raster-local";
180
+ readonly profile: "nodeLocal";
181
+ }];
19
182
  readonly entities: readonly [{
20
183
  readonly label: "person";
21
184
  readonly selection: "default";
@@ -80,6 +243,10 @@ declare const CAPABILITY_MANIFEST: {
80
243
  readonly label: "registration number";
81
244
  readonly selection: "default";
82
245
  readonly detectionSources: readonly ["regex", "trigger"];
246
+ }, {
247
+ readonly label: "case number";
248
+ readonly selection: "default";
249
+ readonly detectionSources: readonly ["regex", "trigger"];
83
250
  }, {
84
251
  readonly label: "credit card number";
85
252
  readonly selection: "default";
@@ -87,7 +254,7 @@ declare const CAPABILITY_MANIFEST: {
87
254
  }, {
88
255
  readonly label: "passport number";
89
256
  readonly selection: "default";
90
- readonly detectionSources: readonly ["regex"];
257
+ readonly detectionSources: readonly ["regex", "trigger"];
91
258
  }, {
92
259
  readonly label: "crypto";
93
260
  readonly selection: "default";
@@ -119,5 +286,5 @@ declare const CAPABILITY_MANIFEST: {
119
286
  }];
120
287
  };
121
288
  //#endregion
122
- export { CAPABILITY_MANIFEST, CAPABILITY_MANIFEST_SCHEMA_VERSION, CAPABILITY_RUNTIMES, CapabilityManifest, CapabilityRuntime };
289
+ export { CAPABILITY_MANIFEST, CAPABILITY_MANIFEST_SCHEMA_VERSION, CAPABILITY_PARITY_PROFILES, CAPABILITY_RUNTIMES, CAPABILITY_SURFACES, CapabilityManifest, CapabilityParityProfile, CapabilityRuntime, CapabilitySurface, CapabilitySurfaceId };
123
290
  //# sourceMappingURL=capabilities.d.mts.map
@@ -1,22 +1,128 @@
1
1
  import { ENTITY_CAPABILITIES } from "./constants.mjs";
2
2
  //#region src/capabilities.ts
3
- const CAPABILITY_MANIFEST_SCHEMA_VERSION = 1;
3
+ const CAPABILITY_MANIFEST_SCHEMA_VERSION = 2;
4
4
  const CAPABILITY_RUNTIMES = [
5
5
  "node",
6
6
  "python",
7
7
  "wasm"
8
8
  ];
9
+ const CAPABILITY_PARITY_PROFILES = {
10
+ core: CAPABILITY_RUNTIMES,
11
+ local: ["node", "python"],
12
+ nodeLocal: ["node"],
13
+ document: ["node", "python"]
14
+ };
15
+ const CAPABILITY_SURFACES = [
16
+ {
17
+ id: "package.prepare",
18
+ profile: "core"
19
+ },
20
+ {
21
+ id: "package.load",
22
+ profile: "core"
23
+ },
24
+ {
25
+ id: "package.load-file",
26
+ profile: "local"
27
+ },
28
+ {
29
+ id: "text.normalize",
30
+ profile: "core"
31
+ },
32
+ {
33
+ id: "text.redact",
34
+ profile: "core"
35
+ },
36
+ {
37
+ id: "text.redact-stream",
38
+ profile: "core"
39
+ },
40
+ {
41
+ id: "text.diagnostics",
42
+ profile: "core"
43
+ },
44
+ {
45
+ id: "text.summary-diagnostics",
46
+ profile: "core"
47
+ },
48
+ {
49
+ id: "text.caller-detections",
50
+ profile: "core"
51
+ },
52
+ {
53
+ id: "text.external-detection-batch",
54
+ profile: "core"
55
+ },
56
+ {
57
+ id: "text.operators",
58
+ profile: "core"
59
+ },
60
+ {
61
+ id: "package.default",
62
+ profile: "core"
63
+ },
64
+ {
65
+ id: "session.cross-document",
66
+ profile: "core"
67
+ },
68
+ {
69
+ id: "session.lifecycle",
70
+ profile: "core"
71
+ },
72
+ {
73
+ id: "session.plaintext-transfer",
74
+ profile: "core"
75
+ },
76
+ {
77
+ id: "session.encrypted-archive",
78
+ profile: "core"
79
+ },
80
+ {
81
+ id: "document.docx.extract",
82
+ profile: "document"
83
+ },
84
+ {
85
+ id: "document.docx.rewrite",
86
+ profile: "document"
87
+ },
88
+ {
89
+ id: "document.docx.anonymize",
90
+ profile: "document"
91
+ },
92
+ {
93
+ id: "document.docx.restore",
94
+ profile: "document"
95
+ },
96
+ {
97
+ id: "document.pdf.inspect",
98
+ profile: "core"
99
+ },
100
+ {
101
+ id: "document.pdf.anonymize-raster",
102
+ profile: "document"
103
+ },
104
+ {
105
+ id: "document.pdf.rewrite-raster",
106
+ profile: "document"
107
+ },
108
+ {
109
+ id: "document.pdf.observe-raster-local",
110
+ profile: "nodeLocal"
111
+ }
112
+ ];
9
113
  /**
10
114
  * Versioned, runtime-free discovery contract for the deterministic pipeline.
11
115
  * The manifest contains no accuracy claims; it describes available labels,
12
116
  * activation, provenance sources, and runtime parity only.
13
117
  */
14
118
  const CAPABILITY_MANIFEST = {
15
- schemaVersion: 1,
119
+ schemaVersion: 2,
16
120
  runtimes: CAPABILITY_RUNTIMES,
121
+ parityProfiles: CAPABILITY_PARITY_PROFILES,
122
+ surfaces: CAPABILITY_SURFACES,
17
123
  entities: ENTITY_CAPABILITIES
18
124
  };
19
125
  //#endregion
20
- export { CAPABILITY_MANIFEST, CAPABILITY_MANIFEST_SCHEMA_VERSION, CAPABILITY_RUNTIMES };
126
+ export { CAPABILITY_MANIFEST, CAPABILITY_MANIFEST_SCHEMA_VERSION, CAPABILITY_PARITY_PROFILES, CAPABILITY_RUNTIMES, CAPABILITY_SURFACES };
21
127
 
22
128
  //# sourceMappingURL=capabilities.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities.ts"],"sourcesContent":["import { ENTITY_CAPABILITIES } from \"./constants\";\n\nexport const CAPABILITY_MANIFEST_SCHEMA_VERSION = 1 as const;\n\nexport const CAPABILITY_RUNTIMES = [\"node\", \"python\", \"wasm\"] as const;\n\nexport type CapabilityRuntime = (typeof CAPABILITY_RUNTIMES)[number];\n\nexport type CapabilityManifest = {\n schemaVersion: typeof CAPABILITY_MANIFEST_SCHEMA_VERSION;\n runtimes: readonly CapabilityRuntime[];\n entities: typeof ENTITY_CAPABILITIES;\n};\n\n/**\n * Versioned, runtime-free discovery contract for the deterministic pipeline.\n * The manifest contains no accuracy claims; it describes available labels,\n * activation, provenance sources, and runtime parity only.\n */\nexport const CAPABILITY_MANIFEST = {\n schemaVersion: CAPABILITY_MANIFEST_SCHEMA_VERSION,\n runtimes: CAPABILITY_RUNTIMES,\n entities: ENTITY_CAPABILITIES,\n} as const satisfies CapabilityManifest;\n"],"mappings":";;AAEA,MAAa,qCAAqC;AAElD,MAAa,sBAAsB;CAAC;CAAQ;CAAU;AAAM;;;;;;AAe5D,MAAa,sBAAsB;CACjC,eAAA;CACA,UAAU;CACV,UAAU;AACZ"}
1
+ {"version":3,"file":"capabilities.mjs","names":[],"sources":["../../src/capabilities.ts"],"sourcesContent":["import { ENTITY_CAPABILITIES } from \"./constants\";\n\nexport const CAPABILITY_MANIFEST_SCHEMA_VERSION = 2 as const;\n\nexport const CAPABILITY_RUNTIMES = [\"node\", \"python\", \"wasm\"] as const;\n\nexport type CapabilityRuntime = (typeof CAPABILITY_RUNTIMES)[number];\n\nexport const CAPABILITY_PARITY_PROFILES = {\n core: CAPABILITY_RUNTIMES,\n local: [\"node\", \"python\"],\n nodeLocal: [\"node\"],\n document: [\"node\", \"python\"],\n} as const satisfies Record<string, readonly CapabilityRuntime[]>;\n\nexport type CapabilityParityProfile = keyof typeof CAPABILITY_PARITY_PROFILES;\n\nexport const CAPABILITY_SURFACES = [\n { id: \"package.prepare\", profile: \"core\" },\n { id: \"package.load\", profile: \"core\" },\n { id: \"package.load-file\", profile: \"local\" },\n { id: \"text.normalize\", profile: \"core\" },\n { id: \"text.redact\", profile: \"core\" },\n { id: \"text.redact-stream\", profile: \"core\" },\n { id: \"text.diagnostics\", profile: \"core\" },\n { id: \"text.summary-diagnostics\", profile: \"core\" },\n { id: \"text.caller-detections\", profile: \"core\" },\n { id: \"text.external-detection-batch\", profile: \"core\" },\n { id: \"text.operators\", profile: \"core\" },\n { id: \"package.default\", profile: \"core\" },\n { id: \"session.cross-document\", profile: \"core\" },\n { id: \"session.lifecycle\", profile: \"core\" },\n { id: \"session.plaintext-transfer\", profile: \"core\" },\n { id: \"session.encrypted-archive\", profile: \"core\" },\n { id: \"document.docx.extract\", profile: \"document\" },\n { id: \"document.docx.rewrite\", profile: \"document\" },\n { id: \"document.docx.anonymize\", profile: \"document\" },\n { id: \"document.docx.restore\", profile: \"document\" },\n { id: \"document.pdf.inspect\", profile: \"core\" },\n { id: \"document.pdf.anonymize-raster\", profile: \"document\" },\n { id: \"document.pdf.rewrite-raster\", profile: \"document\" },\n { id: \"document.pdf.observe-raster-local\", profile: \"nodeLocal\" },\n] as const satisfies readonly {\n id: string;\n profile: CapabilityParityProfile;\n}[];\n\nexport type CapabilitySurface = (typeof CAPABILITY_SURFACES)[number];\nexport type CapabilitySurfaceId = CapabilitySurface[\"id\"];\n\nexport type CapabilityManifest = {\n schemaVersion: typeof CAPABILITY_MANIFEST_SCHEMA_VERSION;\n runtimes: readonly CapabilityRuntime[];\n parityProfiles: typeof CAPABILITY_PARITY_PROFILES;\n surfaces: typeof CAPABILITY_SURFACES;\n entities: typeof ENTITY_CAPABILITIES;\n};\n\n/**\n * Versioned, runtime-free discovery contract for the deterministic pipeline.\n * The manifest contains no accuracy claims; it describes available labels,\n * activation, provenance sources, and runtime parity only.\n */\nexport const CAPABILITY_MANIFEST = {\n schemaVersion: CAPABILITY_MANIFEST_SCHEMA_VERSION,\n runtimes: CAPABILITY_RUNTIMES,\n parityProfiles: CAPABILITY_PARITY_PROFILES,\n surfaces: CAPABILITY_SURFACES,\n entities: ENTITY_CAPABILITIES,\n} as const satisfies CapabilityManifest;\n"],"mappings":";;AAEA,MAAa,qCAAqC;AAElD,MAAa,sBAAsB;CAAC;CAAQ;CAAU;AAAM;AAI5D,MAAa,6BAA6B;CACxC,MAAM;CACN,OAAO,CAAC,QAAQ,QAAQ;CACxB,WAAW,CAAC,MAAM;CAClB,UAAU,CAAC,QAAQ,QAAQ;AAC7B;AAIA,MAAa,sBAAsB;CACjC;EAAE,IAAI;EAAmB,SAAS;CAAO;CACzC;EAAE,IAAI;EAAgB,SAAS;CAAO;CACtC;EAAE,IAAI;EAAqB,SAAS;CAAQ;CAC5C;EAAE,IAAI;EAAkB,SAAS;CAAO;CACxC;EAAE,IAAI;EAAe,SAAS;CAAO;CACrC;EAAE,IAAI;EAAsB,SAAS;CAAO;CAC5C;EAAE,IAAI;EAAoB,SAAS;CAAO;CAC1C;EAAE,IAAI;EAA4B,SAAS;CAAO;CAClD;EAAE,IAAI;EAA0B,SAAS;CAAO;CAChD;EAAE,IAAI;EAAiC,SAAS;CAAO;CACvD;EAAE,IAAI;EAAkB,SAAS;CAAO;CACxC;EAAE,IAAI;EAAmB,SAAS;CAAO;CACzC;EAAE,IAAI;EAA0B,SAAS;CAAO;CAChD;EAAE,IAAI;EAAqB,SAAS;CAAO;CAC3C;EAAE,IAAI;EAA8B,SAAS;CAAO;CACpD;EAAE,IAAI;EAA6B,SAAS;CAAO;CACnD;EAAE,IAAI;EAAyB,SAAS;CAAW;CACnD;EAAE,IAAI;EAAyB,SAAS;CAAW;CACnD;EAAE,IAAI;EAA2B,SAAS;CAAW;CACrD;EAAE,IAAI;EAAyB,SAAS;CAAW;CACnD;EAAE,IAAI;EAAwB,SAAS;CAAO;CAC9C;EAAE,IAAI;EAAiC,SAAS;CAAW;CAC3D;EAAE,IAAI;EAA+B,SAAS;CAAW;CACzD;EAAE,IAAI;EAAqC,SAAS;CAAY;AAClE;;;;;;AAqBA,MAAa,sBAAsB;CACjC,eAAA;CACA,UAAU;CACV,gBAAgB;CAChB,UAAU;CACV,UAAU;AACZ"}
@@ -164,6 +164,11 @@ const ENTITY_CAPABILITIES = [
164
164
  selection: ENTITY_SELECTIONS.DEFAULT,
165
165
  detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER]
166
166
  },
167
+ {
168
+ label: "case number",
169
+ selection: ENTITY_SELECTIONS.DEFAULT,
170
+ detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER]
171
+ },
167
172
  {
168
173
  label: "credit card number",
169
174
  selection: ENTITY_SELECTIONS.DEFAULT,
@@ -172,7 +177,7 @@ const ENTITY_CAPABILITIES = [
172
177
  {
173
178
  label: "passport number",
174
179
  selection: ENTITY_SELECTIONS.DEFAULT,
175
- detectionSources: [DETECTION_SOURCES.REGEX]
180
+ detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER]
176
181
  },
177
182
  {
178
183
  label: "crypto",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","names":[],"sources":["../../src/constants.ts"],"sourcesContent":["/**\n * Runtime-free constants for the anonymization pipeline.\n *\n * This module is the SSR-safe / browser-safe entrypoint:\n * importing it must not pull in `@stll/anonymize-wasm`\n * or any other runtime-bearing module.\n * Consumers that only need the static label list,\n * detection-source identifiers, or operator names import\n * from `@stll/anonymize/constants` (or\n * `@stll/anonymize-wasm/constants`) without paying the\n * wasm / regex-set startup cost.\n *\n * `types.ts` re-exports these for back-compat, so existing\n * `import { DEFAULT_ENTITY_LABELS } from \"@stll/anonymize\"`\n * call sites keep working.\n */\n\n/**\n * Source of a detected entity span.\n * Ordered by detection layer in the pipeline.\n */\nexport const DETECTION_SOURCES = {\n TRIGGER: \"trigger\",\n REGEX: \"regex\",\n DENY_LIST: \"deny-list\",\n LEGAL_FORM: \"legal-form\",\n GAZETTEER: \"gazetteer\",\n COUNTRY: \"country\",\n NER: \"ner\",\n COREFERENCE: \"coreference\",\n} as const;\n\nexport type DetectionSource =\n (typeof DETECTION_SOURCES)[keyof typeof DETECTION_SOURCES];\n\n/**\n * Priority levels for detection sources.\n * Higher = more structurally reliable. Used during\n * overlap resolution so deterministic detectors beat\n * probabilistic ones regardless of raw score.\n */\nexport const DETECTOR_PRIORITY = {\n [DETECTION_SOURCES.GAZETTEER]: 5,\n [DETECTION_SOURCES.TRIGGER]: 4,\n [DETECTION_SOURCES.LEGAL_FORM]: 3,\n [DETECTION_SOURCES.REGEX]: 3,\n [DETECTION_SOURCES.COUNTRY]: 3,\n [DETECTION_SOURCES.DENY_LIST]: 2,\n [DETECTION_SOURCES.COREFERENCE]: 2,\n [DETECTION_SOURCES.NER]: 1,\n} as const satisfies Record<DetectionSource, number>;\n\n/**\n * Anonymization operator types. Each operator defines\n * how a confirmed entity is replaced in the output.\n */\nexport const OPERATOR_TYPES = [\"replace\", \"redact\", \"keep\", \"mask\"] as const;\n\nexport type OperatorType = (typeof OPERATOR_TYPES)[number];\n\nexport const ENTITY_SELECTIONS = {\n DEFAULT: \"default\",\n OPT_IN: \"opt-in\",\n} as const;\n\nexport type EntitySelection =\n (typeof ENTITY_SELECTIONS)[keyof typeof ENTITY_SELECTIONS];\n\nexport type EntityCapability = {\n label: string;\n selection: EntitySelection;\n detectionSources: readonly DetectionSource[];\n};\n\n/**\n * Canonical entity capabilities exposed by the deterministic native pipeline.\n * `selection` describes whether the default package requests the label; opt-in\n * labels have built-in detection rules but must be requested explicitly.\n *\n * These labels are ephemeral: entities are regenerated on\n * every pipeline run and never persisted to the database.\n * Renaming a label here requires no migration.\n */\nexport const ENTITY_CAPABILITIES = [\n {\n label: \"person\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [\n DETECTION_SOURCES.TRIGGER,\n DETECTION_SOURCES.REGEX,\n DETECTION_SOURCES.DENY_LIST,\n DETECTION_SOURCES.COREFERENCE,\n ],\n },\n {\n label: \"organization\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [\n DETECTION_SOURCES.TRIGGER,\n DETECTION_SOURCES.DENY_LIST,\n DETECTION_SOURCES.LEGAL_FORM,\n DETECTION_SOURCES.GAZETTEER,\n DETECTION_SOURCES.COREFERENCE,\n ],\n },\n {\n label: \"phone number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"address\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [\n DETECTION_SOURCES.REGEX,\n DETECTION_SOURCES.TRIGGER,\n DETECTION_SOURCES.DENY_LIST,\n ],\n },\n {\n label: \"country\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.COUNTRY],\n },\n {\n label: \"email address\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n {\n label: \"date\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"date of birth\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"bank account number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"iban\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"tax identification number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"identity card number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"birth number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"national identification number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"social security number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"registration number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"credit card number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n {\n label: \"passport number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n {\n label: \"crypto\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n {\n label: \"monetary amount\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"land parcel\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"misc\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.DENY_LIST],\n },\n {\n label: \"ip address\",\n selection: ENTITY_SELECTIONS.OPT_IN,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n {\n label: \"mac address\",\n selection: ENTITY_SELECTIONS.OPT_IN,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n {\n label: \"url\",\n selection: ENTITY_SELECTIONS.OPT_IN,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n] as const satisfies readonly EntityCapability[];\n\ntype KnownEntityCapability = (typeof ENTITY_CAPABILITIES)[number];\n\nexport type EntityLabel = KnownEntityCapability[\"label\"];\n\nexport const ENTITY_LABELS: readonly EntityLabel[] = ENTITY_CAPABILITIES.map(\n ({ label }) => label,\n);\n\nconst isDefaultEntityCapability = (\n capability: KnownEntityCapability,\n): capability is Extract<\n KnownEntityCapability,\n { selection: typeof ENTITY_SELECTIONS.DEFAULT }\n> => capability.selection === ENTITY_SELECTIONS.DEFAULT;\n\nexport type DefaultEntityLabel = Extract<\n KnownEntityCapability,\n { selection: typeof ENTITY_SELECTIONS.DEFAULT }\n>[\"label\"];\n\nexport const DEFAULT_ENTITY_LABELS: readonly DefaultEntityLabel[] =\n ENTITY_CAPABILITIES.filter(isDefaultEntityCapability).map(\n ({ label }) => label,\n );\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,oBAAoB;CAC/B,SAAS;CACT,OAAO;CACP,WAAW;CACX,YAAY;CACZ,WAAW;CACX,SAAS;CACT,KAAK;CACL,aAAa;AACf;;;;;;;AAWA,MAAa,oBAAoB;EAC9B,kBAAkB,YAA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A;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB,CAAC,kBAAkB,KAAK;CAC5C;AACF;AAMA,MAAa,gBAAwC,oBAAoB,KACtE,EAAE,YAAY,KACjB;AAEA,MAAM,6BACJ,eAIG,WAAW,cAAc,kBAAkB;AAOhD,MAAa,wBACX,oBAAoB,OAAO,yBAAyB,CAAC,CAAC,KACnD,EAAE,YAAY,KACjB"}
1
+ {"version":3,"file":"constants.mjs","names":[],"sources":["../../src/constants.ts"],"sourcesContent":["/**\n * Runtime-free constants for the anonymization pipeline.\n *\n * This module is the SSR-safe / browser-safe entrypoint:\n * importing it must not pull in `@stll/anonymize-wasm`\n * or any other runtime-bearing module.\n * Consumers that only need the static label list,\n * detection-source identifiers, or operator names import\n * from `@stll/anonymize/constants` (or\n * `@stll/anonymize-wasm/constants`) without paying the\n * wasm / regex-set startup cost.\n *\n * `types.ts` re-exports these for back-compat, so existing\n * `import { DEFAULT_ENTITY_LABELS } from \"@stll/anonymize\"`\n * call sites keep working.\n */\n\n/**\n * Source of a detected entity span.\n * Ordered by detection layer in the pipeline.\n */\nexport const DETECTION_SOURCES = {\n TRIGGER: \"trigger\",\n REGEX: \"regex\",\n DENY_LIST: \"deny-list\",\n LEGAL_FORM: \"legal-form\",\n GAZETTEER: \"gazetteer\",\n COUNTRY: \"country\",\n NER: \"ner\",\n COREFERENCE: \"coreference\",\n} as const;\n\nexport type DetectionSource =\n (typeof DETECTION_SOURCES)[keyof typeof DETECTION_SOURCES];\n\n/**\n * Priority levels for detection sources.\n * Higher = more structurally reliable. Used during\n * overlap resolution so deterministic detectors beat\n * probabilistic ones regardless of raw score.\n */\nexport const DETECTOR_PRIORITY = {\n [DETECTION_SOURCES.GAZETTEER]: 5,\n [DETECTION_SOURCES.TRIGGER]: 4,\n [DETECTION_SOURCES.LEGAL_FORM]: 3,\n [DETECTION_SOURCES.REGEX]: 3,\n [DETECTION_SOURCES.COUNTRY]: 3,\n [DETECTION_SOURCES.DENY_LIST]: 2,\n [DETECTION_SOURCES.COREFERENCE]: 2,\n [DETECTION_SOURCES.NER]: 1,\n} as const satisfies Record<DetectionSource, number>;\n\n/**\n * Anonymization operator types. Each operator defines\n * how a confirmed entity is replaced in the output.\n */\nexport const OPERATOR_TYPES = [\"replace\", \"redact\", \"keep\", \"mask\"] as const;\n\nexport type OperatorType = (typeof OPERATOR_TYPES)[number];\n\nexport const ENTITY_SELECTIONS = {\n DEFAULT: \"default\",\n OPT_IN: \"opt-in\",\n} as const;\n\nexport type EntitySelection =\n (typeof ENTITY_SELECTIONS)[keyof typeof ENTITY_SELECTIONS];\n\nexport type EntityCapability = {\n label: string;\n selection: EntitySelection;\n detectionSources: readonly DetectionSource[];\n};\n\n/**\n * Canonical entity capabilities exposed by the deterministic native pipeline.\n * `selection` describes whether the default package requests the label; opt-in\n * labels have built-in detection rules but must be requested explicitly.\n *\n * These labels are ephemeral: entities are regenerated on\n * every pipeline run and never persisted to the database.\n * Renaming a label here requires no migration.\n */\nexport const ENTITY_CAPABILITIES = [\n {\n label: \"person\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [\n DETECTION_SOURCES.TRIGGER,\n DETECTION_SOURCES.REGEX,\n DETECTION_SOURCES.DENY_LIST,\n DETECTION_SOURCES.COREFERENCE,\n ],\n },\n {\n label: \"organization\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [\n DETECTION_SOURCES.TRIGGER,\n DETECTION_SOURCES.DENY_LIST,\n DETECTION_SOURCES.LEGAL_FORM,\n DETECTION_SOURCES.GAZETTEER,\n DETECTION_SOURCES.COREFERENCE,\n ],\n },\n {\n label: \"phone number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"address\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [\n DETECTION_SOURCES.REGEX,\n DETECTION_SOURCES.TRIGGER,\n DETECTION_SOURCES.DENY_LIST,\n ],\n },\n {\n label: \"country\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.COUNTRY],\n },\n {\n label: \"email address\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n {\n label: \"date\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"date of birth\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"bank account number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"iban\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"tax identification number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"identity card number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"birth number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"national identification number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"social security number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"registration number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"case number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"credit card number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n {\n label: \"passport number\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"crypto\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n {\n label: \"monetary amount\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"land parcel\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.TRIGGER],\n },\n {\n label: \"misc\",\n selection: ENTITY_SELECTIONS.DEFAULT,\n detectionSources: [DETECTION_SOURCES.REGEX, DETECTION_SOURCES.DENY_LIST],\n },\n {\n label: \"ip address\",\n selection: ENTITY_SELECTIONS.OPT_IN,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n {\n label: \"mac address\",\n selection: ENTITY_SELECTIONS.OPT_IN,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n {\n label: \"url\",\n selection: ENTITY_SELECTIONS.OPT_IN,\n detectionSources: [DETECTION_SOURCES.REGEX],\n },\n] as const satisfies readonly EntityCapability[];\n\ntype KnownEntityCapability = (typeof ENTITY_CAPABILITIES)[number];\n\nexport type EntityLabel = KnownEntityCapability[\"label\"];\n\nexport const ENTITY_LABELS: readonly EntityLabel[] = ENTITY_CAPABILITIES.map(\n ({ label }) => label,\n);\n\nconst isDefaultEntityCapability = (\n capability: KnownEntityCapability,\n): capability is Extract<\n KnownEntityCapability,\n { selection: typeof ENTITY_SELECTIONS.DEFAULT }\n> => capability.selection === ENTITY_SELECTIONS.DEFAULT;\n\nexport type DefaultEntityLabel = Extract<\n KnownEntityCapability,\n { selection: typeof ENTITY_SELECTIONS.DEFAULT }\n>[\"label\"];\n\nexport const DEFAULT_ENTITY_LABELS: readonly DefaultEntityLabel[] =\n ENTITY_CAPABILITIES.filter(isDefaultEntityCapability).map(\n ({ label }) => label,\n );\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,oBAAoB;CAC/B,SAAS;CACT,OAAO;CACP,WAAW;CACX,YAAY;CACZ,WAAW;CACX,SAAS;CACT,KAAK;CACL,aAAa;AACf;;;;;;;AAWA,MAAa,oBAAoB;EAC9B,kBAAkB,YAAY;EAC9B,kBAAkB,UAAU;EAC5B,kBAAkB,aAAa;EAC/B,kBAAkB,QAAQ;EAC1B,kBAAkB,UAAU;EAC5B,kBAAkB,YAAY;EAC9B,kBAAkB,cAAc;EAChC,kBAAkB,MAAM;AAC3B;;;;;AAMA,MAAa,iBAAiB;CAAC;CAAW;CAAU;CAAQ;AAAM;AAIlE,MAAa,oBAAoB;CAC/B,SAAS;CACT,QAAQ;AACV;;;;;;;;;;AAoBA,MAAa,sBAAsB;CACjC;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB;GAChB,kBAAkB;GAClB,kBAAkB;GAClB,kBAAkB;GAClB,kBAAkB;EACpB;CACF;CACA;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB;GAChB,kBAAkB;GAClB,kBAAkB;GAClB,kBAAkB;GAClB,kBAAkB;GAClB,kBAAkB;EACpB;CACF;CACA;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB,CAAC,kBAAkB,OAAO,kBAAkB,OAAO;CACvE;CACA;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB;GAChB,kBAAkB;GAClB,kBAAkB;GAClB,kBAAkB;EACpB;CACF;CACA;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB,CAAC,kBAAkB,OAAO;CAC9C;C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;CACvE;CACA;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB,CAAC,kBAAkB,KAAK;CAC5C;CACA;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB,CAAC,kBAAkB,OAAO,kBAAkB,OAAO;CACvE;CACA;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB,CAAC,kBAAkB,OAAO;CAC9C;CACA;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB,CAAC,kBAAkB,OAAO,kBAAkB,SAAS;CACzE;CACA;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB,CAAC,kBAAkB,KAAK;CAC5C;CACA;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB,CAAC,kBAAkB,KAAK;CAC5C;CACA;EACE,OAAO;EACP,WAAW,kBAAkB;EAC7B,kBAAkB,CAAC,kBAAkB,KAAK;CAC5C;AACF;AAMA,MAAa,gBAAwC,oBAAoB,KACtE,EAAE,YAAY,KACjB;AAEA,MAAM,6BACJ,eAIG,WAAW,cAAc,kBAAkB;AAOhD,MAAa,wBACX,oBAAoB,OAAO,yBAAyB,CAAC,CAAC,KACnD,EAAE,YAAY,KACjB"}
@@ -135,6 +135,10 @@ declare const ENTITY_CAPABILITIES: readonly [{
135
135
  readonly label: "registration number";
136
136
  readonly selection: "default";
137
137
  readonly detectionSources: readonly ["regex", "trigger"];
138
+ }, {
139
+ readonly label: "case number";
140
+ readonly selection: "default";
141
+ readonly detectionSources: readonly ["regex", "trigger"];
138
142
  }, {
139
143
  readonly label: "credit card number";
140
144
  readonly selection: "default";
@@ -142,7 +146,7 @@ declare const ENTITY_CAPABILITIES: readonly [{
142
146
  }, {
143
147
  readonly label: "passport number";
144
148
  readonly selection: "default";
145
- readonly detectionSources: readonly ["regex"];
149
+ readonly detectionSources: readonly ["regex", "trigger"];
146
150
  }, {
147
151
  readonly label: "crypto";
148
152
  readonly selection: "default";
@@ -11979,24 +11979,38 @@ var NativePreparedSessionRedactionPlan = __napiModule.exports.NativePreparedSess
11979
11979
  var assembleStaticSearchCompressedPackageBytes = __napiModule.exports.assembleStaticSearchCompressedPackageBytes;
11980
11980
  var assembleStaticSearchConfigJson = __napiModule.exports.assembleStaticSearchConfigJson;
11981
11981
  var assembleStaticSearchPackageBytes = __napiModule.exports.assembleStaticSearchPackageBytes;
11982
+ var convertExternalDetectionBatch = __napiModule.exports.convertExternalDetectionBatch;
11983
+ var externalDetectionLimitsJson = __napiModule.exports.externalDetectionLimitsJson;
11984
+ var extractDocxTextJson = __napiModule.exports.extractDocxTextJson;
11985
+ var inspectPdfJson = __napiModule.exports.inspectPdfJson;
11982
11986
  var nativePackageVersion = __napiModule.exports.nativePackageVersion;
11983
11987
  var normalizeForSearch = __napiModule.exports.normalizeForSearch;
11988
+ var planDocxRestorationJson = __napiModule.exports.planDocxRestorationJson;
11984
11989
  var prepareStaticSearchArtifactsBytes = __napiModule.exports.prepareStaticSearchArtifactsBytes;
11985
11990
  var prepareStaticSearchCompressedPackageBytes = __napiModule.exports.prepareStaticSearchCompressedPackageBytes;
11986
11991
  var prepareStaticSearchPackageBytes = __napiModule.exports.prepareStaticSearchPackageBytes;
11987
11992
  var redactStaticEntitiesDiagnosticsJson = __napiModule.exports.redactStaticEntitiesDiagnosticsJson;
11988
11993
  var redactStaticEntitiesJson = __napiModule.exports.redactStaticEntitiesJson;
11989
11994
  var redactStaticEntitiesSummaryDiagnosticsJson = __napiModule.exports.redactStaticEntitiesSummaryDiagnosticsJson;
11995
+ var rewriteDocxTextNative = __napiModule.exports.rewriteDocxTextNative;
11996
+ var rewritePdfRasterFromDetectionsJson = __napiModule.exports.rewritePdfRasterFromDetectionsJson;
11990
11997
  export {
11998
+ rewritePdfRasterFromDetectionsJson,
11999
+ rewriteDocxTextNative,
11991
12000
  redactStaticEntitiesSummaryDiagnosticsJson,
11992
12001
  redactStaticEntitiesJson,
11993
12002
  redactStaticEntitiesDiagnosticsJson,
11994
12003
  prepareStaticSearchPackageBytes,
11995
12004
  prepareStaticSearchCompressedPackageBytes,
11996
12005
  prepareStaticSearchArtifactsBytes,
12006
+ planDocxRestorationJson,
11997
12007
  normalizeForSearch,
11998
12008
  nativePackageVersion,
12009
+ inspectPdfJson,
12010
+ extractDocxTextJson,
12011
+ externalDetectionLimitsJson,
11999
12012
  index_wasi_browser_default as default,
12013
+ convertExternalDetectionBatch,
12000
12014
  assembleStaticSearchPackageBytes,
12001
12015
  assembleStaticSearchConfigJson,
12002
12016
  assembleStaticSearchCompressedPackageBytes,
@@ -114,11 +114,18 @@ module.exports.NativePreparedSessionRedactionPlan = __napiModule.exports.NativeP
114
114
  module.exports.assembleStaticSearchCompressedPackageBytes = __napiModule.exports.assembleStaticSearchCompressedPackageBytes
115
115
  module.exports.assembleStaticSearchConfigJson = __napiModule.exports.assembleStaticSearchConfigJson
116
116
  module.exports.assembleStaticSearchPackageBytes = __napiModule.exports.assembleStaticSearchPackageBytes
117
+ module.exports.convertExternalDetectionBatch = __napiModule.exports.convertExternalDetectionBatch
118
+ module.exports.externalDetectionLimitsJson = __napiModule.exports.externalDetectionLimitsJson
119
+ module.exports.extractDocxTextJson = __napiModule.exports.extractDocxTextJson
120
+ module.exports.inspectPdfJson = __napiModule.exports.inspectPdfJson
117
121
  module.exports.nativePackageVersion = __napiModule.exports.nativePackageVersion
118
122
  module.exports.normalizeForSearch = __napiModule.exports.normalizeForSearch
123
+ module.exports.planDocxRestorationJson = __napiModule.exports.planDocxRestorationJson
119
124
  module.exports.prepareStaticSearchArtifactsBytes = __napiModule.exports.prepareStaticSearchArtifactsBytes
120
125
  module.exports.prepareStaticSearchCompressedPackageBytes = __napiModule.exports.prepareStaticSearchCompressedPackageBytes
121
126
  module.exports.prepareStaticSearchPackageBytes = __napiModule.exports.prepareStaticSearchPackageBytes
122
127
  module.exports.redactStaticEntitiesDiagnosticsJson = __napiModule.exports.redactStaticEntitiesDiagnosticsJson
123
128
  module.exports.redactStaticEntitiesJson = __napiModule.exports.redactStaticEntitiesJson
124
129
  module.exports.redactStaticEntitiesSummaryDiagnosticsJson = __napiModule.exports.redactStaticEntitiesSummaryDiagnosticsJson
130
+ module.exports.rewriteDocxTextNative = __napiModule.exports.rewriteDocxTextNative
131
+ module.exports.rewritePdfRasterFromDetectionsJson = __napiModule.exports.rewritePdfRasterFromDetectionsJson
Binary file