@adhd/agent-store-tools 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 (66) hide show
  1. package/drizzle/0000_dry_roulette.sql +18 -0
  2. package/drizzle/0001_gray_talkback.sql +20 -0
  3. package/drizzle/0002_aberrant_blink.sql +7 -0
  4. package/drizzle/0003_foamy_otto_octavius.sql +10 -0
  5. package/drizzle/meta/0000_snapshot.json +129 -0
  6. package/drizzle/meta/0001_snapshot.json +251 -0
  7. package/drizzle/meta/0002_snapshot.json +298 -0
  8. package/drizzle/meta/0003_snapshot.json +358 -0
  9. package/drizzle/meta/_journal.json +34 -0
  10. package/package.json +50 -0
  11. package/src/db/client.d.ts +7 -0
  12. package/src/db/client.d.ts.map +1 -0
  13. package/src/db/client.js +18 -0
  14. package/src/db/client.js.map +1 -0
  15. package/src/db/migrate-runner.d.ts +30 -0
  16. package/src/db/migrate-runner.d.ts.map +1 -0
  17. package/src/db/migrate-runner.js +34 -0
  18. package/src/db/migrate-runner.js.map +1 -0
  19. package/src/db/migrate.d.ts +9 -0
  20. package/src/db/migrate.d.ts.map +1 -0
  21. package/src/db/migrate.js +13 -0
  22. package/src/db/migrate.js.map +1 -0
  23. package/src/db/schema.d.ts +584 -0
  24. package/src/db/schema.d.ts.map +1 -0
  25. package/src/db/schema.js +150 -0
  26. package/src/db/schema.js.map +1 -0
  27. package/src/index.d.ts +13 -0
  28. package/src/index.d.ts.map +1 -0
  29. package/src/index.js +11 -0
  30. package/src/index.js.map +1 -0
  31. package/src/seed/bindings.d.ts +21 -0
  32. package/src/seed/bindings.d.ts.map +1 -0
  33. package/src/seed/bindings.js +167 -0
  34. package/src/seed/bindings.js.map +1 -0
  35. package/src/seed/index.d.ts +29 -0
  36. package/src/seed/index.d.ts.map +1 -0
  37. package/src/seed/index.js +80 -0
  38. package/src/seed/index.js.map +1 -0
  39. package/src/seed/platforms.d.ts +17 -0
  40. package/src/seed/platforms.d.ts.map +1 -0
  41. package/src/seed/platforms.js +48 -0
  42. package/src/seed/platforms.js.map +1 -0
  43. package/src/seed/tool-types.d.ts +15 -0
  44. package/src/seed/tool-types.d.ts.map +1 -0
  45. package/src/seed/tool-types.js +35 -0
  46. package/src/seed/tool-types.js.map +1 -0
  47. package/src/seed/tools.d.ts +18 -0
  48. package/src/seed/tools.d.ts.map +1 -0
  49. package/src/seed/tools.js +117 -0
  50. package/src/seed/tools.js.map +1 -0
  51. package/src/store/agent-tool-store.d.ts +63 -0
  52. package/src/store/agent-tool-store.d.ts.map +1 -0
  53. package/src/store/agent-tool-store.js +100 -0
  54. package/src/store/agent-tool-store.js.map +1 -0
  55. package/src/store/binding-store.d.ts +75 -0
  56. package/src/store/binding-store.d.ts.map +1 -0
  57. package/src/store/binding-store.js +144 -0
  58. package/src/store/binding-store.js.map +1 -0
  59. package/src/store/mcp-server-store.d.ts +46 -0
  60. package/src/store/mcp-server-store.d.ts.map +1 -0
  61. package/src/store/mcp-server-store.js +89 -0
  62. package/src/store/mcp-server-store.js.map +1 -0
  63. package/src/store/tool-store.d.ts +55 -0
  64. package/src/store/tool-store.d.ts.map +1 -0
  65. package/src/store/tool-store.js +115 -0
  66. package/src/store/tool-store.js.map +1 -0
