@cloakapi/sdk 1.6.1 → 1.6.2

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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # TypeScript SDK release notes
2
2
 
3
+ ## 1.6.2
4
+
5
+ - In Node.js, when the native engine was loaded through `CLOAKAPI_ENGINE_LIB` without its name model, the SDK reported `rules_only` even though built-in name detection ran. It now reports `rules_and_names` and includes a `reduced_coverage` warning with reason `model_missing` in the review and reply.
6
+
3
7
  ## 1.6.1
4
8
 
5
9
  - `tokenise` and `tokeniseWithReview` take `mode?: "balanced" | "max"`. The default is `"balanced"`, so a caller that omits it gets the same review as before when every detected value already has a safe stand-in.
package/README.md CHANGED
@@ -10,7 +10,7 @@ Detection is best effort. Values the local detectors miss are sent as written, a
10
10
  npm install @cloakapi/sdk
11
11
  ```
12
12
 
13
- `@cloakapi/sdk` 1.6.0 is the `latest` dist-tag on npm. Version 1.5.0 is also published. An npm version named `0.0.0-stage` is a registry placeholder, not a release. Node 20 or newer. The package is not a file on the downloads page.
13
+ `@cloakapi/sdk` 1.6.2 is the `latest` dist-tag on npm. Versions 1.5.0, 1.6.0, and 1.6.1 are also published. An npm version named `0.0.0-stage` is a registry placeholder, not a release. Node 20 or newer. The package is not a file on the downloads page.
14
14
 
15
15
  ## Hello world (Node)
16
16
 
@@ -65,9 +65,9 @@ The provider's reply, plus:
65
65
 
66
66
  | Field | Meaning |
67
67
  |---|---|
68
- | `coverage` | Which local layers ran: `rules_only` (structured patterns), `rules_and_names`, or `full` (the engine with its name model). |
68
+ | `coverage` | Which local layers ran. `rules_only` means structured patterns. `rules_and_names` also includes built-in name detection. `full` includes the engine's name model. |
69
69
  | `degraded` | `true` when coverage was reduced or some content could not be checked. |
70
- | `warnings` | Present when this send carried content the device could not check or replace (`unchecked_content`, for example text in Thai or Khmer when only the rules ran), or when only the rules ran (`reduced_coverage`). With no engine loaded the reason is `engine_missing`. A configured engine that was not used uses `pin_missing`, `pin_mismatch`, `ruleset_mismatch` or `engine_unloadable`. Each entry has `code`, `reason` and a plain `message`. |
70
+ | `warnings` | `unchecked_content` flags content the device could not check or replace, such as text in Thai or Khmer when only the rules ran. `reduced_coverage` uses `model_missing` when the native engine ran without its name model and `engine_missing` when no engine was loaded. A configuration or load problem uses `pin_missing`, `pin_mismatch`, `ruleset_mismatch` or `engine_unloadable`. Each entry has `code`, `reason` and a plain `message`. |
71
71
 
72
72
  ## What can stop a call
73
73
 
@@ -1,8 +1,8 @@
1
1
  import { C as CoverageStatus } from '../coverage-OYGXtboB.mjs';
2
2
  import { N as NerCoverage, T as SupplementProcessingStatus, u as NerOrgSpan, U as UserCoverageAcceptance, x as NerUnavailableErrorShape } from '../local-pii-supplement-BsWNf5uP.mjs';
3
3
  export { D as DEFAULT_NER_REQUIREMENT, E as EnhancedNerRunner, p as EnhancedOrgRunner, q as NerLayerName, r as NerLayerOutcome, v as NerPersonSpan, w as NerRequirement, P as PersonModelTier, y as PersonNonLatinOutcome, z as ScriptRange, A as acceptReducedCoverage, V as activePersonModelTier, B as assertNerCoverage, F as buildNerCoverage, G as coverageStatusForNer, H as enhancedGazetteerActive, e as enhancedNerModelActive, I as enhancedNerRequirement, J as enhancedOrgModelActive, i as isAllowlistedOrg, K as isCoverageAcceptance, b as makeOrgSurrogate, n as nonLatinNerModelActive, L as nonLatinSentenceRanges, M as normaliseOrg, O as sentenceIsNonLatin, d as setEnhancedGazetteer, Q as setEnhancedNerRequirement, j as setEnhancedOrgModel, k as setNonLatinNerModel, R as splitSentenceRanges } from '../local-pii-supplement-BsWNf5uP.mjs';
4
- import { a as SurrogateModeReport, S as SurrogateMode, p as SurrogateContinuity, E as ExactReviewHandler, R as ReviewProcessingStatus, l as MarkerFormat } from '../disclosure-BhM2Aqa2.mjs';
5
- 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, n as SDK_VERSION, o as SURROGATE_MODES, 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';
4
+ import { a as SurrogateModeReport, S as SurrogateMode, p as SurrogateContinuity, E as ExactReviewHandler, R as ReviewProcessingStatus, l as MarkerFormat } from '../disclosure-DnB-xYCb.mjs';
5
+ 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, n as SDK_VERSION, o as SURROGATE_MODES, 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-DnB-xYCb.mjs';
6
6
  import { V as ValuePlacementWarning } from '../request-body-slots-BMShK1YO.mjs';
7
7
 
8
8
  /**
@@ -1,8 +1,8 @@
1
1
  import { C as CoverageStatus } from '../coverage-OYGXtboB.js';
2
2
  import { N as NerCoverage, T as SupplementProcessingStatus, u as NerOrgSpan, U as UserCoverageAcceptance, x as NerUnavailableErrorShape } from '../local-pii-supplement-Db8n7ZuO.js';
3
3
  export { D as DEFAULT_NER_REQUIREMENT, E as EnhancedNerRunner, p as EnhancedOrgRunner, q as NerLayerName, r as NerLayerOutcome, v as NerPersonSpan, w as NerRequirement, P as PersonModelTier, y as PersonNonLatinOutcome, z as ScriptRange, A as acceptReducedCoverage, V as activePersonModelTier, B as assertNerCoverage, F as buildNerCoverage, G as coverageStatusForNer, H as enhancedGazetteerActive, e as enhancedNerModelActive, I as enhancedNerRequirement, J as enhancedOrgModelActive, i as isAllowlistedOrg, K as isCoverageAcceptance, b as makeOrgSurrogate, n as nonLatinNerModelActive, L as nonLatinSentenceRanges, M as normaliseOrg, O as sentenceIsNonLatin, d as setEnhancedGazetteer, Q as setEnhancedNerRequirement, j as setEnhancedOrgModel, k as setNonLatinNerModel, R as splitSentenceRanges } from '../local-pii-supplement-Db8n7ZuO.js';
4
- import { a as SurrogateModeReport, S as SurrogateMode, p as SurrogateContinuity, E as ExactReviewHandler, R as ReviewProcessingStatus, l as MarkerFormat } from '../disclosure-BhM2Aqa2.js';
5
- 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, n as SDK_VERSION, o as SURROGATE_MODES, 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';
4
+ import { a as SurrogateModeReport, S as SurrogateMode, p as SurrogateContinuity, E as ExactReviewHandler, R as ReviewProcessingStatus, l as MarkerFormat } from '../disclosure-DnB-xYCb.js';
5
+ 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, n as SDK_VERSION, o as SURROGATE_MODES, 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-DnB-xYCb.js';
6
6
  import { V as ValuePlacementWarning } from '../request-body-slots-BMShK1YO.js';
7
7
 
8
8
  /**
@@ -25919,7 +25919,7 @@ var SDK_VERSION, RULESET_VERSION, RULESET_HASH;
25919
25919
  var init_version = __esm({
25920
25920
  "src/version.ts"() {
25921
25921
  "use strict";
25922
- SDK_VERSION = "1.6.1";
25922
+ SDK_VERSION = "1.6.2";
25923
25923
  RULESET_VERSION = "1.6.1";
25924
25924
  RULESET_HASH = "8660b7abe553154802c9d27888a144863bcceaa3703517b8401cc56c590df2f9";
25925
25925
  }
@@ -99,7 +99,7 @@ import {
99
99
  typeFromSurrogateMarker,
100
100
  unloadEnhancedGazetteer,
101
101
  wheelUrl
102
- } from "../chunk-VYGV643D.mjs";
102
+ } from "../chunk-DDXSTIZ5.mjs";
103
103
  import "../chunk-DLKR3ZVZ.mjs";
104
104
  import "../chunk-DMJIRWAT.mjs";
105
105
  import "../chunk-6E6T2YO5.mjs";
@@ -146,7 +146,7 @@ import {
146
146
  isSurrogateMode,
147
147
  resolveSurrogateMode,
148
148
  withDisclosure
149
- } from "../chunk-TRWGRB2P.mjs";
149
+ } from "../chunk-ZAO5PEAG.mjs";
150
150
  import {
151
151
  DEFAULT_ENHANCED_NER_MODEL_ID,
152
152
  DETECTION_LAYER_ORDER,
@@ -1,7 +1,7 @@
1
1
  import { CreateBrowserEngineOptions, BrowserEngine } from './index.mjs';
2
2
  export { ASR_WORKER_SOURCE, ApplyReviewOptions, ApplyReviewResult, AsrError, AsrProgress, AsrTask, AudioLike, BrowserEngineError, BrowserTokenMap, BrowserTokeniseResult, CATEGORICAL_DARK, CATEGORICAL_LIGHT, CODE_INTERPRETER_CAPABILITY_LABEL, CODE_INTERPRETER_SYSTEM_PROMPT, CODE_INTERPRETER_TOOLS, ChartSeries, ChartSpec, ChartTheme, ChartType, CloakConversation, CodeInterpreterCall, CodeInterpreterCapability, CodeInterpreterConfig, CodeInterpreterKind, CodeInterpreterManifest, CodeInterpreterResult, CodeInterpreterToolDescriptor, CountersignedResult, DEFAULT_ASR_MIRROR_BASE, DEFAULT_ASR_MODEL, DEFAULT_ASR_RUNTIME_BASE, DEFAULT_ENHANCED_NER_MODEL_ID, DEFAULT_MIRROR_BASE, DEFAULT_WHEELS, DETECTION_LAYER_ORDER, DetectedEntity, DetectionLayerId, DetectionLayerLoadHandle, DetectionLayerPhase, DetectionLayerProgress, DetectionLayerReport, DetectionLayerSnapshot, DetectionLayerState, DeviceKeyPair, DeviceReceipt, DeviceReceiptError, DeviceReceiptInput, DocBlock, EngineThreadInfo, EngineThreadReason, EnhancedGazetteerAsset, EnhancedNerLoadResult, EnhancedNerModelInfo, EnhancedNerModelProgress, EnhancedNerProgress, ExtractFileForReviewResult, ExtractOptions, FailClosedRelay, FailClosedRelayConfig, FailClosedRelayResponse, FileBuildClaim, FileBuildFile, FileBuildReceiptInput, FileEgressClaim, FileEgressFile, FileEgressReceiptInput, FileExtractFailure, FileExtractKind, FileExtractResult, FileExtractSuccess, FileFormat, FileLike, FileSpec, GeneratedFile, HEADLINE_LANGUAGES, InputBindings, InputHandle, InterpreterError, InterpreterRow, InterpreterTokenMap, LAYER_ACCURACY, LAYER_ACCURACY_PENDING_NOTE, LAYER_ACCURACY_PLACEHOLDER, LayerAccuracyCopy, LayerWaitOutcome, LayerWaitResult, LoadEnhancedNerModelOptions, LoadEnhancedNerOptions, MICROPIP_WHEELS, MakeFilePayload, MakeFilesOptions, ManualRedaction, ModeLedger, ModeReviewLike, ModeSpanLike, NETWORK_GUARD_SOURCE, NerTokenizerStyle, NerUnavailableError, NetworkGuardOptions, PORTAL_ENHANCED_NER_MODEL_ID, PRIVACY_TIERS, PYODIDE_PACKAGES, PYODIDE_VERSION, PYODIDE_WORKER_SOURCE, PostureMarkerFormat, PreparedRequestBodyResult, PrivacyMode, PrivacyPosture, PrivacyPostureOptions, RECEIPT_ATTESTATION_VERSION, RebuildableFormat, RebuiltFile, RelayError, RelayTier, RelayTierInput, ResidualScanSpan, ReviewDecision, ReviewSpan, ReviewSpanType, ReviewTokenMap, RowsOrHandle, RunCallOptions, RunProgress, RunPythonOptions, RunPythonPayload, SelectionPart, SelectionSplit, SheetSpec, SignDeviceReceiptOptions, SpliceReviewedBodyOptions, TRANSCRIPTION_CAPABILITY_LABEL, TRANSCRIPTION_TOOLS, TokeniseOptions, TokeniseRequestBodyResult, TokeniseReviewOptions, TokeniseReviewResult, TokenisedRequestBodyResult, TranscribeOptions, TranscriptSegment, TranscriptionCapability, TranscriptionConfig, TranscriptionManifest, TranscriptionResult, TranscriptionToolDescriptor, UnmeasurableReason, VALUE_CONSISTENCY_MAX_PER_VALUE, VALUE_CONSISTENCY_MAX_TOTAL, VALUE_CONSISTENCY_MIN_LENGTH, Verdict, VerdictCheck, WHISPER_LANGUAGES, WHISPER_MODELS, WHISPER_SAMPLE_RATE, WaitForDetectionLayerOptions, WhisperDtype, WhisperModel, accuracyStillPlaceholder, applyPrivacyMode, applyPrivacyModeToReview, applyReviewDecisions, asrModelRoot, asrRequiredMirrorFiles, asrRuntimeUrl, asrRuntimeWasmBase, beginDetectionLayerLoad, bindConversationSurrogates, bindRows, bindValue, bridgeOrgConnectorSpans, buildAsrWorkerSource, buildFile, buildPyodideWorkerSource, buildReviewSpans, bundleZip, cancelDetectionLayer, canonicaliseReceipt, categorical, chartToSvg, classifyEntityType, classifyFileForExtraction, cloneConversation, codeInterpreter, copyPrivacyLedger, createFailClosedRelay, createModeLedger, declareDetectionLayerUnsupported, decodeToPcm16k, defaultLanguageFromLocale, describeCodeInterpreter, describeTranscription, detectTokenizerStyle, detectionLayerProgressSink, detectionLayerReport, detectionLayerSnapshot, detectionLayerState, detokeniseString, detokeniseValue, engineThreadInfo, enhancedNerModelInfo, expandValueOccurrences, extractFileForReview, extractTextFromFile, fetchJwks, fetchReceiptByJti, fileBuildOf, fileEgressOf, generateDeviceKeyPair, hasWholeTokenOccurrence, indexOfWholeToken, installNoNetworkGuard, isCountersignedResult, isEnhancedNerModelActive, isNerLoadAbortError, isNonLatinNerModelActive, isPlaceIndexReady, isRebuildableFormat, isSealedSecretMarker, isSupportedLanguage, isWholeTokenOccurrence, loadEnhancedGazetteer, loadEnhancedNerModel, loadNonLatinNerModel, makeFiles, makeFilesWithBundle, newConversation, nonLatinNerModelInfo, offerWasmNameGazetteerIfEmpty, onDetectionLayerChange, onEngineThreadChange, parseFileSpec, parseRunPython, prewarmPlaceIndex, privacyLedgerFor, privacyPosture, pyodideIndexUrl, rebuildTextFile, receiptHashAsync, recommendedNerThreads, reconstructOrgSpans, renderSelectionSplit, replaceWholeTokenOccurrences, resampleLinear, resetDefaultModeLedger, residualRawPII, resolveAsrModel, resolveConversation, resolveWhisperLanguage, reviewWithGracefulCards, runPython, runPythonWithBundle, signDeviceReceipt, signFileBuildReceipt, signFileEgressReceipt, specsOf, splitSelectionIntoEntities, textLikelyContainsNames, transcribe, transcription, typeFromSurrogateMarker, unloadEnhancedGazetteer, unloadEnhancedNerModel, unloadNonLatinNerModel, vacateDetectionLayer, verifyCountersigned, verifyCountersignedJson, verifyDeviceReceipt, verifyReceipt, verifyReceiptChain, verifyReceiptJson, waitForDetectionLayer, wheelUrl } from './index.mjs';
3
3
  export { D as DEFAULT_NER_REQUIREMENT, E as EnhancedNerRunner, p as EnhancedOrgRunner, N as NerCoverage, q as NerLayerName, r as NerLayerOutcome, u as NerOrgSpan, v as NerPersonSpan, w as NerRequirement, x as NerUnavailableErrorShape, P as PersonModelTier, y as PersonNonLatinOutcome, z as ScriptRange, U as UserCoverageAcceptance, A as acceptReducedCoverage, B as assertNerCoverage, F as buildNerCoverage, G as coverageStatusForNer, H as enhancedGazetteerActive, e as enhancedNerModelActive, I as enhancedNerRequirement, J as enhancedOrgModelActive, i as isAllowlistedOrg, K as isCoverageAcceptance, b as makeOrgSurrogate, n as nonLatinNerModelActive, L as nonLatinSentenceRanges, M as normaliseOrg, O as sentenceIsNonLatin, d as setEnhancedGazetteer, Q as setEnhancedNerRequirement, j as setEnhancedOrgModel, k as setNonLatinNerModel, R as splitSentenceRanges } from '../local-pii-supplement-BsWNf5uP.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, n as SDK_VERSION, o as SURROGATE_MODES, p as SurrogateContinuity, S as SurrogateMode, q as SurrogateModeCopy, r as SurrogateModeError, a as SurrogateModeReport, 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';
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, n as SDK_VERSION, o as SURROGATE_MODES, p as SurrogateContinuity, S as SurrogateMode, q as SurrogateModeCopy, r as SurrogateModeError, a as SurrogateModeReport, W as WithDisclosureOptions, s as coerceSurrogateMode, t as detectMarkerFormat, u as disclosureText, v as isSurrogateMode, w as resolveSurrogateMode, x as withDisclosure } from '../disclosure-DnB-xYCb.mjs';
5
5
  export { C as CoverageStatus } from '../coverage-OYGXtboB.mjs';
6
6
  import '../request-body-slots-BMShK1YO.mjs';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { CreateBrowserEngineOptions, BrowserEngine } from './index.js';
2
2
  export { ASR_WORKER_SOURCE, ApplyReviewOptions, ApplyReviewResult, AsrError, AsrProgress, AsrTask, AudioLike, BrowserEngineError, BrowserTokenMap, BrowserTokeniseResult, CATEGORICAL_DARK, CATEGORICAL_LIGHT, CODE_INTERPRETER_CAPABILITY_LABEL, CODE_INTERPRETER_SYSTEM_PROMPT, CODE_INTERPRETER_TOOLS, ChartSeries, ChartSpec, ChartTheme, ChartType, CloakConversation, CodeInterpreterCall, CodeInterpreterCapability, CodeInterpreterConfig, CodeInterpreterKind, CodeInterpreterManifest, CodeInterpreterResult, CodeInterpreterToolDescriptor, CountersignedResult, DEFAULT_ASR_MIRROR_BASE, DEFAULT_ASR_MODEL, DEFAULT_ASR_RUNTIME_BASE, DEFAULT_ENHANCED_NER_MODEL_ID, DEFAULT_MIRROR_BASE, DEFAULT_WHEELS, DETECTION_LAYER_ORDER, DetectedEntity, DetectionLayerId, DetectionLayerLoadHandle, DetectionLayerPhase, DetectionLayerProgress, DetectionLayerReport, DetectionLayerSnapshot, DetectionLayerState, DeviceKeyPair, DeviceReceipt, DeviceReceiptError, DeviceReceiptInput, DocBlock, EngineThreadInfo, EngineThreadReason, EnhancedGazetteerAsset, EnhancedNerLoadResult, EnhancedNerModelInfo, EnhancedNerModelProgress, EnhancedNerProgress, ExtractFileForReviewResult, ExtractOptions, FailClosedRelay, FailClosedRelayConfig, FailClosedRelayResponse, FileBuildClaim, FileBuildFile, FileBuildReceiptInput, FileEgressClaim, FileEgressFile, FileEgressReceiptInput, FileExtractFailure, FileExtractKind, FileExtractResult, FileExtractSuccess, FileFormat, FileLike, FileSpec, GeneratedFile, HEADLINE_LANGUAGES, InputBindings, InputHandle, InterpreterError, InterpreterRow, InterpreterTokenMap, LAYER_ACCURACY, LAYER_ACCURACY_PENDING_NOTE, LAYER_ACCURACY_PLACEHOLDER, LayerAccuracyCopy, LayerWaitOutcome, LayerWaitResult, LoadEnhancedNerModelOptions, LoadEnhancedNerOptions, MICROPIP_WHEELS, MakeFilePayload, MakeFilesOptions, ManualRedaction, ModeLedger, ModeReviewLike, ModeSpanLike, NETWORK_GUARD_SOURCE, NerTokenizerStyle, NerUnavailableError, NetworkGuardOptions, PORTAL_ENHANCED_NER_MODEL_ID, PRIVACY_TIERS, PYODIDE_PACKAGES, PYODIDE_VERSION, PYODIDE_WORKER_SOURCE, PostureMarkerFormat, PreparedRequestBodyResult, PrivacyMode, PrivacyPosture, PrivacyPostureOptions, RECEIPT_ATTESTATION_VERSION, RebuildableFormat, RebuiltFile, RelayError, RelayTier, RelayTierInput, ResidualScanSpan, ReviewDecision, ReviewSpan, ReviewSpanType, ReviewTokenMap, RowsOrHandle, RunCallOptions, RunProgress, RunPythonOptions, RunPythonPayload, SelectionPart, SelectionSplit, SheetSpec, SignDeviceReceiptOptions, SpliceReviewedBodyOptions, TRANSCRIPTION_CAPABILITY_LABEL, TRANSCRIPTION_TOOLS, TokeniseOptions, TokeniseRequestBodyResult, TokeniseReviewOptions, TokeniseReviewResult, TokenisedRequestBodyResult, TranscribeOptions, TranscriptSegment, TranscriptionCapability, TranscriptionConfig, TranscriptionManifest, TranscriptionResult, TranscriptionToolDescriptor, UnmeasurableReason, VALUE_CONSISTENCY_MAX_PER_VALUE, VALUE_CONSISTENCY_MAX_TOTAL, VALUE_CONSISTENCY_MIN_LENGTH, Verdict, VerdictCheck, WHISPER_LANGUAGES, WHISPER_MODELS, WHISPER_SAMPLE_RATE, WaitForDetectionLayerOptions, WhisperDtype, WhisperModel, accuracyStillPlaceholder, applyPrivacyMode, applyPrivacyModeToReview, applyReviewDecisions, asrModelRoot, asrRequiredMirrorFiles, asrRuntimeUrl, asrRuntimeWasmBase, beginDetectionLayerLoad, bindConversationSurrogates, bindRows, bindValue, bridgeOrgConnectorSpans, buildAsrWorkerSource, buildFile, buildPyodideWorkerSource, buildReviewSpans, bundleZip, cancelDetectionLayer, canonicaliseReceipt, categorical, chartToSvg, classifyEntityType, classifyFileForExtraction, cloneConversation, codeInterpreter, copyPrivacyLedger, createFailClosedRelay, createModeLedger, declareDetectionLayerUnsupported, decodeToPcm16k, defaultLanguageFromLocale, describeCodeInterpreter, describeTranscription, detectTokenizerStyle, detectionLayerProgressSink, detectionLayerReport, detectionLayerSnapshot, detectionLayerState, detokeniseString, detokeniseValue, engineThreadInfo, enhancedNerModelInfo, expandValueOccurrences, extractFileForReview, extractTextFromFile, fetchJwks, fetchReceiptByJti, fileBuildOf, fileEgressOf, generateDeviceKeyPair, hasWholeTokenOccurrence, indexOfWholeToken, installNoNetworkGuard, isCountersignedResult, isEnhancedNerModelActive, isNerLoadAbortError, isNonLatinNerModelActive, isPlaceIndexReady, isRebuildableFormat, isSealedSecretMarker, isSupportedLanguage, isWholeTokenOccurrence, loadEnhancedGazetteer, loadEnhancedNerModel, loadNonLatinNerModel, makeFiles, makeFilesWithBundle, newConversation, nonLatinNerModelInfo, offerWasmNameGazetteerIfEmpty, onDetectionLayerChange, onEngineThreadChange, parseFileSpec, parseRunPython, prewarmPlaceIndex, privacyLedgerFor, privacyPosture, pyodideIndexUrl, rebuildTextFile, receiptHashAsync, recommendedNerThreads, reconstructOrgSpans, renderSelectionSplit, replaceWholeTokenOccurrences, resampleLinear, resetDefaultModeLedger, residualRawPII, resolveAsrModel, resolveConversation, resolveWhisperLanguage, reviewWithGracefulCards, runPython, runPythonWithBundle, signDeviceReceipt, signFileBuildReceipt, signFileEgressReceipt, specsOf, splitSelectionIntoEntities, textLikelyContainsNames, transcribe, transcription, typeFromSurrogateMarker, unloadEnhancedGazetteer, unloadEnhancedNerModel, unloadNonLatinNerModel, vacateDetectionLayer, verifyCountersigned, verifyCountersignedJson, verifyDeviceReceipt, verifyReceipt, verifyReceiptChain, verifyReceiptJson, waitForDetectionLayer, wheelUrl } from './index.js';
3
3
  export { D as DEFAULT_NER_REQUIREMENT, E as EnhancedNerRunner, p as EnhancedOrgRunner, N as NerCoverage, q as NerLayerName, r as NerLayerOutcome, u as NerOrgSpan, v as NerPersonSpan, w as NerRequirement, x as NerUnavailableErrorShape, P as PersonModelTier, y as PersonNonLatinOutcome, z as ScriptRange, U as UserCoverageAcceptance, A as acceptReducedCoverage, B as assertNerCoverage, F as buildNerCoverage, G as coverageStatusForNer, H as enhancedGazetteerActive, e as enhancedNerModelActive, I as enhancedNerRequirement, J as enhancedOrgModelActive, i as isAllowlistedOrg, K as isCoverageAcceptance, b as makeOrgSurrogate, n as nonLatinNerModelActive, L as nonLatinSentenceRanges, M as normaliseOrg, O as sentenceIsNonLatin, d as setEnhancedGazetteer, Q as setEnhancedNerRequirement, j as setEnhancedOrgModel, k as setNonLatinNerModel, R as splitSentenceRanges } from '../local-pii-supplement-Db8n7ZuO.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, n as SDK_VERSION, o as SURROGATE_MODES, p as SurrogateContinuity, S as SurrogateMode, q as SurrogateModeCopy, r as SurrogateModeError, a as SurrogateModeReport, 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';
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, n as SDK_VERSION, o as SURROGATE_MODES, p as SurrogateContinuity, S as SurrogateMode, q as SurrogateModeCopy, r as SurrogateModeError, a as SurrogateModeReport, W as WithDisclosureOptions, s as coerceSurrogateMode, t as detectMarkerFormat, u as disclosureText, v as isSurrogateMode, w as resolveSurrogateMode, x as withDisclosure } from '../disclosure-DnB-xYCb.js';
5
5
  export { C as CoverageStatus } from '../coverage-OYGXtboB.js';
6
6
  import '../request-body-slots-BMShK1YO.js';
7
7
 
@@ -43,7 +43,7 @@ import {
43
43
  isSurrogateMode,
44
44
  resolveSurrogateMode,
45
45
  withDisclosure
46
- } from "../chunk-TRWGRB2P.mjs";
46
+ } from "../chunk-ZAO5PEAG.mjs";
47
47
  import {
48
48
  hasWholeTokenOccurrence,
49
49
  indexOfWholeToken,
@@ -43,7 +43,7 @@ import {
43
43
  disclosureText,
44
44
  resolveSurrogateMode,
45
45
  withDisclosure
46
- } from "./chunk-TRWGRB2P.mjs";
46
+ } from "./chunk-ZAO5PEAG.mjs";
47
47
  import {
48
48
  abortEnhancedNerLoad,
49
49
  detectionLayerReport,
@@ -53,7 +53,7 @@ var MODE_COPY = Object.freeze({
53
53
  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.";
54
54
 
55
55
  // src/version.ts
56
- var SDK_VERSION = "1.6.1";
56
+ var SDK_VERSION = "1.6.2";
57
57
  var RULESET_VERSION = "1.6.1";
58
58
  var RULESET_HASH = "8660b7abe553154802c9d27888a144863bcceaa3703517b8401cc56c590df2f9";
59
59
 
@@ -147,7 +147,7 @@ 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.6.1";
150
+ declare const SDK_VERSION = "1.6.2";
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
 
@@ -147,7 +147,7 @@ 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.6.1";
150
+ declare const SDK_VERSION = "1.6.2";
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
 
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
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, 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';
3
+ import { S as SurrogateMode, a as SurrogateModeReport, E as ExactReviewHandler, R as ReviewProcessingStatus, b as ExactReviewDecision } from './disclosure-DnB-xYCb.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-DnB-xYCb.mjs';
5
5
  import { U as UncheckedContentReason } from './request-body-slots-BMShK1YO.mjs';
6
6
 
7
7
  /**
@@ -653,11 +653,11 @@ type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'
653
653
  interface SendWarning {
654
654
  /**
655
655
  * `unchecked_content`: some content could not be checked or replaced on this device and was sent as written.
656
- * `reduced_coverage`: only the structured rules ran (no engine, or a configured engine was not used).
656
+ * `reduced_coverage`: the local engine or its optional name model was unavailable.
657
657
  */
658
658
  code: 'unchecked_content' | 'reduced_coverage';
659
659
  /** What the notice is about. */
660
- reason: UncheckedContentReason | 'engine_refused' | 'engine_missing' | 'engine_unloadable' | 'pin_missing' | 'pin_mismatch' | 'ruleset_mismatch';
660
+ reason: UncheckedContentReason | 'engine_refused' | 'model_missing' | 'engine_missing' | 'engine_unloadable' | 'pin_missing' | 'pin_mismatch' | 'ruleset_mismatch';
661
661
  message: string;
662
662
  }
663
663
  /** Why a local engine is not used for this client. `undefined` when one is used. */
@@ -667,7 +667,7 @@ interface CloakAPIResponse {
667
667
  [key: string]: unknown;
668
668
  coverage: CoverageStatus;
669
669
  degraded?: boolean;
670
- /** Present only when this send carried content the device could not check or replace. */
670
+ /** Notices about reduced coverage or content the device could not check or replace. */
671
671
  warnings?: SendWarning[];
672
672
  }
673
673
  /** What the `review` callback is told about the text it is asked to approve. */
@@ -976,7 +976,7 @@ declare class CloakAPI {
976
976
  _tokeniseRequestBody<T>(body: T): T;
977
977
  /** @internal — attach the local coverage label to a successful provider response. */
978
978
  _requestCoverage(body: object): CoverageStatus;
979
- /** @internal — whether a rules-only scan exhausted its per-call budget. */
979
+ /** @internal — whether text preparation marked the request degraded. */
980
980
  _requestDegraded(body: object): boolean;
981
981
  _withCoverage(response: unknown, coverage: CoverageStatus, degraded?: boolean): CloakAPIResponse;
982
982
  /**
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
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, 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';
3
+ import { S as SurrogateMode, a as SurrogateModeReport, E as ExactReviewHandler, R as ReviewProcessingStatus, b as ExactReviewDecision } from './disclosure-DnB-xYCb.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-DnB-xYCb.js';
5
5
  import { U as UncheckedContentReason } from './request-body-slots-BMShK1YO.js';
6
6
 
7
7
  /**
@@ -653,11 +653,11 @@ type ReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'
653
653
  interface SendWarning {
654
654
  /**
655
655
  * `unchecked_content`: some content could not be checked or replaced on this device and was sent as written.
656
- * `reduced_coverage`: only the structured rules ran (no engine, or a configured engine was not used).
656
+ * `reduced_coverage`: the local engine or its optional name model was unavailable.
657
657
  */
658
658
  code: 'unchecked_content' | 'reduced_coverage';
659
659
  /** What the notice is about. */
660
- reason: UncheckedContentReason | 'engine_refused' | 'engine_missing' | 'engine_unloadable' | 'pin_missing' | 'pin_mismatch' | 'ruleset_mismatch';
660
+ reason: UncheckedContentReason | 'engine_refused' | 'model_missing' | 'engine_missing' | 'engine_unloadable' | 'pin_missing' | 'pin_mismatch' | 'ruleset_mismatch';
661
661
  message: string;
662
662
  }
663
663
  /** Why a local engine is not used for this client. `undefined` when one is used. */
@@ -667,7 +667,7 @@ interface CloakAPIResponse {
667
667
  [key: string]: unknown;
668
668
  coverage: CoverageStatus;
669
669
  degraded?: boolean;
670
- /** Present only when this send carried content the device could not check or replace. */
670
+ /** Notices about reduced coverage or content the device could not check or replace. */
671
671
  warnings?: SendWarning[];
672
672
  }
673
673
  /** What the `review` callback is told about the text it is asked to approve. */
@@ -976,7 +976,7 @@ declare class CloakAPI {
976
976
  _tokeniseRequestBody<T>(body: T): T;
977
977
  /** @internal — attach the local coverage label to a successful provider response. */
978
978
  _requestCoverage(body: object): CoverageStatus;
979
- /** @internal — whether a rules-only scan exhausted its per-call budget. */
979
+ /** @internal — whether text preparation marked the request degraded. */
980
980
  _requestDegraded(body: object): boolean;
981
981
  _withCoverage(response: unknown, coverage: CoverageStatus, degraded?: boolean): CloakAPIResponse;
982
982
  /**
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.6.1";
4089
+ var SDK_VERSION = "1.6.2";
4090
4090
  var RULESET_VERSION = "1.6.1";
4091
4091
  var RULESET_HASH = "8660b7abe553154802c9d27888a144863bcceaa3703517b8401cc56c590df2f9";
4092
4092
 
@@ -7066,7 +7066,7 @@ var CloakAPI = class {
7066
7066
  return {
7067
7067
  text: result2.text,
7068
7068
  tokenMap: __privateGet(this, _tokenMap),
7069
- coverage: reduced ? "rules_only" : "full",
7069
+ coverage: reduced ? "rules_and_names" : "full",
7070
7070
  degraded: reduced
7071
7071
  };
7072
7072
  }
@@ -7124,7 +7124,7 @@ var CloakAPI = class {
7124
7124
  _requestCoverage(body) {
7125
7125
  return __privateGet(this, _requestCoverageByBody).get(body) ?? "full";
7126
7126
  }
7127
- /** @internal — whether a rules-only scan exhausted its per-call budget. */
7127
+ /** @internal — whether text preparation marked the request degraded. */
7128
7128
  _requestDegraded(body) {
7129
7129
  return __privateGet(this, _requestDegradedByBody).has(body);
7130
7130
  }
@@ -7334,12 +7334,19 @@ request_fn = async function(path, body, routeProvider, routeStrategy, endUser, t
7334
7334
  if (typeof rawBody !== "string") {
7335
7335
  throw new CloakAPIError("request body is not JSON-serializable; refusing to relay.", 0, "invalid_request_body");
7336
7336
  }
7337
- const engineIssue = this._engineUse().issue;
7337
+ const { issue: engineIssue, identity } = this._engineUse();
7338
7338
  if (engineIssue) {
7339
7339
  sendWarnings.push({
7340
7340
  code: "reduced_coverage",
7341
7341
  reason: engineIssue,
7342
- message: `${engineIssueMessage(engineIssue, this._engineUse().identity.version)} Structured rules ran instead.`
7342
+ message: `${engineIssueMessage(engineIssue, identity.version)} Structured rules ran instead.`
7343
+ });
7344
+ reviewStatus = "degraded";
7345
+ } else if (coverage === "rules_and_names") {
7346
+ sendWarnings.push({
7347
+ code: "reduced_coverage",
7348
+ reason: "model_missing",
7349
+ message: "Model-based name detection is unavailable. Structured rules and built-in name detection ran. Some names may remain unchanged."
7343
7350
  });
7344
7351
  reviewStatus = "degraded";
7345
7352
  }
package/dist/index.mjs CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  isSurrogateMode,
37
37
  resolveSurrogateMode,
38
38
  withDisclosure
39
- } from "./chunk-TRWGRB2P.mjs";
39
+ } from "./chunk-ZAO5PEAG.mjs";
40
40
  import {
41
41
  assertRequestBodyReviewable,
42
42
  assertRequestBodySlotReviewable,
@@ -4458,7 +4458,7 @@ var CloakAPI = class {
4458
4458
  return {
4459
4459
  text: result2.text,
4460
4460
  tokenMap: __privateGet(this, _tokenMap),
4461
- coverage: reduced ? "rules_only" : "full",
4461
+ coverage: reduced ? "rules_and_names" : "full",
4462
4462
  degraded: reduced
4463
4463
  };
4464
4464
  }
@@ -4516,7 +4516,7 @@ var CloakAPI = class {
4516
4516
  _requestCoverage(body) {
4517
4517
  return __privateGet(this, _requestCoverageByBody).get(body) ?? "full";
4518
4518
  }
4519
- /** @internal — whether a rules-only scan exhausted its per-call budget. */
4519
+ /** @internal — whether text preparation marked the request degraded. */
4520
4520
  _requestDegraded(body) {
4521
4521
  return __privateGet(this, _requestDegradedByBody).has(body);
4522
4522
  }
@@ -4726,12 +4726,19 @@ request_fn = async function(path, body, routeProvider, routeStrategy, endUser, t
4726
4726
  if (typeof rawBody !== "string") {
4727
4727
  throw new CloakAPIError("request body is not JSON-serializable; refusing to relay.", 0, "invalid_request_body");
4728
4728
  }
4729
- const engineIssue = this._engineUse().issue;
4729
+ const { issue: engineIssue, identity } = this._engineUse();
4730
4730
  if (engineIssue) {
4731
4731
  sendWarnings.push({
4732
4732
  code: "reduced_coverage",
4733
4733
  reason: engineIssue,
4734
- message: `${engineIssueMessage(engineIssue, this._engineUse().identity.version)} Structured rules ran instead.`
4734
+ message: `${engineIssueMessage(engineIssue, identity.version)} Structured rules ran instead.`
4735
+ });
4736
+ reviewStatus = "degraded";
4737
+ } else if (coverage === "rules_and_names") {
4738
+ sendWarnings.push({
4739
+ code: "reduced_coverage",
4740
+ reason: "model_missing",
4741
+ message: "Model-based name detection is unavailable. Structured rules and built-in name detection ran. Some names may remain unchanged."
4735
4742
  });
4736
4743
  reviewStatus = "degraded";
4737
4744
  }
package/dist/node.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CloakConversation, BrowserTokeniseResult } from './browser/index.mjs';
2
- import { S as SurrogateMode } from './disclosure-BhM2Aqa2.mjs';
2
+ import { S as SurrogateMode } from './disclosure-DnB-xYCb.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
5
  import './request-body-slots-BMShK1YO.mjs';
package/dist/node.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CloakConversation, BrowserTokeniseResult } from './browser/index.js';
2
- import { S as SurrogateMode } from './disclosure-BhM2Aqa2.js';
2
+ import { S as SurrogateMode } from './disclosure-DnB-xYCb.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
5
  import './request-body-slots-BMShK1YO.js';
package/dist/node.mjs CHANGED
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  createBrowserEngine,
3
3
  newConversation
4
- } from "./chunk-VYGV643D.mjs";
4
+ } from "./chunk-DDXSTIZ5.mjs";
5
5
  import {
6
6
  scanGazetteerPlaces
7
7
  } from "./chunk-DLKR3ZVZ.mjs";
8
8
  import "./chunk-DMJIRWAT.mjs";
9
9
  import "./chunk-6E6T2YO5.mjs";
10
10
  import "./chunk-746IWCJ4.mjs";
11
- import "./chunk-TRWGRB2P.mjs";
11
+ import "./chunk-ZAO5PEAG.mjs";
12
12
  import {
13
13
  PORTAL_ENHANCED_NER_MODEL_ID,
14
14
  loadNodePinnedEnhancedNerModel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloakapi/sdk",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "description": "CloakAPI TypeScript SDK: detects personal data with structured rules on your device, replaces it with stand-ins before the request leaves, sends it through the CloakAPI gateway and restores the reply. Without the native engine it runs its built-in rules and says so. OpenAI- and Anthropic-shaped clients for Node and the browser.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",