@anuma/sdk 6.42.1 → 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/{chunk-GQBTAM6Y.mjs → chunk-AF37N5Z6.mjs} +2 -1
- package/dist/expo/{consolidate-3H2WY3FU.mjs → consolidate-TOITBD6W.mjs} +1 -1
- package/dist/expo/index.cjs +1130 -418
- package/dist/expo/index.d.mts +133 -55
- package/dist/expo/index.d.ts +133 -55
- package/dist/expo/index.mjs +1077 -367
- 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/{chunk-UFO4W3JX.mjs → chunk-TGLAOFVA.mjs} +2 -1
- package/dist/react/{consolidate-RHIAUBT4.mjs → consolidate-ZEINV2LX.mjs} +1 -1
- package/dist/react/index.cjs +1035 -431
- package/dist/react/index.d.mts +132 -49
- package/dist/react/index.d.ts +132 -49
- package/dist/react/index.mjs +982 -380
- 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/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
|
@@ -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,
|