@inkeep/agents-core 0.40.0 → 0.41.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 (39) hide show
  1. package/dist/_virtual/rolldown_runtime.js +2 -2
  2. package/dist/auth/auth.d.ts +67 -58
  3. package/dist/auth/permissions.d.ts +15 -14
  4. package/dist/auth/permissions.js +2 -1
  5. package/dist/client-exports.d.ts +14 -1
  6. package/dist/constants/otel-attributes.d.ts +1 -3
  7. package/dist/constants/otel-attributes.js +2 -4
  8. package/dist/constants/signoz-queries.d.ts +0 -1
  9. package/dist/constants/signoz-queries.js +0 -1
  10. package/dist/credential-stores/index.d.ts +2 -1
  11. package/dist/credential-stores/index.js +2 -1
  12. package/dist/data-access/agents.d.ts +21 -21
  13. package/dist/data-access/apiKeys.d.ts +20 -20
  14. package/dist/data-access/artifactComponents.d.ts +30 -10
  15. package/dist/data-access/artifactComponents.js +22 -1
  16. package/dist/data-access/contextConfigs.d.ts +12 -12
  17. package/dist/data-access/conversations.d.ts +12 -12
  18. package/dist/data-access/dataComponents.d.ts +4 -4
  19. package/dist/data-access/functionTools.d.ts +8 -8
  20. package/dist/data-access/messages.d.ts +9 -9
  21. package/dist/data-access/subAgentExternalAgentRelations.d.ts +24 -24
  22. package/dist/data-access/subAgentRelations.d.ts +30 -30
  23. package/dist/data-access/subAgentTeamAgentRelations.d.ts +18 -18
  24. package/dist/data-access/subAgents.d.ts +15 -15
  25. package/dist/data-access/tasks.d.ts +3 -3
  26. package/dist/data-access/tools.d.ts +36 -36
  27. package/dist/db/schema.d.ts +25 -0
  28. package/dist/db/schema.js +3 -2
  29. package/dist/index.d.ts +2 -1
  30. package/dist/index.js +3 -2
  31. package/dist/utils/logger.js +19 -3
  32. package/dist/utils/mcp-client.js +19 -5
  33. package/dist/utils/schema-conversion.d.ts +1 -1
  34. package/dist/utils/schema-conversion.js +1 -1
  35. package/dist/validation/schemas.d.ts +1656 -1256
  36. package/drizzle/0007_slim_karma.sql +1 -0
  37. package/drizzle/meta/0007_snapshot.json +3772 -0
  38. package/drizzle/meta/_journal.json +7 -0
  39. package/package.json +9 -9
