@inkeep/agents-core 0.0.0-dev-20260310195924 → 0.0.0-dev-20260310215636

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 (55) hide show
  1. package/dist/auth/auth-schema.d.ts +85 -85
  2. package/dist/auth/auth-validation-schemas.d.ts +152 -152
  3. package/dist/auth/auth.d.ts +28 -28
  4. package/dist/auth/permissions.d.ts +13 -13
  5. package/dist/client-exports.d.ts +7 -5
  6. package/dist/client-exports.js +2 -2
  7. package/dist/data-access/index.d.ts +2 -1
  8. package/dist/data-access/index.js +2 -1
  9. package/dist/data-access/manage/agents.d.ts +21 -21
  10. package/dist/data-access/manage/artifactComponents.d.ts +16 -16
  11. package/dist/data-access/manage/contextConfigs.d.ts +20 -20
  12. package/dist/data-access/manage/dataComponents.d.ts +8 -8
  13. package/dist/data-access/manage/functionTools.d.ts +18 -18
  14. package/dist/data-access/manage/skills.d.ts +19 -19
  15. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +30 -30
  16. package/dist/data-access/manage/subAgentRelations.d.ts +30 -30
  17. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +30 -30
  18. package/dist/data-access/manage/subAgents.d.ts +15 -15
  19. package/dist/data-access/manage/tools.d.ts +33 -33
  20. package/dist/data-access/manage/triggers.d.ts +2 -2
  21. package/dist/data-access/runtime/apiKeys.d.ts +20 -20
  22. package/dist/data-access/runtime/apps.d.ts +113 -0
  23. package/dist/data-access/runtime/apps.js +86 -0
  24. package/dist/data-access/runtime/cascade-delete.d.ts +2 -0
  25. package/dist/data-access/runtime/cascade-delete.js +16 -4
  26. package/dist/data-access/runtime/conversations.d.ts +21 -20
  27. package/dist/data-access/runtime/conversations.js +1 -0
  28. package/dist/data-access/runtime/messages.d.ts +21 -21
  29. package/dist/data-access/runtime/tasks.d.ts +6 -6
  30. package/dist/db/manage/manage-schema.d.ts +361 -361
  31. package/dist/db/runtime/runtime-schema.d.ts +544 -283
  32. package/dist/db/runtime/runtime-schema.js +16 -1
  33. package/dist/index.d.ts +10 -7
  34. package/dist/index.js +7 -4
  35. package/dist/setup/setup.js +10 -0
  36. package/dist/types/entities.d.ts +10 -2
  37. package/dist/types/index.d.ts +4 -4
  38. package/dist/types/utility.d.ts +9 -3
  39. package/dist/utils/apiKeys.d.ts +6 -1
  40. package/dist/utils/apiKeys.js +9 -1
  41. package/dist/utils/domain-validation.d.ts +4 -0
  42. package/dist/utils/domain-validation.js +25 -0
  43. package/dist/utils/index.d.ts +4 -2
  44. package/dist/utils/index.js +4 -2
  45. package/dist/utils/pow.d.ts +13 -0
  46. package/dist/utils/pow.js +52 -0
  47. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  48. package/dist/validation/index.d.ts +2 -2
  49. package/dist/validation/index.js +2 -2
  50. package/dist/validation/schemas.d.ts +3459 -2178
  51. package/dist/validation/schemas.js +57 -3
  52. package/drizzle/runtime/0022_superb_micromacro.sql +17 -0
  53. package/drizzle/runtime/meta/0022_snapshot.json +4240 -0
  54. package/drizzle/runtime/meta/_journal.json +7 -0
  55. package/package.json +3 -2
