sigma-memory 0.2.1 → 0.2.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/src/types.ts CHANGED
@@ -1,98 +1,98 @@
1
1
  export interface MemoryConfig {
2
- memoryDir: string; // ~/.phi/memory/
3
- projectMemoryDir: string; // .phi/memory/ (in the current project)
4
- ontologyPath: string; // ~/.phi/memory/ontology/graph.jsonl
2
+ memoryDir: string; // ~/.phi/memory/
3
+ projectMemoryDir: string; // .phi/memory/ (in the current project)
4
+ ontologyPath: string; // ~/.phi/memory/ontology/graph.jsonl
5
5
  }
6
6
 
7
7
  export interface SearchResult {
8
- file: string;
9
- line: number;
10
- content: string;
11
- score: number;
8
+ file: string;
9
+ line: number;
10
+ content: string;
11
+ score: number;
12
12
  }
13
13
 
14
14
  export interface VectorSearchResult {
15
- file: string;
16
- chunkIndex: number;
17
- content: string;
18
- score: number; // cosine similarity 0-1
15
+ file: string;
16
+ chunkIndex: number;
17
+ content: string;
18
+ score: number; // cosine similarity 0-1
19
19
  }
20
20
 
21
21
  export interface OntologyEntity {
22
- id: string;
23
- type: 'Person' | 'Project' | 'Device' | 'Account' | 'Document' | 'Service' | 'Concept';
24
- name: string;
25
- properties: Record<string, string>;
26
- createdAt: string;
27
- updatedAt: string;
22
+ id: string;
23
+ type: "Person" | "Project" | "Device" | "Account" | "Document" | "Service" | "Concept";
24
+ name: string;
25
+ properties: Record<string, string>;
26
+ createdAt: string;
27
+ updatedAt: string;
28
28
  }
29
29
 
30
30
  export interface OntologyRelation {
31
- id: string;
32
- from: string; // entity ID
33
- to: string; // entity ID
34
- type: string; // 'owns' | 'uses' | 'deploys' | 'manages' | 'depends_on' | etc.
35
- properties: Record<string, string>;
36
- createdAt: string;
31
+ id: string;
32
+ from: string; // entity ID
33
+ to: string; // entity ID
34
+ type: string; // 'owns' | 'uses' | 'deploys' | 'manages' | 'depends_on' | etc.
35
+ properties: Record<string, string>;
36
+ createdAt: string;
37
37
  }
38
38
 
39
39
  export interface Note {
40
- file: string;
41
- date: string;
42
- content: string;
40
+ file: string;
41
+ date: string;
42
+ content: string;
43
43
  }
44
44
 
45
45
  export interface UnifiedSearchResult {
46
- source: 'notes' | 'ontology' | 'vectors';
47
- type?: 'entity' | 'relation' | 'note' | 'file';
48
- score: number;
49
- data: any;
46
+ source: "notes" | "ontology" | "vectors";
47
+ type?: "entity" | "relation" | "note" | "file";
48
+ score: number;
49
+ data: any;
50
50
  }
51
51
 
52
52
  export interface MemoryStatus {
53
- notes: {
54
- count: number;
55
- totalSize: number;
56
- lastModified: string | null;
57
- };
58
- ontology: {
59
- entities: number;
60
- relations: number;
61
- entitiesByType: Record<string, number>;
62
- relationsByType: Record<string, number>;
63
- };
64
- vectors: {
65
- documentCount: number;
66
- chunkCount: number;
67
- lastUpdate: string;
68
- };
53
+ notes: {
54
+ count: number;
55
+ totalSize: number;
56
+ lastModified: string | null;
57
+ };
58
+ ontology: {
59
+ entities: number;
60
+ relations: number;
61
+ entitiesByType: Record<string, number>;
62
+ relationsByType: Record<string, number>;
63
+ };
64
+ vectors: {
65
+ documentCount: number;
66
+ chunkCount: number;
67
+ lastUpdate: string;
68
+ };
69
69
  }
70
70
 
71
71
  // Types for ontology JSONL entries
72
72
  export interface OntologyEntityEntry {
73
- kind: 'entity';
74
- id: string;
75
- type: 'Person' | 'Project' | 'Device' | 'Account' | 'Document' | 'Service' | 'Concept';
76
- name: string;
77
- properties: Record<string, string>;
78
- createdAt: string;
79
- updatedAt: string;
73
+ kind: "entity";
74
+ id: string;
75
+ type: "Person" | "Project" | "Device" | "Account" | "Document" | "Service" | "Concept";
76
+ name: string;
77
+ properties: Record<string, string>;
78
+ createdAt: string;
79
+ updatedAt: string;
80
80
  }
81
81
 
82
82
  export interface OntologyRelationEntry {
83
- kind: 'relation';
84
- id: string;
85
- from: string;
86
- to: string;
87
- type: string;
88
- properties: Record<string, string>;
89
- createdAt: string;
83
+ kind: "relation";
84
+ id: string;
85
+ from: string;
86
+ to: string;
87
+ type: string;
88
+ properties: Record<string, string>;
89
+ createdAt: string;
90
90
  }
91
91
 
92
92
  export interface OntologyDeleteEntry {
93
- kind: 'delete';
94
- targetId: string;
95
- deletedAt: string;
93
+ kind: "delete";
94
+ targetId: string;
95
+ deletedAt: string;
96
96
  }
97
97
 
98
98
  export type OntologyJSONLEntry = OntologyEntityEntry | OntologyRelationEntry | OntologyDeleteEntry;