@anuma/sdk 10.2.1 → 10.2.3
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/dist/client/index.d.mts +1 -4
- package/dist/client/index.d.ts +1 -4
- package/dist/expo/{chunk-WRZTH4OS.mjs → chunk-ZIN4E7MR.mjs} +7 -0
- package/dist/expo/{consolidate-HKL5EGZT.mjs → consolidate-4WLZMXOS.mjs} +1 -1
- package/dist/expo/index.cjs +200 -103
- package/dist/expo/index.d.mts +3 -0
- package/dist/expo/index.d.ts +3 -0
- package/dist/expo/index.mjs +168 -79
- package/dist/index.cjs +7 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +7 -0
- package/dist/react/{chunk-RSA3S6OA.mjs → chunk-7JYVPYGQ.mjs} +7 -0
- package/dist/react/{consolidate-WFTPBHDV.mjs → consolidate-3RQL75PJ.mjs} +1 -1
- package/dist/react/index.cjs +506 -409
- package/dist/react/index.d.mts +3 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.mjs +358 -269
- package/dist/server/{chunk-QEROZ4VH.mjs → chunk-QK62YWBH.mjs} +7 -0
- package/dist/server/{consolidate-PYED62LW.mjs → consolidate-NW4UVA6T.mjs} +1 -1
- package/dist/server/index.cjs +7 -0
- package/dist/server/index.d.mts +3 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.mjs +2 -2
- package/package.json +1 -1
|
@@ -109,6 +109,7 @@ function isWordChar(ch) {
|
|
|
109
109
|
}
|
|
110
110
|
var PiiRedactor = class {
|
|
111
111
|
constructor(options = {}) {
|
|
112
|
+
this.disposed = false;
|
|
112
113
|
/** Maps original PII value → placeholder tag. */
|
|
113
114
|
this.valueToPlaceholder = /* @__PURE__ */ new Map();
|
|
114
115
|
/** Maps placeholder tag → original PII value (reverse lookup for de-anonymization). */
|
|
@@ -183,6 +184,7 @@ var PiiRedactor = class {
|
|
|
183
184
|
* The same value always gets the same placeholder within a redactor instance.
|
|
184
185
|
*/
|
|
185
186
|
getPlaceholder(category, value) {
|
|
187
|
+
if (this.disposed) throw new Error("PII redactor session ended");
|
|
186
188
|
const normalizedValue = value.trim();
|
|
187
189
|
const existing = this.valueToPlaceholder.get(normalizedValue);
|
|
188
190
|
if (existing) return existing;
|
|
@@ -558,6 +560,11 @@ var PiiRedactor = class {
|
|
|
558
560
|
this.warnedNonText = false;
|
|
559
561
|
this.warnedNerFailure = false;
|
|
560
562
|
}
|
|
563
|
+
/** Clear the mappings and prevent new reversible mappings. */
|
|
564
|
+
dispose() {
|
|
565
|
+
this.disposed = true;
|
|
566
|
+
this.clear();
|
|
567
|
+
}
|
|
561
568
|
};
|
|
562
569
|
function isPiiRedactor(value) {
|
|
563
570
|
return typeof value === "object" && value !== null && typeof value.redactMessages === "function" && typeof value.deAnonymize === "function";
|
package/dist/server/index.cjs
CHANGED
|
@@ -15036,6 +15036,7 @@ var init_redactor = __esm({
|
|
|
15036
15036
|
init_patterns();
|
|
15037
15037
|
PiiRedactor = class {
|
|
15038
15038
|
constructor(options = {}) {
|
|
15039
|
+
this.disposed = false;
|
|
15039
15040
|
/** Maps original PII value → placeholder tag. */
|
|
15040
15041
|
this.valueToPlaceholder = /* @__PURE__ */ new Map();
|
|
15041
15042
|
/** Maps placeholder tag → original PII value (reverse lookup for de-anonymization). */
|
|
@@ -15110,6 +15111,7 @@ var init_redactor = __esm({
|
|
|
15110
15111
|
* The same value always gets the same placeholder within a redactor instance.
|
|
15111
15112
|
*/
|
|
15112
15113
|
getPlaceholder(category, value) {
|
|
15114
|
+
if (this.disposed) throw new Error("PII redactor session ended");
|
|
15113
15115
|
const normalizedValue = value.trim();
|
|
15114
15116
|
const existing = this.valueToPlaceholder.get(normalizedValue);
|
|
15115
15117
|
if (existing) return existing;
|
|
@@ -15485,6 +15487,11 @@ var init_redactor = __esm({
|
|
|
15485
15487
|
this.warnedNonText = false;
|
|
15486
15488
|
this.warnedNerFailure = false;
|
|
15487
15489
|
}
|
|
15490
|
+
/** Clear the mappings and prevent new reversible mappings. */
|
|
15491
|
+
dispose() {
|
|
15492
|
+
this.disposed = true;
|
|
15493
|
+
this.clear();
|
|
15494
|
+
}
|
|
15488
15495
|
};
|
|
15489
15496
|
}
|
|
15490
15497
|
});
|
package/dist/server/index.d.mts
CHANGED
|
@@ -1476,6 +1476,7 @@ interface MessageRedactionResult {
|
|
|
1476
1476
|
* same email address throughout the conversation.
|
|
1477
1477
|
*/
|
|
1478
1478
|
declare class PiiRedactor {
|
|
1479
|
+
private disposed;
|
|
1479
1480
|
/** Maps original PII value → placeholder tag. */
|
|
1480
1481
|
private valueToPlaceholder;
|
|
1481
1482
|
/** Maps placeholder tag → original PII value (reverse lookup for de-anonymization). */
|
|
@@ -1675,6 +1676,8 @@ declare class PiiRedactor {
|
|
|
1675
1676
|
* Reset all state. Useful for testing or when starting a fresh conversation.
|
|
1676
1677
|
*/
|
|
1677
1678
|
clear(): void;
|
|
1679
|
+
/** Clear the mappings and prevent new reversible mappings. */
|
|
1680
|
+
dispose(): void;
|
|
1678
1681
|
}
|
|
1679
1682
|
|
|
1680
1683
|
type LlmTokenUsage = {
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1476,6 +1476,7 @@ interface MessageRedactionResult {
|
|
|
1476
1476
|
* same email address throughout the conversation.
|
|
1477
1477
|
*/
|
|
1478
1478
|
declare class PiiRedactor {
|
|
1479
|
+
private disposed;
|
|
1479
1480
|
/** Maps original PII value → placeholder tag. */
|
|
1480
1481
|
private valueToPlaceholder;
|
|
1481
1482
|
/** Maps placeholder tag → original PII value (reverse lookup for de-anonymization). */
|
|
@@ -1675,6 +1676,8 @@ declare class PiiRedactor {
|
|
|
1675
1676
|
* Reset all state. Useful for testing or when starting a fresh conversation.
|
|
1676
1677
|
*/
|
|
1677
1678
|
clear(): void;
|
|
1679
|
+
/** Clear the mappings and prevent new reversible mappings. */
|
|
1680
|
+
dispose(): void;
|
|
1678
1681
|
}
|
|
1679
1682
|
|
|
1680
1683
|
type LlmTokenUsage = {
|
package/dist/server/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
taskTypeHeader,
|
|
14
14
|
validateEndpointOverride,
|
|
15
15
|
withInternalFlowMarker
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QK62YWBH.mjs";
|
|
17
17
|
import {
|
|
18
18
|
BASE_URL,
|
|
19
19
|
__commonJS,
|
|
@@ -31740,7 +31740,7 @@ async function tryConsolidate(trimmed, ctx, options, prepared) {
|
|
|
31740
31740
|
content: m.content,
|
|
31741
31741
|
similarity: m.similarity
|
|
31742
31742
|
}));
|
|
31743
|
-
const { consolidateMemory: doConsolidate } = await import("./consolidate-
|
|
31743
|
+
const { consolidateMemory: doConsolidate } = await import("./consolidate-NW4UVA6T.mjs");
|
|
31744
31744
|
const decision = await doConsolidate(trimmed, candidates, consolidateOptions);
|
|
31745
31745
|
if (decision.action === "create") return decision.fallbackReason ? null : { create: true };
|
|
31746
31746
|
if (decision.action === "supersede" && decision.content) {
|