@inkeep/agents-core 0.0.0-dev-20251009005405 → 0.0.0-dev-20251009020740
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.
- package/dist/{chunk-MLKHAZVU.js → chunk-L53XWAYG.js} +1 -1
- package/dist/{chunk-HZZTBK7Y.js → chunk-TO2HNKGP.js} +4 -4
- package/dist/{chunk-TN5JDW2L.js → chunk-VPJ6Z5QZ.js} +1 -2
- package/dist/client-exports.cjs +4 -5
- package/dist/client-exports.d.cts +2 -2
- package/dist/client-exports.d.ts +2 -2
- package/dist/client-exports.js +2 -2
- package/dist/db/schema.cjs +1 -2
- package/dist/db/schema.d.cts +2 -2
- package/dist/db/schema.d.ts +2 -2
- package/dist/db/schema.js +1 -1
- package/dist/index.cjs +113 -148
- package/dist/index.d.cts +39 -67
- package/dist/index.d.ts +39 -67
- package/dist/index.js +114 -146
- package/dist/{schema-DfH0zjbm.d.ts → schema-BQk_FMBV.d.ts} +3 -41
- package/dist/{schema-DKTW_XSC.d.cts → schema-Ct2NlO81.d.cts} +3 -41
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/{utility-BHDxGp6I.d.cts → utility-s9c5CVOe.d.cts} +16 -34
- package/dist/{utility-BHDxGp6I.d.ts → utility-s9c5CVOe.d.ts} +16 -34
- package/dist/validation/index.cjs +4 -5
- package/dist/validation/index.d.cts +2 -2
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/drizzle/0003_soft_forgotten_one.sql +39 -0
- package/drizzle/0004_melted_omega_flight.sql +3 -0
- package/drizzle/meta/0000_snapshot.json +2425 -0
- package/drizzle/meta/0001_snapshot.json +2435 -0
- package/drizzle/meta/0003_snapshot.json +2 -2
- package/drizzle/meta/0004_snapshot.json +2547 -0
- package/drizzle/meta/_journal.json +11 -4
- package/package.json +1 -1
- package/drizzle/0002_brown_marvel_apes.sql +0 -16
- package/drizzle/0003_gifted_doctor_spectrum.sql +0 -343
|
@@ -19,15 +19,22 @@
|
|
|
19
19
|
{
|
|
20
20
|
"idx": 2,
|
|
21
21
|
"version": "6",
|
|
22
|
-
"when":
|
|
23
|
-
"tag": "
|
|
22
|
+
"when": 1759804621486,
|
|
23
|
+
"tag": "0002_bumpy_romulus",
|
|
24
24
|
"breakpoints": true
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"idx": 3,
|
|
28
28
|
"version": "6",
|
|
29
|
-
"when":
|
|
30
|
-
"tag": "
|
|
29
|
+
"when": 1759970956091,
|
|
30
|
+
"tag": "0003_soft_forgotten_one",
|
|
31
|
+
"breakpoints": true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"idx": 4,
|
|
35
|
+
"version": "6",
|
|
36
|
+
"when": 1759974668186,
|
|
37
|
+
"tag": "0004_melted_omega_flight",
|
|
31
38
|
"breakpoints": true
|
|
32
39
|
}
|
|
33
40
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-core",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20251009020740",
|
|
4
4
|
"description": "Agents Core contains the database schema, types, and validation schemas for Inkeep Agent Framework, along with core components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
CREATE TABLE `functions` (
|
|
2
|
-
`tenant_id` text NOT NULL,
|
|
3
|
-
`id` text NOT NULL,
|
|
4
|
-
`project_id` text NOT NULL,
|
|
5
|
-
`input_schema` blob,
|
|
6
|
-
`execute_code` text NOT NULL,
|
|
7
|
-
`dependencies` blob,
|
|
8
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
9
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
10
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
11
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
12
|
-
);--> statement-breakpoint
|
|
13
|
-
ALTER TABLE `tools` ADD `description` text;--> statement-breakpoint
|
|
14
|
-
ALTER TABLE `tools` ADD `function_id` text REFERENCES functions(tenant_id,project_id,id);--> statement-breakpoint
|
|
15
|
-
ALTER TABLE `projects` ADD `sandbox_config` text;
|
|
16
|
-
|
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
CREATE TABLE `agent_artifact_components` (
|
|
2
|
-
`tenant_id` text NOT NULL,
|
|
3
|
-
`id` text NOT NULL,
|
|
4
|
-
`project_id` text NOT NULL,
|
|
5
|
-
`graph_id` text NOT NULL,
|
|
6
|
-
`agent_id` text NOT NULL,
|
|
7
|
-
`artifact_component_id` text NOT NULL,
|
|
8
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
9
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `graph_id`, `agent_id`, `id`),
|
|
10
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`graph_id`,`agent_id`) REFERENCES `agents`(`tenant_id`,`project_id`,`graph_id`,`id`) ON UPDATE no action ON DELETE cascade,
|
|
11
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`artifact_component_id`) REFERENCES `artifact_components`(`tenant_id`,`project_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
12
|
-
);
|
|
13
|
-
--> statement-breakpoint
|
|
14
|
-
CREATE TABLE `agent_data_components` (
|
|
15
|
-
`tenant_id` text NOT NULL,
|
|
16
|
-
`id` text NOT NULL,
|
|
17
|
-
`project_id` text NOT NULL,
|
|
18
|
-
`graph_id` text NOT NULL,
|
|
19
|
-
`agent_id` text NOT NULL,
|
|
20
|
-
`data_component_id` text NOT NULL,
|
|
21
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
22
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
23
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`graph_id`,`agent_id`) REFERENCES `agents`(`tenant_id`,`project_id`,`graph_id`,`id`) ON UPDATE no action ON DELETE cascade,
|
|
24
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`data_component_id`) REFERENCES `data_components`(`tenant_id`,`project_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
25
|
-
);
|
|
26
|
-
--> statement-breakpoint
|
|
27
|
-
CREATE TABLE `agent_graph` (
|
|
28
|
-
`tenant_id` text NOT NULL,
|
|
29
|
-
`id` text NOT NULL,
|
|
30
|
-
`project_id` text NOT NULL,
|
|
31
|
-
`name` text NOT NULL,
|
|
32
|
-
`description` text,
|
|
33
|
-
`default_agent_id` text,
|
|
34
|
-
`context_config_id` text,
|
|
35
|
-
`models` text,
|
|
36
|
-
`status_updates` text,
|
|
37
|
-
`graph_prompt` text,
|
|
38
|
-
`stop_when` text,
|
|
39
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
40
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
41
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
42
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
43
|
-
);
|
|
44
|
-
--> statement-breakpoint
|
|
45
|
-
CREATE TABLE `agent_relations` (
|
|
46
|
-
`tenant_id` text NOT NULL,
|
|
47
|
-
`id` text NOT NULL,
|
|
48
|
-
`project_id` text NOT NULL,
|
|
49
|
-
`graph_id` text NOT NULL,
|
|
50
|
-
`source_agent_id` text NOT NULL,
|
|
51
|
-
`target_agent_id` text,
|
|
52
|
-
`external_agent_id` text,
|
|
53
|
-
`relation_type` text,
|
|
54
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
55
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
56
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `graph_id`, `id`),
|
|
57
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`graph_id`) REFERENCES `agent_graph`(`tenant_id`,`project_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
58
|
-
);
|
|
59
|
-
--> statement-breakpoint
|
|
60
|
-
CREATE TABLE `agent_tool_relations` (
|
|
61
|
-
`tenant_id` text NOT NULL,
|
|
62
|
-
`id` text NOT NULL,
|
|
63
|
-
`project_id` text NOT NULL,
|
|
64
|
-
`graph_id` text NOT NULL,
|
|
65
|
-
`agent_id` text NOT NULL,
|
|
66
|
-
`tool_id` text NOT NULL,
|
|
67
|
-
`selected_tools` blob,
|
|
68
|
-
`headers` blob,
|
|
69
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
70
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
71
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `graph_id`, `id`),
|
|
72
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`graph_id`,`agent_id`) REFERENCES `agents`(`tenant_id`,`project_id`,`graph_id`,`id`) ON UPDATE no action ON DELETE cascade,
|
|
73
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`tool_id`) REFERENCES `tools`(`tenant_id`,`project_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
74
|
-
);
|
|
75
|
-
--> statement-breakpoint
|
|
76
|
-
CREATE TABLE `agents` (
|
|
77
|
-
`tenant_id` text NOT NULL,
|
|
78
|
-
`id` text NOT NULL,
|
|
79
|
-
`project_id` text NOT NULL,
|
|
80
|
-
`graph_id` text NOT NULL,
|
|
81
|
-
`name` text NOT NULL,
|
|
82
|
-
`description` text NOT NULL,
|
|
83
|
-
`prompt` text NOT NULL,
|
|
84
|
-
`conversation_history_config` text,
|
|
85
|
-
`models` text,
|
|
86
|
-
`stop_when` text,
|
|
87
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
88
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
89
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `graph_id`, `id`),
|
|
90
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`graph_id`) REFERENCES `agent_graph`(`tenant_id`,`project_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
91
|
-
);
|
|
92
|
-
--> statement-breakpoint
|
|
93
|
-
CREATE TABLE `api_keys` (
|
|
94
|
-
`tenant_id` text NOT NULL,
|
|
95
|
-
`id` text NOT NULL,
|
|
96
|
-
`project_id` text NOT NULL,
|
|
97
|
-
`graph_id` text NOT NULL,
|
|
98
|
-
`public_id` text NOT NULL,
|
|
99
|
-
`key_hash` text NOT NULL,
|
|
100
|
-
`key_prefix` text NOT NULL,
|
|
101
|
-
`name` text,
|
|
102
|
-
`last_used_at` text,
|
|
103
|
-
`expires_at` text,
|
|
104
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
105
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
106
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade,
|
|
107
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`graph_id`) REFERENCES `agent_graph`(`tenant_id`,`project_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
108
|
-
);
|
|
109
|
-
--> statement-breakpoint
|
|
110
|
-
CREATE UNIQUE INDEX `api_keys_public_id_unique` ON `api_keys` (`public_id`);--> statement-breakpoint
|
|
111
|
-
CREATE INDEX `api_keys_tenant_graph_idx` ON `api_keys` (`tenant_id`,`graph_id`);--> statement-breakpoint
|
|
112
|
-
CREATE INDEX `api_keys_prefix_idx` ON `api_keys` (`key_prefix`);--> statement-breakpoint
|
|
113
|
-
CREATE INDEX `api_keys_public_id_idx` ON `api_keys` (`public_id`);--> statement-breakpoint
|
|
114
|
-
CREATE TABLE `artifact_components` (
|
|
115
|
-
`tenant_id` text NOT NULL,
|
|
116
|
-
`id` text NOT NULL,
|
|
117
|
-
`project_id` text NOT NULL,
|
|
118
|
-
`name` text NOT NULL,
|
|
119
|
-
`description` text NOT NULL,
|
|
120
|
-
`props` blob,
|
|
121
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
122
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
123
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
124
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
125
|
-
);
|
|
126
|
-
--> statement-breakpoint
|
|
127
|
-
CREATE TABLE `context_cache` (
|
|
128
|
-
`tenant_id` text NOT NULL,
|
|
129
|
-
`id` text NOT NULL,
|
|
130
|
-
`project_id` text NOT NULL,
|
|
131
|
-
`conversation_id` text NOT NULL,
|
|
132
|
-
`context_config_id` text NOT NULL,
|
|
133
|
-
`context_variable_key` text NOT NULL,
|
|
134
|
-
`value` blob NOT NULL,
|
|
135
|
-
`request_hash` text,
|
|
136
|
-
`fetched_at` text NOT NULL,
|
|
137
|
-
`fetch_source` text,
|
|
138
|
-
`fetch_duration_ms` integer,
|
|
139
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
140
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
141
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
142
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
143
|
-
);
|
|
144
|
-
--> statement-breakpoint
|
|
145
|
-
CREATE INDEX `context_cache_lookup_idx` ON `context_cache` (`conversation_id`,`context_config_id`,`context_variable_key`);--> statement-breakpoint
|
|
146
|
-
CREATE TABLE `context_configs` (
|
|
147
|
-
`tenant_id` text NOT NULL,
|
|
148
|
-
`id` text NOT NULL,
|
|
149
|
-
`project_id` text NOT NULL,
|
|
150
|
-
`graph_id` text NOT NULL,
|
|
151
|
-
`name` text NOT NULL,
|
|
152
|
-
`description` text NOT NULL,
|
|
153
|
-
`request_context_schema` blob,
|
|
154
|
-
`context_variables` blob,
|
|
155
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
156
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
157
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `graph_id`, `id`),
|
|
158
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`graph_id`) REFERENCES `agent_graph`(`tenant_id`,`project_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
159
|
-
);
|
|
160
|
-
--> statement-breakpoint
|
|
161
|
-
CREATE TABLE `conversations` (
|
|
162
|
-
`tenant_id` text NOT NULL,
|
|
163
|
-
`id` text NOT NULL,
|
|
164
|
-
`project_id` text NOT NULL,
|
|
165
|
-
`user_id` text,
|
|
166
|
-
`active_agent_id` text NOT NULL,
|
|
167
|
-
`title` text,
|
|
168
|
-
`last_context_resolution` text,
|
|
169
|
-
`metadata` blob,
|
|
170
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
171
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
172
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
173
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
174
|
-
);
|
|
175
|
-
--> statement-breakpoint
|
|
176
|
-
CREATE TABLE `credential_references` (
|
|
177
|
-
`tenant_id` text NOT NULL,
|
|
178
|
-
`id` text NOT NULL,
|
|
179
|
-
`project_id` text NOT NULL,
|
|
180
|
-
`type` text NOT NULL,
|
|
181
|
-
`credential_store_id` text NOT NULL,
|
|
182
|
-
`retrieval_params` blob,
|
|
183
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
184
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
185
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
186
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
187
|
-
);
|
|
188
|
-
--> statement-breakpoint
|
|
189
|
-
CREATE TABLE `data_components` (
|
|
190
|
-
`tenant_id` text NOT NULL,
|
|
191
|
-
`id` text NOT NULL,
|
|
192
|
-
`project_id` text NOT NULL,
|
|
193
|
-
`name` text NOT NULL,
|
|
194
|
-
`description` text NOT NULL,
|
|
195
|
-
`props` blob,
|
|
196
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
197
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
198
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
199
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
200
|
-
);
|
|
201
|
-
--> statement-breakpoint
|
|
202
|
-
CREATE TABLE `external_agents` (
|
|
203
|
-
`tenant_id` text NOT NULL,
|
|
204
|
-
`id` text NOT NULL,
|
|
205
|
-
`project_id` text NOT NULL,
|
|
206
|
-
`graph_id` text NOT NULL,
|
|
207
|
-
`name` text NOT NULL,
|
|
208
|
-
`description` text NOT NULL,
|
|
209
|
-
`base_url` text NOT NULL,
|
|
210
|
-
`credential_reference_id` text,
|
|
211
|
-
`headers` blob,
|
|
212
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
213
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
214
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `graph_id`, `id`),
|
|
215
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`graph_id`) REFERENCES `agent_graph`(`tenant_id`,`project_id`,`id`) ON UPDATE no action ON DELETE cascade,
|
|
216
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`credential_reference_id`) REFERENCES `credential_references`(`tenant_id`,`project_id`,`id`) ON UPDATE no action ON DELETE set null
|
|
217
|
-
);
|
|
218
|
-
--> statement-breakpoint
|
|
219
|
-
CREATE TABLE `functions` (
|
|
220
|
-
`tenant_id` text NOT NULL,
|
|
221
|
-
`id` text NOT NULL,
|
|
222
|
-
`project_id` text NOT NULL,
|
|
223
|
-
`input_schema` blob,
|
|
224
|
-
`execute_code` text NOT NULL,
|
|
225
|
-
`dependencies` blob,
|
|
226
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
227
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
228
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
229
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
230
|
-
);
|
|
231
|
-
--> statement-breakpoint
|
|
232
|
-
CREATE TABLE `ledger_artifacts` (
|
|
233
|
-
`tenant_id` text NOT NULL,
|
|
234
|
-
`id` text NOT NULL,
|
|
235
|
-
`project_id` text NOT NULL,
|
|
236
|
-
`task_id` text NOT NULL,
|
|
237
|
-
`tool_call_id` text,
|
|
238
|
-
`context_id` text NOT NULL,
|
|
239
|
-
`type` text DEFAULT 'source' NOT NULL,
|
|
240
|
-
`name` text,
|
|
241
|
-
`description` text,
|
|
242
|
-
`parts` blob,
|
|
243
|
-
`metadata` blob,
|
|
244
|
-
`summary` text,
|
|
245
|
-
`mime` blob,
|
|
246
|
-
`visibility` text DEFAULT 'context',
|
|
247
|
-
`allowed_agents` blob,
|
|
248
|
-
`derived_from` text,
|
|
249
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
250
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
251
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`, `task_id`),
|
|
252
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
253
|
-
);
|
|
254
|
-
--> statement-breakpoint
|
|
255
|
-
CREATE INDEX `ledger_artifacts_task_id_idx` ON `ledger_artifacts` (`task_id`);--> statement-breakpoint
|
|
256
|
-
CREATE INDEX `ledger_artifacts_tool_call_id_idx` ON `ledger_artifacts` (`tool_call_id`);--> statement-breakpoint
|
|
257
|
-
CREATE INDEX `ledger_artifacts_context_id_idx` ON `ledger_artifacts` (`context_id`);--> statement-breakpoint
|
|
258
|
-
CREATE UNIQUE INDEX `ledger_artifacts_task_context_name_unique` ON `ledger_artifacts` (`task_id`,`context_id`,`name`);--> statement-breakpoint
|
|
259
|
-
CREATE TABLE `messages` (
|
|
260
|
-
`tenant_id` text NOT NULL,
|
|
261
|
-
`id` text NOT NULL,
|
|
262
|
-
`project_id` text NOT NULL,
|
|
263
|
-
`conversation_id` text NOT NULL,
|
|
264
|
-
`role` text NOT NULL,
|
|
265
|
-
`from_agent_id` text,
|
|
266
|
-
`to_agent_id` text,
|
|
267
|
-
`from_external_agent_id` text,
|
|
268
|
-
`to_external_agent_id` text,
|
|
269
|
-
`content` blob NOT NULL,
|
|
270
|
-
`visibility` text DEFAULT 'user-facing' NOT NULL,
|
|
271
|
-
`message_type` text DEFAULT 'chat' NOT NULL,
|
|
272
|
-
`agent_id` text,
|
|
273
|
-
`task_id` text,
|
|
274
|
-
`parent_message_id` text,
|
|
275
|
-
`a2a_task_id` text,
|
|
276
|
-
`a2a_session_id` text,
|
|
277
|
-
`metadata` blob,
|
|
278
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
279
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
280
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
281
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
282
|
-
);
|
|
283
|
-
--> statement-breakpoint
|
|
284
|
-
CREATE TABLE `projects` (
|
|
285
|
-
`tenant_id` text NOT NULL,
|
|
286
|
-
`id` text NOT NULL,
|
|
287
|
-
`name` text NOT NULL,
|
|
288
|
-
`description` text NOT NULL,
|
|
289
|
-
`models` text,
|
|
290
|
-
`stop_when` text,
|
|
291
|
-
`sandbox_config` text,
|
|
292
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
293
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
294
|
-
PRIMARY KEY(`tenant_id`, `id`)
|
|
295
|
-
);
|
|
296
|
-
--> statement-breakpoint
|
|
297
|
-
CREATE TABLE `task_relations` (
|
|
298
|
-
`tenant_id` text NOT NULL,
|
|
299
|
-
`id` text NOT NULL,
|
|
300
|
-
`project_id` text NOT NULL,
|
|
301
|
-
`parent_task_id` text NOT NULL,
|
|
302
|
-
`child_task_id` text NOT NULL,
|
|
303
|
-
`relation_type` text DEFAULT 'parent_child',
|
|
304
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
305
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
306
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
307
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
308
|
-
);
|
|
309
|
-
--> statement-breakpoint
|
|
310
|
-
CREATE TABLE `tasks` (
|
|
311
|
-
`tenant_id` text NOT NULL,
|
|
312
|
-
`id` text NOT NULL,
|
|
313
|
-
`project_id` text NOT NULL,
|
|
314
|
-
`graph_id` text NOT NULL,
|
|
315
|
-
`agent_id` text NOT NULL,
|
|
316
|
-
`context_id` text NOT NULL,
|
|
317
|
-
`status` text NOT NULL,
|
|
318
|
-
`metadata` blob,
|
|
319
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
320
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
321
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
322
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`graph_id`,`agent_id`) REFERENCES `agents`(`tenant_id`,`project_id`,`graph_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
323
|
-
);
|
|
324
|
-
--> statement-breakpoint
|
|
325
|
-
CREATE TABLE `tools` (
|
|
326
|
-
`tenant_id` text NOT NULL,
|
|
327
|
-
`id` text NOT NULL,
|
|
328
|
-
`project_id` text NOT NULL,
|
|
329
|
-
`name` text NOT NULL,
|
|
330
|
-
`description` text,
|
|
331
|
-
`config` blob NOT NULL,
|
|
332
|
-
`function_id` text,
|
|
333
|
-
`credential_reference_id` text,
|
|
334
|
-
`headers` blob,
|
|
335
|
-
`image_url` text,
|
|
336
|
-
`capabilities` blob,
|
|
337
|
-
`last_error` text,
|
|
338
|
-
`created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
339
|
-
`updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
340
|
-
PRIMARY KEY(`tenant_id`, `project_id`, `id`),
|
|
341
|
-
FOREIGN KEY (`tenant_id`,`project_id`) REFERENCES `projects`(`tenant_id`,`id`) ON UPDATE no action ON DELETE cascade,
|
|
342
|
-
FOREIGN KEY (`tenant_id`,`project_id`,`function_id`) REFERENCES `functions`(`tenant_id`,`project_id`,`id`) ON UPDATE no action ON DELETE cascade
|
|
343
|
-
);
|