@sentry/junior-memory 0.76.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.
@@ -0,0 +1,89 @@
1
+ import { z } from "zod";
2
+ export declare const MEMORY_TYPES: readonly ["preference", "identity", "relationship", "knowledge", "context", "event", "task", "observation"];
3
+ export declare const MEMORY_SCOPES: readonly ["personal", "conversation"];
4
+ export declare const MEMORY_SUBJECT_TYPES: readonly ["user", "conversation", "general"];
5
+ export declare const MEMORY_SOURCE_PLATFORMS: readonly ["slack", "local"];
6
+ export declare const MEMORY_EMBEDDING_METRICS: readonly ["cosine"];
7
+ export declare const MEMORY_EMBEDDING_DIMENSIONS = 1536;
8
+ export type MemoryType = (typeof MEMORY_TYPES)[number];
9
+ export type MemoryScope = (typeof MEMORY_SCOPES)[number];
10
+ export type MemorySubjectType = (typeof MEMORY_SUBJECT_TYPES)[number];
11
+ export type MemorySourcePlatform = (typeof MEMORY_SOURCE_PLATFORMS)[number];
12
+ export type MemoryEmbeddingMetric = (typeof MEMORY_EMBEDDING_METRICS)[number];
13
+ /** Runtime-owned memory invocation fields used for scope and source authority. */
14
+ export declare const slackMemoryRuntimeContextSchema: z.ZodObject<{
15
+ conversationId: z.ZodOptional<z.ZodString>;
16
+ requester: z.ZodOptional<z.ZodObject<{
17
+ platform: z.ZodLiteral<"slack">;
18
+ teamId: z.ZodString;
19
+ email: z.ZodOptional<z.ZodString>;
20
+ fullName: z.ZodOptional<z.ZodString>;
21
+ userId: z.ZodString;
22
+ userName: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strict>>;
24
+ source: z.ZodObject<{
25
+ platform: z.ZodLiteral<"slack">;
26
+ teamId: z.ZodString;
27
+ channelId: z.ZodString;
28
+ type: z.ZodEnum<{
29
+ pub: "pub";
30
+ priv: "priv";
31
+ }>;
32
+ messageTs: z.ZodOptional<z.ZodString>;
33
+ threadTs: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$strict>;
35
+ }, z.core.$strict>;
36
+ /** Runtime-owned local memory invocation fields used for scope and source authority. */
37
+ export declare const localMemoryRuntimeContextSchema: z.ZodObject<{
38
+ conversationId: z.ZodOptional<z.ZodString>;
39
+ requester: z.ZodOptional<z.ZodObject<{
40
+ platform: z.ZodLiteral<"local">;
41
+ email: z.ZodOptional<z.ZodString>;
42
+ fullName: z.ZodOptional<z.ZodString>;
43
+ userId: z.ZodString;
44
+ userName: z.ZodOptional<z.ZodString>;
45
+ }, z.core.$strict>>;
46
+ source: z.ZodObject<{
47
+ platform: z.ZodLiteral<"local">;
48
+ type: z.ZodLiteral<"priv">;
49
+ conversationId: z.ZodString;
50
+ }, z.core.$strict>;
51
+ }, z.core.$strict>;
52
+ /** Runtime-owned memory invocation fields accepted by memory store operations. */
53
+ export declare const memoryRuntimeContextSchema: z.ZodUnion<readonly [z.ZodObject<{
54
+ conversationId: z.ZodOptional<z.ZodString>;
55
+ requester: z.ZodOptional<z.ZodObject<{
56
+ platform: z.ZodLiteral<"slack">;
57
+ teamId: z.ZodString;
58
+ email: z.ZodOptional<z.ZodString>;
59
+ fullName: z.ZodOptional<z.ZodString>;
60
+ userId: z.ZodString;
61
+ userName: z.ZodOptional<z.ZodString>;
62
+ }, z.core.$strict>>;
63
+ source: z.ZodObject<{
64
+ platform: z.ZodLiteral<"slack">;
65
+ teamId: z.ZodString;
66
+ channelId: z.ZodString;
67
+ type: z.ZodEnum<{
68
+ pub: "pub";
69
+ priv: "priv";
70
+ }>;
71
+ messageTs: z.ZodOptional<z.ZodString>;
72
+ threadTs: z.ZodOptional<z.ZodString>;
73
+ }, z.core.$strict>;
74
+ }, z.core.$strict>, z.ZodObject<{
75
+ conversationId: z.ZodOptional<z.ZodString>;
76
+ requester: z.ZodOptional<z.ZodObject<{
77
+ platform: z.ZodLiteral<"local">;
78
+ email: z.ZodOptional<z.ZodString>;
79
+ fullName: z.ZodOptional<z.ZodString>;
80
+ userId: z.ZodString;
81
+ userName: z.ZodOptional<z.ZodString>;
82
+ }, z.core.$strict>>;
83
+ source: z.ZodObject<{
84
+ platform: z.ZodLiteral<"local">;
85
+ type: z.ZodLiteral<"priv">;
86
+ conversationId: z.ZodString;
87
+ }, z.core.$strict>;
88
+ }, z.core.$strict>]>;
89
+ export type MemoryRuntimeContext = z.output<typeof memoryRuntimeContextSchema>;
@@ -0,0 +1,37 @@
1
+ CREATE TABLE "junior_memory_memories" (
2
+ "id" text PRIMARY KEY NOT NULL,
3
+ "scope" text NOT NULL,
4
+ "scope_key" text NOT NULL,
5
+ "type" text NOT NULL,
6
+ "subject_type" text NOT NULL,
7
+ "subject_key" text,
8
+ "content" text NOT NULL,
9
+ "source_platform" text NOT NULL,
10
+ "source_key" text NOT NULL,
11
+ "idempotency_key" text,
12
+ "observed_at_ms" bigint NOT NULL,
13
+ "created_at_ms" bigint NOT NULL,
14
+ "expires_at_ms" bigint,
15
+ "superseded_at_ms" bigint,
16
+ "superseded_by_id" text,
17
+ "archived_at_ms" bigint,
18
+ "archive_reason" text,
19
+ CONSTRAINT "junior_memory_memories_scope_check" CHECK ("junior_memory_memories"."scope" IN ('personal', 'conversation')),
20
+ CONSTRAINT "junior_memory_memories_type_check" CHECK ("junior_memory_memories"."type" IN (
21
+ 'preference',
22
+ 'identity',
23
+ 'relationship',
24
+ 'knowledge',
25
+ 'context',
26
+ 'event',
27
+ 'task',
28
+ 'observation'
29
+ )),
30
+ CONSTRAINT "junior_memory_memories_subject_type_check" CHECK ("junior_memory_memories"."subject_type" IN ('user', 'conversation', 'general')),
31
+ CONSTRAINT "junior_memory_memories_subject_key_check" CHECK (("junior_memory_memories"."subject_type" = 'general' AND "junior_memory_memories"."subject_key" IS NULL) OR ("junior_memory_memories"."subject_type" IN ('user', 'conversation') AND "junior_memory_memories"."subject_key" IS NOT NULL AND length("junior_memory_memories"."subject_key") > 0)),
32
+ CONSTRAINT "junior_memory_memories_source_platform_check" CHECK ("junior_memory_memories"."source_platform" IN ('slack', 'local'))
33
+ );
34
+ --> statement-breakpoint
35
+ CREATE INDEX "junior_memory_memories_visible_idx" ON "junior_memory_memories" USING btree ("scope","scope_key","created_at_ms" DESC NULLS LAST,"id") WHERE "junior_memory_memories"."archived_at_ms" IS NULL AND "junior_memory_memories"."superseded_at_ms" IS NULL AND "junior_memory_memories"."superseded_by_id" IS NULL;--> statement-breakpoint
36
+ CREATE INDEX "junior_memory_memories_expiration_idx" ON "junior_memory_memories" USING btree ("expires_at_ms") WHERE "junior_memory_memories"."archived_at_ms" IS NULL AND "junior_memory_memories"."expires_at_ms" IS NOT NULL;--> statement-breakpoint
37
+ CREATE UNIQUE INDEX "junior_memory_memories_idempotency_idx" ON "junior_memory_memories" USING btree ("scope","scope_key","idempotency_key") WHERE "junior_memory_memories"."idempotency_key" IS NOT NULL;
@@ -0,0 +1,2 @@
1
+ DROP INDEX "junior_memory_memories_idempotency_idx";--> statement-breakpoint
2
+ CREATE UNIQUE INDEX "junior_memory_memories_idempotency_idx" ON "junior_memory_memories" USING btree ("scope","scope_key","idempotency_key") WHERE "junior_memory_memories"."idempotency_key" IS NOT NULL AND "junior_memory_memories"."archived_at_ms" IS NULL AND "junior_memory_memories"."superseded_at_ms" IS NULL AND "junior_memory_memories"."superseded_by_id" IS NULL;
@@ -0,0 +1,17 @@
1
+ CREATE EXTENSION IF NOT EXISTS vector;
2
+ --> statement-breakpoint
3
+ CREATE TABLE "junior_memory_embeddings" (
4
+ "memory_id" text PRIMARY KEY NOT NULL,
5
+ "provider" text NOT NULL,
6
+ "model" text NOT NULL,
7
+ "dimensions" integer NOT NULL,
8
+ "metric" text NOT NULL,
9
+ "content_hash" text NOT NULL,
10
+ "embedding" vector(1536) NOT NULL,
11
+ "created_at_ms" bigint NOT NULL,
12
+ CONSTRAINT "junior_memory_embeddings_metric_check" CHECK ("junior_memory_embeddings"."metric" IN ('cosine')),
13
+ CONSTRAINT "junior_memory_embeddings_dimensions_check" CHECK ("junior_memory_embeddings"."dimensions" = 1536)
14
+ );
15
+ --> statement-breakpoint
16
+ ALTER TABLE "junior_memory_embeddings" ADD CONSTRAINT "junior_memory_embeddings_memory_id_junior_memory_memories_id_fk" FOREIGN KEY ("memory_id") REFERENCES "public"."junior_memory_memories"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
17
+ CREATE INDEX "junior_memory_embeddings_model_idx" ON "junior_memory_embeddings" USING btree ("provider","model","dimensions","metric");
@@ -0,0 +1,234 @@
1
+ {
2
+ "id": "57a69a4f-1cc5-4597-a818-fb23e3a5bf17",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_memory_memories": {
8
+ "name": "junior_memory_memories",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "scope": {
18
+ "name": "scope",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "scope_key": {
24
+ "name": "scope_key",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "type": {
30
+ "name": "type",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "subject_type": {
36
+ "name": "subject_type",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "subject_key": {
42
+ "name": "subject_key",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "content": {
48
+ "name": "content",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ },
53
+ "source_platform": {
54
+ "name": "source_platform",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": true
58
+ },
59
+ "source_key": {
60
+ "name": "source_key",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": true
64
+ },
65
+ "idempotency_key": {
66
+ "name": "idempotency_key",
67
+ "type": "text",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "observed_at_ms": {
72
+ "name": "observed_at_ms",
73
+ "type": "bigint",
74
+ "primaryKey": false,
75
+ "notNull": true
76
+ },
77
+ "created_at_ms": {
78
+ "name": "created_at_ms",
79
+ "type": "bigint",
80
+ "primaryKey": false,
81
+ "notNull": true
82
+ },
83
+ "expires_at_ms": {
84
+ "name": "expires_at_ms",
85
+ "type": "bigint",
86
+ "primaryKey": false,
87
+ "notNull": false
88
+ },
89
+ "superseded_at_ms": {
90
+ "name": "superseded_at_ms",
91
+ "type": "bigint",
92
+ "primaryKey": false,
93
+ "notNull": false
94
+ },
95
+ "superseded_by_id": {
96
+ "name": "superseded_by_id",
97
+ "type": "text",
98
+ "primaryKey": false,
99
+ "notNull": false
100
+ },
101
+ "archived_at_ms": {
102
+ "name": "archived_at_ms",
103
+ "type": "bigint",
104
+ "primaryKey": false,
105
+ "notNull": false
106
+ },
107
+ "archive_reason": {
108
+ "name": "archive_reason",
109
+ "type": "text",
110
+ "primaryKey": false,
111
+ "notNull": false
112
+ }
113
+ },
114
+ "indexes": {
115
+ "junior_memory_memories_visible_idx": {
116
+ "name": "junior_memory_memories_visible_idx",
117
+ "columns": [
118
+ {
119
+ "expression": "scope",
120
+ "isExpression": false,
121
+ "asc": true,
122
+ "nulls": "last"
123
+ },
124
+ {
125
+ "expression": "scope_key",
126
+ "isExpression": false,
127
+ "asc": true,
128
+ "nulls": "last"
129
+ },
130
+ {
131
+ "expression": "created_at_ms",
132
+ "isExpression": false,
133
+ "asc": false,
134
+ "nulls": "last"
135
+ },
136
+ {
137
+ "expression": "id",
138
+ "isExpression": false,
139
+ "asc": true,
140
+ "nulls": "last"
141
+ }
142
+ ],
143
+ "isUnique": false,
144
+ "where": "\"junior_memory_memories\".\"archived_at_ms\" IS NULL AND \"junior_memory_memories\".\"superseded_at_ms\" IS NULL AND \"junior_memory_memories\".\"superseded_by_id\" IS NULL",
145
+ "concurrently": false,
146
+ "method": "btree",
147
+ "with": {}
148
+ },
149
+ "junior_memory_memories_expiration_idx": {
150
+ "name": "junior_memory_memories_expiration_idx",
151
+ "columns": [
152
+ {
153
+ "expression": "expires_at_ms",
154
+ "isExpression": false,
155
+ "asc": true,
156
+ "nulls": "last"
157
+ }
158
+ ],
159
+ "isUnique": false,
160
+ "where": "\"junior_memory_memories\".\"archived_at_ms\" IS NULL AND \"junior_memory_memories\".\"expires_at_ms\" IS NOT NULL",
161
+ "concurrently": false,
162
+ "method": "btree",
163
+ "with": {}
164
+ },
165
+ "junior_memory_memories_idempotency_idx": {
166
+ "name": "junior_memory_memories_idempotency_idx",
167
+ "columns": [
168
+ {
169
+ "expression": "scope",
170
+ "isExpression": false,
171
+ "asc": true,
172
+ "nulls": "last"
173
+ },
174
+ {
175
+ "expression": "scope_key",
176
+ "isExpression": false,
177
+ "asc": true,
178
+ "nulls": "last"
179
+ },
180
+ {
181
+ "expression": "idempotency_key",
182
+ "isExpression": false,
183
+ "asc": true,
184
+ "nulls": "last"
185
+ }
186
+ ],
187
+ "isUnique": true,
188
+ "where": "\"junior_memory_memories\".\"idempotency_key\" IS NOT NULL",
189
+ "concurrently": false,
190
+ "method": "btree",
191
+ "with": {}
192
+ }
193
+ },
194
+ "foreignKeys": {},
195
+ "compositePrimaryKeys": {},
196
+ "uniqueConstraints": {},
197
+ "policies": {},
198
+ "checkConstraints": {
199
+ "junior_memory_memories_scope_check": {
200
+ "name": "junior_memory_memories_scope_check",
201
+ "value": "\"junior_memory_memories\".\"scope\" IN ('personal', 'conversation')"
202
+ },
203
+ "junior_memory_memories_type_check": {
204
+ "name": "junior_memory_memories_type_check",
205
+ "value": "\"junior_memory_memories\".\"type\" IN (\n 'preference',\n 'identity',\n 'relationship',\n 'knowledge',\n 'context',\n 'event',\n 'task',\n 'observation'\n )"
206
+ },
207
+ "junior_memory_memories_subject_type_check": {
208
+ "name": "junior_memory_memories_subject_type_check",
209
+ "value": "\"junior_memory_memories\".\"subject_type\" IN ('user', 'conversation', 'general')"
210
+ },
211
+ "junior_memory_memories_subject_key_check": {
212
+ "name": "junior_memory_memories_subject_key_check",
213
+ "value": "(\"junior_memory_memories\".\"subject_type\" = 'general' AND \"junior_memory_memories\".\"subject_key\" IS NULL) OR (\"junior_memory_memories\".\"subject_type\" IN ('user', 'conversation') AND \"junior_memory_memories\".\"subject_key\" IS NOT NULL AND length(\"junior_memory_memories\".\"subject_key\") > 0)"
214
+ },
215
+ "junior_memory_memories_source_platform_check": {
216
+ "name": "junior_memory_memories_source_platform_check",
217
+ "value": "\"junior_memory_memories\".\"source_platform\" IN ('slack', 'local')"
218
+ }
219
+ },
220
+ "isRLSEnabled": false
221
+ }
222
+ },
223
+ "enums": {},
224
+ "schemas": {},
225
+ "sequences": {},
226
+ "roles": {},
227
+ "policies": {},
228
+ "views": {},
229
+ "_meta": {
230
+ "columns": {},
231
+ "schemas": {},
232
+ "tables": {}
233
+ }
234
+ }
@@ -0,0 +1,234 @@
1
+ {
2
+ "id": "aef16541-5bbe-4c1b-867d-a19c841cb278",
3
+ "prevId": "57a69a4f-1cc5-4597-a818-fb23e3a5bf17",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.junior_memory_memories": {
8
+ "name": "junior_memory_memories",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "scope": {
18
+ "name": "scope",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "scope_key": {
24
+ "name": "scope_key",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "type": {
30
+ "name": "type",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "subject_type": {
36
+ "name": "subject_type",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "subject_key": {
42
+ "name": "subject_key",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": false
46
+ },
47
+ "content": {
48
+ "name": "content",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ },
53
+ "source_platform": {
54
+ "name": "source_platform",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": true
58
+ },
59
+ "source_key": {
60
+ "name": "source_key",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": true
64
+ },
65
+ "idempotency_key": {
66
+ "name": "idempotency_key",
67
+ "type": "text",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "observed_at_ms": {
72
+ "name": "observed_at_ms",
73
+ "type": "bigint",
74
+ "primaryKey": false,
75
+ "notNull": true
76
+ },
77
+ "created_at_ms": {
78
+ "name": "created_at_ms",
79
+ "type": "bigint",
80
+ "primaryKey": false,
81
+ "notNull": true
82
+ },
83
+ "expires_at_ms": {
84
+ "name": "expires_at_ms",
85
+ "type": "bigint",
86
+ "primaryKey": false,
87
+ "notNull": false
88
+ },
89
+ "superseded_at_ms": {
90
+ "name": "superseded_at_ms",
91
+ "type": "bigint",
92
+ "primaryKey": false,
93
+ "notNull": false
94
+ },
95
+ "superseded_by_id": {
96
+ "name": "superseded_by_id",
97
+ "type": "text",
98
+ "primaryKey": false,
99
+ "notNull": false
100
+ },
101
+ "archived_at_ms": {
102
+ "name": "archived_at_ms",
103
+ "type": "bigint",
104
+ "primaryKey": false,
105
+ "notNull": false
106
+ },
107
+ "archive_reason": {
108
+ "name": "archive_reason",
109
+ "type": "text",
110
+ "primaryKey": false,
111
+ "notNull": false
112
+ }
113
+ },
114
+ "indexes": {
115
+ "junior_memory_memories_visible_idx": {
116
+ "name": "junior_memory_memories_visible_idx",
117
+ "columns": [
118
+ {
119
+ "expression": "scope",
120
+ "isExpression": false,
121
+ "asc": true,
122
+ "nulls": "last"
123
+ },
124
+ {
125
+ "expression": "scope_key",
126
+ "isExpression": false,
127
+ "asc": true,
128
+ "nulls": "last"
129
+ },
130
+ {
131
+ "expression": "created_at_ms",
132
+ "isExpression": false,
133
+ "asc": false,
134
+ "nulls": "last"
135
+ },
136
+ {
137
+ "expression": "id",
138
+ "isExpression": false,
139
+ "asc": true,
140
+ "nulls": "last"
141
+ }
142
+ ],
143
+ "isUnique": false,
144
+ "where": "\"junior_memory_memories\".\"archived_at_ms\" IS NULL AND \"junior_memory_memories\".\"superseded_at_ms\" IS NULL AND \"junior_memory_memories\".\"superseded_by_id\" IS NULL",
145
+ "concurrently": false,
146
+ "method": "btree",
147
+ "with": {}
148
+ },
149
+ "junior_memory_memories_expiration_idx": {
150
+ "name": "junior_memory_memories_expiration_idx",
151
+ "columns": [
152
+ {
153
+ "expression": "expires_at_ms",
154
+ "isExpression": false,
155
+ "asc": true,
156
+ "nulls": "last"
157
+ }
158
+ ],
159
+ "isUnique": false,
160
+ "where": "\"junior_memory_memories\".\"archived_at_ms\" IS NULL AND \"junior_memory_memories\".\"expires_at_ms\" IS NOT NULL",
161
+ "concurrently": false,
162
+ "method": "btree",
163
+ "with": {}
164
+ },
165
+ "junior_memory_memories_idempotency_idx": {
166
+ "name": "junior_memory_memories_idempotency_idx",
167
+ "columns": [
168
+ {
169
+ "expression": "scope",
170
+ "isExpression": false,
171
+ "asc": true,
172
+ "nulls": "last"
173
+ },
174
+ {
175
+ "expression": "scope_key",
176
+ "isExpression": false,
177
+ "asc": true,
178
+ "nulls": "last"
179
+ },
180
+ {
181
+ "expression": "idempotency_key",
182
+ "isExpression": false,
183
+ "asc": true,
184
+ "nulls": "last"
185
+ }
186
+ ],
187
+ "isUnique": true,
188
+ "where": "\"junior_memory_memories\".\"idempotency_key\" IS NOT NULL AND \"junior_memory_memories\".\"archived_at_ms\" IS NULL AND \"junior_memory_memories\".\"superseded_at_ms\" IS NULL AND \"junior_memory_memories\".\"superseded_by_id\" IS NULL",
189
+ "concurrently": false,
190
+ "method": "btree",
191
+ "with": {}
192
+ }
193
+ },
194
+ "foreignKeys": {},
195
+ "compositePrimaryKeys": {},
196
+ "uniqueConstraints": {},
197
+ "policies": {},
198
+ "checkConstraints": {
199
+ "junior_memory_memories_scope_check": {
200
+ "name": "junior_memory_memories_scope_check",
201
+ "value": "\"junior_memory_memories\".\"scope\" IN ('personal', 'conversation')"
202
+ },
203
+ "junior_memory_memories_type_check": {
204
+ "name": "junior_memory_memories_type_check",
205
+ "value": "\"junior_memory_memories\".\"type\" IN (\n 'preference',\n 'identity',\n 'relationship',\n 'knowledge',\n 'context',\n 'event',\n 'task',\n 'observation'\n )"
206
+ },
207
+ "junior_memory_memories_subject_type_check": {
208
+ "name": "junior_memory_memories_subject_type_check",
209
+ "value": "\"junior_memory_memories\".\"subject_type\" IN ('user', 'conversation', 'general')"
210
+ },
211
+ "junior_memory_memories_subject_key_check": {
212
+ "name": "junior_memory_memories_subject_key_check",
213
+ "value": "(\"junior_memory_memories\".\"subject_type\" = 'general' AND \"junior_memory_memories\".\"subject_key\" IS NULL) OR (\"junior_memory_memories\".\"subject_type\" IN ('user', 'conversation') AND \"junior_memory_memories\".\"subject_key\" IS NOT NULL AND length(\"junior_memory_memories\".\"subject_key\") > 0)"
214
+ },
215
+ "junior_memory_memories_source_platform_check": {
216
+ "name": "junior_memory_memories_source_platform_check",
217
+ "value": "\"junior_memory_memories\".\"source_platform\" IN ('slack', 'local')"
218
+ }
219
+ },
220
+ "isRLSEnabled": false
221
+ }
222
+ },
223
+ "enums": {},
224
+ "schemas": {},
225
+ "sequences": {},
226
+ "roles": {},
227
+ "policies": {},
228
+ "views": {},
229
+ "_meta": {
230
+ "columns": {},
231
+ "schemas": {},
232
+ "tables": {}
233
+ }
234
+ }