@inkeep/agents-core 0.0.0-dev-20251009192735 → 0.0.0-dev-20251009215610
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/README.md +2 -2
- package/dist/{chunk-VPJ6Z5QZ.js → chunk-5LRSB445.js} +115 -118
- package/dist/{chunk-TO2HNKGP.js → chunk-BVURASVM.js} +74 -110
- package/dist/chunk-TCLX6C3C.js +271 -0
- package/dist/chunk-ZSQFZL3Y.js +173 -0
- package/dist/client-exports.cjs +483 -225
- package/dist/client-exports.d.cts +6 -5
- package/dist/client-exports.d.ts +6 -5
- package/dist/client-exports.js +5 -4
- package/dist/db/schema.cjs +114 -117
- 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 +1687 -1360
- package/dist/index.d.cts +1530 -1524
- package/dist/index.d.ts +1530 -1524
- package/dist/index.js +1016 -989
- package/dist/{schema-Ct2NlO81.d.cts → schema-B1rukNyF.d.ts} +118 -137
- package/dist/{schema-BQk_FMBV.d.ts → schema-BIYOOKX_.d.cts} +118 -137
- package/dist/signoz-queries-CifqdbnO.d.cts +269 -0
- package/dist/signoz-queries-CifqdbnO.d.ts +269 -0
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/{utility-s9c5CVOe.d.cts → utility-BEeDGMP9.d.cts} +226 -297
- package/dist/{utility-s9c5CVOe.d.ts → utility-BEeDGMP9.d.ts} +226 -297
- package/dist/validation/index.cjs +243 -238
- package/dist/validation/index.d.cts +76 -4
- package/dist/validation/index.d.ts +76 -4
- package/dist/validation/index.js +2 -2
- package/drizzle/0005_wide_shriek.sql +127 -0
- package/drizzle/meta/0005_snapshot.json +2558 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/dist/chunk-L53XWAYG.js +0 -134
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export { h as ACTIVITY_NAMES, f as ACTIVITY_STATUS, e as ACTIVITY_TYPES, g as AGENT_IDS, p as AGGREGATE_OPERATORS, A as AI_OPERATIONS, j as AI_TOOL_TYPES, o as DATA_SOURCES, k as DATA_TYPES, D as DELEGATION_FROM_SUB_AGENT_ID, b as DELEGATION_ID, a as DELEGATION_TO_SUB_AGENT_ID, F as FIELD_TYPES, O as OPERATORS, m as ORDER_DIRECTIONS, P as PANEL_TYPES, q as QUERY_DEFAULTS, l as QUERY_EXPRESSIONS, Q as QUERY_FIELD_CONFIGS, n as QUERY_TYPES, R as REDUCE_OPERATIONS, d as SPAN_KEYS, S as SPAN_NAMES, i as TOOL_NAMES, T as TRANSFER_FROM_SUB_AGENT_ID, c as TRANSFER_TO_SUB_AGENT_ID, U as UNKNOWN_VALUE } from './signoz-queries-CifqdbnO.cjs';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullGraphAgentInsertSchema } from './utility-
|
|
3
|
-
export { e as AgentStopWhen, b as AgentStopWhenSchema, g as CredentialStoreType, i as FunctionApiSelectSchema, j as FunctionApiUpdateSchema, d as GraphStopWhen, G as GraphStopWhenSchema, h as MCPTransportType, f as ModelSettings, M as ModelSettingsSchema, k as SandboxConfigSchema, c as StopWhen, S as StopWhenSchema } from './utility-
|
|
3
|
+
import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullGraphAgentInsertSchema } from './utility-BEeDGMP9.cjs';
|
|
4
|
+
export { e as AgentStopWhen, b as AgentStopWhenSchema, g as CredentialStoreType, i as FunctionApiSelectSchema, j as FunctionApiUpdateSchema, d as GraphStopWhen, G as GraphStopWhenSchema, h as MCPTransportType, f as ModelSettings, M as ModelSettingsSchema, k as SandboxConfigSchema, c as StopWhen, S as StopWhenSchema } from './utility-BEeDGMP9.cjs';
|
|
4
5
|
export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.cjs';
|
|
5
6
|
import 'drizzle-zod';
|
|
6
7
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -156,14 +157,14 @@ declare const AgentGraphApiInsertSchema: z.ZodObject<{
|
|
|
156
157
|
id: z.ZodOptional<z.ZodString>;
|
|
157
158
|
name: z.ZodString;
|
|
158
159
|
description: z.ZodOptional<z.ZodString>;
|
|
159
|
-
|
|
160
|
+
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
160
161
|
}, z.core.$strip>;
|
|
161
162
|
declare const FullGraphDefinitionSchema: z.ZodObject<{
|
|
162
163
|
id: z.ZodOptional<z.ZodString>;
|
|
163
164
|
name: z.ZodString;
|
|
164
165
|
description: z.ZodOptional<z.ZodString>;
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
167
|
+
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
167
168
|
id: z.ZodString;
|
|
168
169
|
name: z.ZodString;
|
|
169
170
|
description: z.ZodString;
|
package/dist/client-exports.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export { h as ACTIVITY_NAMES, f as ACTIVITY_STATUS, e as ACTIVITY_TYPES, g as AGENT_IDS, p as AGGREGATE_OPERATORS, A as AI_OPERATIONS, j as AI_TOOL_TYPES, o as DATA_SOURCES, k as DATA_TYPES, D as DELEGATION_FROM_SUB_AGENT_ID, b as DELEGATION_ID, a as DELEGATION_TO_SUB_AGENT_ID, F as FIELD_TYPES, O as OPERATORS, m as ORDER_DIRECTIONS, P as PANEL_TYPES, q as QUERY_DEFAULTS, l as QUERY_EXPRESSIONS, Q as QUERY_FIELD_CONFIGS, n as QUERY_TYPES, R as REDUCE_OPERATIONS, d as SPAN_KEYS, S as SPAN_NAMES, i as TOOL_NAMES, T as TRANSFER_FROM_SUB_AGENT_ID, c as TRANSFER_TO_SUB_AGENT_ID, U as UNKNOWN_VALUE } from './signoz-queries-CifqdbnO.js';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullGraphAgentInsertSchema } from './utility-
|
|
3
|
-
export { e as AgentStopWhen, b as AgentStopWhenSchema, g as CredentialStoreType, i as FunctionApiSelectSchema, j as FunctionApiUpdateSchema, d as GraphStopWhen, G as GraphStopWhenSchema, h as MCPTransportType, f as ModelSettings, M as ModelSettingsSchema, k as SandboxConfigSchema, c as StopWhen, S as StopWhenSchema } from './utility-
|
|
3
|
+
import { C as ConversationHistoryConfig, F as FunctionApiInsertSchema, A as ApiKeyApiUpdateSchema, a as FullGraphAgentInsertSchema } from './utility-BEeDGMP9.js';
|
|
4
|
+
export { e as AgentStopWhen, b as AgentStopWhenSchema, g as CredentialStoreType, i as FunctionApiSelectSchema, j as FunctionApiUpdateSchema, d as GraphStopWhen, G as GraphStopWhenSchema, h as MCPTransportType, f as ModelSettings, M as ModelSettingsSchema, k as SandboxConfigSchema, c as StopWhen, S as StopWhenSchema } from './utility-BEeDGMP9.js';
|
|
4
5
|
export { v as validatePropsAsJsonSchema } from './props-validation-BMR1qNiy.js';
|
|
5
6
|
import 'drizzle-zod';
|
|
6
7
|
import 'drizzle-orm/sqlite-core';
|
|
@@ -156,14 +157,14 @@ declare const AgentGraphApiInsertSchema: z.ZodObject<{
|
|
|
156
157
|
id: z.ZodOptional<z.ZodString>;
|
|
157
158
|
name: z.ZodString;
|
|
158
159
|
description: z.ZodOptional<z.ZodString>;
|
|
159
|
-
|
|
160
|
+
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
160
161
|
}, z.core.$strip>;
|
|
161
162
|
declare const FullGraphDefinitionSchema: z.ZodObject<{
|
|
162
163
|
id: z.ZodOptional<z.ZodString>;
|
|
163
164
|
name: z.ZodString;
|
|
164
165
|
description: z.ZodOptional<z.ZodString>;
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
defaultSubAgentId: z.ZodOptional<z.ZodString>;
|
|
167
|
+
subAgents: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
167
168
|
id: z.ZodString;
|
|
168
169
|
name: z.ZodString;
|
|
169
170
|
description: z.ZodString;
|
package/dist/client-exports.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export { ACTIVITY_NAMES, ACTIVITY_STATUS, ACTIVITY_TYPES, AGENT_IDS, AGGREGATE_OPERATORS, AI_OPERATIONS, AI_TOOL_TYPES, DATA_SOURCES, DATA_TYPES, DELEGATION_FROM_SUB_AGENT_ID, DELEGATION_ID, DELEGATION_TO_SUB_AGENT_ID, FIELD_TYPES, OPERATORS, ORDER_DIRECTIONS, PANEL_TYPES, QUERY_DEFAULTS, QUERY_EXPRESSIONS, QUERY_FIELD_CONFIGS, QUERY_TYPES, REDUCE_OPERATIONS, SPAN_KEYS, SPAN_NAMES, TOOL_NAMES, TRANSFER_FROM_SUB_AGENT_ID, TRANSFER_TO_SUB_AGENT_ID, UNKNOWN_VALUE } from './chunk-TCLX6C3C.js';
|
|
2
|
+
import { ModelSettingsSchema, FullGraphAgentInsertSchema, ArtifactComponentApiInsertSchema } from './chunk-BVURASVM.js';
|
|
3
|
+
export { AgentStopWhenSchema, FunctionApiInsertSchema, FunctionApiSelectSchema, FunctionApiUpdateSchema, GraphStopWhenSchema, ModelSettingsSchema, SandboxConfigSchema, StopWhenSchema, validatePropsAsJsonSchema } from './chunk-BVURASVM.js';
|
|
3
4
|
import { CredentialStoreType } from './chunk-YFHT5M2R.js';
|
|
4
5
|
export { CredentialStoreType, MCPTransportType } from './chunk-YFHT5M2R.js';
|
|
5
6
|
import { z } from 'zod';
|
|
@@ -110,10 +111,10 @@ var AgentGraphApiInsertSchema = z.object({
|
|
|
110
111
|
id: z.string().optional(),
|
|
111
112
|
name: z.string(),
|
|
112
113
|
description: z.string().optional(),
|
|
113
|
-
|
|
114
|
+
defaultSubAgentId: z.string().optional()
|
|
114
115
|
});
|
|
115
116
|
var FullGraphDefinitionSchema = AgentGraphApiInsertSchema.extend({
|
|
116
|
-
|
|
117
|
+
subAgents: z.record(
|
|
117
118
|
z.string(),
|
|
118
119
|
z.union([
|
|
119
120
|
FullGraphAgentInsertSchema,
|
package/dist/db/schema.cjs
CHANGED
|
@@ -16,9 +16,9 @@ var graphScoped = {
|
|
|
16
16
|
...projectScoped,
|
|
17
17
|
graphId: sqliteCore.text("graph_id").notNull()
|
|
18
18
|
};
|
|
19
|
-
var
|
|
19
|
+
var subAgentScoped = {
|
|
20
20
|
...graphScoped,
|
|
21
|
-
|
|
21
|
+
subAgentId: sqliteCore.text("sub_agent_id").notNull()
|
|
22
22
|
};
|
|
23
23
|
var uiProperties = {
|
|
24
24
|
name: sqliteCore.text("name").notNull(),
|
|
@@ -49,7 +49,7 @@ var agentGraph = sqliteCore.sqliteTable(
|
|
|
49
49
|
...projectScoped,
|
|
50
50
|
name: sqliteCore.text("name").notNull(),
|
|
51
51
|
description: sqliteCore.text("description"),
|
|
52
|
-
|
|
52
|
+
defaultSubAgentId: sqliteCore.text("default_sub_agent_id"),
|
|
53
53
|
// Reference to shared context configuration for all agents in this graph
|
|
54
54
|
contextConfigId: sqliteCore.text("context_config_id"),
|
|
55
55
|
// add fk relationship
|
|
@@ -128,8 +128,8 @@ var contextCache = sqliteCore.sqliteTable(
|
|
|
128
128
|
)
|
|
129
129
|
]
|
|
130
130
|
);
|
|
131
|
-
var
|
|
132
|
-
"
|
|
131
|
+
var subAgents = sqliteCore.sqliteTable(
|
|
132
|
+
"sub_agents",
|
|
133
133
|
{
|
|
134
134
|
...graphScoped,
|
|
135
135
|
...uiProperties,
|
|
@@ -151,17 +151,16 @@ var agents = sqliteCore.sqliteTable(
|
|
|
151
151
|
}).onDelete("cascade")
|
|
152
152
|
]
|
|
153
153
|
);
|
|
154
|
-
var
|
|
155
|
-
"
|
|
154
|
+
var subAgentRelations = sqliteCore.sqliteTable(
|
|
155
|
+
"sub_agent_relations",
|
|
156
156
|
{
|
|
157
157
|
...graphScoped,
|
|
158
|
-
|
|
158
|
+
sourceSubAgentId: sqliteCore.text("source_sub_agent_id").notNull(),
|
|
159
159
|
// For internal relationships
|
|
160
|
-
|
|
160
|
+
targetSubAgentId: sqliteCore.text("target_sub_agent_id"),
|
|
161
161
|
// For external relationships
|
|
162
|
-
|
|
162
|
+
externalSubAgentId: sqliteCore.text("external_sub_agent_id"),
|
|
163
163
|
relationType: sqliteCore.text("relation_type"),
|
|
164
|
-
// 'transfer' | 'delegate'
|
|
165
164
|
...timestamps
|
|
166
165
|
},
|
|
167
166
|
(table) => [
|
|
@@ -169,7 +168,7 @@ var agentRelations = sqliteCore.sqliteTable(
|
|
|
169
168
|
sqliteCore.foreignKey({
|
|
170
169
|
columns: [table.tenantId, table.projectId, table.graphId],
|
|
171
170
|
foreignColumns: [agentGraph.tenantId, agentGraph.projectId, agentGraph.id],
|
|
172
|
-
name: "
|
|
171
|
+
name: "sub_agent_relations_graph_fk"
|
|
173
172
|
}).onDelete("cascade")
|
|
174
173
|
]
|
|
175
174
|
);
|
|
@@ -205,7 +204,7 @@ var externalAgents = sqliteCore.sqliteTable(
|
|
|
205
204
|
var tasks = sqliteCore.sqliteTable(
|
|
206
205
|
"tasks",
|
|
207
206
|
{
|
|
208
|
-
...
|
|
207
|
+
...subAgentScoped,
|
|
209
208
|
contextId: sqliteCore.text("context_id").notNull(),
|
|
210
209
|
status: sqliteCore.text("status").notNull(),
|
|
211
210
|
metadata: sqliteCore.blob("metadata", { mode: "json" }).$type(),
|
|
@@ -214,9 +213,9 @@ var tasks = sqliteCore.sqliteTable(
|
|
|
214
213
|
(table) => [
|
|
215
214
|
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
|
|
216
215
|
sqliteCore.foreignKey({
|
|
217
|
-
columns: [table.tenantId, table.projectId, table.graphId, table.
|
|
218
|
-
foreignColumns: [
|
|
219
|
-
name: "
|
|
216
|
+
columns: [table.tenantId, table.projectId, table.graphId, table.subAgentId],
|
|
217
|
+
foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.graphId, subAgents.id],
|
|
218
|
+
name: "tasks_sub_agent_fk"
|
|
220
219
|
}).onDelete("cascade")
|
|
221
220
|
]
|
|
222
221
|
);
|
|
@@ -256,10 +255,10 @@ var dataComponents = sqliteCore.sqliteTable(
|
|
|
256
255
|
}).onDelete("cascade")
|
|
257
256
|
]
|
|
258
257
|
);
|
|
259
|
-
var
|
|
260
|
-
"
|
|
258
|
+
var subAgentDataComponents = sqliteCore.sqliteTable(
|
|
259
|
+
"sub_agent_data_components",
|
|
261
260
|
{
|
|
262
|
-
...
|
|
261
|
+
...subAgentScoped,
|
|
263
262
|
dataComponentId: sqliteCore.text("data_component_id").notNull(),
|
|
264
263
|
createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
|
|
265
264
|
},
|
|
@@ -267,15 +266,15 @@ var agentDataComponents = sqliteCore.sqliteTable(
|
|
|
267
266
|
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.id] }),
|
|
268
267
|
// Foreign key constraint to agents table (ensures graph and project exist via cascade)
|
|
269
268
|
sqliteCore.foreignKey({
|
|
270
|
-
columns: [table.tenantId, table.projectId, table.graphId, table.
|
|
271
|
-
foreignColumns: [
|
|
272
|
-
name: "
|
|
269
|
+
columns: [table.tenantId, table.projectId, table.graphId, table.subAgentId],
|
|
270
|
+
foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.graphId, subAgents.id],
|
|
271
|
+
name: "sub_agent_data_components_sub_agent_fk"
|
|
273
272
|
}).onDelete("cascade"),
|
|
274
273
|
// Foreign key constraint to data_components table
|
|
275
274
|
sqliteCore.foreignKey({
|
|
276
275
|
columns: [table.tenantId, table.projectId, table.dataComponentId],
|
|
277
276
|
foreignColumns: [dataComponents.tenantId, dataComponents.projectId, dataComponents.id],
|
|
278
|
-
name: "
|
|
277
|
+
name: "sub_agent_data_components_data_component_fk"
|
|
279
278
|
}).onDelete("cascade")
|
|
280
279
|
]
|
|
281
280
|
);
|
|
@@ -296,22 +295,22 @@ var artifactComponents = sqliteCore.sqliteTable(
|
|
|
296
295
|
}).onDelete("cascade")
|
|
297
296
|
]
|
|
298
297
|
);
|
|
299
|
-
var
|
|
300
|
-
"
|
|
298
|
+
var subAgentArtifactComponents = sqliteCore.sqliteTable(
|
|
299
|
+
"sub_agent_artifact_components",
|
|
301
300
|
{
|
|
302
|
-
...
|
|
301
|
+
...subAgentScoped,
|
|
303
302
|
artifactComponentId: sqliteCore.text("artifact_component_id").notNull(),
|
|
304
303
|
createdAt: sqliteCore.text("created_at").notNull().default(drizzleOrm.sql`CURRENT_TIMESTAMP`)
|
|
305
304
|
},
|
|
306
305
|
(table) => [
|
|
307
306
|
sqliteCore.primaryKey({
|
|
308
|
-
columns: [table.tenantId, table.projectId, table.graphId, table.
|
|
307
|
+
columns: [table.tenantId, table.projectId, table.graphId, table.subAgentId, table.id]
|
|
309
308
|
}),
|
|
310
309
|
// Foreign key constraint to agents table (ensures graph and project exist via cascade)
|
|
311
310
|
sqliteCore.foreignKey({
|
|
312
|
-
columns: [table.tenantId, table.projectId, table.graphId, table.
|
|
313
|
-
foreignColumns: [
|
|
314
|
-
name: "
|
|
311
|
+
columns: [table.tenantId, table.projectId, table.graphId, table.subAgentId],
|
|
312
|
+
foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.graphId, subAgents.id],
|
|
313
|
+
name: "sub_agent_artifact_components_sub_agent_fk"
|
|
315
314
|
}).onDelete("cascade"),
|
|
316
315
|
// Foreign key constraint to artifact_components table
|
|
317
316
|
sqliteCore.foreignKey({
|
|
@@ -321,7 +320,7 @@ var agentArtifactComponents = sqliteCore.sqliteTable(
|
|
|
321
320
|
artifactComponents.projectId,
|
|
322
321
|
artifactComponents.id
|
|
323
322
|
],
|
|
324
|
-
name: "
|
|
323
|
+
name: "sub_agent_artifact_components_artifact_component_fk"
|
|
325
324
|
}).onDelete("cascade")
|
|
326
325
|
]
|
|
327
326
|
);
|
|
@@ -377,10 +376,10 @@ var functions = sqliteCore.sqliteTable(
|
|
|
377
376
|
}).onDelete("cascade")
|
|
378
377
|
]
|
|
379
378
|
);
|
|
380
|
-
var
|
|
381
|
-
"
|
|
379
|
+
var subAgentToolRelations = sqliteCore.sqliteTable(
|
|
380
|
+
"sub_agent_tool_relations",
|
|
382
381
|
{
|
|
383
|
-
...
|
|
382
|
+
...subAgentScoped,
|
|
384
383
|
toolId: sqliteCore.text("tool_id").notNull(),
|
|
385
384
|
selectedTools: sqliteCore.blob("selected_tools", { mode: "json" }).$type(),
|
|
386
385
|
headers: sqliteCore.blob("headers", { mode: "json" }).$type(),
|
|
@@ -390,15 +389,15 @@ var agentToolRelations = sqliteCore.sqliteTable(
|
|
|
390
389
|
sqliteCore.primaryKey({ columns: [table.tenantId, table.projectId, table.graphId, table.id] }),
|
|
391
390
|
// Foreign key constraint to agents table (which includes project and graph scope)
|
|
392
391
|
sqliteCore.foreignKey({
|
|
393
|
-
columns: [table.tenantId, table.projectId, table.graphId, table.
|
|
394
|
-
foreignColumns: [
|
|
395
|
-
name: "
|
|
392
|
+
columns: [table.tenantId, table.projectId, table.graphId, table.subAgentId],
|
|
393
|
+
foreignColumns: [subAgents.tenantId, subAgents.projectId, subAgents.graphId, subAgents.id],
|
|
394
|
+
name: "sub_agent_tool_relations_agent_fk"
|
|
396
395
|
}).onDelete("cascade"),
|
|
397
396
|
// Foreign key constraint to tools table
|
|
398
397
|
sqliteCore.foreignKey({
|
|
399
398
|
columns: [table.tenantId, table.projectId, table.toolId],
|
|
400
399
|
foreignColumns: [tools.tenantId, tools.projectId, tools.id],
|
|
401
|
-
name: "
|
|
400
|
+
name: "sub_agent_tool_relations_tool_fk"
|
|
402
401
|
}).onDelete("cascade")
|
|
403
402
|
]
|
|
404
403
|
);
|
|
@@ -407,7 +406,7 @@ var conversations = sqliteCore.sqliteTable(
|
|
|
407
406
|
{
|
|
408
407
|
...projectScoped,
|
|
409
408
|
userId: sqliteCore.text("user_id"),
|
|
410
|
-
|
|
409
|
+
activeSubAgentId: sqliteCore.text("active_sub_agent_id").notNull(),
|
|
411
410
|
title: sqliteCore.text("title"),
|
|
412
411
|
lastContextResolution: sqliteCore.text("last_context_resolution"),
|
|
413
412
|
metadata: sqliteCore.blob("metadata", { mode: "json" }).$type(),
|
|
@@ -431,15 +430,15 @@ var messages = sqliteCore.sqliteTable(
|
|
|
431
430
|
role: sqliteCore.text("role").notNull(),
|
|
432
431
|
// 'user' | 'agent' | 'system'
|
|
433
432
|
// Agent sender/recipient tracking (nullable - only populated when relevant)
|
|
434
|
-
|
|
433
|
+
fromSubAgentId: sqliteCore.text("from_sub_agent_id"),
|
|
435
434
|
// Populated when message is from an agent
|
|
436
|
-
|
|
435
|
+
toSubAgentId: sqliteCore.text("to_sub_agent_id"),
|
|
437
436
|
// Populated when message is directed to a specific agent (e.g., transfers/delegations)
|
|
438
437
|
// External agent sender tracking
|
|
439
|
-
fromExternalAgentId: sqliteCore.text("
|
|
438
|
+
fromExternalAgentId: sqliteCore.text("from_external_sub_agent_id"),
|
|
440
439
|
// Populated when message is directed from an external agent
|
|
441
440
|
// External agent recipient tracking
|
|
442
|
-
toExternalAgentId: sqliteCore.text("
|
|
441
|
+
toExternalAgentId: sqliteCore.text("to_external_sub_agent_id"),
|
|
443
442
|
// Populated when message is directed to an external agent
|
|
444
443
|
// Message content stored as JSON to support both formats
|
|
445
444
|
content: sqliteCore.blob("content", { mode: "json" }).$type().notNull(),
|
|
@@ -448,8 +447,6 @@ var messages = sqliteCore.sqliteTable(
|
|
|
448
447
|
// 'user-facing' | 'internal' | 'system' | 'external'
|
|
449
448
|
messageType: sqliteCore.text("message_type").notNull().default("chat"),
|
|
450
449
|
// 'chat' | 'a2a-request' | 'a2a-response' | 'task-update' | 'tool-call'
|
|
451
|
-
// Legacy agent association (consider deprecating in favor of fromAgentId/toAgentId)
|
|
452
|
-
agentId: sqliteCore.text("agent_id"),
|
|
453
450
|
taskId: sqliteCore.text("task_id"),
|
|
454
451
|
parentMessageId: sqliteCore.text("parent_message_id"),
|
|
455
452
|
// Remove self-reference constraint here
|
|
@@ -576,10 +573,9 @@ var tasksRelations = drizzleOrm.relations(tasks, ({ one, many }) => ({
|
|
|
576
573
|
childRelations: many(taskRelations, {
|
|
577
574
|
relationName: "parentTask"
|
|
578
575
|
}),
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
references: [agents.id]
|
|
576
|
+
subAgent: one(subAgents, {
|
|
577
|
+
fields: [tasks.subAgentId],
|
|
578
|
+
references: [subAgents.id]
|
|
583
579
|
}),
|
|
584
580
|
// A task can have many messages associated with it
|
|
585
581
|
messages: many(messages),
|
|
@@ -587,7 +583,7 @@ var tasksRelations = drizzleOrm.relations(tasks, ({ one, many }) => ({
|
|
|
587
583
|
ledgerArtifacts: many(ledgerArtifacts)
|
|
588
584
|
}));
|
|
589
585
|
var projectsRelations = drizzleOrm.relations(projects, ({ many }) => ({
|
|
590
|
-
|
|
586
|
+
subAgents: many(subAgents),
|
|
591
587
|
agentGraphs: many(agentGraph),
|
|
592
588
|
tools: many(tools),
|
|
593
589
|
contextConfigs: many(contextConfigs),
|
|
@@ -625,17 +621,17 @@ var contextCacheRelations = drizzleOrm.relations(contextCache, ({ one }) => ({
|
|
|
625
621
|
references: [contextConfigs.id]
|
|
626
622
|
})
|
|
627
623
|
}));
|
|
628
|
-
var
|
|
624
|
+
var subAgentsRelations = drizzleOrm.relations(subAgents, ({ many, one }) => ({
|
|
629
625
|
project: one(projects, {
|
|
630
|
-
fields: [
|
|
626
|
+
fields: [subAgents.tenantId, subAgents.projectId],
|
|
631
627
|
references: [projects.tenantId, projects.id]
|
|
632
628
|
}),
|
|
633
629
|
tasks: many(tasks),
|
|
634
630
|
defaultForGraphs: many(agentGraph),
|
|
635
|
-
sourceRelations: many(
|
|
631
|
+
sourceRelations: many(subAgentRelations, {
|
|
636
632
|
relationName: "sourceRelations"
|
|
637
633
|
}),
|
|
638
|
-
targetRelations: many(
|
|
634
|
+
targetRelations: many(subAgentRelations, {
|
|
639
635
|
relationName: "targetRelations"
|
|
640
636
|
}),
|
|
641
637
|
sentMessages: many(messages, {
|
|
@@ -647,18 +643,18 @@ var agentsRelations = drizzleOrm.relations(agents, ({ many, one }) => ({
|
|
|
647
643
|
associatedMessages: many(messages, {
|
|
648
644
|
relationName: "associatedAgent"
|
|
649
645
|
}),
|
|
650
|
-
toolRelations: many(
|
|
651
|
-
dataComponentRelations: many(
|
|
652
|
-
artifactComponentRelations: many(
|
|
646
|
+
toolRelations: many(subAgentToolRelations),
|
|
647
|
+
dataComponentRelations: many(subAgentDataComponents),
|
|
648
|
+
artifactComponentRelations: many(subAgentArtifactComponents)
|
|
653
649
|
}));
|
|
654
650
|
var agentGraphRelations = drizzleOrm.relations(agentGraph, ({ one }) => ({
|
|
655
651
|
project: one(projects, {
|
|
656
652
|
fields: [agentGraph.tenantId, agentGraph.projectId],
|
|
657
653
|
references: [projects.tenantId, projects.id]
|
|
658
654
|
}),
|
|
659
|
-
|
|
660
|
-
fields: [agentGraph.
|
|
661
|
-
references: [
|
|
655
|
+
defaultSubAgent: one(subAgents, {
|
|
656
|
+
fields: [agentGraph.defaultSubAgentId],
|
|
657
|
+
references: [subAgents.id]
|
|
662
658
|
}),
|
|
663
659
|
contextConfig: one(contextConfigs, {
|
|
664
660
|
fields: [agentGraph.contextConfigId],
|
|
@@ -670,7 +666,7 @@ var externalAgentsRelations = drizzleOrm.relations(externalAgents, ({ one, many
|
|
|
670
666
|
fields: [externalAgents.tenantId, externalAgents.projectId],
|
|
671
667
|
references: [projects.tenantId, projects.id]
|
|
672
668
|
}),
|
|
673
|
-
|
|
669
|
+
subAgentRelations: many(subAgentRelations),
|
|
674
670
|
credentialReference: one(credentialReferences, {
|
|
675
671
|
fields: [externalAgents.credentialReferenceId],
|
|
676
672
|
references: [credentialReferences.id]
|
|
@@ -686,13 +682,13 @@ var apiKeysRelations = drizzleOrm.relations(apiKeys, ({ one }) => ({
|
|
|
686
682
|
references: [agentGraph.id]
|
|
687
683
|
})
|
|
688
684
|
}));
|
|
689
|
-
var agentToolRelationsRelations = drizzleOrm.relations(
|
|
690
|
-
|
|
691
|
-
fields: [
|
|
692
|
-
references: [
|
|
685
|
+
var agentToolRelationsRelations = drizzleOrm.relations(subAgentToolRelations, ({ one }) => ({
|
|
686
|
+
subAgent: one(subAgents, {
|
|
687
|
+
fields: [subAgentToolRelations.subAgentId],
|
|
688
|
+
references: [subAgents.id]
|
|
693
689
|
}),
|
|
694
690
|
tool: one(tools, {
|
|
695
|
-
fields: [
|
|
691
|
+
fields: [subAgentToolRelations.toolId],
|
|
696
692
|
references: [tools.id]
|
|
697
693
|
})
|
|
698
694
|
}));
|
|
@@ -704,7 +700,7 @@ var toolsRelations = drizzleOrm.relations(tools, ({ one, many }) => ({
|
|
|
704
700
|
fields: [tools.tenantId, tools.projectId],
|
|
705
701
|
references: [projects.tenantId, projects.id]
|
|
706
702
|
}),
|
|
707
|
-
|
|
703
|
+
subAgentRelations: many(subAgentToolRelations),
|
|
708
704
|
credentialReference: one(credentialReferences, {
|
|
709
705
|
fields: [tools.credentialReferenceId],
|
|
710
706
|
references: [credentialReferences.id]
|
|
@@ -720,9 +716,9 @@ var conversationsRelations = drizzleOrm.relations(conversations, ({ one, many })
|
|
|
720
716
|
references: [projects.tenantId, projects.id]
|
|
721
717
|
}),
|
|
722
718
|
messages: many(messages),
|
|
723
|
-
|
|
724
|
-
fields: [conversations.
|
|
725
|
-
references: [
|
|
719
|
+
activeSubAgent: one(subAgents, {
|
|
720
|
+
fields: [conversations.activeSubAgentId],
|
|
721
|
+
references: [subAgents.id]
|
|
726
722
|
})
|
|
727
723
|
}));
|
|
728
724
|
var messagesRelations = drizzleOrm.relations(messages, ({ one, many }) => ({
|
|
@@ -730,20 +726,14 @@ var messagesRelations = drizzleOrm.relations(messages, ({ one, many }) => ({
|
|
|
730
726
|
fields: [messages.conversationId],
|
|
731
727
|
references: [conversations.id]
|
|
732
728
|
}),
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
references: [agents.id],
|
|
737
|
-
relationName: "associatedAgent"
|
|
738
|
-
}),
|
|
739
|
-
fromAgent: one(agents, {
|
|
740
|
-
fields: [messages.fromAgentId],
|
|
741
|
-
references: [agents.id],
|
|
729
|
+
fromSubAgent: one(subAgents, {
|
|
730
|
+
fields: [messages.fromSubAgentId],
|
|
731
|
+
references: [subAgents.id],
|
|
742
732
|
relationName: "sentMessages"
|
|
743
733
|
}),
|
|
744
|
-
|
|
745
|
-
fields: [messages.
|
|
746
|
-
references: [
|
|
734
|
+
toSubAgent: one(subAgents, {
|
|
735
|
+
fields: [messages.toSubAgentId],
|
|
736
|
+
references: [subAgents.id],
|
|
747
737
|
relationName: "receivedMessages"
|
|
748
738
|
}),
|
|
749
739
|
fromExternalAgent: one(externalAgents, {
|
|
@@ -769,33 +759,40 @@ var messagesRelations = drizzleOrm.relations(messages, ({ one, many }) => ({
|
|
|
769
759
|
relationName: "parentChild"
|
|
770
760
|
})
|
|
771
761
|
}));
|
|
772
|
-
var artifactComponentsRelations = drizzleOrm.relations(artifactComponents, ({ many }) => ({
|
|
773
|
-
|
|
762
|
+
var artifactComponentsRelations = drizzleOrm.relations(artifactComponents, ({ many, one }) => ({
|
|
763
|
+
project: one(projects, {
|
|
764
|
+
fields: [artifactComponents.tenantId, artifactComponents.projectId],
|
|
765
|
+
references: [projects.tenantId, projects.id]
|
|
766
|
+
}),
|
|
767
|
+
subAgentRelations: many(subAgentArtifactComponents)
|
|
774
768
|
}));
|
|
775
|
-
var
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
769
|
+
var subAgentArtifactComponentsRelations = drizzleOrm.relations(
|
|
770
|
+
subAgentArtifactComponents,
|
|
771
|
+
({ one }) => ({
|
|
772
|
+
subAgent: one(subAgents, {
|
|
773
|
+
fields: [subAgentArtifactComponents.subAgentId],
|
|
774
|
+
references: [subAgents.id]
|
|
775
|
+
}),
|
|
776
|
+
artifactComponent: one(artifactComponents, {
|
|
777
|
+
fields: [subAgentArtifactComponents.artifactComponentId],
|
|
778
|
+
references: [artifactComponents.id]
|
|
779
|
+
})
|
|
783
780
|
})
|
|
784
|
-
|
|
781
|
+
);
|
|
785
782
|
var dataComponentsRelations = drizzleOrm.relations(dataComponents, ({ many, one }) => ({
|
|
786
783
|
project: one(projects, {
|
|
787
784
|
fields: [dataComponents.tenantId, dataComponents.projectId],
|
|
788
785
|
references: [projects.tenantId, projects.id]
|
|
789
786
|
}),
|
|
790
|
-
|
|
787
|
+
subAgentRelations: many(subAgentDataComponents)
|
|
791
788
|
}));
|
|
792
|
-
var
|
|
793
|
-
|
|
794
|
-
fields: [
|
|
795
|
-
references: [
|
|
789
|
+
var subAgentDataComponentsRelations = drizzleOrm.relations(subAgentDataComponents, ({ one }) => ({
|
|
790
|
+
subAgent: one(subAgents, {
|
|
791
|
+
fields: [subAgentDataComponents.subAgentId],
|
|
792
|
+
references: [subAgents.id]
|
|
796
793
|
}),
|
|
797
794
|
dataComponent: one(dataComponents, {
|
|
798
|
-
fields: [
|
|
795
|
+
fields: [subAgentDataComponents.dataComponentId],
|
|
799
796
|
references: [dataComponents.id]
|
|
800
797
|
})
|
|
801
798
|
}));
|
|
@@ -812,39 +809,30 @@ var ledgerArtifactsRelations = drizzleOrm.relations(ledgerArtifacts, ({ one }) =
|
|
|
812
809
|
var functionsRelations = drizzleOrm.relations(functions, ({ many }) => ({
|
|
813
810
|
tools: many(tools)
|
|
814
811
|
}));
|
|
815
|
-
var
|
|
812
|
+
var subAgentRelationsRelations = drizzleOrm.relations(subAgentRelations, ({ one }) => ({
|
|
816
813
|
graph: one(agentGraph, {
|
|
817
|
-
fields: [
|
|
814
|
+
fields: [subAgentRelations.graphId],
|
|
818
815
|
references: [agentGraph.id]
|
|
819
816
|
}),
|
|
820
|
-
|
|
821
|
-
fields: [
|
|
822
|
-
references: [
|
|
817
|
+
sourceSubAgent: one(subAgents, {
|
|
818
|
+
fields: [subAgentRelations.sourceSubAgentId],
|
|
819
|
+
references: [subAgents.id],
|
|
823
820
|
relationName: "sourceRelations"
|
|
824
821
|
}),
|
|
825
|
-
|
|
826
|
-
fields: [
|
|
827
|
-
references: [
|
|
822
|
+
targetSubAgent: one(subAgents, {
|
|
823
|
+
fields: [subAgentRelations.targetSubAgentId],
|
|
824
|
+
references: [subAgents.id],
|
|
828
825
|
relationName: "targetRelations"
|
|
829
826
|
}),
|
|
830
827
|
externalAgent: one(externalAgents, {
|
|
831
|
-
fields: [
|
|
828
|
+
fields: [subAgentRelations.externalSubAgentId],
|
|
832
829
|
references: [externalAgents.id]
|
|
833
830
|
})
|
|
834
831
|
}));
|
|
835
832
|
|
|
836
|
-
exports.agentArtifactComponents = agentArtifactComponents;
|
|
837
|
-
exports.agentArtifactComponentsRelations = agentArtifactComponentsRelations;
|
|
838
|
-
exports.agentDataComponents = agentDataComponents;
|
|
839
|
-
exports.agentDataComponentsRelations = agentDataComponentsRelations;
|
|
840
833
|
exports.agentGraph = agentGraph;
|
|
841
834
|
exports.agentGraphRelations = agentGraphRelations;
|
|
842
|
-
exports.agentRelations = agentRelations;
|
|
843
|
-
exports.agentRelationsRelations = agentRelationsRelations;
|
|
844
|
-
exports.agentToolRelations = agentToolRelations;
|
|
845
835
|
exports.agentToolRelationsRelations = agentToolRelationsRelations;
|
|
846
|
-
exports.agents = agents;
|
|
847
|
-
exports.agentsRelations = agentsRelations;
|
|
848
836
|
exports.apiKeys = apiKeys;
|
|
849
837
|
exports.apiKeysRelations = apiKeysRelations;
|
|
850
838
|
exports.artifactComponents = artifactComponents;
|
|
@@ -869,6 +857,15 @@ exports.messages = messages;
|
|
|
869
857
|
exports.messagesRelations = messagesRelations;
|
|
870
858
|
exports.projects = projects;
|
|
871
859
|
exports.projectsRelations = projectsRelations;
|
|
860
|
+
exports.subAgentArtifactComponents = subAgentArtifactComponents;
|
|
861
|
+
exports.subAgentArtifactComponentsRelations = subAgentArtifactComponentsRelations;
|
|
862
|
+
exports.subAgentDataComponents = subAgentDataComponents;
|
|
863
|
+
exports.subAgentDataComponentsRelations = subAgentDataComponentsRelations;
|
|
864
|
+
exports.subAgentRelations = subAgentRelations;
|
|
865
|
+
exports.subAgentRelationsRelations = subAgentRelationsRelations;
|
|
866
|
+
exports.subAgentToolRelations = subAgentToolRelations;
|
|
867
|
+
exports.subAgents = subAgents;
|
|
868
|
+
exports.subAgentsRelations = subAgentsRelations;
|
|
872
869
|
exports.taskRelations = taskRelations;
|
|
873
870
|
exports.taskRelationsRelations = taskRelationsRelations;
|
|
874
871
|
exports.tasks = tasks;
|
package/dist/db/schema.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'drizzle-orm';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
|
-
import '../utility-
|
|
4
|
-
export {
|
|
3
|
+
import '../utility-BEeDGMP9.cjs';
|
|
4
|
+
export { a as agentGraph, C as agentGraphRelations, F as agentToolRelationsRelations, u as apiKeys, E as apiKeysRelations, j as artifactComponents, K as artifactComponentsRelations, b as contextCache, A as contextCacheRelations, c as contextConfigs, z as contextConfigsRelations, o as conversations, I as conversationsRelations, v as credentialReferences, G as credentialReferencesRelations, h as dataComponents, M as dataComponentsRelations, f as externalAgents, D as externalAgentsRelations, m as functions, P as functionsRelations, r as ledgerArtifacts, O as ledgerArtifactsRelations, q as messages, J as messagesRelations, p as projects, x as projectsRelations, k as subAgentArtifactComponents, L as subAgentArtifactComponentsRelations, i as subAgentDataComponents, N as subAgentDataComponentsRelations, e as subAgentRelations, Q as subAgentRelationsRelations, n as subAgentToolRelations, d as subAgents, B as subAgentsRelations, g as taskRelations, y as taskRelationsRelations, t as tasks, w as tasksRelations, l as tools, H as toolsRelations } from '../schema-BIYOOKX_.cjs';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'drizzle-zod';
|
|
7
7
|
import '@hono/zod-openapi';
|
package/dist/db/schema.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'drizzle-orm';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
|
-
import '../utility-
|
|
4
|
-
export {
|
|
3
|
+
import '../utility-BEeDGMP9.js';
|
|
4
|
+
export { a as agentGraph, C as agentGraphRelations, F as agentToolRelationsRelations, u as apiKeys, E as apiKeysRelations, j as artifactComponents, K as artifactComponentsRelations, b as contextCache, A as contextCacheRelations, c as contextConfigs, z as contextConfigsRelations, o as conversations, I as conversationsRelations, v as credentialReferences, G as credentialReferencesRelations, h as dataComponents, M as dataComponentsRelations, f as externalAgents, D as externalAgentsRelations, m as functions, P as functionsRelations, r as ledgerArtifacts, O as ledgerArtifactsRelations, q as messages, J as messagesRelations, p as projects, x as projectsRelations, k as subAgentArtifactComponents, L as subAgentArtifactComponentsRelations, i as subAgentDataComponents, N as subAgentDataComponentsRelations, e as subAgentRelations, Q as subAgentRelationsRelations, n as subAgentToolRelations, d as subAgents, B as subAgentsRelations, g as taskRelations, y as taskRelationsRelations, t as tasks, w as tasksRelations, l as tools, H as toolsRelations } from '../schema-B1rukNyF.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'drizzle-zod';
|
|
7
7
|
import '@hono/zod-openapi';
|
package/dist/db/schema.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { agentGraph, agentGraphRelations, agentToolRelationsRelations, apiKeys, apiKeysRelations, artifactComponents, artifactComponentsRelations, contextCache, contextCacheRelations, contextConfigs, contextConfigsRelations, conversations, conversationsRelations, credentialReferences, credentialReferencesRelations, dataComponents, dataComponentsRelations, externalAgents, externalAgentsRelations, functions, functionsRelations, ledgerArtifacts, ledgerArtifactsRelations, messages, messagesRelations, projects, projectsRelations, subAgentArtifactComponents, subAgentArtifactComponentsRelations, subAgentDataComponents, subAgentDataComponentsRelations, subAgentRelations, subAgentRelationsRelations, subAgentToolRelations, subAgents, subAgentsRelations, taskRelations, taskRelationsRelations, tasks, tasksRelations, tools, toolsRelations } from '../chunk-5LRSB445.js';
|