@inkeep/agents-core 0.58.6 → 0.58.8

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 +8 -6
  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 +48 -48
  10. package/dist/data-access/manage/artifactComponents.d.ts +14 -14
  11. package/dist/data-access/manage/contextConfigs.d.ts +20 -20
  12. package/dist/data-access/manage/dataComponents.d.ts +6 -6
  13. package/dist/data-access/manage/functionTools.d.ts +20 -20
  14. package/dist/data-access/manage/skills.d.ts +17 -17
  15. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
  16. package/dist/data-access/manage/subAgentRelations.d.ts +28 -28
  17. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +24 -24
  18. package/dist/data-access/manage/subAgents.d.ts +24 -24
  19. package/dist/data-access/manage/tools.d.ts +27 -27
  20. package/dist/data-access/runtime/apiKeys.d.ts +16 -16
  21. package/dist/data-access/runtime/apps.d.ts +113 -0
  22. package/dist/data-access/runtime/apps.js +86 -0
  23. package/dist/data-access/runtime/cascade-delete.d.ts +2 -0
  24. package/dist/data-access/runtime/cascade-delete.js +16 -4
  25. package/dist/data-access/runtime/conversations.d.ts +24 -23
  26. package/dist/data-access/runtime/conversations.js +1 -0
  27. package/dist/data-access/runtime/messages.d.ts +6 -6
  28. package/dist/data-access/runtime/tasks.d.ts +6 -6
  29. package/dist/db/manage/manage-schema.d.ts +357 -357
  30. package/dist/db/runtime/runtime-schema.d.ts +552 -291
  31. package/dist/db/runtime/runtime-schema.js +16 -1
  32. package/dist/index.d.ts +10 -7
  33. package/dist/index.js +7 -4
  34. package/dist/middleware/no-auth.d.ts +2 -2
  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/dolt-schemas.d.ts +1 -1
  48. package/dist/validation/index.d.ts +2 -2
  49. package/dist/validation/index.js +2 -2
  50. package/dist/validation/schemas.d.ts +1840 -559
  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
