@inkeep/agents-core 0.0.0-dev-20260331194528 → 0.0.0-dev-20260401041551
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 +108 -108
- package/dist/auth/auth-validation-schemas.d.ts +154 -154
- package/dist/auth/init.js +2 -4
- 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/manage/agents.d.ts +41 -41
- package/dist/data-access/manage/artifactComponents.d.ts +10 -10
- package/dist/data-access/manage/contextConfigs.d.ts +16 -16
- package/dist/data-access/manage/dataComponents.d.ts +4 -4
- package/dist/data-access/manage/functionTools.d.ts +14 -14
- package/dist/data-access/manage/skills.d.ts +9 -9
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +12 -12
- package/dist/data-access/manage/subAgents.d.ts +15 -15
- package/dist/data-access/manage/tools.d.ts +21 -21
- package/dist/data-access/manage/tools.js +41 -4
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +12 -12
- package/dist/data-access/runtime/apps.d.ts +38 -47
- package/dist/data-access/runtime/conversations.d.ts +32 -32
- package/dist/data-access/runtime/messages.d.ts +12 -12
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +4 -4
- package/dist/data-access/runtime/tasks.d.ts +7 -7
- package/dist/db/manage/manage-schema.d.ts +449 -449
- package/dist/db/runtime/runtime-schema.d.ts +394 -400
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/middleware/no-auth.d.ts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/utility.d.ts +2 -3
- package/dist/utils/mcp-client.d.ts +1 -1
- package/dist/utils/mcp-client.js +1 -1
- 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 +40 -40
- package/dist/validation/schemas.d.ts +2653 -2732
- package/dist/validation/schemas.js +7 -9
- package/drizzle/runtime/0030_set-allow-anonymous-for-existing-apps.sql +56 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -20,20 +20,20 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
20
20
|
scopes: ProjectScopeConfig;
|
|
21
21
|
toolId: string;
|
|
22
22
|
}) => Promise<{
|
|
23
|
+
tenantId: string;
|
|
23
24
|
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
description: string | null;
|
|
26
25
|
createdAt: string;
|
|
26
|
+
name: string;
|
|
27
27
|
updatedAt: string;
|
|
28
28
|
projectId: string;
|
|
29
|
-
|
|
29
|
+
description: string | null;
|
|
30
|
+
headers: Record<string, string> | null;
|
|
30
31
|
config: {
|
|
31
32
|
type: "mcp";
|
|
32
33
|
mcp: ToolMcpConfig;
|
|
33
34
|
};
|
|
34
35
|
credentialReferenceId: string | null;
|
|
35
36
|
credentialScope: string;
|
|
36
|
-
headers: Record<string, string> | null;
|
|
37
37
|
imageUrl: string | null;
|
|
38
38
|
capabilities: ToolServerCapabilities | null;
|
|
39
39
|
lastError: string | null;
|
|
@@ -78,20 +78,20 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
78
78
|
};
|
|
79
79
|
}>;
|
|
80
80
|
declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
|
|
81
|
+
tenantId: string;
|
|
81
82
|
id: string;
|
|
82
|
-
name: string;
|
|
83
|
-
description: string | null;
|
|
84
83
|
createdAt: string;
|
|
84
|
+
name: string;
|
|
85
85
|
updatedAt: string;
|
|
86
86
|
projectId: string;
|
|
87
|
-
|
|
87
|
+
description: string | null;
|
|
88
|
+
headers: Record<string, string> | null;
|
|
88
89
|
config: {
|
|
89
90
|
type: "mcp";
|
|
90
91
|
mcp: ToolMcpConfig;
|
|
91
92
|
};
|
|
92
93
|
credentialReferenceId: string | null;
|
|
93
94
|
credentialScope: string;
|
|
94
|
-
headers: Record<string, string> | null;
|
|
95
95
|
imageUrl: string | null;
|
|
96
96
|
capabilities: ToolServerCapabilities | null;
|
|
97
97
|
lastError: string | null;
|
|
@@ -135,38 +135,38 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
135
135
|
needsApproval?: boolean;
|
|
136
136
|
}> | null;
|
|
137
137
|
}) => Promise<{
|
|
138
|
+
tenantId: string;
|
|
138
139
|
id: string;
|
|
139
140
|
createdAt: string;
|
|
140
141
|
updatedAt: string;
|
|
141
|
-
projectId: string;
|
|
142
|
-
tenantId: string;
|
|
143
142
|
agentId: string;
|
|
143
|
+
projectId: string;
|
|
144
144
|
subAgentId: string;
|
|
145
145
|
toolId: string;
|
|
146
146
|
headers: Record<string, string> | null;
|
|
147
|
-
selectedTools: string[] | null;
|
|
148
147
|
toolPolicies: Record<string, {
|
|
149
148
|
needsApproval?: boolean;
|
|
150
149
|
}> | null;
|
|
150
|
+
selectedTools: string[] | null;
|
|
151
151
|
}>;
|
|
152
152
|
declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
153
153
|
scopes: AgentScopeConfig;
|
|
154
154
|
subAgentId: string;
|
|
155
155
|
toolId: string;
|
|
156
156
|
}) => Promise<{
|
|
157
|
+
tenantId: string;
|
|
157
158
|
id: string;
|
|
158
159
|
createdAt: string;
|
|
159
160
|
updatedAt: string;
|
|
160
|
-
projectId: string;
|
|
161
|
-
tenantId: string;
|
|
162
161
|
agentId: string;
|
|
162
|
+
projectId: string;
|
|
163
163
|
subAgentId: string;
|
|
164
164
|
toolId: string;
|
|
165
165
|
headers: Record<string, string> | null;
|
|
166
|
-
selectedTools: string[] | null;
|
|
167
166
|
toolPolicies: Record<string, {
|
|
168
167
|
needsApproval?: boolean;
|
|
169
168
|
}> | 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)
|
|
@@ -182,19 +182,19 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
182
182
|
}> | null;
|
|
183
183
|
relationId?: string;
|
|
184
184
|
}) => Promise<{
|
|
185
|
+
tenantId: string;
|
|
185
186
|
id: string;
|
|
186
187
|
createdAt: string;
|
|
187
188
|
updatedAt: string;
|
|
188
|
-
projectId: string;
|
|
189
|
-
tenantId: string;
|
|
190
189
|
agentId: string;
|
|
190
|
+
projectId: string;
|
|
191
191
|
subAgentId: string;
|
|
192
192
|
toolId: string;
|
|
193
193
|
headers: Record<string, string> | null;
|
|
194
|
-
selectedTools: string[] | null;
|
|
195
194
|
toolPolicies: Record<string, {
|
|
196
195
|
needsApproval?: boolean;
|
|
197
196
|
}> | null;
|
|
197
|
+
selectedTools: string[] | null;
|
|
198
198
|
}>;
|
|
199
199
|
/**
|
|
200
200
|
* Upsert a tool (create if it doesn't exist, update if it does)
|
|
@@ -202,20 +202,20 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
202
202
|
declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
203
203
|
data: ToolInsert;
|
|
204
204
|
}) => Promise<{
|
|
205
|
+
tenantId: string;
|
|
205
206
|
id: string;
|
|
206
|
-
name: string;
|
|
207
|
-
description: string | null;
|
|
208
207
|
createdAt: string;
|
|
208
|
+
name: string;
|
|
209
209
|
updatedAt: string;
|
|
210
210
|
projectId: string;
|
|
211
|
-
|
|
211
|
+
description: string | null;
|
|
212
|
+
headers: Record<string, string> | null;
|
|
212
213
|
config: {
|
|
213
214
|
type: "mcp";
|
|
214
215
|
mcp: ToolMcpConfig;
|
|
215
216
|
};
|
|
216
217
|
credentialReferenceId: string | null;
|
|
217
218
|
credentialScope: string;
|
|
218
|
-
headers: Record<string, string> | null;
|
|
219
219
|
imageUrl: string | null;
|
|
220
220
|
capabilities: ToolServerCapabilities | null;
|
|
221
221
|
lastError: string | null;
|
|
@@ -23,20 +23,45 @@ import "../../utils/index.js";
|
|
|
23
23
|
import { isGithubWorkAppTool } from "../runtime/github-work-app-installations.js";
|
|
24
24
|
import { getCredentialReference, getUserScopedCredentialReference } from "./credentialReferences.js";
|
|
25
25
|
import { and, count, desc, eq } from "drizzle-orm";
|
|
26
|
+
import { UnauthorizedError } from "@modelcontextprotocol/sdk/client/auth.js";
|
|
27
|
+
import { StreamableHTTPError } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
26
28
|
import { ErrorCode, McpError } from "@modelcontextprotocol/sdk/types.js";
|
|
27
29
|
|
|
28
30
|
//#region src/data-access/manage/tools.ts
|
|
29
31
|
/**
|
|
30
|
-
* Check if an error is a timeout/connection error.
|
|
32
|
+
* Check if an error is a timeout/connection error (transient, not auth-related).
|
|
31
33
|
* Uses MCP SDK ErrorCode for proper type safety.
|
|
32
34
|
*/
|
|
33
35
|
function isTimeoutOrConnectionError(error) {
|
|
34
|
-
if (error instanceof McpError) return error.code === ErrorCode.RequestTimeout || error.code === ErrorCode.ConnectionClosed;
|
|
36
|
+
if (error instanceof McpError) return error.code === ErrorCode.RequestTimeout || error.code === ErrorCode.ConnectionClosed || error.code === ErrorCode.InternalError;
|
|
37
|
+
if (error instanceof StreamableHTTPError) return error.code !== void 0 && error.code >= 500;
|
|
35
38
|
if (error instanceof Error) {
|
|
36
39
|
const message = error.message.toLowerCase();
|
|
37
40
|
const cause = error.cause;
|
|
38
|
-
if (message.includes("timed out") || message.includes("timeout")) return true;
|
|
39
|
-
if (cause?.code
|
|
41
|
+
if (message.includes("timed out") || message.includes("timeout") || message.includes("fetch failed")) return true;
|
|
42
|
+
if (cause?.code && [
|
|
43
|
+
"ETIMEDOUT",
|
|
44
|
+
"ECONNABORTED",
|
|
45
|
+
"ECONNRESET",
|
|
46
|
+
"ECONNREFUSED",
|
|
47
|
+
"ENOTFOUND",
|
|
48
|
+
"EHOSTUNREACH",
|
|
49
|
+
"ENETUNREACH",
|
|
50
|
+
"EPIPE"
|
|
51
|
+
].includes(cause.code)) return true;
|
|
52
|
+
}
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if an error indicates the credential is invalid/expired/revoked.
|
|
57
|
+
* These errors mean the user genuinely needs to re-authenticate.
|
|
58
|
+
*/
|
|
59
|
+
function isAuthenticationError(error) {
|
|
60
|
+
if (error instanceof UnauthorizedError) return true;
|
|
61
|
+
if (error instanceof StreamableHTTPError) return error.code === 401 || error.code === 403;
|
|
62
|
+
if (error instanceof Error) {
|
|
63
|
+
const message = error.message.toLowerCase();
|
|
64
|
+
if (message.includes("unauthorized") || message.includes("forbidden") || message.includes("invalid_token") || message.includes("token expired") || message.includes("invalid_grant")) return true;
|
|
40
65
|
}
|
|
41
66
|
return false;
|
|
42
67
|
}
|
|
@@ -243,6 +268,18 @@ const dbResultToMcpTool = async (dbResult, dbClient, credentialStoreRegistry, re
|
|
|
243
268
|
if (isTimeoutOrConnectionError(error)) {
|
|
244
269
|
status = "unavailable";
|
|
245
270
|
lastErrorComputed = `Connection failed - the MCP server may be slow or temporarily unreachable.${error instanceof McpError ? ` (MCP error ${error.code})` : ""} ${errorMessage}`;
|
|
271
|
+
} else if (isAuthenticationError(error)) {
|
|
272
|
+
status = "needs_auth";
|
|
273
|
+
lastErrorComputed = `Authentication required - OAuth login needed. ${errorMessage}`;
|
|
274
|
+
} else if (credentialReference) {
|
|
275
|
+
logger.warn({
|
|
276
|
+
toolId: dbResult.id,
|
|
277
|
+
credentialId: credentialReference.id,
|
|
278
|
+
errorCode: error instanceof McpError ? error.code : void 0,
|
|
279
|
+
errorMessage
|
|
280
|
+
}, "MCP server discovery failed with existing credential — treating as transient");
|
|
281
|
+
status = "unavailable";
|
|
282
|
+
lastErrorComputed = `Server temporarily unavailable. ${errorMessage}`;
|
|
246
283
|
} else {
|
|
247
284
|
const toolNeedsAuth = await detectAuthenticationRequired({
|
|
248
285
|
serverUrl: mcpServerUrl,
|
|
@@ -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" | "body" | "header";
|
|
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" | "body" | "header";
|
|
50
50
|
required: boolean;
|
|
51
51
|
key?: string | undefined;
|
|
52
52
|
value?: string | undefined;
|
|
@@ -8,13 +8,13 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
8
8
|
scopes: ProjectScopeConfig;
|
|
9
9
|
id: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
+
tenantId: string;
|
|
11
12
|
id: string;
|
|
12
|
-
name: string | null;
|
|
13
13
|
createdAt: string;
|
|
14
|
+
name: string | null;
|
|
14
15
|
updatedAt: string;
|
|
15
|
-
projectId: string;
|
|
16
|
-
tenantId: string;
|
|
17
16
|
agentId: string;
|
|
17
|
+
projectId: string;
|
|
18
18
|
expiresAt: string | null;
|
|
19
19
|
publicId: string;
|
|
20
20
|
keyHash: string;
|
|
@@ -22,13 +22,13 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
22
22
|
lastUsedAt: string | null;
|
|
23
23
|
} | undefined>;
|
|
24
24
|
declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
|
|
25
|
+
tenantId: string;
|
|
25
26
|
id: string;
|
|
26
|
-
name: string | null;
|
|
27
27
|
createdAt: string;
|
|
28
|
+
name: string | null;
|
|
28
29
|
updatedAt: string;
|
|
29
|
-
projectId: string;
|
|
30
|
-
tenantId: string;
|
|
31
30
|
agentId: string;
|
|
31
|
+
projectId: string;
|
|
32
32
|
expiresAt: string | null;
|
|
33
33
|
publicId: string;
|
|
34
34
|
keyHash: string;
|
|
@@ -39,13 +39,13 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
39
39
|
scopes: ProjectScopeConfig;
|
|
40
40
|
agentId?: string;
|
|
41
41
|
}) => Promise<{
|
|
42
|
+
tenantId: string;
|
|
42
43
|
id: string;
|
|
43
|
-
name: string | null;
|
|
44
44
|
createdAt: string;
|
|
45
|
+
name: string | null;
|
|
45
46
|
updatedAt: string;
|
|
46
|
-
projectId: string;
|
|
47
|
-
tenantId: string;
|
|
48
47
|
agentId: string;
|
|
48
|
+
projectId: string;
|
|
49
49
|
expiresAt: string | null;
|
|
50
50
|
publicId: string;
|
|
51
51
|
keyHash: string;
|
|
@@ -66,13 +66,13 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
66
66
|
};
|
|
67
67
|
}>;
|
|
68
68
|
declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
|
|
69
|
+
tenantId: string;
|
|
69
70
|
id: string;
|
|
70
|
-
name: string | null;
|
|
71
71
|
createdAt: string;
|
|
72
|
+
name: string | null;
|
|
72
73
|
updatedAt: string;
|
|
73
|
-
projectId: string;
|
|
74
|
-
tenantId: string;
|
|
75
74
|
agentId: string;
|
|
75
|
+
projectId: string;
|
|
76
76
|
expiresAt: string | null;
|
|
77
77
|
publicId: string;
|
|
78
78
|
keyHash: string;
|
|
@@ -6,38 +6,35 @@ 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
|
+
tenantId: string | null;
|
|
9
10
|
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
description: string | null;
|
|
12
11
|
createdAt: string;
|
|
12
|
+
name: string;
|
|
13
13
|
updatedAt: string;
|
|
14
14
|
projectId: string | null;
|
|
15
|
-
|
|
16
|
-
lastUsedAt: string | null;
|
|
17
|
-
defaultProjectId: string | null;
|
|
18
|
-
defaultAgentId: string | null;
|
|
19
|
-
prompt: string | null;
|
|
15
|
+
description: string | null;
|
|
20
16
|
enabled: boolean;
|
|
17
|
+
prompt: string | null;
|
|
21
18
|
config: {
|
|
22
19
|
type: "web_client";
|
|
23
20
|
webClient: {
|
|
24
21
|
allowedDomains: string[];
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
validateScopeClaims?: boolean | undefined;
|
|
34
|
-
allowAnonymous?: boolean | undefined;
|
|
35
|
-
} | undefined;
|
|
22
|
+
publicKeys: {
|
|
23
|
+
kid: string;
|
|
24
|
+
publicKey: string;
|
|
25
|
+
algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
|
|
26
|
+
addedAt: string;
|
|
27
|
+
}[];
|
|
28
|
+
allowAnonymous: boolean;
|
|
29
|
+
audience?: string | undefined;
|
|
36
30
|
};
|
|
37
31
|
} | {
|
|
38
32
|
type: "api";
|
|
39
33
|
api: Record<string, never>;
|
|
40
34
|
};
|
|
35
|
+
lastUsedAt: string | null;
|
|
36
|
+
defaultProjectId: string | null;
|
|
37
|
+
defaultAgentId: string | null;
|
|
41
38
|
} | undefined>;
|
|
42
39
|
declare const updateAppLastUsed: (db: AgentsRunDatabaseClient) => (id: string) => Promise<void>;
|
|
43
40
|
declare const getAppByIdForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
@@ -65,38 +62,35 @@ declare const listAppsPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
65
62
|
}>;
|
|
66
63
|
declare const createApp: (db: AgentsRunDatabaseClient) => (params: AppInsert) => Promise<{
|
|
67
64
|
type: AppType;
|
|
65
|
+
tenantId: string | null;
|
|
68
66
|
id: string;
|
|
69
|
-
name: string;
|
|
70
|
-
description: string | null;
|
|
71
67
|
createdAt: string;
|
|
68
|
+
name: string;
|
|
72
69
|
updatedAt: string;
|
|
73
70
|
projectId: string | null;
|
|
74
|
-
|
|
75
|
-
lastUsedAt: string | null;
|
|
76
|
-
defaultProjectId: string | null;
|
|
77
|
-
defaultAgentId: string | null;
|
|
78
|
-
prompt: string | null;
|
|
71
|
+
description: string | null;
|
|
79
72
|
enabled: boolean;
|
|
73
|
+
prompt: string | null;
|
|
80
74
|
config: {
|
|
81
75
|
type: "web_client";
|
|
82
76
|
webClient: {
|
|
83
77
|
allowedDomains: string[];
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
validateScopeClaims?: boolean | undefined;
|
|
93
|
-
allowAnonymous?: boolean | undefined;
|
|
94
|
-
} | undefined;
|
|
78
|
+
publicKeys: {
|
|
79
|
+
kid: string;
|
|
80
|
+
publicKey: string;
|
|
81
|
+
algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
|
|
82
|
+
addedAt: string;
|
|
83
|
+
}[];
|
|
84
|
+
allowAnonymous: boolean;
|
|
85
|
+
audience?: string | undefined;
|
|
95
86
|
};
|
|
96
87
|
} | {
|
|
97
88
|
type: "api";
|
|
98
89
|
api: Record<string, never>;
|
|
99
90
|
};
|
|
91
|
+
lastUsedAt: string | null;
|
|
92
|
+
defaultProjectId: string | null;
|
|
93
|
+
defaultAgentId: string | null;
|
|
100
94
|
}>;
|
|
101
95
|
declare const updateAppForTenant: (db: AgentsRunDatabaseClient) => (params: {
|
|
102
96
|
scopes: TenantScopeConfig;
|
|
@@ -151,17 +145,14 @@ declare const updateApp: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
151
145
|
type: "web_client";
|
|
152
146
|
webClient: {
|
|
153
147
|
allowedDomains: string[];
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
validateScopeClaims?: boolean | undefined;
|
|
163
|
-
allowAnonymous?: boolean | undefined;
|
|
164
|
-
} | undefined;
|
|
148
|
+
publicKeys: {
|
|
149
|
+
kid: string;
|
|
150
|
+
publicKey: string;
|
|
151
|
+
algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "EdDSA";
|
|
152
|
+
addedAt: string;
|
|
153
|
+
}[];
|
|
154
|
+
allowAnonymous: boolean;
|
|
155
|
+
audience?: string | undefined;
|
|
165
156
|
};
|
|
166
157
|
} | {
|
|
167
158
|
type: "api";
|
|
@@ -15,22 +15,22 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
15
15
|
total: number;
|
|
16
16
|
}>;
|
|
17
17
|
declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
18
|
+
tenantId: string;
|
|
19
|
+
userId: string | null;
|
|
18
20
|
id: string;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
agentId: string | null;
|
|
24
|
+
projectId: string;
|
|
25
|
+
title: string | null;
|
|
26
|
+
metadata: ConversationMetadata | null;
|
|
19
27
|
ref: {
|
|
20
28
|
type: "commit" | "tag" | "branch";
|
|
21
29
|
name: string;
|
|
22
30
|
hash: string;
|
|
23
31
|
} | null;
|
|
24
|
-
title: string | null;
|
|
25
|
-
createdAt: string;
|
|
26
|
-
updatedAt: string;
|
|
27
|
-
projectId: string;
|
|
28
|
-
tenantId: string;
|
|
29
|
-
userId: string | null;
|
|
30
|
-
agentId: string | null;
|
|
31
32
|
activeSubAgentId: string;
|
|
32
33
|
lastContextResolution: string | null;
|
|
33
|
-
metadata: ConversationMetadata | null;
|
|
34
34
|
}>;
|
|
35
35
|
declare const updateConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
36
36
|
scopes: ProjectScopeConfig;
|
|
@@ -84,22 +84,22 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
84
84
|
scopes: ProjectScopeConfig;
|
|
85
85
|
conversationId: string;
|
|
86
86
|
}) => Promise<{
|
|
87
|
+
tenantId: string;
|
|
88
|
+
userId: string | null;
|
|
87
89
|
id: string;
|
|
90
|
+
createdAt: string;
|
|
91
|
+
updatedAt: string;
|
|
92
|
+
agentId: string | null;
|
|
93
|
+
projectId: string;
|
|
94
|
+
title: string | null;
|
|
95
|
+
metadata: ConversationMetadata | null;
|
|
88
96
|
ref: {
|
|
89
97
|
type: "commit" | "tag" | "branch";
|
|
90
98
|
name: string;
|
|
91
99
|
hash: string;
|
|
92
100
|
} | null;
|
|
93
|
-
title: string | null;
|
|
94
|
-
createdAt: string;
|
|
95
|
-
updatedAt: string;
|
|
96
|
-
projectId: string;
|
|
97
|
-
tenantId: string;
|
|
98
|
-
userId: string | null;
|
|
99
|
-
agentId: string | null;
|
|
100
101
|
activeSubAgentId: string;
|
|
101
102
|
lastContextResolution: string | null;
|
|
102
|
-
metadata: ConversationMetadata | null;
|
|
103
103
|
} | undefined>;
|
|
104
104
|
declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input: ConversationInsert) => Promise<{
|
|
105
105
|
activeSubAgentId: string;
|
|
@@ -120,22 +120,22 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
120
120
|
metadata?: ConversationMetadata | null | undefined;
|
|
121
121
|
contextConfigId?: string | undefined;
|
|
122
122
|
} | {
|
|
123
|
+
tenantId: string;
|
|
124
|
+
userId: string | null;
|
|
123
125
|
id: string;
|
|
126
|
+
createdAt: string;
|
|
127
|
+
updatedAt: string;
|
|
128
|
+
agentId: string | null;
|
|
129
|
+
projectId: string;
|
|
130
|
+
title: string | null;
|
|
131
|
+
metadata: ConversationMetadata | null;
|
|
124
132
|
ref: {
|
|
125
133
|
type: "commit" | "tag" | "branch";
|
|
126
134
|
name: string;
|
|
127
135
|
hash: string;
|
|
128
136
|
} | null;
|
|
129
|
-
title: string | null;
|
|
130
|
-
createdAt: string;
|
|
131
|
-
updatedAt: string;
|
|
132
|
-
projectId: string;
|
|
133
|
-
tenantId: string;
|
|
134
|
-
userId: string | null;
|
|
135
|
-
agentId: string | null;
|
|
136
137
|
activeSubAgentId: string;
|
|
137
138
|
lastContextResolution: string | null;
|
|
138
|
-
metadata: ConversationMetadata | null;
|
|
139
139
|
}>;
|
|
140
140
|
/**
|
|
141
141
|
* Get conversation history with filtering and context management
|
|
@@ -152,22 +152,22 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
152
152
|
scopes: ProjectScopeConfig;
|
|
153
153
|
conversationId: string;
|
|
154
154
|
}) => Promise<{
|
|
155
|
+
tenantId: string;
|
|
156
|
+
userId: string | null;
|
|
155
157
|
id: string;
|
|
158
|
+
createdAt: string;
|
|
159
|
+
updatedAt: string;
|
|
160
|
+
agentId: string | null;
|
|
161
|
+
projectId: string;
|
|
162
|
+
title: string | null;
|
|
163
|
+
metadata: ConversationMetadata | null;
|
|
156
164
|
ref: {
|
|
157
165
|
type: "commit" | "tag" | "branch";
|
|
158
166
|
name: string;
|
|
159
167
|
hash: string;
|
|
160
168
|
} | null;
|
|
161
|
-
title: string | null;
|
|
162
|
-
createdAt: string;
|
|
163
|
-
updatedAt: string;
|
|
164
|
-
projectId: string;
|
|
165
|
-
tenantId: string;
|
|
166
|
-
userId: string | null;
|
|
167
|
-
agentId: string | null;
|
|
168
169
|
activeSubAgentId: string;
|
|
169
170
|
lastContextResolution: string | null;
|
|
170
|
-
metadata: ConversationMetadata | null;
|
|
171
171
|
} | undefined>;
|
|
172
172
|
/**
|
|
173
173
|
* Set active agent for a conversation (upsert operation)
|
|
@@ -10,12 +10,11 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
10
10
|
scopes: ProjectScopeConfig;
|
|
11
11
|
messageId: string;
|
|
12
12
|
}) => Promise<{
|
|
13
|
+
tenantId: string;
|
|
13
14
|
id: string;
|
|
14
|
-
conversationId: string;
|
|
15
15
|
createdAt: string;
|
|
16
16
|
updatedAt: string;
|
|
17
17
|
projectId: string;
|
|
18
|
-
tenantId: string;
|
|
19
18
|
metadata: MessageMetadata | null;
|
|
20
19
|
content: MessageContent;
|
|
21
20
|
role: string;
|
|
@@ -23,13 +22,14 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
23
22
|
toSubAgentId: string | null;
|
|
24
23
|
fromExternalAgentId: string | null;
|
|
25
24
|
toExternalAgentId: string | null;
|
|
25
|
+
taskId: string | null;
|
|
26
|
+
a2aTaskId: string | null;
|
|
27
|
+
conversationId: 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: {
|
|
@@ -144,12 +144,11 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
144
144
|
scopes: ProjectScopeConfig;
|
|
145
145
|
data: Omit<MessageInsert, "tenantId" | "projectId">;
|
|
146
146
|
}) => Promise<{
|
|
147
|
+
tenantId: string;
|
|
147
148
|
id: string;
|
|
148
|
-
conversationId: string;
|
|
149
149
|
createdAt: string;
|
|
150
150
|
updatedAt: string;
|
|
151
151
|
projectId: string;
|
|
152
|
-
tenantId: string;
|
|
153
152
|
metadata: MessageMetadata | null;
|
|
154
153
|
content: MessageContent;
|
|
155
154
|
role: string;
|
|
@@ -157,13 +156,14 @@ declare const createMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
157
156
|
toSubAgentId: string | null;
|
|
158
157
|
fromExternalAgentId: string | null;
|
|
159
158
|
toExternalAgentId: string | null;
|
|
159
|
+
taskId: string | null;
|
|
160
|
+
a2aTaskId: string | null;
|
|
161
|
+
conversationId: 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: {
|
|
@@ -197,12 +197,11 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
197
197
|
scopes: ProjectScopeConfig;
|
|
198
198
|
messageId: string;
|
|
199
199
|
}) => Promise<{
|
|
200
|
+
tenantId: string;
|
|
200
201
|
id: string;
|
|
201
|
-
conversationId: string;
|
|
202
202
|
createdAt: string;
|
|
203
203
|
updatedAt: string;
|
|
204
204
|
projectId: string;
|
|
205
|
-
tenantId: string;
|
|
206
205
|
metadata: MessageMetadata | null;
|
|
207
206
|
content: MessageContent;
|
|
208
207
|
role: string;
|
|
@@ -210,13 +209,14 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
210
209
|
toSubAgentId: string | null;
|
|
211
210
|
fromExternalAgentId: string | null;
|
|
212
211
|
toExternalAgentId: string | null;
|
|
212
|
+
taskId: string | null;
|
|
213
|
+
a2aTaskId: string | null;
|
|
214
|
+
conversationId: 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: {
|
|
@@ -40,7 +40,7 @@ declare const listScheduledTriggerInvocationsPaginated: (db: AgentsRunDatabaseCl
|
|
|
40
40
|
name: string;
|
|
41
41
|
hash: string;
|
|
42
42
|
} | null;
|
|
43
|
-
status: "pending" | "
|
|
43
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
44
44
|
scheduledFor: string;
|
|
45
45
|
startedAt: string | null;
|
|
46
46
|
completedAt: string | null;
|
|
@@ -194,7 +194,7 @@ declare const listUpcomingInvocationsForAgentPaginated: (db: AgentsRunDatabaseCl
|
|
|
194
194
|
name: string;
|
|
195
195
|
hash: string;
|
|
196
196
|
} | null;
|
|
197
|
-
status: "pending" | "
|
|
197
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
198
198
|
scheduledFor: string;
|
|
199
199
|
startedAt: string | null;
|
|
200
200
|
completedAt: string | null;
|
|
@@ -233,7 +233,7 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
|
|
|
233
233
|
name: string;
|
|
234
234
|
hash: string;
|
|
235
235
|
} | null;
|
|
236
|
-
status: "pending" | "
|
|
236
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
237
237
|
scheduledFor: string;
|
|
238
238
|
startedAt: string | null;
|
|
239
239
|
completedAt: string | null;
|
|
@@ -285,7 +285,7 @@ declare const listScheduledTriggerInvocationsByTriggerId: (db: AgentsRunDatabase
|
|
|
285
285
|
name: string;
|
|
286
286
|
hash: string;
|
|
287
287
|
} | null;
|
|
288
|
-
status: "pending" | "
|
|
288
|
+
status: "pending" | "failed" | "running" | "completed" | "cancelled";
|
|
289
289
|
scheduledFor: string;
|
|
290
290
|
startedAt: string | null;
|
|
291
291
|
completedAt: string | null;
|