@dakera-ai/dakera 0.9.8 → 0.9.10
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 +43 -4
- package/dist/index.d.ts +43 -4
- package/dist/index.js +10 -2
- package/dist/index.mjs +10 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -453,12 +453,14 @@ interface RecalledMemory {
|
|
|
453
453
|
metadata?: Record<string, unknown>;
|
|
454
454
|
/** Creation timestamp */
|
|
455
455
|
created_at?: string;
|
|
456
|
+
/** KG-3: hop depth at which this memory was found (only set on associated memories) */
|
|
457
|
+
depth?: number;
|
|
456
458
|
}
|
|
457
|
-
/** COG-2: Response from the recall endpoint with optional associative memories */
|
|
459
|
+
/** COG-2 / KG-3: Response from the recall endpoint with optional associative memories */
|
|
458
460
|
interface RecallResponse {
|
|
459
461
|
/** Primary recalled memories */
|
|
460
462
|
memories: RecalledMemory[];
|
|
461
|
-
/** COG-2: KG
|
|
463
|
+
/** COG-2 / KG-3: KG associated memories at configurable depth (only present when include_associated was true) */
|
|
462
464
|
associated_memories?: RecalledMemory[];
|
|
463
465
|
}
|
|
464
466
|
/** Response from storing a memory */
|
|
@@ -487,6 +489,14 @@ interface RecallRequest {
|
|
|
487
489
|
memory_type?: string;
|
|
488
490
|
/** Minimum importance threshold */
|
|
489
491
|
min_importance?: number;
|
|
492
|
+
/** CE-7: only recall memories created at or after this ISO-8601 timestamp */
|
|
493
|
+
since?: string;
|
|
494
|
+
/** CE-7: only recall memories created at or before this ISO-8601 timestamp */
|
|
495
|
+
until?: string;
|
|
496
|
+
/** KG-3: traversal depth 1–3 (default: 1); requires include_associated */
|
|
497
|
+
associated_memories_depth?: number;
|
|
498
|
+
/** KG-3: minimum edge weight for KG traversal (default: 0.0) */
|
|
499
|
+
associated_memories_min_weight?: number;
|
|
490
500
|
}
|
|
491
501
|
/** Request to update importance */
|
|
492
502
|
interface UpdateImportanceRequest {
|
|
@@ -1667,6 +1677,27 @@ interface MemoryPolicy {
|
|
|
1667
1677
|
spaced_repetition_factor?: number;
|
|
1668
1678
|
/** Base interval in seconds for spaced repetition (default: 86 400 = 1 d). */
|
|
1669
1679
|
spaced_repetition_base_interval_seconds?: number;
|
|
1680
|
+
/**
|
|
1681
|
+
* Enable background DBSCAN deduplication for this namespace.
|
|
1682
|
+
* When `true` the server merges semantically near-duplicate memories every
|
|
1683
|
+
* `consolidation_interval_hours` hours. Default: `false`.
|
|
1684
|
+
*/
|
|
1685
|
+
consolidation_enabled?: boolean;
|
|
1686
|
+
/**
|
|
1687
|
+
* DBSCAN epsilon — cosine-similarity threshold to consider two memories
|
|
1688
|
+
* duplicates (default: `0.92`; higher = only merge very close neighbours).
|
|
1689
|
+
*/
|
|
1690
|
+
consolidation_threshold?: number;
|
|
1691
|
+
/**
|
|
1692
|
+
* How often (in hours) the background consolidation job runs for this
|
|
1693
|
+
* namespace (default: `24`).
|
|
1694
|
+
*/
|
|
1695
|
+
consolidation_interval_hours?: number;
|
|
1696
|
+
/**
|
|
1697
|
+
* **Read-only.** Lifetime count of memories merged by the consolidation
|
|
1698
|
+
* engine. The server manages this field; any value you send is ignored.
|
|
1699
|
+
*/
|
|
1700
|
+
consolidated_count?: number;
|
|
1670
1701
|
}
|
|
1671
1702
|
|
|
1672
1703
|
/**
|
|
@@ -2195,10 +2226,14 @@ declare class DakeraClient {
|
|
|
2195
2226
|
* @param options.top_k - Number of primary results (default: 5)
|
|
2196
2227
|
* @param options.memory_type - Filter by memory type
|
|
2197
2228
|
* @param options.min_importance - Minimum importance threshold
|
|
2198
|
-
* @param options.include_associated - COG-2: traverse KG
|
|
2229
|
+
* @param options.include_associated - COG-2: traverse KG and include
|
|
2199
2230
|
* associatively linked memories in `associated_memories` (default: false)
|
|
2200
2231
|
* @param options.associated_memories_cap - COG-2: max associated memories (default: 10, max: 10)
|
|
2201
|
-
* @
|
|
2232
|
+
* @param options.associated_memories_depth - KG-3: traversal depth 1–3 (default: 1); requires include_associated
|
|
2233
|
+
* @param options.associated_memories_min_weight - KG-3: minimum edge weight for KG traversal (default: 0.0)
|
|
2234
|
+
* @param options.since - CE-7: only recall memories created at or after this ISO-8601 timestamp
|
|
2235
|
+
* @param options.until - CE-7: only recall memories created at or before this ISO-8601 timestamp
|
|
2236
|
+
* @returns RecallResponse with `memories` and optionally `associated_memories` (each with `depth` field)
|
|
2202
2237
|
*/
|
|
2203
2238
|
recall(agentId: string, query: string, options?: {
|
|
2204
2239
|
top_k?: number;
|
|
@@ -2206,6 +2241,10 @@ declare class DakeraClient {
|
|
|
2206
2241
|
min_importance?: number;
|
|
2207
2242
|
include_associated?: boolean;
|
|
2208
2243
|
associated_memories_cap?: number;
|
|
2244
|
+
associated_memories_depth?: number;
|
|
2245
|
+
associated_memories_min_weight?: number;
|
|
2246
|
+
since?: string;
|
|
2247
|
+
until?: string;
|
|
2209
2248
|
}): Promise<RecallResponse>;
|
|
2210
2249
|
/** Get a specific memory */
|
|
2211
2250
|
getMemory(agentId: string, memoryId: string): Promise<Memory>;
|
package/dist/index.d.ts
CHANGED
|
@@ -453,12 +453,14 @@ interface RecalledMemory {
|
|
|
453
453
|
metadata?: Record<string, unknown>;
|
|
454
454
|
/** Creation timestamp */
|
|
455
455
|
created_at?: string;
|
|
456
|
+
/** KG-3: hop depth at which this memory was found (only set on associated memories) */
|
|
457
|
+
depth?: number;
|
|
456
458
|
}
|
|
457
|
-
/** COG-2: Response from the recall endpoint with optional associative memories */
|
|
459
|
+
/** COG-2 / KG-3: Response from the recall endpoint with optional associative memories */
|
|
458
460
|
interface RecallResponse {
|
|
459
461
|
/** Primary recalled memories */
|
|
460
462
|
memories: RecalledMemory[];
|
|
461
|
-
/** COG-2: KG
|
|
463
|
+
/** COG-2 / KG-3: KG associated memories at configurable depth (only present when include_associated was true) */
|
|
462
464
|
associated_memories?: RecalledMemory[];
|
|
463
465
|
}
|
|
464
466
|
/** Response from storing a memory */
|
|
@@ -487,6 +489,14 @@ interface RecallRequest {
|
|
|
487
489
|
memory_type?: string;
|
|
488
490
|
/** Minimum importance threshold */
|
|
489
491
|
min_importance?: number;
|
|
492
|
+
/** CE-7: only recall memories created at or after this ISO-8601 timestamp */
|
|
493
|
+
since?: string;
|
|
494
|
+
/** CE-7: only recall memories created at or before this ISO-8601 timestamp */
|
|
495
|
+
until?: string;
|
|
496
|
+
/** KG-3: traversal depth 1–3 (default: 1); requires include_associated */
|
|
497
|
+
associated_memories_depth?: number;
|
|
498
|
+
/** KG-3: minimum edge weight for KG traversal (default: 0.0) */
|
|
499
|
+
associated_memories_min_weight?: number;
|
|
490
500
|
}
|
|
491
501
|
/** Request to update importance */
|
|
492
502
|
interface UpdateImportanceRequest {
|
|
@@ -1667,6 +1677,27 @@ interface MemoryPolicy {
|
|
|
1667
1677
|
spaced_repetition_factor?: number;
|
|
1668
1678
|
/** Base interval in seconds for spaced repetition (default: 86 400 = 1 d). */
|
|
1669
1679
|
spaced_repetition_base_interval_seconds?: number;
|
|
1680
|
+
/**
|
|
1681
|
+
* Enable background DBSCAN deduplication for this namespace.
|
|
1682
|
+
* When `true` the server merges semantically near-duplicate memories every
|
|
1683
|
+
* `consolidation_interval_hours` hours. Default: `false`.
|
|
1684
|
+
*/
|
|
1685
|
+
consolidation_enabled?: boolean;
|
|
1686
|
+
/**
|
|
1687
|
+
* DBSCAN epsilon — cosine-similarity threshold to consider two memories
|
|
1688
|
+
* duplicates (default: `0.92`; higher = only merge very close neighbours).
|
|
1689
|
+
*/
|
|
1690
|
+
consolidation_threshold?: number;
|
|
1691
|
+
/**
|
|
1692
|
+
* How often (in hours) the background consolidation job runs for this
|
|
1693
|
+
* namespace (default: `24`).
|
|
1694
|
+
*/
|
|
1695
|
+
consolidation_interval_hours?: number;
|
|
1696
|
+
/**
|
|
1697
|
+
* **Read-only.** Lifetime count of memories merged by the consolidation
|
|
1698
|
+
* engine. The server manages this field; any value you send is ignored.
|
|
1699
|
+
*/
|
|
1700
|
+
consolidated_count?: number;
|
|
1670
1701
|
}
|
|
1671
1702
|
|
|
1672
1703
|
/**
|
|
@@ -2195,10 +2226,14 @@ declare class DakeraClient {
|
|
|
2195
2226
|
* @param options.top_k - Number of primary results (default: 5)
|
|
2196
2227
|
* @param options.memory_type - Filter by memory type
|
|
2197
2228
|
* @param options.min_importance - Minimum importance threshold
|
|
2198
|
-
* @param options.include_associated - COG-2: traverse KG
|
|
2229
|
+
* @param options.include_associated - COG-2: traverse KG and include
|
|
2199
2230
|
* associatively linked memories in `associated_memories` (default: false)
|
|
2200
2231
|
* @param options.associated_memories_cap - COG-2: max associated memories (default: 10, max: 10)
|
|
2201
|
-
* @
|
|
2232
|
+
* @param options.associated_memories_depth - KG-3: traversal depth 1–3 (default: 1); requires include_associated
|
|
2233
|
+
* @param options.associated_memories_min_weight - KG-3: minimum edge weight for KG traversal (default: 0.0)
|
|
2234
|
+
* @param options.since - CE-7: only recall memories created at or after this ISO-8601 timestamp
|
|
2235
|
+
* @param options.until - CE-7: only recall memories created at or before this ISO-8601 timestamp
|
|
2236
|
+
* @returns RecallResponse with `memories` and optionally `associated_memories` (each with `depth` field)
|
|
2202
2237
|
*/
|
|
2203
2238
|
recall(agentId: string, query: string, options?: {
|
|
2204
2239
|
top_k?: number;
|
|
@@ -2206,6 +2241,10 @@ declare class DakeraClient {
|
|
|
2206
2241
|
min_importance?: number;
|
|
2207
2242
|
include_associated?: boolean;
|
|
2208
2243
|
associated_memories_cap?: number;
|
|
2244
|
+
associated_memories_depth?: number;
|
|
2245
|
+
associated_memories_min_weight?: number;
|
|
2246
|
+
since?: string;
|
|
2247
|
+
until?: string;
|
|
2209
2248
|
}): Promise<RecallResponse>;
|
|
2210
2249
|
/** Get a specific memory */
|
|
2211
2250
|
getMemory(agentId: string, memoryId: string): Promise<Memory>;
|
package/dist/index.js
CHANGED
|
@@ -1075,10 +1075,14 @@ var DakeraClient = class {
|
|
|
1075
1075
|
* @param options.top_k - Number of primary results (default: 5)
|
|
1076
1076
|
* @param options.memory_type - Filter by memory type
|
|
1077
1077
|
* @param options.min_importance - Minimum importance threshold
|
|
1078
|
-
* @param options.include_associated - COG-2: traverse KG
|
|
1078
|
+
* @param options.include_associated - COG-2: traverse KG and include
|
|
1079
1079
|
* associatively linked memories in `associated_memories` (default: false)
|
|
1080
1080
|
* @param options.associated_memories_cap - COG-2: max associated memories (default: 10, max: 10)
|
|
1081
|
-
* @
|
|
1081
|
+
* @param options.associated_memories_depth - KG-3: traversal depth 1–3 (default: 1); requires include_associated
|
|
1082
|
+
* @param options.associated_memories_min_weight - KG-3: minimum edge weight for KG traversal (default: 0.0)
|
|
1083
|
+
* @param options.since - CE-7: only recall memories created at or after this ISO-8601 timestamp
|
|
1084
|
+
* @param options.until - CE-7: only recall memories created at or before this ISO-8601 timestamp
|
|
1085
|
+
* @returns RecallResponse with `memories` and optionally `associated_memories` (each with `depth` field)
|
|
1082
1086
|
*/
|
|
1083
1087
|
async recall(agentId2, query, options) {
|
|
1084
1088
|
const body = { query };
|
|
@@ -1087,6 +1091,10 @@ var DakeraClient = class {
|
|
|
1087
1091
|
if (options?.min_importance !== void 0) body["min_importance"] = options.min_importance;
|
|
1088
1092
|
if (options?.include_associated) body["include_associated"] = true;
|
|
1089
1093
|
if (options?.associated_memories_cap !== void 0) body["associated_memories_cap"] = options.associated_memories_cap;
|
|
1094
|
+
if (options?.associated_memories_depth !== void 0) body["associated_memories_depth"] = options.associated_memories_depth;
|
|
1095
|
+
if (options?.associated_memories_min_weight !== void 0) body["associated_memories_min_weight"] = options.associated_memories_min_weight;
|
|
1096
|
+
if (options?.since !== void 0) body["since"] = options.since;
|
|
1097
|
+
if (options?.until !== void 0) body["until"] = options.until;
|
|
1090
1098
|
return this.request("POST", `/v1/agents/${agentId2}/memories/recall`, body);
|
|
1091
1099
|
}
|
|
1092
1100
|
/** Get a specific memory */
|
package/dist/index.mjs
CHANGED
|
@@ -1035,10 +1035,14 @@ var DakeraClient = class {
|
|
|
1035
1035
|
* @param options.top_k - Number of primary results (default: 5)
|
|
1036
1036
|
* @param options.memory_type - Filter by memory type
|
|
1037
1037
|
* @param options.min_importance - Minimum importance threshold
|
|
1038
|
-
* @param options.include_associated - COG-2: traverse KG
|
|
1038
|
+
* @param options.include_associated - COG-2: traverse KG and include
|
|
1039
1039
|
* associatively linked memories in `associated_memories` (default: false)
|
|
1040
1040
|
* @param options.associated_memories_cap - COG-2: max associated memories (default: 10, max: 10)
|
|
1041
|
-
* @
|
|
1041
|
+
* @param options.associated_memories_depth - KG-3: traversal depth 1–3 (default: 1); requires include_associated
|
|
1042
|
+
* @param options.associated_memories_min_weight - KG-3: minimum edge weight for KG traversal (default: 0.0)
|
|
1043
|
+
* @param options.since - CE-7: only recall memories created at or after this ISO-8601 timestamp
|
|
1044
|
+
* @param options.until - CE-7: only recall memories created at or before this ISO-8601 timestamp
|
|
1045
|
+
* @returns RecallResponse with `memories` and optionally `associated_memories` (each with `depth` field)
|
|
1042
1046
|
*/
|
|
1043
1047
|
async recall(agentId2, query, options) {
|
|
1044
1048
|
const body = { query };
|
|
@@ -1047,6 +1051,10 @@ var DakeraClient = class {
|
|
|
1047
1051
|
if (options?.min_importance !== void 0) body["min_importance"] = options.min_importance;
|
|
1048
1052
|
if (options?.include_associated) body["include_associated"] = true;
|
|
1049
1053
|
if (options?.associated_memories_cap !== void 0) body["associated_memories_cap"] = options.associated_memories_cap;
|
|
1054
|
+
if (options?.associated_memories_depth !== void 0) body["associated_memories_depth"] = options.associated_memories_depth;
|
|
1055
|
+
if (options?.associated_memories_min_weight !== void 0) body["associated_memories_min_weight"] = options.associated_memories_min_weight;
|
|
1056
|
+
if (options?.since !== void 0) body["since"] = options.since;
|
|
1057
|
+
if (options?.until !== void 0) body["until"] = options.until;
|
|
1050
1058
|
return this.request("POST", `/v1/agents/${agentId2}/memories/recall`, body);
|
|
1051
1059
|
}
|
|
1052
1060
|
/** Get a specific memory */
|