@@ -0,0 +1,113 @@
1
+ import { TenantScopeConfig } from "../../db/manage/scope-definitions.js";
2
+ import { AppType, PaginationConfig } from "../../types/utility.js";
3
+ import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
4
+ import { AppInsert, AppSelect, AppUpdate } from "../../types/entities.js";
5
+
6
+ //#region src/data-access/runtime/apps.d.ts
7
+ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promise<{
8
+ name: string;
9
+ type: AppType;
10
+ description: string | null;
11
+ tenantId: string | null;
12
+ projectId: string | null;
13
+ id: string;
14
+ createdAt: string;
15
+ updatedAt: string;
16
+ enabled: boolean;
17
+ config: {
18
+ type: "web_client";
19
+ webClient: {
20
+ allowedDomains: string[];
21
+ };
22
+ } | {
23
+ type: "api";
24
+ api: Record<string, never>;
25
+ };
26
+ lastUsedAt: string | null;
27
+ defaultProjectId: string | null;
28
+ defaultAgentId: string | null;
29
+ } | undefined>;
30
+ declare const updateAppLastUsed: (db: AgentsRunDatabaseClient) => (id: string) => Promise<void>;
31
+ declare const getAppByIdForTenant: (db: AgentsRunDatabaseClient) => (params: {
32
+ scopes: TenantScopeConfig;
33
+ id: string;
34
+ }) => Promise<AppSelect | undefined>;
35
+ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
36
+ scopes: TenantScopeConfig & {
37
+ projectId?: string;
38
+ };
39
+ pagination?: PaginationConfig;
40
+ type?: AppType;
41
+ }) => Promise<{
42
+ data: AppSelect[];
43
+ pagination: {
44
+ page: number;
45
+ limit: number;
46
+ total: number;
47
+ pages: number;
48
+ };
49
+ }>;
50
+ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
51
+ name: string;
52
+ type: AppType;
53
+ description: string | null;
54
+ tenantId: string | null;
55
+ projectId: string | null;
56
+ id: string;
57
+ createdAt: string;
58
+ updatedAt: string;
59
+ enabled: boolean;
60
+ config: {
61
+ type: "web_client";
62
+ webClient: {
63
+ allowedDomains: string[];
64
+ };
65
+ } | {
66
+ type: "api";
67
+ api: Record<string, never>;
68
+ };
69
+ lastUsedAt: string | null;
70
+ defaultProjectId: string | null;
71
+ defaultAgentId: string | null;
72
+ }>;
73
+ declare const updateAppForTenant: (db: AgentsRunDatabaseClient) => (params: {
74
+ scopes: TenantScopeConfig;
75
+ id: string;
76
+ data: AppUpdate;
77
+ }) => Promise<AppSelect | undefined>;
78
+ declare const deleteAppForTenant: (db: AgentsRunDatabaseClient) => (params: {
79
+ scopes: TenantScopeConfig;
80
+ id: string;
81
+ }) => Promise<boolean>;
82
+ declare const deleteAppsByProject: (db: AgentsRunDatabaseClient) => (tenantId: string, projectId: string) => Promise<number>;
83
+ declare const clearAppDefaultsByProject: (db: AgentsRunDatabaseClient) => (tenantId: string, projectId: string) => Promise<number>;
84
+ declare const clearAppDefaultsByAgent: (db: AgentsRunDatabaseClient) => (tenantId: string, agentId: string) => Promise<number>;
85
+ declare const updateApp: (db: AgentsRunDatabaseClient) => (params: {
86
+ id: string;
87
+ data: AppUpdate;
88
+ }) => Promise<{
89
+ createdAt: string;
90
+ updatedAt: string;
91
+ id: string;
92
+ tenantId: string | null;
93
+ projectId: string | null;
94
+ name: string;
95
+ description: string | null;
96
+ type: AppType;
97
+ defaultProjectId: string | null;
98
+ defaultAgentId: string | null;
99
+ enabled: boolean;
100
+ config: {
101
+ type: "web_client";
102
+ webClient: {
103
+ allowedDomains: string[];
104
+ };
105
+ } | {
106
+ type: "api";
107
+ api: Record<string, never>;
108
+ };
109
+ lastUsedAt: string | null;
110
+ }>;
111
+ declare const deleteApp: (db: AgentsRunDatabaseClient) => (id: string) => Promise<boolean>;
112
+ //#endregion
113
+ export { clearAppDefaultsByAgent, clearAppDefaultsByProject, createApp, deleteApp, deleteAppForTenant, deleteAppsByProject, getAppById, getAppByIdForTenant, listAppsPaginated, updateApp, updateAppForTenant, updateAppLastUsed };
@@ -0,0 +1,86 @@
1
+ import { apps } from "../../db/runtime/runtime-schema.js";
2
+ import { and, count, desc, eq } from "drizzle-orm";
3
+
4
+ //#region src/data-access/runtime/apps.ts
5
+ const getAppById = (db) => async (id) => {
6
+ return await db.query.apps.findFirst({ where: eq(apps.id, id) });
7
+ };
8
+ const updateAppLastUsed = (db) => async (id) => {
9
+ await db.update(apps).set({ lastUsedAt: (/* @__PURE__ */ new Date()).toISOString() }).where(eq(apps.id, id));
10
+ };
11
+ const getAppByIdForTenant = (db) => async (params) => {
12
+ return db.query.apps.findFirst({ where: and(eq(apps.id, params.id), eq(apps.tenantId, params.scopes.tenantId)) });
13
+ };
14
+ const listAppsPaginated = (db) => async (params) => {
15
+ const page = params.pagination?.page || 1;
16
+ const limit = Math.min(params.pagination?.limit || 10, 100);
17
+ const offset = (page - 1) * limit;
18
+ const conditions = [eq(apps.tenantId, params.scopes.tenantId)];
19
+ if (params.scopes.projectId) conditions.push(eq(apps.projectId, params.scopes.projectId));
20
+ if (params.type) conditions.push(eq(apps.type, params.type));
21
+ const whereClause = and(...conditions);
22
+ const [data, totalResult] = await Promise.all([db.select().from(apps).where(whereClause).limit(limit).offset(offset).orderBy(desc(apps.createdAt)), db.select({ count: count() }).from(apps).where(whereClause)]);
23
+ const total = totalResult[0]?.count || 0;
24
+ const totalNumber = typeof total === "string" ? Number.parseInt(total, 10) : total;
25
+ return {
26
+ data,
27
+ pagination: {
28
+ page,
29
+ limit,
30
+ total: totalNumber,
31
+ pages: Math.ceil(totalNumber / limit)
32
+ }
33
+ };
34
+ };
35
+ const createApp = (db) => async (params) => {
36
+ const now = (/* @__PURE__ */ new Date()).toISOString();
37
+ const [app] = await db.insert(apps).values({
38
+ ...params,
39
+ createdAt: now,
40
+ updatedAt: now
41
+ }).returning();
42
+ return app;
43
+ };
44
+ const updateAppForTenant = (db) => async (params) => {
45
+ const now = (/* @__PURE__ */ new Date()).toISOString();
46
+ const [updatedApp] = await db.update(apps).set({
47
+ ...params.data,
48
+ updatedAt: now
49
+ }).where(and(eq(apps.id, params.id), eq(apps.tenantId, params.scopes.tenantId))).returning();
50
+ return updatedApp;
51
+ };
52
+ const deleteAppForTenant = (db) => async (params) => {
53
+ return (await db.delete(apps).where(and(eq(apps.id, params.id), eq(apps.tenantId, params.scopes.tenantId))).returning()).length > 0;
54
+ };
55
+ const deleteAppsByProject = (db) => async (tenantId, projectId) => {
56
+ return (await db.delete(apps).where(and(eq(apps.tenantId, tenantId), eq(apps.projectId, projectId))).returning()).length;
57
+ };
58
+ const clearAppDefaultsByProject = (db) => async (tenantId, projectId) => {
59
+ return (await db.update(apps).set({
60
+ defaultProjectId: null,
61
+ defaultAgentId: null,
62
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
63
+ }).where(and(eq(apps.tenantId, tenantId), eq(apps.defaultProjectId, projectId))).returning()).length;
64
+ };
65
+ const clearAppDefaultsByAgent = (db) => async (tenantId, agentId) => {
66
+ return (await db.update(apps).set({
67
+ defaultAgentId: null,
68
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
69
+ }).where(and(eq(apps.tenantId, tenantId), eq(apps.defaultAgentId, agentId))).returning()).length;
70
+ };
71
+ const updateApp = (db) => async (params) => {
72
+ const now = (/* @__PURE__ */ new Date()).toISOString();
73
+ const [updatedApp] = await db.update(apps).set({
74
+ ...params.data,
75
+ updatedAt: now
76
+ }).where(eq(apps.id, params.id)).returning();
77
+ return updatedApp;
78
+ };
79
+ const deleteApp = (db) => async (id) => {
80
+ if (!await getAppById(db)(id)) return false;
81
+ await db.delete(apps).where(eq(apps.id, id));
82
+ return true;
83
+ };
84
+
85
+ //#endregion
86
+ export { clearAppDefaultsByAgent, clearAppDefaultsByProject, createApp, deleteApp, deleteAppForTenant, deleteAppsByProject, getAppById, getAppByIdForTenant, listAppsPaginated, updateApp, updateAppForTenant, updateAppLastUsed };
@@ -13,6 +13,8 @@ type CascadeDeleteResult = {
13
13
  apiKeysDeleted: number;
14
14
  slackChannelConfigsDeleted: number;
15
15
  slackWorkspaceDefaultsCleared: number;
16
+ appsDeleted: number;
17
+ appDefaultsCleared: number;
16
18
  };