@@ -8,14 +8,11 @@ import { PgTable } from "drizzle-orm/pg-core";
8
8
  declare const getAgentById: (db: DatabaseClient) => (params: {
9
9
  scopes: AgentScopeConfig;
10
10
  }) => Promise<{
11
- tenantId: string;
12
- projectId: string;
13
11
  id: string;
14
12
  name: string;
15
- description: string | null;
16
- prompt: string | null;
17
13
  createdAt: string;
18
14
  updatedAt: string;
15
+ description: string | null;
19
16
  models: {
20
17
  base?: {
21
18
  model?: string | undefined;
@@ -33,8 +30,10 @@ declare const getAgentById: (db: DatabaseClient) => (params: {
33
30
  stopWhen: {
34
31
  transferCountIs?: number | undefined;
35
32
  } | null;
33
+ tenantId: string;
36
34
  defaultSubAgentId: string | null;
37
35
  contextConfigId: string | null;
36
+ prompt: string | null;
38
37
  statusUpdates: {
39
38
  enabled?: boolean | undefined;
40
39
  numEvents?: number | undefined;
@@ -50,18 +49,16 @@ declare const getAgentById: (db: DatabaseClient) => (params: {
50
49
  } | undefined;
51
50
  }[] | undefined;
52
51
  } | null;
52
+ projectId: string;
53
53
  } | null>;
54
54
  declare const getAgentWithDefaultSubAgent: (db: DatabaseClient) => (params: {
55
55
  scopes: AgentScopeConfig;
56
56
  }) => Promise<{
57
- tenantId: string;
58
- projectId: string;
59
57
  id: string;
60
58
  name: string;
61
- description: string | null;
62
- prompt: string | null;
63
59
  createdAt: string;
64
60
  updatedAt: string;
61
+ description: string | null;
65
62
  models: {
66
63
  base?: {
67
64
  model?: string | undefined;
@@ -79,8 +76,10 @@ declare const getAgentWithDefaultSubAgent: (db: DatabaseClient) => (params: {
79
76
  stopWhen: {
80
77
  transferCountIs?: number | undefined;
81
78
  } | null;
79
+ tenantId: string;
82
80
  defaultSubAgentId: string | null;
83
81
  contextConfigId: string | null;
82
+ prompt: string | null;
84
83
  statusUpdates: {
85
84
  enabled?: boolean | undefined;
86
85
  numEvents?: number | undefined;
@@ -96,16 +95,13 @@ declare const getAgentWithDefaultSubAgent: (db: DatabaseClient) => (params: {
96
95
  } | undefined;
97
96
  }[] | undefined;
98
97
  } | null;
98
+ projectId: string;
99
99
  defaultSubAgent: {
100
- tenantId: string;
101
- projectId: string;
102
100
  id: string;
103
101
  name: string;
104
- description: string | null;
105
- prompt: string | null;
106
- agentId: string;
107
102
  createdAt: string;
108
103
  updatedAt: string;
104
+ description: string | null;
109
105
  models: {
110
106
  base?: {
111
107
  model?: string | undefined;
@@ -123,20 +119,21 @@ declare const getAgentWithDefaultSubAgent: (db: DatabaseClient) => (params: {
123
119
  stopWhen: {
124
120
  stepCountIs?: number | undefined;
125
121
  } | null;
122
+ tenantId: string;
123
+ prompt: string | null;
124
+ projectId: string;
125
+ agentId: string;
126
126
  conversationHistoryConfig: ConversationHistoryConfig | null;
127
127
  } | null;
128
128
  } | null>;
129
129
  declare const listAgents: (db: DatabaseClient) => (params: {
130
130
  scopes: ProjectScopeConfig;
131
131
  }) => Promise<{
132
- tenantId: string;
133
- projectId: string;
134
132
  id: string;
135
133
  name: string;
136
- description: string | null;
137
- prompt: string | null;
138
134
  createdAt: string;
139
135
  updatedAt: string;
136
+ description: string | null;
140
137
  models: {
141
138
  base?: {
142
139
  model?: string | undefined;
@@ -154,8 +151,10 @@ declare const listAgents: (db: DatabaseClient) => (params: {
154
151
  stopWhen: {
155
152
  transferCountIs?: number | undefined;
156
153
  } | null;
154
+ tenantId: string;
157
155
  defaultSubAgentId: string | null;
158
156
  contextConfigId: string | null;
157
+ prompt: string | null;
159
158
  statusUpdates: {
160
159
  enabled?: boolean | undefined;
161
160
  numEvents?: number | undefined;
@@ -171,6 +170,7 @@ declare const listAgents: (db: DatabaseClient) => (params: {
171
170
  } | undefined;
172
171
  }[] | undefined;
173
172
  } | null;
173
+ projectId: string;
174
174
  }[]>;
175
175
  declare const listAgentsPaginated: (db: DatabaseClient) => (params: {
176
176
  scopes: ProjectScopeConfig;
@@ -228,14 +228,11 @@ declare const listAgentsPaginated: (db: DatabaseClient) => (params: {
228
228
  };
229
229
  }>;
230
230
  declare const createAgent: (db: DatabaseClient) => (data: AgentInsert) => Promise<{
231
- tenantId: string;
232
- projectId: string;
233
231
  id: string;
234
232
  name: string;
235
- description: string | null;
236
- prompt: string | null;
237
233
  createdAt: string;
238
234
  updatedAt: string;
235
+ description: string | null;
239
236
  models: {
240
237
  base?: {
241
238
  model?: string | undefined;
@@ -253,8 +250,10 @@ declare const createAgent: (db: DatabaseClient) => (data: AgentInsert) => Promis
253
250
  stopWhen: {
254
251
  transferCountIs?: number | undefined;
255
252
  } | null;
253
+ tenantId: string;
256
254
  defaultSubAgentId: string | null;
257
255
  contextConfigId: string | null;
256
+ prompt: string | null;
258
257
  statusUpdates: {
259
258
  enabled?: boolean | undefined;
260
259
  numEvents?: number | undefined;
@@ -270,6 +269,7 @@ declare const createAgent: (db: DatabaseClient) => (data: AgentInsert) => Promis
270
269
  } | undefined;
271
270
  }[] | undefined;
272
271
  } | null;
272
+ projectId: string;
273
273
  }>;
274
274
  declare const updateAgent: (db: DatabaseClient) => (params: {
275
275
  scopes: AgentScopeConfig;
@@ -7,49 +7,49 @@ declare const getApiKeyById: (db: DatabaseClient) => (params: {
7
7
  scopes: ProjectScopeConfig;
8
8
  id: string;
9
9
  }) => Promise<{
10
- tenantId: string;
11
- projectId: string;
12
10
  id: string;
13
11
  name: string | null;
12
+ createdAt: string;
13
+ updatedAt: string;
14
+ expiresAt: string | null;
15
+ tenantId: string;
16
+ projectId: string;
14
17
  agentId: string;
15
18
  publicId: string;
16
19
  keyHash: string;
17
20
  keyPrefix: string;
18
21
  lastUsedAt: string | null;
19
- expiresAt: string | null;
20
- createdAt: string;
21
- updatedAt: string;
22
22
  } | undefined>;
23
23
  declare const getApiKeyByPublicId: (db: DatabaseClient) => (publicId: string) => Promise<{
24
- tenantId: string;
25
- projectId: string;
26
24
  id: string;
27
25
  name: string | null;
26
+ createdAt: string;
27
+ updatedAt: string;
28
+ expiresAt: string | null;
29
+ tenantId: string;
30
+ projectId: string;
28
31
  agentId: string;
29
32
  publicId: string;
30
33
  keyHash: string;
31
34
  keyPrefix: string;
32
35
  lastUsedAt: string | null;
33
- expiresAt: string | null;
34
- createdAt: string;
35
- updatedAt: string;
36
36
  } | undefined>;
37
37
  declare const listApiKeys: (db: DatabaseClient) => (params: {
38
38
  scopes: ProjectScopeConfig;
39
39
  agentId?: string;
40
40
  }) => Promise<{
41
- tenantId: string;
42
- projectId: string;
43
41
  id: string;
44
42
  name: string | null;
43
+ createdAt: string;
44
+ updatedAt: string;
45
+ expiresAt: string | null;
46
+ tenantId: string;
47
+ projectId: string;
45
48
  agentId: string;
46
49
  publicId: string;
47
50
  keyHash: string;
48
51
  keyPrefix: string;
49
52
  lastUsedAt: string | null;
50
- expiresAt: string | null;
51
- createdAt: string;
52
- updatedAt: string;
53
53
  }[]>;
54
54
  declare const listApiKeysPaginated: (db: DatabaseClient) => (params: {
55
55
  scopes: ProjectScopeConfig;
@@ -65,18 +65,18 @@ declare const listApiKeysPaginated: (db: DatabaseClient) => (params: {
65
65
  };
66
66
  }>;
67
67
  declare const createApiKey: (db: DatabaseClient) => (params: ApiKeyInsert) => Promise<{
68
- tenantId: string;
69
- projectId: string;
70
68
  id: string;
71
69
  name: string | null;
70
+ createdAt: string;
71
+ updatedAt: string;
72
+ expiresAt: string | null;
73
+ tenantId: string;
74
+ projectId: string;
72
75
  agentId: string;
73
76
  publicId: string;
74
77
  keyHash: string;
75
78
  keyPrefix: string;
76
79
  lastUsedAt: string | null;
77
- expiresAt: string | null;
78
- createdAt: string;
79
- updatedAt: string;
80
80
  }>;
81
81
  declare const updateApiKey: (db: DatabaseClient) => (params: {
82
82
  scopes: ProjectScopeConfig;
@@ -7,14 +7,18 @@ declare const getArtifactComponentById: (db: DatabaseClient) => (params: {
7
7
  scopes: ProjectScopeConfig;
8
8
  id: string;
9
9
  }) => Promise<{
10
- tenantId: string;
11
- projectId: string;
12
10
  id: string;
13
11
  name: string;
14
- description: string | null;
15
12
  createdAt: string;
16
13
  updatedAt: string;
14
+ description: string | null;
15
+ tenantId: string;
16
+ projectId: string;
17
17
  props: Record<string, unknown> | null;
18
+ render: {
19
+ component: string;
20
+ mockData: Record<string, unknown>;
21
+ } | null;
18
22
  } | undefined>;
19
23
  declare const listArtifactComponents: (db: DatabaseClient) => (params: {
20
24
  scopes: ProjectScopeConfig;
@@ -22,6 +26,10 @@ declare const listArtifactComponents: (db: DatabaseClient) => (params: {
22
26
  createdAt: string;
23
27
  updatedAt: string;
24
28
  props: Record<string, unknown> | null;
29
+ render: {
30
+ component: string;
31
+ mockData: Record<string, unknown>;
32
+ } | null;
25
33
  name: string;
26
34
  description: string | null;
27
35
  projectId: string;
@@ -41,14 +49,18 @@ declare const listArtifactComponentsPaginated: (db: DatabaseClient) => (params:
41
49
  };
42
50
  }>;
43
51
  declare const createArtifactComponent: (db: DatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
44
- tenantId: string;
45
- projectId: string;
46
52
  id: string;
47
53
  name: string;
48
- description: string | null;
49
54
  createdAt: string;
50
55
  updatedAt: string;
56
+ description: string | null;
57
+ tenantId: string;
58
+ projectId: string;
51
59
  props: Record<string, unknown> | null;
60
+ render: {
61
+ component: string;
62
+ mockData: Record<string, unknown>;
63
+ } | null;
52
64
  }>;
53
65
  declare const updateArtifactComponent: (db: DatabaseClient) => (params: {
54
66
  scopes: ProjectScopeConfig;
@@ -58,6 +70,10 @@ declare const updateArtifactComponent: (db: DatabaseClient) => (params: {
58
70
  createdAt: string;
59
71
  updatedAt: string;
60
72
  props: Record<string, unknown> | null;
73
+ render: {
74
+ component: string;
75
+ mockData: Record<string, unknown>;
76
+ } | null;
61
77
  name: string;
62
78
  description: string | null;
63
79
  projectId: string;
@@ -77,6 +93,10 @@ declare const getArtifactComponentsForAgent: (db: DatabaseClient) => (params: {
77
93
  name: string;
78
94
  description: string | null;
79
95
  props: Record<string, unknown> | null;
96
+ render: {
97
+ component: string;
98
+ mockData: Record<string, unknown>;
99
+ } | null;
80
100
  createdAt: string;
81
101
  updatedAt: string;
82
102
  }[]>;
@@ -84,11 +104,11 @@ declare const associateArtifactComponentWithAgent: (db: DatabaseClient) => (para
84
104
  scopes: SubAgentScopeConfig;
85
105
  artifactComponentId: string;
86
106
  }) => Promise<{
107
+ id: string;
108
+ createdAt: string;
87
109
  tenantId: string;
88
110
  projectId: string;
89
- id: string;
90
111
  agentId: string;
91
- createdAt: string;
92
112
  subAgentId: string;
93
113
  artifactComponentId: string;
94
114
  }>;
@@ -127,11 +147,11 @@ declare const upsertAgentArtifactComponentRelation: (db: DatabaseClient) => (par
127
147
  scopes: SubAgentScopeConfig;
128
148
  artifactComponentId: string;
129
149
  }) => Promise<{
150
+ id: string;
151
+ createdAt: string;
130
152
  tenantId: string;
131
153
  projectId: string;
132
- id: string;
133
154
  agentId: string;
134
- createdAt: string;
135
155
  subAgentId: string;
136
156
  artifactComponentId: string;
137
157
  } | null>;
@@ -1,6 +1,7 @@
1
1
  import { artifactComponents, subAgentArtifactComponents, subAgentRelations, subAgents } from "../db/schema.js";
2
2
  import { validatePropsAsJsonSchema } from "../validation/props-validation.js";
3
3
  import { generateId } from "../utils/conversations.js";
4
+ import { validateRender } from "../validation/render-validation.js";
4
5
  import { and, count, desc, eq } from "drizzle-orm";
5
6
 
6
7
  //#region src/data-access/artifactComponents.ts
@@ -36,6 +37,15 @@ const createArtifactComponent = (db) => async (params) => {
36
37
  throw new Error(`Invalid props schema: ${errorMessages}`);
37
38
  }
38
39
  }
40
+ if (params.render !== void 0 && params.render !== null) {
41
+ if (typeof params.render === "object" && params.render !== null && "component" in params.render && "mockData" in params.render) {
42
+ const renderValidation = validateRender(params.render);
43
+ if (!renderValidation.isValid) {
44
+ const errorMessages = renderValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
45
+ throw new Error(`Invalid render: ${errorMessages}`);
46
+ }
47
+ }
48
+ }
39
49
  const now = (/* @__PURE__ */ new Date()).toISOString();
40
50
  const [artifactComponent] = await db.insert(artifactComponents).values({
41
51
  ...params,
@@ -52,6 +62,15 @@ const updateArtifactComponent = (db) => async (params) => {
52
62
  throw new Error(`Invalid props schema: ${errorMessages}`);
53
63
  }
54
64
  }
65
+ if (params.data.render !== void 0 && params.data.render !== null) {
66
+ if (typeof params.data.render === "object" && params.data.render !== null && "component" in params.data.render && "mockData" in params.data.render) {
67
+ const renderValidation = validateRender(params.data.render);
68
+ if (!renderValidation.isValid) {
69
+ const errorMessages = renderValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
70
+ throw new Error(`Invalid render: ${errorMessages}`);
71
+ }
72
+ }
73
+ }
55
74
  const now = (/* @__PURE__ */ new Date()).toISOString();
56
75
  const [updated] = await db.update(artifactComponents).set({
57
76
  ...params.data,
@@ -75,6 +94,7 @@ const getArtifactComponentsForAgent = (db) => async (params) => {
75
94
  name: artifactComponents.name,
76
95
  description: artifactComponents.description,
77
96
  props: artifactComponents.props,
97
+ render: artifactComponents.render,
78
98
  createdAt: artifactComponents.createdAt,
79
99
  updatedAt: artifactComponents.updatedAt
80
100
  }).from(artifactComponents).innerJoin(subAgentArtifactComponents, eq(artifactComponents.id, subAgentArtifactComponents.artifactComponentId)).where(and(eq(artifactComponents.tenantId, params.scopes.tenantId), eq(artifactComponents.projectId, params.scopes.projectId), eq(subAgentArtifactComponents.agentId, params.scopes.agentId), eq(subAgentArtifactComponents.subAgentId, params.scopes.subAgentId))).orderBy(desc(artifactComponents.createdAt));
@@ -148,7 +168,8 @@ const upsertArtifactComponent = (db) => async (params) => {
148
168
  data: {
149
169
  name: params.data.name,
150
170
  description: params.data.description,
151
- props: params.data.props
171
+ props: params.data.props,
172
+ render: params.data.render
152
173
  }
153
174
  });
154
175
  return await createArtifactComponent(db)(params.data);
@@ -8,26 +8,26 @@ declare const getContextConfigById: (db: DatabaseClient) => (params: {
8
8
  scopes: AgentScopeConfig;
9
9
  id: string;
10
10
  }) => Promise<{
11
- tenantId: string;
12
- projectId: string;
13
11
  id: string;
14
- agentId: string;
15
12
  createdAt: string;
16
13
  updatedAt: string;
14
+ tenantId: string;
15
+ projectId: string;
17
16
  headersSchema: unknown;
18
17
  contextVariables: Record<string, ContextFetchDefinition> | null;
18
+ agentId: string;
19
19
  } | undefined>;
20
20
  declare const listContextConfigs: (db: DatabaseClient) => (params: {
21
21
  scopes: AgentScopeConfig;
22
22
  }) => Promise<{
23
- tenantId: string;
24
- projectId: string;
25
23
  id: string;
26
- agentId: string;
27
24
  createdAt: string;
28
25
  updatedAt: string;
26
+ tenantId: string;
27
+ projectId: string;
29
28
  headersSchema: unknown;
30
29
  contextVariables: Record<string, ContextFetchDefinition> | null;
30
+ agentId: string;
31
31
  }[]>;
32
32
  declare const listContextConfigsPaginated: (db: DatabaseClient) => (params: {
33
33
  scopes: AgentScopeConfig;
@@ -42,14 +42,14 @@ declare const listContextConfigsPaginated: (db: DatabaseClient) => (params: {
42
42
  };
43
43
  }>;
44
44
  declare const createContextConfig: (db: DatabaseClient) => (params: ContextConfigInsert) => Promise<{
45
- tenantId: string;
46
- projectId: string;
47
45
  id: string;
48
- agentId: string;
49
46
  createdAt: string;
50
47
  updatedAt: string;
48
+ tenantId: string;
49
+ projectId: string;
51
50
  headersSchema: unknown;
52
51
  contextVariables: Record<string, ContextFetchDefinition> | null;
52
+ agentId: string;
53
53
  }>;
54
54
  declare const updateContextConfig: (db: DatabaseClient) => (params: {
55
55
  scopes: AgentScopeConfig;
@@ -82,14 +82,14 @@ declare const countContextConfigs: (db: DatabaseClient) => (params: {
82
82
  declare const upsertContextConfig: (db: DatabaseClient) => (params: {
83
83
  data: ContextConfigInsert;
84
84
  }) => Promise<{
85
- tenantId: string;
86
- projectId: string;
87
85
  id: string;
88
- agentId: string;
89
86
  createdAt: string;
90
87
  updatedAt: string;
88
+ tenantId: string;
89
+ projectId: string;
91
90
  headersSchema: unknown;
92
91
  contextVariables: Record<string, ContextFetchDefinition> | null;
92
+ agentId: string;
93
93
  }>;
94
94
  //#endregion
95
95
  export { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig };
@@ -14,14 +14,14 @@ declare const listConversations: (db: DatabaseClient) => (params: {
14
14
  total: number;
15
15
  }>;
16
16
  declare const createConversation: (db: DatabaseClient) => (params: ConversationInsert) => Promise<{
17
- tenantId: string;
18
- projectId: string;
19
17
  id: string;
20
- title: string | null;
21
18
  createdAt: string;
22
19
  updatedAt: string;
23
20
  userId: string | null;
24
21
  metadata: ConversationMetadata | null;
22
+ title: string | null;
23
+ tenantId: string;
24
+ projectId: string;
25
25
  activeSubAgentId: string;
26
26
  lastContextResolution: string | null;
27
27
  }>;
@@ -65,14 +65,14 @@ declare const getConversation: (db: DatabaseClient) => (params: {
65
65
  scopes: ProjectScopeConfig;
66
66
  conversationId: string;
67
67
  }) => Promise<{
68
- tenantId: string;
69
- projectId: string;
70
68
  id: string;
71
- title: string | null;
72
69
  createdAt: string;
73
70
  updatedAt: string;
74
71
  userId: string | null;
75
72
  metadata: ConversationMetadata | null;
73
+ title: string | null;
74
+ tenantId: string;
75
+ projectId: string;
76
76
  activeSubAgentId: string;
77
77
  lastContextResolution: string | null;
78
78
  } | undefined>;
@@ -89,14 +89,14 @@ declare const createOrGetConversation: (db: DatabaseClient) => (input: Conversat
89
89
  metadata?: ConversationMetadata | null | undefined;
90
90
  contextConfigId?: string | undefined;
91
91
  } | {
92
- tenantId: string;
93
- projectId: string;
94
92
  id: string;
95
- title: string | null;
96
93
  createdAt: string;
97
94
  updatedAt: string;
98
95
  userId: string | null;
99
96
  metadata: ConversationMetadata | null;
97
+ title: string | null;
98
+ tenantId: string;
99
+ projectId: string;
100
100
  activeSubAgentId: string;
101
101
  lastContextResolution: string | null;
102
102
  }>;
@@ -115,14 +115,14 @@ declare const getActiveAgentForConversation: (db: DatabaseClient) => (params: {
115
115
  scopes: ProjectScopeConfig;
116
116
  conversationId: string;
117
117
  }) => Promise<{
118
- tenantId: string;
119
- projectId: string;
120
118
  id: string;
121
- title: string | null;
122
119
  createdAt: string;
123
120
  updatedAt: string;
124
121
  userId: string | null;
125
122
  metadata: ConversationMetadata | null;
123
+ title: string | null;
124
+ tenantId: string;
125
+ projectId: string;
126
126
  activeSubAgentId: string;
127
127
  lastContextResolution: string | null;
128
128
  } | undefined>;
@@ -64,11 +64,11 @@ declare const associateDataComponentWithAgent: (db: DatabaseClient) => (params:
64
64
  scopes: SubAgentScopeConfig;
65
65
  dataComponentId: string;
66
66
  }) => Promise<{
67
+ id: string;
68
+ createdAt: string;
67
69
  tenantId: string;
68
70
  projectId: string;
69
- id: string;
70
71
  agentId: string;
71
- createdAt: string;
72
72
  subAgentId: string;
73
73
  dataComponentId: string;
74
74
  }>;
@@ -106,11 +106,11 @@ declare const upsertAgentDataComponentRelation: (db: DatabaseClient) => (params:
106
106
  scopes: SubAgentScopeConfig;
107
107
  dataComponentId: string;
108
108
  }) => Promise<{
109
+ id: string;
110
+ createdAt: string;
109
111
  tenantId: string;
110
112
  projectId: string;
111
- id: string;
112
113
  agentId: string;
113
- createdAt: string;
114
114
  subAgentId: string;
115
115
  dataComponentId: string;
116
116
  } | null>;
@@ -53,14 +53,14 @@ declare const createFunctionTool: (db: DatabaseClient) => (params: {
53
53
  data: FunctionToolApiInsert;
54
54
  scopes: AgentScopeConfig;
55
55
  }) => Promise<{
56
- tenantId: string;
57
- projectId: string;
58
56
  id: string;
59
57
  name: string;
60
- description: string | null;
61
- agentId: string;
62
58
  createdAt: string;
63
59
  updatedAt: string;
60
+ description: string | null;
61
+ tenantId: string;
62
+ projectId: string;
63
+ agentId: string;
64
64
  functionId: string;
65
65
  }>;
66
66
  /**
@@ -95,14 +95,14 @@ declare const upsertFunctionTool: (db: DatabaseClient) => (params: {
95
95
  data: FunctionToolApiInsert;
96
96
  scopes: AgentScopeConfig;
97
97
  }) => Promise<{
98
- tenantId: string;
99
- projectId: string;
100
98
  id: string;
101
99
  name: string;
102
- description: string | null;
103
- agentId: string;
104
100
  createdAt: string;
105
101
  updatedAt: string;
102
+ description: string | null;
103
+ tenantId: string;
104
+ projectId: string;
105
+ agentId: string;
106
106
  functionId: string;
107
107
  }>;
108
108
  declare const getFunctionToolsForSubAgent: (db: DatabaseClient) => (params: {
@@ -9,14 +9,13 @@ declare const getMessageById: (db: DatabaseClient) => (params: {
9
9
  scopes: ProjectScopeConfig;
10
10
  messageId: string;
11
11
  }) => Promise<{
12
- tenantId: string;
13
- projectId: string;
14
12
  id: string;
15
13
  createdAt: string;
16
14
  updatedAt: string;
17
15
  metadata: MessageMetadata | null;
18
- content: MessageContent;
19
16
  role: string;
17
+ tenantId: string;
18
+ projectId: string;
20
19
  conversationId: string;
21
20
  fromSubAgentId: string | null;
22
21
  toSubAgentId: string | null;
@@ -24,6 +23,7 @@ declare const getMessageById: (db: DatabaseClient) => (params: {
24
23
  toExternalAgentId: string | null;
25
24
  fromTeamAgentId: string | null;
26
25
  toTeamAgentId: string | null;
26
+ content: MessageContent;
27
27
  visibility: string;
28
28
  messageType: string;
29
29
  taskId: string | null;
@@ -140,14 +140,13 @@ declare const getVisibleMessages: (db: DatabaseClient) => (params: {
140
140
  id: string;
141
141
  }[]>;
142
142
  declare const createMessage: (db: DatabaseClient) => (params: MessageInsert) => Promise<{
143
- tenantId: string;
144
- projectId: string;
145
143
  id: string;
146
144
  createdAt: string;
147
145
  updatedAt: string;
148
146
  metadata: MessageMetadata | null;
149
- content: MessageContent;
150
147
  role: string;
148
+ tenantId: string;
149
+ projectId: string;
151
150
  conversationId: string;
152
151
  fromSubAgentId: string | null;
153
152
  toSubAgentId: string | null;
@@ -155,6 +154,7 @@ declare const createMessage: (db: DatabaseClient) => (params: MessageInsert) =>
155
154
  toExternalAgentId: string | null;
156
155
  fromTeamAgentId: string | null;
157
156
  toTeamAgentId: string | null;
157
+ content: MessageContent;
158
158
  visibility: string;
159
159
  messageType: string;
160
160
  taskId: string | null;
@@ -193,14 +193,13 @@ declare const deleteMessage: (db: DatabaseClient) => (params: {
193
193
  scopes: ProjectScopeConfig;
194
194
  messageId: string;
195
195
  }) => Promise<{
196
- tenantId: string;
197
- projectId: string;
198
196
  id: string;
199
197
  createdAt: string;
200
198
  updatedAt: string;
201
199
  metadata: MessageMetadata | null;
202
- content: MessageContent;
203
200
  role: string;
201
+ tenantId: string;
202
+ projectId: string;
204
203
  conversationId: string;
205
204
  fromSubAgentId: string | null;
206
205
  toSubAgentId: string | null;
@@ -208,6 +207,7 @@ declare const deleteMessage: (db: DatabaseClient) => (params: {
208
207
  toExternalAgentId: string | null;
209
208
  fromTeamAgentId: string | null;
210
209
  toTeamAgentId: string | null;
210
+ content: MessageContent;
211
211
  visibility: string;
212
212
  messageType: string;
213
213
  taskId: string | null;