@inkeep/agents-core 0.0.0-dev-20260317210858 → 0.0.0-dev-20260317231927
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 +85 -85
- package/dist/auth/auth-validation-schemas.d.ts +152 -152
- package/dist/auth/auth.d.ts +28 -28
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/data-access/index.d.ts +2 -2
- package/dist/data-access/index.js +2 -2
- package/dist/data-access/manage/agents.d.ts +38 -38
- package/dist/data-access/manage/artifactComponents.d.ts +8 -8
- package/dist/data-access/manage/contextConfigs.d.ts +8 -8
- package/dist/data-access/manage/dataComponents.d.ts +2 -2
- package/dist/data-access/manage/functionTools.d.ts +14 -14
- package/dist/data-access/manage/skills.d.ts +13 -13
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +18 -18
- package/dist/data-access/manage/tools.d.ts +21 -21
- package/dist/data-access/manage/triggers.d.ts +1 -1
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/apps.d.ts +29 -16
- package/dist/data-access/runtime/apps.js +14 -7
- package/dist/data-access/runtime/conversations.d.ts +31 -31
- package/dist/data-access/runtime/messages.d.ts +18 -18
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +3 -3
- package/dist/data-access/runtime/tasks.d.ts +9 -9
- package/dist/db/manage/manage-schema.d.ts +451 -451
- package/dist/db/runtime/runtime-schema.d.ts +332 -332
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +2249 -2267
- package/dist/validation/schemas.js +3 -3
- package/package.json +1 -1
|
@@ -20,18 +20,18 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
20
20
|
scopes: ProjectScopeConfig;
|
|
21
21
|
toolId: string;
|
|
22
22
|
}) => Promise<{
|
|
23
|
+
id: string;
|
|
23
24
|
name: string;
|
|
24
25
|
description: string | null;
|
|
25
|
-
id: string;
|
|
26
|
-
createdAt: string;
|
|
27
|
-
updatedAt: string;
|
|
28
26
|
tenantId: string;
|
|
29
27
|
projectId: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
headers: Record<string, string> | null;
|
|
30
31
|
config: {
|
|
31
32
|
type: "mcp";
|
|
32
33
|
mcp: ToolMcpConfig;
|
|
33
34
|
};
|
|
34
|
-
headers: Record<string, string> | null;
|
|
35
35
|
credentialReferenceId: string | null;
|
|
36
36
|
credentialScope: string;
|
|
37
37
|
imageUrl: string | null;
|
|
@@ -78,18 +78,18 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
78
78
|
};
|
|
79
79
|
}>;
|
|
80
80
|
declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
|
|
81
|
+
id: string;
|
|
81
82
|
name: string;
|
|
82
83
|
description: string | null;
|
|
83
|
-
id: string;
|
|
84
|
-
createdAt: string;
|
|
85
|
-
updatedAt: string;
|
|
86
84
|
tenantId: string;
|
|
87
85
|
projectId: string;
|
|
86
|
+
createdAt: string;
|
|
87
|
+
updatedAt: string;
|
|
88
|
+
headers: Record<string, string> | null;
|
|
88
89
|
config: {
|
|
89
90
|
type: "mcp";
|
|
90
91
|
mcp: ToolMcpConfig;
|
|
91
92
|
};
|
|
92
|
-
headers: Record<string, string> | null;
|
|
93
93
|
credentialReferenceId: string | null;
|
|
94
94
|
credentialScope: string;
|
|
95
95
|
imageUrl: string | null;
|
|
@@ -136,17 +136,17 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
136
136
|
}> | null;
|
|
137
137
|
}) => Promise<{
|
|
138
138
|
id: string;
|
|
139
|
-
createdAt: string;
|
|
140
|
-
updatedAt: string;
|
|
141
139
|
tenantId: string;
|
|
142
140
|
projectId: string;
|
|
143
141
|
agentId: string;
|
|
144
|
-
|
|
142
|
+
createdAt: string;
|
|
143
|
+
updatedAt: string;
|
|
145
144
|
toolId: string;
|
|
146
145
|
headers: Record<string, string> | null;
|
|
147
146
|
toolPolicies: Record<string, {
|
|
148
147
|
needsApproval?: boolean;
|
|
149
148
|
}> | null;
|
|
149
|
+
subAgentId: string;
|
|
150
150
|
selectedTools: string[] | null;
|
|
151
151
|
}>;
|
|
152
152
|
declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -155,17 +155,17 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
155
155
|
toolId: string;
|
|
156
156
|
}) => Promise<{
|
|
157
157
|
id: string;
|
|
158
|
-
createdAt: string;
|
|
159
|
-
updatedAt: string;
|
|
160
158
|
tenantId: string;
|
|
161
159
|
projectId: string;
|
|
162
160
|
agentId: string;
|
|
163
|
-
|
|
161
|
+
createdAt: string;
|
|
162
|
+
updatedAt: string;
|
|
164
163
|
toolId: string;
|
|
165
164
|
headers: Record<string, string> | null;
|
|
166
165
|
toolPolicies: Record<string, {
|
|
167
166
|
needsApproval?: boolean;
|
|
168
167
|
}> | null;
|
|
168
|
+
subAgentId: string;
|
|
169
169
|
selectedTools: string[] | null;
|
|
170
170
|
}>;
|
|
171
171
|
/**
|
|
@@ -183,17 +183,17 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
183
183
|
relationId?: string;
|
|
184
184
|
}) => Promise<{
|
|
185
185
|
id: string;
|
|
186
|
-
createdAt: string;
|
|
187
|
-
updatedAt: string;
|
|
188
186
|
tenantId: string;
|
|
189
187
|
projectId: string;
|
|
190
188
|
agentId: string;
|
|
191
|
-
|
|
189
|
+
createdAt: string;
|
|
190
|
+
updatedAt: string;
|
|
192
191
|
toolId: string;
|
|
193
192
|
headers: Record<string, string> | null;
|
|
194
193
|
toolPolicies: Record<string, {
|
|
195
194
|
needsApproval?: boolean;
|
|
196
195
|
}> | null;
|
|
196
|
+
subAgentId: string;
|
|
197
197
|
selectedTools: string[] | null;
|
|
198
198
|
}>;
|
|
199
199
|
/**
|
|
@@ -202,18 +202,18 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
202
202
|
declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
203
203
|
data: ToolInsert;
|
|
204
204
|
}) => Promise<{
|
|
205
|
+
id: string;
|
|
205
206
|
name: string;
|
|
206
207
|
description: string | null;
|
|
207
|
-
id: string;
|
|
208
|
-
createdAt: string;
|
|
209
|
-
updatedAt: string;
|
|
210
208
|
tenantId: string;
|
|
211
209
|
projectId: string;
|
|
210
|
+
createdAt: string;
|
|
211
|
+
updatedAt: string;
|
|
212
|
+
headers: Record<string, string> | null;
|
|
212
213
|
config: {
|
|
213
214
|
type: "mcp";
|
|
214
215
|
mcp: ToolMcpConfig;
|
|
215
216
|
};
|
|
216
|
-
headers: Record<string, string> | null;
|
|
217
217
|
credentialReferenceId: string | null;
|
|
218
218
|
credentialScope: string;
|
|
219
219
|
imageUrl: string | null;
|
|
@@ -46,7 +46,7 @@ declare const listTriggersPaginated: (db: AgentsManageDatabaseClient) => (params
|
|
|
46
46
|
regex?: string | undefined;
|
|
47
47
|
};
|
|
48
48
|
signedComponents: {
|
|
49
|
-
source: "
|
|
49
|
+
source: "literal" | "header" | "body";
|
|
50
50
|
required: boolean;
|
|
51
51
|
key?: string | undefined;
|
|
52
52
|
value?: string | undefined;
|
|
@@ -8,49 +8,49 @@ 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;
|
|
13
|
-
|
|
14
|
-
updatedAt: string;
|
|
15
|
-
expiresAt: string | null;
|
|
12
|
+
name: string | null;
|
|
16
13
|
tenantId: string;
|
|
17
14
|
projectId: string;
|
|
18
15
|
agentId: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
19
18
|
publicId: string;
|
|
20
19
|
keyHash: string;
|
|
21
20
|
keyPrefix: string;
|
|
22
21
|
lastUsedAt: string | null;
|
|
22
|
+
expiresAt: string | null;
|
|
23
23
|
} | undefined>;
|
|
24
24
|
declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
|
|
25
|
-
name: string | null;
|
|
26
25
|
id: string;
|
|
27
|
-
|
|
28
|
-
updatedAt: string;
|
|
29
|
-
expiresAt: string | null;
|
|
26
|
+
name: string | null;
|
|
30
27
|
tenantId: string;
|
|
31
28
|
projectId: string;
|
|
32
29
|
agentId: string;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
updatedAt: string;
|
|
33
32
|
publicId: string;
|
|
34
33
|
keyHash: string;
|
|
35
34
|
keyPrefix: string;
|
|
36
35
|
lastUsedAt: string | null;
|
|
36
|
+
expiresAt: string | null;
|
|
37
37
|
} | undefined>;
|
|
38
38
|
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;
|
|
44
|
-
|
|
45
|
-
updatedAt: string;
|
|
46
|
-
expiresAt: string | null;
|
|
43
|
+
name: string | null;
|
|
47
44
|
tenantId: string;
|
|
48
45
|
projectId: string;
|
|
49
46
|
agentId: string;
|
|
47
|
+
createdAt: string;
|
|
48
|
+
updatedAt: string;
|
|
50
49
|
publicId: string;
|
|
51
50
|
keyHash: string;
|
|
52
51
|
keyPrefix: string;
|
|
53
52
|
lastUsedAt: string | null;
|
|
53
|
+
expiresAt: string | null;
|
|
54
54
|
}[]>;
|
|
55
55
|
declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
56
56
|
scopes: ProjectScopeConfig;
|
|
@@ -66,18 +66,18 @@ 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;
|
|
71
|
-
|
|
72
|
-
updatedAt: string;
|
|
73
|
-
expiresAt: string | null;
|
|
70
|
+
name: string | null;
|
|
74
71
|
tenantId: string;
|
|
75
72
|
projectId: string;
|
|
76
73
|
agentId: string;
|
|
74
|
+
createdAt: string;
|
|
75
|
+
updatedAt: string;
|
|
77
76
|
publicId: string;
|
|
78
77
|
keyHash: string;
|
|
79
78
|
keyPrefix: string;
|
|
80
79
|
lastUsedAt: string | null;
|
|
80
|
+
expiresAt: string | null;
|
|
81
81
|
}>;
|
|
82
82
|
declare const updateApiKey: (db: AgentsRunDatabaseClient) => (params: {
|
|
83
83
|
scopes: ProjectScopeConfig;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { TenantScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
1
|
+
import { ProjectScopeConfig, TenantScopeConfig } from "../../db/manage/scope-definitions.js";
|
|
2
2
|
import { AppType, PaginationConfig } from "../../types/utility.js";
|
|
3
3
|
import { AgentsRunDatabaseClient } from "../../db/runtime/runtime-client.js";
|
|
4
4
|
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
|
-
|
|
8
|
+
id: string;
|
|
9
9
|
name: string;
|
|
10
10
|
description: string | null;
|
|
11
|
-
id: string;
|
|
12
|
-
createdAt: string;
|
|
13
|
-
updatedAt: string;
|
|
14
11
|
tenantId: string | null;
|
|
15
12
|
projectId: string | null;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
type: AppType;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
19
16
|
enabled: boolean;
|
|
20
17
|
config: {
|
|
21
18
|
type: "web_client";
|
|
@@ -26,12 +23,19 @@ declare const getAppById: (db: AgentsRunDatabaseClient) => (id: string) => Promi
|
|
|
26
23
|
type: "api";
|
|
27
24
|
api: Record<string, never>;
|
|
28
25
|
};
|
|
26
|
+
lastUsedAt: string | null;
|
|
27
|
+
defaultProjectId: string | null;
|
|
28
|
+
defaultAgentId: string | null;
|
|
29
29
|
} | undefined>;
|
|
30
30
|
declare const updateAppLastUsed: (db: AgentsRunDatabaseClient) => (id: string) => Promise<void>;
|
|
31
31
|
declare const getAppByIdForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
32
32
|
scopes: TenantScopeConfig;
|
|
33
33
|
id: string;
|
|
34
34
|
}) => Promise<AppSelect | undefined>;
|
|
35
|
+
declare const getAppByIdForProject: (db: AgentsRunDatabaseClient) => (params: {
|
|
36
|
+
scopes: ProjectScopeConfig;
|
|
37
|
+
id: string;
|
|
38
|
+
}) => Promise<AppSelect | undefined>;
|
|
35
39
|
declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
36
40
|
scopes: TenantScopeConfig & {
|
|
37
41
|
projectId?: string;
|
|
@@ -48,17 +52,14 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
48
52
|
};
|
|
49
53
|
}>;
|
|
50
54
|
declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
|
|
51
|
-
|
|
55
|
+
id: string;
|
|
52
56
|
name: string;
|
|
53
57
|
description: string | null;
|
|
54
|
-
id: string;
|
|
55
|
-
createdAt: string;
|
|
56
|
-
updatedAt: string;
|
|
57
58
|
tenantId: string | null;
|
|
58
59
|
projectId: string | null;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
type: AppType;
|
|
61
|
+
createdAt: string;
|
|
62
|
+
updatedAt: string;
|
|
62
63
|
enabled: boolean;
|
|
63
64
|
config: {
|
|
64
65
|
type: "web_client";
|
|
@@ -69,16 +70,28 @@ declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) =>
|
|
|
69
70
|
type: "api";
|
|
70
71
|
api: Record<string, never>;
|
|
71
72
|
};
|
|
73
|
+
lastUsedAt: string | null;
|
|
74
|
+
defaultProjectId: string | null;
|
|
75
|
+
defaultAgentId: string | null;
|
|
72
76
|
}>;
|
|
73
77
|
declare const updateAppForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
74
78
|
scopes: TenantScopeConfig;
|
|
75
79
|
id: string;
|
|
76
80
|
data: AppUpdate;
|
|
77
81
|
}) => Promise<AppSelect | undefined>;
|
|
82
|
+
declare const updateAppForProject: (db: AgentsRunDatabaseClient) => (params: {
|
|
83
|
+
scopes: ProjectScopeConfig;
|
|
84
|
+
id: string;
|
|
85
|
+
data: AppUpdate;
|
|
86
|
+
}) => Promise<AppSelect | undefined>;
|
|
78
87
|
declare const deleteAppForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
79
88
|
scopes: TenantScopeConfig;
|
|
80
89
|
id: string;
|
|
81
90
|
}) => Promise<boolean>;
|
|
91
|
+
declare const deleteAppForProject: (db: AgentsRunDatabaseClient) => (params: {
|
|
92
|
+
scopes: ProjectScopeConfig;
|
|
93
|
+
id: string;
|
|
94
|
+
}) => Promise<boolean>;
|
|
82
95
|
declare const deleteAppsByProject: (db: AgentsRunDatabaseClient) => (tenantId: string, projectId: string) => Promise<number>;
|
|
83
96
|
declare const clearAppDefaultsByProject: (db: AgentsRunDatabaseClient) => (tenantId: string, projectId: string) => Promise<number>;
|
|
84
97
|
declare const clearAppDefaultsByAgent: (db: AgentsRunDatabaseClient) => (tenantId: string, agentId: string) => Promise<number>;
|
|
@@ -110,4 +123,4 @@ declare const updateApp: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
110
123
|
}>;
|
|
111
124
|
declare const deleteApp: (db: AgentsRunDatabaseClient) => (id: string) => Promise<boolean>;
|
|
112
125
|
//#endregion
|
|
113
|
-
export { clearAppDefaultsByAgent, clearAppDefaultsByProject, createApp, deleteApp, deleteAppForTenant, deleteAppsByProject, getAppById, getAppByIdForTenant, listAppsPaginated, updateApp, updateAppForTenant, updateAppLastUsed };
|
|
126
|
+
export { clearAppDefaultsByAgent, clearAppDefaultsByProject, createApp, deleteApp, deleteAppForProject, deleteAppForTenant, deleteAppsByProject, getAppById, getAppByIdForProject, getAppByIdForTenant, listAppsPaginated, updateApp, updateAppForProject, updateAppForTenant, updateAppLastUsed };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { apps } from "../../db/runtime/runtime-schema.js";
|
|
2
|
-
import { tenantScopedWhere } from "../manage/scope-helpers.js";
|
|
2
|
+
import { projectScopedWhere, tenantScopedWhere } from "../manage/scope-helpers.js";
|
|
3
3
|
import { and, count, desc, eq } from "drizzle-orm";
|
|
4
4
|
|
|
5
5
|
//#region src/data-access/runtime/apps.ts
|
|
@@ -12,6 +12,9 @@ const updateAppLastUsed = (db) => async (id) => {
|
|
|
12
12
|
const getAppByIdForTenant = (db) => async (params) => {
|
|
13
13
|
return db.query.apps.findFirst({ where: and(eq(apps.id, params.id), tenantScopedWhere(apps, params.scopes)) });
|
|
14
14
|
};
|
|
15
|
+
const getAppByIdForProject = (db) => async (params) => {
|
|
16
|
+
return db.query.apps.findFirst({ where: and(eq(apps.id, params.id), projectScopedWhere(apps, params.scopes)) });
|
|
17
|
+
};
|
|
15
18
|
const listAppsPaginated = (db) => async (params) => {
|
|
16
19
|
const page = params.pagination?.page || 1;
|
|
17
20
|
const limit = Math.min(params.pagination?.limit || 10, 100);
|
|
@@ -42,17 +45,21 @@ const createApp = (db) => async (params) => {
|
|
|
42
45
|
}).returning();
|
|
43
46
|
return app;
|
|
44
47
|
};
|
|
45
|
-
const
|
|
48
|
+
const _updateApp = (db, scopeWhere) => async (id, data) => {
|
|
46
49
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
47
50
|
const [updatedApp] = await db.update(apps).set({
|
|
48
|
-
...
|
|
51
|
+
...data,
|
|
49
52
|
updatedAt: now
|
|
50
|
-
}).where(and(eq(apps.id,
|
|
53
|
+
}).where(and(eq(apps.id, id), scopeWhere)).returning();
|
|
51
54
|
return updatedApp;
|
|
52
55
|
};
|
|
53
|
-
const
|
|
54
|
-
return (await db.delete(apps).where(and(eq(apps.id,
|
|
56
|
+
const _deleteApp = (db, scopeWhere) => async (id) => {
|
|
57
|
+
return (await db.delete(apps).where(and(eq(apps.id, id), scopeWhere)).returning()).length > 0;
|
|
55
58
|
};
|
|
59
|
+
const updateAppForTenant = (db) => async (params) => _updateApp(db, tenantScopedWhere(apps, params.scopes))(params.id, params.data);
|
|
60
|
+
const updateAppForProject = (db) => async (params) => _updateApp(db, projectScopedWhere(apps, params.scopes))(params.id, params.data);
|
|
61
|
+
const deleteAppForTenant = (db) => async (params) => _deleteApp(db, tenantScopedWhere(apps, params.scopes))(params.id);
|
|
62
|
+
const deleteAppForProject = (db) => async (params) => _deleteApp(db, projectScopedWhere(apps, params.scopes))(params.id);
|
|
56
63
|
const deleteAppsByProject = (db) => async (tenantId, projectId) => {
|
|
57
64
|
return (await db.delete(apps).where(and(tenantScopedWhere(apps, { tenantId }), eq(apps.projectId, projectId))).returning()).length;
|
|
58
65
|
};
|
|
@@ -84,4 +91,4 @@ const deleteApp = (db) => async (id) => {
|
|
|
84
91
|
};
|
|
85
92
|
|
|
86
93
|
//#endregion
|
|
87
|
-
export { clearAppDefaultsByAgent, clearAppDefaultsByProject, createApp, deleteApp, deleteAppForTenant, deleteAppsByProject, getAppById, getAppByIdForTenant, listAppsPaginated, updateApp, updateAppForTenant, updateAppLastUsed };
|
|
94
|
+
export { clearAppDefaultsByAgent, clearAppDefaultsByProject, createApp, deleteApp, deleteAppForProject, deleteAppForTenant, deleteAppsByProject, getAppById, getAppByIdForProject, getAppByIdForTenant, listAppsPaginated, updateApp, updateAppForProject, updateAppForTenant, updateAppLastUsed };
|
|
@@ -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
|
-
title: string | null;
|
|
20
19
|
id: string;
|
|
20
|
+
tenantId: string;
|
|
21
|
+
projectId: string;
|
|
22
|
+
agentId: string | null;
|
|
23
|
+
title: string | null;
|
|
21
24
|
createdAt: string;
|
|
22
25
|
updatedAt: string;
|
|
26
|
+
metadata: ConversationMetadata | null;
|
|
27
|
+
userId: string | null;
|
|
23
28
|
ref: {
|
|
24
|
-
type: "
|
|
29
|
+
type: "tag" | "commit" | "branch";
|
|
25
30
|
name: string;
|
|
26
31
|
hash: string;
|
|
27
32
|
} | null;
|
|
28
|
-
userId: string | null;
|
|
29
|
-
metadata: ConversationMetadata | null;
|
|
30
|
-
tenantId: string;
|
|
31
|
-
projectId: string;
|
|
32
|
-
agentId: string | null;
|
|
33
33
|
activeSubAgentId: string;
|
|
34
34
|
lastContextResolution: string | null;
|
|
35
35
|
}>;
|
|
@@ -44,7 +44,7 @@ declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
44
44
|
agentId: string | null;
|
|
45
45
|
activeSubAgentId: string;
|
|
46
46
|
ref: {
|
|
47
|
-
type: "
|
|
47
|
+
type: "tag" | "commit" | "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: "
|
|
73
|
+
type: "tag" | "commit" | "branch";
|
|
74
74
|
name: string;
|
|
75
75
|
hash: string;
|
|
76
76
|
} | null;
|
|
@@ -85,20 +85,20 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
85
85
|
scopes: ProjectScopeConfig;
|
|
86
86
|
conversationId: string;
|
|
87
87
|
}) => Promise<{
|
|
88
|
-
title: string | null;
|
|
89
88
|
id: string;
|
|
89
|
+
tenantId: string;
|
|
90
|
+
projectId: string;
|
|
91
|
+
agentId: string | null;
|
|
92
|
+
title: string | null;
|
|
90
93
|
createdAt: string;
|
|
91
94
|
updatedAt: string;
|
|
95
|
+
metadata: ConversationMetadata | null;
|
|
96
|
+
userId: string | null;
|
|
92
97
|
ref: {
|
|
93
|
-
type: "
|
|
98
|
+
type: "tag" | "commit" | "branch";
|
|
94
99
|
name: string;
|
|
95
100
|
hash: string;
|
|
96
101
|
} | null;
|
|
97
|
-
userId: string | null;
|
|
98
|
-
metadata: ConversationMetadata | null;
|
|
99
|
-
tenantId: string;
|
|
100
|
-
projectId: string;
|
|
101
|
-
agentId: string | null;
|
|
102
102
|
activeSubAgentId: string;
|
|
103
103
|
lastContextResolution: string | null;
|
|
104
104
|
} | undefined>;
|
|
@@ -108,7 +108,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
108
108
|
tenantId: string;
|
|
109
109
|
id: string;
|
|
110
110
|
ref: {
|
|
111
|
-
type: "
|
|
111
|
+
type: "tag" | "commit" | "branch";
|
|
112
112
|
name: string;
|
|
113
113
|
hash: string;
|
|
114
114
|
};
|
|
@@ -121,20 +121,20 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
121
121
|
metadata?: ConversationMetadata | null | undefined;
|
|
122
122
|
contextConfigId?: string | undefined;
|
|
123
123
|
} | {
|
|
124
|
-
title: string | null;
|
|
125
124
|
id: string;
|
|
125
|
+
tenantId: string;
|
|
126
|
+
projectId: string;
|
|
127
|
+
agentId: string | null;
|
|
128
|
+
title: string | null;
|
|
126
129
|
createdAt: string;
|
|
127
130
|
updatedAt: string;
|
|
131
|
+
metadata: ConversationMetadata | null;
|
|
132
|
+
userId: string | null;
|
|
128
133
|
ref: {
|
|
129
|
-
type: "
|
|
134
|
+
type: "tag" | "commit" | "branch";
|
|
130
135
|
name: string;
|
|
131
136
|
hash: string;
|
|
132
137
|
} | null;
|
|
133
|
-
userId: string | null;
|
|
134
|
-
metadata: ConversationMetadata | null;
|
|
135
|
-
tenantId: string;
|
|
136
|
-
projectId: string;
|
|
137
|
-
agentId: 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
|
-
title: string | null;
|
|
157
156
|
id: string;
|
|
157
|
+
tenantId: string;
|
|
158
|
+
projectId: string;
|
|
159
|
+
agentId: string | null;
|
|
160
|
+
title: string | null;
|
|
158
161
|
createdAt: string;
|
|
159
162
|
updatedAt: string;
|
|
163
|
+
metadata: ConversationMetadata | null;
|
|
164
|
+
userId: string | null;
|
|
160
165
|
ref: {
|
|
161
|
-
type: "
|
|
166
|
+
type: "tag" | "commit" | "branch";
|
|
162
167
|
name: string;
|
|
163
168
|
hash: string;
|
|
164
169
|
} | null;
|
|
165
|
-
userId: string | null;
|
|
166
|
-
metadata: ConversationMetadata | null;
|
|
167
|
-
tenantId: string;
|
|
168
|
-
projectId: string;
|
|
169
|
-
agentId: string | null;
|
|
170
170
|
activeSubAgentId: string;
|
|
171
171
|
lastContextResolution: string | null;
|
|
172
172
|
} | undefined>;
|
|
@@ -11,25 +11,25 @@ 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
18
|
metadata: MessageMetadata | null;
|
|
17
|
-
role: string;
|
|
18
19
|
content: MessageContent;
|
|
19
|
-
tenantId: string;
|
|
20
|
-
projectId: string;
|
|
21
|
-
conversationId: string;
|
|
22
20
|
fromSubAgentId: string | null;
|
|
23
21
|
toSubAgentId: string | null;
|
|
24
22
|
fromExternalAgentId: string | null;
|
|
25
23
|
toExternalAgentId: string | null;
|
|
24
|
+
taskId: string | null;
|
|
25
|
+
a2aTaskId: string | null;
|
|
26
|
+
conversationId: string;
|
|
27
|
+
role: string;
|
|
26
28
|
fromTeamAgentId: string | null;
|
|
27
29
|
toTeamAgentId: string | null;
|
|
28
30
|
visibility: string;
|
|
29
31
|
messageType: string;
|
|
30
|
-
taskId: string | null;
|
|
31
32
|
parentMessageId: string | null;
|
|
32
|
-
a2aTaskId: string | null;
|
|
33
33
|
a2aSessionId: string | null;
|
|
34
34
|
} | undefined>;
|
|
35
35
|
declare const listMessages: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -145,25 +145,25 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
145
145
|
data: Omit<MessageInsert, "tenantId" | "projectId">;
|
|
146
146
|
}) => Promise<{
|
|
147
147
|
id: string;
|
|
148
|
+
tenantId: string;
|
|
149
|
+
projectId: string;
|
|
148
150
|
createdAt: string;
|
|
149
151
|
updatedAt: string;
|
|
150
152
|
metadata: MessageMetadata | null;
|
|
151
|
-
role: string;
|
|
152
153
|
content: MessageContent;
|
|
153
|
-
tenantId: string;
|
|
154
|
-
projectId: string;
|
|
155
|
-
conversationId: string;
|
|
156
154
|
fromSubAgentId: string | null;
|
|
157
155
|
toSubAgentId: string | null;
|
|
158
156
|
fromExternalAgentId: string | null;
|
|
159
157
|
toExternalAgentId: string | null;
|
|
158
|
+
taskId: string | null;
|
|
159
|
+
a2aTaskId: string | null;
|
|
160
|
+
conversationId: string;
|
|
161
|
+
role: string;
|
|
160
162
|
fromTeamAgentId: string | null;
|
|
161
163
|
toTeamAgentId: string | null;
|
|
162
164
|
visibility: string;
|
|
163
165
|
messageType: string;
|
|
164
|
-
taskId: string | null;
|
|
165
166
|
parentMessageId: string | null;
|
|
166
|
-
a2aTaskId: string | null;
|
|
167
167
|
a2aSessionId: string | null;
|
|
168
168
|
}>;
|
|
169
169
|
declare const updateMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -198,25 +198,25 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
198
198
|
messageId: string;
|
|
199
199
|
}) => Promise<{
|
|
200
200
|
id: string;
|
|
201
|
+
tenantId: string;
|
|
202
|
+
projectId: string;
|
|
201
203
|
createdAt: string;
|
|
202
204
|
updatedAt: string;
|
|
203
205
|
metadata: MessageMetadata | null;
|
|
204
|
-
role: string;
|
|
205
206
|
content: MessageContent;
|
|
206
|
-
tenantId: string;
|
|
207
|
-
projectId: string;
|
|
208
|
-
conversationId: string;
|
|
209
207
|
fromSubAgentId: string | null;
|
|
210
208
|
toSubAgentId: string | null;
|
|
211
209
|
fromExternalAgentId: string | null;
|
|
212
210
|
toExternalAgentId: string | null;
|
|
211
|
+
taskId: string | null;
|
|
212
|
+
a2aTaskId: string | null;
|
|
213
|
+
conversationId: string;
|
|
214
|
+
role: string;
|
|
213
215
|
fromTeamAgentId: string | null;
|
|
214
216
|
toTeamAgentId: string | null;
|
|
215
217
|
visibility: string;
|
|
216
218
|
messageType: string;
|
|
217
|
-
taskId: string | null;
|
|
218
219
|
parentMessageId: string | null;
|
|
219
|
-
a2aTaskId: string | null;
|
|
220
220
|
a2aSessionId: string | null;
|
|
221
221
|
}>;
|
|
222
222
|
declare const countMessagesByConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -34,7 +34,7 @@ declare const listScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseCl
|
|
|
34
34
|
}) => Promise<{
|
|
35
35
|
data: {
|
|
36
36
|
scheduledTriggerId: string;
|
|
37
|
-
status: "pending" | "
|
|
37
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
38
38
|
scheduledFor: string;
|
|
39
39
|
startedAt: string | null;
|
|
40
40
|
completedAt: string | null;
|
|
@@ -174,7 +174,7 @@ declare const listUpcomingInvocationsForAgentPaginated: (db: AgentsRunDatabaseCl
|
|
|
174
174
|
}) => Promise<{
|
|
175
175
|
data: {
|
|
176
176
|
scheduledTriggerId: string;
|
|
177
|
-
status: "pending" | "
|
|
177
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
178
178
|
scheduledFor: string;
|
|
179
179
|
startedAt: string | null;
|
|
180
180
|
completedAt: string | null;
|
|
@@ -208,7 +208,7 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
|
|
|
208
208
|
}) => Promise<{
|
|
209
209
|
data: {
|
|
210
210
|
scheduledTriggerId: string;
|
|
211
|
-
status: "pending" | "
|
|
211
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
212
212
|
scheduledFor: string;
|
|
213
213
|
startedAt: string | null;
|
|
214
214
|
completedAt: string | null;
|
|
@@ -8,20 +8,20 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
|
|
|
8
8
|
//#region src/data-access/runtime/tasks.d.ts
|
|
9
9
|
declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
|
|
10
10
|
id: string;
|
|
11
|
+
tenantId: string;
|
|
12
|
+
projectId: string;
|
|
13
|
+
agentId: string;
|
|
11
14
|
createdAt: string;
|
|
12
15
|
updatedAt: string;
|
|
16
|
+
metadata: TaskMetadataConfig | null;
|
|
17
|
+
subAgentId: string;
|
|
18
|
+
status: string;
|
|
19
|
+
contextId: string;
|
|
13
20
|
ref: {
|
|
14
|
-
type: "
|
|
21
|
+
type: "tag" | "commit" | "branch";
|
|
15
22
|
name: string;
|
|
16
23
|
hash: string;
|
|
17
24
|
} | null;
|
|
18
|
-
metadata: TaskMetadataConfig | null;
|
|
19
|
-
status: string;
|
|
20
|
-
tenantId: string;
|
|
21
|
-
projectId: string;
|
|
22
|
-
agentId: string;
|
|
23
|
-
contextId: string;
|
|
24
|
-
subAgentId: string;
|
|
25
25
|
}>;
|
|
26
26
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
27
27
|
id: string;
|
|
@@ -39,7 +39,7 @@ declare const updateTask: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
39
39
|
updatedAt: string;
|
|
40
40
|
contextId: string;
|
|
41
41
|
ref: {
|
|
42
|
-
type: "
|
|
42
|
+
type: "tag" | "commit" | "branch";
|
|
43
43
|
name: string;
|
|
44
44
|
hash: string;
|
|
45
45
|
} | null;
|