@inkeep/agents-core 0.0.0-dev-20260123205017 → 0.0.0-dev-20260123212735
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 +104 -104
- package/dist/auth/auth-validation-schemas.d.ts +129 -129
- package/dist/auth/auth.d.ts +63 -63
- package/dist/auth/auth.js +16 -12
- package/dist/auth/authz/client.d.ts +9 -3
- package/dist/auth/authz/client.js +24 -17
- package/dist/auth/authz/config.d.ts +51 -24
- package/dist/auth/authz/config.js +44 -27
- package/dist/auth/authz/index.d.ts +3 -3
- package/dist/auth/authz/index.js +3 -3
- package/dist/auth/authz/permissions.d.ts +0 -4
- package/dist/auth/authz/permissions.js +13 -13
- package/dist/auth/authz/sync.d.ts +23 -2
- package/dist/auth/authz/sync.js +136 -52
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +2 -1
- package/dist/client-exports.js +2 -1
- 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 +39 -39
- package/dist/data-access/manage/artifactComponents.d.ts +4 -4
- package/dist/data-access/manage/functionTools.d.ts +6 -6
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +6 -6
- package/dist/data-access/manage/subAgentRelations.d.ts +2 -2
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +6 -6
- package/dist/data-access/manage/subAgents.d.ts +21 -21
- package/dist/data-access/manage/tools.d.ts +12 -12
- package/dist/data-access/manage/triggers.d.ts +2 -2
- package/dist/data-access/runtime/apiKeys.d.ts +4 -4
- package/dist/data-access/runtime/conversations.d.ts +4 -4
- package/dist/data-access/runtime/organizations.d.ts +2 -2
- package/dist/data-access/runtime/organizations.js +2 -2
- package/dist/db/manage/manage-schema.d.ts +4 -4
- package/dist/db/runtime/runtime-schema.d.ts +175 -175
- package/dist/index.d.ts +4 -4
- package/dist/index.js +4 -4
- package/dist/validation/schemas.d.ts +1532 -1532
- package/package.json +2 -1
- package/spicedb/schema.zed +114 -0
|
@@ -12,14 +12,14 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
12
12
|
scopes: ProjectScopeConfig;
|
|
13
13
|
toolId: string;
|
|
14
14
|
}) => Promise<{
|
|
15
|
-
name: string;
|
|
16
|
-
description: string | null;
|
|
17
15
|
id: string;
|
|
16
|
+
name: string;
|
|
18
17
|
createdAt: string;
|
|
19
18
|
updatedAt: string;
|
|
20
|
-
|
|
19
|
+
description: string | null;
|
|
21
20
|
tenantId: string;
|
|
22
21
|
projectId: string;
|
|
22
|
+
headers: Record<string, string> | null;
|
|
23
23
|
config: {
|
|
24
24
|
type: "mcp";
|
|
25
25
|
mcp: ToolMcpConfig;
|
|
@@ -68,14 +68,14 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
68
68
|
};
|
|
69
69
|
}>;
|
|
70
70
|
declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
|
|
71
|
-
name: string;
|
|
72
|
-
description: string | null;
|
|
73
71
|
id: string;
|
|
72
|
+
name: string;
|
|
74
73
|
createdAt: string;
|
|
75
74
|
updatedAt: string;
|
|
76
|
-
|
|
75
|
+
description: string | null;
|
|
77
76
|
tenantId: string;
|
|
78
77
|
projectId: string;
|
|
78
|
+
headers: Record<string, string> | null;
|
|
79
79
|
config: {
|
|
80
80
|
type: "mcp";
|
|
81
81
|
mcp: ToolMcpConfig;
|
|
@@ -126,12 +126,12 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
126
126
|
id: string;
|
|
127
127
|
createdAt: string;
|
|
128
128
|
updatedAt: string;
|
|
129
|
-
headers: Record<string, string> | null;
|
|
130
129
|
tenantId: string;
|
|
131
130
|
projectId: string;
|
|
132
131
|
subAgentId: string;
|
|
133
132
|
agentId: string;
|
|
134
133
|
toolId: string;
|
|
134
|
+
headers: Record<string, string> | null;
|
|
135
135
|
toolPolicies: Record<string, {
|
|
136
136
|
needsApproval?: boolean;
|
|
137
137
|
}> | null;
|
|
@@ -145,12 +145,12 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
145
145
|
id: string;
|
|
146
146
|
createdAt: string;
|
|
147
147
|
updatedAt: string;
|
|
148
|
-
headers: Record<string, string> | null;
|
|
149
148
|
tenantId: string;
|
|
150
149
|
projectId: string;
|
|
151
150
|
subAgentId: string;
|
|
152
151
|
agentId: string;
|
|
153
152
|
toolId: string;
|
|
153
|
+
headers: Record<string, string> | null;
|
|
154
154
|
toolPolicies: Record<string, {
|
|
155
155
|
needsApproval?: boolean;
|
|
156
156
|
}> | null;
|
|
@@ -173,12 +173,12 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
173
173
|
id: string;
|
|
174
174
|
createdAt: string;
|
|
175
175
|
updatedAt: string;
|
|
176
|
-
headers: Record<string, string> | null;
|
|
177
176
|
tenantId: string;
|
|
178
177
|
projectId: string;
|
|
179
178
|
subAgentId: string;
|
|
180
179
|
agentId: string;
|
|
181
180
|
toolId: string;
|
|
181
|
+
headers: Record<string, string> | null;
|
|
182
182
|
toolPolicies: Record<string, {
|
|
183
183
|
needsApproval?: boolean;
|
|
184
184
|
}> | null;
|
|
@@ -190,14 +190,14 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
190
190
|
declare const upsertTool: (db: AgentsManageDatabaseClient) => (params: {
|
|
191
191
|
data: ToolInsert;
|
|
192
192
|
}) => Promise<{
|
|
193
|
-
name: string;
|
|
194
|
-
description: string | null;
|
|
195
193
|
id: string;
|
|
194
|
+
name: string;
|
|
196
195
|
createdAt: string;
|
|
197
196
|
updatedAt: string;
|
|
198
|
-
|
|
197
|
+
description: string | null;
|
|
199
198
|
tenantId: string;
|
|
200
199
|
projectId: string;
|
|
200
|
+
headers: Record<string, string> | null;
|
|
201
201
|
config: {
|
|
202
202
|
type: "mcp";
|
|
203
203
|
mcp: ToolMcpConfig;
|
|
@@ -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;
|
|
@@ -7,8 +7,8 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
7
7
|
scopes: ProjectScopeConfig;
|
|
8
8
|
id: string;
|
|
9
9
|
}) => Promise<{
|
|
10
|
-
name: string | null;
|
|
11
10
|
id: string;
|
|
11
|
+
name: string | null;
|
|
12
12
|
createdAt: string;
|
|
13
13
|
updatedAt: string;
|
|
14
14
|
expiresAt: string | null;
|
|
@@ -21,8 +21,8 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
21
21
|
lastUsedAt: string | null;
|
|
22
22
|
} | undefined>;
|
|
23
23
|
declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
|
|
24
|
-
name: string | null;
|
|
25
24
|
id: string;
|
|
25
|
+
name: string | null;
|
|
26
26
|
createdAt: string;
|
|
27
27
|
updatedAt: string;
|
|
28
28
|
expiresAt: string | null;
|
|
@@ -38,8 +38,8 @@ declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
38
38
|
scopes: ProjectScopeConfig;
|
|
39
39
|
agentId?: string;
|
|
40
40
|
}) => Promise<{
|
|
41
|
-
name: string | null;
|
|
42
41
|
id: string;
|
|
42
|
+
name: string | null;
|
|
43
43
|
createdAt: string;
|
|
44
44
|
updatedAt: string;
|
|
45
45
|
expiresAt: string | null;
|
|
@@ -65,8 +65,8 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
65
65
|
};
|
|
66
66
|
}>;
|
|
67
67
|
declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
|
|
68
|
-
name: string | null;
|
|
69
68
|
id: string;
|
|
69
|
+
name: string | null;
|
|
70
70
|
createdAt: string;
|
|
71
71
|
updatedAt: string;
|
|
72
72
|
expiresAt: string | null;
|
|
@@ -15,7 +15,6 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
15
15
|
total: number;
|
|
16
16
|
}>;
|
|
17
17
|
declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
18
|
-
title: string | null;
|
|
19
18
|
id: string;
|
|
20
19
|
createdAt: string;
|
|
21
20
|
updatedAt: string;
|
|
@@ -26,6 +25,7 @@ declare const createConversation: (db: AgentsRunDatabaseClient) => (params: Conv
|
|
|
26
25
|
} | null;
|
|
27
26
|
userId: string | null;
|
|
28
27
|
metadata: ConversationMetadata | null;
|
|
28
|
+
title: string | null;
|
|
29
29
|
tenantId: string;
|
|
30
30
|
projectId: string;
|
|
31
31
|
agentId: string | null;
|
|
@@ -84,7 +84,6 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
84
84
|
scopes: ProjectScopeConfig;
|
|
85
85
|
conversationId: string;
|
|
86
86
|
}) => Promise<{
|
|
87
|
-
title: string | null;
|
|
88
87
|
id: string;
|
|
89
88
|
createdAt: string;
|
|
90
89
|
updatedAt: string;
|
|
@@ -95,6 +94,7 @@ declare const getConversation: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
95
94
|
} | null;
|
|
96
95
|
userId: string | null;
|
|
97
96
|
metadata: ConversationMetadata | null;
|
|
97
|
+
title: string | null;
|
|
98
98
|
tenantId: string;
|
|
99
99
|
projectId: string;
|
|
100
100
|
agentId: string | null;
|
|
@@ -120,7 +120,6 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
120
120
|
metadata?: ConversationMetadata | null | undefined;
|
|
121
121
|
contextConfigId?: string | undefined;
|
|
122
122
|
} | {
|
|
123
|
-
title: string | null;
|
|
124
123
|
id: string;
|
|
125
124
|
createdAt: string;
|
|
126
125
|
updatedAt: string;
|
|
@@ -131,6 +130,7 @@ declare const createOrGetConversation: (db: AgentsRunDatabaseClient) => (input:
|
|
|
131
130
|
} | null;
|
|
132
131
|
userId: string | null;
|
|
133
132
|
metadata: ConversationMetadata | null;
|
|
133
|
+
title: string | null;
|
|
134
134
|
tenantId: string;
|
|
135
135
|
projectId: string;
|
|
136
136
|
agentId: string | null;
|
|
@@ -152,7 +152,6 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
152
152
|
scopes: ProjectScopeConfig;
|
|
153
153
|
conversationId: string;
|
|
154
154
|
}) => Promise<{
|
|
155
|
-
title: string | null;
|
|
156
155
|
id: string;
|
|
157
156
|
createdAt: string;
|
|
158
157
|
updatedAt: string;
|
|
@@ -163,6 +162,7 @@ declare const getActiveAgentForConversation: (db: AgentsRunDatabaseClient) => (p
|
|
|
163
162
|
} | null;
|
|
164
163
|
userId: string | null;
|
|
165
164
|
metadata: ConversationMetadata | null;
|
|
165
|
+
title: string | null;
|
|
166
166
|
tenantId: string;
|
|
167
167
|
projectId: string;
|
|
168
168
|
agentId: string | null;
|
|
@@ -12,7 +12,7 @@ import { UserOrganization } from "../../auth/auth-validation-schemas.js";
|
|
|
12
12
|
* Queries Better Auth's member and organization tables
|
|
13
13
|
* Returns Date for createdAt (converted to string at API boundary)
|
|
14
14
|
*/
|
|
15
|
-
declare const
|
|
15
|
+
declare const getUserOrganizationsFromDb: (db: AgentsRunDatabaseClient) => (userId: string) => Promise<Array<Omit<UserOrganization, "createdAt"> & {
|
|
16
16
|
createdAt: Date;
|
|
17
17
|
}>>;
|
|
18
18
|
/**
|
|
@@ -49,4 +49,4 @@ declare const upsertOrganization: (db: AgentsRunDatabaseClient) => (data: {
|
|
|
49
49
|
created: boolean;
|
|
50
50
|
}>;
|
|
51
51
|
//#endregion
|
|
52
|
-
export { addUserToOrganization, getPendingInvitationsByEmail,
|
|
52
|
+
export { addUserToOrganization, getPendingInvitationsByEmail, getUserOrganizationsFromDb, upsertOrganization };
|
|
@@ -11,7 +11,7 @@ import { and, desc, eq } from "drizzle-orm";
|
|
|
11
11
|
* Queries Better Auth's member and organization tables
|
|
12
12
|
* Returns Date for createdAt (converted to string at API boundary)
|
|
13
13
|
*/
|
|
14
|
-
const
|
|
14
|
+
const getUserOrganizationsFromDb = (db) => async (userId) => {
|
|
15
15
|
return (await db.select({
|
|
16
16
|
id: member.id,
|
|
17
17
|
userId: member.userId,
|
|
@@ -72,4 +72,4 @@ const upsertOrganization = (db) => async (data) => {
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
//#endregion
|
|
75
|
-
export { addUserToOrganization, getPendingInvitationsByEmail,
|
|
75
|
+
export { addUserToOrganization, getPendingInvitationsByEmail, getUserOrganizationsFromDb, upsertOrganization };
|
|
@@ -813,13 +813,13 @@ declare const triggers: drizzle_orm_pg_core1434.PgTableWithColumns<{
|
|
|
813
813
|
algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
|
|
814
814
|
encoding: "hex" | "base64";
|
|
815
815
|
signature: {
|
|
816
|
-
source: "query" | "
|
|
816
|
+
source: "query" | "header" | "body";
|
|
817
817
|
key: string;
|
|
818
818
|
prefix?: string | undefined;
|
|
819
819
|
regex?: string | undefined;
|
|
820
820
|
};
|
|
821
821
|
signedComponents: {
|
|
822
|
-
source: "literal" | "
|
|
822
|
+
source: "literal" | "header" | "body";
|
|
823
823
|
required: boolean;
|
|
824
824
|
key?: string | undefined;
|
|
825
825
|
value?: string | undefined;
|
|
@@ -850,13 +850,13 @@ declare const triggers: drizzle_orm_pg_core1434.PgTableWithColumns<{
|
|
|
850
850
|
algorithm: "sha256" | "sha512" | "sha384" | "sha1" | "md5";
|
|
851
851
|
encoding: "hex" | "base64";
|
|
852
852
|
signature: {
|
|
853
|
-
source: "query" | "
|
|
853
|
+
source: "query" | "header" | "body";
|
|
854
854
|
key: string;
|
|
855
855
|
prefix?: string | undefined;
|
|
856
856
|
regex?: string | undefined;
|
|
857
857
|
};
|
|
858
858
|
signedComponents: {
|
|
859
|
-
source: "literal" | "
|
|
859
|
+
source: "literal" | "header" | "body";
|
|
860
860
|
required: boolean;
|
|
861
861
|
key?: string | undefined;
|
|
862
862
|
value?: string | undefined;
|