@inkeep/agents-core 0.0.0-dev-20260414181624 → 0.0.0-dev-20260414201919

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 (35) hide show
  1. package/dist/auth/auth-validation-schemas.d.ts +154 -154
  2. package/dist/auth/auth.js +14 -0
  3. package/dist/data-access/index.d.ts +2 -1
  4. package/dist/data-access/index.js +2 -1
  5. package/dist/data-access/manage/agents.d.ts +15 -15
  6. package/dist/data-access/manage/artifactComponents.d.ts +4 -4
  7. package/dist/data-access/manage/contextConfigs.d.ts +8 -8
  8. package/dist/data-access/manage/functionTools.d.ts +4 -4
  9. package/dist/data-access/manage/skills.d.ts +6 -6
  10. package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +6 -6
  11. package/dist/data-access/manage/subAgentRelations.d.ts +4 -4
  12. package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +6 -6
  13. package/dist/data-access/manage/subAgents.d.ts +9 -9
  14. package/dist/data-access/manage/tools.d.ts +18 -18
  15. package/dist/data-access/manage/triggers.d.ts +3 -3
  16. package/dist/data-access/runtime/apiKeys.d.ts +8 -8
  17. package/dist/data-access/runtime/apps.d.ts +9 -9
  18. package/dist/data-access/runtime/conversations.d.ts +20 -20
  19. package/dist/data-access/runtime/invitationProjectAssignments.d.ts +16 -0
  20. package/dist/data-access/runtime/invitationProjectAssignments.js +25 -0
  21. package/dist/data-access/runtime/messages.d.ts +6 -6
  22. package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
  23. package/dist/data-access/runtime/tasks.d.ts +6 -6
  24. package/dist/db/manage/manage-schema.d.ts +457 -457
  25. package/dist/db/runtime/runtime-schema.d.ts +507 -415
  26. package/dist/db/runtime/runtime-schema.js +13 -1
  27. package/dist/index.d.ts +3 -2
  28. package/dist/index.js +3 -2
  29. package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
  30. package/dist/validation/schemas/skills.d.ts +30 -30
  31. package/dist/validation/schemas.d.ts +2106 -2106
  32. package/drizzle/runtime/0037_mysterious_gargoyle.sql +10 -0
  33. package/drizzle/runtime/meta/0037_snapshot.json +5990 -0
  34. package/drizzle/runtime/meta/_journal.json +7 -0
  35. package/package.json +1 -1
@@ -12,11 +12,11 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
12
12
  id: string;
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
+ headers: Record<string, string> | null;
15
16
  agentId: string;
16
17
  projectId: string;
17
18
  tenantId: string;
18
19
  subAgentId: string;
19
- headers: Record<string, string> | null;
20
20
  targetAgentId: string;
21
21
  } | undefined>;
22
22
  declare const listSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
@@ -47,11 +47,11 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
47
47
  id: string;
48
48
  createdAt: string;
49
49
  updatedAt: string;
50
+ headers: Record<string, string> | null;
50
51
  agentId: string;
51
52
  projectId: string;
52
53
  tenantId: string;
53
54
  subAgentId: string;
54
- headers: Record<string, string> | null;
55
55
  targetAgentId: string;
56
56
  }[]>;
57
57
  declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -60,11 +60,11 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
60
60
  id: string;
61
61
  createdAt: string;
62
62
  updatedAt: string;
63
+ headers: Record<string, string> | null;
63
64
  agentId: string;
64
65
  projectId: string;
65
66
  tenantId: string;
66
67
  subAgentId: string;
67
- headers: Record<string, string> | null;
68
68
  targetAgentId: string;
69
69
  }[]>;
70
70
  declare const getSubAgentTeamAgentRelationsByTeamAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -225,11 +225,11 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
225
225
  id: string;
226
226
  createdAt: string;
227
227
  updatedAt: string;
228
+ headers: Record<string, string> | null;
228
229
  agentId: string;
229
230
  projectId: string;
230
231
  tenantId: string;
231
232
  subAgentId: string;
232
- headers: Record<string, string> | null;
233
233
  targetAgentId: string;
234
234
  }>;
