@kybernesis/brain-contracts 0.1.5 → 0.2.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/entity.d.ts +135 -135
- package/dist/entity.d.ts.map +1 -1
- package/dist/entity.js +66 -43
- package/dist/entity.js.map +1 -1
- package/dist/fact.d.ts +94 -94
- package/dist/fact.d.ts.map +1 -1
- package/dist/fact.js +17 -15
- package/dist/fact.js.map +1 -1
- package/dist/sleep.d.ts +77 -77
- package/dist/sleep.d.ts.map +1 -1
- package/dist/sleep.js +27 -25
- package/dist/sleep.js.map +1 -1
- package/dist/timeline.d.ts +76 -76
- package/dist/timeline.d.ts.map +1 -1
- package/dist/timeline.js +12 -10
- package/dist/timeline.js.map +1 -1
- package/package.json +1 -1
package/dist/fact.d.ts
CHANGED
|
@@ -2,147 +2,147 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const FactSchema: z.ZodObject<{
|
|
3
3
|
id: z.ZodNumber;
|
|
4
4
|
content: z.ZodString;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
source_path: z.ZodString;
|
|
6
|
+
source_conversation_id: z.ZodString;
|
|
7
7
|
entities: z.ZodArray<z.ZodString, "many">;
|
|
8
8
|
timestamp: z.ZodString;
|
|
9
9
|
confidence: z.ZodNumber;
|
|
10
10
|
category: z.ZodEnum<["biographical", "preference", "event", "relationship", "temporal", "opinion", "plan", "general"]>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
created_at: z.ZodString;
|
|
12
|
+
is_latest: z.ZodBoolean;
|
|
13
|
+
superseded_by: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
15
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
16
|
+
access_count: z.ZodNumber;
|
|
17
|
+
source_type: z.ZodString;
|
|
18
|
+
is_retracted: z.ZodBoolean;
|
|
19
|
+
retracted_by: z.ZodOptional<z.ZodString>;
|
|
20
|
+
last_reinforced_at: z.ZodOptional<z.ZodString>;
|
|
21
|
+
project_id: z.ZodOptional<z.ZodString>;
|
|
22
22
|
tags: z.ZodArray<z.ZodString, "many">;
|
|
23
23
|
classification: z.ZodOptional<z.ZodString>;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
connection_id: z.ZodOptional<z.ZodString>;
|
|
25
|
+
source_did: z.ZodOptional<z.ZodString>;
|
|
26
26
|
}, "strip", z.ZodTypeAny, {
|
|
27
27
|
id: number;
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
access_count: number;
|
|
29
|
+
source_path: string;
|
|
30
30
|
timestamp: string;
|
|
31
|
-
|
|
31
|
+
source_type: string;
|
|
32
32
|
confidence: number;
|
|
33
|
-
|
|
33
|
+
created_at: string;
|
|
34
34
|
content: string;
|
|
35
|
-
|
|
35
|
+
source_conversation_id: string;
|
|
36
36
|
entities: string[];
|
|
37
|
-
category: "
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
category: "relationship" | "biographical" | "preference" | "event" | "temporal" | "opinion" | "plan" | "general";
|
|
38
|
+
is_latest: boolean;
|
|
39
|
+
is_retracted: boolean;
|
|
40
40
|
tags: string[];
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
expires_at?: string | undefined;
|
|
42
|
+
superseded_by?: number | undefined;
|
|
43
|
+
updated_at?: string | undefined;
|
|
44
|
+
retracted_by?: string | undefined;
|
|
45
|
+
last_reinforced_at?: string | undefined;
|
|
46
|
+
project_id?: string | undefined;
|
|
47
47
|
classification?: string | undefined;
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
connection_id?: string | undefined;
|
|
49
|
+
source_did?: string | undefined;
|
|
50
50
|
}, {
|
|
51
51
|
id: number;
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
access_count: number;
|
|
53
|
+
source_path: string;
|
|
54
54
|
timestamp: string;
|
|
55
|
-
|
|
55
|
+
source_type: string;
|
|
56
56
|
confidence: number;
|
|
57
|
-
|
|
57
|
+
created_at: string;
|
|
58
58
|
content: string;
|
|
59
|
-
|
|
59
|
+
source_conversation_id: string;
|
|
60
60
|
entities: string[];
|
|
61
|
-
category: "
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
category: "relationship" | "biographical" | "preference" | "event" | "temporal" | "opinion" | "plan" | "general";
|
|
62
|
+
is_latest: boolean;
|
|
63
|
+
is_retracted: boolean;
|
|
64
64
|
tags: string[];
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
expires_at?: string | undefined;
|
|
66
|
+
superseded_by?: number | undefined;
|
|
67
|
+
updated_at?: string | undefined;
|
|
68
|
+
retracted_by?: string | undefined;
|
|
69
|
+
last_reinforced_at?: string | undefined;
|
|
70
|
+
project_id?: string | undefined;
|
|
71
71
|
classification?: string | undefined;
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
connection_id?: string | undefined;
|
|
73
|
+
source_did?: string | undefined;
|
|
74
74
|
}>;
|
|
75
75
|
export type Fact = z.infer<typeof FactSchema>;
|
|
76
76
|
export declare const FactInputSchema: z.ZodObject<Omit<{
|
|
77
77
|
id: z.ZodNumber;
|
|
78
78
|
content: z.ZodString;
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
source_path: z.ZodString;
|
|
80
|
+
source_conversation_id: z.ZodString;
|
|
81
81
|
entities: z.ZodArray<z.ZodString, "many">;
|
|
82
82
|
timestamp: z.ZodString;
|
|
83
83
|
confidence: z.ZodNumber;
|
|
84
84
|
category: z.ZodEnum<["biographical", "preference", "event", "relationship", "temporal", "opinion", "plan", "general"]>;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
85
|
+
created_at: z.ZodString;
|
|
86
|
+
is_latest: z.ZodBoolean;
|
|
87
|
+
superseded_by: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
expires_at: z.ZodOptional<z.ZodString>;
|
|
89
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
90
|
+
access_count: z.ZodNumber;
|
|
91
|
+
source_type: z.ZodString;
|
|
92
|
+
is_retracted: z.ZodBoolean;
|
|
93
|
+
retracted_by: z.ZodOptional<z.ZodString>;
|
|
94
|
+
last_reinforced_at: z.ZodOptional<z.ZodString>;
|
|
95
|
+
project_id: z.ZodOptional<z.ZodString>;
|
|
96
96
|
tags: z.ZodArray<z.ZodString, "many">;
|
|
97
97
|
classification: z.ZodOptional<z.ZodString>;
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
connection_id: z.ZodOptional<z.ZodString>;
|
|
99
|
+
source_did: z.ZodOptional<z.ZodString>;
|
|
100
100
|
}, "id">, "strip", z.ZodTypeAny, {
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
access_count: number;
|
|
102
|
+
source_path: string;
|
|
103
103
|
timestamp: string;
|
|
104
|
-
|
|
104
|
+
source_type: string;
|
|
105
105
|
confidence: number;
|
|
106
|
-
|
|
106
|
+
created_at: string;
|
|
107
107
|
content: string;
|
|
108
|
-
|
|
108
|
+
source_conversation_id: string;
|
|
109
109
|
entities: string[];
|
|
110
|
-
category: "
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
category: "relationship" | "biographical" | "preference" | "event" | "temporal" | "opinion" | "plan" | "general";
|
|
111
|
+
is_latest: boolean;
|
|
112
|
+
is_retracted: boolean;
|
|
113
113
|
tags: string[];
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
expires_at?: string | undefined;
|
|
115
|
+
superseded_by?: number | undefined;
|
|
116
|
+
updated_at?: string | undefined;
|
|
117
|
+
retracted_by?: string | undefined;
|
|
118
|
+
last_reinforced_at?: string | undefined;
|
|
119
|
+
project_id?: string | undefined;
|
|
120
120
|
classification?: string | undefined;
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
connection_id?: string | undefined;
|
|
122
|
+
source_did?: string | undefined;
|
|
123
123
|
}, {
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
access_count: number;
|
|
125
|
+
source_path: string;
|
|
126
126
|
timestamp: string;
|
|
127
|
-
|
|
127
|
+
source_type: string;
|
|
128
128
|
confidence: number;
|
|
129
|
-
|
|
129
|
+
created_at: string;
|
|
130
130
|
content: string;
|
|
131
|
-
|
|
131
|
+
source_conversation_id: string;
|
|
132
132
|
entities: string[];
|
|
133
|
-
category: "
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
category: "relationship" | "biographical" | "preference" | "event" | "temporal" | "opinion" | "plan" | "general";
|
|
134
|
+
is_latest: boolean;
|
|
135
|
+
is_retracted: boolean;
|
|
136
136
|
tags: string[];
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
137
|
+
expires_at?: string | undefined;
|
|
138
|
+
superseded_by?: number | undefined;
|
|
139
|
+
updated_at?: string | undefined;
|
|
140
|
+
retracted_by?: string | undefined;
|
|
141
|
+
last_reinforced_at?: string | undefined;
|
|
142
|
+
project_id?: string | undefined;
|
|
143
143
|
classification?: string | undefined;
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
connection_id?: string | undefined;
|
|
145
|
+
source_did?: string | undefined;
|
|
146
146
|
}>;
|
|
147
147
|
export type FactInput = z.infer<typeof FactInputSchema>;
|
|
148
148
|
//# sourceMappingURL=fact.d.ts.map
|
package/dist/fact.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fact.d.ts","sourceRoot":"","sources":["../src/fact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"fact.d.ts","sourceRoot":"","sources":["../src/fact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBrB,CAAC;AACH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAG9C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgC,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/fact.js
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { FactCategorySchema } from './constants.js';
|
|
3
|
+
// Field names are snake_case to match KAD's canonical brain object interfaces.
|
|
4
|
+
// This is deliberate and load-bearing — see the header note in `entity.ts`.
|
|
3
5
|
// Maps to facts table in timeline.db.
|
|
4
6
|
export const FactSchema = z.object({
|
|
5
7
|
id: z.number().int(),
|
|
6
8
|
content: z.string(),
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
source_path: z.string(), // UNIQUE
|
|
10
|
+
source_conversation_id: z.string(),
|
|
9
11
|
entities: z.array(z.string()), // stored as entities_json
|
|
10
12
|
timestamp: z.string(),
|
|
11
13
|
confidence: z.number(),
|
|
12
14
|
category: FactCategorySchema,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
created_at: z.string(),
|
|
16
|
+
is_latest: z.boolean(),
|
|
17
|
+
superseded_by: z.number().int().optional(),
|
|
18
|
+
expires_at: z.string().optional(),
|
|
19
|
+
updated_at: z.string().optional(),
|
|
20
|
+
access_count: z.number().int(),
|
|
21
|
+
source_type: z.string(), // 'chat' | 'user-direct' | 'heartbeat' | etc.
|
|
22
|
+
is_retracted: z.boolean(),
|
|
23
|
+
retracted_by: z.string().optional(),
|
|
24
|
+
last_reinforced_at: z.string().optional(),
|
|
23
25
|
// 4 flat scope columns
|
|
24
|
-
|
|
26
|
+
project_id: z.string().optional(),
|
|
25
27
|
tags: z.array(z.string()), // stored as tags_json
|
|
26
28
|
classification: z.string().optional(),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
connection_id: z.string().optional(),
|
|
30
|
+
source_did: z.string().optional(),
|
|
29
31
|
});
|
|
30
32
|
// Input shape for storeFact — id assigned by DB.
|
|
31
33
|
export const FactInputSchema = FactSchema.omit({ id: true });
|
package/dist/fact.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fact.js","sourceRoot":"","sources":["../src/fact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,sCAAsC;AACtC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,
|
|
1
|
+
{"version":3,"file":"fact.js","sourceRoot":"","sources":["../src/fact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD,+EAA+E;AAC/E,4EAA4E;AAE5E,sCAAsC;AACtC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,EAAS,SAAS;IACzC,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE;IAClC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,0BAA0B;IACzD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,kBAAkB;IAC5B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC1C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC9B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,EAAS,8CAA8C;IAC9E,YAAY,EAAE,CAAC,CAAC,OAAO,EAAE;IACzB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACzC,uBAAuB;IACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAM,sBAAsB;IACrD,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACrC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAC;AAGH,iDAAiD;AACjD,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC"}
|
package/dist/sleep.d.ts
CHANGED
|
@@ -1,155 +1,155 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const SleepRunSchema: z.ZodObject<{
|
|
3
3
|
id: z.ZodNumber;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
started_at: z.ZodString;
|
|
5
|
+
completed_at: z.ZodOptional<z.ZodString>;
|
|
6
6
|
status: z.ZodEnum<["running", "completed", "failed", "paused"]>;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
checkpoint_step: z.ZodOptional<z.ZodString>;
|
|
8
|
+
checkpoint_data: z.ZodOptional<z.ZodString>;
|
|
9
9
|
metrics: z.ZodOptional<z.ZodString>;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
error_message: z.ZodOptional<z.ZodString>;
|
|
11
|
+
created_at: z.ZodString;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
status: "running" | "completed" | "failed" | "paused";
|
|
14
13
|
id: number;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
status: "running" | "completed" | "failed" | "paused";
|
|
15
|
+
created_at: string;
|
|
16
|
+
started_at: string;
|
|
17
|
+
completed_at?: string | undefined;
|
|
18
|
+
checkpoint_step?: string | undefined;
|
|
19
|
+
checkpoint_data?: string | undefined;
|
|
20
20
|
metrics?: string | undefined;
|
|
21
|
-
|
|
21
|
+
error_message?: string | undefined;
|
|
22
22
|
}, {
|
|
23
|
-
status: "running" | "completed" | "failed" | "paused";
|
|
24
23
|
id: number;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
status: "running" | "completed" | "failed" | "paused";
|
|
25
|
+
created_at: string;
|
|
26
|
+
started_at: string;
|
|
27
|
+
completed_at?: string | undefined;
|
|
28
|
+
checkpoint_step?: string | undefined;
|
|
29
|
+
checkpoint_data?: string | undefined;
|
|
30
30
|
metrics?: string | undefined;
|
|
31
|
-
|
|
31
|
+
error_message?: string | undefined;
|
|
32
32
|
}>;
|
|
33
33
|
export type SleepRun = z.infer<typeof SleepRunSchema>;
|
|
34
34
|
export declare const MemoryEdgeSchema: z.ZodObject<{
|
|
35
35
|
id: z.ZodNumber;
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
from_path: z.ZodString;
|
|
37
|
+
to_path: z.ZodString;
|
|
38
38
|
relation: z.ZodEnum<["related", "continuation", "referenced", "same_topic", "same_person"]>;
|
|
39
39
|
weight: z.ZodNumber;
|
|
40
40
|
confidence: z.ZodNumber;
|
|
41
|
-
|
|
41
|
+
shared_tags: z.ZodOptional<z.ZodString>;
|
|
42
42
|
rationale: z.ZodOptional<z.ZodString>;
|
|
43
43
|
method: z.ZodEnum<["sleep-agent", "manual", "co-occurred", "ai-suggested"]>;
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
created_at: z.ZodString;
|
|
45
|
+
last_verified: z.ZodOptional<z.ZodString>;
|
|
46
46
|
}, "strip", z.ZodTypeAny, {
|
|
47
47
|
id: number;
|
|
48
48
|
confidence: number;
|
|
49
49
|
method: "co-occurred" | "sleep-agent" | "manual" | "ai-suggested";
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
created_at: string;
|
|
51
|
+
from_path: string;
|
|
52
|
+
to_path: string;
|
|
53
53
|
relation: "related" | "continuation" | "referenced" | "same_topic" | "same_person";
|
|
54
54
|
weight: number;
|
|
55
55
|
rationale?: string | undefined;
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
last_verified?: string | undefined;
|
|
57
|
+
shared_tags?: string | undefined;
|
|
58
58
|
}, {
|
|
59
59
|
id: number;
|
|
60
60
|
confidence: number;
|
|
61
61
|
method: "co-occurred" | "sleep-agent" | "manual" | "ai-suggested";
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
created_at: string;
|
|
63
|
+
from_path: string;
|
|
64
|
+
to_path: string;
|
|
65
65
|
relation: "related" | "continuation" | "referenced" | "same_topic" | "same_person";
|
|
66
66
|
weight: number;
|
|
67
67
|
rationale?: string | undefined;
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
last_verified?: string | undefined;
|
|
69
|
+
shared_tags?: string | undefined;
|
|
70
70
|
}>;
|
|
71
71
|
export type MemoryEdge = z.infer<typeof MemoryEdgeSchema>;
|
|
72
72
|
export declare const MaintenanceItemTypeSchema: z.ZodEnum<["timeline", "entity", "file"]>;
|
|
73
73
|
export type MaintenanceItemType = z.infer<typeof MaintenanceItemTypeSchema>;
|
|
74
74
|
export declare const MaintenanceQueueItemSchema: z.ZodObject<{
|
|
75
75
|
id: z.ZodNumber;
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
item_type: z.ZodEnum<["timeline", "entity", "file"]>;
|
|
77
|
+
item_id: z.ZodString;
|
|
78
78
|
task: z.ZodString;
|
|
79
79
|
priority: z.ZodNumber;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
created_at: z.ZodString;
|
|
81
|
+
processed_at: z.ZodOptional<z.ZodString>;
|
|
82
|
+
error_message: z.ZodOptional<z.ZodString>;
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
84
|
id: number;
|
|
85
85
|
priority: number;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
created_at: string;
|
|
87
|
+
item_type: "file" | "timeline" | "entity";
|
|
88
|
+
item_id: string;
|
|
89
89
|
task: string;
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
error_message?: string | undefined;
|
|
91
|
+
processed_at?: string | undefined;
|
|
92
92
|
}, {
|
|
93
93
|
id: number;
|
|
94
94
|
priority: number;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
created_at: string;
|
|
96
|
+
item_type: "file" | "timeline" | "entity";
|
|
97
|
+
item_id: string;
|
|
98
98
|
task: string;
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
error_message?: string | undefined;
|
|
100
|
+
processed_at?: string | undefined;
|
|
101
101
|
}>;
|
|
102
102
|
export type MaintenanceQueueItem = z.infer<typeof MaintenanceQueueItemSchema>;
|
|
103
103
|
export declare const SleepTelemetrySchema: z.ZodObject<{
|
|
104
104
|
id: z.ZodNumber;
|
|
105
|
-
|
|
105
|
+
run_id: z.ZodOptional<z.ZodNumber>;
|
|
106
106
|
step: z.ZodString;
|
|
107
|
-
|
|
107
|
+
event_type: z.ZodString;
|
|
108
108
|
count: z.ZodNumber;
|
|
109
|
-
|
|
109
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
110
110
|
metadata: z.ZodOptional<z.ZodString>;
|
|
111
|
-
|
|
111
|
+
created_at: z.ZodString;
|
|
112
112
|
}, "strip", z.ZodTypeAny, {
|
|
113
113
|
id: number;
|
|
114
|
-
|
|
114
|
+
created_at: string;
|
|
115
115
|
step: string;
|
|
116
|
-
|
|
116
|
+
event_type: string;
|
|
117
117
|
count: number;
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
run_id?: number | undefined;
|
|
119
|
+
duration_ms?: number | undefined;
|
|
120
120
|
metadata?: string | undefined;
|
|
121
121
|
}, {
|
|
122
122
|
id: number;
|
|
123
|
-
|
|
123
|
+
created_at: string;
|
|
124
124
|
step: string;
|
|
125
|
-
|
|
125
|
+
event_type: string;
|
|
126
126
|
count: number;
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
run_id?: number | undefined;
|
|
128
|
+
duration_ms?: number | undefined;
|
|
129
129
|
metadata?: string | undefined;
|
|
130
130
|
}>;
|
|
131
131
|
export type SleepTelemetry = z.infer<typeof SleepTelemetrySchema>;
|
|
132
132
|
export declare const TierTransitionSchema: z.ZodObject<{
|
|
133
133
|
id: z.ZodNumber;
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
item_id: z.ZodNumber;
|
|
135
|
+
from_tier: z.ZodOptional<z.ZodString>;
|
|
136
|
+
to_tier: z.ZodString;
|
|
137
137
|
reason: z.ZodOptional<z.ZodString>;
|
|
138
|
-
|
|
138
|
+
created_at: z.ZodString;
|
|
139
139
|
}, "strip", z.ZodTypeAny, {
|
|
140
140
|
id: number;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
created_at: string;
|
|
142
|
+
item_id: number;
|
|
143
|
+
to_tier: string;
|
|
144
144
|
reason?: string | undefined;
|
|
145
|
-
|
|
145
|
+
from_tier?: string | undefined;
|
|
146
146
|
}, {
|
|
147
147
|
id: number;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
created_at: string;
|
|
149
|
+
item_id: number;
|
|
150
|
+
to_tier: string;
|
|
151
151
|
reason?: string | undefined;
|
|
152
|
-
|
|
152
|
+
from_tier?: string | undefined;
|
|
153
153
|
}>;
|
|
154
154
|
export type TierTransition = z.infer<typeof TierTransitionSchema>;
|
|
155
155
|
export declare const VectorChunkMetaSchema: z.ZodObject<{
|
|
@@ -157,19 +157,19 @@ export declare const VectorChunkMetaSchema: z.ZodObject<{
|
|
|
157
157
|
ts: z.ZodString;
|
|
158
158
|
source: z.ZodOptional<z.ZodString>;
|
|
159
159
|
content: z.ZodString;
|
|
160
|
-
|
|
160
|
+
origin_id: z.ZodOptional<z.ZodString>;
|
|
161
161
|
}, "strip", z.ZodTypeAny, {
|
|
162
162
|
content: string;
|
|
163
163
|
rowid: number;
|
|
164
164
|
ts: string;
|
|
165
165
|
source?: string | undefined;
|
|
166
|
-
|
|
166
|
+
origin_id?: string | undefined;
|
|
167
167
|
}, {
|
|
168
168
|
content: string;
|
|
169
169
|
rowid: number;
|
|
170
170
|
ts: string;
|
|
171
171
|
source?: string | undefined;
|
|
172
|
-
|
|
172
|
+
origin_id?: string | undefined;
|
|
173
173
|
}>;
|
|
174
174
|
export type VectorChunkMeta = z.infer<typeof VectorChunkMetaSchema>;
|
|
175
175
|
//# sourceMappingURL=sleep.d.ts.map
|
package/dist/sleep.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../src/sleep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../src/sleep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAGtD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAG1D,eAAO,MAAM,yBAAyB,2CAAyC,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;EASrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAG9E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGlE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;EAO/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGlE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAMhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|