@inkeep/agents-core 0.0.0-dev-20260123205017 → 0.0.0-dev-20260123211824
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 +82 -82
- package/dist/auth/auth-validation-schemas.d.ts +129 -129
- package/dist/auth/auth.d.ts +6 -6
- 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/client-exports.d.ts +6 -6
- 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 +37 -37
- package/dist/data-access/manage/artifactComponents.d.ts +12 -12
- package/dist/data-access/manage/contextConfigs.d.ts +12 -12
- package/dist/data-access/manage/dataComponents.d.ts +6 -6
- package/dist/data-access/manage/functionTools.d.ts +18 -18
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +28 -28
- package/dist/data-access/manage/subAgentTeamAgentRelations.d.ts +18 -18
- package/dist/data-access/manage/subAgents.d.ts +27 -27
- package/dist/data-access/manage/tools.d.ts +30 -30
- package/dist/data-access/runtime/apiKeys.d.ts +16 -16
- package/dist/data-access/runtime/conversations.d.ts +20 -20
- package/dist/data-access/runtime/messages.d.ts +9 -9
- package/dist/data-access/runtime/organizations.d.ts +2 -2
- package/dist/data-access/runtime/organizations.js +2 -2
- package/dist/data-access/runtime/tasks.d.ts +4 -4
- package/dist/db/manage/manage-schema.d.ts +377 -377
- 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 +1479 -1479
- package/package.json +2 -1
- package/spicedb/schema.zed +114 -0
|
@@ -8,18 +8,15 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
8
8
|
scopes: AgentScopeConfig;
|
|
9
9
|
subAgentId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
name: string;
|
|
12
11
|
description: string | null;
|
|
13
|
-
|
|
14
|
-
createdAt: string;
|
|
15
|
-
updatedAt: string;
|
|
12
|
+
name: string;
|
|
16
13
|
tenantId: string;
|
|
17
14
|
projectId: string;
|
|
18
|
-
|
|
19
|
-
stepCountIs?: number | undefined;
|
|
20
|
-
} | null;
|
|
15
|
+
id: string;
|
|
21
16
|
prompt: string | null;
|
|
22
|
-
|
|
17
|
+
agentId: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
updatedAt: string;
|
|
23
20
|
models: {
|
|
24
21
|
base?: {
|
|
25
22
|
model?: string | undefined;
|
|
@@ -34,23 +31,23 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
34
31
|
providerOptions?: Record<string, any> | undefined;
|
|
35
32
|
} | undefined;
|
|
36
33
|
} | null;
|
|
37
|
-
|
|
34
|
+
stopWhen: {
|
|
35
|
+
stepCountIs?: number | undefined;
|
|
36
|
+
} | null;
|
|
37
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
38
38
|
} | undefined>;
|
|
39
39
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
40
40
|
scopes: AgentScopeConfig;
|
|
41
41
|
}) => Promise<{
|
|
42
|
-
name: string;
|
|
43
42
|
description: string | null;
|
|
44
|
-
|
|
45
|
-
createdAt: string;
|
|
46
|
-
updatedAt: string;
|
|
43
|
+
name: string;
|
|
47
44
|
tenantId: string;
|
|
48
45
|
projectId: string;
|
|
49
|
-
|
|
50
|
-
stepCountIs?: number | undefined;
|
|
51
|
-
} | null;
|
|
46
|
+
id: string;
|
|
52
47
|
prompt: string | null;
|
|
53
|
-
|
|
48
|
+
agentId: string;
|
|
49
|
+
createdAt: string;
|
|
50
|
+
updatedAt: string;
|
|
54
51
|
models: {
|
|
55
52
|
base?: {
|
|
56
53
|
model?: string | undefined;
|
|
@@ -65,7 +62,10 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
65
62
|
providerOptions?: Record<string, any> | undefined;
|
|
66
63
|
} | undefined;
|
|
67
64
|
} | null;
|
|
68
|
-
|
|
65
|
+
stopWhen: {
|
|
66
|
+
stepCountIs?: number | undefined;
|
|
67
|
+
} | null;
|
|
68
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
69
69
|
}[]>;
|
|
70
70
|
declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
71
71
|
scopes: AgentScopeConfig;
|
|
@@ -108,18 +108,15 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
|
|
|
108
108
|
};
|
|
109
109
|
}>;
|
|
110
110
|
declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
|
|
111
|
-
name: string;
|
|
112
111
|
description: string | null;
|
|
113
|
-
|
|
114
|
-
createdAt: string;
|
|
115
|
-
updatedAt: string;
|
|
112
|
+
name: string;
|
|
116
113
|
tenantId: string;
|
|
117
114
|
projectId: string;
|
|
118
|
-
|
|
119
|
-
stepCountIs?: number | undefined;
|
|
120
|
-
} | null;
|
|
115
|
+
id: string;
|
|
121
116
|
prompt: string | null;
|
|
122
|
-
|
|
117
|
+
agentId: string;
|
|
118
|
+
createdAt: string;
|
|
119
|
+
updatedAt: string;
|
|
123
120
|
models: {
|
|
124
121
|
base?: {
|
|
125
122
|
model?: string | undefined;
|
|
@@ -134,7 +131,10 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
134
131
|
providerOptions?: Record<string, any> | undefined;
|
|
135
132
|
} | undefined;
|
|
136
133
|
} | null;
|
|
137
|
-
|
|
134
|
+
stopWhen: {
|
|
135
|
+
stepCountIs?: number | undefined;
|
|
136
|
+
} | null;
|
|
137
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
138
138
|
}>;
|
|
139
139
|
declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
140
140
|
scopes: AgentScopeConfig;
|
|
@@ -12,19 +12,19 @@ declare const getToolById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
12
12
|
scopes: ProjectScopeConfig;
|
|
13
13
|
toolId: string;
|
|
14
14
|
}) => Promise<{
|
|
15
|
-
name: string;
|
|
16
15
|
description: string | null;
|
|
17
|
-
|
|
18
|
-
createdAt: string;
|
|
19
|
-
updatedAt: string;
|
|
20
|
-
headers: Record<string, string> | null;
|
|
16
|
+
name: string;
|
|
21
17
|
tenantId: string;
|
|
22
18
|
projectId: string;
|
|
19
|
+
id: string;
|
|
23
20
|
config: {
|
|
24
21
|
type: "mcp";
|
|
25
22
|
mcp: ToolMcpConfig;
|
|
26
23
|
};
|
|
27
24
|
credentialReferenceId: string | null;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
headers: Record<string, string> | null;
|
|
28
28
|
credentialScope: string;
|
|
29
29
|
imageUrl: string | null;
|
|
30
30
|
capabilities: ToolServerCapabilities | null;
|
|
@@ -68,19 +68,19 @@ declare const listTools: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
68
68
|
};
|
|
69
69
|
}>;
|
|
70
70
|
declare const createTool: (db: AgentsManageDatabaseClient) => (params: ToolInsert) => Promise<{
|
|
71
|
-
name: string;
|
|
72
71
|
description: string | null;
|
|
73
|
-
|
|
74
|
-
createdAt: string;
|
|
75
|
-
updatedAt: string;
|
|
76
|
-
headers: Record<string, string> | null;
|
|
72
|
+
name: string;
|
|
77
73
|
tenantId: string;
|
|
78
74
|
projectId: string;
|
|
75
|
+
id: string;
|
|
79
76
|
config: {
|
|
80
77
|
type: "mcp";
|
|
81
78
|
mcp: ToolMcpConfig;
|
|
82
79
|
};
|
|
83
80
|
credentialReferenceId: string | null;
|
|
81
|
+
createdAt: string;
|
|
82
|
+
updatedAt: string;
|
|
83
|
+
headers: Record<string, string> | null;
|
|
84
84
|
credentialScope: string;
|
|
85
85
|
imageUrl: string | null;
|
|
86
86
|
capabilities: ToolServerCapabilities | null;
|
|
@@ -123,18 +123,18 @@ declare const addToolToAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
123
123
|
needsApproval?: boolean;
|
|
124
124
|
}> | null;
|
|
125
125
|
}) => Promise<{
|
|
126
|
-
id: string;
|
|
127
|
-
createdAt: string;
|
|
128
|
-
updatedAt: string;
|
|
129
|
-
headers: Record<string, string> | null;
|
|
130
126
|
tenantId: string;
|
|
131
127
|
projectId: string;
|
|
132
|
-
|
|
128
|
+
id: string;
|
|
133
129
|
agentId: string;
|
|
130
|
+
createdAt: string;
|
|
131
|
+
updatedAt: string;
|
|
134
132
|
toolId: string;
|
|
133
|
+
headers: Record<string, string> | null;
|
|
135
134
|
toolPolicies: Record<string, {
|
|
136
135
|
needsApproval?: boolean;
|
|
137
136
|
}> | null;
|
|
137
|
+
subAgentId: string;
|
|
138
138
|
selectedTools: string[] | null;
|
|
139
139
|
}>;
|
|
140
140
|
declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -142,18 +142,18 @@ declare const removeToolFromAgent: (db: AgentsManageDatabaseClient) => (params:
|
|
|
142
142
|
subAgentId: string;
|
|
143
143
|
toolId: string;
|
|
144
144
|
}) => Promise<{
|
|
145
|
-
id: string;
|
|
146
|
-
createdAt: string;
|
|
147
|
-
updatedAt: string;
|
|
148
|
-
headers: Record<string, string> | null;
|
|
149
145
|
tenantId: string;
|
|
150
146
|
projectId: string;
|
|
151
|
-
|
|
147
|
+
id: string;
|
|
152
148
|
agentId: string;
|
|
149
|
+
createdAt: string;
|
|
150
|
+
updatedAt: string;
|
|
153
151
|
toolId: string;
|
|
152
|
+
headers: Record<string, string> | null;
|
|
154
153
|
toolPolicies: Record<string, {
|
|
155
154
|
needsApproval?: boolean;
|
|
156
155
|
}> | null;
|
|
156
|
+
subAgentId: string;
|
|
157
157
|
selectedTools: string[] | null;
|
|
158
158
|
}>;
|
|
159
159
|
/**
|
|
@@ -170,18 +170,18 @@ declare const upsertSubAgentToolRelation: (db: AgentsManageDatabaseClient) => (p
|
|
|
170
170
|
}> | null;
|
|
171
171
|
relationId?: string;
|
|
172
172
|
}) => Promise<{
|
|
173
|
-
id: string;
|
|
174
|
-
createdAt: string;
|
|
175
|
-
updatedAt: string;
|
|
176
|
-
headers: Record<string, string> | null;
|
|
177
173
|
tenantId: string;
|
|
178
174
|
projectId: string;
|
|
179
|
-
|
|
175
|
+
id: string;
|
|
180
176
|
agentId: string;
|
|
177
|
+
createdAt: string;
|
|
178
|
+
updatedAt: string;
|
|
181
179
|
toolId: string;
|
|
180
|
+
headers: Record<string, string> | null;
|
|
182
181
|
toolPolicies: Record<string, {
|
|
183
182
|
needsApproval?: boolean;
|
|
184
183
|
}> | null;
|
|
184
|
+
subAgentId: string;
|
|
185
185
|
selectedTools: string[] | null;
|
|
186
186
|
}>;
|
|
187
187
|
/**
|
|
@@ -190,19 +190,19 @@ 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
193
|
description: string | null;
|
|
195
|
-
|
|
196
|
-
createdAt: string;
|
|
197
|
-
updatedAt: string;
|
|
198
|
-
headers: Record<string, string> | null;
|
|
194
|
+
name: string;
|
|
199
195
|
tenantId: string;
|
|
200
196
|
projectId: string;
|
|
197
|
+
id: string;
|
|
201
198
|
config: {
|
|
202
199
|
type: "mcp";
|
|
203
200
|
mcp: ToolMcpConfig;
|
|
204
201
|
};
|
|
205
202
|
credentialReferenceId: string | null;
|
|
203
|
+
createdAt: string;
|
|
204
|
+
updatedAt: string;
|
|
205
|
+
headers: Record<string, string> | null;
|
|
206
206
|
credentialScope: string;
|
|
207
207
|
imageUrl: string | null;
|
|
208
208
|
capabilities: ToolServerCapabilities | null;
|
|
@@ -8,48 +8,48 @@ declare const getApiKeyById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
8
8
|
id: string;
|
|
9
9
|
}) => Promise<{
|
|
10
10
|
name: string | null;
|
|
11
|
-
id: string;
|
|
12
|
-
createdAt: string;
|
|
13
|
-
updatedAt: string;
|
|
14
|
-
expiresAt: string | null;
|
|
15
11
|
tenantId: string;
|
|
16
12
|
projectId: string;
|
|
13
|
+
id: string;
|
|
17
14
|
agentId: string;
|
|
18
15
|
publicId: string;
|
|
19
16
|
keyHash: string;
|
|
20
17
|
keyPrefix: string;
|
|
21
18
|
lastUsedAt: string | null;
|
|
19
|
+
expiresAt: string | null;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
updatedAt: string;
|
|
22
22
|
} | undefined>;
|
|
23
23
|
declare const getApiKeyByPublicId: (db: AgentsRunDatabaseClient) => (publicId: string) => Promise<{
|
|
24
24
|
name: string | null;
|
|
25
|
-
id: string;
|
|
26
|
-
createdAt: string;
|
|
27
|
-
updatedAt: string;
|
|
28
|
-
expiresAt: string | null;
|
|
29
25
|
tenantId: string;
|
|
30
26
|
projectId: string;
|
|
27
|
+
id: string;
|
|
31
28
|
agentId: string;
|
|
32
29
|
publicId: string;
|
|
33
30
|
keyHash: string;
|
|
34
31
|
keyPrefix: string;
|
|
35
32
|
lastUsedAt: string | null;
|
|
33
|
+
expiresAt: string | null;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
updatedAt: string;
|
|
36
36
|
} | undefined>;
|
|
37
37
|
declare const listApiKeys: (db: AgentsRunDatabaseClient) => (params: {
|
|
38
38
|
scopes: ProjectScopeConfig;
|
|
39
39
|
agentId?: string;
|
|
40
40
|
}) => Promise<{
|
|
41
41
|
name: string | null;
|
|
42
|
-
id: string;
|
|
43
|
-
createdAt: string;
|
|
44
|
-
updatedAt: string;
|
|
45
|
-
expiresAt: string | null;
|
|
46
42
|
tenantId: string;
|
|
47
43
|
projectId: string;
|
|
44
|
+
id: string;
|
|
48
45
|
agentId: string;
|
|
49
46
|
publicId: string;
|
|
50
47
|
keyHash: string;
|
|
51
48
|
keyPrefix: string;
|
|
52
49
|
lastUsedAt: string | null;
|
|
50
|
+
expiresAt: string | null;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
updatedAt: string;
|
|
53
53
|
}[]>;
|
|
54
54
|
declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
55
55
|
scopes: ProjectScopeConfig;
|
|
@@ -66,17 +66,17 @@ declare const listApiKeysPaginated: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
66
66
|
}>;
|
|
67
67
|
declare const createApiKey: (db: AgentsRunDatabaseClient) => (params: ApiKeyInsert) => Promise<{
|
|
68
68
|
name: string | null;
|
|
69
|
-
id: string;
|
|
70
|
-
createdAt: string;
|
|
71
|
-
updatedAt: string;
|
|
72
|
-
expiresAt: string | null;
|
|
73
69
|
tenantId: string;
|
|
74
70
|
projectId: string;
|
|
71
|
+
id: string;
|
|
75
72
|
agentId: string;
|
|
76
73
|
publicId: string;
|
|
77
74
|
keyHash: string;
|
|
78
75
|
keyPrefix: string;
|
|
79
76
|
lastUsedAt: string | null;
|
|
77
|
+
expiresAt: string | null;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
updatedAt: string;
|
|
80
80
|
}>;
|
|
81
81
|
declare const updateApiKey: (db: AgentsRunDatabaseClient) => (params: {
|
|
82
82
|
scopes: ProjectScopeConfig;
|
|
@@ -16,19 +16,19 @@ declare const listConversations: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
16
16
|
}>;
|
|
17
17
|
declare const createConversation: (db: AgentsRunDatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
18
18
|
title: string | null;
|
|
19
|
+
tenantId: string;
|
|
20
|
+
projectId: string;
|
|
19
21
|
id: string;
|
|
22
|
+
agentId: string | null;
|
|
20
23
|
createdAt: string;
|
|
21
24
|
updatedAt: string;
|
|
25
|
+
userId: string | null;
|
|
26
|
+
metadata: ConversationMetadata | null;
|
|
22
27
|
ref: {
|
|
23
28
|
type: "commit" | "tag" | "branch";
|
|
24
29
|
name: string;
|
|
25
30
|
hash: string;
|
|
26
31
|
} | null;
|
|
27
|
-
userId: string | null;
|
|
28
|
-
metadata: ConversationMetadata | null;
|
|
29
|
-
tenantId: string;
|
|
30
|
-
projectId: string;
|
|
31
|
-
agentId: string | null;
|
|
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
|
title: string | null;
|
|
88
|
+
tenantId: string;
|
|
89
|
+
projectId: string;
|
|
88
90
|
id: string;
|
|
91
|
+
agentId: string | null;
|
|
89
92
|
createdAt: string;
|
|
90
93
|
updatedAt: string;
|
|
94
|
+
userId: string | null;
|
|
95
|
+
metadata: ConversationMetadata | null;
|
|
91
96
|
ref: {
|
|
92
97
|
type: "commit" | "tag" | "branch";
|
|
93
98
|
name: string;
|
|
94
99
|
hash: string;
|
|
95
100
|
} | null;
|
|
96
|
-
userId: string | null;
|
|
97
|
-
metadata: ConversationMetadata | null;
|
|
98
|
-
tenantId: string;
|
|
99
|
-
projectId: string;
|
|
100
|
-
agentId: string | null;
|
|
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
|
title: string | null;
|
|
124
|
+
tenantId: string;
|
|
125
|
+
projectId: string;
|
|
124
126
|
id: string;
|
|
127
|
+
agentId: string | null;
|
|
125
128
|
createdAt: string;
|
|
126
129
|
updatedAt: string;
|
|
130
|
+
userId: string | null;
|
|
131
|
+
metadata: ConversationMetadata | null;
|
|
127
132
|
ref: {
|
|
128
133
|
type: "commit" | "tag" | "branch";
|
|
129
134
|
name: string;
|
|
130
135
|
hash: string;
|
|
131
136
|
} | null;
|
|
132
|
-
userId: string | null;
|
|
133
|
-
metadata: ConversationMetadata | null;
|
|
134
|
-
tenantId: string;
|
|
135
|
-
projectId: string;
|
|
136
|
-
agentId: string | null;
|
|
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
|
title: string | null;
|
|
156
|
+
tenantId: string;
|
|
157
|
+
projectId: string;
|
|
156
158
|
id: string;
|
|
159
|
+
agentId: string | null;
|
|
157
160
|
createdAt: string;
|
|
158
161
|
updatedAt: string;
|
|
162
|
+
userId: string | null;
|
|
163
|
+
metadata: ConversationMetadata | null;
|
|
159
164
|
ref: {
|
|
160
165
|
type: "commit" | "tag" | "branch";
|
|
161
166
|
name: string;
|
|
162
167
|
hash: string;
|
|
163
168
|
} | null;
|
|
164
|
-
userId: string | null;
|
|
165
|
-
metadata: ConversationMetadata | null;
|
|
166
|
-
tenantId: string;
|
|
167
|
-
projectId: string;
|
|
168
|
-
agentId: string | null;
|
|
169
169
|
activeSubAgentId: string;
|
|
170
170
|
lastContextResolution: string | null;
|
|
171
171
|
} | undefined>;
|
|
@@ -9,14 +9,14 @@ declare const getMessageById: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
9
9
|
scopes: ProjectScopeConfig;
|
|
10
10
|
messageId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
+
tenantId: string;
|
|
13
|
+
projectId: string;
|
|
12
14
|
id: string;
|
|
13
15
|
createdAt: string;
|
|
14
16
|
updatedAt: string;
|
|
15
17
|
metadata: MessageMetadata | null;
|
|
16
|
-
role: string;
|
|
17
18
|
content: MessageContent;
|
|
18
|
-
|
|
19
|
-
projectId: string;
|
|
19
|
+
role: string;
|
|
20
20
|
fromSubAgentId: string | null;
|
|
21
21
|
toSubAgentId: string | null;
|
|
22
22
|
fromExternalAgentId: string | null;
|
|
@@ -140,14 +140,14 @@ declare const getVisibleMessages: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
140
140
|
id: string;
|
|
141
141
|
}[]>;
|
|
142
142
|
declare const createMessage: (db: AgentsRunDatabaseClient) => (params: MessageInsert) => Promise<{
|
|
143
|
+
tenantId: string;
|
|
144
|
+
projectId: string;
|
|
143
145
|
id: string;
|
|
144
146
|
createdAt: string;
|
|
145
147
|
updatedAt: string;
|
|
146
148
|
metadata: MessageMetadata | null;
|
|
147
|
-
role: string;
|
|
148
149
|
content: MessageContent;
|
|
149
|
-
|
|
150
|
-
projectId: string;
|
|
150
|
+
role: string;
|
|
151
151
|
fromSubAgentId: string | null;
|
|
152
152
|
toSubAgentId: string | null;
|
|
153
153
|
fromExternalAgentId: string | null;
|
|
@@ -193,14 +193,14 @@ declare const deleteMessage: (db: AgentsRunDatabaseClient) => (params: {
|
|
|
193
193
|
scopes: ProjectScopeConfig;
|
|
194
194
|
messageId: string;
|
|
195
195
|
}) => Promise<{
|
|
196
|
+
tenantId: string;
|
|
197
|
+
projectId: string;
|
|
196
198
|
id: string;
|
|
197
199
|
createdAt: string;
|
|
198
200
|
updatedAt: string;
|
|
199
201
|
metadata: MessageMetadata | null;
|
|
200
|
-
role: string;
|
|
201
202
|
content: MessageContent;
|
|
202
|
-
|
|
203
|
-
projectId: string;
|
|
203
|
+
role: string;
|
|
204
204
|
fromSubAgentId: string | null;
|
|
205
205
|
toSubAgentId: string | null;
|
|
206
206
|
fromExternalAgentId: 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 };
|
|
@@ -6,20 +6,20 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
|
|
|
6
6
|
|
|
7
7
|
//#region src/data-access/runtime/tasks.d.ts
|
|
8
8
|
declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
|
|
9
|
+
tenantId: string;
|
|
10
|
+
projectId: string;
|
|
9
11
|
id: string;
|
|
12
|
+
agentId: string;
|
|
10
13
|
createdAt: string;
|
|
11
14
|
updatedAt: string;
|
|
15
|
+
metadata: TaskMetadataConfig | null;
|
|
12
16
|
ref: {
|
|
13
17
|
type: "commit" | "tag" | "branch";
|
|
14
18
|
name: string;
|
|
15
19
|
hash: string;
|
|
16
20
|
} | null;
|
|
17
|
-
metadata: TaskMetadataConfig | null;
|
|
18
21
|
status: string;
|
|
19
|
-
tenantId: string;
|
|
20
|
-
projectId: string;
|
|
21
22
|
subAgentId: string;
|
|
22
|
-
agentId: string;
|
|
23
23
|
contextId: string;
|
|
24
24
|
}>;
|
|
25
25
|
declare const getTask: (db: AgentsRunDatabaseClient) => (params: {
|