@inkeep/agents-core 0.68.0 → 0.68.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/auth-schema.d.ts +163 -163
- package/dist/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/auth.js +14 -0
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +2 -2
- package/dist/client-exports.js +2 -2
- package/dist/data-access/index.d.ts +2 -1
- package/dist/data-access/index.js +2 -1
- package/dist/data-access/manage/agents.d.ts +36 -36
- package/dist/data-access/manage/artifactComponents.d.ts +6 -6
- package/dist/data-access/manage/contextConfigs.d.ts +4 -4
- package/dist/data-access/manage/dataComponents.d.ts +2 -2
- package/dist/data-access/manage/functionTools.d.ts +6 -6
- package/dist/data-access/manage/skills.d.ts +10 -10
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgents.d.ts +12 -12
- package/dist/data-access/manage/tools.d.ts +21 -21
- package/dist/data-access/manage/triggers.d.ts +4 -4
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/apps.d.ts +32 -17
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/feedback.d.ts +6 -6
- package/dist/data-access/runtime/invitationProjectAssignments.d.ts +16 -0
- package/dist/data-access/runtime/invitationProjectAssignments.js +25 -0
- package/dist/data-access/runtime/messages.d.ts +21 -21
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +4 -4
- package/dist/data-access/runtime/scheduledTriggerUsers.d.ts +1 -1
- package/dist/data-access/runtime/tasks.d.ts +6 -6
- package/dist/db/manage/manage-schema.d.ts +362 -362
- package/dist/db/runtime/runtime-schema.d.ts +485 -383
- package/dist/db/runtime/runtime-schema.js +13 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -3
- package/dist/types/index.d.ts +2 -2
- package/dist/types/utility.d.ts +5 -4
- package/dist/utils/error.d.ts +51 -51
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/dist/validation/schemas/skills.d.ts +47 -47
- package/dist/validation/schemas.d.ts +2340 -2242
- package/dist/validation/schemas.js +20 -4
- package/drizzle/runtime/0037_mysterious_gargoyle.sql +10 -0
- package/drizzle/runtime/meta/0037_snapshot.json +5990 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -11,13 +11,11 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
11
11
|
}) => Promise<{
|
|
12
12
|
id: string;
|
|
13
13
|
name: string;
|
|
14
|
+
description: string | null;
|
|
14
15
|
createdAt: string;
|
|
15
16
|
updatedAt: string;
|
|
16
|
-
description: string | null;
|
|
17
|
-
prompt: string | null;
|
|
18
|
-
tenantId: string;
|
|
19
|
-
agentId: string;
|
|
20
17
|
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
21
19
|
models: {
|
|
22
20
|
base?: {
|
|
23
21
|
model?: string | undefined;
|
|
@@ -41,6 +39,8 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
41
39
|
stopWhen: {
|
|
42
40
|
stepCountIs?: number | undefined;
|
|
43
41
|
} | null;
|
|
42
|
+
agentId: string;
|
|
43
|
+
prompt: string | null;
|
|
44
44
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
45
45
|
} | undefined>;
|
|
46
46
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -48,13 +48,11 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
48
48
|
}) => Promise<{
|
|
49
49
|
id: string;
|
|
50
50
|
name: string;
|
|
51
|
+
description: string | null;
|
|
51
52
|
createdAt: string;
|
|
52
53
|
updatedAt: string;
|
|
53
|
-
description: string | null;
|
|
54
|
-
prompt: string | null;
|
|
55
|
-
tenantId: string;
|
|
56
|
-
agentId: string;
|
|
57
54
|
projectId: string;
|
|
55
|
+
tenantId: string;
|
|
58
56
|
models: {
|
|
59
57
|
base?: {
|
|
60
58
|
model?: string | undefined;
|
|
@@ -78,6 +76,8 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
78
76
|
stopWhen: {
|
|
79
77
|
stepCountIs?: number | undefined;
|
|
80
78
|
} | null;
|
|
79
|
+
agentId: string;
|
|
80
|
+
prompt: string | null;
|
|
81
81
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
82
82
|
}[]>;
|
|
83
83
|
declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -129,13 +129,11 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
|
|
|
129
129
|
declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
|
|
130
130
|
id: string;
|
|
131
131
|
name: string;
|
|
132
|
+
description: string | null;
|
|
132
133
|
createdAt: string;
|
|
133
134
|
updatedAt: string;
|
|
134
|
-
description: string | null;
|
|
135
|
-
prompt: string | null;
|
|
136
|
-
tenantId: string;
|
|
137
|
-
agentId: string;
|
|
138
135
|
projectId: string;
|
|
136
|
+
tenantId: string;
|
|
139
137
|
models: {
|
|
140
138
|
base?: {
|
|
141
139
|
model?: string | undefined;
|
|
@@ -159,6 +157,8 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
159
157
|
stopWhen: {
|
|
160
158
|
stepCountIs?: number | undefined;
|
|
161
159
|
} | null;
|
|
160
|
+
agentId: string;
|
|
161
|
+
prompt: string | null;
|
|
162
162
|
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
163
163
|
}>;
|
|
164
164
|
declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -22,18 +22,18 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
22
22
|
}) => Promise<{
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
|
+
description: string | null;
|
|
25
26
|
createdAt: string;
|
|
26
27
|
updatedAt: string;
|
|
27
|
-
description: string | null;
|
|
28
|
-
headers: Record<string, string> | null;
|
|
29
|
-
tenantId: string;
|
|
30
28
|
projectId: string;
|
|
29
|
+
tenantId: string;
|
|
30
|
+
credentialReferenceId: string | null;
|
|
31
31
|
config: {
|
|
32
32
|
type: "mcp";
|
|
33
33
|
mcp: ToolMcpConfig;
|
|
34
34
|
};
|
|
35
|
-
credentialReferenceId: string | null;
|
|
36
35
|
credentialScope: string;
|
|
36
|
+
headers: Record<string, string> | null;
|
|
37
37
|
imageUrl: string | null;
|
|
38
38
|
capabilities: ToolServerCapabilities | null;
|
|
39
39
|
lastError: string | null;
|
|
@@ -80,18 +80,18 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
80
80
|
declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
|
|
81
81
|
id: string;
|
|
82
82
|
name: string;
|
|
83
|
+
description: string | null;
|
|
83
84
|
createdAt: string;
|
|
84
85
|
updatedAt: string;
|
|
85
|
-
description: string | null;
|
|
86
|
-
headers: Record<string, string> | null;
|
|
87
|
-
tenantId: string;
|
|
88
86
|
projectId: string;
|
|
87
|
+
tenantId: string;
|
|
88
|
+
credentialReferenceId: string | null;
|
|
89
89
|
config: {
|
|
90
90
|
type: "mcp";
|
|
91
91
|
mcp: ToolMcpConfig;
|
|
92
92
|
};
|
|
93
|
-
credentialReferenceId: string | null;
|
|
94
93
|
credentialScope: string;
|
|
94
|
+
headers: Record<string, string> | null;
|
|
95
95
|
imageUrl: string | null;
|
|
96
96
|
capabilities: ToolServerCapabilities | null;
|
|
97
97
|
lastError: string | null;
|
|
@@ -138,16 +138,16 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
138
138
|
id: string;
|
|
139
139
|
createdAt: string;
|
|
140
140
|
updatedAt: string;
|
|
141
|
-
|
|
141
|
+
projectId: string;
|
|
142
142
|
tenantId: string;
|
|
143
143
|
agentId: string;
|
|
144
|
-
projectId: string;
|
|
145
144
|
subAgentId: string;
|
|
146
145
|
toolId: string;
|
|
146
|
+
headers: Record<string, string> | null;
|
|
147
|
+
selectedTools: string[] | null;
|
|
147
148
|
toolPolicies: Record<string, {
|
|
148
149
|
needsApproval?: boolean;
|
|
149
150
|
}> | null;
|
|
150
|
-
selectedTools: string[] | null;
|
|
151
151
|
}>;
|
|
152
152
|
declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
153
153
|
scopes: AgentScopeConfig;
|
|
@@ -157,16 +157,16 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
157
157
|
id: string;
|
|
158
158
|
createdAt: string;
|
|
159
159
|
updatedAt: string;
|
|
160
|
-
|
|
160
|
+
projectId: string;
|
|
161
161
|
tenantId: string;
|
|
162
162
|
agentId: string;
|
|
163
|
-
projectId: string;
|
|
164
163
|
subAgentId: string;
|
|
165
164
|
toolId: string;
|
|
165
|
+
headers: Record<string, string> | null;
|
|
166
|
+
selectedTools: string[] | null;
|
|
166
167
|
toolPolicies: Record<string, {
|
|
167
168
|
needsApproval?: boolean;
|
|
168
169
|
}> | null;
|
|
169
|
-
selectedTools: string[] | null;
|
|
170
170
|
}>;
|
|
171
171
|
/**
|
|
172
172
|
* Upsert agent-tool relation (create if it doesn't exist, update if it does)
|
|
@@ -185,16 +185,16 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
185
185
|
id: string;
|
|
186
186
|
createdAt: string;
|
|
187
187
|
updatedAt: string;
|
|
188
|
-
|
|
188
|
+
projectId: string;
|
|
189
189
|
tenantId: string;
|
|
190
190
|
agentId: string;
|
|
191
|
-
projectId: string;
|
|
192
191
|
subAgentId: string;
|
|
193
192
|
toolId: string;
|
|
193
|
+
headers: Record<string, string> | null;
|
|
194
|
+
selectedTools: string[] | null;
|
|
194
195
|
toolPolicies: Record<string, {
|
|
195
196
|
needsApproval?: boolean;
|
|
196
197
|
}> | null;
|
|
197
|
-
selectedTools: string[] | null;
|
|
198
198
|
}>;
|
|
199
199
|
/**
|
|
200
200
|
* Upsert a tool (create if it doesn't exist, update if it does)
|
|
@@ -204,18 +204,18 @@ declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
204
204
|
}) => Promise<{
|
|
205
205
|
id: string;
|
|
206
206
|
name: string;
|
|
207
|
+
description: string | null;
|
|
207
208
|
createdAt: string;
|
|
208
209
|
updatedAt: string;
|
|
209
|
-
description: string | null;
|
|
210
|
-
headers: Record<string, string> | null;
|
|
211
|
-
tenantId: string;
|
|
212
210
|
projectId: string;
|
|
211
|
+
tenantId: string;
|
|
212
|
+
credentialReferenceId: string | null;
|
|
213
213
|
config: {
|
|
214
214
|
type: "mcp";
|
|
215
215
|
mcp: ToolMcpConfig;
|
|
216
216
|
};
|
|
217
|
-
credentialReferenceId: string | null;
|
|
218
217
|
credentialScope: string;
|
|
218
|
+
headers: Record<string, string> | null;
|
|
219
219
|
imageUrl: string | null;
|
|
220
220
|
capabilities: ToolServerCapabilities | null;
|
|
221
221
|
lastError: string | 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" | "
|
|
43
|
+
source: "query" | "header" | "body";
|
|
44
44
|
key: string;
|
|
45
45
|
prefix?: string | undefined;
|
|
46
46
|
regex?: string | undefined;
|
|
47
47
|
};
|
|
48
48
|
signedComponents: {
|
|
49
|
-
source: "literal" | "
|
|
49
|
+
source: "literal" | "header" | "body";
|
|
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
|
-
|
|
135
|
+
projectId: string;
|
|
136
136
|
tenantId: string;
|
|
137
137
|
agentId: string;
|
|
138
|
-
|
|
138
|
+
userId: string;
|
|
139
139
|
triggerId: string;
|
|
140
140
|
}>;
|
|
141
141
|
declare const deleteTriggerUser: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -12,28 +12,28 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
12
12
|
name: string | null;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
-
|
|
15
|
+
projectId: string;
|
|
16
16
|
tenantId: string;
|
|
17
17
|
agentId: string;
|
|
18
|
-
projectId: string;
|
|
19
|
-
lastUsedAt: string | null;
|
|
20
18
|
publicId: string;
|
|
21
19
|
keyHash: string;
|
|
22
20
|
keyPrefix: string;
|
|
21
|
+
lastUsedAt: string | null;
|
|
22
|
+
expiresAt: string | null;
|
|
23
23
|
} | undefined>;
|
|
24
24
|
declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
|
|
25
25
|
id: string;
|
|
26
26
|
name: string | null;
|
|
27
27
|
createdAt: string;
|
|
28
28
|
updatedAt: string;
|
|
29
|
-
|
|
29
|
+
projectId: string;
|
|
30
30
|
tenantId: string;
|
|
31
31
|
agentId: string;
|
|
32
|
-
projectId: string;
|
|
33
|
-
lastUsedAt: string | null;
|
|
34
32
|
publicId: string;
|
|
35
33
|
keyHash: string;
|
|
36
34
|
keyPrefix: string;
|
|
35
|
+
lastUsedAt: string | null;
|
|
36
|
+
expiresAt: string | null;
|
|
37
37
|
} | undefined>;
|
|
38
38
|
declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
39
39
|
scopes: ProjectScopeConfig;
|
|
@@ -43,14 +43,14 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
43
43
|
name: string | null;
|
|
44
44
|
createdAt: string;
|
|
45
45
|
updatedAt: string;
|
|
46
|
-
|
|
46
|
+
projectId: string;
|
|
47
47
|
tenantId: string;
|
|
48
48
|
agentId: string;
|
|
49
|
-
projectId: string;
|
|
50
|
-
lastUsedAt: string | null;
|
|
51
49
|
publicId: string;
|
|
52
50
|
keyHash: string;
|
|
53
51
|
keyPrefix: string;
|
|
52
|
+
lastUsedAt: string | null;
|
|
53
|
+
expiresAt: string | null;
|
|
54
54
|
}[]>;
|
|
55
55
|
declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
56
56
|
scopes: ProjectScopeConfig;
|
|
@@ -70,14 +70,14 @@ declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInse
|
|
|
70
70
|
name: string | null;
|
|
71
71
|
createdAt: string;
|
|
72
72
|
updatedAt: string;
|
|
73
|
-
|
|
73
|
+
projectId: string;
|
|
74
74
|
tenantId: string;
|
|
75
75
|
agentId: string;
|
|
76
|
-
projectId: string;
|
|
77
|
-
lastUsedAt: string | null;
|
|
78
76
|
publicId: string;
|
|
79
77
|
keyHash: string;
|
|
80
78
|
keyPrefix: string;
|
|
79
|
+
lastUsedAt: string | null;
|
|
80
|
+
expiresAt: string | null;
|
|
81
81
|
}>;
|
|
82
82
|
declare const updateApiKey: (db: AgentsRunDatabaseClient) => (params: {
|
|
83
83
|
scopes: ProjectScopeConfig;
|
|
@@ -5,16 +5,16 @@ import { AppInsert, AppSelect, AppUpdate } from "../../types/entities.js";
|
|
|
5
5
|
|
|
6
6
|
//#region src/data-access/runtime/apps.d.ts
|
|
7
7
|
declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promise<{
|
|
8
|
-
type: AppType;
|
|
9
|
-
enabled: boolean;
|
|
10
8
|
id: string;
|
|
11
9
|
name: string;
|
|
10
|
+
description: string | null;
|
|
12
11
|
createdAt: string;
|
|
13
12
|
updatedAt: string;
|
|
14
|
-
description: string | null;
|
|
15
|
-
prompt: string | null;
|
|
16
|
-
tenantId: string | null;
|
|
17
13
|
projectId: string | null;
|
|
14
|
+
tenantId: string | null;
|
|
15
|
+
type: AppType;
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
prompt: 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: "
|
|
25
|
+
algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
|
|
26
26
|
addedAt: string;
|
|
27
27
|
}[];
|
|
28
28
|
allowAnonymous: boolean;
|
|
@@ -31,10 +31,15 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
|
|
|
31
31
|
} | {
|
|
32
32
|
type: "api";
|
|
33
33
|
api: Record<string, never>;
|
|
34
|
+
} | {
|
|
35
|
+
type: "support_copilot";
|
|
36
|
+
supportCopilot: {
|
|
37
|
+
credentialReferenceIds: string[];
|
|
38
|
+
};
|
|
34
39
|
};
|
|
35
|
-
defaultAgentId: string | null;
|
|
36
|
-
defaultProjectId: string | null;
|
|
37
40
|
lastUsedAt: string | null;
|
|
41
|
+
defaultProjectId: string | null;
|
|
42
|
+
defaultAgentId: string | null;
|
|
38
43
|
} | undefined>;
|
|
39
44
|
declare const updateAppLastUsed: (db: AgentsRunDatabaseClient) => (id: string) => Promise<void>;
|
|
40
45
|
declare const getAppByIdForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -61,16 +66,16 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
61
66
|
};
|
|
62
67
|
}>;
|
|
63
68
|
declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
|
|
64
|
-
type: AppType;
|
|
65
|
-
enabled: boolean;
|
|
66
69
|
id: string;
|
|
67
70
|
name: string;
|
|
71
|
+
description: string | null;
|
|
68
72
|
createdAt: string;
|
|
69
73
|
updatedAt: string;
|
|
70
|
-
description: string | null;
|
|
71
|
-
prompt: string | null;
|
|
72
|
-
tenantId: string | null;
|
|
73
74
|
projectId: string | null;
|
|
75
|
+
tenantId: string | null;
|
|
76
|
+
type: AppType;
|
|
77
|
+
enabled: boolean;
|
|
78
|
+
prompt: string | null;
|
|
74
79
|
config: {
|
|
75
80
|
type: "web_client";
|
|
76
81
|
webClient: {
|
|
@@ -78,7 +83,7 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
|
|
|
78
83
|
publicKeys: {
|
|
79
84
|
kid: string;
|
|
80
85
|
publicKey: string;
|
|
81
|
-
algorithm: "
|
|
86
|
+
algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
|
|
82
87
|
addedAt: string;
|
|
83
88
|
}[];
|
|
84
89
|
allowAnonymous: boolean;
|
|
@@ -87,10 +92,15 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
|
|
|
87
92
|
} | {
|
|
88
93
|
type: "api";
|
|
89
94
|
api: Record<string, never>;
|
|
95
|
+
} | {
|
|
96
|
+
type: "support_copilot";
|
|
97
|
+
supportCopilot: {
|
|
98
|
+
credentialReferenceIds: string[];
|
|
99
|
+
};
|
|
90
100
|
};
|
|
91
|
-
defaultAgentId: string | null;
|
|
92
|
-
defaultProjectId: string | null;
|
|
93
101
|
lastUsedAt: string | null;
|
|
102
|
+
defaultProjectId: string | null;
|
|
103
|
+
defaultAgentId: string | null;
|
|
94
104
|
}>;
|
|
95
105
|
declare const updateAppForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
96
106
|
scopes: TenantScopeConfig;
|
|
@@ -148,7 +158,7 @@ declare const updateApp: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
148
158
|
publicKeys: {
|
|
149
159
|
kid: string;
|
|
150
160
|
publicKey: string;
|
|
151
|
-
algorithm: "
|
|
161
|
+
algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
|
|
152
162
|
addedAt: string;
|
|
153
163
|
}[];
|
|
154
164
|
allowAnonymous: boolean;
|
|
@@ -157,6 +167,11 @@ declare const updateApp: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
157
167
|
} | {
|
|
158
168
|
type: "api";
|
|
159
169
|
api: Record<string, never>;
|
|
170
|
+
} | {
|
|
171
|
+
type: "support_copilot";
|
|
172
|
+
supportCopilot: {
|
|
173
|
+
credentialReferenceIds: string[];
|
|
174
|
+
};
|
|
160
175
|
};
|
|
161
176
|
lastUsedAt: string | null;
|
|
162
177
|
}>;
|
|
@@ -16,19 +16,19 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
16
16
|
}>;
|
|
17
17
|
declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
18
18
|
id: string;
|
|
19
|
+
metadata: ConversationMetadata | null;
|
|
19
20
|
createdAt: string;
|
|
20
21
|
updatedAt: string;
|
|
22
|
+
projectId: string;
|
|
23
|
+
tenantId: string;
|
|
24
|
+
title: string | null;
|
|
25
|
+
agentId: string | null;
|
|
26
|
+
userId: string | null;
|
|
21
27
|
ref: {
|
|
22
28
|
type: "commit" | "tag" | "branch";
|
|
23
29
|
name: string;
|
|
24
30
|
hash: string;
|
|
25
31
|
} | null;
|
|
26
|
-
userId: string | null;
|
|
27
|
-
metadata: ConversationMetadata | null;
|
|
28
|
-
tenantId: string;
|
|
29
|
-
title: string | null;
|
|
30
|
-
agentId: string | null;
|
|
31
|
-
projectId: string;
|
|
32
32
|
activeSubAgentId: string;
|
|
33
33
|
lastContextResolution: string | null;
|
|
34
34
|
}>;
|
|
@@ -85,19 +85,19 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
85
85
|
conversationId: string;
|
|
86
86
|
}) => Promise<{
|
|
87
87
|
id: string;
|
|
88
|
+
metadata: ConversationMetadata | null;
|
|
88
89
|
createdAt: string;
|
|
89
90
|
updatedAt: string;
|
|
91
|
+
projectId: string;
|
|
92
|
+
tenantId: string;
|
|
93
|
+
title: string | null;
|
|
94
|
+
agentId: string | null;
|
|
95
|
+
userId: string | null;
|
|
90
96
|
ref: {
|
|
91
97
|
type: "commit" | "tag" | "branch";
|
|
92
98
|
name: string;
|
|
93
99
|
hash: string;
|
|
94
100
|
} | null;
|
|
95
|
-
userId: string | null;
|
|
96
|
-
metadata: ConversationMetadata | null;
|
|
97
|
-
tenantId: string;
|
|
98
|
-
title: string | null;
|
|
99
|
-
agentId: string | null;
|
|
100
|
-
projectId: string;
|
|
101
101
|
activeSubAgentId: string;
|
|
102
102
|
lastContextResolution: string | null;
|
|
103
103
|
} | undefined>;
|
|
@@ -121,19 +121,19 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
121
121
|
contextConfigId?: string | undefined;
|
|
122
122
|
} | {
|
|
123
123
|
id: string;
|
|
124
|
+
metadata: ConversationMetadata | null;
|
|
124
125
|
createdAt: string;
|
|
125
126
|
updatedAt: string;
|
|
127
|
+
projectId: string;
|
|
128
|
+
tenantId: string;
|
|
129
|
+
title: string | null;
|
|
130
|
+
agentId: string | null;
|
|
131
|
+
userId: string | null;
|
|
126
132
|
ref: {
|
|
127
133
|
type: "commit" | "tag" | "branch";
|
|
128
134
|
name: string;
|
|
129
135
|
hash: string;
|
|
130
136
|
} | null;
|
|
131
|
-
userId: string | null;
|
|
132
|
-
metadata: ConversationMetadata | null;
|
|
133
|
-
tenantId: string;
|
|
134
|
-
title: string | null;
|
|
135
|
-
agentId: string | null;
|
|
136
|
-
projectId: string;
|
|
137
137
|
activeSubAgentId: string;
|
|
138
138
|
lastContextResolution: string | null;
|
|
139
139
|
}>;
|
|
@@ -153,19 +153,19 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
153
153
|
conversationId: string;
|
|
154
154
|
}) => Promise<{
|
|
155
155
|
id: string;
|
|
156
|
+
metadata: ConversationMetadata | null;
|
|
156
157
|
createdAt: string;
|
|
157
158
|
updatedAt: string;
|
|
159
|
+
projectId: string;
|
|
160
|
+
tenantId: string;
|
|
161
|
+
title: string | null;
|
|
162
|
+
agentId: string | null;
|
|
163
|
+
userId: string | null;
|
|
158
164
|
ref: {
|
|
159
165
|
type: "commit" | "tag" | "branch";
|
|
160
166
|
name: string;
|
|
161
167
|
hash: string;
|
|
162
168
|
} | null;
|
|
163
|
-
userId: string | null;
|
|
164
|
-
metadata: ConversationMetadata | null;
|
|
165
|
-
tenantId: string;
|
|
166
|
-
title: string | null;
|
|
167
|
-
agentId: string | null;
|
|
168
|
-
projectId: string;
|
|
169
169
|
activeSubAgentId: string;
|
|
170
170
|
lastContextResolution: string | null;
|
|
171
171
|
} | undefined>;
|
|
@@ -58,15 +58,15 @@ declare const listFeedback: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
58
58
|
total: number;
|
|
59
59
|
}>;
|
|
60
60
|
declare const createFeedback: (db: AgentsRunDatabaseClient) => (params: FeedbackInsert) => Promise<{
|
|
61
|
-
type: "positive" | "negative";
|
|
62
61
|
id: string;
|
|
63
62
|
createdAt: string;
|
|
64
63
|
updatedAt: string;
|
|
65
|
-
tenantId: string;
|
|
66
64
|
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
66
|
+
type: "positive" | "negative";
|
|
67
|
+
details: string | null;
|
|
67
68
|
conversationId: string;
|
|
68
69
|
messageId: string | null;
|
|
69
|
-
details: string | null;
|
|
70
70
|
}>;
|
|
71
71
|
declare const updateFeedback: (db: AgentsRunDatabaseClient) => (params: {
|
|
72
72
|
scopes: ProjectScopeConfig;
|
|
@@ -87,15 +87,15 @@ declare const deleteFeedback: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
87
87
|
scopes: ProjectScopeConfig;
|
|
88
88
|
feedbackId: string;
|
|
89
89
|
}) => Promise<{
|
|
90
|
-
type: "positive" | "negative";
|
|
91
90
|
id: string;
|
|
92
91
|
createdAt: string;
|
|
93
92
|
updatedAt: string;
|
|
94
|
-
tenantId: string;
|
|
95
93
|
projectId: string;
|
|
94
|
+
tenantId: string;
|
|
95
|
+
type: "positive" | "negative";
|
|
96
|
+
details: string | null;
|
|
96
97
|
conversationId: string;
|
|
97
98
|
messageId: string | null;
|
|
98
|
-
details: string | null;
|
|
99
99
|
}>;
|
|
100
100
|
//#endregion
|
|
101
101
|
export { createFeedback, deleteFeedback, getFeedbackById, listFeedback, listFeedbackByConversation, updateFeedback };
|
|
@@ -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 };
|