@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
package/dist/index.cjs
CHANGED
|
@@ -2103,6 +2103,14 @@ var DEFAULT_API_EMBEDDING_MODEL = "qwen/qwen3-embedding-8b";
|
|
|
2103
2103
|
|
|
2104
2104
|
// src/lib/memoryEngine/generate.ts
|
|
2105
2105
|
init_clientConfig();
|
|
2106
|
+
|
|
2107
|
+
// src/lib/taskType.ts
|
|
2108
|
+
var TASK_TYPE_HEADER = "X-Anuma-Task-Type";
|
|
2109
|
+
function taskTypeHeader(taskType) {
|
|
2110
|
+
return taskType ? { [TASK_TYPE_HEADER]: taskType } : {};
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
// src/lib/memoryEngine/generate.ts
|
|
2106
2114
|
var EMBED_MAX_ATTEMPTS = 4;
|
|
2107
2115
|
var DEFAULT_EMBEDDING_REQUEST_TIMEOUT_MS = 15e3;
|
|
2108
2116
|
var DEFAULT_EMBEDDING_TOKEN_TIMEOUT_MS = 1e4;
|
|
@@ -2197,7 +2205,10 @@ async function embedOne(text2, options, outer) {
|
|
|
2197
2205
|
const cached = cache.get(text2);
|
|
2198
2206
|
if (cached) return Array.from(cached);
|
|
2199
2207
|
}
|
|
2200
|
-
const headers =
|
|
2208
|
+
const headers = {
|
|
2209
|
+
...await resolveAuthHeaders(options, outer),
|
|
2210
|
+
...taskTypeHeader(options.taskType)
|
|
2211
|
+
};
|
|
2201
2212
|
const response = await withEmbeddingRetry(
|
|
2202
2213
|
() => withDeadline(
|
|
2203
2214
|
(signal) => postApiV1Embeddings({
|
|
@@ -2292,7 +2303,10 @@ async function embedMany(texts, options, outer) {
|
|
|
2292
2303
|
if (uncachedTexts.length === 0) {
|
|
2293
2304
|
return results;
|
|
2294
2305
|
}
|
|
2295
|
-
const headers =
|
|
2306
|
+
const headers = {
|
|
2307
|
+
...await resolveAuthHeaders(options, outer),
|
|
2308
|
+
...taskTypeHeader(options.taskType)
|
|
2309
|
+
};
|
|
2296
2310
|
if (outer?.aborted) throw outer.reason;
|
|
2297
2311
|
const embeddingModel = model ?? DEFAULT_API_EMBEDDING_MODEL;
|
|
2298
2312
|
let newEmbeddings;
|
|
@@ -3248,12 +3262,6 @@ async function* withSseKeepalive(source, options = {}) {
|
|
|
3248
3262
|
}
|
|
3249
3263
|
}
|
|
3250
3264
|
|
|
3251
|
-
// src/lib/taskType.ts
|
|
3252
|
-
var TASK_TYPE_HEADER = "X-Anuma-Task-Type";
|
|
3253
|
-
function taskTypeHeader(taskType) {
|
|
3254
|
-
return taskType ? { [TASK_TYPE_HEADER]: taskType } : {};
|
|
3255
|
-
}
|
|
3256
|
-
|
|
3257
3265
|
// src/tools/appBuilderPrompt.ts
|
|
3258
3266
|
var APP_BUILDER_PROMPT = `App Builder tools (create_file, patch_file, and the rest described below) are available this turn, but they are OPTIONAL \u2014 having them does not mean you should build anything.
|
|
3259
3267
|
|
package/dist/index.d.mts
CHANGED
|
@@ -8107,7 +8107,7 @@ declare function decryptConversationTitle(encryptedTitle: string, address: strin
|
|
|
8107
8107
|
*
|
|
8108
8108
|
* @public
|
|
8109
8109
|
*/
|
|
8110
|
-
type TaskType = "title" | "commit_message" | "memory_extract" | "memory_import_extract" | "memory_dedup" | "memory_decay" | "memory_injection_check" | "memory_verify_support" | "memory_autosort" | "memory_topic" | "memory_consolidate" | "memory_decompose" | "memory_profile_synth" | "memory_graph" | "folder_context" | "selection_memory" | "summarize" | "style_analysis" | "classify_search" | "app_inspiration_generate" | "app_inspiration_trends" | "app_inspiration_remix" | "spotlight_image" | "slide_image" | "slide_video" | "slide_music" | "slide_sfx" | "media_video" | "media_audio" | "media_bg_removal" | "media_image_preset" | "tool_app_builder" | "tool_document_builder" | "tool_slides" | "tool_slides_image_gen" | "connector_guidance" | "cf_task" | "xbot_intent" | "xbot_council" | "scheduled_task";
|
|
8110
|
+
type TaskType = "title" | "commit_message" | "memory_extract" | "memory_import_extract" | "memory_dedup" | "memory_decay" | "memory_injection_check" | "memory_verify_support" | "memory_autosort" | "memory_topic" | "memory_consolidate" | "memory_decompose" | "memory_profile_synth" | "memory_graph" | "memory_recall_embed" | "memory_retain_embed" | "folder_context" | "selection_memory" | "summarize" | "style_analysis" | "classify_search" | "app_inspiration_generate" | "app_inspiration_trends" | "app_inspiration_remix" | "spotlight_image" | "slide_image" | "slide_video" | "slide_music" | "slide_sfx" | "media_video" | "media_audio" | "media_bg_removal" | "media_image_preset" | "tool_app_builder" | "tool_document_builder" | "tool_slides" | "tool_slides_image_gen" | "connector_guidance" | "cf_task" | "xbot_intent" | "xbot_council" | "scheduled_task";
|
|
8111
8111
|
/**
|
|
8112
8112
|
* HTTP header naming the Class-B task a request performs.
|
|
8113
8113
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -8107,7 +8107,7 @@ declare function decryptConversationTitle(encryptedTitle: string, address: strin
|
|
|
8107
8107
|
*
|
|
8108
8108
|
* @public
|
|
8109
8109
|
*/
|
|
8110
|
-
type TaskType = "title" | "commit_message" | "memory_extract" | "memory_import_extract" | "memory_dedup" | "memory_decay" | "memory_injection_check" | "memory_verify_support" | "memory_autosort" | "memory_topic" | "memory_consolidate" | "memory_decompose" | "memory_profile_synth" | "memory_graph" | "folder_context" | "selection_memory" | "summarize" | "style_analysis" | "classify_search" | "app_inspiration_generate" | "app_inspiration_trends" | "app_inspiration_remix" | "spotlight_image" | "slide_image" | "slide_video" | "slide_music" | "slide_sfx" | "media_video" | "media_audio" | "media_bg_removal" | "media_image_preset" | "tool_app_builder" | "tool_document_builder" | "tool_slides" | "tool_slides_image_gen" | "connector_guidance" | "cf_task" | "xbot_intent" | "xbot_council" | "scheduled_task";
|
|
8110
|
+
type TaskType = "title" | "commit_message" | "memory_extract" | "memory_import_extract" | "memory_dedup" | "memory_decay" | "memory_injection_check" | "memory_verify_support" | "memory_autosort" | "memory_topic" | "memory_consolidate" | "memory_decompose" | "memory_profile_synth" | "memory_graph" | "memory_recall_embed" | "memory_retain_embed" | "folder_context" | "selection_memory" | "summarize" | "style_analysis" | "classify_search" | "app_inspiration_generate" | "app_inspiration_trends" | "app_inspiration_remix" | "spotlight_image" | "slide_image" | "slide_video" | "slide_music" | "slide_sfx" | "media_video" | "media_audio" | "media_bg_removal" | "media_image_preset" | "tool_app_builder" | "tool_document_builder" | "tool_slides" | "tool_slides_image_gen" | "connector_guidance" | "cf_task" | "xbot_intent" | "xbot_council" | "scheduled_task";
|
|
8111
8111
|
/**
|
|
8112
8112
|
* HTTP header naming the Class-B task a request performs.
|
|
8113
8113
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -1897,6 +1897,12 @@ function shouldChunkMessage(content, chunkSize = DEFAULT_CHUNK_SIZE) {
|
|
|
1897
1897
|
// src/lib/memoryEngine/constants.ts
|
|
1898
1898
|
var DEFAULT_API_EMBEDDING_MODEL = "qwen/qwen3-embedding-8b";
|
|
1899
1899
|
|
|
1900
|
+
// src/lib/taskType.ts
|
|
1901
|
+
var TASK_TYPE_HEADER = "X-Anuma-Task-Type";
|
|
1902
|
+
function taskTypeHeader(taskType) {
|
|
1903
|
+
return taskType ? { [TASK_TYPE_HEADER]: taskType } : {};
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1900
1906
|
// src/lib/memoryEngine/generate.ts
|
|
1901
1907
|
var EMBED_MAX_ATTEMPTS = 4;
|
|
1902
1908
|
var DEFAULT_EMBEDDING_REQUEST_TIMEOUT_MS = 15e3;
|
|
@@ -1992,7 +1998,10 @@ async function embedOne(text2, options, outer) {
|
|
|
1992
1998
|
const cached = cache.get(text2);
|
|
1993
1999
|
if (cached) return Array.from(cached);
|
|
1994
2000
|
}
|
|
1995
|
-
const headers =
|
|
2001
|
+
const headers = {
|
|
2002
|
+
...await resolveAuthHeaders(options, outer),
|
|
2003
|
+
...taskTypeHeader(options.taskType)
|
|
2004
|
+
};
|
|
1996
2005
|
const response = await withEmbeddingRetry(
|
|
1997
2006
|
() => withDeadline(
|
|
1998
2007
|
(signal) => postApiV1Embeddings({
|
|
@@ -2087,7 +2096,10 @@ async function embedMany(texts, options, outer) {
|
|
|
2087
2096
|
if (uncachedTexts.length === 0) {
|
|
2088
2097
|
return results;
|
|
2089
2098
|
}
|
|
2090
|
-
const headers =
|
|
2099
|
+
const headers = {
|
|
2100
|
+
...await resolveAuthHeaders(options, outer),
|
|
2101
|
+
...taskTypeHeader(options.taskType)
|
|
2102
|
+
};
|
|
2091
2103
|
if (outer?.aborted) throw outer.reason;
|
|
2092
2104
|
const embeddingModel = model ?? DEFAULT_API_EMBEDDING_MODEL;
|
|
2093
2105
|
let newEmbeddings;
|
|
@@ -3043,12 +3055,6 @@ async function* withSseKeepalive(source, options = {}) {
|
|
|
3043
3055
|
}
|
|
3044
3056
|
}
|
|
3045
3057
|
|
|
3046
|
-
// src/lib/taskType.ts
|
|
3047
|
-
var TASK_TYPE_HEADER = "X-Anuma-Task-Type";
|
|
3048
|
-
function taskTypeHeader(taskType) {
|
|
3049
|
-
return taskType ? { [TASK_TYPE_HEADER]: taskType } : {};
|
|
3050
|
-
}
|
|
3051
|
-
|
|
3052
3058
|
// src/tools/appBuilderPrompt.ts
|
|
3053
3059
|
var APP_BUILDER_PROMPT = `App Builder tools (create_file, patch_file, and the rest described below) are available this turn, but they are OPTIONAL \u2014 having them does not mean you should build anything.
|
|
3054
3060
|
|
|
@@ -596,6 +596,7 @@ interface RecallDiagnostics {
|
|
|
596
596
|
* happened.
|
|
597
597
|
*/
|
|
598
598
|
truncated: boolean;
|
|
599
|
+
truncatedByBudget?: boolean;
|
|
599
600
|
/** Memory ids the W5 graph (entity) side lane contributed to the fusion. */
|
|
600
601
|
graphLaneCount: number;
|
|
601
602
|
/** Memory ids the W6 temporal side lane contributed to the fusion. */
|
package/dist/memory/context.d.ts
CHANGED
|
@@ -596,6 +596,7 @@ interface RecallDiagnostics {
|
|
|
596
596
|
* happened.
|
|
597
597
|
*/
|
|
598
598
|
truncated: boolean;
|
|
599
|
+
truncatedByBudget?: boolean;
|
|
599
600
|
/** Memory ids the W5 graph (entity) side lane contributed to the fusion. */
|
|
600
601
|
graphLaneCount: number;
|
|
601
602
|
/** Memory ids the W6 temporal side lane contributed to the fusion. */
|
|
@@ -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,9 +1071,9 @@ export {
|
|
|
1070
1071
|
validateEndpointOverride,
|
|
1071
1072
|
INTERNAL_FLOW_MARKER,
|
|
1072
1073
|
withInternalFlowMarker,
|
|
1073
|
-
taskTypeHeader,
|
|
1074
1074
|
supportsResponseFormat,
|
|
1075
1075
|
requiresResponsesTransport,
|
|
1076
|
+
parseRetryAfterMs,
|
|
1076
1077
|
resolvePortalAuthHeaders,
|
|
1077
1078
|
callPortalJsonCompletion,
|
|
1078
1079
|
extractJsonCandidate,
|