235
235
  /**
@@ -242,11 +242,11 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
242
242
  id: string;
243
243
  createdAt: string;
244
244
  updatedAt: string;
245
+ headers: Record<string, string> | null;
245
246
  agentId: string;
246
247
  projectId: string;
247
248
  tenantId: string;
248
249
  subAgentId: string;
249
- headers: Record<string, string> | null;
250
250
  targetAgentId: string;
251
251
  } | undefined>;
252
252
  /**
@@ -263,11 +263,11 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
263
263
  id: string;
264
264
  createdAt: string;
265
265
  updatedAt: string;
266
+ headers: Record<string, string> | null;
266
267
  agentId: string;
267
268
  projectId: string;
268
269
  tenantId: string;
269
270
  subAgentId: string;
270
- headers: Record<string, string> | null;
271
271
  targetAgentId: string;
272
272
  }>;
273
273
  declare const updateSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
@@ -9,14 +9,15 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
9
9
  scopes: AgentScopeConfig;
10
10
  subAgentId: string;
11
11
  }) => Promise<{
12
- name: string;
13
12
  id: string;
13
+ name: string;
14
14
  createdAt: string;
15
15
  updatedAt: string;
16
+ description: string | null;
17
+ prompt: string | null;
16
18
  agentId: string;
17
19
  projectId: string;
18
20
  tenantId: string;
19
- description: string | null;
20
21
  models: {
21
22
  base?: {
22
23
  model?: string | undefined;
@@ -37,7 +38,6 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
37
38
  allowedProviders?: string[] | undefined;
38
39
  } | undefined;
39
40
  } | null;
40
- prompt: string | null;
41
41
  stopWhen: {
42
42
  stepCountIs?: number | undefined;
43
43
  } | null;
@@ -46,14 +46,15 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
46
46
  declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
47
47
  scopes: AgentScopeConfig;
48
48
  }) => Promise<{
49
- name: string;
50
49
  id: string;
50
+ name: string;
51
51
  createdAt: string;
52
52
  updatedAt: string;
53
+ description: string | null;
54
+ prompt: string | null;
53
55
  agentId: string;
54
56
  projectId: string;
55
57
  tenantId: string;
56
- description: string | null;
57
58
  models: {
58
59
  base?: {
59
60
  model?: string | undefined;
@@ -74,7 +75,6 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
74
75
  allowedProviders?: string[] | undefined;
75
76
  } | undefined;
76
77
  } | null;
77
- prompt: string | null;
78
78
  stopWhen: {
79
79
  stepCountIs?: number | undefined;
80
80
  } | null;
@@ -127,14 +127,15 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
127
127
  };
128
128
  }>;
129
129
  declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
130
- name: string;
131
130
  id: string;
131
+ name: string;
132
132
  createdAt: string;
133
133
  updatedAt: string;
134
+ description: string | null;
135
+ prompt: string | null;
134
136
  agentId: string;
135
137
  projectId: string;
136
138
  tenantId: string;
137
- description: string | null;
138
139
  models: {
139
140
  base?: {
140
141
  model?: string | undefined;
@@ -155,7 +156,6 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
155
156
  allowedProviders?: string[] | undefined;
156
157
  } | undefined;
157
158
  } | null;
158
- prompt: string | null;
159
159
  stopWhen: {
160
160
  stepCountIs?: number | undefined;
161
161
  } | null;
@@ -20,19 +20,19 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
20
20
  scopes: ProjectScopeConfig;
21
21
  toolId: string;
22
22
  }) => Promise<{
23
- name: string;
24
23
  id: string;
24
+ name: string;
25
25
  createdAt: string;
26
26
  updatedAt: string;
27
- projectId: string;
28
- tenantId: string;
29
27
  description: string | null;
30
28
  headers: Record<string, string> | null;
29
+ projectId: string;
30
+ tenantId: string;
31
+ credentialReferenceId: string | null;
31
32
  config: {
32
33
  type: "mcp";
33
34
  mcp: ToolMcpConfig;
34
35
  };
35
- credentialReferenceId: string | null;
36
36
  credentialScope: string;
37
37
  imageUrl: string | null;
38
38
  capabilities: ToolServerCapabilities | null;
@@ -78,19 +78,19 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
78
78
  };
79
79
  }>;
80
80
  declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
81
- name: string;
82
81
  id: string;
82
+ name: string;
83
83
  createdAt: string;
84
84
  updatedAt: string;
85
- projectId: string;
86
- tenantId: string;
87
85
  description: string | null;
88
86
  headers: Record<string, string> | null;
87
+ projectId: string;
88
+ tenantId: string;
89
+ credentialReferenceId: string | null;
89
90
  config: {
90
91
  type: "mcp";
91
92
  mcp: ToolMcpConfig;
92
93
  };
93
- credentialReferenceId: string | null;
94
94
  credentialScope: string;
95
95
  imageUrl: string | null;
96
96
  capabilities: ToolServerCapabilities | null;
@@ -138,12 +138,12 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
138
138
  id: string;
139
139
  createdAt: string;
140
140
  updatedAt: string;
141
+ headers: Record<string, string> | null;
141
142
  agentId: string;
142
143
  projectId: string;
143
144
  tenantId: string;
144
- subAgentId: string;
145
145
  toolId: string;
146
- headers: Record<string, string> | null;
146
+ subAgentId: string;
147
147
  toolPolicies: Record<string, {
148
148
  needsApproval?: boolean;
149
149
  }> | null;
@@ -157,12 +157,12 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
157
157
  id: string;
158
158
  createdAt: string;
159
159
  updatedAt: string;
160
+ headers: Record<string, string> | null;
160
161
  agentId: string;
161
162
  projectId: string;
162
163
  tenantId: string;
163
- subAgentId: string;
164
164
  toolId: string;
165
- headers: Record<string, string> | null;
165
+ subAgentId: string;
166
166
  toolPolicies: Record<string, {
167
167
  needsApproval?: boolean;
168
168
  }> | null;
@@ -185,12 +185,12 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
185
185
  id: string;
186
186
  createdAt: string;
187
187
  updatedAt: string;
188
+ headers: Record<string, string> | null;
188
189
  agentId: string;
189
190
  projectId: string;
190
191
  tenantId: string;
191
- subAgentId: string;
192
192
  toolId: string;
193
- headers: Record<string, string> | null;
193
+ subAgentId: string;
194
194
  toolPolicies: Record<string, {
195
195
  needsApproval?: boolean;
196
196
  }> | null;
@@ -202,19 +202,19 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
202
202
  declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
203
203
  data: ToolInsert;
204
204
  }) => Promise<{
205
- name: string;
206
205
  id: string;
206
+ name: string;
207
207
  createdAt: string;
208
208
  updatedAt: string;
209
- projectId: string;
210
- tenantId: string;
211
209
  description: string | null;
212
210
  headers: Record<string, string> | null;
211
+ projectId: string;
212
+ tenantId: string;
213
+ credentialReferenceId: string | null;
213
214
  config: {
214
215
  type: "mcp";
215
216
  mcp: ToolMcpConfig;
216
217
  };
217
- credentialReferenceId: string | null;
218
218
  credentialScope: string;
219
219
  imageUrl: string | null;
220
220
  capabilities: ToolServerCapabilities | null;
@@ -40,13 +40,13 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
40
40
  algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
41
41
  encoding: "hex" | "base64";
42
42
  signature: {
43
- source: "query" | "header" | "body";
43
+ source: "query" | "body" | "header";
44
44
  key: string;
45
45
  prefix?: string | undefined;
46
46
  regex?: string | undefined;
47
47
  };
48
48
  signedComponents: {
49
- source: "literal" | "header" | "body";
49
+ source: "literal" | "body" | "header";
50
50
  required: boolean;
51
51
  key?: string | undefined;
52
52
  value?: string | undefined;
@@ -132,10 +132,10 @@ declare const createTriggerUser: (db: AgentsManageDatabaseClient) => (params: {
132
132
  userId: string;
133
133
  }) => Promise<{
134
134
  createdAt: string;
135
+ userId: string;
135
136
  agentId: string;
136
137
  projectId: string;
137
138
  tenantId: string;
138
- userId: string;
139
139
  triggerId: string;
140
140
  }>;
141
141
  declare const deleteTriggerUser: (db: AgentsManageDatabaseClient) => (params: {
@@ -8,28 +8,28 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
8
8
  scopes: ProjectScopeConfig;
9
9
  id: string;
10
10
  }) => Promise<{
11
- name: string | null;
12
11
  id: string;
12
+ name: string | null;
13
13
  createdAt: string;
14
14
  updatedAt: string;
15
+ expiresAt: string | null;
15
16
  agentId: string;
16
17
  projectId: string;
17
18
  tenantId: string;
18
- expiresAt: string | null;
19
19
  publicId: string;
20
20
  keyHash: string;
21
21
  keyPrefix: string;
22
22
  lastUsedAt: string | null;
23
23
  } | undefined>;
24
24
  declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
25
- name: string | null;
26
25
  id: string;
26
+ name: string | null;
27
27
  createdAt: string;
28
28
  updatedAt: string;
29
+ expiresAt: string | null;
29
30
  agentId: string;
30
31
  projectId: string;
31
32
  tenantId: string;
32
- expiresAt: string | null;
33
33
  publicId: string;
34
34
  keyHash: string;
35
35
  keyPrefix: string;
@@ -39,14 +39,14 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
39
39
  scopes: ProjectScopeConfig;
40
40
  agentId?: string;
41
41
  }) => Promise<{
42
- name: string | null;
43
42
  id: string;
43
+ name: string | null;
44
44
  createdAt: string;
45
45
  updatedAt: string;
46
+ expiresAt: string | null;
46
47
  agentId: string;
47
48
  projectId: string;
48
49
  tenantId: string;
49
- expiresAt: string | null;
50
50
  publicId: string;
51
51
  keyHash: string;
52
52
  keyPrefix: string;
@@ -66,14 +66,14 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
66
66
  };
67
67
  }>;
68
68
  declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
69
- name: string | null;
70
69
  id: string;
70
+ name: string | null;
71
71
  createdAt: string;
72
72
  updatedAt: string;
73
+ expiresAt: string | null;
73
74
  agentId: string;
74
75
  projectId: string;
75
76
  tenantId: string;
76
- expiresAt: string | null;
77
77
  publicId: string;
78
78
  keyHash: string;
79
79
  keyPrefix: string;
@@ -6,15 +6,15 @@ import { AppInsert, AppSelect, AppUpdate } from "../../types/entities.js";
6
6
  //#region src/data-access/runtime/apps.d.ts
7
7
  declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promise<{
8
8
  type: AppType;
9
- name: string;
10
9
  id: string;
10
+ name: string;
11
11
  createdAt: string;
12
12
  updatedAt: string;
13
- projectId: string | null;
14
- tenantId: string | null;
15
13
  description: string | null;
16
14
  enabled: boolean;
17
15
  prompt: string | null;
16
+ projectId: string | null;
17
+ tenantId: string | null;
18
18
  config: {
19
19
  type: "web_client";
20
20
  webClient: {
@@ -22,7 +22,7 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
22
22
  publicKeys: {
23
23
  kid: string;
24
24
  publicKey: string;
25
- algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
25
+ algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
26
26
  addedAt: string;
27
27
  }[];
28
28
  allowAnonymous: boolean;
@@ -67,15 +67,15 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
67
67
  }>;
68
68
  declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
69
69
  type: AppType;
70
- name: string;
71
70
  id: string;
71
+ name: string;
72
72
  createdAt: string;
73
73
  updatedAt: string;
74
- projectId: string | null;
75
- tenantId: string | null;
76
74
  description: string | null;
77
75
  enabled: boolean;
78
76
  prompt: string | null;
77
+ projectId: string | null;
78
+ tenantId: string | null;
79
79
  config: {
80
80
  type: "web_client";
81
81
  webClient: {
@@ -83,7 +83,7 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
83
83
  publicKeys: {
84
84
  kid: string;
85
85
  publicKey: string;
86
- algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
86
+ algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
87
87
  addedAt: string;
88
88
  }[];
89
89
  allowAnonymous: boolean;
@@ -158,7 +158,7 @@ declare const updateApp: (db: AgentsRunDatabaseClient) => (params: {
158
158
  publicKeys: {
159
159
  kid: string;
160
160
  publicKey: string;
161
- algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
161
+ algorithm: "EdDSA" | "ES256" | "ES512" | "RS256" | "RS384" | "RS512" | "ES384";
162
162
  addedAt: string;
163
163
  }[];
164
164
  allowAnonymous: boolean;
@@ -18,17 +18,17 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
18
18
  id: string;
19
19
  createdAt: string;
20
20
  updatedAt: string;
21
- agentId: string | null;
22
- projectId: string;
23
- tenantId: string;
24
- title: string | null;
25
- metadata: ConversationMetadata | null;
26
21
  ref: {
27
22
  type: "commit" | "tag" | "branch";
28
23
  name: string;
29
24
  hash: string;
30
25
  } | null;
31
26
  userId: string | null;
27
+ metadata: ConversationMetadata | null;
28
+ agentId: string | null;
29
+ projectId: string;
30
+ tenantId: string;
31
+ title: string | null;
32
32
  activeSubAgentId: string;
33
33
  lastContextResolution: string | null;
34
34
  }>;
@@ -87,17 +87,17 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
87
87
  id: string;
88
88
  createdAt: string;
89
89
  updatedAt: string;
90
- agentId: string | null;
91
- projectId: string;
92
- tenantId: string;
93
- title: string | null;
94
- metadata: ConversationMetadata | null;
95
90
  ref: {
96
91
  type: "commit" | "tag" | "branch";
97
92
  name: string;
98
93
  hash: string;
99
94
  } | null;
100
95
  userId: string | null;
96
+ metadata: ConversationMetadata | null;
97
+ agentId: string | null;
98
+ projectId: string;
99
+ tenantId: string;
100
+ title: string | null;
101
101
  activeSubAgentId: string;
102
102
  lastContextResolution: string | null;
103
103
  } | undefined>;
@@ -123,17 +123,17 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
123
123
  id: string;
124
124
  createdAt: string;
125
125
  updatedAt: string;
126
- agentId: string | null;
127
- projectId: string;
128
- tenantId: string;
129
- title: string | null;
130
- metadata: ConversationMetadata | null;
131
126
  ref: {
132
127
  type: "commit" | "tag" | "branch";
133
128
  name: string;
134
129
  hash: string;
135
130
  } | null;
136
131
  userId: string | null;
132
+ metadata: ConversationMetadata | null;
133
+ agentId: string | null;
134
+ projectId: string;
135
+ tenantId: string;
136
+ title: string | null;
137
137
  activeSubAgentId: string;
138
138
  lastContextResolution: string | null;
139
139
  }>;
@@ -155,17 +155,17 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
155
155
  id: string;
156
156
  createdAt: string;
157
157
  updatedAt: string;
158
- agentId: string | null;
159
- projectId: string;
160
- tenantId: string;
161
- title: string | null;
162
- metadata: ConversationMetadata | null;
163
158
  ref: {
164
159
  type: "commit" | "tag" | "branch";
165
160
  name: string;
166
161
  hash: string;
167
162
  } | null;
168
163
  userId: string | null;
164
+ metadata: ConversationMetadata | null;
165
+ agentId: string | null;
166
+ projectId: string;
167
+ tenantId: string;
168
+ title: string | null;
169
169
  activeSubAgentId: string;
170
170
  lastContextResolution: string | null;
171
171
  } | undefined>;
@@ -0,0 +1,16 @@
1
+ import { ProjectRole } from "../../auth/authz/types.js";
2
+ import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
3
+
4
+ //#region src/data-access/runtime/invitationProjectAssignments.d.ts
5
+ interface InvitationProjectAssignmentInput {
6
+ projectId: string;
7
+ projectRole: ProjectRole;
8
+ }
9
+ declare const createInvitationProjectAssignments: (db: AgentsRunDatabaseClient) => (invitationId: string, assignments: InvitationProjectAssignmentInput[]) => Promise<void>;
10
+ declare const getProjectAssignmentsForInvitation: (db: AgentsRunDatabaseClient) => (invitationId: string) => Promise<Array<{
11
+ projectId: string;
12
+ projectRole: ProjectRole;
13
+ }>>;
14
+ declare const deleteInvitationProjectAssignments: (db: AgentsRunDatabaseClient) => (invitationId: string) => Promise<void>;
15
+ //#endregion
16
+ export { InvitationProjectAssignmentInput, createInvitationProjectAssignments, deleteInvitationProjectAssignments, getProjectAssignmentsForInvitation };
@@ -0,0 +1,25 @@
1
+ import { invitationProjectAssignment } from "../../db/runtime/runtime-schema.js";
2
+ import { eq } from "drizzle-orm";
3
+
4
+ //#region src/data-access/runtime/invitationProjectAssignments.ts
5
+ const createInvitationProjectAssignments = (db) => async (invitationId, assignments) => {
6
+ if (assignments.length === 0) return;
7
+ await db.insert(invitationProjectAssignment).values(assignments.map((a) => ({
8
+ id: crypto.randomUUID(),
9
+ invitationId,
10
+ projectId: a.projectId,
11
+ projectRole: a.projectRole
12
+ })));
13
+ };
14
+ const getProjectAssignmentsForInvitation = (db) => async (invitationId) => {
15
+ return await db.select({
16
+ projectId: invitationProjectAssignment.projectId,
17
+ projectRole: invitationProjectAssignment.projectRole
18
+ }).from(invitationProjectAssignment).where(eq(invitationProjectAssignment.invitationId, invitationId));
19
+ };
20
+ const deleteInvitationProjectAssignments = (db) => async (invitationId) => {
21
+ await db.delete(invitationProjectAssignment).where(eq(invitationProjectAssignment.invitationId, invitationId));
22
+ };
23
+
24
+ //#endregion
25
+ export { createInvitationProjectAssignments, deleteInvitationProjectAssignments, getProjectAssignmentsForInvitation };
@@ -13,9 +13,10 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
13
13
  id: string;
14
14
  createdAt: string;
15
15
  updatedAt: string;
16
+ metadata: MessageMetadata | null;
17
+ role: string;
16
18
  projectId: string;
17
19
  tenantId: string;
18
- metadata: MessageMetadata | null;
19
20
  content: MessageContent;
20
21
  fromSubAgentId: string | null;
21
22
  toSubAgentId: string | null;
@@ -23,7 +24,6 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
23
24
  toExternalAgentId: string | null;
24
25
  taskId: string | null;
25
26
  a2aTaskId: string | null;
26
- role: string;
27
27
  conversationId: string;
28
28
  fromTeamAgentId: string | null;
29
29
  toTeamAgentId: string | null;
@@ -147,9 +147,10 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
147
147
  id: string;
148
148
  createdAt: string;
149
149
  updatedAt: string;
150
+ metadata: MessageMetadata | null;
151
+ role: string;
150
152
  projectId: string;
151
153
  tenantId: string;
152
- metadata: MessageMetadata | null;
153
154
  content: MessageContent;
154
155
  fromSubAgentId: string | null;
155
156
  toSubAgentId: string | null;
@@ -157,7 +158,6 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
157
158
  toExternalAgentId: string | null;
158
159
  taskId: string | null;
159
160
  a2aTaskId: string | null;
160
- role: string;
161
161
  conversationId: string;
162
162
  fromTeamAgentId: string | null;
163
163
  toTeamAgentId: string | null;
@@ -200,9 +200,10 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
200
200
  id: string;
201
201
  createdAt: string;
202
202
  updatedAt: string;
203
+ metadata: MessageMetadata | null;
204
+ role: string;
203
205
  projectId: string;
204
206
  tenantId: string;
205
- metadata: MessageMetadata | null;
206
207
  content: MessageContent;
207
208
  fromSubAgentId: string | null;
208
209
  toSubAgentId: string | null;
@@ -210,7 +211,6 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
210
211
  toExternalAgentId: string | null;
211
212
  taskId: string | null;
212
213
  a2aTaskId: string | null;
213
- role: string;
214
214
  conversationId: string;
215
215
  fromTeamAgentId: string | null;
216
216
  toTeamAgentId: string | null;
@@ -16,8 +16,8 @@ declare const createScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (para
16
16
  userId: string;
17
17
  }) => Promise<{
18
18
  createdAt: string;
19
- tenantId: string;
20
19
  userId: string;
20
+ tenantId: string;
21
21
  scheduledTriggerId: string;
22
22
  }>;
23
23
  declare const deleteScheduledTriggerUser: (db: AgentsRunDatabaseClient) => (params: {
@@ -10,17 +10,17 @@ declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert)
10
10
  id: string;
11
11
  createdAt: string;
12
12
  updatedAt: string;
13
- agentId: string;
14
- projectId: string;
15
- tenantId: string;
16
- metadata: TaskMetadataConfig | null;
17
- status: string;
18
- subAgentId: string;
19
13
  ref: {
20
14
  type: "commit" | "tag" | "branch";
21
15
  name: string;
22
16
  hash: string;
23
17
  } | null;
18
+ metadata: TaskMetadataConfig | null;
19
+ status: string;
20
+ agentId: string;
21
+ projectId: string;
22
+ tenantId: string;
23
+ subAgentId: string;
24
24
  contextId: string;
25
25
  }>;
26
26
  declare const getTask: (db: AgentsRunDatabaseClient) => (params: {