@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,19 @@
1
+ CREATE TABLE `registry_prompt_components` (
2
+ `slug` text NOT NULL,
3
+ `type` text NOT NULL,
4
+ `version` integer DEFAULT 1 NOT NULL,
5
+ `content` text NOT NULL,
6
+ `is_shared` integer DEFAULT false NOT NULL,
7
+ `created_at` text NOT NULL,
8
+ `updated_at` text NOT NULL,
9
+ FOREIGN KEY (`type`) REFERENCES `registry_prompt_types`(`slug`) ON UPDATE no action ON DELETE no action
10
+ );
11
+ --> statement-breakpoint
12
+ CREATE INDEX `registry_prompt_components_pkey` ON `registry_prompt_components` (`slug`,`version`);--> statement-breakpoint
13
+ CREATE INDEX `registry_prompt_components_slug_idx` ON `registry_prompt_components` (`slug`);--> statement-breakpoint
14
+ CREATE INDEX `registry_prompt_components_type_idx` ON `registry_prompt_components` (`type`);--> statement-breakpoint
15
+ CREATE TABLE `registry_prompt_types` (
16
+ `slug` text PRIMARY KEY NOT NULL,
17
+ `description` text NOT NULL,
18
+ `is_system` integer DEFAULT false NOT NULL
19
+ );
@@ -0,0 +1,26 @@
1
+ CREATE TABLE `registry_agents` (
2
+ `slug` text PRIMARY KEY NOT NULL,
3
+ `display_name` text NOT NULL,
4
+ `description` text DEFAULT '' NOT NULL,
5
+ `status` text DEFAULT 'draft' NOT NULL,
6
+ `model_hint` text,
7
+ `taxonomy_category` text,
8
+ `default_posture` text DEFAULT 'needs_work' NOT NULL,
9
+ `created_at` text NOT NULL,
10
+ `updated_at` text NOT NULL,
11
+ FOREIGN KEY (`taxonomy_category`) REFERENCES `registry_taxonomy_categories`(`slug`) ON UPDATE no action ON DELETE no action
12
+ );
13
+ --> statement-breakpoint
14
+ CREATE INDEX `registry_agents_status_idx` ON `registry_agents` (`status`);--> statement-breakpoint
15
+ CREATE INDEX `registry_agents_category_idx` ON `registry_agents` (`taxonomy_category`);--> statement-breakpoint
16
+ CREATE TABLE `registry_taxonomy_categories` (
17
+ `slug` text PRIMARY KEY NOT NULL,
18
+ `name` text NOT NULL,
19
+ `description` text DEFAULT '' NOT NULL,
20
+ `position` integer DEFAULT 0 NOT NULL,
21
+ `parent_slug` text,
22
+ FOREIGN KEY (`parent_slug`) REFERENCES `registry_taxonomy_categories`(`slug`) ON UPDATE no action ON DELETE no action
23
+ );
24
+ --> statement-breakpoint
25
+ CREATE INDEX `registry_taxonomy_categories_position_idx` ON `registry_taxonomy_categories` (`position`);--> statement-breakpoint
26
+ CREATE INDEX `registry_taxonomy_categories_parent_idx` ON `registry_taxonomy_categories` (`parent_slug`);
@@ -0,0 +1,13 @@
1
+ CREATE TABLE `registry_agent_components` (
2
+ `agent_slug` text NOT NULL,
3
+ `component_slug` text NOT NULL,
4
+ `position` integer NOT NULL,
5
+ `version_pin` integer,
6
+ `context_condition` text,
7
+ `is_required` integer DEFAULT false NOT NULL,
8
+ FOREIGN KEY (`agent_slug`) REFERENCES `registry_agents`(`slug`) ON UPDATE no action ON DELETE no action
9
+ );
10
+ --> statement-breakpoint
11
+ CREATE INDEX `registry_agent_components_pkey` ON `registry_agent_components` (`agent_slug`,`component_slug`,`position`);--> statement-breakpoint
12
+ CREATE INDEX `registry_agent_components_agent_idx` ON `registry_agent_components` (`agent_slug`);--> statement-breakpoint
13
+ CREATE INDEX `registry_agent_components_position_idx` ON `registry_agent_components` (`agent_slug`,`position`);
@@ -0,0 +1,31 @@
1
+ CREATE TABLE `registry_use_cases` (
2
+ `slug` text PRIMARY KEY NOT NULL,
3
+ `name` text NOT NULL,
4
+ `description` text DEFAULT '' NOT NULL
5
+ );
6
+ --> statement-breakpoint
7
+ CREATE TABLE `registry_component_usage` (
8
+ `component_slug` text NOT NULL,
9
+ `use_case_slug` text NOT NULL,
10
+ `weight` integer,
11
+ FOREIGN KEY (`use_case_slug`) REFERENCES `registry_use_cases`(`slug`) ON UPDATE no action ON DELETE no action
12
+ );
13
+ --> statement-breakpoint
14
+ CREATE INDEX `registry_component_usage_pkey` ON `registry_component_usage` (`component_slug`,`use_case_slug`);
15
+ --> statement-breakpoint
16
+ CREATE INDEX `registry_component_usage_use_case_idx` ON `registry_component_usage` (`use_case_slug`);
17
+ --> statement-breakpoint
18
+ CREATE INDEX `registry_component_usage_component_idx` ON `registry_component_usage` (`component_slug`);
19
+ --> statement-breakpoint
20
+ CREATE TABLE `registry_context_rules` (
21
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
22
+ `agent_slug` text NOT NULL,
23
+ `condition` text NOT NULL,
24
+ `component_slug` text NOT NULL,
25
+ `position` integer,
26
+ FOREIGN KEY (`agent_slug`) REFERENCES `registry_agents`(`slug`) ON UPDATE no action ON DELETE no action
27
+ );
28
+ --> statement-breakpoint
29
+ CREATE INDEX `registry_context_rules_agent_idx` ON `registry_context_rules` (`agent_slug`);
30
+ --> statement-breakpoint
31
+ CREATE INDEX `registry_context_rules_component_idx` ON `registry_context_rules` (`component_slug`);
@@ -0,0 +1,10 @@
1
+ CREATE TABLE `registry_composed_prompts` (
2
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
3
+ `agent_slug` text NOT NULL,
4
+ `context_hash` text NOT NULL,
5
+ `content` text NOT NULL,
6
+ `component_versions` text NOT NULL,
7
+ `created_at` text NOT NULL
8
+ );
9
+ --> statement-breakpoint
10
+ CREATE INDEX `registry_composed_prompts_agent_hash_idx` ON `registry_composed_prompts` (`agent_slug`,`context_hash`);
@@ -0,0 +1,48 @@
1
+ PRAGMA foreign_keys=OFF;--> statement-breakpoint
2
+ CREATE TABLE `__new_registry_agent_components` (
3
+ `agent_slug` text NOT NULL,
4
+ `component_slug` text NOT NULL,
5
+ `position` integer NOT NULL,
6
+ `version_pin` integer,
7
+ `context_condition` text,
8
+ `is_required` integer DEFAULT false NOT NULL,
9
+ PRIMARY KEY(`agent_slug`, `component_slug`, `position`),
10
+ FOREIGN KEY (`agent_slug`) REFERENCES `registry_agents`(`slug`) ON UPDATE no action ON DELETE no action
11
+ );
12
+ --> statement-breakpoint
13
+ INSERT INTO `__new_registry_agent_components`("agent_slug", "component_slug", "position", "version_pin", "context_condition", "is_required") SELECT "agent_slug", "component_slug", "position", "version_pin", "context_condition", "is_required" FROM `registry_agent_components`;--> statement-breakpoint
14
+ DROP TABLE `registry_agent_components`;--> statement-breakpoint
15
+ ALTER TABLE `__new_registry_agent_components` RENAME TO `registry_agent_components`;--> statement-breakpoint
16
+ PRAGMA foreign_keys=ON;--> statement-breakpoint
17
+ CREATE INDEX `registry_agent_components_agent_idx` ON `registry_agent_components` (`agent_slug`);--> statement-breakpoint
18
+ CREATE INDEX `registry_agent_components_position_idx` ON `registry_agent_components` (`agent_slug`,`position`);--> statement-breakpoint
19
+ CREATE TABLE `__new_registry_component_usage` (
20
+ `component_slug` text NOT NULL,
21
+ `use_case_slug` text NOT NULL,
22
+ `weight` integer,
23
+ PRIMARY KEY(`component_slug`, `use_case_slug`),
24
+ FOREIGN KEY (`use_case_slug`) REFERENCES `registry_use_cases`(`slug`) ON UPDATE no action ON DELETE no action
25
+ );
26
+ --> statement-breakpoint
27
+ INSERT INTO `__new_registry_component_usage`("component_slug", "use_case_slug", "weight") SELECT "component_slug", "use_case_slug", "weight" FROM `registry_component_usage`;--> statement-breakpoint
28
+ DROP TABLE `registry_component_usage`;--> statement-breakpoint
29
+ ALTER TABLE `__new_registry_component_usage` RENAME TO `registry_component_usage`;--> statement-breakpoint
30
+ CREATE INDEX `registry_component_usage_use_case_idx` ON `registry_component_usage` (`use_case_slug`);--> statement-breakpoint
31
+ CREATE INDEX `registry_component_usage_component_idx` ON `registry_component_usage` (`component_slug`);--> statement-breakpoint
32
+ CREATE TABLE `__new_registry_prompt_components` (
33
+ `slug` text NOT NULL,
34
+ `type` text NOT NULL,
35
+ `version` integer DEFAULT 1 NOT NULL,
36
+ `content` text NOT NULL,
37
+ `is_shared` integer DEFAULT false NOT NULL,
38
+ `created_at` text NOT NULL,
39
+ `updated_at` text NOT NULL,
40
+ PRIMARY KEY(`slug`, `version`),
41
+ FOREIGN KEY (`type`) REFERENCES `registry_prompt_types`(`slug`) ON UPDATE no action ON DELETE no action
42
+ );
43
+ --> statement-breakpoint
44
+ INSERT INTO `__new_registry_prompt_components`("slug", "type", "version", "content", "is_shared", "created_at", "updated_at") SELECT "slug", "type", "version", "content", "is_shared", "created_at", "updated_at" FROM `registry_prompt_components`;--> statement-breakpoint
45
+ DROP TABLE `registry_prompt_components`;--> statement-breakpoint
46
+ ALTER TABLE `__new_registry_prompt_components` RENAME TO `registry_prompt_components`;--> statement-breakpoint
47
+ CREATE INDEX `registry_prompt_components_slug_idx` ON `registry_prompt_components` (`slug`);--> statement-breakpoint
48
+ CREATE INDEX `registry_prompt_components_type_idx` ON `registry_prompt_components` (`type`);
@@ -0,0 +1,78 @@
1
+ -- Decision 5 (docs/plan/agent-registry-schema/decisions.md): split component
2
+ -- IDENTITY (registry_components, slug PK) from HISTORY
3
+ -- (registry_component_versions, version_id PK) so downstream tables can FK onto a
4
+ -- single-column PK. registry_prompt_components is DROPPED; component data is
5
+ -- re-established by the seed (registry is pre-release 0.0.1, no production rows to
6
+ -- preserve). registry_agent_components / registry_component_usage /
7
+ -- registry_context_rules are recreated with their component references now ENFORCED.
8
+ CREATE TABLE `registry_component_versions` (
9
+ `version_id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
10
+ `slug` text NOT NULL,
11
+ `version` integer DEFAULT 1 NOT NULL,
12
+ `content` text NOT NULL,
13
+ `created_at` text NOT NULL,
14
+ `updated_at` text NOT NULL,
15
+ FOREIGN KEY (`slug`) REFERENCES `registry_components`(`slug`) ON UPDATE no action ON DELETE no action
16
+ );
17
+ --> statement-breakpoint
18
+ CREATE UNIQUE INDEX `registry_component_versions_slug_version_uq` ON `registry_component_versions` (`slug`,`version`);--> statement-breakpoint
19
+ CREATE INDEX `registry_component_versions_slug_idx` ON `registry_component_versions` (`slug`);--> statement-breakpoint
20
+ CREATE TABLE `registry_components` (
21
+ `slug` text PRIMARY KEY NOT NULL,
22
+ `type` text NOT NULL,
23
+ `is_shared` integer DEFAULT false NOT NULL,
24
+ `created_at` text NOT NULL,
25
+ FOREIGN KEY (`type`) REFERENCES `registry_prompt_types`(`slug`) ON UPDATE no action ON DELETE no action
26
+ );
27
+ --> statement-breakpoint
28
+ CREATE INDEX `registry_components_type_idx` ON `registry_components` (`type`);--> statement-breakpoint
29
+ DROP TABLE `registry_prompt_components`;--> statement-breakpoint
30
+ PRAGMA foreign_keys=OFF;--> statement-breakpoint
31
+ CREATE TABLE `__new_registry_agent_components` (
32
+ `agent_slug` text NOT NULL,
33
+ `component_slug` text NOT NULL,
34
+ `position` integer NOT NULL,
35
+ `version_pin` integer,
36
+ `context_condition` text,
37
+ `is_required` integer DEFAULT false NOT NULL,
38
+ PRIMARY KEY(`agent_slug`, `component_slug`, `position`),
39
+ FOREIGN KEY (`agent_slug`) REFERENCES `registry_agents`(`slug`) ON UPDATE no action ON DELETE no action,
40
+ FOREIGN KEY (`component_slug`) REFERENCES `registry_components`(`slug`) ON UPDATE no action ON DELETE no action,
41
+ FOREIGN KEY (`version_pin`) REFERENCES `registry_component_versions`(`version_id`) ON UPDATE no action ON DELETE no action
42
+ );
43
+ --> statement-breakpoint
44
+ INSERT INTO `__new_registry_agent_components`("agent_slug", "component_slug", "position", "version_pin", "context_condition", "is_required") SELECT "agent_slug", "component_slug", "position", "version_pin", "context_condition", "is_required" FROM `registry_agent_components`;--> statement-breakpoint
45
+ DROP TABLE `registry_agent_components`;--> statement-breakpoint
46
+ ALTER TABLE `__new_registry_agent_components` RENAME TO `registry_agent_components`;--> statement-breakpoint
47
+ PRAGMA foreign_keys=ON;--> statement-breakpoint
48
+ CREATE INDEX `registry_agent_components_agent_idx` ON `registry_agent_components` (`agent_slug`);--> statement-breakpoint
49
+ CREATE INDEX `registry_agent_components_position_idx` ON `registry_agent_components` (`agent_slug`,`position`);--> statement-breakpoint
50
+ CREATE TABLE `__new_registry_component_usage` (
51
+ `component_slug` text NOT NULL,
52
+ `use_case_slug` text NOT NULL,
53
+ `weight` integer,
54
+ PRIMARY KEY(`component_slug`, `use_case_slug`),
55
+ FOREIGN KEY (`component_slug`) REFERENCES `registry_components`(`slug`) ON UPDATE no action ON DELETE no action,
56
+ FOREIGN KEY (`use_case_slug`) REFERENCES `registry_use_cases`(`slug`) ON UPDATE no action ON DELETE no action
57
+ );
58
+ --> statement-breakpoint
59
+ INSERT INTO `__new_registry_component_usage`("component_slug", "use_case_slug", "weight") SELECT "component_slug", "use_case_slug", "weight" FROM `registry_component_usage`;--> statement-breakpoint
60
+ DROP TABLE `registry_component_usage`;--> statement-breakpoint
61
+ ALTER TABLE `__new_registry_component_usage` RENAME TO `registry_component_usage`;--> statement-breakpoint
62
+ CREATE INDEX `registry_component_usage_use_case_idx` ON `registry_component_usage` (`use_case_slug`);--> statement-breakpoint
63
+ CREATE INDEX `registry_component_usage_component_idx` ON `registry_component_usage` (`component_slug`);--> statement-breakpoint
64
+ CREATE TABLE `__new_registry_context_rules` (
65
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
66
+ `agent_slug` text NOT NULL,
67
+ `condition` text NOT NULL,
68
+ `component_slug` text NOT NULL,
69
+ `position` integer,
70
+ FOREIGN KEY (`agent_slug`) REFERENCES `registry_agents`(`slug`) ON UPDATE no action ON DELETE no action,
71
+ FOREIGN KEY (`component_slug`) REFERENCES `registry_components`(`slug`) ON UPDATE no action ON DELETE no action
72
+ );
73
+ --> statement-breakpoint
74
+ INSERT INTO `__new_registry_context_rules`("id", "agent_slug", "condition", "component_slug", "position") SELECT "id", "agent_slug", "condition", "component_slug", "position" FROM `registry_context_rules`;--> statement-breakpoint
75
+ DROP TABLE `registry_context_rules`;--> statement-breakpoint
76
+ ALTER TABLE `__new_registry_context_rules` RENAME TO `registry_context_rules`;--> statement-breakpoint
77
+ CREATE INDEX `registry_context_rules_agent_idx` ON `registry_context_rules` (`agent_slug`);--> statement-breakpoint
78
+ CREATE INDEX `registry_context_rules_component_idx` ON `registry_context_rules` (`component_slug`);
@@ -0,0 +1,137 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "f17729f3-5f7b-42d1-a828-54490f58d6a9",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "registry_prompt_components": {
8
+ "name": "registry_prompt_components",
9
+ "columns": {
10
+ "slug": {
11
+ "name": "slug",
12
+ "type": "text",
13
+ "primaryKey": false,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "type": {
18
+ "name": "type",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "version": {
25
+ "name": "version",
26
+ "type": "integer",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false,
30
+ "default": 1
31
+ },
32
+ "content": {
33
+ "name": "content",
34
+ "type": "text",
35
+ "primaryKey": false,
36
+ "notNull": true,
37
+ "autoincrement": false
38
+ },
39
+ "is_shared": {
40
+ "name": "is_shared",
41
+ "type": "integer",
42
+ "primaryKey": false,
43
+ "notNull": true,
44
+ "autoincrement": false,
45
+ "default": false
46
+ },
47
+ "created_at": {
48
+ "name": "created_at",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": true,
52
+ "autoincrement": false
53
+ },
54
+ "updated_at": {
55
+ "name": "updated_at",
56
+ "type": "text",
57
+ "primaryKey": false,
58
+ "notNull": true,
59
+ "autoincrement": false
60
+ }
61
+ },
62
+ "indexes": {
63
+ "registry_prompt_components_pkey": {
64
+ "name": "registry_prompt_components_pkey",
65
+ "columns": ["slug", "version"],
66
+ "isUnique": false
67
+ },
68
+ "registry_prompt_components_slug_idx": {
69
+ "name": "registry_prompt_components_slug_idx",
70
+ "columns": ["slug"],
71
+ "isUnique": false
72
+ },
73
+ "registry_prompt_components_type_idx": {
74
+ "name": "registry_prompt_components_type_idx",
75
+ "columns": ["type"],
76
+ "isUnique": false
77
+ }
78
+ },
79
+ "foreignKeys": {
80
+ "registry_prompt_components_type_registry_prompt_types_slug_fk": {
81
+ "name": "registry_prompt_components_type_registry_prompt_types_slug_fk",
82
+ "tableFrom": "registry_prompt_components",
83
+ "tableTo": "registry_prompt_types",
84
+ "columnsFrom": ["type"],
85
+ "columnsTo": ["slug"],
86
+ "onDelete": "no action",
87
+ "onUpdate": "no action"
88
+ }
89
+ },
90
+ "compositePrimaryKeys": {},
91
+ "uniqueConstraints": {},
92
+ "checkConstraints": {}
93
+ },
94
+ "registry_prompt_types": {
95
+ "name": "registry_prompt_types",
96
+ "columns": {
97
+ "slug": {
98
+ "name": "slug",
99
+ "type": "text",
100
+ "primaryKey": true,
101
+ "notNull": true,
102
+ "autoincrement": false
103
+ },
104
+ "description": {
105
+ "name": "description",
106
+ "type": "text",
107
+ "primaryKey": false,
108
+ "notNull": true,
109
+ "autoincrement": false
110
+ },
111
+ "is_system": {
112
+ "name": "is_system",
113
+ "type": "integer",
114
+ "primaryKey": false,
115
+ "notNull": true,
116
+ "autoincrement": false,
117
+ "default": false
118
+ }
119
+ },
120
+ "indexes": {},
121
+ "foreignKeys": {},
122
+ "compositePrimaryKeys": {},
123
+ "uniqueConstraints": {},
124
+ "checkConstraints": {}
125
+ }
126
+ },
127
+ "views": {},
128
+ "enums": {},
129
+ "_meta": {
130
+ "schemas": {},
131
+ "tables": {},
132
+ "columns": {}
133
+ },
134
+ "internal": {
135
+ "indexes": {}
136
+ }
137
+ }
@@ -0,0 +1,302 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "29246c4f-899b-403b-8e18-51d0e3d4e254",
5
+ "prevId": "f17729f3-5f7b-42d1-a828-54490f58d6a9",
6
+ "tables": {
7
+ "registry_agents": {
8
+ "name": "registry_agents",
9
+ "columns": {
10
+ "slug": {
11
+ "name": "slug",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "display_name": {
18
+ "name": "display_name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "description": {
25
+ "name": "description",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false,
30
+ "default": "''"
31
+ },
32
+ "status": {
33
+ "name": "status",
34
+ "type": "text",
35
+ "primaryKey": false,
36
+ "notNull": true,
37
+ "autoincrement": false,
38
+ "default": "'draft'"
39
+ },
40
+ "model_hint": {
41
+ "name": "model_hint",
42
+ "type": "text",
43
+ "primaryKey": false,
44
+ "notNull": false,
45
+ "autoincrement": false
46
+ },
47
+ "taxonomy_category": {
48
+ "name": "taxonomy_category",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": false,
52
+ "autoincrement": false
53
+ },
54
+ "default_posture": {
55
+ "name": "default_posture",
56
+ "type": "text",
57
+ "primaryKey": false,
58
+ "notNull": true,
59
+ "autoincrement": false,
60
+ "default": "'needs_work'"
61
+ },
62
+ "created_at": {
63
+ "name": "created_at",
64
+ "type": "text",
65
+ "primaryKey": false,
66
+ "notNull": true,
67
+ "autoincrement": false
68
+ },
69
+ "updated_at": {
70
+ "name": "updated_at",
71
+ "type": "text",
72
+ "primaryKey": false,
73
+ "notNull": true,
74
+ "autoincrement": false
75
+ }
76
+ },
77
+ "indexes": {
78
+ "registry_agents_status_idx": {
79
+ "name": "registry_agents_status_idx",
80
+ "columns": ["status"],
81
+ "isUnique": false
82
+ },
83
+ "registry_agents_category_idx": {
84
+ "name": "registry_agents_category_idx",
85
+ "columns": ["taxonomy_category"],
86
+ "isUnique": false
87
+ }
88
+ },
89
+ "foreignKeys": {
90
+ "registry_agents_taxonomy_category_registry_taxonomy_categories_slug_fk": {
91
+ "name": "registry_agents_taxonomy_category_registry_taxonomy_categories_slug_fk",
92
+ "tableFrom": "registry_agents",
93
+ "tableTo": "registry_taxonomy_categories",
94
+ "columnsFrom": ["taxonomy_category"],
95
+ "columnsTo": ["slug"],
96
+ "onDelete": "no action",
97
+ "onUpdate": "no action"
98
+ }
99
+ },
100
+ "compositePrimaryKeys": {},
101
+ "uniqueConstraints": {},
102
+ "checkConstraints": {}
103
+ },
104
+ "registry_prompt_components": {
105
+ "name": "registry_prompt_components",
106
+ "columns": {
107
+ "slug": {
108
+ "name": "slug",
109
+ "type": "text",
110
+ "primaryKey": false,
111
+ "notNull": true,
112
+ "autoincrement": false
113
+ },
114
+ "type": {
115
+ "name": "type",
116
+ "type": "text",
117
+ "primaryKey": false,
118
+ "notNull": true,
119
+ "autoincrement": false
120
+ },
121
+ "version": {
122
+ "name": "version",
123
+ "type": "integer",
124
+ "primaryKey": false,
125
+ "notNull": true,
126
+ "autoincrement": false,
127
+ "default": 1
128
+ },
129
+ "content": {
130
+ "name": "content",
131
+ "type": "text",
132
+ "primaryKey": false,
133
+ "notNull": true,
134
+ "autoincrement": false
135
+ },
136
+ "is_shared": {
137
+ "name": "is_shared",
138
+ "type": "integer",
139
+ "primaryKey": false,
140
+ "notNull": true,
141
+ "autoincrement": false,
142
+ "default": false
143
+ },
144
+ "created_at": {
145
+ "name": "created_at",
146
+ "type": "text",
147
+ "primaryKey": false,
148
+ "notNull": true,
149
+ "autoincrement": false
150
+ },
151
+ "updated_at": {
152
+ "name": "updated_at",
153
+ "type": "text",
154
+ "primaryKey": false,
155
+ "notNull": true,
156
+ "autoincrement": false
157
+ }
158
+ },
159
+ "indexes": {
160
+ "registry_prompt_components_pkey": {
161
+ "name": "registry_prompt_components_pkey",
162
+ "columns": ["slug", "version"],
163
+ "isUnique": false
164
+ },
165
+ "registry_prompt_components_slug_idx": {
166
+ "name": "registry_prompt_components_slug_idx",
167
+ "columns": ["slug"],
168
+ "isUnique": false
169
+ },
170
+ "registry_prompt_components_type_idx": {
171
+ "name": "registry_prompt_components_type_idx",
172
+ "columns": ["type"],
173
+ "isUnique": false
174
+ }
175
+ },
176
+ "foreignKeys": {
177
+ "registry_prompt_components_type_registry_prompt_types_slug_fk": {
178
+ "name": "registry_prompt_components_type_registry_prompt_types_slug_fk",
179
+ "tableFrom": "registry_prompt_components",
180
+ "tableTo": "registry_prompt_types",
181
+ "columnsFrom": ["type"],
182
+ "columnsTo": ["slug"],
183
+ "onDelete": "no action",
184
+ "onUpdate": "no action"
185
+ }
186
+ },
187
+ "compositePrimaryKeys": {},
188
+ "uniqueConstraints": {},
189
+ "checkConstraints": {}
190
+ },
191
+ "registry_prompt_types": {
192
+ "name": "registry_prompt_types",
193
+ "columns": {
194
+ "slug": {
195
+ "name": "slug",
196
+ "type": "text",
197
+ "primaryKey": true,
198
+ "notNull": true,
199
+ "autoincrement": false
200
+ },
201
+ "description": {
202
+ "name": "description",
203
+ "type": "text",
204
+ "primaryKey": false,
205
+ "notNull": true,
206
+ "autoincrement": false
207
+ },
208
+ "is_system": {
209
+ "name": "is_system",
210
+ "type": "integer",
211
+ "primaryKey": false,
212
+ "notNull": true,
213
+ "autoincrement": false,
214
+ "default": false
215
+ }
216
+ },
217
+ "indexes": {},
218
+ "foreignKeys": {},
219
+ "compositePrimaryKeys": {},
220
+ "uniqueConstraints": {},
221
+ "checkConstraints": {}
222
+ },
223
+ "registry_taxonomy_categories": {
224
+ "name": "registry_taxonomy_categories",
225
+ "columns": {
226
+ "slug": {
227
+ "name": "slug",
228
+ "type": "text",
229
+ "primaryKey": true,
230
+ "notNull": true,
231
+ "autoincrement": false
232
+ },
233
+ "name": {
234
+ "name": "name",
235
+ "type": "text",
236
+ "primaryKey": false,
237
+ "notNull": true,
238
+ "autoincrement": false
239
+ },
240
+ "description": {
241
+ "name": "description",
242
+ "type": "text",
243
+ "primaryKey": false,
244
+ "notNull": true,
245
+ "autoincrement": false,
246
+ "default": "''"
247
+ },
248
+ "position": {
249
+ "name": "position",
250
+ "type": "integer",
251
+ "primaryKey": false,
252
+ "notNull": true,
253
+ "autoincrement": false,
254
+ "default": 0
255
+ },
256
+ "parent_slug": {
257
+ "name": "parent_slug",
258
+ "type": "text",
259
+ "primaryKey": false,
260
+ "notNull": false,
261
+ "autoincrement": false
262
+ }
263
+ },
264
+ "indexes": {
265
+ "registry_taxonomy_categories_position_idx": {
266
+ "name": "registry_taxonomy_categories_position_idx",
267
+ "columns": ["position"],
268
+ "isUnique": false
269
+ },
270
+ "registry_taxonomy_categories_parent_idx": {
271
+ "name": "registry_taxonomy_categories_parent_idx",
272
+ "columns": ["parent_slug"],
273
+ "isUnique": false
274
+ }
275
+ },
276
+ "foreignKeys": {
277
+ "registry_taxonomy_categories_parent_slug_registry_taxonomy_categories_slug_fk": {
278
+ "name": "registry_taxonomy_categories_parent_slug_registry_taxonomy_categories_slug_fk",
279
+ "tableFrom": "registry_taxonomy_categories",
280
+ "tableTo": "registry_taxonomy_categories",
281
+ "columnsFrom": ["parent_slug"],
282
+ "columnsTo": ["slug"],
283
+ "onDelete": "no action",
284
+ "onUpdate": "no action"
285
+ }
286
+ },
287
+ "compositePrimaryKeys": {},
288
+ "uniqueConstraints": {},
289
+ "checkConstraints": {}
290
+ }
291
+ },
292
+ "views": {},
293
+ "enums": {},
294
+ "_meta": {
295
+ "schemas": {},
296
+ "tables": {},
297
+ "columns": {}
298
+ },
299
+ "internal": {
300
+ "indexes": {}
301
+ }
302
+ }