@intx/db 0.1.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/README.md +37 -0
- package/drizzle.config.ts +23 -0
- package/migrations/.gitkeep +0 -0
- package/migrations/0000_brown_wither.sql +50 -0
- package/migrations/0001_white_aqueduct.sql +105 -0
- package/migrations/0002_clever_falcon.sql +56 -0
- package/migrations/0003_stiff_tyrannus.sql +44 -0
- package/migrations/0004_rename_capability_to_offering.sql +1 -0
- package/migrations/0005_gigantic_cardiac.sql +1 -0
- package/migrations/0006_sidecar.sql +8 -0
- package/migrations/0007_agent_running_session.sql +1 -0
- package/migrations/0008_session.sql +10 -0
- package/migrations/0009_session_messages.sql +18 -0
- package/migrations/0010_agent_sidecar_pubkey.sql +2 -0
- package/migrations/0011_session_message_from.sql +2 -0
- package/migrations/0012_agent_instance.sql +22 -0
- package/migrations/0013_instance_session_id.sql +2 -0
- package/migrations/0014_drop_agent_runtime_columns.sql +12 -0
- package/migrations/0015_add_instance_id_to_session_message.sql +2 -0
- package/migrations/0016_jazzy_gamma_corps.sql +3 -0
- package/migrations/0017_hesitant_marvex.sql +1 -0
- package/migrations/0018_natural_sinister_six.sql +5 -0
- package/migrations/0019_rename_grant_source_to_origin.sql +1 -0
- package/migrations/0020_add_agent_role.sql +9 -0
- package/migrations/0021_acoustic_ozymandias.sql +15 -0
- package/migrations/0022_material_sleepwalker.sql +27 -0
- package/migrations/0023_flawless_scarlet_witch.sql +2 -0
- package/migrations/0024_bumpy_sharon_ventura.sql +1 -0
- package/migrations/0025_curvy_firestar.sql +26 -0
- package/migrations/0026_keen_ultimo.sql +13 -0
- package/migrations/0027_git_tokens.sql +21 -0
- package/migrations/0028_wet_sugar_man.sql +1 -0
- package/migrations/meta/0000_snapshot.json +316 -0
- package/migrations/meta/0001_snapshot.json +968 -0
- package/migrations/meta/0002_snapshot.json +1315 -0
- package/migrations/meta/0003_snapshot.json +1594 -0
- package/migrations/meta/0004_snapshot.json +1594 -0
- package/migrations/meta/0005_snapshot.json +1600 -0
- package/migrations/meta/0011_snapshot.json +1921 -0
- package/migrations/meta/0012_snapshot.json +2067 -0
- package/migrations/meta/0013_snapshot.json +2082 -0
- package/migrations/meta/0014_snapshot.json +2049 -0
- package/migrations/meta/0015_snapshot.json +2064 -0
- package/migrations/meta/0016_snapshot.json +2085 -0
- package/migrations/meta/0017_snapshot.json +2085 -0
- package/migrations/meta/0018_snapshot.json +2070 -0
- package/migrations/meta/0019_snapshot.json +2070 -0
- package/migrations/meta/0020_snapshot.json +2126 -0
- package/migrations/meta/0021_snapshot.json +2239 -0
- package/migrations/meta/0022_snapshot.json +2425 -0
- package/migrations/meta/0023_snapshot.json +2260 -0
- package/migrations/meta/0024_snapshot.json +2254 -0
- package/migrations/meta/0025_snapshot.json +2418 -0
- package/migrations/meta/0026_snapshot.json +2508 -0
- package/migrations/meta/0027_snapshot.json +2657 -0
- package/migrations/meta/0028_snapshot.json +2657 -0
- package/migrations/meta/_journal.json +209 -0
- package/package.json +27 -0
- package/src/client.ts +24 -0
- package/src/config.ts +19 -0
- package/src/connection.ts +27 -0
- package/src/credential-resolution.ts +378 -0
- package/src/grant-store.ts +51 -0
- package/src/index.ts +32 -0
- package/src/migrate.test.ts +35 -0
- package/src/migrate.ts +168 -0
- package/src/parse-row.test.ts +113 -0
- package/src/parse-row.ts +185 -0
- package/src/schema/agent-assets.ts +21 -0
- package/src/schema/agents.ts +49 -0
- package/src/schema/assets.ts +24 -0
- package/src/schema/auth.ts +51 -0
- package/src/schema/credentials.ts +43 -0
- package/src/schema/git-tokens.ts +83 -0
- package/src/schema/grants.ts +26 -0
- package/src/schema/index.ts +19 -0
- package/src/schema/instances.ts +36 -0
- package/src/schema/messages.ts +108 -0
- package/src/schema/oauth-clients.ts +26 -0
- package/src/schema/offerings.ts +20 -0
- package/src/schema/principals.ts +28 -0
- package/src/schema/providers.ts +23 -0
- package/src/schema/roles.ts +51 -0
- package/src/schema/session-assets.ts +49 -0
- package/src/schema/sessions.ts +26 -0
- package/src/schema/sidecar.ts +14 -0
- package/src/schema/tenants.ts +41 -0
- package/src/schema/wallets.ts +44 -0
- package/src/tenant-hierarchy.ts +34 -0
- package/tsconfig.json +4 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "0526e019-280f-4128-b40d-70d3670b0688",
|
|
3
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
4
|
+
"version": "7",
|
|
5
|
+
"dialect": "postgresql",
|
|
6
|
+
"tables": {
|
|
7
|
+
"public.account": {
|
|
8
|
+
"name": "account",
|
|
9
|
+
"schema": "",
|
|
10
|
+
"columns": {
|
|
11
|
+
"id": {
|
|
12
|
+
"name": "id",
|
|
13
|
+
"type": "text",
|
|
14
|
+
"primaryKey": true,
|
|
15
|
+
"notNull": true
|
|
16
|
+
},
|
|
17
|
+
"user_id": {
|
|
18
|
+
"name": "user_id",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true
|
|
22
|
+
},
|
|
23
|
+
"account_id": {
|
|
24
|
+
"name": "account_id",
|
|
25
|
+
"type": "text",
|
|
26
|
+
"primaryKey": false,
|
|
27
|
+
"notNull": true
|
|
28
|
+
},
|
|
29
|
+
"provider_id": {
|
|
30
|
+
"name": "provider_id",
|
|
31
|
+
"type": "text",
|
|
32
|
+
"primaryKey": false,
|
|
33
|
+
"notNull": true
|
|
34
|
+
},
|
|
35
|
+
"access_token": {
|
|
36
|
+
"name": "access_token",
|
|
37
|
+
"type": "text",
|
|
38
|
+
"primaryKey": false,
|
|
39
|
+
"notNull": false
|
|
40
|
+
},
|
|
41
|
+
"refresh_token": {
|
|
42
|
+
"name": "refresh_token",
|
|
43
|
+
"type": "text",
|
|
44
|
+
"primaryKey": false,
|
|
45
|
+
"notNull": false
|
|
46
|
+
},
|
|
47
|
+
"access_token_expires_at": {
|
|
48
|
+
"name": "access_token_expires_at",
|
|
49
|
+
"type": "timestamp",
|
|
50
|
+
"primaryKey": false,
|
|
51
|
+
"notNull": false
|
|
52
|
+
},
|
|
53
|
+
"refresh_token_expires_at": {
|
|
54
|
+
"name": "refresh_token_expires_at",
|
|
55
|
+
"type": "timestamp",
|
|
56
|
+
"primaryKey": false,
|
|
57
|
+
"notNull": false
|
|
58
|
+
},
|
|
59
|
+
"scope": {
|
|
60
|
+
"name": "scope",
|
|
61
|
+
"type": "text",
|
|
62
|
+
"primaryKey": false,
|
|
63
|
+
"notNull": false
|
|
64
|
+
},
|
|
65
|
+
"id_token": {
|
|
66
|
+
"name": "id_token",
|
|
67
|
+
"type": "text",
|
|
68
|
+
"primaryKey": false,
|
|
69
|
+
"notNull": false
|
|
70
|
+
},
|
|
71
|
+
"password": {
|
|
72
|
+
"name": "password",
|
|
73
|
+
"type": "text",
|
|
74
|
+
"primaryKey": false,
|
|
75
|
+
"notNull": false
|
|
76
|
+
},
|
|
77
|
+
"created_at": {
|
|
78
|
+
"name": "created_at",
|
|
79
|
+
"type": "timestamp",
|
|
80
|
+
"primaryKey": false,
|
|
81
|
+
"notNull": true,
|
|
82
|
+
"default": "now()"
|
|
83
|
+
},
|
|
84
|
+
"updated_at": {
|
|
85
|
+
"name": "updated_at",
|
|
86
|
+
"type": "timestamp",
|
|
87
|
+
"primaryKey": false,
|
|
88
|
+
"notNull": true,
|
|
89
|
+
"default": "now()"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"indexes": {},
|
|
93
|
+
"foreignKeys": {
|
|
94
|
+
"account_user_id_user_id_fk": {
|
|
95
|
+
"name": "account_user_id_user_id_fk",
|
|
96
|
+
"tableFrom": "account",
|
|
97
|
+
"tableTo": "user",
|
|
98
|
+
"columnsFrom": ["user_id"],
|
|
99
|
+
"columnsTo": ["id"],
|
|
100
|
+
"onDelete": "cascade",
|
|
101
|
+
"onUpdate": "no action"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"compositePrimaryKeys": {},
|
|
105
|
+
"uniqueConstraints": {},
|
|
106
|
+
"policies": {},
|
|
107
|
+
"checkConstraints": {},
|
|
108
|
+
"isRLSEnabled": false
|
|
109
|
+
},
|
|
110
|
+
"public.session": {
|
|
111
|
+
"name": "session",
|
|
112
|
+
"schema": "",
|
|
113
|
+
"columns": {
|
|
114
|
+
"id": {
|
|
115
|
+
"name": "id",
|
|
116
|
+
"type": "text",
|
|
117
|
+
"primaryKey": true,
|
|
118
|
+
"notNull": true
|
|
119
|
+
},
|
|
120
|
+
"user_id": {
|
|
121
|
+
"name": "user_id",
|
|
122
|
+
"type": "text",
|
|
123
|
+
"primaryKey": false,
|
|
124
|
+
"notNull": true
|
|
125
|
+
},
|
|
126
|
+
"token": {
|
|
127
|
+
"name": "token",
|
|
128
|
+
"type": "text",
|
|
129
|
+
"primaryKey": false,
|
|
130
|
+
"notNull": true
|
|
131
|
+
},
|
|
132
|
+
"expires_at": {
|
|
133
|
+
"name": "expires_at",
|
|
134
|
+
"type": "timestamp",
|
|
135
|
+
"primaryKey": false,
|
|
136
|
+
"notNull": true
|
|
137
|
+
},
|
|
138
|
+
"ip_address": {
|
|
139
|
+
"name": "ip_address",
|
|
140
|
+
"type": "text",
|
|
141
|
+
"primaryKey": false,
|
|
142
|
+
"notNull": false
|
|
143
|
+
},
|
|
144
|
+
"user_agent": {
|
|
145
|
+
"name": "user_agent",
|
|
146
|
+
"type": "text",
|
|
147
|
+
"primaryKey": false,
|
|
148
|
+
"notNull": false
|
|
149
|
+
},
|
|
150
|
+
"created_at": {
|
|
151
|
+
"name": "created_at",
|
|
152
|
+
"type": "timestamp",
|
|
153
|
+
"primaryKey": false,
|
|
154
|
+
"notNull": true,
|
|
155
|
+
"default": "now()"
|
|
156
|
+
},
|
|
157
|
+
"updated_at": {
|
|
158
|
+
"name": "updated_at",
|
|
159
|
+
"type": "timestamp",
|
|
160
|
+
"primaryKey": false,
|
|
161
|
+
"notNull": true,
|
|
162
|
+
"default": "now()"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"indexes": {},
|
|
166
|
+
"foreignKeys": {
|
|
167
|
+
"session_user_id_user_id_fk": {
|
|
168
|
+
"name": "session_user_id_user_id_fk",
|
|
169
|
+
"tableFrom": "session",
|
|
170
|
+
"tableTo": "user",
|
|
171
|
+
"columnsFrom": ["user_id"],
|
|
172
|
+
"columnsTo": ["id"],
|
|
173
|
+
"onDelete": "cascade",
|
|
174
|
+
"onUpdate": "no action"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"compositePrimaryKeys": {},
|
|
178
|
+
"uniqueConstraints": {
|
|
179
|
+
"session_token_unique": {
|
|
180
|
+
"name": "session_token_unique",
|
|
181
|
+
"nullsNotDistinct": false,
|
|
182
|
+
"columns": ["token"]
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"policies": {},
|
|
186
|
+
"checkConstraints": {},
|
|
187
|
+
"isRLSEnabled": false
|
|
188
|
+
},
|
|
189
|
+
"public.user": {
|
|
190
|
+
"name": "user",
|
|
191
|
+
"schema": "",
|
|
192
|
+
"columns": {
|
|
193
|
+
"id": {
|
|
194
|
+
"name": "id",
|
|
195
|
+
"type": "text",
|
|
196
|
+
"primaryKey": true,
|
|
197
|
+
"notNull": true
|
|
198
|
+
},
|
|
199
|
+
"name": {
|
|
200
|
+
"name": "name",
|
|
201
|
+
"type": "text",
|
|
202
|
+
"primaryKey": false,
|
|
203
|
+
"notNull": true
|
|
204
|
+
},
|
|
205
|
+
"email": {
|
|
206
|
+
"name": "email",
|
|
207
|
+
"type": "text",
|
|
208
|
+
"primaryKey": false,
|
|
209
|
+
"notNull": true
|
|
210
|
+
},
|
|
211
|
+
"email_verified": {
|
|
212
|
+
"name": "email_verified",
|
|
213
|
+
"type": "boolean",
|
|
214
|
+
"primaryKey": false,
|
|
215
|
+
"notNull": true,
|
|
216
|
+
"default": false
|
|
217
|
+
},
|
|
218
|
+
"image": {
|
|
219
|
+
"name": "image",
|
|
220
|
+
"type": "text",
|
|
221
|
+
"primaryKey": false,
|
|
222
|
+
"notNull": false
|
|
223
|
+
},
|
|
224
|
+
"created_at": {
|
|
225
|
+
"name": "created_at",
|
|
226
|
+
"type": "timestamp",
|
|
227
|
+
"primaryKey": false,
|
|
228
|
+
"notNull": true,
|
|
229
|
+
"default": "now()"
|
|
230
|
+
},
|
|
231
|
+
"updated_at": {
|
|
232
|
+
"name": "updated_at",
|
|
233
|
+
"type": "timestamp",
|
|
234
|
+
"primaryKey": false,
|
|
235
|
+
"notNull": true,
|
|
236
|
+
"default": "now()"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"indexes": {},
|
|
240
|
+
"foreignKeys": {},
|
|
241
|
+
"compositePrimaryKeys": {},
|
|
242
|
+
"uniqueConstraints": {
|
|
243
|
+
"user_email_unique": {
|
|
244
|
+
"name": "user_email_unique",
|
|
245
|
+
"nullsNotDistinct": false,
|
|
246
|
+
"columns": ["email"]
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"policies": {},
|
|
250
|
+
"checkConstraints": {},
|
|
251
|
+
"isRLSEnabled": false
|
|
252
|
+
},
|
|
253
|
+
"public.verification": {
|
|
254
|
+
"name": "verification",
|
|
255
|
+
"schema": "",
|
|
256
|
+
"columns": {
|
|
257
|
+
"id": {
|
|
258
|
+
"name": "id",
|
|
259
|
+
"type": "text",
|
|
260
|
+
"primaryKey": true,
|
|
261
|
+
"notNull": true
|
|
262
|
+
},
|
|
263
|
+
"identifier": {
|
|
264
|
+
"name": "identifier",
|
|
265
|
+
"type": "text",
|
|
266
|
+
"primaryKey": false,
|
|
267
|
+
"notNull": true
|
|
268
|
+
},
|
|
269
|
+
"value": {
|
|
270
|
+
"name": "value",
|
|
271
|
+
"type": "text",
|
|
272
|
+
"primaryKey": false,
|
|
273
|
+
"notNull": true
|
|
274
|
+
},
|
|
275
|
+
"expires_at": {
|
|
276
|
+
"name": "expires_at",
|
|
277
|
+
"type": "timestamp",
|
|
278
|
+
"primaryKey": false,
|
|
279
|
+
"notNull": true
|
|
280
|
+
},
|
|
281
|
+
"created_at": {
|
|
282
|
+
"name": "created_at",
|
|
283
|
+
"type": "timestamp",
|
|
284
|
+
"primaryKey": false,
|
|
285
|
+
"notNull": true,
|
|
286
|
+
"default": "now()"
|
|
287
|
+
},
|
|
288
|
+
"updated_at": {
|
|
289
|
+
"name": "updated_at",
|
|
290
|
+
"type": "timestamp",
|
|
291
|
+
"primaryKey": false,
|
|
292
|
+
"notNull": true,
|
|
293
|
+
"default": "now()"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"indexes": {},
|
|
297
|
+
"foreignKeys": {},
|
|
298
|
+
"compositePrimaryKeys": {},
|
|
299
|
+
"uniqueConstraints": {},
|
|
300
|
+
"policies": {},
|
|
301
|
+
"checkConstraints": {},
|
|
302
|
+
"isRLSEnabled": false
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"enums": {},
|
|
306
|
+
"schemas": {},
|
|
307
|
+
"sequences": {},
|
|
308
|
+
"roles": {},
|
|
309
|
+
"policies": {},
|
|
310
|
+
"views": {},
|
|
311
|
+
"_meta": {
|
|
312
|
+
"columns": {},
|
|
313
|
+
"schemas": {},
|
|
314
|
+
"tables": {}
|
|
315
|
+
}
|
|
316
|
+
}
|