@dakera-ai/dakera 0.7.2 → 0.8.0

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
@@ -402,8 +402,14 @@ interface StoreMemoryRequest {
402
402
  importance?: number;
403
403
  /** Optional metadata */
404
404
  metadata?: Record<string, unknown>;
405
- /** TTL in seconds */
405
+ /** TTL in seconds — memory is hard-deleted after this many seconds from creation */
406
406
  ttl_seconds?: number;
407
+ /**
408
+ * Explicit expiry as a Unix timestamp (seconds).
409
+ * Takes precedence over `ttl_seconds` when both are provided.
410
+ * The memory is hard-deleted by the decay engine on expiry (DECAY-3).
411
+ */
412
+ expires_at?: number;
407
413
  /** Associated session ID */
408
414
  session_id?: string;
409
415
  /** Pre-computed embedding */
@@ -1106,6 +1112,50 @@ interface AutoPilotTriggerResponse {
1106
1112
  consolidation?: AutoPilotConsolidationResult;
1107
1113
  message: string;
1108
1114
  }
1115
+ /** Response from GET /v1/admin/decay/config (DECAY-1) */
1116
+ interface DecayConfigResponse {
1117
+ /** Decay strategy: "exponential", "linear", or "step" */
1118
+ strategy: 'exponential' | 'linear' | 'step';
1119
+ /** Half-life in hours */
1120
+ half_life_hours: number;
1121
+ /** Minimum importance threshold; memories below are hard-deleted on next cycle */
1122
+ min_importance: number;
1123
+ }
1124
+ /** Request for PUT /v1/admin/decay/config (DECAY-1) */
1125
+ interface DecayConfigUpdateRequest {
1126
+ /** Decay strategy: "exponential", "linear", or "step" */
1127
+ strategy?: 'exponential' | 'linear' | 'step';
1128
+ /** Half-life in hours (must be > 0) */
1129
+ half_life_hours?: number;
1130
+ /** Minimum importance threshold 0.0–1.0 */
1131
+ min_importance?: number;
1132
+ }
1133
+ /** Response from PUT /v1/admin/decay/config (DECAY-1) */
1134
+ interface DecayConfigUpdateResponse {
1135
+ success: boolean;
1136
+ config: DecayConfigResponse;
1137
+ message: string;
1138
+ }
1139
+ /** Stats from a single decay cycle */
1140
+ interface LastDecayCycleStats {
1141
+ namespaces_processed: number;
1142
+ memories_processed: number;
1143
+ memories_decayed: number;
1144
+ memories_deleted: number;
1145
+ }
1146
+ /** Response from GET /v1/admin/decay/stats (DECAY-2) */
1147
+ interface DecayStatsResponse {
1148
+ /** Total memories whose importance was lowered by decay (all-time) */
1149
+ total_decayed: number;
1150
+ /** Total memories hard-deleted by decay or TTL expiry (all-time) */
1151
+ total_deleted: number;
1152
+ /** Unix timestamp of the last decay cycle (undefined if never run) */
1153
+ last_run_at?: number;
1154
+ /** Number of decay cycles completed since startup */
1155
+ cycles_run: number;
1156
+ /** Stats from the most recent decay cycle (undefined if never run) */
1157
+ last_cycle?: LastDecayCycleStats;
1158
+ }
1109
1159
  /** API key */
1110
1160
  interface ApiKey {
1111
1161
  id: string;
@@ -1355,21 +1405,29 @@ declare class DakeraClient {
1355
1405
  /**
1356
1406
  * Perform hybrid search combining vector and full-text.
1357
1407
  *
1408
+ * When `vector` is omitted the server falls back to BM25-only full-text
1409
+ * search. When provided, results are blended with vector similarity
1410
+ * according to `alpha`.
1411
+ *
1358
1412
  * @param namespace - Target namespace
1359
- * @param vector - Query vector
1360
1413
  * @param query - Text query
1361
- * @param options - Search options including alpha for balance
1414
+ * @param options - Search options: vector (optional), topK, alpha, filter
1362
1415
  * @returns Hybrid search results
1363
1416
  *
1364
1417
  * @example
1365
1418
  * ```typescript
1366
- * const results = await client.hybridSearch('my-namespace', [0.1, 0.2, 0.3], 'machine learning', {
1419
+ * // Hybrid (vector + text)
1420
+ * const results = await client.hybridSearch('my-namespace', 'machine learning', {
1421
+ * vector: [0.1, 0.2, 0.3],
1367
1422
  * topK: 10,
1368
1423
  * alpha: 0.7, // 70% text, 30% vector
1369
1424
  * });
1425
+ * // BM25-only (no vector)
1426
+ * const results = await client.hybridSearch('my-namespace', 'machine learning');
1370
1427
  * ```
1371
1428
  */
1372
- hybridSearch(namespace: string, vector: number[], query: string, options?: {
1429
+ hybridSearch(namespace: string, query: string, options?: {
1430
+ vector?: number[];
1373
1431
  topK?: number;
1374
1432
  alpha?: number;
1375
1433
  filter?: FilterExpression;
@@ -1876,6 +1934,16 @@ declare class DakeraClient {
1876
1934
  autopilotUpdateConfig(request: AutoPilotConfigRequest): Promise<AutoPilotConfigResponse>;
1877
1935
  /** Manually trigger an AutoPilot dedup or consolidation cycle (PILOT-3) */
1878
1936
  autopilotTrigger(action: AutoPilotTriggerAction): Promise<AutoPilotTriggerResponse>;
1937
+ /** Get current decay engine configuration (DECAY-1). Requires Admin scope. */
1938
+ decayConfig(): Promise<DecayConfigResponse>;
1939
+ /**
1940
+ * Update decay engine configuration at runtime (DECAY-1). Requires Admin scope.
1941
+ * Changes take effect on the next decay cycle — no restart required.
1942
+ * All fields are optional; omit any to keep its current value.
1943
+ */
1944
+ decayUpdateConfig(request: DecayConfigUpdateRequest): Promise<DecayConfigUpdateResponse>;
1945
+ /** Get decay activity counters and last-cycle snapshot (DECAY-2). Requires Admin scope. */
1946
+ decayStats(): Promise<DecayStatsResponse>;
1879
1947
  /** Create a new API key */
1880
1948
  createKey(request: CreateKeyRequest): Promise<ApiKey>;
1881
1949
  /** List all API keys */
@@ -2034,4 +2102,4 @@ declare class TimeoutError extends DakeraError {
2034
2102
  constructor(message: string);
2035
2103
  }
2036
2104
 
2037
- export { type AccessPatternHint, type AgentId, type AgentNetworkEdge, type AgentNetworkInfo, type AgentNetworkNode, type AgentNetworkStats, type AgentStats, type AgentSummary, type AggregationGroup, type AggregationRequest, type AggregationResponse, type AnalyticsOptions, type AnalyticsOverview, type ApiKey, AuthenticationError, AuthorizationError, type AutoPilotConfig, type AutoPilotConfigRequest, type AutoPilotConfigResponse, type AutoPilotConsolidationResult, type AutoPilotDedupResult, type AutoPilotStatusResponse, type AutoPilotTriggerAction, type AutoPilotTriggerResponse, type BackupInfo, type BatchForgetRequest, type BatchForgetResponse, type BatchMemoryFilter, type BatchQuerySpec, type BatchRecallRequest, type BatchRecallResponse, type BatchTextQueryOptions, type BatchTextQueryResponse, type Branded, type CacheStats, type ClientOptions, type ClusterNode, type ClusterStatus, type ColumnUpsertRequest, type ConfigureNamespaceRequest, type ConfigureNamespaceResponse, ConnectionError, type ConsolidateRequest, type ConsolidateResponse, type ConsolidationResultSnapshot, type CreateKeyRequest, type CrossAgentNetworkRequest, type CrossAgentNetworkResponse, DakeraClient, DakeraError, type DakeraEvent, type DedupResultSnapshot, type DeduplicateRequest, type DeduplicateResponse, type DeleteOptions, type DeleteResponse, type DistanceMetric, type Document, type DocumentInput, type EmbeddingModel, ErrorCode, type ExportRequest, type ExportResponse, type ExportedVector, type FilterExpression, type FilterOperators, type FullKnowledgeGraphRequest, type FullTextSearchResult, type HealthResponse, type HybridSearchResult, type IndexStats, type JobProgressEvent, type KeyUsage, type KnowledgeEdge, type KnowledgeGraphRequest, type KnowledgeGraphResponse, type KnowledgeNode, type LatencyAnalytics, type ListSessionsOptions, type Memory, type MemoryEvent, type MemoryFeedbackRequest, type MemoryFeedbackResponse, type MemoryId, type MemoryType, type MultiVectorSearchRequest, type MultiVectorSearchResponse, type MultiVectorSearchResult, type NamespaceCreatedEvent, type NamespaceDeletedEvent, type NamespaceInfo, NotFoundError, type OpStatus, type OperationProgressEvent, type QueryExplainRequest, type QueryExplainResponse, type QueryOptions, type QueryResult, RateLimitError, type RateLimitHeaders, type ReadConsistency, type RecallRequest, type RecalledMemory, type RetryConfig, type SearchResult, ServerError, type Session, type SessionId, type SlowQuery, type StalenessConfig, type StartSessionRequest, type StorageAnalytics, type StoreMemoryRequest, type StoreMemoryResponse, type StreamLaggedEvent, type SummarizeRequest, type SummarizeResponse, type TextDocument, type TextQueryOptions, type TextQueryResponse, type TextSearchResult, type TextUpsertOptions, type TextUpsertResponse, type ThroughputAnalytics, TimeoutError, type TtlConfig, type UnifiedQueryRequest, type UnifiedQueryResponse, type UnifiedSearchResult, type UpdateImportanceRequest, type UpdateMemoryRequest, type UpsertOptions, type UpsertResponse, ValidationError, type Vector, type VectorId, type VectorInput, type VectorMutationOp, type VectorsMutatedEvent, type WarmCacheRequest, type WarmCacheResponse, type WarmingPriority, type WarmingTargetTier, agentId, memoryId, sessionId, vectorId };
2105
+ export { type AccessPatternHint, type AgentId, type AgentNetworkEdge, type AgentNetworkInfo, type AgentNetworkNode, type AgentNetworkStats, type AgentStats, type AgentSummary, type AggregationGroup, type AggregationRequest, type AggregationResponse, type AnalyticsOptions, type AnalyticsOverview, type ApiKey, AuthenticationError, AuthorizationError, type AutoPilotConfig, type AutoPilotConfigRequest, type AutoPilotConfigResponse, type AutoPilotConsolidationResult, type AutoPilotDedupResult, type AutoPilotStatusResponse, type AutoPilotTriggerAction, type AutoPilotTriggerResponse, type BackupInfo, type BatchForgetRequest, type BatchForgetResponse, type BatchMemoryFilter, type BatchQuerySpec, type BatchRecallRequest, type BatchRecallResponse, type BatchTextQueryOptions, type BatchTextQueryResponse, type Branded, type CacheStats, type ClientOptions, type ClusterNode, type ClusterStatus, type ColumnUpsertRequest, type ConfigureNamespaceRequest, type ConfigureNamespaceResponse, ConnectionError, type ConsolidateRequest, type ConsolidateResponse, type ConsolidationResultSnapshot, type CreateKeyRequest, type CrossAgentNetworkRequest, type CrossAgentNetworkResponse, DakeraClient, DakeraError, type DakeraEvent, type DecayConfigResponse, type DecayConfigUpdateRequest, type DecayConfigUpdateResponse, type DecayStatsResponse, type DedupResultSnapshot, type DeduplicateRequest, type DeduplicateResponse, type DeleteOptions, type DeleteResponse, type DistanceMetric, type Document, type DocumentInput, type EmbeddingModel, ErrorCode, type ExportRequest, type ExportResponse, type ExportedVector, type FilterExpression, type FilterOperators, type FullKnowledgeGraphRequest, type FullTextSearchResult, type HealthResponse, type HybridSearchResult, type IndexStats, type JobProgressEvent, type KeyUsage, type KnowledgeEdge, type KnowledgeGraphRequest, type KnowledgeGraphResponse, type KnowledgeNode, type LastDecayCycleStats, type LatencyAnalytics, type ListSessionsOptions, type Memory, type MemoryEvent, type MemoryFeedbackRequest, type MemoryFeedbackResponse, type MemoryId, type MemoryType, type MultiVectorSearchRequest, type MultiVectorSearchResponse, type MultiVectorSearchResult, type NamespaceCreatedEvent, type NamespaceDeletedEvent, type NamespaceInfo, NotFoundError, type OpStatus, type OperationProgressEvent, type QueryExplainRequest, type QueryExplainResponse, type QueryOptions, type QueryResult, RateLimitError, type RateLimitHeaders, type ReadConsistency, type RecallRequest, type RecalledMemory, type RetryConfig, type SearchResult, ServerError, type Session, type SessionId, type SlowQuery, type StalenessConfig, type StartSessionRequest, type StorageAnalytics, type StoreMemoryRequest, type StoreMemoryResponse, type StreamLaggedEvent, type SummarizeRequest, type SummarizeResponse, type TextDocument, type TextQueryOptions, type TextQueryResponse, type TextSearchResult, type TextUpsertOptions, type TextUpsertResponse, type ThroughputAnalytics, TimeoutError, type TtlConfig, type UnifiedQueryRequest, type UnifiedQueryResponse, type UnifiedSearchResult, type UpdateImportanceRequest, type UpdateMemoryRequest, type UpsertOptions, type UpsertResponse, ValidationError, type Vector, type VectorId, type VectorInput, type VectorMutationOp, type VectorsMutatedEvent, type WarmCacheRequest, type WarmCacheResponse, type WarmingPriority, type WarmingTargetTier, agentId, memoryId, sessionId, vectorId };
package/dist/index.d.ts CHANGED
@@ -402,8 +402,14 @@ interface StoreMemoryRequest {
402
402
  importance?: number;
403
403
  /** Optional metadata */
404
404
  metadata?: Record<string, unknown>;
405
- /** TTL in seconds */
405
+ /** TTL in seconds — memory is hard-deleted after this many seconds from creation */
406
406
  ttl_seconds?: number;
407
+ /**
408
+ * Explicit expiry as a Unix timestamp (seconds).
409
+ * Takes precedence over `ttl_seconds` when both are provided.
410
+ * The memory is hard-deleted by the decay engine on expiry (DECAY-3).
411
+ */
412
+ expires_at?: number;
407
413
  /** Associated session ID */
408
414
  session_id?: string;
409
415
  /** Pre-computed embedding */
@@ -1106,6 +1112,50 @@ interface AutoPilotTriggerResponse {
1106
1112
  consolidation?: AutoPilotConsolidationResult;
1107
1113
  message: string;
1108
1114
  }
1115
+ /** Response from GET /v1/admin/decay/config (DECAY-1) */
1116
+ interface DecayConfigResponse {
1117
+ /** Decay strategy: "exponential", "linear", or "step" */
1118
+ strategy: 'exponential' | 'linear' | 'step';
1119
+ /** Half-life in hours */
1120
+ half_life_hours: number;
1121
+ /** Minimum importance threshold; memories below are hard-deleted on next cycle */
1122
+ min_importance: number;
1123
+ }
1124
+ /** Request for PUT /v1/admin/decay/config (DECAY-1) */
1125
+ interface DecayConfigUpdateRequest {
1126
+ /** Decay strategy: "exponential", "linear", or "step" */
1127
+ strategy?: 'exponential' | 'linear' | 'step';
1128
+ /** Half-life in hours (must be > 0) */
1129
+ half_life_hours?: number;
1130
+ /** Minimum importance threshold 0.0–1.0 */
1131
+ min_importance?: number;
1132
+ }
1133
+ /** Response from PUT /v1/admin/decay/config (DECAY-1) */
1134
+ interface DecayConfigUpdateResponse {
1135
+ success: boolean;
1136
+ config: DecayConfigResponse;
1137
+ message: string;
1138
+ }
1139
+ /** Stats from a single decay cycle */
1140
+ interface LastDecayCycleStats {
1141
+ namespaces_processed: number;
1142
+ memories_processed: number;
1143
+ memories_decayed: number;
1144
+ memories_deleted: number;
1145
+ }
1146
+ /** Response from GET /v1/admin/decay/stats (DECAY-2) */
1147
+ interface DecayStatsResponse {
1148
+ /** Total memories whose importance was lowered by decay (all-time) */
1149
+ total_decayed: number;
1150
+ /** Total memories hard-deleted by decay or TTL expiry (all-time) */
1151
+ total_deleted: number;
1152
+ /** Unix timestamp of the last decay cycle (undefined if never run) */
1153
+ last_run_at?: number;
1154
+ /** Number of decay cycles completed since startup */
1155
+ cycles_run: number;
1156
+ /** Stats from the most recent decay cycle (undefined if never run) */
1157
+ last_cycle?: LastDecayCycleStats;
1158
+ }
1109
1159
  /** API key */
1110
1160
  interface ApiKey {
1111
1161
  id: string;
@@ -1355,21 +1405,29 @@ declare class DakeraClient {
1355
1405
  /**
1356
1406
  * Perform hybrid search combining vector and full-text.
1357
1407
  *
1408
+ * When `vector` is omitted the server falls back to BM25-only full-text
1409
+ * search. When provided, results are blended with vector similarity
1410
+ * according to `alpha`.
1411
+ *
1358
1412
  * @param namespace - Target namespace
1359
- * @param vector - Query vector
1360
1413
  * @param query - Text query
1361
- * @param options - Search options including alpha for balance
1414
+ * @param options - Search options: vector (optional), topK, alpha, filter
1362
1415
  * @returns Hybrid search results
1363
1416
  *
1364
1417
  * @example
1365
1418
  * ```typescript
1366
- * const results = await client.hybridSearch('my-namespace', [0.1, 0.2, 0.3], 'machine learning', {
1419
+ * // Hybrid (vector + text)
1420
+ * const results = await client.hybridSearch('my-namespace', 'machine learning', {
1421
+ * vector: [0.1, 0.2, 0.3],
1367
1422
  * topK: 10,
1368
1423
  * alpha: 0.7, // 70% text, 30% vector
1369
1424
  * });
1425
+ * // BM25-only (no vector)
1426
+ * const results = await client.hybridSearch('my-namespace', 'machine learning');
1370
1427
  * ```
1371
1428
  */
1372
- hybridSearch(namespace: string, vector: number[], query: string, options?: {
1429
+ hybridSearch(namespace: string, query: string, options?: {
1430
+ vector?: number[];
1373
1431
  topK?: number;
1374
1432
  alpha?: number;
1375
1433
  filter?: FilterExpression;
@@ -1876,6 +1934,16 @@ declare class DakeraClient {
1876
1934
  autopilotUpdateConfig(request: AutoPilotConfigRequest): Promise<AutoPilotConfigResponse>;
1877
1935
  /** Manually trigger an AutoPilot dedup or consolidation cycle (PILOT-3) */
1878
1936
  autopilotTrigger(action: AutoPilotTriggerAction): Promise<AutoPilotTriggerResponse>;
1937
+ /** Get current decay engine configuration (DECAY-1). Requires Admin scope. */
1938
+ decayConfig(): Promise<DecayConfigResponse>;
1939
+ /**
1940
+ * Update decay engine configuration at runtime (DECAY-1). Requires Admin scope.
1941
+ * Changes take effect on the next decay cycle — no restart required.
1942
+ * All fields are optional; omit any to keep its current value.
1943
+ */
1944
+ decayUpdateConfig(request: DecayConfigUpdateRequest): Promise<DecayConfigUpdateResponse>;
1945
+ /** Get decay activity counters and last-cycle snapshot (DECAY-2). Requires Admin scope. */
1946
+ decayStats(): Promise<DecayStatsResponse>;
1879
1947
  /** Create a new API key */
1880
1948
  createKey(request: CreateKeyRequest): Promise<ApiKey>;
1881
1949
  /** List all API keys */
@@ -2034,4 +2102,4 @@ declare class TimeoutError extends DakeraError {
2034
2102
  constructor(message: string);
2035
2103
  }
2036
2104
 
2037
- export { type AccessPatternHint, type AgentId, type AgentNetworkEdge, type AgentNetworkInfo, type AgentNetworkNode, type AgentNetworkStats, type AgentStats, type AgentSummary, type AggregationGroup, type AggregationRequest, type AggregationResponse, type AnalyticsOptions, type AnalyticsOverview, type ApiKey, AuthenticationError, AuthorizationError, type AutoPilotConfig, type AutoPilotConfigRequest, type AutoPilotConfigResponse, type AutoPilotConsolidationResult, type AutoPilotDedupResult, type AutoPilotStatusResponse, type AutoPilotTriggerAction, type AutoPilotTriggerResponse, type BackupInfo, type BatchForgetRequest, type BatchForgetResponse, type BatchMemoryFilter, type BatchQuerySpec, type BatchRecallRequest, type BatchRecallResponse, type BatchTextQueryOptions, type BatchTextQueryResponse, type Branded, type CacheStats, type ClientOptions, type ClusterNode, type ClusterStatus, type ColumnUpsertRequest, type ConfigureNamespaceRequest, type ConfigureNamespaceResponse, ConnectionError, type ConsolidateRequest, type ConsolidateResponse, type ConsolidationResultSnapshot, type CreateKeyRequest, type CrossAgentNetworkRequest, type CrossAgentNetworkResponse, DakeraClient, DakeraError, type DakeraEvent, type DedupResultSnapshot, type DeduplicateRequest, type DeduplicateResponse, type DeleteOptions, type DeleteResponse, type DistanceMetric, type Document, type DocumentInput, type EmbeddingModel, ErrorCode, type ExportRequest, type ExportResponse, type ExportedVector, type FilterExpression, type FilterOperators, type FullKnowledgeGraphRequest, type FullTextSearchResult, type HealthResponse, type HybridSearchResult, type IndexStats, type JobProgressEvent, type KeyUsage, type KnowledgeEdge, type KnowledgeGraphRequest, type KnowledgeGraphResponse, type KnowledgeNode, type LatencyAnalytics, type ListSessionsOptions, type Memory, type MemoryEvent, type MemoryFeedbackRequest, type MemoryFeedbackResponse, type MemoryId, type MemoryType, type MultiVectorSearchRequest, type MultiVectorSearchResponse, type MultiVectorSearchResult, type NamespaceCreatedEvent, type NamespaceDeletedEvent, type NamespaceInfo, NotFoundError, type OpStatus, type OperationProgressEvent, type QueryExplainRequest, type QueryExplainResponse, type QueryOptions, type QueryResult, RateLimitError, type RateLimitHeaders, type ReadConsistency, type RecallRequest, type RecalledMemory, type RetryConfig, type SearchResult, ServerError, type Session, type SessionId, type SlowQuery, type StalenessConfig, type StartSessionRequest, type StorageAnalytics, type StoreMemoryRequest, type StoreMemoryResponse, type StreamLaggedEvent, type SummarizeRequest, type SummarizeResponse, type TextDocument, type TextQueryOptions, type TextQueryResponse, type TextSearchResult, type TextUpsertOptions, type TextUpsertResponse, type ThroughputAnalytics, TimeoutError, type TtlConfig, type UnifiedQueryRequest, type UnifiedQueryResponse, type UnifiedSearchResult, type UpdateImportanceRequest, type UpdateMemoryRequest, type UpsertOptions, type UpsertResponse, ValidationError, type Vector, type VectorId, type VectorInput, type VectorMutationOp, type VectorsMutatedEvent, type WarmCacheRequest, type WarmCacheResponse, type WarmingPriority, type WarmingTargetTier, agentId, memoryId, sessionId, vectorId };
2105
+ export { type AccessPatternHint, type AgentId, type AgentNetworkEdge, type AgentNetworkInfo, type AgentNetworkNode, type AgentNetworkStats, type AgentStats, type AgentSummary, type AggregationGroup, type AggregationRequest, type AggregationResponse, type AnalyticsOptions, type AnalyticsOverview, type ApiKey, AuthenticationError, AuthorizationError, type AutoPilotConfig, type AutoPilotConfigRequest, type AutoPilotConfigResponse, type AutoPilotConsolidationResult, type AutoPilotDedupResult, type AutoPilotStatusResponse, type AutoPilotTriggerAction, type AutoPilotTriggerResponse, type BackupInfo, type BatchForgetRequest, type BatchForgetResponse, type BatchMemoryFilter, type BatchQuerySpec, type BatchRecallRequest, type BatchRecallResponse, type BatchTextQueryOptions, type BatchTextQueryResponse, type Branded, type CacheStats, type ClientOptions, type ClusterNode, type ClusterStatus, type ColumnUpsertRequest, type ConfigureNamespaceRequest, type ConfigureNamespaceResponse, ConnectionError, type ConsolidateRequest, type ConsolidateResponse, type ConsolidationResultSnapshot, type CreateKeyRequest, type CrossAgentNetworkRequest, type CrossAgentNetworkResponse, DakeraClient, DakeraError, type DakeraEvent, type DecayConfigResponse, type DecayConfigUpdateRequest, type DecayConfigUpdateResponse, type DecayStatsResponse, type DedupResultSnapshot, type DeduplicateRequest, type DeduplicateResponse, type DeleteOptions, type DeleteResponse, type DistanceMetric, type Document, type DocumentInput, type EmbeddingModel, ErrorCode, type ExportRequest, type ExportResponse, type ExportedVector, type FilterExpression, type FilterOperators, type FullKnowledgeGraphRequest, type FullTextSearchResult, type HealthResponse, type HybridSearchResult, type IndexStats, type JobProgressEvent, type KeyUsage, type KnowledgeEdge, type KnowledgeGraphRequest, type KnowledgeGraphResponse, type KnowledgeNode, type LastDecayCycleStats, type LatencyAnalytics, type ListSessionsOptions, type Memory, type MemoryEvent, type MemoryFeedbackRequest, type MemoryFeedbackResponse, type MemoryId, type MemoryType, type MultiVectorSearchRequest, type MultiVectorSearchResponse, type MultiVectorSearchResult, type NamespaceCreatedEvent, type NamespaceDeletedEvent, type NamespaceInfo, NotFoundError, type OpStatus, type OperationProgressEvent, type QueryExplainRequest, type QueryExplainResponse, type QueryOptions, type QueryResult, RateLimitError, type RateLimitHeaders, type ReadConsistency, type RecallRequest, type RecalledMemory, type RetryConfig, type SearchResult, ServerError, type Session, type SessionId, type SlowQuery, type StalenessConfig, type StartSessionRequest, type StorageAnalytics, type StoreMemoryRequest, type StoreMemoryResponse, type StreamLaggedEvent, type SummarizeRequest, type SummarizeResponse, type TextDocument, type TextQueryOptions, type TextQueryResponse, type TextSearchResult, type TextUpsertOptions, type TextUpsertResponse, type ThroughputAnalytics, TimeoutError, type TtlConfig, type UnifiedQueryRequest, type UnifiedQueryResponse, type UnifiedSearchResult, type UpdateImportanceRequest, type UpdateMemoryRequest, type UpsertOptions, type UpsertResponse, ValidationError, type Vector, type VectorId, type VectorInput, type VectorMutationOp, type VectorsMutatedEvent, type WarmCacheRequest, type WarmCacheResponse, type WarmingPriority, type WarmingTargetTier, agentId, memoryId, sessionId, vectorId };
package/dist/index.js CHANGED
@@ -500,28 +500,39 @@ var DakeraClient = class {
500
500
  /**
501
501
  * Perform hybrid search combining vector and full-text.
502
502
  *
503
+ * When `vector` is omitted the server falls back to BM25-only full-text
504
+ * search. When provided, results are blended with vector similarity
505
+ * according to `alpha`.
506
+ *
503
507
  * @param namespace - Target namespace
504
- * @param vector - Query vector
505
508
  * @param query - Text query
506
- * @param options - Search options including alpha for balance
509
+ * @param options - Search options: vector (optional), topK, alpha, filter
507
510
  * @returns Hybrid search results
508
511
  *
509
512
  * @example
510
513
  * ```typescript
511
- * const results = await client.hybridSearch('my-namespace', [0.1, 0.2, 0.3], 'machine learning', {
514
+ * // Hybrid (vector + text)
515
+ * const results = await client.hybridSearch('my-namespace', 'machine learning', {
516
+ * vector: [0.1, 0.2, 0.3],
512
517
  * topK: 10,
513
518
  * alpha: 0.7, // 70% text, 30% vector
514
519
  * });
520
+ * // BM25-only (no vector)
521
+ * const results = await client.hybridSearch('my-namespace', 'machine learning');
515
522
  * ```
516
523
  */
517
- async hybridSearch(namespace, vector, query, options = {}) {
524
+ async hybridSearch(namespace, query, options = {}) {
518
525
  const body = {
519
- vector,
520
526
  query,
521
527
  top_k: options.topK ?? 10,
522
- alpha: options.alpha ?? 0.5,
523
- filter: options.filter
528
+ alpha: options.alpha ?? 0.5
524
529
  };
530
+ if (options.vector != null) {
531
+ body["vector"] = options.vector;
532
+ }
533
+ if (options.filter !== void 0) {
534
+ body["filter"] = options.filter;
535
+ }
525
536
  const response = await this.request(
526
537
  "POST",
527
538
  `/v1/namespaces/${namespace}/fulltext/hybrid`,
@@ -1345,6 +1356,22 @@ var DakeraClient = class {
1345
1356
  async autopilotTrigger(action) {
1346
1357
  return this.request("POST", "/v1/admin/autopilot/trigger", { action });
1347
1358
  }
1359
+ /** Get current decay engine configuration (DECAY-1). Requires Admin scope. */
1360
+ async decayConfig() {
1361
+ return this.request("GET", "/v1/admin/decay/config");
1362
+ }
1363
+ /**
1364
+ * Update decay engine configuration at runtime (DECAY-1). Requires Admin scope.
1365
+ * Changes take effect on the next decay cycle — no restart required.
1366
+ * All fields are optional; omit any to keep its current value.
1367
+ */
1368
+ async decayUpdateConfig(request) {
1369
+ return this.request("PUT", "/v1/admin/decay/config", request);
1370
+ }
1371
+ /** Get decay activity counters and last-cycle snapshot (DECAY-2). Requires Admin scope. */
1372
+ async decayStats() {
1373
+ return this.request("GET", "/v1/admin/decay/stats");
1374
+ }
1348
1375
  // ===========================================================================
1349
1376
  // API Key Operations
1350
1377
  // ===========================================================================
package/dist/index.mjs CHANGED
@@ -460,28 +460,39 @@ var DakeraClient = class {
460
460
  /**
461
461
  * Perform hybrid search combining vector and full-text.
462
462
  *
463
+ * When `vector` is omitted the server falls back to BM25-only full-text
464
+ * search. When provided, results are blended with vector similarity
465
+ * according to `alpha`.
466
+ *
463
467
  * @param namespace - Target namespace
464
- * @param vector - Query vector
465
468
  * @param query - Text query
466
- * @param options - Search options including alpha for balance
469
+ * @param options - Search options: vector (optional), topK, alpha, filter
467
470
  * @returns Hybrid search results
468
471
  *
469
472
  * @example
470
473
  * ```typescript
471
- * const results = await client.hybridSearch('my-namespace', [0.1, 0.2, 0.3], 'machine learning', {
474
+ * // Hybrid (vector + text)
475
+ * const results = await client.hybridSearch('my-namespace', 'machine learning', {
476
+ * vector: [0.1, 0.2, 0.3],
472
477
  * topK: 10,
473
478
  * alpha: 0.7, // 70% text, 30% vector
474
479
  * });
480
+ * // BM25-only (no vector)
481
+ * const results = await client.hybridSearch('my-namespace', 'machine learning');
475
482
  * ```
476
483
  */
477
- async hybridSearch(namespace, vector, query, options = {}) {
484
+ async hybridSearch(namespace, query, options = {}) {
478
485
  const body = {
479
- vector,
480
486
  query,
481
487
  top_k: options.topK ?? 10,
482
- alpha: options.alpha ?? 0.5,
483
- filter: options.filter
488
+ alpha: options.alpha ?? 0.5
484
489
  };
490
+ if (options.vector != null) {
491
+ body["vector"] = options.vector;
492
+ }
493
+ if (options.filter !== void 0) {
494
+ body["filter"] = options.filter;
495
+ }
485
496
  const response = await this.request(
486
497
  "POST",
487
498
  `/v1/namespaces/${namespace}/fulltext/hybrid`,
@@ -1305,6 +1316,22 @@ var DakeraClient = class {
1305
1316
  async autopilotTrigger(action) {
1306
1317
  return this.request("POST", "/v1/admin/autopilot/trigger", { action });
1307
1318
  }
1319
+ /** Get current decay engine configuration (DECAY-1). Requires Admin scope. */
1320
+ async decayConfig() {
1321
+ return this.request("GET", "/v1/admin/decay/config");
1322
+ }
1323
+ /**
1324
+ * Update decay engine configuration at runtime (DECAY-1). Requires Admin scope.
1325
+ * Changes take effect on the next decay cycle — no restart required.
1326
+ * All fields are optional; omit any to keep its current value.
1327
+ */
1328
+ async decayUpdateConfig(request) {
1329
+ return this.request("PUT", "/v1/admin/decay/config", request);
1330
+ }
1331
+ /** Get decay activity counters and last-cycle snapshot (DECAY-2). Requires Admin scope. */
1332
+ async decayStats() {
1333
+ return this.request("GET", "/v1/admin/decay/stats");
1334
+ }
1308
1335
  // ===========================================================================
1309
1336
  // API Key Operations
1310
1337
  // ===========================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dakera-ai/dakera",
3
- "version": "0.7.2",
3
+ "version": "0.8.0",
4
4
  "description": "TypeScript/JavaScript SDK for Dakera AI memory platform",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -57,4 +57,3 @@
57
57
  "vitest": "^4.1.0"
58
58
  }
59
59
  }
60
-