@anuma/sdk 6.43.0 → 6.43.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/dist/expo/{consolidate-7WCBP5J7.mjs → consolidate-TOITBD6W.mjs} +1 -1
- package/dist/expo/index.cjs +489 -137
- package/dist/expo/index.d.mts +84 -54
- package/dist/expo/index.d.ts +84 -54
- package/dist/expo/index.mjs +478 -127
- package/dist/index.cjs +16 -8
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +14 -8
- package/dist/memory/context.d.mts +1 -0
- package/dist/memory/context.d.ts +1 -0
- package/dist/react/{consolidate-IW7EKXHN.mjs → consolidate-ZEINV2LX.mjs} +1 -1
- package/dist/react/index.cjs +316 -72
- package/dist/react/index.d.mts +83 -48
- package/dist/react/index.d.ts +83 -48
- package/dist/react/index.mjs +305 -62
- package/dist/server/{consolidate-YEGACWLR.mjs → consolidate-WY6BHODK.mjs} +1 -1
- package/dist/server/index.cjs +289 -67
- package/dist/server/index.d.mts +83 -48
- package/dist/server/index.d.ts +83 -48
- package/dist/server/index.mjs +278 -57
- package/dist/telemetry/index.d.mts +1 -0
- package/dist/telemetry/index.d.ts +1 -0
- package/dist/tools/selection/index.cjs +14 -2
- package/dist/tools/selection/index.mjs +14 -2
- package/package.json +1 -1
- package/dist/expo/{chunk-RQ3B2IYV.mjs → chunk-AF37N5Z6.mjs} +1 -1
- package/dist/react/{chunk-CERRBFF5.mjs → chunk-TGLAOFVA.mjs} +1 -1
- package/dist/server/{chunk-4RGGAOAJ.mjs → chunk-WCG5BFI6.mjs} +1 -1
|
@@ -921,6 +921,12 @@ var postApiV1Embeddings = (options) => (options.client ?? client).post({
|
|
|
921
921
|
// src/lib/memoryEngine/generate.ts
|
|
922
922
|
init_clientConfig();
|
|
923
923
|
|
|
924
|
+
// src/lib/taskType.ts
|
|
925
|
+
var TASK_TYPE_HEADER = "X-Anuma-Task-Type";
|
|
926
|
+
function taskTypeHeader(taskType) {
|
|
927
|
+
return taskType ? { [TASK_TYPE_HEADER]: taskType } : {};
|
|
928
|
+
}
|
|
929
|
+
|
|
924
930
|
// src/lib/memoryEngine/constants.ts
|
|
925
931
|
var DEFAULT_API_EMBEDDING_MODEL = "qwen/qwen3-embedding-8b";
|
|
926
932
|
|
|
@@ -1019,7 +1025,10 @@ async function embedOne(text, options, outer) {
|
|
|
1019
1025
|
const cached = cache.get(text);
|
|
1020
1026
|
if (cached) return Array.from(cached);
|
|
1021
1027
|
}
|
|
1022
|
-
const headers =
|
|
1028
|
+
const headers = {
|
|
1029
|
+
...await resolveAuthHeaders(options, outer),
|
|
1030
|
+
...taskTypeHeader(options.taskType)
|
|
1031
|
+
};
|
|
1023
1032
|
const response = await withEmbeddingRetry(
|
|
1024
1033
|
() => withDeadline(
|
|
1025
1034
|
(signal) => postApiV1Embeddings({
|
|
@@ -1114,7 +1123,10 @@ async function embedMany(texts, options, outer) {
|
|
|
1114
1123
|
if (uncachedTexts.length === 0) {
|
|
1115
1124
|
return results;
|
|
1116
1125
|
}
|
|
1117
|
-
const headers =
|
|
1126
|
+
const headers = {
|
|
1127
|
+
...await resolveAuthHeaders(options, outer),
|
|
1128
|
+
...taskTypeHeader(options.taskType)
|
|
1129
|
+
};
|
|
1118
1130
|
if (outer?.aborted) throw outer.reason;
|
|
1119
1131
|
const embeddingModel = model ?? DEFAULT_API_EMBEDDING_MODEL;
|
|
1120
1132
|
let newEmbeddings;
|
|
@@ -799,6 +799,12 @@ var postApiV1Embeddings = (options) => (options.client ?? client).post({
|
|
|
799
799
|
}
|
|
800
800
|
});
|
|
801
801
|
|
|
802
|
+
// src/lib/taskType.ts
|
|
803
|
+
var TASK_TYPE_HEADER = "X-Anuma-Task-Type";
|
|
804
|
+
function taskTypeHeader(taskType) {
|
|
805
|
+
return taskType ? { [TASK_TYPE_HEADER]: taskType } : {};
|
|
806
|
+
}
|
|
807
|
+
|
|
802
808
|
// src/lib/memoryEngine/constants.ts
|
|
803
809
|
var DEFAULT_API_EMBEDDING_MODEL = "qwen/qwen3-embedding-8b";
|
|
804
810
|
|
|
@@ -897,7 +903,10 @@ async function embedOne(text, options, outer) {
|
|
|
897
903
|
const cached = cache.get(text);
|
|
898
904
|
if (cached) return Array.from(cached);
|
|
899
905
|
}
|
|
900
|
-
const headers =
|
|
906
|
+
const headers = {
|
|
907
|
+
...await resolveAuthHeaders(options, outer),
|
|
908
|
+
...taskTypeHeader(options.taskType)
|
|
909
|
+
};
|
|
901
910
|
const response = await withEmbeddingRetry(
|
|
902
911
|
() => withDeadline(
|
|
903
912
|
(signal) => postApiV1Embeddings({
|
|
@@ -992,7 +1001,10 @@ async function embedMany(texts, options, outer) {
|
|
|
992
1001
|
if (uncachedTexts.length === 0) {
|
|
993
1002
|
return results;
|
|
994
1003
|
}
|
|
995
|
-
const headers =
|
|
1004
|
+
const headers = {
|
|
1005
|
+
...await resolveAuthHeaders(options, outer),
|
|
1006
|
+
...taskTypeHeader(options.taskType)
|
|
1007
|
+
};
|
|
996
1008
|
if (outer?.aborted) throw outer.reason;
|
|
997
1009
|
const embeddingModel = model ?? DEFAULT_API_EMBEDDING_MODEL;
|
|
998
1010
|
let newEmbeddings;
|
package/package.json
CHANGED
|
@@ -1063,6 +1063,7 @@ export {
|
|
|
1063
1063
|
noopLogger,
|
|
1064
1064
|
setLogger,
|
|
1065
1065
|
getLogger,
|
|
1066
|
+
taskTypeHeader,
|
|
1066
1067
|
PII_PATTERNS,
|
|
1067
1068
|
PiiRedactor,
|
|
1068
1069
|
isPiiRedactor,
|
|
@@ -1071,7 +1072,6 @@ export {
|
|
|
1071
1072
|
validateEndpointOverride,
|
|
1072
1073
|
INTERNAL_FLOW_MARKER,
|
|
1073
1074
|
withInternalFlowMarker,
|
|
1074
|
-
taskTypeHeader,
|
|
1075
1075
|
supportsResponseFormat,
|
|
1076
1076
|
requiresResponsesTransport,
|
|
1077
1077
|
parseRetryAfterMs,
|
|
@@ -1063,6 +1063,7 @@ export {
|
|
|
1063
1063
|
noopLogger,
|
|
1064
1064
|
setLogger,
|
|
1065
1065
|
getLogger,
|
|
1066
|
+
taskTypeHeader,
|
|
1066
1067
|
PiiRedactor,
|
|
1067
1068
|
isPiiRedactor,
|
|
1068
1069
|
resolvePiiRedactor,
|
|
@@ -1070,7 +1071,6 @@ export {
|
|
|
1070
1071
|
validateEndpointOverride,
|
|
1071
1072
|
INTERNAL_FLOW_MARKER,
|
|
1072
1073
|
withInternalFlowMarker,
|
|
1073
|
-
taskTypeHeader,
|
|
1074
1074
|
supportsResponseFormat,
|
|
1075
1075
|
requiresResponsesTransport,
|
|
1076
1076
|
parseRetryAfterMs,
|
|
@@ -1047,12 +1047,12 @@ function notifyConsolidationFallback(reason, onFallback, detail) {
|
|
|
1047
1047
|
|
|
1048
1048
|
export {
|
|
1049
1049
|
getLogger,
|
|
1050
|
+
taskTypeHeader,
|
|
1050
1051
|
resolvePiiRedactor,
|
|
1051
1052
|
createStreamingDeAnonymizer,
|
|
1052
1053
|
validateEndpointOverride,
|
|
1053
1054
|
INTERNAL_FLOW_MARKER,
|
|
1054
1055
|
withInternalFlowMarker,
|
|
1055
|
-
taskTypeHeader,
|
|
1056
1056
|
supportsResponseFormat,
|
|
1057
1057
|
requiresResponsesTransport,
|
|
1058
1058
|
resolvePortalAuthHeaders,
|