@inkeep/agents-core 0.58.21 → 0.59.1
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-config-utils.d.ts +49 -0
- package/dist/auth/auth-config-utils.js +133 -0
- package/dist/auth/auth-schema.d.ts +102 -85
- package/dist/auth/auth-schema.js +1 -0
- package/dist/auth/auth-types.d.ts +170 -0
- package/dist/auth/auth-types.js +53 -0
- package/dist/auth/auth-validation-schemas.d.ts +169 -135
- package/dist/auth/auth.d.ts +43 -1286
- package/dist/auth/auth.js +61 -70
- package/dist/auth/email-send-status-store.js +15 -3
- package/dist/auth/init.js +2 -1
- package/dist/auth/password-reset-link-store.js +8 -1
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +2 -2
- package/dist/client-exports.js +2 -2
- package/dist/constants/{allowed-image-formats.d.ts → allowed-file-formats.d.ts} +4 -3
- package/dist/constants/{allowed-image-formats.js → allowed-file-formats.js} +13 -10
- package/dist/credential-stores/composio-store.d.ts +28 -0
- package/dist/credential-stores/composio-store.js +53 -0
- package/dist/credential-stores/default-constants.d.ts +2 -1
- package/dist/credential-stores/default-constants.js +2 -1
- package/dist/credential-stores/defaults.js +3 -1
- package/dist/credential-stores/index.d.ts +3 -2
- package/dist/credential-stores/index.js +3 -2
- package/dist/data-access/index.d.ts +5 -4
- package/dist/data-access/index.js +4 -4
- package/dist/data-access/manage/agents.d.ts +30 -30
- package/dist/data-access/manage/artifactComponents.d.ts +10 -10
- 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 +19 -19
- package/dist/data-access/manage/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/manage/subAgentRelations.d.ts +22 -22
- 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 +30 -30
- package/dist/data-access/manage/tools.js +17 -5
- 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 +12 -12
- package/dist/data-access/runtime/auth.d.ts +9 -9
- package/dist/data-access/runtime/auth.js +19 -21
- package/dist/data-access/runtime/conversations.d.ts +24 -24
- package/dist/data-access/runtime/messages.d.ts +12 -12
- package/dist/data-access/runtime/organizations.d.ts +28 -4
- package/dist/data-access/runtime/organizations.js +131 -9
- package/dist/data-access/runtime/scheduledTriggerInvocations.d.ts +10 -1
- package/dist/data-access/runtime/scheduledTriggerInvocations.js +13 -1
- package/dist/data-access/runtime/tasks.d.ts +5 -5
- package/dist/db/manage/manage-schema.d.ts +359 -359
- package/dist/db/runtime/runtime-schema.d.ts +298 -298
- package/dist/index.d.ts +8 -6
- package/dist/index.js +8 -7
- package/dist/types/utility.d.ts +1 -0
- package/dist/types/utility.js +2 -1
- package/dist/utils/credential-store-utils.js +1 -0
- package/dist/utils/error.d.ts +51 -48
- package/dist/utils/error.js +3 -0
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +4 -4
- package/dist/utils/third-party-mcp-servers/composio-client.d.ts +20 -4
- package/dist/utils/third-party-mcp-servers/composio-client.js +51 -25
- package/dist/utils/third-party-mcp-servers/index.d.ts +2 -2
- package/dist/utils/third-party-mcp-servers/index.js +2 -2
- package/dist/utils/third-party-mcp-servers/third-party-check.d.ts +3 -4
- package/dist/utils/third-party-mcp-servers/third-party-check.js +1 -2
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +2026 -2005
- package/dist/validation/schemas.js +3 -1
- package/drizzle/runtime/0023_lazy_energizer.sql +1 -0
- package/drizzle/runtime/0024_moaning_kingpin.sql +1 -0
- package/drizzle/runtime/meta/0024_snapshot.json +4270 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +11 -6
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { account, invitation, member, organization } from "../../auth/auth-schema.js";
|
|
1
|
+
import { account, invitation, member, organization, ssoProvider, user } from "../../auth/auth-schema.js";
|
|
2
|
+
import { parseAllowedAuthMethods } from "../../auth/auth-types.js";
|
|
2
3
|
import { and, desc, eq, inArray, or } from "drizzle-orm";
|
|
3
4
|
import { generateId } from "better-auth";
|
|
4
5
|
|
|
@@ -51,7 +52,10 @@ const getPendingInvitationsByEmail = (db) => async (email) => {
|
|
|
51
52
|
*/
|
|
52
53
|
const addUserToOrganization = (db) => async (data) => {
|
|
53
54
|
if ((await db.select().from(organization).where(eq(organization.id, data.organizationId)).limit(1)).length === 0) throw new Error(`Organization ${data.organizationId} does not exist`);
|
|
54
|
-
if ((await db.select().from(member).where(and(eq(member.userId, data.userId), eq(member.organizationId, data.organizationId))).limit(1)).length > 0)
|
|
55
|
+
if ((await db.select().from(member).where(and(eq(member.userId, data.userId), eq(member.organizationId, data.organizationId))).limit(1)).length > 0) {
|
|
56
|
+
if (data.isServiceAccount) await db.update(organization).set({ serviceAccountUserId: data.userId }).where(eq(organization.id, data.organizationId));
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
55
59
|
await db.insert(member).values({
|
|
56
60
|
id: `${data.userId}_${data.organizationId}`,
|
|
57
61
|
userId: data.userId,
|
|
@@ -59,6 +63,7 @@ const addUserToOrganization = (db) => async (data) => {
|
|
|
59
63
|
role: data.role,
|
|
60
64
|
createdAt: /* @__PURE__ */ new Date()
|
|
61
65
|
});
|
|
66
|
+
if (data.isServiceAccount) await db.update(organization).set({ serviceAccountUserId: data.userId }).where(eq(organization.id, data.organizationId));
|
|
62
67
|
};
|
|
63
68
|
const upsertOrganization = (db) => async (data) => {
|
|
64
69
|
if ((await db.select().from(organization).where(or(eq(organization.id, data.organizationId), eq(organization.slug, data.slug))).limit(1)).length > 0) return { created: false };
|
|
@@ -74,7 +79,7 @@ const upsertOrganization = (db) => async (data) => {
|
|
|
74
79
|
};
|
|
75
80
|
/**
|
|
76
81
|
* Get authentication providers for a list of users.
|
|
77
|
-
* Returns which providers each user has linked (e.g., 'credential', 'google'
|
|
82
|
+
* Returns which providers each user has linked (e.g., 'credential', 'google').
|
|
78
83
|
*/
|
|
79
84
|
const getUserProvidersFromDb = (db) => async (userIds) => {
|
|
80
85
|
if (userIds.length === 0) return [];
|
|
@@ -93,17 +98,23 @@ const getUserProvidersFromDb = (db) => async (userIds) => {
|
|
|
93
98
|
providers: providerMap.get(userId) || []
|
|
94
99
|
}));
|
|
95
100
|
};
|
|
101
|
+
const getAllowedAuthMethods = (db) => async (organizationId) => {
|
|
102
|
+
const org = (await db.select({ allowedAuthMethods: organization.allowedAuthMethods }).from(organization).where(eq(organization.id, organizationId)).limit(1))[0];
|
|
103
|
+
if (!org) return [{ method: "email-password" }];
|
|
104
|
+
return parseAllowedAuthMethods(org.allowedAuthMethods);
|
|
105
|
+
};
|
|
96
106
|
/**
|
|
97
|
-
* Create an invitation directly in db
|
|
98
|
-
*
|
|
107
|
+
* Create an invitation directly in db.
|
|
108
|
+
* Accepts an optional explicit authMethod; defaults to email-password.
|
|
99
109
|
*/
|
|
100
110
|
const createInvitationInDb = (db) => async (data) => {
|
|
101
111
|
const orgSettings = (await db.select({
|
|
102
112
|
serviceAccountUserId: organization.serviceAccountUserId,
|
|
113
|
+
allowedAuthMethods: organization.allowedAuthMethods,
|
|
103
114
|
preferredAuthMethod: organization.preferredAuthMethod
|
|
104
115
|
}).from(organization).where(eq(organization.id, data.organizationId)).limit(1))[0];
|
|
105
116
|
if (!orgSettings?.serviceAccountUserId) throw new Error(`Organization ${data.organizationId} does not have a serviceAccountUserId configured`);
|
|
106
|
-
|
|
117
|
+
const resolvedMethod = data.authMethod || orgSettings.preferredAuthMethod || "email-password";
|
|
107
118
|
const inviteId = generateId();
|
|
108
119
|
const expiresAt = new Date(Date.now() + 3600 * 1e3);
|
|
109
120
|
await db.insert(invitation).values({
|
|
@@ -114,13 +125,124 @@ const createInvitationInDb = (db) => async (data) => {
|
|
|
114
125
|
status: "pending",
|
|
115
126
|
expiresAt,
|
|
116
127
|
inviterId: orgSettings.serviceAccountUserId,
|
|
117
|
-
authMethod:
|
|
128
|
+
authMethod: resolvedMethod
|
|
118
129
|
});
|
|
119
130
|
return {
|
|
120
131
|
id: inviteId,
|
|
121
|
-
authMethod:
|
|
132
|
+
authMethod: resolvedMethod
|
|
122
133
|
};
|
|
123
134
|
};
|
|
135
|
+
const getSSOProvidersByDomain = (db) => async (domain) => {
|
|
136
|
+
return (await db.select({
|
|
137
|
+
providerId: ssoProvider.providerId,
|
|
138
|
+
issuer: ssoProvider.issuer,
|
|
139
|
+
domain: ssoProvider.domain,
|
|
140
|
+
organizationId: ssoProvider.organizationId,
|
|
141
|
+
oidcConfig: ssoProvider.oidcConfig,
|
|
142
|
+
samlConfig: ssoProvider.samlConfig
|
|
143
|
+
}).from(ssoProvider).where(eq(ssoProvider.domain, domain))).map((provider) => ({
|
|
144
|
+
providerId: provider.providerId,
|
|
145
|
+
issuer: provider.issuer,
|
|
146
|
+
domain: provider.domain,
|
|
147
|
+
organizationId: provider.organizationId,
|
|
148
|
+
providerType: provider.samlConfig ? "saml" : "oidc"
|
|
149
|
+
}));
|
|
150
|
+
};
|
|
151
|
+
/**
|
|
152
|
+
* Filters org-allowed auth methods by email domain.
|
|
153
|
+
* SSO providers are only included if their domain matches the user's email domain.
|
|
154
|
+
* Non-SSO methods (email-password, google) pass through unfiltered.
|
|
155
|
+
*/
|
|
156
|
+
const getFilteredAuthMethodsForEmail = (db) => async (organizationId, email) => {
|
|
157
|
+
const emailDomain = email.split("@")[1]?.toLowerCase();
|
|
158
|
+
if (!emailDomain) return [];
|
|
159
|
+
const [allowed, domainProviders] = await Promise.all([getAllowedAuthMethods(db)(organizationId), getSSOProvidersByDomain(db)(emailDomain)]);
|
|
160
|
+
return allowedMethodsToMethodOptions(allowed, domainProviders.filter((p) => p.organizationId === organizationId));
|
|
161
|
+
};
|
|
162
|
+
function allowedMethodsToMethodOptions(methods, ssoProviders) {
|
|
163
|
+
const options = [];
|
|
164
|
+
for (const m of methods) if (m.method === "email-password") options.push({ method: "email-password" });
|
|
165
|
+
else if (m.method === "google") options.push({ method: "google" });
|
|
166
|
+
else if (m.method === "sso") {
|
|
167
|
+
if (!m.enabled) continue;
|
|
168
|
+
const provider = ssoProviders.find((p) => p.providerId === m.providerId);
|
|
169
|
+
if (!provider) continue;
|
|
170
|
+
options.push({
|
|
171
|
+
method: "sso",
|
|
172
|
+
providerId: m.providerId,
|
|
173
|
+
providerType: provider.providerType,
|
|
174
|
+
displayName: m.displayName
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
return options;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Main auth-lookup query for the login flow.
|
|
181
|
+
* Returns org-grouped methods based on SSO domain match and/or user org membership.
|
|
182
|
+
*/
|
|
183
|
+
const getAuthLookupForEmail = (db) => async (email) => {
|
|
184
|
+
const emailDomain = email.split("@")[1]?.toLowerCase();
|
|
185
|
+
if (!emailDomain) return [];
|
|
186
|
+
const orgMap = /* @__PURE__ */ new Map();
|
|
187
|
+
const domainProviders = await getSSOProvidersByDomain(db)(emailDomain);
|
|
188
|
+
const orgIdsFromSSO = [...new Set(domainProviders.map((p) => p.organizationId).filter(Boolean))];
|
|
189
|
+
for (const orgId of orgIdsFromSSO) {
|
|
190
|
+
const org = (await db.select({
|
|
191
|
+
id: organization.id,
|
|
192
|
+
name: organization.name,
|
|
193
|
+
slug: organization.slug,
|
|
194
|
+
allowedAuthMethods: organization.allowedAuthMethods,
|
|
195
|
+
preferredAuthMethod: organization.preferredAuthMethod
|
|
196
|
+
}).from(organization).where(eq(organization.id, orgId)).limit(1))[0];
|
|
197
|
+
if (!org) continue;
|
|
198
|
+
const allowed = parseAllowedAuthMethods(org.allowedAuthMethods);
|
|
199
|
+
const orgSSO = domainProviders.filter((p) => p.organizationId === orgId);
|
|
200
|
+
orgMap.set(orgId, {
|
|
201
|
+
organizationId: org.id,
|
|
202
|
+
organizationName: org.name,
|
|
203
|
+
organizationSlug: org.slug,
|
|
204
|
+
methods: allowedMethodsToMethodOptions(allowed, orgSSO)
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
const userRow = await db.select({ id: user.id }).from(user).where(eq(user.email, email.toLowerCase())).limit(1);
|
|
208
|
+
if (userRow[0]) {
|
|
209
|
+
const memberships = await db.select({
|
|
210
|
+
organizationId: member.organizationId,
|
|
211
|
+
orgName: organization.name,
|
|
212
|
+
orgSlug: organization.slug,
|
|
213
|
+
allowedAuthMethods: organization.allowedAuthMethods,
|
|
214
|
+
preferredAuthMethod: organization.preferredAuthMethod
|
|
215
|
+
}).from(member).innerJoin(organization, eq(member.organizationId, organization.id)).where(eq(member.userId, userRow[0].id));
|
|
216
|
+
for (const m of memberships) {
|
|
217
|
+
if (orgMap.has(m.organizationId)) continue;
|
|
218
|
+
const allowed = parseAllowedAuthMethods(m.allowedAuthMethods);
|
|
219
|
+
const orgSSO = domainProviders.filter((p) => p.organizationId === m.organizationId);
|
|
220
|
+
orgMap.set(m.organizationId, {
|
|
221
|
+
organizationId: m.organizationId,
|
|
222
|
+
organizationName: m.orgName,
|
|
223
|
+
organizationSlug: m.orgSlug,
|
|
224
|
+
methods: allowedMethodsToMethodOptions(allowed, orgSSO)
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
const serviceAccountOrgs = await db.select({
|
|
228
|
+
id: organization.id,
|
|
229
|
+
name: organization.name,
|
|
230
|
+
slug: organization.slug
|
|
231
|
+
}).from(organization).where(eq(organization.serviceAccountUserId, userRow[0].id));
|
|
232
|
+
for (const org of serviceAccountOrgs) {
|
|
233
|
+
const existing = orgMap.get(org.id);
|
|
234
|
+
if (existing) {
|
|
235
|
+
if (!existing.methods.some((m) => m.method === "email-password")) existing.methods.unshift({ method: "email-password" });
|
|
236
|
+
} else orgMap.set(org.id, {
|
|
237
|
+
organizationId: org.id,
|
|
238
|
+
organizationName: org.name,
|
|
239
|
+
organizationSlug: org.slug,
|
|
240
|
+
methods: [{ method: "email-password" }]
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return [...orgMap.values()];
|
|
245
|
+
};
|
|
124
246
|
|
|
125
247
|
//#endregion
|
|
126
|
-
export { addUserToOrganization, createInvitationInDb, getPendingInvitationsByEmail, getUserOrganizationsFromDb, getUserProvidersFromDb, upsertOrganization };
|
|
248
|
+
export { addUserToOrganization, allowedMethodsToMethodOptions, createInvitationInDb, getAllowedAuthMethods, getAuthLookupForEmail, getFilteredAuthMethodsForEmail, getPendingInvitationsByEmail, getSSOProvidersByDomain, getUserOrganizationsFromDb, getUserProvidersFromDb, upsertOrganization };
|
|
@@ -116,6 +116,15 @@ declare const markScheduledTriggerInvocationFailed: (db: AgentsRunDatabaseClient
|
|
|
116
116
|
scheduledTriggerId: string;
|
|
117
117
|
invocationId: string;
|
|
118
118
|
}) => Promise<ScheduledTriggerInvocation | undefined>;
|
|
119
|
+
/**
|
|
120
|
+
* Reset a cancelled invocation back to pending.
|
|
121
|
+
* Only updates if the current status is 'cancelled' to prevent race conditions.
|
|
122
|
+
*/
|
|
123
|
+
declare const resetCancelledInvocationToPending: (db: AgentsRunDatabaseClient) => (params: {
|
|
124
|
+
scopes: AgentScopeConfig;
|
|
125
|
+
scheduledTriggerId: string;
|
|
126
|
+
invocationId: string;
|
|
127
|
+
}) => Promise<ScheduledTriggerInvocation | undefined>;
|
|
119
128
|
/**
|
|
120
129
|
* Add a conversation ID to the invocation's conversationIds array
|
|
121
130
|
* Used to track all conversations created during retries
|
|
@@ -245,4 +254,4 @@ declare const listProjectScheduledTriggerInvocationsPaginated: (db: AgentsRunDat
|
|
|
245
254
|
};
|
|
246
255
|
}>;
|
|
247
256
|
//#endregion
|
|
248
|
-
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, updateScheduledTriggerInvocationStatus };
|
|
257
|
+
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, resetCancelledInvocationToPending, updateScheduledTriggerInvocationStatus };
|
|
@@ -98,6 +98,18 @@ const markScheduledTriggerInvocationFailed = (db) => async (params) => {
|
|
|
98
98
|
}).where(and(agentScopedWhere(scheduledTriggerInvocations, params.scopes), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId), ne(scheduledTriggerInvocations.status, "cancelled"))).returning())[0];
|
|
99
99
|
};
|
|
100
100
|
/**
|
|
101
|
+
* Reset a cancelled invocation back to pending.
|
|
102
|
+
* Only updates if the current status is 'cancelled' to prevent race conditions.
|
|
103
|
+
*/
|
|
104
|
+
const resetCancelledInvocationToPending = (db) => async (params) => {
|
|
105
|
+
return (await db.update(scheduledTriggerInvocations).set({
|
|
106
|
+
status: "pending",
|
|
107
|
+
attemptNumber: 1,
|
|
108
|
+
startedAt: null,
|
|
109
|
+
completedAt: null
|
|
110
|
+
}).where(and(agentScopedWhere(scheduledTriggerInvocations, params.scopes), eq(scheduledTriggerInvocations.scheduledTriggerId, params.scheduledTriggerId), eq(scheduledTriggerInvocations.id, params.invocationId), eq(scheduledTriggerInvocations.status, "cancelled"))).returning())[0];
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
101
113
|
* Add a conversation ID to the invocation's conversationIds array
|
|
102
114
|
* Used to track all conversations created during retries
|
|
103
115
|
*/
|
|
@@ -213,4 +225,4 @@ const listProjectScheduledTriggerInvocationsPaginated = (db) => async (params) =
|
|
|
213
225
|
};
|
|
214
226
|
|
|
215
227
|
//#endregion
|
|
216
|
-
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, updateScheduledTriggerInvocationStatus };
|
|
228
|
+
export { addConversationIdToInvocation, cancelPastPendingInvocationsForTrigger, cancelPendingInvocationsForTrigger, createScheduledTriggerInvocation, deletePendingInvocationsForTrigger, getScheduledTriggerInvocationById, getScheduledTriggerInvocationByIdempotencyKey, getScheduledTriggerRunInfoBatch, listPendingScheduledTriggerInvocations, listProjectScheduledTriggerInvocationsPaginated, listScheduledTriggerInvocationsPaginated, listUpcomingInvocationsForAgentPaginated, markScheduledTriggerInvocationCancelled, markScheduledTriggerInvocationCompleted, markScheduledTriggerInvocationFailed, markScheduledTriggerInvocationRunning, resetCancelledInvocationToPending, updateScheduledTriggerInvocationStatus };
|
|
@@ -7,19 +7,19 @@ import { TaskInsert, TaskSelect } from "../../types/entities.js";
|
|
|
7
7
|
|
|
8
8
|
//#region src/data-access/runtime/tasks.d.ts
|
|
9
9
|
declare const createTask: (db: AgentsRunDatabaseClient) => (params: TaskInsert) => Promise<{
|
|
10
|
+
metadata: TaskMetadataConfig | null;
|
|
10
11
|
id: string;
|
|
11
|
-
tenantId: string;
|
|
12
|
-
projectId: string;
|
|
13
|
-
agentId: string;
|
|
14
12
|
createdAt: string;
|
|
13
|
+
status: string;
|
|
15
14
|
updatedAt: string;
|
|
16
|
-
metadata: TaskMetadataConfig | null;
|
|
17
15
|
ref: {
|
|
18
16
|
type: "commit" | "tag" | "branch";
|
|
19
17
|
name: string;
|
|
20
18
|
hash: string;
|
|
21
19
|
} | null;
|
|
22
|
-
|
|
20
|
+
tenantId: string;
|
|
21
|
+
projectId: string;
|
|
22
|
+
agentId: string;
|
|
23
23
|
subAgentId: string;
|
|
24
24
|
contextId: string;
|
|
25
25
|
}>;
|