@adhd/agent-store-prompts 2.1.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 (67) hide show
  1. package/drizzle/0000_third_nitro.sql +19 -0
  2. package/drizzle/0001_agents_and_taxonomy.sql +26 -0
  3. package/drizzle/0002_agent_components_junction.sql +13 -0
  4. package/drizzle/0003_usecase_context_rules.sql +31 -0
  5. package/drizzle/0004_composed_prompts.sql +10 -0
  6. package/drizzle/0005_warm_norman_osborn.sql +48 -0
  7. package/drizzle/0006_component_head_version_split.sql +78 -0
  8. package/drizzle/meta/0000_snapshot.json +137 -0
  9. package/drizzle/meta/0001_snapshot.json +302 -0
  10. package/drizzle/meta/0002_snapshot.json +381 -0
  11. package/drizzle/meta/0004_snapshot.json +594 -0
  12. package/drizzle/meta/0005_snapshot.json +594 -0
  13. package/drizzle/meta/0006_snapshot.json +672 -0
  14. package/drizzle/meta/_journal.json +55 -0
  15. package/package.json +51 -0
  16. package/src/db/client.d.ts +7 -0
  17. package/src/db/client.d.ts.map +1 -0
  18. package/src/db/client.js +24 -0
  19. package/src/db/client.js.map +1 -0
  20. package/src/db/migrate-runner.d.ts +31 -0
  21. package/src/db/migrate-runner.d.ts.map +1 -0
  22. package/src/db/migrate-runner.js +35 -0
  23. package/src/db/migrate-runner.js.map +1 -0
  24. package/src/db/migrate.d.ts +9 -0
  25. package/src/db/migrate.d.ts.map +1 -0
  26. package/src/db/migrate.js +13 -0
  27. package/src/db/migrate.js.map +1 -0
  28. package/src/db/schema.d.ts +997 -0
  29. package/src/db/schema.d.ts.map +1 -0
  30. package/src/db/schema.js +323 -0
  31. package/src/db/schema.js.map +1 -0
  32. package/src/index.d.ts +21 -0
  33. package/src/index.d.ts.map +1 -0
  34. package/src/index.js +23 -0
  35. package/src/index.js.map +1 -0
  36. package/src/seed/components.d.ts +23 -0
  37. package/src/seed/components.d.ts.map +1 -0
  38. package/src/seed/components.js +399 -0
  39. package/src/seed/components.js.map +1 -0
  40. package/src/seed/index.d.ts +30 -0
  41. package/src/seed/index.d.ts.map +1 -0
  42. package/src/seed/index.js +95 -0
  43. package/src/seed/index.js.map +1 -0
  44. package/src/seed/prompt-types.d.ts +17 -0
  45. package/src/seed/prompt-types.d.ts.map +1 -0
  46. package/src/seed/prompt-types.js +107 -0
  47. package/src/seed/prompt-types.js.map +1 -0
  48. package/src/store/agent-store.d.ts +113 -0
  49. package/src/store/agent-store.d.ts.map +1 -0
  50. package/src/store/agent-store.js +211 -0
  51. package/src/store/agent-store.js.map +1 -0
  52. package/src/store/component-store.d.ts +87 -0
  53. package/src/store/component-store.d.ts.map +1 -0
  54. package/src/store/component-store.js +305 -0
  55. package/src/store/component-store.js.map +1 -0
  56. package/src/store/composed-prompt-store.d.ts +72 -0
  57. package/src/store/composed-prompt-store.d.ts.map +1 -0
  58. package/src/store/composed-prompt-store.js +147 -0
  59. package/src/store/composed-prompt-store.js.map +1 -0
  60. package/src/store/composition-store.d.ts +117 -0
  61. package/src/store/composition-store.d.ts.map +1 -0
  62. package/src/store/composition-store.js +270 -0
  63. package/src/store/composition-store.js.map +1 -0
  64. package/src/store/usecase-store.d.ts +104 -0
  65. package/src/store/usecase-store.d.ts.map +1 -0
  66. package/src/store/usecase-store.js +158 -0
  67. package/src/store/usecase-store.js.map +1 -0
