@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/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 = await resolveAuthHeaders(options, outer);
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 = await resolveAuthHeaders(options, outer);
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 = await resolveAuthHeaders(options, outer);
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 = await resolveAuthHeaders(options, outer);
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. */
@@ -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. */
@@ -2,7 +2,7 @@ import {
2
2
  callPortalJsonCompletion,
3
3
  notifyConsolidationFallback,
4
4
  resolvePiiRedactor
5
- } from "./chunk-CERRBFF5.mjs";
5
+ } from "./chunk-TGLAOFVA.mjs";
6
6
  import "./chunk-GYKJOWEO.mjs";
7
7
 
8
8
  // src/lib/memory/consolidate.ts