@dakera-ai/dakera 0.10.0 → 0.10.2

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.d.mts CHANGED
@@ -265,7 +265,7 @@ interface ClientOptions {
265
265
  * - bge-small: BGE-small - Balanced performance (384 dimensions)
266
266
  * - e5-small: E5-small - High quality (384 dimensions)
267
267
  */
268
- type EmbeddingModel = 'minilm' | 'bge-small' | 'e5-small';
268
+ type EmbeddingModel = 'bge-large' | 'minilm' | 'bge-small' | 'e5-small';
269
269
  /**
270
270
  * Input for upserting a text document with automatic embedding.
271
271
  */
@@ -463,12 +463,16 @@ interface RecallResponse {
463
463
  /** COG-2 / KG-3: KG associated memories at configurable depth (only present when include_associated was true) */
464
464
  associated_memories?: RecalledMemory[];
465
465
  }
466
- /** Response from storing a memory */
466
+ /** Response from storing a memory.
467
+ *
468
+ * The server wraps the created memory in a nested `memory` object:
469
+ * `{"memory": {"id": "...", "agent_id": "...", ...}, "embedding_time_ms": N}`.
470
+ */
467
471
  interface StoreMemoryResponse {
468
- /** Created memory ID */
469
- memory_id: MemoryId;
470
- /** Status */
471
- status: string;
472
+ /** The stored memory object */
473
+ memory: Memory;
474
+ /** Embedding latency in milliseconds */
475
+ embedding_time_ms?: number;
472
476
  }
473
477
  /** Request to update a memory */
474
478
  interface UpdateMemoryRequest {
@@ -506,6 +510,8 @@ interface RecallRequest {
506
510
  associated_memories_min_weight?: number;
507
511
  /** CE-10: retrieval routing mode. Default: `"auto"` (server picks best strategy). */
508
512
  routing?: RoutingMode;
513
+ /** CE-13: enable cross-encoder reranking. Default: `undefined` (server uses `true` for recall). Pass `false` to disable on latency-sensitive paths. */
514
+ rerank?: boolean;
509
515
  }
510
516
  /** Request to update importance */
511
517
  interface UpdateImportanceRequest {
@@ -527,12 +533,12 @@ interface ConsolidateRequest {
527
533
  }
528
534
  /** Response from consolidation */
529
535
  interface ConsolidateResponse {
530
- /** Number of memories consolidated */
531
- consolidated_count: number;
532
- /** Number of memories removed */
533
- removed_count: number;
534
- /** IDs of new consolidated memories */
535
- new_memories: MemoryId[];
536
+ /** Number of source memories removed during consolidation */
537
+ memories_removed: number;
538
+ /** IDs of the source memories that were consolidated */
539
+ source_memory_ids: MemoryId[];
540
+ /** The resulting consolidated memory (if any) */
541
+ consolidated_memory?: Memory;
536
542
  /** Step-by-step consolidation log (CE-6) */
537
543
  log?: ConsolidationLogEntry[];
538
544
  }
@@ -2351,6 +2357,7 @@ declare class DakeraClient {
2351
2357
  since?: string;
2352
2358
  until?: string;
2353
2359
  routing?: RoutingMode;
2360
+ rerank?: boolean;
2354
2361
  }): Promise<RecallResponse>;
2355
2362
  /** Get a specific memory */
2356
2363
  getMemory(agentId: string, memoryId: string): Promise<Memory>;
@@ -2398,6 +2405,7 @@ declare class DakeraClient {
2398
2405
  memory_type?: string;
2399
2406
  min_importance?: number;
2400
2407
  routing?: RoutingMode;
2408
+ rerank?: boolean;
2401
2409
  }): Promise<RecalledMemory[]>;
2402
2410
  /** Update importance of memories */
2403
2411
  updateImportance(agentId: string, request: UpdateImportanceRequest): Promise<{
package/dist/index.d.ts CHANGED
@@ -265,7 +265,7 @@ interface ClientOptions {
265
265
  * - bge-small: BGE-small - Balanced performance (384 dimensions)
266
266
  * - e5-small: E5-small - High quality (384 dimensions)
267
267
  */
268
- type EmbeddingModel = 'minilm' | 'bge-small' | 'e5-small';
268
+ type EmbeddingModel = 'bge-large' | 'minilm' | 'bge-small' | 'e5-small';
269
269
  /**
270
270
  * Input for upserting a text document with automatic embedding.
271
271
  */
@@ -463,12 +463,16 @@ interface RecallResponse {
463
463
  /** COG-2 / KG-3: KG associated memories at configurable depth (only present when include_associated was true) */
464
464
  associated_memories?: RecalledMemory[];
465
465
  }
466
- /** Response from storing a memory */
466
+ /** Response from storing a memory.
467
+ *
468
+ * The server wraps the created memory in a nested `memory` object:
469
+ * `{"memory": {"id": "...", "agent_id": "...", ...}, "embedding_time_ms": N}`.
470
+ */
467
471
  interface StoreMemoryResponse {
468
- /** Created memory ID */
469
- memory_id: MemoryId;
470
- /** Status */
471
- status: string;
472
+ /** The stored memory object */
473
+ memory: Memory;
474
+ /** Embedding latency in milliseconds */
475
+ embedding_time_ms?: number;
472
476
  }
473
477
  /** Request to update a memory */
474
478
  interface UpdateMemoryRequest {
@@ -506,6 +510,8 @@ interface RecallRequest {
506
510
  associated_memories_min_weight?: number;
507
511
  /** CE-10: retrieval routing mode. Default: `"auto"` (server picks best strategy). */
508
512
  routing?: RoutingMode;
513
+ /** CE-13: enable cross-encoder reranking. Default: `undefined` (server uses `true` for recall). Pass `false` to disable on latency-sensitive paths. */
514
+ rerank?: boolean;
509
515
  }
510
516
  /** Request to update importance */
511
517
  interface UpdateImportanceRequest {
@@ -527,12 +533,12 @@ interface ConsolidateRequest {
527
533
  }
528
534
  /** Response from consolidation */
529
535
  interface ConsolidateResponse {
530
- /** Number of memories consolidated */
531
- consolidated_count: number;
532
- /** Number of memories removed */
533
- removed_count: number;
534
- /** IDs of new consolidated memories */
535
- new_memories: MemoryId[];
536
+ /** Number of source memories removed during consolidation */
537
+ memories_removed: number;
538
+ /** IDs of the source memories that were consolidated */
539
+ source_memory_ids: MemoryId[];
540
+ /** The resulting consolidated memory (if any) */
541
+ consolidated_memory?: Memory;
536
542
  /** Step-by-step consolidation log (CE-6) */
537
543
  log?: ConsolidationLogEntry[];
538
544
  }
@@ -2351,6 +2357,7 @@ declare class DakeraClient {
2351
2357
  since?: string;
2352
2358
  until?: string;
2353
2359
  routing?: RoutingMode;
2360
+ rerank?: boolean;
2354
2361
  }): Promise<RecallResponse>;
2355
2362
  /** Get a specific memory */
2356
2363
  getMemory(agentId: string, memoryId: string): Promise<Memory>;
@@ -2398,6 +2405,7 @@ declare class DakeraClient {
2398
2405
  memory_type?: string;
2399
2406
  min_importance?: number;
2400
2407
  routing?: RoutingMode;
2408
+ rerank?: boolean;
2401
2409
  }): Promise<RecalledMemory[]>;
2402
2410
  /** Update importance of memories */
2403
2411
  updateImportance(agentId: string, request: UpdateImportanceRequest): Promise<{
package/dist/index.js CHANGED
@@ -1096,6 +1096,7 @@ var DakeraClient = class {
1096
1096
  if (options?.since !== void 0) body["since"] = options.since;
1097
1097
  if (options?.until !== void 0) body["until"] = options.until;
1098
1098
  if (options?.routing !== void 0) body["routing"] = options.routing;
1099
+ if (options?.rerank !== void 0) body["rerank"] = options.rerank;
1099
1100
  return this.request("POST", `/v1/agents/${agentId2}/memories/recall`, body);
1100
1101
  }
1101
1102
  /** Get a specific memory */
@@ -1153,6 +1154,7 @@ var DakeraClient = class {
1153
1154
  if (options?.memory_type !== void 0) body["memory_type"] = options.memory_type;
1154
1155
  if (options?.min_importance !== void 0) body["min_importance"] = options.min_importance;
1155
1156
  if (options?.routing !== void 0) body["routing"] = options.routing;
1157
+ if (options?.rerank !== void 0) body["rerank"] = options.rerank;
1156
1158
  const result = await this.request("POST", `/v1/agents/${agentId2}/memories/search`, body);
1157
1159
  return result.memories ?? result;
1158
1160
  }
package/dist/index.mjs CHANGED
@@ -1056,6 +1056,7 @@ var DakeraClient = class {
1056
1056
  if (options?.since !== void 0) body["since"] = options.since;
1057
1057
  if (options?.until !== void 0) body["until"] = options.until;
1058
1058
  if (options?.routing !== void 0) body["routing"] = options.routing;
1059
+ if (options?.rerank !== void 0) body["rerank"] = options.rerank;
1059
1060
  return this.request("POST", `/v1/agents/${agentId2}/memories/recall`, body);
1060
1061
  }
1061
1062
  /** Get a specific memory */
@@ -1113,6 +1114,7 @@ var DakeraClient = class {
1113
1114
  if (options?.memory_type !== void 0) body["memory_type"] = options.memory_type;
1114
1115
  if (options?.min_importance !== void 0) body["min_importance"] = options.min_importance;
1115
1116
  if (options?.routing !== void 0) body["routing"] = options.routing;
1117
+ if (options?.rerank !== void 0) body["rerank"] = options.rerank;
1116
1118
  const result = await this.request("POST", `/v1/agents/${agentId2}/memories/search`, body);
1117
1119
  return result.memories ?? result;
1118
1120
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dakera-ai/dakera",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "TypeScript/JavaScript SDK for Dakera AI memory platform",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",