@@ -0,0 +1,594 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "3a8f5146-5db0-4c18-98a8-1761ac94267a",
5
+ "prevId": "ba87ba0f-422e-4f06-bcc4-5cd8eac2edfd",
6
+ "tables": {
7
+ "registry_agent_components": {
8
+ "name": "registry_agent_components",
9
+ "columns": {
10
+ "agent_slug": {
11
+ "name": "agent_slug",
12
+ "type": "text",
13
+ "primaryKey": false,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "component_slug": {
18
+ "name": "component_slug",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "position": {
25
+ "name": "position",
26
+ "type": "integer",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "version_pin": {
32
+ "name": "version_pin",
33
+ "type": "integer",
34
+ "primaryKey": false,
35
+ "notNull": false,
36
+ "autoincrement": false
37
+ },
38
+ "context_condition": {
39
+ "name": "context_condition",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": false,
43
+ "autoincrement": false
44
+ },
45
+ "is_required": {
46
+ "name": "is_required",
47
+ "type": "integer",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false,
51
+ "default": false
52
+ }
53
+ },
54
+ "indexes": {
55
+ "registry_agent_components_agent_idx": {
56
+ "name": "registry_agent_components_agent_idx",
57
+ "columns": ["agent_slug"],
58
+ "isUnique": false
59
+ },
60
+ "registry_agent_components_position_idx": {
61
+ "name": "registry_agent_components_position_idx",
62
+ "columns": ["agent_slug", "position"],
63
+ "isUnique": false
64
+ }
65
+ },
66
+ "foreignKeys": {
67
+ "registry_agent_components_agent_slug_registry_agents_slug_fk": {
68
+ "name": "registry_agent_components_agent_slug_registry_agents_slug_fk",
69
+ "tableFrom": "registry_agent_components",
70
+ "tableTo": "registry_agents",
71
+ "columnsFrom": ["agent_slug"],
72
+ "columnsTo": ["slug"],
73
+ "onDelete": "no action",
74
+ "onUpdate": "no action"
75
+ }
76
+ },
77
+ "compositePrimaryKeys": {
78
+ "registry_agent_components_agent_slug_component_slug_position_pk": {
79
+ "columns": ["agent_slug", "component_slug", "position"],
80
+ "name": "registry_agent_components_agent_slug_component_slug_position_pk"
81
+ }
82
+ },
83
+ "uniqueConstraints": {},
84
+ "checkConstraints": {}
85
+ },
86
+ "registry_agents": {
87
+ "name": "registry_agents",
88
+ "columns": {
89
+ "slug": {
90
+ "name": "slug",
91
+ "type": "text",
92
+ "primaryKey": true,
93
+ "notNull": true,
94
+ "autoincrement": false
95
+ },
96
+ "display_name": {
97
+ "name": "display_name",
98
+ "type": "text",
99
+ "primaryKey": false,
100
+ "notNull": true,
101
+ "autoincrement": false
102
+ },
103
+ "description": {
104
+ "name": "description",
105
+ "type": "text",
106
+ "primaryKey": false,
107
+ "notNull": true,
108
+ "autoincrement": false,
109
+ "default": "''"
110
+ },
111
+ "status": {
112
+ "name": "status",
113
+ "type": "text",
114
+ "primaryKey": false,
115
+ "notNull": true,
116
+ "autoincrement": false,
117
+ "default": "'draft'"
118
+ },
119
+ "model_hint": {
120
+ "name": "model_hint",
121
+ "type": "text",
122
+ "primaryKey": false,
123
+ "notNull": false,
124
+ "autoincrement": false
125
+ },
126
+ "taxonomy_category": {
127
+ "name": "taxonomy_category",
128
+ "type": "text",
129
+ "primaryKey": false,
130
+ "notNull": false,
131
+ "autoincrement": false
132
+ },
133
+ "default_posture": {
134
+ "name": "default_posture",
135
+ "type": "text",
136
+ "primaryKey": false,
137
+ "notNull": true,
138
+ "autoincrement": false,
139
+ "default": "'needs_work'"
140
+ },
141
+ "created_at": {
142
+ "name": "created_at",
143
+ "type": "text",
144
+ "primaryKey": false,
145
+ "notNull": true,
146
+ "autoincrement": false
147
+ },
148
+ "updated_at": {
149
+ "name": "updated_at",
150
+ "type": "text",
151
+ "primaryKey": false,
152
+ "notNull": true,
153
+ "autoincrement": false
154
+ }
155
+ },
156
+ "indexes": {
157
+ "registry_agents_status_idx": {
158
+ "name": "registry_agents_status_idx",
159
+ "columns": ["status"],
160
+ "isUnique": false
161
+ },
162
+ "registry_agents_category_idx": {
163
+ "name": "registry_agents_category_idx",
164
+ "columns": ["taxonomy_category"],
165
+ "isUnique": false
166
+ }
167
+ },
168
+ "foreignKeys": {
169
+ "registry_agents_taxonomy_category_registry_taxonomy_categories_slug_fk": {
170
+ "name": "registry_agents_taxonomy_category_registry_taxonomy_categories_slug_fk",
171
+ "tableFrom": "registry_agents",
172
+ "tableTo": "registry_taxonomy_categories",
173
+ "columnsFrom": ["taxonomy_category"],
174
+ "columnsTo": ["slug"],
175
+ "onDelete": "no action",
176
+ "onUpdate": "no action"
177
+ }
178
+ },
179
+ "compositePrimaryKeys": {},
180
+ "uniqueConstraints": {},
181
+ "checkConstraints": {}
182
+ },
183
+ "registry_component_usage": {
184
+ "name": "registry_component_usage",
185
+ "columns": {
186
+ "component_slug": {
187
+ "name": "component_slug",
188
+ "type": "text",
189
+ "primaryKey": false,
190
+ "notNull": true,
191
+ "autoincrement": false
192
+ },
193
+ "use_case_slug": {
194
+ "name": "use_case_slug",
195
+ "type": "text",
196
+ "primaryKey": false,
197
+ "notNull": true,
198
+ "autoincrement": false
199
+ },
200
+ "weight": {
201
+ "name": "weight",
202
+ "type": "integer",
203
+ "primaryKey": false,
204
+ "notNull": false,
205
+ "autoincrement": false
206
+ }
207
+ },
208
+ "indexes": {
209
+ "registry_component_usage_use_case_idx": {
210
+ "name": "registry_component_usage_use_case_idx",
211
+ "columns": ["use_case_slug"],
212
+ "isUnique": false
213
+ },
214
+ "registry_component_usage_component_idx": {
215
+ "name": "registry_component_usage_component_idx",
216
+ "columns": ["component_slug"],
217
+ "isUnique": false
218
+ }
219
+ },
220
+ "foreignKeys": {
221
+ "registry_component_usage_use_case_slug_registry_use_cases_slug_fk": {
222
+ "name": "registry_component_usage_use_case_slug_registry_use_cases_slug_fk",
223
+ "tableFrom": "registry_component_usage",
224
+ "tableTo": "registry_use_cases",
225
+ "columnsFrom": ["use_case_slug"],
226
+ "columnsTo": ["slug"],
227
+ "onDelete": "no action",
228
+ "onUpdate": "no action"
229
+ }
230
+ },
231
+ "compositePrimaryKeys": {
232
+ "registry_component_usage_component_slug_use_case_slug_pk": {
233
+ "columns": ["component_slug", "use_case_slug"],
234
+ "name": "registry_component_usage_component_slug_use_case_slug_pk"
235
+ }
236
+ },
237
+ "uniqueConstraints": {},
238
+ "checkConstraints": {}
239
+ },
240
+ "registry_composed_prompts": {
241
+ "name": "registry_composed_prompts",
242
+ "columns": {
243
+ "id": {
244
+ "name": "id",
245
+ "type": "integer",
246
+ "primaryKey": true,
247
+ "notNull": true,
248
+ "autoincrement": true
249
+ },
250
+ "agent_slug": {
251
+ "name": "agent_slug",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": true,
255
+ "autoincrement": false
256
+ },
257
+ "context_hash": {
258
+ "name": "context_hash",
259
+ "type": "text",
260
+ "primaryKey": false,
261
+ "notNull": true,
262
+ "autoincrement": false
263
+ },
264
+ "content": {
265
+ "name": "content",
266
+ "type": "text",
267
+ "primaryKey": false,
268
+ "notNull": true,
269
+ "autoincrement": false
270
+ },
271
+ "component_versions": {
272
+ "name": "component_versions",
273
+ "type": "text",
274
+ "primaryKey": false,
275
+ "notNull": true,
276
+ "autoincrement": false
277
+ },
278
+ "created_at": {
279
+ "name": "created_at",
280
+ "type": "text",
281
+ "primaryKey": false,
282
+ "notNull": true,
283
+ "autoincrement": false
284
+ }
285
+ },
286
+ "indexes": {
287
+ "registry_composed_prompts_agent_hash_idx": {
288
+ "name": "registry_composed_prompts_agent_hash_idx",
289
+ "columns": ["agent_slug", "context_hash"],
290
+ "isUnique": false
291
+ }
292
+ },
293
+ "foreignKeys": {},
294
+ "compositePrimaryKeys": {},
295
+ "uniqueConstraints": {},
296
+ "checkConstraints": {}
297
+ },
298
+ "registry_context_rules": {
299
+ "name": "registry_context_rules",
300
+ "columns": {
301
+ "id": {
302
+ "name": "id",
303
+ "type": "integer",
304
+ "primaryKey": true,
305
+ "notNull": true,
306
+ "autoincrement": true
307
+ },
308
+ "agent_slug": {
309
+ "name": "agent_slug",
310
+ "type": "text",
311
+ "primaryKey": false,
312
+ "notNull": true,
313
+ "autoincrement": false
314
+ },
315
+ "condition": {
316
+ "name": "condition",
317
+ "type": "text",
318
+ "primaryKey": false,
319
+ "notNull": true,
320
+ "autoincrement": false
321
+ },
322
+ "component_slug": {
323
+ "name": "component_slug",
324
+ "type": "text",
325
+ "primaryKey": false,
326
+ "notNull": true,
327
+ "autoincrement": false
328
+ },
329
+ "position": {
330
+ "name": "position",
331
+ "type": "integer",
332
+ "primaryKey": false,
333
+ "notNull": false,
334
+ "autoincrement": false
335
+ }
336
+ },
337
+ "indexes": {
338
+ "registry_context_rules_agent_idx": {
339
+ "name": "registry_context_rules_agent_idx",
340
+ "columns": ["agent_slug"],
341
+ "isUnique": false
342
+ },
343
+ "registry_context_rules_component_idx": {
344
+ "name": "registry_context_rules_component_idx",
345
+ "columns": ["component_slug"],
346
+ "isUnique": false
347
+ }
348
+ },
349
+ "foreignKeys": {
350
+ "registry_context_rules_agent_slug_registry_agents_slug_fk": {
351
+ "name": "registry_context_rules_agent_slug_registry_agents_slug_fk",
352
+ "tableFrom": "registry_context_rules",
353
+ "tableTo": "registry_agents",
354
+ "columnsFrom": ["agent_slug"],
355
+ "columnsTo": ["slug"],
356
+ "onDelete": "no action",
357
+ "onUpdate": "no action"
358
+ }
359
+ },
360
+ "compositePrimaryKeys": {},
361
+ "uniqueConstraints": {},
362
+ "checkConstraints": {}
363
+ },
364
+ "registry_prompt_components": {
365
+ "name": "registry_prompt_components",
366
+ "columns": {
367
+ "slug": {
368
+ "name": "slug",
369
+ "type": "text",
370
+ "primaryKey": false,
371
+ "notNull": true,
372
+ "autoincrement": false
373
+ },
374
+ "type": {
375
+ "name": "type",
376
+ "type": "text",
377
+ "primaryKey": false,
378
+ "notNull": true,
379
+ "autoincrement": false
380
+ },
381
+ "version": {
382
+ "name": "version",
383
+ "type": "integer",
384
+ "primaryKey": false,
385
+ "notNull": true,
386
+ "autoincrement": false,
387
+ "default": 1
388
+ },
389
+ "content": {
390
+ "name": "content",
391
+ "type": "text",
392
+ "primaryKey": false,
393
+ "notNull": true,
394
+ "autoincrement": false
395
+ },
396
+ "is_shared": {
397
+ "name": "is_shared",
398
+ "type": "integer",
399
+ "primaryKey": false,
400
+ "notNull": true,
401
+ "autoincrement": false,
402
+ "default": false
403
+ },
404
+ "created_at": {
405
+ "name": "created_at",
406
+ "type": "text",
407
+ "primaryKey": false,
408
+ "notNull": true,
409
+ "autoincrement": false
410
+ },
411
+ "updated_at": {
412
+ "name": "updated_at",
413
+ "type": "text",
414
+ "primaryKey": false,
415
+ "notNull": true,
416
+ "autoincrement": false
417
+ }
418
+ },
419
+ "indexes": {
420
+ "registry_prompt_components_slug_idx": {
421
+ "name": "registry_prompt_components_slug_idx",
422
+ "columns": ["slug"],
423
+ "isUnique": false
424
+ },
425
+ "registry_prompt_components_type_idx": {
426
+ "name": "registry_prompt_components_type_idx",
427
+ "columns": ["type"],
428
+ "isUnique": false
429
+ }
430
+ },
431
+ "foreignKeys": {
432
+ "registry_prompt_components_type_registry_prompt_types_slug_fk": {
433
+ "name": "registry_prompt_components_type_registry_prompt_types_slug_fk",
434
+ "tableFrom": "registry_prompt_components",
435
+ "tableTo": "registry_prompt_types",
436
+ "columnsFrom": ["type"],
437
+ "columnsTo": ["slug"],
438
+ "onDelete": "no action",
439
+ "onUpdate": "no action"
440
+ }
441
+ },
442
+ "compositePrimaryKeys": {
443
+ "registry_prompt_components_slug_version_pk": {
444
+ "columns": ["slug", "version"],
445
+ "name": "registry_prompt_components_slug_version_pk"
446
+ }
447
+ },
448
+ "uniqueConstraints": {},
449
+ "checkConstraints": {}
450
+ },
451
+ "registry_prompt_types": {
452
+ "name": "registry_prompt_types",
453
+ "columns": {
454
+ "slug": {
455
+ "name": "slug",
456
+ "type": "text",
457
+ "primaryKey": true,
458
+ "notNull": true,
459
+ "autoincrement": false
460
+ },
461
+ "description": {
462
+ "name": "description",
463
+ "type": "text",
464
+ "primaryKey": false,
465
+ "notNull": true,
466
+ "autoincrement": false
467
+ },
468
+ "is_system": {
469
+ "name": "is_system",
470
+ "type": "integer",
471
+ "primaryKey": false,
472
+ "notNull": true,
473
+ "autoincrement": false,
474
+ "default": false
475
+ }
476
+ },
477
+ "indexes": {},
478
+ "foreignKeys": {},
479
+ "compositePrimaryKeys": {},
480
+ "uniqueConstraints": {},
481
+ "checkConstraints": {}
482
+ },
483
+ "registry_taxonomy_categories": {
484
+ "name": "registry_taxonomy_categories",
485
+ "columns": {
486
+ "slug": {
487
+ "name": "slug",
488
+ "type": "text",
489
+ "primaryKey": true,
490
+ "notNull": true,
491
+ "autoincrement": false
492
+ },
493
+ "name": {
494
+ "name": "name",
495
+ "type": "text",
496
+ "primaryKey": false,
497
+ "notNull": true,
498
+ "autoincrement": false
499
+ },
500
+ "description": {
501
+ "name": "description",
502
+ "type": "text",
503
+ "primaryKey": false,
504
+ "notNull": true,
505
+ "autoincrement": false,
506
+ "default": "''"
507
+ },
508
+ "position": {
509
+ "name": "position",
510
+ "type": "integer",
511
+ "primaryKey": false,
512
+ "notNull": true,
513
+ "autoincrement": false,
514
+ "default": 0
515
+ },
516
+ "parent_slug": {
517
+ "name": "parent_slug",
518
+ "type": "text",
519
+ "primaryKey": false,
520
+ "notNull": false,
521
+ "autoincrement": false
522
+ }
523
+ },
524
+ "indexes": {
525
+ "registry_taxonomy_categories_position_idx": {
526
+ "name": "registry_taxonomy_categories_position_idx",
527
+ "columns": ["position"],
528
+ "isUnique": false
529
+ },
530
+ "registry_taxonomy_categories_parent_idx": {
531
+ "name": "registry_taxonomy_categories_parent_idx",
532
+ "columns": ["parent_slug"],
533
+ "isUnique": false
534
+ }
535
+ },
536
+ "foreignKeys": {
537
+ "registry_taxonomy_categories_parent_slug_registry_taxonomy_categories_slug_fk": {
538
+ "name": "registry_taxonomy_categories_parent_slug_registry_taxonomy_categories_slug_fk",
539
+ "tableFrom": "registry_taxonomy_categories",
540
+ "tableTo": "registry_taxonomy_categories",
541
+ "columnsFrom": ["parent_slug"],
542
+ "columnsTo": ["slug"],
543
+ "onDelete": "no action",
544
+ "onUpdate": "no action"
545
+ }
546
+ },
547
+ "compositePrimaryKeys": {},
548
+ "uniqueConstraints": {},
549
+ "checkConstraints": {}
550
+ },
551
+ "registry_use_cases": {
552
+ "name": "registry_use_cases",
553
+ "columns": {
554
+ "slug": {
555
+ "name": "slug",
556
+ "type": "text",
557
+ "primaryKey": true,
558
+ "notNull": true,
559
+ "autoincrement": false
560
+ },
561
+ "name": {
562
+ "name": "name",
563
+ "type": "text",
564
+ "primaryKey": false,
565
+ "notNull": true,
566
+ "autoincrement": false
567
+ },
568
+ "description": {
569
+ "name": "description",
570
+ "type": "text",
571
+ "primaryKey": false,
572
+ "notNull": true,
573
+ "autoincrement": false,
574
+ "default": "''"
575
+ }
576
+ },
577
+ "indexes": {},
578
+ "foreignKeys": {},
579
+ "compositePrimaryKeys": {},
580
+ "uniqueConstraints": {},
581
+ "checkConstraints": {}
582
+ }
583
+ },
584
+ "views": {},
585
+ "enums": {},
586
+ "_meta": {
587
+ "schemas": {},
588
+ "tables": {},
589
+ "columns": {}
590
+ },
591
+ "internal": {
592
+ "indexes": {}
593
+ }
594
+ }