@larkup/marketplace 0.1.24 → 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.
Files changed (40) hide show
  1. package/.env.example +3 -0
  2. package/CHANGELOG.md +180 -0
  3. package/README.md +34 -0
  4. package/db/drizzle/0000_hesitant_joseph.sql +69 -0
  5. package/db/drizzle/0001_deep_phil_sheldon.sql +1 -0
  6. package/db/drizzle/0002_jittery_living_mummy.sql +18 -0
  7. package/db/drizzle/meta/0000_snapshot.json +483 -0
  8. package/db/drizzle/meta/0001_snapshot.json +490 -0
  9. package/db/drizzle/meta/0002_snapshot.json +615 -0
  10. package/db/drizzle/meta/_journal.json +27 -0
  11. package/db/drizzle.config.ts +19 -0
  12. package/db/tsconfig.build.json +11 -0
  13. package/db/tsconfig.json +17 -0
  14. package/db/vitest.config.ts +11 -0
  15. package/package.json +31 -4
  16. package/src/db/builtin-tools.ts +613 -0
  17. package/src/db/client.ts +26 -0
  18. package/src/db/repo.test.ts +309 -0
  19. package/src/db/repo.ts +558 -0
  20. package/src/db/schema/audit.ts +27 -0
  21. package/src/db/schema/extensions.ts +73 -0
  22. package/src/db/schema/index.ts +5 -0
  23. package/src/db/schema/installations.ts +23 -0
  24. package/src/db/schema/publishers.ts +13 -0
  25. package/src/db/schema/versions.ts +22 -0
  26. package/src/db/seed.ts +33 -0
  27. package/src/db/validate.test.ts +79 -0
  28. package/src/db/validate.ts +84 -0
  29. package/src/output-sanitizer.test.ts +17 -0
  30. package/src/output-sanitizer.ts +8 -0
  31. package/src/storage-provider-s3.test.ts +110 -0
  32. package/src/storage-provider.ts +164 -13
  33. package/src/tool-extension.ts +247 -0
  34. package/src/tool-installer.ts +80 -109
  35. package/src/tool-loader.test.ts +120 -0
  36. package/src/tool-loader.ts +99 -37
  37. package/src/tool-manifest.schema.ts +89 -32
  38. package/src/tool-registry.ts +34 -111
  39. package/src/types.ts +217 -87
  40. package/vitest.config.ts +13 -0