+ id: string;
9
+ name: string;
10
+ description: string | null;
11
+ tenantId: string | null;
12
+ projectId: string | null;
13
+ type: AppType;
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
+ id: string;
52
+ name: string;
53
+ description: string | null;
54
+ tenantId: string | null;
55
+ projectId: string | null;
56
+ type: AppType;
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
  /**
@@ -17,16 +17,16 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
17
17
  }>;
18
18
  declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
19
19
  id: string;
20
- createdAt: string;
21
- updatedAt: string;
22
- agentId: string | null;
23
- projectId: string;
24
20
  tenantId: string;
21
+ projectId: string;
22
+ agentId: string | null;
25
23
  title: string | null;
24
+ createdAt: string;
25
+ updatedAt: string;
26
26
  metadata: ConversationMetadata | null;
27
27
  userId: string | null;
28
28
  ref: {
29
- type: "tag" | "commit" | "branch";
29
+ type: "commit" | "tag" | "branch";
30
30
  name: string;
31
31
  hash: string;
32
32
  } | null;
@@ -44,7 +44,7 @@ declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
44
44
  agentId: string | null;
45
45
  activeSubAgentId: string;
46
46
  ref: {
47
- type: "tag" | "commit" | "branch";
47
+ type: "commit" | "tag" | "branch";
48
48
  name: string;
49
49
  hash: string;
50
50
  } | null;
@@ -70,7 +70,7 @@ declare const updateConversationActiveSubAgent: (db: AgentsRunDatabaseClient) =>
70
70
  agentId: string | null;
71
71
  activeSubAgentId: string;
72
72
  ref: {
73
- type: "tag" | "commit" | "branch";
73
+ type: "commit" | "tag" | "branch";
74
74
  name: string;
75
75
  hash: string;
76
76
  } | null;
@@ -86,16 +86,16 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
86
86
  conversationId: string;
87
87
  }) => Promise<{
88
88
  id: string;
89
- createdAt: string;
90
- updatedAt: string;
91
- agentId: string | null;
92
- projectId: string;
93
89
  tenantId: string;
90
+ projectId: string;
91
+ agentId: string | null;
94
92
  title: string | null;
93
+ createdAt: string;
94
+ updatedAt: string;
95
95
  metadata: ConversationMetadata | null;
96
96
  userId: string | null;
97
97
  ref: {
98
- type: "tag" | "commit" | "branch";
98
+ type: "commit" | "tag" | "branch";
99
99
  name: string;
100
100
  hash: string;
101
101
  } | null;
@@ -108,7 +108,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
108
108
  tenantId: string;
109
109
  id: string;
110
110
  ref: {
111
- type: "tag" | "commit" | "branch";
111
+ type: "commit" | "tag" | "branch";
112
112
  name: string;
113
113
  hash: string;
114
114
  };
@@ -122,16 +122,16 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
122
122
  contextConfigId?: string | undefined;
123
123
  } | {
124
124
  id: string;
125
- createdAt: string;
126
- updatedAt: string;
127
- agentId: string | null;
128
- projectId: string;
129
125
  tenantId: string;
126
+ projectId: string;
127
+ agentId: string | null;
130
128
  title: string | null;
129
+ createdAt: string;
130
+ updatedAt: string;
131
131
  metadata: ConversationMetadata | null;
132
132
  userId: string | null;
133
133
  ref: {
134
- type: "tag" | "commit" | "branch";
134
+ type: "commit" | "tag" | "branch";
135
135
  name: string;
136
136
  hash: string;
137
137
  } | null;
@@ -154,16 +154,16 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
154
154
  conversationId: string;
155
155
  }) => Promise<{
156
156
  id: string;
157
- createdAt: string;
158
- updatedAt: string;
159
- agentId: string | null;
160
- projectId: string;
161
157
  tenantId: string;
158
+ projectId: string;
159
+ agentId: string | null;
162
160
  title: string | null;
161
+ createdAt: string;
162
+ updatedAt: string;
163
163
  metadata: ConversationMetadata | null;
164
164
  userId: string | null;
165
165
  ref: {
166
- type: "tag" | "commit" | "branch";
166
+ type: "commit" | "tag" | "branch";
167
167
  name: string;
168
168
  hash: string;
169
169
  } | null;
@@ -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({
@@ -11,10 +11,10 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
11
11
  messageId: string;
12
12
  }) => Promise<{
13
13
  id: string;
14
+ tenantId: string;
15
+ projectId: string;
14
16
  createdAt: string;
15
17
  updatedAt: string;
16
- projectId: string;
17
- tenantId: string;
18
18
  metadata: MessageMetadata | null;
19
19
  content: MessageContent;
20
20
  fromSubAgentId: string | null;
@@ -142,10 +142,10 @@ declare const getVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
142
142
  }[]>;
143
143
  declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageInsert) => Promise<{
144
144
  id: string;
145
+ tenantId: string;
146
+ projectId: string;
145
147
  createdAt: string;
146
148
  updatedAt: string;
147
- projectId: string;
148
- tenantId: string;
149
149
  metadata: MessageMetadata | null;
150
150
  content: MessageContent;
151
151
  fromSubAgentId: string | null;
@@ -195,10 +195,10 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
195
195
  messageId: string;
196
196
  }) => Promise<{
197
197
  id: string;
198
+ tenantId: string;
199
+ projectId: string;
198
200
  createdAt: string;
199
201
  updatedAt: string;
200
- projectId: string;
201
- tenantId: string;
202
202
  metadata: MessageMetadata | null;
203
203
  content: MessageContent;
204
204
  fromSubAgentId: string | null;
@@ -7,17 +7,17 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
7
7
  //#region src/data-access/runtime/tasks.d.ts
8
8
  declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
9
9
  id: string;
10
+ tenantId: string;
11
+ projectId: string;
12
+ agentId: string;
10
13
  createdAt: string;
11
14
  updatedAt: string;
12
- agentId: string;
13
- projectId: string;
14
- tenantId: string;
15
15
  metadata: TaskMetadataConfig | null;
16
- status: string;
17
16
  subAgentId: string;
17
+ status: string;
18
18
  contextId: string;
19
19
  ref: {
20
- type: "tag" | "commit" | "branch";
20
+ type: "commit" | "tag" | "branch";
21
21
  name: string;
22
22
  hash: string;
23
23
  } | null;
@@ -36,7 +36,7 @@ declare const updateTask: (db: AgentsRunDatabaseClient) => (params: {
36
36
  updatedAt: string;
37
37
  contextId: string;
38
38
  ref: {
39
- type: "tag" | "commit" | "branch";
39
+ type: "commit" | "tag" | "branch";
40
40
  name: string;
41
41
  hash: string;
42
42
  } | null;