@@ -0,0 +1,18 @@
1
+ CREATE TABLE `tool_types` (
2
+ `slug` text PRIMARY KEY NOT NULL,
3
+ `description` text NOT NULL
4
+ );
5
+ --> statement-breakpoint
6
+ CREATE TABLE `tools` (
7
+ `name` text PRIMARY KEY NOT NULL,
8
+ `type` text NOT NULL,
9
+ `description` text NOT NULL,
10
+ `version` integer DEFAULT 1 NOT NULL,
11
+ `requires_approval` integer DEFAULT false NOT NULL,
12
+ `is_destructive` integer DEFAULT false NOT NULL,
13
+ `dependency_tool_ids` text DEFAULT '[]' NOT NULL,
14
+ `capabilities` text DEFAULT '[]' NOT NULL,
15
+ FOREIGN KEY (`type`) REFERENCES `tool_types`(`slug`) ON UPDATE no action ON DELETE no action
16
+ );
17
+ --> statement-breakpoint
18
+ CREATE INDEX `idx_tools_type` ON `tools` (`type`);
@@ -0,0 +1,20 @@
1
+ CREATE TABLE `platforms` (
2
+ `id` text PRIMARY KEY NOT NULL,
3
+ `name` text NOT NULL,
4
+ `header_format` text NOT NULL,
5
+ `supports_tool_selection` integer DEFAULT false NOT NULL
6
+ );
7
+ --> statement-breakpoint
8
+ CREATE TABLE `tool_platform_bindings` (
9
+ `tool_name` text NOT NULL,
10
+ `platform_id` text NOT NULL,
11
+ `platform_tool_name` text NOT NULL,
12
+ `availability` text NOT NULL,
13
+ `requires_mcp` integer DEFAULT false NOT NULL,
14
+ `invocation_note` text,
15
+ PRIMARY KEY(`tool_name`, `platform_id`),
16
+ FOREIGN KEY (`tool_name`) REFERENCES `tools`(`name`) ON UPDATE no action ON DELETE no action,
17
+ FOREIGN KEY (`platform_id`) REFERENCES `platforms`(`id`) ON UPDATE no action ON DELETE no action
18
+ );
19
+ --> statement-breakpoint
20
+ CREATE INDEX `idx_bindings_platform` ON `tool_platform_bindings` (`platform_id`);
@@ -0,0 +1,7 @@
1
+ CREATE TABLE `mcp_servers` (
2
+ `id` text PRIMARY KEY NOT NULL,
3
+ `transport` text NOT NULL,
4
+ `name` text NOT NULL,
5
+ `provided_tool_ids` text DEFAULT '[]' NOT NULL,
6
+ `config_schema` text DEFAULT '{}' NOT NULL
7
+ );
@@ -0,0 +1,10 @@
1
+ CREATE TABLE `agent_tools` (
2
+ `agent_slug` text NOT NULL,
3
+ `tool_name` text NOT NULL,
4
+ `permission` text NOT NULL,
5
+ `context_condition` text DEFAULT 'null',
6
+ PRIMARY KEY(`agent_slug`, `tool_name`),
7
+ FOREIGN KEY (`tool_name`) REFERENCES `tools`(`name`) ON UPDATE no action ON DELETE no action
8
+ );
9
+ --> statement-breakpoint
10
+ CREATE INDEX `idx_agent_tools_agent_slug` ON `agent_tools` (`agent_slug`);
@@ -0,0 +1,129 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "a009191a-4ba7-4ba5-a0b6-b05760192cf3",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "tool_types": {
8
+ "name": "tool_types",
9
+ "columns": {
10
+ "slug": {
11
+ "name": "slug",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "description": {
18
+ "name": "description",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ }
24
+ },
25
+ "indexes": {},
26
+ "foreignKeys": {},
27
+ "compositePrimaryKeys": {},
28
+ "uniqueConstraints": {},
29
+ "checkConstraints": {}
30
+ },
31
+ "tools": {
32
+ "name": "tools",
33
+ "columns": {
34
+ "name": {
35
+ "name": "name",
36
+ "type": "text",
37
+ "primaryKey": true,
38
+ "notNull": true,
39
+ "autoincrement": false
40
+ },
41
+ "type": {
42
+ "name": "type",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": true,
46
+ "autoincrement": false
47
+ },
48
+ "description": {
49
+ "name": "description",
50
+ "type": "text",
51
+ "primaryKey": false,
52
+ "notNull": true,
53
+ "autoincrement": false
54
+ },
55
+ "version": {
56
+ "name": "version",
57
+ "type": "integer",
58
+ "primaryKey": false,
59
+ "notNull": true,
60
+ "autoincrement": false,
61
+ "default": 1
62
+ },
63
+ "requires_approval": {
64
+ "name": "requires_approval",
65
+ "type": "integer",
66
+ "primaryKey": false,
67
+ "notNull": true,
68
+ "autoincrement": false,
69
+ "default": false
70
+ },
71
+ "is_destructive": {
72
+ "name": "is_destructive",
73
+ "type": "integer",
74
+ "primaryKey": false,
75
+ "notNull": true,
76
+ "autoincrement": false,
77
+ "default": false
78
+ },
79
+ "dependency_tool_ids": {
80
+ "name": "dependency_tool_ids",
81
+ "type": "text",
82
+ "primaryKey": false,
83
+ "notNull": true,
84
+ "autoincrement": false,
85
+ "default": "'[]'"
86
+ },
87
+ "capabilities": {
88
+ "name": "capabilities",
89
+ "type": "text",
90
+ "primaryKey": false,
91
+ "notNull": true,
92
+ "autoincrement": false,
93
+ "default": "'[]'"
94
+ }
95
+ },
96
+ "indexes": {
97
+ "idx_tools_type": {
98
+ "name": "idx_tools_type",
99
+ "columns": ["type"],
100
+ "isUnique": false
101
+ }
102
+ },
103
+ "foreignKeys": {
104
+ "tools_type_tool_types_slug_fk": {
105
+ "name": "tools_type_tool_types_slug_fk",
106
+ "tableFrom": "tools",
107
+ "tableTo": "tool_types",
108
+ "columnsFrom": ["type"],
109
+ "columnsTo": ["slug"],
110
+ "onDelete": "no action",
111
+ "onUpdate": "no action"
112
+ }
113
+ },
114
+ "compositePrimaryKeys": {},
115
+ "uniqueConstraints": {},
116
+ "checkConstraints": {}
117
+ }
118
+ },
119
+ "views": {},
120
+ "enums": {},
121
+ "_meta": {
122
+ "schemas": {},
123
+ "tables": {},
124
+ "columns": {}
125
+ },
126
+ "internal": {
127
+ "indexes": {}
128
+ }
129
+ }
@@ -0,0 +1,251 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "5fc1cf5d-4101-429f-b2b1-b138abf4935e",
5
+ "prevId": "a009191a-4ba7-4ba5-a0b6-b05760192cf3",
6
+ "tables": {
7
+ "platforms": {
8
+ "name": "platforms",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "name": {
18
+ "name": "name",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "header_format": {
25
+ "name": "header_format",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "supports_tool_selection": {
32
+ "name": "supports_tool_selection",
33
+ "type": "integer",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false,
37
+ "default": false
38
+ }
39
+ },
40
+ "indexes": {},
41
+ "foreignKeys": {},
42
+ "compositePrimaryKeys": {},
43
+ "uniqueConstraints": {},
44
+ "checkConstraints": {}
45
+ },
46
+ "tool_platform_bindings": {
47
+ "name": "tool_platform_bindings",
48
+ "columns": {
49
+ "tool_name": {
50
+ "name": "tool_name",
51
+ "type": "text",
52
+ "primaryKey": false,
53
+ "notNull": true,
54
+ "autoincrement": false
55
+ },
56
+ "platform_id": {
57
+ "name": "platform_id",
58
+ "type": "text",
59
+ "primaryKey": false,
60
+ "notNull": true,
61
+ "autoincrement": false
62
+ },
63
+ "platform_tool_name": {
64
+ "name": "platform_tool_name",
65
+ "type": "text",
66
+ "primaryKey": false,
67
+ "notNull": true,
68
+ "autoincrement": false
69
+ },
70
+ "availability": {
71
+ "name": "availability",
72
+ "type": "text",
73
+ "primaryKey": false,
74
+ "notNull": true,
75
+ "autoincrement": false
76
+ },
77
+ "requires_mcp": {
78
+ "name": "requires_mcp",
79
+ "type": "integer",
80
+ "primaryKey": false,
81
+ "notNull": true,
82
+ "autoincrement": false,
83
+ "default": false
84
+ },
85
+ "invocation_note": {
86
+ "name": "invocation_note",
87
+ "type": "text",
88
+ "primaryKey": false,
89
+ "notNull": false,
90
+ "autoincrement": false
91
+ }
92
+ },
93
+ "indexes": {
94
+ "idx_bindings_platform": {
95
+ "name": "idx_bindings_platform",
96
+ "columns": ["platform_id"],
97
+ "isUnique": false
98
+ }
99
+ },
100
+ "foreignKeys": {
101
+ "tool_platform_bindings_tool_name_tools_name_fk": {
102
+ "name": "tool_platform_bindings_tool_name_tools_name_fk",
103
+ "tableFrom": "tool_platform_bindings",
104
+ "tableTo": "tools",
105
+ "columnsFrom": ["tool_name"],
106
+ "columnsTo": ["name"],
107
+ "onDelete": "no action",
108
+ "onUpdate": "no action"
109
+ },
110
+ "tool_platform_bindings_platform_id_platforms_id_fk": {
111
+ "name": "tool_platform_bindings_platform_id_platforms_id_fk",
112
+ "tableFrom": "tool_platform_bindings",
113
+ "tableTo": "platforms",
114
+ "columnsFrom": ["platform_id"],
115
+ "columnsTo": ["id"],
116
+ "onDelete": "no action",
117
+ "onUpdate": "no action"
118
+ }
119
+ },
120
+ "compositePrimaryKeys": {
121
+ "tool_platform_bindings_tool_name_platform_id_pk": {
122
+ "columns": ["tool_name", "platform_id"],
123
+ "name": "tool_platform_bindings_tool_name_platform_id_pk"
124
+ }
125
+ },
126
+ "uniqueConstraints": {},
127
+ "checkConstraints": {}
128
+ },
129
+ "tool_types": {
130
+ "name": "tool_types",
131
+ "columns": {
132
+ "slug": {
133
+ "name": "slug",
134
+ "type": "text",
135
+ "primaryKey": true,
136
+ "notNull": true,
137
+ "autoincrement": false
138
+ },
139
+ "description": {
140
+ "name": "description",
141
+ "type": "text",
142
+ "primaryKey": false,
143
+ "notNull": true,
144
+ "autoincrement": false
145
+ }
146
+ },
147
+ "indexes": {},
148
+ "foreignKeys": {},
149
+ "compositePrimaryKeys": {},
150
+ "uniqueConstraints": {},
151
+ "checkConstraints": {}
152
+ },
153
+ "tools": {
154
+ "name": "tools",
155
+ "columns": {
156
+ "name": {
157
+ "name": "name",
158
+ "type": "text",
159
+ "primaryKey": true,
160
+ "notNull": true,
161
+ "autoincrement": false
162
+ },
163
+ "type": {
164
+ "name": "type",
165
+ "type": "text",
166
+ "primaryKey": false,
167
+ "notNull": true,
168
+ "autoincrement": false
169
+ },
170
+ "description": {
171
+ "name": "description",
172
+ "type": "text",
173
+ "primaryKey": false,
174
+ "notNull": true,
175
+ "autoincrement": false
176
+ },
177
+ "version": {
178
+ "name": "version",
179
+ "type": "integer",
180
+ "primaryKey": false,
181
+ "notNull": true,
182
+ "autoincrement": false,
183
+ "default": 1
184
+ },
185
+ "requires_approval": {
186
+ "name": "requires_approval",
187
+ "type": "integer",
188
+ "primaryKey": false,
189
+ "notNull": true,
190
+ "autoincrement": false,
191
+ "default": false
192
+ },
193
+ "is_destructive": {
194
+ "name": "is_destructive",
195
+ "type": "integer",
196
+ "primaryKey": false,
197
+ "notNull": true,
198
+ "autoincrement": false,
199
+ "default": false
200
+ },
201
+ "dependency_tool_ids": {
202
+ "name": "dependency_tool_ids",
203
+ "type": "text",
204
+ "primaryKey": false,
205
+ "notNull": true,
206
+ "autoincrement": false,
207
+ "default": "'[]'"
208
+ },
209
+ "capabilities": {
210
+ "name": "capabilities",
211
+ "type": "text",
212
+ "primaryKey": false,
213
+ "notNull": true,
214
+ "autoincrement": false,
215
+ "default": "'[]'"
216
+ }
217
+ },
218
+ "indexes": {
219
+ "idx_tools_type": {
220
+ "name": "idx_tools_type",
221
+ "columns": ["type"],
222
+ "isUnique": false
223
+ }
224
+ },
225
+ "foreignKeys": {
226
+ "tools_type_tool_types_slug_fk": {
227
+ "name": "tools_type_tool_types_slug_fk",
228
+ "tableFrom": "tools",
229
+ "tableTo": "tool_types",
230
+ "columnsFrom": ["type"],
231
+ "columnsTo": ["slug"],
232
+ "onDelete": "no action",
233
+ "onUpdate": "no action"
234
+ }
235
+ },
236
+ "compositePrimaryKeys": {},
237
+ "uniqueConstraints": {},
238
+ "checkConstraints": {}
239
+ }
240
+ },
241
+ "views": {},
242
+ "enums": {},
243
+ "_meta": {
244
+ "schemas": {},
245
+ "tables": {},
246
+ "columns": {}
247
+ },
248
+ "internal": {
249
+ "indexes": {}
250
+ }
251
+ }