@cloakapi/sdk 1.5.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +24 -4
- package/dist/browser/index.d.mts +99 -89
- package/dist/browser/index.d.ts +99 -89
- package/dist/browser/index.js +1245 -123
- package/dist/browser/index.mjs +24 -8
- package/dist/browser/light.d.mts +3 -2
- package/dist/browser/light.d.ts +3 -2
- package/dist/browser/light.js +1 -1
- package/dist/browser/light.mjs +17 -2
- package/dist/browser/names/public.mjs +2 -2
- package/dist/browser/ner-pipeline-worker.mjs +3 -3
- package/dist/{chunk-6TMC2A6M.mjs → chunk-3MXGO6NA.mjs} +12 -8
- package/dist/{chunk-G6TZ6722.mjs → chunk-6E6T2YO5.mjs} +5 -915
- package/dist/{chunk-EY35G37A.mjs → chunk-746IWCJ4.mjs} +224 -1
- package/dist/chunk-L7RLVZMD.mjs +922 -0
- package/dist/{chunk-JV52VGVZ.mjs → chunk-TRWGRB2P.mjs} +1 -1
- package/dist/chunk-TWAQCP3Z.mjs +1258 -0
- package/dist/{chunk-36BC4GYL.mjs → chunk-VYGV643D.mjs} +262 -122
- package/dist/device/index.d.mts +1448 -0
- package/dist/device/index.d.ts +1448 -0
- package/dist/device/index.js +4539 -0
- package/dist/device/index.mjs +2462 -0
- package/dist/{disclosure-Cx6xS8Tj.d.mts → disclosure-BhM2Aqa2.d.mts} +2 -12
- package/dist/{disclosure-Cx6xS8Tj.d.ts → disclosure-BhM2Aqa2.d.ts} +2 -12
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +14 -12
- package/dist/{local-pii-supplement-SUOJZO7X.mjs → local-pii-supplement-5KFFPDDN.mjs} +4 -4
- package/dist/node.d.mts +2 -1
- package/dist/node.d.ts +2 -1
- package/dist/node.js +311 -58
- package/dist/node.mjs +18 -12
- package/dist/request-body-slots-BMShK1YO.d.mts +56 -0
- package/dist/request-body-slots-BMShK1YO.d.ts +56 -0
- package/package.json +9 -2
- package/dist/{chunk-PEDVEDAW.mjs → chunk-66SEKCCN.mjs} +8 -8
|
@@ -147,20 +147,10 @@ declare const MODE_SHARED_NOTE = "Either way, the same detail always maps to the
|
|
|
147
147
|
* desynced (1.1.49 recorded at package 1.1.52); it is now generated, and
|
|
148
148
|
* `version.lockstep.test.ts` fails the suite if it ever drifts again.
|
|
149
149
|
*/
|
|
150
|
-
declare const SDK_VERSION = "1.
|
|
150
|
+
declare const SDK_VERSION = "1.6.1";
|
|
151
151
|
/** Shared patterns semver and SHA-256 identity (R12), generated from the full file. */
|
|
152
152
|
declare const RULESET_VERSION = "1.6.1";
|
|
153
153
|
|
|
154
|
-
/**
|
|
155
|
-
* One reason list for an `unchecked_content` notice.
|
|
156
|
-
* The Node client and the browser relay both use this union.
|
|
157
|
-
*/
|
|
158
|
-
type UncheckedContentReason = 'unverified_script' | 'value_not_replaced' | 'media_not_checked' | 'unrecognised_block';
|
|
159
|
-
interface ValuePlacementWarning {
|
|
160
|
-
reason: Extract<UncheckedContentReason, 'value_not_replaced' | 'media_not_checked' | 'unrecognised_block'>;
|
|
161
|
-
message: string;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
154
|
interface ExactReviewDecision {
|
|
165
155
|
approved: boolean;
|
|
166
156
|
text: string;
|
|
@@ -329,4 +319,4 @@ interface WithDisclosureOptions {
|
|
|
329
319
|
*/
|
|
330
320
|
declare function withDisclosure<T>(input: T, opts?: WithDisclosureOptions): T;
|
|
331
321
|
|
|
332
|
-
export { CLK_DISCLOSURE_TEXT as C, DEFAULT_SURROGATE_MODE as D, type ExactReviewHandler as E, LEGACY_SURROGATE_MODE_ALIASES as L, MODE_COPY as M, type ReviewProcessingStatus as R, type SurrogateMode as S, type
|
|
322
|
+
export { CLK_DISCLOSURE_TEXT as C, DEFAULT_SURROGATE_MODE as D, type ExactReviewHandler as E, LEGACY_SURROGATE_MODE_ALIASES as L, MODE_COPY as M, type ReviewProcessingStatus as R, type SurrogateMode as S, type WithDisclosureOptions as W, type SurrogateModeReport as a, type ExactReviewDecision as b, CLK_DISCLOSURE_TEXT_MESSAGE_SCOPED as c, CLOAK_ANGLE_DISCLOSURE_TEXT as d, CLOAK_ANGLE_DISCLOSURE_TEXT_MESSAGE_SCOPED as e, CLOAK_ANGLE_HEADER as f, CLOAK_ANGLE_HEADER_MESSAGE_SCOPED as g, CONTINUITY_SENTENCE as h, type DisclosureMessage as i, type DisclosureTextOptions as j, MODE_SHARED_NOTE as k, type MarkerFormat as l, RULESET_VERSION as m, SDK_VERSION as n, SURROGATE_MODES as o, type SurrogateContinuity as p, type SurrogateModeCopy as q, SurrogateModeError as r, coerceSurrogateMode as s, detectMarkerFormat as t, disclosureText as u, isSurrogateMode as v, resolveSurrogateMode as w, withDisclosure as x };
|
|
@@ -147,20 +147,10 @@ declare const MODE_SHARED_NOTE = "Either way, the same detail always maps to the
|
|
|
147
147
|
* desynced (1.1.49 recorded at package 1.1.52); it is now generated, and
|
|
148
148
|
* `version.lockstep.test.ts` fails the suite if it ever drifts again.
|
|
149
149
|
*/
|
|
150
|
-
declare const SDK_VERSION = "1.
|
|
150
|
+
declare const SDK_VERSION = "1.6.1";
|
|
151
151
|
/** Shared patterns semver and SHA-256 identity (R12), generated from the full file. */
|
|
152
152
|
declare const RULESET_VERSION = "1.6.1";
|
|
153
153
|
|
|
154
|
-
/**
|
|
155
|
-
* One reason list for an `unchecked_content` notice.
|
|
156
|
-
* The Node client and the browser relay both use this union.
|
|
157
|
-
*/
|
|
158
|
-
type UncheckedContentReason = 'unverified_script' | 'value_not_replaced' | 'media_not_checked' | 'unrecognised_block';
|
|
159
|
-
interface ValuePlacementWarning {
|
|
160
|
-
reason: Extract<UncheckedContentReason, 'value_not_replaced' | 'media_not_checked' | 'unrecognised_block'>;
|
|
161
|
-
message: string;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
154
|
interface ExactReviewDecision {
|
|
165
155
|
approved: boolean;
|
|
166
156
|
text: string;
|
|
@@ -329,4 +319,4 @@ interface WithDisclosureOptions {
|
|
|
329
319
|
*/
|
|
330
320
|
declare function withDisclosure<T>(input: T, opts?: WithDisclosureOptions): T;
|
|
331
321
|
|
|
332
|
-
export { CLK_DISCLOSURE_TEXT as C, DEFAULT_SURROGATE_MODE as D, type ExactReviewHandler as E, LEGACY_SURROGATE_MODE_ALIASES as L, MODE_COPY as M, type ReviewProcessingStatus as R, type SurrogateMode as S, type
|
|
322
|
+
export { CLK_DISCLOSURE_TEXT as C, DEFAULT_SURROGATE_MODE as D, type ExactReviewHandler as E, LEGACY_SURROGATE_MODE_ALIASES as L, MODE_COPY as M, type ReviewProcessingStatus as R, type SurrogateMode as S, type WithDisclosureOptions as W, type SurrogateModeReport as a, type ExactReviewDecision as b, CLK_DISCLOSURE_TEXT_MESSAGE_SCOPED as c, CLOAK_ANGLE_DISCLOSURE_TEXT as d, CLOAK_ANGLE_DISCLOSURE_TEXT_MESSAGE_SCOPED as e, CLOAK_ANGLE_HEADER as f, CLOAK_ANGLE_HEADER_MESSAGE_SCOPED as g, CONTINUITY_SENTENCE as h, type DisclosureMessage as i, type DisclosureTextOptions as j, MODE_SHARED_NOTE as k, type MarkerFormat as l, RULESET_VERSION as m, SDK_VERSION as n, SURROGATE_MODES as o, type SurrogateContinuity as p, type SurrogateModeCopy as q, SurrogateModeError as r, coerceSurrogateMode as s, detectMarkerFormat as t, disclosureText as u, isSurrogateMode as v, resolveSurrogateMode as w, withDisclosure as x };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
2
|
import { C as CoverageStatus } from './coverage-OYGXtboB.mjs';
|
|
3
|
-
import { S as SurrogateMode, a as SurrogateModeReport,
|
|
4
|
-
export { C as CLK_DISCLOSURE_TEXT, c as CLK_DISCLOSURE_TEXT_MESSAGE_SCOPED, d as CLOAK_ANGLE_DISCLOSURE_TEXT, e as CLOAK_ANGLE_DISCLOSURE_TEXT_MESSAGE_SCOPED, f as CLOAK_ANGLE_HEADER, g as CLOAK_ANGLE_HEADER_MESSAGE_SCOPED, h as CONTINUITY_SENTENCE, D as DEFAULT_SURROGATE_MODE, i as DisclosureMessage, j as DisclosureTextOptions, L as LEGACY_SURROGATE_MODE_ALIASES, M as MODE_COPY, k as MODE_SHARED_NOTE, l as MarkerFormat, m as RULESET_VERSION, n as SDK_VERSION, o as SURROGATE_MODES, p as SurrogateContinuity, q as SurrogateModeCopy, r as SurrogateModeError, W as WithDisclosureOptions, s as coerceSurrogateMode, t as detectMarkerFormat, u as disclosureText, v as isSurrogateMode, w as resolveSurrogateMode, x as withDisclosure } from './disclosure-
|
|
3
|
+
import { S as SurrogateMode, a as SurrogateModeReport, E as ExactReviewHandler, R as ReviewProcessingStatus, b as ExactReviewDecision } from './disclosure-BhM2Aqa2.mjs';
|
|
4
|
+
export { C as CLK_DISCLOSURE_TEXT, c as CLK_DISCLOSURE_TEXT_MESSAGE_SCOPED, d as CLOAK_ANGLE_DISCLOSURE_TEXT, e as CLOAK_ANGLE_DISCLOSURE_TEXT_MESSAGE_SCOPED, f as CLOAK_ANGLE_HEADER, g as CLOAK_ANGLE_HEADER_MESSAGE_SCOPED, h as CONTINUITY_SENTENCE, D as DEFAULT_SURROGATE_MODE, i as DisclosureMessage, j as DisclosureTextOptions, L as LEGACY_SURROGATE_MODE_ALIASES, M as MODE_COPY, k as MODE_SHARED_NOTE, l as MarkerFormat, m as RULESET_VERSION, n as SDK_VERSION, o as SURROGATE_MODES, p as SurrogateContinuity, q as SurrogateModeCopy, r as SurrogateModeError, W as WithDisclosureOptions, s as coerceSurrogateMode, t as detectMarkerFormat, u as disclosureText, v as isSurrogateMode, w as resolveSurrogateMode, x as withDisclosure } from './disclosure-BhM2Aqa2.mjs';
|
|
5
|
+
import { U as UncheckedContentReason } from './request-body-slots-BMShK1YO.mjs';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* PII detection patterns for CloakAPI SDK — Level 1 (Regex only)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { inspect } from 'node:util';
|
|
2
2
|
import { C as CoverageStatus } from './coverage-OYGXtboB.js';
|
|
3
|
-
import { S as SurrogateMode, a as SurrogateModeReport,
|
|
4
|
-
export { C as CLK_DISCLOSURE_TEXT, c as CLK_DISCLOSURE_TEXT_MESSAGE_SCOPED, d as CLOAK_ANGLE_DISCLOSURE_TEXT, e as CLOAK_ANGLE_DISCLOSURE_TEXT_MESSAGE_SCOPED, f as CLOAK_ANGLE_HEADER, g as CLOAK_ANGLE_HEADER_MESSAGE_SCOPED, h as CONTINUITY_SENTENCE, D as DEFAULT_SURROGATE_MODE, i as DisclosureMessage, j as DisclosureTextOptions, L as LEGACY_SURROGATE_MODE_ALIASES, M as MODE_COPY, k as MODE_SHARED_NOTE, l as MarkerFormat, m as RULESET_VERSION, n as SDK_VERSION, o as SURROGATE_MODES, p as SurrogateContinuity, q as SurrogateModeCopy, r as SurrogateModeError, W as WithDisclosureOptions, s as coerceSurrogateMode, t as detectMarkerFormat, u as disclosureText, v as isSurrogateMode, w as resolveSurrogateMode, x as withDisclosure } from './disclosure-
|
|
3
|
+
import { S as SurrogateMode, a as SurrogateModeReport, E as ExactReviewHandler, R as ReviewProcessingStatus, b as ExactReviewDecision } from './disclosure-BhM2Aqa2.js';
|
|
4
|
+
export { C as CLK_DISCLOSURE_TEXT, c as CLK_DISCLOSURE_TEXT_MESSAGE_SCOPED, d as CLOAK_ANGLE_DISCLOSURE_TEXT, e as CLOAK_ANGLE_DISCLOSURE_TEXT_MESSAGE_SCOPED, f as CLOAK_ANGLE_HEADER, g as CLOAK_ANGLE_HEADER_MESSAGE_SCOPED, h as CONTINUITY_SENTENCE, D as DEFAULT_SURROGATE_MODE, i as DisclosureMessage, j as DisclosureTextOptions, L as LEGACY_SURROGATE_MODE_ALIASES, M as MODE_COPY, k as MODE_SHARED_NOTE, l as MarkerFormat, m as RULESET_VERSION, n as SDK_VERSION, o as SURROGATE_MODES, p as SurrogateContinuity, q as SurrogateModeCopy, r as SurrogateModeError, W as WithDisclosureOptions, s as coerceSurrogateMode, t as detectMarkerFormat, u as disclosureText, v as isSurrogateMode, w as resolveSurrogateMode, x as withDisclosure } from './disclosure-BhM2Aqa2.js';
|
|
5
|
+
import { U as UncheckedContentReason } from './request-body-slots-BMShK1YO.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* PII detection patterns for CloakAPI SDK — Level 1 (Regex only)
|
package/dist/index.js
CHANGED
|
@@ -4086,7 +4086,7 @@ var MODE_COPY = Object.freeze({
|
|
|
4086
4086
|
var MODE_SHARED_NOTE = "Either way, the same detail always maps to the same replacement for the whole conversation, and the real values are restored in the reply on your device.";
|
|
4087
4087
|
|
|
4088
4088
|
// src/version.ts
|
|
4089
|
-
var SDK_VERSION = "1.
|
|
4089
|
+
var SDK_VERSION = "1.6.1";
|
|
4090
4090
|
var RULESET_VERSION = "1.6.1";
|
|
4091
4091
|
var RULESET_HASH = "8660b7abe553154802c9d27888a144863bcceaa3703517b8401cc56c590df2f9";
|
|
4092
4092
|
|
package/dist/index.mjs
CHANGED
|
@@ -2,27 +2,17 @@ import {
|
|
|
2
2
|
EgressGateError,
|
|
3
3
|
assertClientTokenisationProof,
|
|
4
4
|
assertExactReview,
|
|
5
|
-
assertRequestBodyReviewable,
|
|
6
|
-
assertRequestBodySlotReviewable,
|
|
7
5
|
builtinRuleSources,
|
|
8
|
-
collectRequestBodyTextSlots,
|
|
9
|
-
collectValuePlacementWarnings,
|
|
10
|
-
deepClone,
|
|
11
6
|
detectPiiWithCoverage,
|
|
12
7
|
engineIdentityHeaders,
|
|
13
8
|
inspectClientTokenisation,
|
|
14
9
|
inspectResidual,
|
|
15
10
|
lowerCoverage,
|
|
16
|
-
maskArgumentKeysForResidualCheck,
|
|
17
|
-
metadataKeyOutcomeWarnings,
|
|
18
11
|
refuseIfResidual,
|
|
19
|
-
replaceObjectKeys,
|
|
20
|
-
slotIsLeftAsWritten,
|
|
21
12
|
tokenizedHeaderValue,
|
|
22
|
-
transformJsonArgumentText,
|
|
23
13
|
validateGatewayBaseUrl,
|
|
24
14
|
warningsForResidual
|
|
25
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6E6T2YO5.mjs";
|
|
26
16
|
import {
|
|
27
17
|
CLK_DISCLOSURE_TEXT,
|
|
28
18
|
CLK_DISCLOSURE_TEXT_MESSAGE_SCOPED,
|
|
@@ -46,7 +36,19 @@ import {
|
|
|
46
36
|
isSurrogateMode,
|
|
47
37
|
resolveSurrogateMode,
|
|
48
38
|
withDisclosure
|
|
49
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-TRWGRB2P.mjs";
|
|
40
|
+
import {
|
|
41
|
+
assertRequestBodyReviewable,
|
|
42
|
+
assertRequestBodySlotReviewable,
|
|
43
|
+
collectRequestBodyTextSlots,
|
|
44
|
+
collectValuePlacementWarnings,
|
|
45
|
+
deepClone,
|
|
46
|
+
maskArgumentKeysForResidualCheck,
|
|
47
|
+
metadataKeyOutcomeWarnings,
|
|
48
|
+
replaceObjectKeys,
|
|
49
|
+
slotIsLeftAsWritten,
|
|
50
|
+
transformJsonArgumentText
|
|
51
|
+
} from "./chunk-L7RLVZMD.mjs";
|
|
50
52
|
import "./chunk-44DSUIC2.mjs";
|
|
51
53
|
import {
|
|
52
54
|
__privateAdd,
|
|
@@ -53,7 +53,10 @@ import {
|
|
|
53
53
|
titleCaseAllCapsRuns,
|
|
54
54
|
titleCaseLowercaseRuns,
|
|
55
55
|
trimToProperNounEdges
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-66SEKCCN.mjs";
|
|
57
|
+
import {
|
|
58
|
+
makePlaceSurrogate
|
|
59
|
+
} from "./chunk-KBDFJIEW.mjs";
|
|
57
60
|
import "./chunk-44DSUIC2.mjs";
|
|
58
61
|
import {
|
|
59
62
|
nonLatinSentenceRanges,
|
|
@@ -61,9 +64,6 @@ import {
|
|
|
61
64
|
splitSentenceRanges
|
|
62
65
|
} from "./chunk-SUUFGE34.mjs";
|
|
63
66
|
import "./chunk-MOHR4UIG.mjs";
|
|
64
|
-
import {
|
|
65
|
-
makePlaceSurrogate
|
|
66
|
-
} from "./chunk-KBDFJIEW.mjs";
|
|
67
67
|
import "./chunk-I6KKUHEY.mjs";
|
|
68
68
|
export {
|
|
69
69
|
CARD_SECRETS_MESSAGE,
|
package/dist/node.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CloakConversation, BrowserTokeniseResult } from './browser/index.mjs';
|
|
2
|
-
import { S as SurrogateMode } from './disclosure-
|
|
2
|
+
import { S as SurrogateMode } from './disclosure-BhM2Aqa2.mjs';
|
|
3
3
|
export { C as CARD_SECRETS_MESSAGE, S as SURROGATE_SALT, a as applySupplement, e as enhancedNerModelActive, i as isAllowlistedOrg, m as makeNameSurrogate, b as makeOrgSurrogate, n as nonLatinNerModelActive, s as scanCardSecrets, c as scanCuedHandles, d as setEnhancedGazetteer, f as setEnhancedLocModel, g as setEnhancedNerModel, h as setEnhancedNerTokenCoverage, j as setEnhancedOrgModel, k as setNonLatinNerModel, l as spanIsAllCommonWords, t as titleCaseAllCapsRuns, o as titleCaseLowercaseRuns } from './local-pii-supplement-BsWNf5uP.mjs';
|
|
4
4
|
import './coverage-OYGXtboB.mjs';
|
|
5
|
+
import './request-body-slots-BMShK1YO.mjs';
|
|
5
6
|
|
|
6
7
|
declare function verifyNodeNerModelPins(base: string, id?: string): void;
|
|
7
8
|
|
package/dist/node.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CloakConversation, BrowserTokeniseResult } from './browser/index.js';
|
|
2
|
-
import { S as SurrogateMode } from './disclosure-
|
|
2
|
+
import { S as SurrogateMode } from './disclosure-BhM2Aqa2.js';
|
|
3
3
|
export { C as CARD_SECRETS_MESSAGE, S as SURROGATE_SALT, a as applySupplement, e as enhancedNerModelActive, i as isAllowlistedOrg, m as makeNameSurrogate, b as makeOrgSurrogate, n as nonLatinNerModelActive, s as scanCardSecrets, c as scanCuedHandles, d as setEnhancedGazetteer, f as setEnhancedLocModel, g as setEnhancedNerModel, h as setEnhancedNerTokenCoverage, j as setEnhancedOrgModel, k as setNonLatinNerModel, l as spanIsAllCommonWords, t as titleCaseAllCapsRuns, o as titleCaseLowercaseRuns } from './local-pii-supplement-Db8n7ZuO.js';
|
|
4
4
|
import './coverage-OYGXtboB.js';
|
|
5
|
+
import './request-body-slots-BMShK1YO.js';
|
|
5
6
|
|
|
6
7
|
declare function verifyNodeNerModelPins(base: string, id?: string): void;
|
|
7
8
|
|