17
19
  /**
18
20
  * Delete all runtime entities for a specific branch.
@@ -1,4 +1,5 @@
1
1
  import { apiKeys, contextCache, conversations, tasks, workAppGitHubMcpToolAccessMode, workAppGitHubMcpToolRepositoryAccess, workAppGitHubProjectAccessMode, workAppGitHubProjectRepositoryAccess } from "../../db/runtime/runtime-schema.js";
2
+ import { clearAppDefaultsByAgent, clearAppDefaultsByProject, deleteAppsByProject } from "./apps.js";
2
3
  import { deleteSlackMcpToolAccessConfig } from "./slack-work-app-mcp.js";
3
4
  import { clearDevConfigWorkspaceDefaultsByAgent, clearDevConfigWorkspaceDefaultsByProject, clearWorkspaceDefaultsByAgent, clearWorkspaceDefaultsByProject, deleteWorkAppSlackChannelAgentConfigsByAgent, deleteWorkAppSlackChannelAgentConfigsByProject } from "./workAppSlack.js";
4
5
  import { and, eq, inArray, sql } from "drizzle-orm";
@@ -22,7 +23,9 @@ const cascadeDeleteByBranch = (db) => async (params) => {
22
23
  contextCacheDeleted: contextCacheResult.length,
23
24
  apiKeysDeleted: 0,
24
25
  slackChannelConfigsDeleted: 0,
25
- slackWorkspaceDefaultsCleared: 0
26
+ slackWorkspaceDefaultsCleared: 0,
27
+ appsDeleted: 0,
28
+ appDefaultsCleared: 0
26
29
  };
27
30
  };
28
31
  /**
@@ -43,6 +46,8 @@ const cascadeDeleteByProject = (db) => async (params) => {
43
46
  tenantId: scopes.tenantId,
44
47
  projectId: scopes.projectId
45
48
  });
49
+ const appsDeleted = await deleteAppsByProject(db)(scopes.tenantId, scopes.projectId);
50
+ const appDefaultsCleared = await clearAppDefaultsByProject(db)(scopes.tenantId, scopes.projectId);
46
51
  const slackChannelConfigsDeleted = await deleteWorkAppSlackChannelAgentConfigsByProject(db)(scopes.tenantId, scopes.projectId);
47
52
  const slackWorkspaceDefaultsCleared = await clearWorkspaceDefaultsByProject(db)(scopes.tenantId, scopes.projectId);
48
53
  clearDevConfigWorkspaceDefaultsByProject(scopes.projectId);
@@ -52,7 +57,9 @@ const cascadeDeleteByProject = (db) => async (params) => {
52
57
  contextCacheDeleted: contextCacheResult.length,
53
58
  apiKeysDeleted: apiKeysResult.length,
54
59
  slackChannelConfigsDeleted,
55
- slackWorkspaceDefaultsCleared
60
+ slackWorkspaceDefaultsCleared,
61
+ appsDeleted,
62
+ appDefaultsCleared
56
63
  };
57
64
  };
58
65
  /**
@@ -78,6 +85,7 @@ const cascadeDeleteByAgent = (db) => async (params) => {
78
85
  }
79
86
  tasksDeleted = (await db.delete(tasks).where(and(eq(tasks.tenantId, scopes.tenantId), eq(tasks.projectId, scopes.projectId), eq(tasks.agentId, scopes.agentId), sql`${tasks.ref}->>'name' = ${fullBranchName}`)).returning()).length;
80
87
  apiKeysDeleted = (await db.delete(apiKeys).where(and(eq(apiKeys.tenantId, scopes.tenantId), eq(apiKeys.projectId, scopes.projectId), eq(apiKeys.agentId, scopes.agentId))).returning()).length;
88
+ const appDefaultsCleared = await clearAppDefaultsByAgent(db)(scopes.tenantId, scopes.agentId);
81
89
  const slackChannelConfigsDeleted = await deleteWorkAppSlackChannelAgentConfigsByAgent(db)(scopes.tenantId, scopes.projectId, scopes.agentId);
82
90
  const slackWorkspaceDefaultsCleared = await clearWorkspaceDefaultsByAgent(db)(scopes.tenantId, scopes.projectId, scopes.agentId);
83
91
  clearDevConfigWorkspaceDefaultsByAgent(scopes.projectId, scopes.agentId);
@@ -87,7 +95,9 @@ const cascadeDeleteByAgent = (db) => async (params) => {
87
95
  contextCacheDeleted,
88
96
  apiKeysDeleted,
89
97
  slackChannelConfigsDeleted,
90
- slackWorkspaceDefaultsCleared
98
+ slackWorkspaceDefaultsCleared,
99
+ appsDeleted: 0,
100
+ appDefaultsCleared
91
101
  };
92
102
  };
93
103
  /**
@@ -112,7 +122,9 @@ const cascadeDeleteBySubAgent = (db) => async (params) => {
112
122
  contextCacheDeleted,
113
123
  apiKeysDeleted: 0,
114
124
  slackChannelConfigsDeleted: 0,
115
- slackWorkspaceDefaultsCleared: 0
125
+ slackWorkspaceDefaultsCleared: 0,
126
+ appsDeleted: 0,
127
+ appDefaultsCleared: 0
116
128
  };
117
129
  };
118
130
  /**
@@ -16,20 +16,20 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
16
16
  total: number;
17
17
  }>;
18
18
  declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
19
- metadata: ConversationMetadata | null;
19
+ title: string | null;
20
+ tenantId: string;
21
+ projectId: string;
22
+ agentId: string | null;
20
23
  id: string;
21
24
  createdAt: string;
22
25
  updatedAt: string;
26
+ metadata: ConversationMetadata | null;
23
27
  userId: string | null;
24
28
  ref: {
25
29
  type: "tag" | "commit" | "branch";
26
30
  name: string;
27
31
  hash: string;
28
32
  } | null;
29
- agentId: string | null;
30
- projectId: string;
31
- tenantId: string;
32
- title: string | null;
33
33
  activeSubAgentId: string;
34
34
  lastContextResolution: string | null;
35
35
  }>;
@@ -85,20 +85,20 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
85
85
  scopes: ProjectScopeConfig;
86
86
  conversationId: string;
87
87
  }) => Promise<{
88
- metadata: ConversationMetadata | null;
88
+ title: string | null;
89
+ tenantId: string;
90
+ projectId: string;
91
+ agentId: string | null;
89
92
  id: string;
90
93
  createdAt: string;
91
94
  updatedAt: string;
95
+ metadata: ConversationMetadata | null;
92
96
  userId: string | null;
93
97
  ref: {
94
98
  type: "tag" | "commit" | "branch";
95
99
  name: string;
96
100
  hash: string;
97
101
  } | null;
98
- agentId: string | null;
99
- projectId: string;
100
- tenantId: string;
101
- title: string | null;
102
102
  activeSubAgentId: string;
103
103
  lastContextResolution: string | null;
104
104
  } | undefined>;
@@ -121,20 +121,20 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
121
121
  metadata?: ConversationMetadata | null | undefined;
122
122
  contextConfigId?: string | undefined;
123
123
  } | {
124
- metadata: ConversationMetadata | null;
124
+ title: string | null;
125
+ tenantId: string;
126
+ projectId: string;
127
+ agentId: string | null;
125
128
  id: string;
126
129
  createdAt: string;
127
130
  updatedAt: string;
131
+ metadata: ConversationMetadata | null;
128
132
  userId: string | null;
129
133
  ref: {
130
134
  type: "tag" | "commit" | "branch";
131
135
  name: string;
132
136
  hash: string;
133
137
  } | null;
134
- agentId: string | null;
135
- projectId: string;
136
- tenantId: string;
137
- title: string | null;
138
138
  activeSubAgentId: string;
139
139
  lastContextResolution: string | null;
140
140
  }>;
@@ -153,20 +153,20 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
153
153
  scopes: ProjectScopeConfig;
154
154
  conversationId: string;
155
155
  }) => Promise<{
156
- metadata: ConversationMetadata | null;
156
+ title: string | null;
157
+ tenantId: string;
158
+ projectId: string;
159
+ agentId: string | null;
157
160
  id: string;
158
161
  createdAt: string;
159
162
  updatedAt: string;
163
+ metadata: ConversationMetadata | null;
160
164
  userId: string | null;
161
165
  ref: {
162
166
  type: "tag" | "commit" | "branch";
163
167
  name: string;
164
168
  hash: string;
165
169
  } | null;
166
- agentId: string | null;
167
- projectId: string;
168
- tenantId: string;
169
- title: string | null;
170
170
  activeSubAgentId: string;
171
171
  lastContextResolution: string | null;
172
172
  } | undefined>;
@@ -179,6 +179,7 @@ declare const setActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
179
179
  subAgentId: string;
180
180
  agentId: string;
181
181
  ref: ResolvedRef;
182
+ userId?: string;
182
183
  }) => Promise<void>;
183
184
  declare const setActiveAgentForThread: (db: AgentsRunDatabaseClient) => ({
184
185
  scopes,
@@ -162,6 +162,7 @@ const setActiveAgentForConversation = (db) => async (params) => {
162
162
  activeSubAgentId: params.subAgentId,
163
163
  agentId: params.agentId,
164
164
  ref: params.ref,
165
+ userId: params.userId,
165
166
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
166
167
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
167
168
  }).onConflictDoUpdate({
@@ -10,26 +10,26 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
10
10
  scopes: ProjectScopeConfig;
11
11
  messageId: string;
12
12
  }) => Promise<{
13
- metadata: MessageMetadata | null;
13
+ tenantId: string;
14
+ projectId: string;
14
15
  id: string;
15
16
  createdAt: string;
16
17
  updatedAt: string;
17
- role: string;
18
- projectId: string;
19
- tenantId: string;
18
+ metadata: MessageMetadata | null;
20
19
  content: MessageContent;
20
+ conversationId: string;
21
+ role: string;
21
22
  fromSubAgentId: string | null;
22
23
  toSubAgentId: string | null;
23
24
  fromExternalAgentId: string | null;
24
25
  toExternalAgentId: string | null;
25
- taskId: string | null;
26
- a2aTaskId: string | null;
27
- conversationId: string;
28
26
  fromTeamAgentId: string | null;
29
27
  toTeamAgentId: string | null;
30
28
  visibility: string;
31
29
  messageType: string;
30
+ taskId: string | null;
32
31
  parentMessageId: string | null;
32
+ a2aTaskId: string | null;
33
33
  a2aSessionId: string | null;
34
34
  } | undefined>;
35
35
  declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
@@ -141,26 +141,26 @@ declare const getVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
141
141
  id: string;
142
142
  }[]>;
143
143
  declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageInsert) => Promise<{
144
- metadata: MessageMetadata | null;
144
+ tenantId: string;
145
+ projectId: string;
145
146
  id: string;
146
147
  createdAt: string;
147
148
  updatedAt: string;
148
- role: string;
149
- projectId: string;
150
- tenantId: string;
149
+ metadata: MessageMetadata | null;
151
150
  content: MessageContent;
151
+ conversationId: string;
152
+ role: string;
152
153
  fromSubAgentId: string | null;
153
154
  toSubAgentId: string | null;
154
155
  fromExternalAgentId: string | null;
155
156
  toExternalAgentId: string | null;
156
- taskId: string | null;
157
- a2aTaskId: string | null;
158
- conversationId: string;
159
157
  fromTeamAgentId: string | null;
160
158
  toTeamAgentId: string | null;
161
159
  visibility: string;
162
160
  messageType: string;
161
+ taskId: string | null;
163
162
  parentMessageId: string | null;
163
+ a2aTaskId: string | null;
164
164
  a2aSessionId: string | null;
165
165
  }>;
166
166
  declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
@@ -194,26 +194,26 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
194
194
  scopes: ProjectScopeConfig;
195
195
  messageId: string;
196
196
  }) => Promise<{
197
- metadata: MessageMetadata | null;
197
+ tenantId: string;
198
+ projectId: string;
198
199
  id: string;
199
200
  createdAt: string;
200
201
  updatedAt: string;
201
- role: string;
202
- projectId: string;
203
- tenantId: string;
202
+ metadata: MessageMetadata | null;
204
203
  content: MessageContent;
204
+ conversationId: string;
205
+ role: string;
205
206
  fromSubAgentId: string | null;
206
207
  toSubAgentId: string | null;
207
208
  fromExternalAgentId: string | null;
208
209
  toExternalAgentId: string | null;
209
- taskId: string | null;
210
- a2aTaskId: string | null;
211
- conversationId: string;
212
210
  fromTeamAgentId: string | null;
213
211
  toTeamAgentId: string | null;
214
212
  visibility: string;
215
213
  messageType: string;
214
+ taskId: string | null;
216
215
  parentMessageId: string | null;
216
+ a2aTaskId: string | null;
217
217
  a2aSessionId: string | null;
218
218
  }>;
219
219
  declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
@@ -6,21 +6,21 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
6
6
 
7
7
  //#region src/data-access/runtime/tasks.d.ts
8
8
  declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
9
- metadata: TaskMetadataConfig | null;
9
+ tenantId: string;
10
+ projectId: string;
11
+ agentId: string;
12
+ subAgentId: string;
10
13
  id: string;
11
14
  createdAt: string;
12
15
  updatedAt: string;
16
+ metadata: TaskMetadataConfig | null;
13
17
  status: string;
18
+ contextId: string;
14
19
  ref: {
15
20
  type: "tag" | "commit" | "branch";
16
21
  name: string;
17
22
  hash: string;
18
23
  } | null;
19
- agentId: string;
20
- projectId: string;
21
- tenantId: string;
22
- subAgentId: string;
23
- contextId: string;
24
24
  }>;
25
25
  declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
26
26
  id: string;