@sowonai/crewx-cli 0.8.0-rc.1 → 0.8.0-rc.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.
@@ -1,102 +0,0 @@
1
- import { OnModuleDestroy } from '@nestjs/common';
2
- export declare enum MemoryType {
3
- FACT = "fact",
4
- PREFERENCE = "preference",
5
- CONTEXT = "context",
6
- SUMMARY = "summary",
7
- TASK = "task",
8
- CUSTOM = "custom"
9
- }
10
- export interface MemoryEntry {
11
- id: string;
12
- type: MemoryType;
13
- agentId?: string;
14
- sessionId?: string;
15
- content: string;
16
- embedding?: number[];
17
- metadata?: Record<string, unknown>;
18
- tags?: string[];
19
- importance?: number;
20
- createdAt: number;
21
- updatedAt: number;
22
- expiresAt?: number;
23
- }
24
- export interface MemoryQueryOptions {
25
- type?: MemoryType;
26
- agentId?: string;
27
- sessionId?: string;
28
- tags?: string[];
29
- search?: string;
30
- createdAtFrom?: number;
31
- createdAtTo?: number;
32
- minImportance?: number;
33
- limit?: number;
34
- offset?: number;
35
- orderBy?: 'createdAt' | 'updatedAt' | 'importance';
36
- orderDir?: 'asc' | 'desc';
37
- }
38
- export interface CreateMemoryInput {
39
- type: MemoryType;
40
- content: string;
41
- agentId?: string;
42
- sessionId?: string;
43
- metadata?: Record<string, unknown>;
44
- tags?: string[];
45
- importance?: number;
46
- expiresAt?: number;
47
- }
48
- export interface UpdateMemoryInput {
49
- content?: string;
50
- metadata?: Record<string, unknown>;
51
- tags?: string[];
52
- importance?: number;
53
- expiresAt?: number | null;
54
- }
55
- export interface MemorySearchResult extends MemoryEntry {
56
- score: number;
57
- highlights?: string[];
58
- }
59
- export declare class MemoryService implements OnModuleDestroy {
60
- private readonly logger;
61
- private db;
62
- private initialized;
63
- private readonly dbPath;
64
- constructor();
65
- private ensureInitialized;
66
- private loadBetterSqlite3;
67
- private createTables;
68
- private generateId;
69
- create(input: CreateMemoryInput): Promise<MemoryEntry | null>;
70
- get(id: string): Promise<MemoryEntry | null>;
71
- update(id: string, input: UpdateMemoryInput): Promise<MemoryEntry | null>;
72
- delete(id: string): Promise<boolean>;
73
- query(options?: MemoryQueryOptions): Promise<MemoryEntry[]>;
74
- search(query: string, options?: Omit<MemoryQueryOptions, 'search'>): Promise<MemorySearchResult[]>;
75
- getByTags(tags: string[], options?: {
76
- matchAll?: boolean;
77
- }): Promise<MemoryEntry[]>;
78
- getAllTags(): Promise<string[]>;
79
- deleteExpired(): Promise<number>;
80
- getStats(options?: {
81
- agentId?: string;
82
- }): Promise<{
83
- total: number;
84
- byType: Record<MemoryType, number>;
85
- tagCount: number;
86
- avgImportance: number;
87
- }>;
88
- consolidate(options: {
89
- agentId: string;
90
- windowDays?: number;
91
- maxEntriesPerMonth?: number;
92
- }): Promise<{
93
- months: number;
94
- summarized: number;
95
- deleted: number;
96
- summaryIds: string[];
97
- }>;
98
- bulkCreate(inputs: CreateMemoryInput[]): Promise<MemoryEntry[]>;
99
- private rowToMemory;
100
- isAvailable(): Promise<boolean>;
101
- onModuleDestroy(): void;
102
- }