@@ -0,0 +1,483 @@
1
+ {
2
+ "id": "dda5848c-2976-44b4-aafc-8181bee6984d",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.publishers": {
8
+ "name": "publishers",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "name": {
18
+ "name": "name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "contact_email": {
24
+ "name": "contact_email",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": false
28
+ },
29
+ "verification": {
30
+ "name": "verification",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true,
34
+ "default": "'unverified'"
35
+ },
36
+ "created_at": {
37
+ "name": "created_at",
38
+ "type": "timestamp with time zone",
39
+ "primaryKey": false,
40
+ "notNull": true,
41
+ "default": "now()"
42
+ },
43
+ "updated_at": {
44
+ "name": "updated_at",
45
+ "type": "timestamp with time zone",
46
+ "primaryKey": false,
47
+ "notNull": true,
48
+ "default": "now()"
49
+ }
50
+ },
51
+ "indexes": {},
52
+ "foreignKeys": {},
53
+ "compositePrimaryKeys": {},
54
+ "uniqueConstraints": {},
55
+ "policies": {},
56
+ "checkConstraints": {},
57
+ "isRLSEnabled": false
58
+ },
59
+ "public.extension_workspace_grants": {
60
+ "name": "extension_workspace_grants",
61
+ "schema": "",
62
+ "columns": {
63
+ "id": {
64
+ "name": "id",
65
+ "type": "text",
66
+ "primaryKey": true,
67
+ "notNull": true
68
+ },
69
+ "extension_id": {
70
+ "name": "extension_id",
71
+ "type": "text",
72
+ "primaryKey": false,
73
+ "notNull": true
74
+ },
75
+ "workspace_id": {
76
+ "name": "workspace_id",
77
+ "type": "text",
78
+ "primaryKey": false,
79
+ "notNull": true
80
+ },
81
+ "granted_at": {
82
+ "name": "granted_at",
83
+ "type": "timestamp with time zone",
84
+ "primaryKey": false,
85
+ "notNull": true,
86
+ "default": "now()"
87
+ }
88
+ },
89
+ "indexes": {},
90
+ "foreignKeys": {
91
+ "extension_workspace_grants_extension_id_extensions_id_fk": {
92
+ "name": "extension_workspace_grants_extension_id_extensions_id_fk",
93
+ "tableFrom": "extension_workspace_grants",
94
+ "tableTo": "extensions",
95
+ "columnsFrom": [
96
+ "extension_id"
97
+ ],
98
+ "columnsTo": [
99
+ "id"
100
+ ],
101
+ "onDelete": "no action",
102
+ "onUpdate": "no action"
103
+ }
104
+ },
105
+ "compositePrimaryKeys": {},
106
+ "uniqueConstraints": {},
107
+ "policies": {},
108
+ "checkConstraints": {},
109
+ "isRLSEnabled": false
110
+ },
111
+ "public.extensions": {
112
+ "name": "extensions",
113
+ "schema": "",
114
+ "columns": {
115
+ "id": {
116
+ "name": "id",
117
+ "type": "text",
118
+ "primaryKey": true,
119
+ "notNull": true
120
+ },
121
+ "publisher_id": {
122
+ "name": "publisher_id",
123
+ "type": "text",
124
+ "primaryKey": false,
125
+ "notNull": true
126
+ },
127
+ "kind": {
128
+ "name": "kind",
129
+ "type": "text",
130
+ "primaryKey": false,
131
+ "notNull": true,
132
+ "default": "'tool'"
133
+ },
134
+ "name": {
135
+ "name": "name",
136
+ "type": "text",
137
+ "primaryKey": false,
138
+ "notNull": true
139
+ },
140
+ "description": {
141
+ "name": "description",
142
+ "type": "text",
143
+ "primaryKey": false,
144
+ "notNull": true
145
+ },
146
+ "category": {
147
+ "name": "category",
148
+ "type": "text",
149
+ "primaryKey": false,
150
+ "notNull": true
151
+ },
152
+ "package_name": {
153
+ "name": "package_name",
154
+ "type": "text",
155
+ "primaryKey": false,
156
+ "notNull": true
157
+ },
158
+ "distribution": {
159
+ "name": "distribution",
160
+ "type": "text",
161
+ "primaryKey": false,
162
+ "notNull": true,
163
+ "default": "'public'"
164
+ },
165
+ "repository_url": {
166
+ "name": "repository_url",
167
+ "type": "text",
168
+ "primaryKey": false,
169
+ "notNull": false
170
+ },
171
+ "license": {
172
+ "name": "license",
173
+ "type": "text",
174
+ "primaryKey": false,
175
+ "notNull": false
176
+ },
177
+ "deprecated_at": {
178
+ "name": "deprecated_at",
179
+ "type": "timestamp with time zone",
180
+ "primaryKey": false,
181
+ "notNull": false
182
+ },
183
+ "created_at": {
184
+ "name": "created_at",
185
+ "type": "timestamp with time zone",
186
+ "primaryKey": false,
187
+ "notNull": true,
188
+ "default": "now()"
189
+ },
190
+ "updated_at": {
191
+ "name": "updated_at",
192
+ "type": "timestamp with time zone",
193
+ "primaryKey": false,
194
+ "notNull": true,
195
+ "default": "now()"
196
+ }
197
+ },
198
+ "indexes": {},
199
+ "foreignKeys": {
200
+ "extensions_publisher_id_publishers_id_fk": {
201
+ "name": "extensions_publisher_id_publishers_id_fk",
202
+ "tableFrom": "extensions",
203
+ "tableTo": "publishers",
204
+ "columnsFrom": [
205
+ "publisher_id"
206
+ ],
207
+ "columnsTo": [
208
+ "id"
209
+ ],
210
+ "onDelete": "no action",
211
+ "onUpdate": "no action"
212
+ }
213
+ },
214
+ "compositePrimaryKeys": {},
215
+ "uniqueConstraints": {},
216
+ "policies": {},
217
+ "checkConstraints": {},
218
+ "isRLSEnabled": false
219
+ },
220
+ "public.extension_versions": {
221
+ "name": "extension_versions",
222
+ "schema": "",
223
+ "columns": {
224
+ "id": {
225
+ "name": "id",
226
+ "type": "text",
227
+ "primaryKey": true,
228
+ "notNull": true
229
+ },
230
+ "extension_id": {
231
+ "name": "extension_id",
232
+ "type": "text",
233
+ "primaryKey": false,
234
+ "notNull": true
235
+ },
236
+ "version": {
237
+ "name": "version",
238
+ "type": "text",
239
+ "primaryKey": false,
240
+ "notNull": true
241
+ },
242
+ "manifest": {
243
+ "name": "manifest",
244
+ "type": "jsonb",
245
+ "primaryKey": false,
246
+ "notNull": true
247
+ },
248
+ "integrity": {
249
+ "name": "integrity",
250
+ "type": "text",
251
+ "primaryKey": false,
252
+ "notNull": true
253
+ },
254
+ "published_by": {
255
+ "name": "published_by",
256
+ "type": "text",
257
+ "primaryKey": false,
258
+ "notNull": true
259
+ },
260
+ "published_at": {
261
+ "name": "published_at",
262
+ "type": "timestamp with time zone",
263
+ "primaryKey": false,
264
+ "notNull": true,
265
+ "default": "now()"
266
+ }
267
+ },
268
+ "indexes": {
269
+ "extension_versions_extension_id_idx": {
270
+ "name": "extension_versions_extension_id_idx",
271
+ "columns": [
272
+ {
273
+ "expression": "extension_id",
274
+ "isExpression": false,
275
+ "asc": true,
276
+ "nulls": "last"
277
+ }
278
+ ],
279
+ "isUnique": false,
280
+ "concurrently": false,
281
+ "method": "btree",
282
+ "with": {}
283
+ }
284
+ },
285
+ "foreignKeys": {
286
+ "extension_versions_extension_id_extensions_id_fk": {
287
+ "name": "extension_versions_extension_id_extensions_id_fk",
288
+ "tableFrom": "extension_versions",
289
+ "tableTo": "extensions",
290
+ "columnsFrom": [
291
+ "extension_id"
292
+ ],
293
+ "columnsTo": [
294
+ "id"
295
+ ],
296
+ "onDelete": "no action",
297
+ "onUpdate": "no action"
298
+ }
299
+ },
300
+ "compositePrimaryKeys": {},
301
+ "uniqueConstraints": {
302
+ "extension_versions_extension_version_unique": {
303
+ "name": "extension_versions_extension_version_unique",
304
+ "nullsNotDistinct": false,
305
+ "columns": [
306
+ "extension_id",
307
+ "version"
308
+ ]
309
+ }
310
+ },
311
+ "policies": {},
312
+ "checkConstraints": {},
313
+ "isRLSEnabled": false
314
+ },
315
+ "public.workspace_installations": {
316
+ "name": "workspace_installations",
317
+ "schema": "",
318
+ "columns": {
319
+ "id": {
320
+ "name": "id",
321
+ "type": "text",
322
+ "primaryKey": true,
323
+ "notNull": true
324
+ },
325
+ "extension_id": {
326
+ "name": "extension_id",
327
+ "type": "text",
328
+ "primaryKey": false,
329
+ "notNull": true
330
+ },
331
+ "workspace_id": {
332
+ "name": "workspace_id",
333
+ "type": "text",
334
+ "primaryKey": false,
335
+ "notNull": true
336
+ },
337
+ "installed_at": {
338
+ "name": "installed_at",
339
+ "type": "timestamp with time zone",
340
+ "primaryKey": false,
341
+ "notNull": true,
342
+ "default": "now()"
343
+ },
344
+ "updated_at": {
345
+ "name": "updated_at",
346
+ "type": "timestamp with time zone",
347
+ "primaryKey": false,
348
+ "notNull": true,
349
+ "default": "now()"
350
+ }
351
+ },
352
+ "indexes": {
353
+ "workspace_installations_extension_id_idx": {
354
+ "name": "workspace_installations_extension_id_idx",
355
+ "columns": [
356
+ {
357
+ "expression": "extension_id",
358
+ "isExpression": false,
359
+ "asc": true,
360
+ "nulls": "last"
361
+ }
362
+ ],
363
+ "isUnique": false,
364
+ "concurrently": false,
365
+ "method": "btree",
366
+ "with": {}
367
+ }
368
+ },
369
+ "foreignKeys": {
370
+ "workspace_installations_extension_id_extensions_id_fk": {
371
+ "name": "workspace_installations_extension_id_extensions_id_fk",
372
+ "tableFrom": "workspace_installations",
373
+ "tableTo": "extensions",
374
+ "columnsFrom": [
375
+ "extension_id"
376
+ ],
377
+ "columnsTo": [
378
+ "id"
379
+ ],
380
+ "onDelete": "no action",
381
+ "onUpdate": "no action"
382
+ }
383
+ },
384
+ "compositePrimaryKeys": {},
385
+ "uniqueConstraints": {
386
+ "workspace_installations_extension_workspace_unique": {
387
+ "name": "workspace_installations_extension_workspace_unique",
388
+ "nullsNotDistinct": false,
389
+ "columns": [
390
+ "extension_id",
391
+ "workspace_id"
392
+ ]
393
+ }
394
+ },
395
+ "policies": {},
396
+ "checkConstraints": {},
397
+ "isRLSEnabled": false
398
+ },
399
+ "public.audit_events": {
400
+ "name": "audit_events",
401
+ "schema": "",
402
+ "columns": {
403
+ "id": {
404
+ "name": "id",
405
+ "type": "text",
406
+ "primaryKey": true,
407
+ "notNull": true
408
+ },
409
+ "actor": {
410
+ "name": "actor",
411
+ "type": "text",
412
+ "primaryKey": false,
413
+ "notNull": true
414
+ },
415
+ "action": {
416
+ "name": "action",
417
+ "type": "text",
418
+ "primaryKey": false,
419
+ "notNull": true
420
+ },
421
+ "extension_id": {
422
+ "name": "extension_id",
423
+ "type": "text",
424
+ "primaryKey": false,
425
+ "notNull": false
426
+ },
427
+ "workspace_id": {
428
+ "name": "workspace_id",
429
+ "type": "text",
430
+ "primaryKey": false,
431
+ "notNull": false
432
+ },
433
+ "metadata": {
434
+ "name": "metadata",
435
+ "type": "jsonb",
436
+ "primaryKey": false,
437
+ "notNull": false
438
+ },
439
+ "created_at": {
440
+ "name": "created_at",
441
+ "type": "timestamp with time zone",
442
+ "primaryKey": false,
443
+ "notNull": true,
444
+ "default": "now()"
445
+ }
446
+ },
447
+ "indexes": {
448
+ "audit_events_extension_id_idx": {
449
+ "name": "audit_events_extension_id_idx",
450
+ "columns": [
451
+ {
452
+ "expression": "extension_id",
453
+ "isExpression": false,
454
+ "asc": true,
455
+ "nulls": "last"
456
+ }
457
+ ],
458
+ "isUnique": false,
459
+ "concurrently": false,
460
+ "method": "btree",
461
+ "with": {}
462
+ }
463
+ },
464
+ "foreignKeys": {},
465
+ "compositePrimaryKeys": {},
466
+ "uniqueConstraints": {},
467
+ "policies": {},
468
+ "checkConstraints": {},
469
+ "isRLSEnabled": false
470
+ }
471
+ },
472
+ "enums": {},
473
+ "schemas": {},
474
+ "sequences": {},
475
+ "roles": {},
476
+ "policies": {},
477
+ "views": {},
478
+ "_meta": {
479
+ "columns": {},
480
+ "schemas": {},
481
+ "tables": {}
482
+ }
483
+ }