@adhd/agent-mcp 0.0.3 → 0.0.4
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.
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
CREATE TABLE `agents` (
|
|
2
|
+
`name` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`version` integer DEFAULT 1 NOT NULL,
|
|
4
|
+
`data` text NOT NULL,
|
|
5
|
+
`created_at` text NOT NULL,
|
|
6
|
+
`updated_at` text NOT NULL
|
|
7
|
+
);
|
|
8
|
+
--> statement-breakpoint
|
|
9
|
+
CREATE TABLE `messages` (
|
|
10
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
11
|
+
`session_id` text NOT NULL,
|
|
12
|
+
`role` text NOT NULL,
|
|
13
|
+
`content` text,
|
|
14
|
+
`tool_calls` text,
|
|
15
|
+
`tool_results` text,
|
|
16
|
+
`created_at` text NOT NULL,
|
|
17
|
+
FOREIGN KEY (`session_id`) REFERENCES `sessions`(`id`) ON UPDATE no action ON DELETE cascade
|
|
18
|
+
);
|
|
19
|
+
--> statement-breakpoint
|
|
20
|
+
CREATE TABLE `sessions` (
|
|
21
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
22
|
+
`agent_name` text NOT NULL,
|
|
23
|
+
`agent_version` integer NOT NULL,
|
|
24
|
+
`agent_data` text NOT NULL,
|
|
25
|
+
`status` text DEFAULT 'active' NOT NULL,
|
|
26
|
+
`created_at` text NOT NULL,
|
|
27
|
+
`updated_at` text NOT NULL,
|
|
28
|
+
`closed_at` text,
|
|
29
|
+
FOREIGN KEY (`agent_name`) REFERENCES `agents`(`name`) ON UPDATE no action ON DELETE cascade
|
|
30
|
+
);
|
|
31
|
+
--> statement-breakpoint
|
|
32
|
+
CREATE TABLE `task_events` (
|
|
33
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
34
|
+
`task_id` text NOT NULL,
|
|
35
|
+
`type` text NOT NULL,
|
|
36
|
+
`payload` text,
|
|
37
|
+
`created_at` text NOT NULL,
|
|
38
|
+
FOREIGN KEY (`task_id`) REFERENCES `tasks`(`id`) ON UPDATE no action ON DELETE cascade
|
|
39
|
+
);
|
|
40
|
+
--> statement-breakpoint
|
|
41
|
+
CREATE TABLE `tasks` (
|
|
42
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
43
|
+
`session_id` text NOT NULL,
|
|
44
|
+
`parent_task_id` text,
|
|
45
|
+
`recursion_depth` integer DEFAULT 0 NOT NULL,
|
|
46
|
+
`status` text DEFAULT 'pending' NOT NULL,
|
|
47
|
+
`prompt` text NOT NULL,
|
|
48
|
+
`result` text,
|
|
49
|
+
`error` text,
|
|
50
|
+
`created_at` text NOT NULL,
|
|
51
|
+
`updated_at` text NOT NULL,
|
|
52
|
+
`completed_at` text,
|
|
53
|
+
`cancelled_at` text,
|
|
54
|
+
FOREIGN KEY (`session_id`) REFERENCES `sessions`(`id`) ON UPDATE no action ON DELETE cascade
|
|
55
|
+
);
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "2d4aefae-8746-4f36-9d30-5eac97187370",
|
|
5
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
|
+
"tables": {
|
|
7
|
+
"agents": {
|
|
8
|
+
"name": "agents",
|
|
9
|
+
"columns": {
|
|
10
|
+
"name": {
|
|
11
|
+
"name": "name",
|
|
12
|
+
"type": "text",
|
|
13
|
+
"primaryKey": true,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": false
|
|
16
|
+
},
|
|
17
|
+
"version": {
|
|
18
|
+
"name": "version",
|
|
19
|
+
"type": "integer",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true,
|
|
22
|
+
"autoincrement": false,
|
|
23
|
+
"default": 1
|
|
24
|
+
},
|
|
25
|
+
"data": {
|
|
26
|
+
"name": "data",
|
|
27
|
+
"type": "text",
|
|
28
|
+
"primaryKey": false,
|
|
29
|
+
"notNull": true,
|
|
30
|
+
"autoincrement": false
|
|
31
|
+
},
|
|
32
|
+
"created_at": {
|
|
33
|
+
"name": "created_at",
|
|
34
|
+
"type": "text",
|
|
35
|
+
"primaryKey": false,
|
|
36
|
+
"notNull": true,
|
|
37
|
+
"autoincrement": false
|
|
38
|
+
},
|
|
39
|
+
"updated_at": {
|
|
40
|
+
"name": "updated_at",
|
|
41
|
+
"type": "text",
|
|
42
|
+
"primaryKey": false,
|
|
43
|
+
"notNull": true,
|
|
44
|
+
"autoincrement": false
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"indexes": {},
|
|
48
|
+
"foreignKeys": {},
|
|
49
|
+
"compositePrimaryKeys": {},
|
|
50
|
+
"uniqueConstraints": {},
|
|
51
|
+
"checkConstraints": {}
|
|
52
|
+
},
|
|
53
|
+
"messages": {
|
|
54
|
+
"name": "messages",
|
|
55
|
+
"columns": {
|
|
56
|
+
"id": {
|
|
57
|
+
"name": "id",
|
|
58
|
+
"type": "text",
|
|
59
|
+
"primaryKey": true,
|
|
60
|
+
"notNull": true,
|
|
61
|
+
"autoincrement": false
|
|
62
|
+
},
|
|
63
|
+
"session_id": {
|
|
64
|
+
"name": "session_id",
|
|
65
|
+
"type": "text",
|
|
66
|
+
"primaryKey": false,
|
|
67
|
+
"notNull": true,
|
|
68
|
+
"autoincrement": false
|
|
69
|
+
},
|
|
70
|
+
"role": {
|
|
71
|
+
"name": "role",
|
|
72
|
+
"type": "text",
|
|
73
|
+
"primaryKey": false,
|
|
74
|
+
"notNull": true,
|
|
75
|
+
"autoincrement": false
|
|
76
|
+
},
|
|
77
|
+
"content": {
|
|
78
|
+
"name": "content",
|
|
79
|
+
"type": "text",
|
|
80
|
+
"primaryKey": false,
|
|
81
|
+
"notNull": false,
|
|
82
|
+
"autoincrement": false
|
|
83
|
+
},
|
|
84
|
+
"tool_calls": {
|
|
85
|
+
"name": "tool_calls",
|
|
86
|
+
"type": "text",
|
|
87
|
+
"primaryKey": false,
|
|
88
|
+
"notNull": false,
|
|
89
|
+
"autoincrement": false
|
|
90
|
+
},
|
|
91
|
+
"tool_results": {
|
|
92
|
+
"name": "tool_results",
|
|
93
|
+
"type": "text",
|
|
94
|
+
"primaryKey": false,
|
|
95
|
+
"notNull": false,
|
|
96
|
+
"autoincrement": false
|
|
97
|
+
},
|
|
98
|
+
"created_at": {
|
|
99
|
+
"name": "created_at",
|
|
100
|
+
"type": "text",
|
|
101
|
+
"primaryKey": false,
|
|
102
|
+
"notNull": true,
|
|
103
|
+
"autoincrement": false
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"indexes": {},
|
|
107
|
+
"foreignKeys": {
|
|
108
|
+
"messages_session_id_sessions_id_fk": {
|
|
109
|
+
"name": "messages_session_id_sessions_id_fk",
|
|
110
|
+
"tableFrom": "messages",
|
|
111
|
+
"tableTo": "sessions",
|
|
112
|
+
"columnsFrom": [
|
|
113
|
+
"session_id"
|
|
114
|
+
],
|
|
115
|
+
"columnsTo": [
|
|
116
|
+
"id"
|
|
117
|
+
],
|
|
118
|
+
"onDelete": "cascade",
|
|
119
|
+
"onUpdate": "no action"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"compositePrimaryKeys": {},
|
|
123
|
+
"uniqueConstraints": {},
|
|
124
|
+
"checkConstraints": {}
|
|
125
|
+
},
|
|
126
|
+
"sessions": {
|
|
127
|
+
"name": "sessions",
|
|
128
|
+
"columns": {
|
|
129
|
+
"id": {
|
|
130
|
+
"name": "id",
|
|
131
|
+
"type": "text",
|
|
132
|
+
"primaryKey": true,
|
|
133
|
+
"notNull": true,
|
|
134
|
+
"autoincrement": false
|
|
135
|
+
},
|
|
136
|
+
"agent_name": {
|
|
137
|
+
"name": "agent_name",
|
|
138
|
+
"type": "text",
|
|
139
|
+
"primaryKey": false,
|
|
140
|
+
"notNull": true,
|
|
141
|
+
"autoincrement": false
|
|
142
|
+
},
|
|
143
|
+
"agent_version": {
|
|
144
|
+
"name": "agent_version",
|
|
145
|
+
"type": "integer",
|
|
146
|
+
"primaryKey": false,
|
|
147
|
+
"notNull": true,
|
|
148
|
+
"autoincrement": false
|
|
149
|
+
},
|
|
150
|
+
"agent_data": {
|
|
151
|
+
"name": "agent_data",
|
|
152
|
+
"type": "text",
|
|
153
|
+
"primaryKey": false,
|
|
154
|
+
"notNull": true,
|
|
155
|
+
"autoincrement": false
|
|
156
|
+
},
|
|
157
|
+
"status": {
|
|
158
|
+
"name": "status",
|
|
159
|
+
"type": "text",
|
|
160
|
+
"primaryKey": false,
|
|
161
|
+
"notNull": true,
|
|
162
|
+
"autoincrement": false,
|
|
163
|
+
"default": "'active'"
|
|
164
|
+
},
|
|
165
|
+
"created_at": {
|
|
166
|
+
"name": "created_at",
|
|
167
|
+
"type": "text",
|
|
168
|
+
"primaryKey": false,
|
|
169
|
+
"notNull": true,
|
|
170
|
+
"autoincrement": false
|
|
171
|
+
},
|
|
172
|
+
"updated_at": {
|
|
173
|
+
"name": "updated_at",
|
|
174
|
+
"type": "text",
|
|
175
|
+
"primaryKey": false,
|
|
176
|
+
"notNull": true,
|
|
177
|
+
"autoincrement": false
|
|
178
|
+
},
|
|
179
|
+
"closed_at": {
|
|
180
|
+
"name": "closed_at",
|
|
181
|
+
"type": "text",
|
|
182
|
+
"primaryKey": false,
|
|
183
|
+
"notNull": false,
|
|
184
|
+
"autoincrement": false
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"indexes": {},
|
|
188
|
+
"foreignKeys": {
|
|
189
|
+
"sessions_agent_name_agents_name_fk": {
|
|
190
|
+
"name": "sessions_agent_name_agents_name_fk",
|
|
191
|
+
"tableFrom": "sessions",
|
|
192
|
+
"tableTo": "agents",
|
|
193
|
+
"columnsFrom": [
|
|
194
|
+
"agent_name"
|
|
195
|
+
],
|
|
196
|
+
"columnsTo": [
|
|
197
|
+
"name"
|
|
198
|
+
],
|
|
199
|
+
"onDelete": "cascade",
|
|
200
|
+
"onUpdate": "no action"
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"compositePrimaryKeys": {},
|
|
204
|
+
"uniqueConstraints": {},
|
|
205
|
+
"checkConstraints": {}
|
|
206
|
+
},
|
|
207
|
+
"task_events": {
|
|
208
|
+
"name": "task_events",
|
|
209
|
+
"columns": {
|
|
210
|
+
"id": {
|
|
211
|
+
"name": "id",
|
|
212
|
+
"type": "text",
|
|
213
|
+
"primaryKey": true,
|
|
214
|
+
"notNull": true,
|
|
215
|
+
"autoincrement": false
|
|
216
|
+
},
|
|
217
|
+
"task_id": {
|
|
218
|
+
"name": "task_id",
|
|
219
|
+
"type": "text",
|
|
220
|
+
"primaryKey": false,
|
|
221
|
+
"notNull": true,
|
|
222
|
+
"autoincrement": false
|
|
223
|
+
},
|
|
224
|
+
"type": {
|
|
225
|
+
"name": "type",
|
|
226
|
+
"type": "text",
|
|
227
|
+
"primaryKey": false,
|
|
228
|
+
"notNull": true,
|
|
229
|
+
"autoincrement": false
|
|
230
|
+
},
|
|
231
|
+
"payload": {
|
|
232
|
+
"name": "payload",
|
|
233
|
+
"type": "text",
|
|
234
|
+
"primaryKey": false,
|
|
235
|
+
"notNull": false,
|
|
236
|
+
"autoincrement": false
|
|
237
|
+
},
|
|
238
|
+
"created_at": {
|
|
239
|
+
"name": "created_at",
|
|
240
|
+
"type": "text",
|
|
241
|
+
"primaryKey": false,
|
|
242
|
+
"notNull": true,
|
|
243
|
+
"autoincrement": false
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"indexes": {},
|
|
247
|
+
"foreignKeys": {
|
|
248
|
+
"task_events_task_id_tasks_id_fk": {
|
|
249
|
+
"name": "task_events_task_id_tasks_id_fk",
|
|
250
|
+
"tableFrom": "task_events",
|
|
251
|
+
"tableTo": "tasks",
|
|
252
|
+
"columnsFrom": [
|
|
253
|
+
"task_id"
|
|
254
|
+
],
|
|
255
|
+
"columnsTo": [
|
|
256
|
+
"id"
|
|
257
|
+
],
|
|
258
|
+
"onDelete": "cascade",
|
|
259
|
+
"onUpdate": "no action"
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"compositePrimaryKeys": {},
|
|
263
|
+
"uniqueConstraints": {},
|
|
264
|
+
"checkConstraints": {}
|
|
265
|
+
},
|
|
266
|
+
"tasks": {
|
|
267
|
+
"name": "tasks",
|
|
268
|
+
"columns": {
|
|
269
|
+
"id": {
|
|
270
|
+
"name": "id",
|
|
271
|
+
"type": "text",
|
|
272
|
+
"primaryKey": true,
|
|
273
|
+
"notNull": true,
|
|
274
|
+
"autoincrement": false
|
|
275
|
+
},
|
|
276
|
+
"session_id": {
|
|
277
|
+
"name": "session_id",
|
|
278
|
+
"type": "text",
|
|
279
|
+
"primaryKey": false,
|
|
280
|
+
"notNull": true,
|
|
281
|
+
"autoincrement": false
|
|
282
|
+
},
|
|
283
|
+
"parent_task_id": {
|
|
284
|
+
"name": "parent_task_id",
|
|
285
|
+
"type": "text",
|
|
286
|
+
"primaryKey": false,
|
|
287
|
+
"notNull": false,
|
|
288
|
+
"autoincrement": false
|
|
289
|
+
},
|
|
290
|
+
"recursion_depth": {
|
|
291
|
+
"name": "recursion_depth",
|
|
292
|
+
"type": "integer",
|
|
293
|
+
"primaryKey": false,
|
|
294
|
+
"notNull": true,
|
|
295
|
+
"autoincrement": false,
|
|
296
|
+
"default": 0
|
|
297
|
+
},
|
|
298
|
+
"status": {
|
|
299
|
+
"name": "status",
|
|
300
|
+
"type": "text",
|
|
301
|
+
"primaryKey": false,
|
|
302
|
+
"notNull": true,
|
|
303
|
+
"autoincrement": false,
|
|
304
|
+
"default": "'pending'"
|
|
305
|
+
},
|
|
306
|
+
"prompt": {
|
|
307
|
+
"name": "prompt",
|
|
308
|
+
"type": "text",
|
|
309
|
+
"primaryKey": false,
|
|
310
|
+
"notNull": true,
|
|
311
|
+
"autoincrement": false
|
|
312
|
+
},
|
|
313
|
+
"result": {
|
|
314
|
+
"name": "result",
|
|
315
|
+
"type": "text",
|
|
316
|
+
"primaryKey": false,
|
|
317
|
+
"notNull": false,
|
|
318
|
+
"autoincrement": false
|
|
319
|
+
},
|
|
320
|
+
"error": {
|
|
321
|
+
"name": "error",
|
|
322
|
+
"type": "text",
|
|
323
|
+
"primaryKey": false,
|
|
324
|
+
"notNull": false,
|
|
325
|
+
"autoincrement": false
|
|
326
|
+
},
|
|
327
|
+
"created_at": {
|
|
328
|
+
"name": "created_at",
|
|
329
|
+
"type": "text",
|
|
330
|
+
"primaryKey": false,
|
|
331
|
+
"notNull": true,
|
|
332
|
+
"autoincrement": false
|
|
333
|
+
},
|
|
334
|
+
"updated_at": {
|
|
335
|
+
"name": "updated_at",
|
|
336
|
+
"type": "text",
|
|
337
|
+
"primaryKey": false,
|
|
338
|
+
"notNull": true,
|
|
339
|
+
"autoincrement": false
|
|
340
|
+
},
|
|
341
|
+
"completed_at": {
|
|
342
|
+
"name": "completed_at",
|
|
343
|
+
"type": "text",
|
|
344
|
+
"primaryKey": false,
|
|
345
|
+
"notNull": false,
|
|
346
|
+
"autoincrement": false
|
|
347
|
+
},
|
|
348
|
+
"cancelled_at": {
|
|
349
|
+
"name": "cancelled_at",
|
|
350
|
+
"type": "text",
|
|
351
|
+
"primaryKey": false,
|
|
352
|
+
"notNull": false,
|
|
353
|
+
"autoincrement": false
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"indexes": {},
|
|
357
|
+
"foreignKeys": {
|
|
358
|
+
"tasks_session_id_sessions_id_fk": {
|
|
359
|
+
"name": "tasks_session_id_sessions_id_fk",
|
|
360
|
+
"tableFrom": "tasks",
|
|
361
|
+
"tableTo": "sessions",
|
|
362
|
+
"columnsFrom": [
|
|
363
|
+
"session_id"
|
|
364
|
+
],
|
|
365
|
+
"columnsTo": [
|
|
366
|
+
"id"
|
|
367
|
+
],
|
|
368
|
+
"onDelete": "cascade",
|
|
369
|
+
"onUpdate": "no action"
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"compositePrimaryKeys": {},
|
|
373
|
+
"uniqueConstraints": {},
|
|
374
|
+
"checkConstraints": {}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"views": {},
|
|
378
|
+
"enums": {},
|
|
379
|
+
"_meta": {
|
|
380
|
+
"schemas": {},
|
|
381
|
+
"tables": {},
|
|
382
|
+
"columns": {}
|
|
383
|
+
},
|
|
384
|
+
"internal": {
|
|
385
|
+
"indexes": {}
|
|
386
|
+
}
|
|
387
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adhd/agent-mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Stateful MCP-native agent runtime with provider abstraction and recursive delegation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"src",
|
|
11
|
+
"drizzle"
|
|
12
|
+
],
|
|
9
13
|
"bin": {
|
|
10
14
|
"agent-mcp": "./src/index.js"
|
|
11
15
|
},
|