@inkeep/agents-core 0.0.0-dev-20260212154015 → 0.0.0-dev-20260212170401
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.d.ts +18 -18
- package/dist/auth/permissions.d.ts +9 -9
- package/dist/client-exports.d.ts +10 -5
- package/dist/client-exports.js +2 -2
- package/dist/data-access/index.d.ts +4 -1
- package/dist/data-access/index.js +4 -1
- package/dist/data-access/manage/agentFull.js +116 -0
- package/dist/data-access/manage/agents.d.ts +42 -42
- package/dist/data-access/manage/agents.js +28 -0
- 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 +14 -14
- package/dist/data-access/manage/scheduledTriggers.d.ts +80 -0
- package/dist/data-access/manage/scheduledTriggers.js +76 -0
- package/dist/data-access/manage/scheduledWorkflows.d.ts +29 -0
- package/dist/data-access/manage/scheduledWorkflows.js +32 -0
- 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 +26 -26
- 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/runtime/apiKeys.d.ts +16 -16
- 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 +233 -0
- package/dist/data-access/runtime/scheduledTriggerInvocations.js +226 -0
- package/dist/data-access/runtime/tasks.d.ts +8 -8
- package/dist/db/manage/manage-schema.d.ts +534 -2
- package/dist/db/manage/manage-schema.js +128 -2
- package/dist/db/runtime/runtime-schema.d.ts +549 -281
- package/dist/db/runtime/runtime-schema.js +32 -2
- package/dist/index.d.ts +7 -4
- package/dist/index.js +7 -4
- package/dist/validation/dolt-schemas.d.ts +1 -1
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +2 -2
- package/dist/validation/schemas.d.ts +4232 -1605
- package/dist/validation/schemas.js +96 -3
- package/drizzle/manage/0009_chilly_old_lace.sql +39 -0
- package/drizzle/manage/meta/0009_snapshot.json +3670 -0
- package/drizzle/manage/meta/_journal.json +7 -0
- package/drizzle/runtime/0013_huge_white_queen.sql +19 -0
- package/drizzle/runtime/meta/0013_snapshot.json +3746 -0
- package/drizzle/runtime/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { AgentScopeConfig, PaginationConfig } from "../../types/utility.js";
|
|
2
|
+
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
|
+
import { ScheduledTrigger, ScheduledTriggerInsert, ScheduledTriggerUpdate } from "../../validation/schemas.js";
|
|
4
|
+
|
|
5
|
+
//#region src/data-access/manage/scheduledTriggers.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Get a scheduled trigger by ID (agent-scoped)
|
|
9
|
+
*/
|
|
10
|
+
declare const getScheduledTriggerById: (db: AgentsManageDatabaseClient) => (params: {
|
|
11
|
+
scopes: AgentScopeConfig;
|
|
12
|
+
scheduledTriggerId: string;
|
|
13
|
+
}) => Promise<ScheduledTrigger | undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* List scheduled triggers for an agent with pagination
|
|
16
|
+
*/
|
|
17
|
+
declare const listScheduledTriggersPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
18
|
+
scopes: AgentScopeConfig;
|
|
19
|
+
pagination?: PaginationConfig;
|
|
20
|
+
}) => Promise<{
|
|
21
|
+
data: {
|
|
22
|
+
createdAt: string;
|
|
23
|
+
updatedAt: string;
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
cronExpression: string | null;
|
|
26
|
+
cronTimezone: string | null;
|
|
27
|
+
runAt: string | null;
|
|
28
|
+
payload: Record<string, unknown> | null;
|
|
29
|
+
messageTemplate: string | null;
|
|
30
|
+
maxRetries: number;
|
|
31
|
+
retryDelaySeconds: number;
|
|
32
|
+
timeoutSeconds: number;
|
|
33
|
+
name: string;
|
|
34
|
+
description: string | null;
|
|
35
|
+
agentId: string;
|
|
36
|
+
projectId: string;
|
|
37
|
+
tenantId: string;
|
|
38
|
+
id: string;
|
|
39
|
+
}[];
|
|
40
|
+
pagination: {
|
|
41
|
+
page: number;
|
|
42
|
+
limit: number;
|
|
43
|
+
total: number;
|
|
44
|
+
pages: number;
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
47
|
+
/**
|
|
48
|
+
* Create a new scheduled trigger (agent-scoped)
|
|
49
|
+
*/
|
|
50
|
+
declare const createScheduledTrigger: (db: AgentsManageDatabaseClient) => (params: ScheduledTriggerInsert) => Promise<ScheduledTrigger>;
|
|
51
|
+
/**
|
|
52
|
+
* Update a scheduled trigger (agent-scoped)
|
|
53
|
+
*/
|
|
54
|
+
declare const updateScheduledTrigger: (db: AgentsManageDatabaseClient) => (params: {
|
|
55
|
+
scopes: AgentScopeConfig;
|
|
56
|
+
scheduledTriggerId: string;
|
|
57
|
+
data: ScheduledTriggerUpdate;
|
|
58
|
+
}) => Promise<ScheduledTrigger>;
|
|
59
|
+
/**
|
|
60
|
+
* Delete a scheduled trigger (agent-scoped)
|
|
61
|
+
*/
|
|
62
|
+
declare const deleteScheduledTrigger: (db: AgentsManageDatabaseClient) => (params: {
|
|
63
|
+
scopes: AgentScopeConfig;
|
|
64
|
+
scheduledTriggerId: string;
|
|
65
|
+
}) => Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Upsert a scheduled trigger (create if it doesn't exist, update if it does)
|
|
68
|
+
*/
|
|
69
|
+
declare const upsertScheduledTrigger: (db: AgentsManageDatabaseClient) => (params: {
|
|
70
|
+
scopes: AgentScopeConfig;
|
|
71
|
+
data: ScheduledTriggerInsert;
|
|
72
|
+
}) => Promise<ScheduledTrigger>;
|
|
73
|
+
/**
|
|
74
|
+
* List all scheduled triggers for an agent (non-paginated, used by agentFull)
|
|
75
|
+
*/
|
|
76
|
+
declare const listScheduledTriggers: (db: AgentsManageDatabaseClient) => (params: {
|
|
77
|
+
scopes: AgentScopeConfig;
|
|
78
|
+
}) => Promise<ScheduledTrigger[]>;
|
|
79
|
+
//#endregion
|
|
80
|
+
export { createScheduledTrigger, deleteScheduledTrigger, getScheduledTriggerById, listScheduledTriggers, listScheduledTriggersPaginated, updateScheduledTrigger, upsertScheduledTrigger };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { scheduledTriggers } from "../../db/manage/manage-schema.js";
|
|
2
|
+
import { and, count, desc, eq } from "drizzle-orm";
|
|
3
|
+
|
|
4
|
+
//#region src/data-access/manage/scheduledTriggers.ts
|
|
5
|
+
/**
|
|
6
|
+
* Get a scheduled trigger by ID (agent-scoped)
|
|
7
|
+
*/
|
|
8
|
+
const getScheduledTriggerById = (db) => async (params) => {
|
|
9
|
+
const { scopes, scheduledTriggerId } = params;
|
|
10
|
+
return await db.query.scheduledTriggers.findFirst({ where: and(eq(scheduledTriggers.tenantId, scopes.tenantId), eq(scheduledTriggers.projectId, scopes.projectId), eq(scheduledTriggers.agentId, scopes.agentId), eq(scheduledTriggers.id, scheduledTriggerId)) });
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* List scheduled triggers for an agent with pagination
|
|
14
|
+
*/
|
|
15
|
+
const listScheduledTriggersPaginated = (db) => async (params) => {
|
|
16
|
+
const page = params.pagination?.page || 1;
|
|
17
|
+
const limit = Math.min(params.pagination?.limit || 10, 100);
|
|
18
|
+
const offset = (page - 1) * limit;
|
|
19
|
+
const whereClause = and(eq(scheduledTriggers.tenantId, params.scopes.tenantId), eq(scheduledTriggers.projectId, params.scopes.projectId), eq(scheduledTriggers.agentId, params.scopes.agentId));
|
|
20
|
+
const [data, totalResult] = await Promise.all([db.select().from(scheduledTriggers).where(whereClause).limit(limit).offset(offset).orderBy(desc(scheduledTriggers.createdAt)), db.select({ count: count() }).from(scheduledTriggers).where(whereClause)]);
|
|
21
|
+
const total = totalResult[0]?.count || 0;
|
|
22
|
+
return {
|
|
23
|
+
data,
|
|
24
|
+
pagination: {
|
|
25
|
+
page,
|
|
26
|
+
limit,
|
|
27
|
+
total,
|
|
28
|
+
pages: Math.ceil(total / limit)
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Create a new scheduled trigger (agent-scoped)
|
|
34
|
+
*/
|
|
35
|
+
const createScheduledTrigger = (db) => async (params) => {
|
|
36
|
+
return (await db.insert(scheduledTriggers).values(params).returning())[0];
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Update a scheduled trigger (agent-scoped)
|
|
40
|
+
*/
|
|
41
|
+
const updateScheduledTrigger = (db) => async (params) => {
|
|
42
|
+
const updateData = {
|
|
43
|
+
...params.data,
|
|
44
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
45
|
+
};
|
|
46
|
+
return (await db.update(scheduledTriggers).set(updateData).where(and(eq(scheduledTriggers.tenantId, params.scopes.tenantId), eq(scheduledTriggers.projectId, params.scopes.projectId), eq(scheduledTriggers.agentId, params.scopes.agentId), eq(scheduledTriggers.id, params.scheduledTriggerId))).returning())[0];
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Delete a scheduled trigger (agent-scoped)
|
|
50
|
+
*/
|
|
51
|
+
const deleteScheduledTrigger = (db) => async (params) => {
|
|
52
|
+
await db.delete(scheduledTriggers).where(and(eq(scheduledTriggers.tenantId, params.scopes.tenantId), eq(scheduledTriggers.projectId, params.scopes.projectId), eq(scheduledTriggers.agentId, params.scopes.agentId), eq(scheduledTriggers.id, params.scheduledTriggerId)));
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Upsert a scheduled trigger (create if it doesn't exist, update if it does)
|
|
56
|
+
*/
|
|
57
|
+
const upsertScheduledTrigger = (db) => async (params) => {
|
|
58
|
+
if (await getScheduledTriggerById(db)({
|
|
59
|
+
scopes: params.scopes,
|
|
60
|
+
scheduledTriggerId: params.data.id
|
|
61
|
+
})) return await updateScheduledTrigger(db)({
|
|
62
|
+
scopes: params.scopes,
|
|
63
|
+
scheduledTriggerId: params.data.id,
|
|
64
|
+
data: params.data
|
|
65
|
+
});
|
|
66
|
+
return await createScheduledTrigger(db)(params.data);
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* List all scheduled triggers for an agent (non-paginated, used by agentFull)
|
|
70
|
+
*/
|
|
71
|
+
const listScheduledTriggers = (db) => async (params) => {
|
|
72
|
+
return await db.select().from(scheduledTriggers).where(and(eq(scheduledTriggers.tenantId, params.scopes.tenantId), eq(scheduledTriggers.projectId, params.scopes.projectId), eq(scheduledTriggers.agentId, params.scopes.agentId)));
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
//#endregion
|
|
76
|
+
export { createScheduledTrigger, deleteScheduledTrigger, getScheduledTriggerById, listScheduledTriggers, listScheduledTriggersPaginated, updateScheduledTrigger, upsertScheduledTrigger };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AgentScopeConfig } from "../../types/utility.js";
|
|
2
|
+
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
|
|
3
|
+
import { ScheduledWorkflow, ScheduledWorkflowInsert } from "../../validation/schemas.js";
|
|
4
|
+
|
|
5
|
+
//#region src/data-access/manage/scheduledWorkflows.d.ts
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Get a scheduled workflow by trigger ID (agent-scoped)
|
|
9
|
+
*/
|
|
10
|
+
declare const getScheduledWorkflowByTriggerId: (db: AgentsManageDatabaseClient) => (params: {
|
|
11
|
+
scopes: AgentScopeConfig;
|
|
12
|
+
scheduledTriggerId: string;
|
|
13
|
+
}) => Promise<ScheduledWorkflow | undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* Create a new scheduled workflow (agent-scoped)
|
|
16
|
+
*/
|
|
17
|
+
declare const createScheduledWorkflow: (db: AgentsManageDatabaseClient) => (params: ScheduledWorkflowInsert) => Promise<ScheduledWorkflow>;
|
|
18
|
+
/**
|
|
19
|
+
* Update workflow run ID and/or status for a scheduled workflow
|
|
20
|
+
* Used when a workflow is started/restarted/cancelled
|
|
21
|
+
*/
|
|
22
|
+
declare const updateScheduledWorkflowRunId: (db: AgentsManageDatabaseClient) => (params: {
|
|
23
|
+
scopes: AgentScopeConfig;
|
|
24
|
+
scheduledWorkflowId: string;
|
|
25
|
+
workflowRunId: string | null;
|
|
26
|
+
status?: "running" | "completed" | "cancelled" | "failed";
|
|
27
|
+
}) => Promise<ScheduledWorkflow>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { createScheduledWorkflow, getScheduledWorkflowByTriggerId, updateScheduledWorkflowRunId };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { scheduledWorkflows } from "../../db/manage/manage-schema.js";
|
|
2
|
+
import { and, eq } from "drizzle-orm";
|
|
3
|
+
|
|
4
|
+
//#region src/data-access/manage/scheduledWorkflows.ts
|
|
5
|
+
/**
|
|
6
|
+
* Get a scheduled workflow by trigger ID (agent-scoped)
|
|
7
|
+
*/
|
|
8
|
+
const getScheduledWorkflowByTriggerId = (db) => async (params) => {
|
|
9
|
+
const { scopes, scheduledTriggerId } = params;
|
|
10
|
+
return await db.query.scheduledWorkflows.findFirst({ where: and(eq(scheduledWorkflows.tenantId, scopes.tenantId), eq(scheduledWorkflows.projectId, scopes.projectId), eq(scheduledWorkflows.agentId, scopes.agentId), eq(scheduledWorkflows.scheduledTriggerId, scheduledTriggerId)) });
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Create a new scheduled workflow (agent-scoped)
|
|
14
|
+
*/
|
|
15
|
+
const createScheduledWorkflow = (db) => async (params) => {
|
|
16
|
+
return (await db.insert(scheduledWorkflows).values(params).returning())[0];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Update workflow run ID and/or status for a scheduled workflow
|
|
20
|
+
* Used when a workflow is started/restarted/cancelled
|
|
21
|
+
*/
|
|
22
|
+
const updateScheduledWorkflowRunId = (db) => async (params) => {
|
|
23
|
+
const updateData = {
|
|
24
|
+
workflowRunId: params.workflowRunId,
|
|
25
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
26
|
+
};
|
|
27
|
+
if (params.status) updateData.status = params.status;
|
|
28
|
+
return (await db.update(scheduledWorkflows).set(updateData).where(and(eq(scheduledWorkflows.tenantId, params.scopes.tenantId), eq(scheduledWorkflows.projectId, params.scopes.projectId), eq(scheduledWorkflows.agentId, params.scopes.agentId), eq(scheduledWorkflows.id, params.scheduledWorkflowId))).returning())[0];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
export { createScheduledWorkflow, getScheduledWorkflowByTriggerId, updateScheduledWorkflowRunId };
|
|
@@ -9,12 +9,12 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
9
9
|
}) => Promise<{
|
|
10
10
|
id: string;
|
|
11
11
|
name: string;
|
|
12
|
-
description: string;
|
|
13
|
-
tenantId: string;
|
|
14
|
-
projectId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
17
14
|
metadata: Record<string, string> | null;
|
|
15
|
+
description: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
content: string;
|
|
19
19
|
} | null>;
|
|
20
20
|
declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -42,23 +42,23 @@ declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
42
42
|
declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
|
|
43
43
|
id: string;
|
|
44
44
|
name: string;
|
|
45
|
-
description: string;
|
|
46
|
-
tenantId: string;
|
|
47
|
-
projectId: string;
|
|
48
45
|
createdAt: string;
|
|
49
46
|
updatedAt: string;
|
|
50
47
|
metadata: Record<string, string> | null;
|
|
48
|
+
description: string;
|
|
49
|
+
projectId: string;
|
|
50
|
+
tenantId: string;
|
|
51
51
|
content: string;
|
|
52
52
|
}>;
|
|
53
53
|
declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
|
|
54
54
|
id: string;
|
|
55
55
|
name: string;
|
|
56
|
-
description: string;
|
|
57
|
-
tenantId: string;
|
|
58
|
-
projectId: string;
|
|
59
56
|
createdAt: string;
|
|
60
57
|
updatedAt: string;
|
|
61
58
|
metadata: Record<string, string> | null;
|
|
59
|
+
description: string;
|
|
60
|
+
projectId: string;
|
|
61
|
+
tenantId: string;
|
|
62
62
|
content: string;
|
|
63
63
|
}>;
|
|
64
64
|
declare const updateSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
@@ -91,15 +91,15 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
|
|
|
91
91
|
alwaysLoaded?: boolean;
|
|
92
92
|
}) => Promise<{
|
|
93
93
|
id: string;
|
|
94
|
-
tenantId: string;
|
|
95
|
-
projectId: string;
|
|
96
|
-
agentId: string;
|
|
97
94
|
createdAt: string;
|
|
98
95
|
updatedAt: string;
|
|
96
|
+
agentId: string;
|
|
97
|
+
projectId: string;
|
|
98
|
+
tenantId: string;
|
|
99
99
|
index: number;
|
|
100
100
|
alwaysLoaded: boolean;
|
|
101
|
-
skillId: string;
|
|
102
101
|
subAgentId: string;
|
|
102
|
+
skillId: string;
|
|
103
103
|
}>;
|
|
104
104
|
declare const deleteSubAgentSkill: (db: AgentsManageDatabaseClient) => (params: {
|
|
105
105
|
scopes: AgentScopeConfig;
|
|
@@ -9,12 +9,12 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
|
|
|
9
9
|
relationId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
|
-
tenantId: string;
|
|
13
|
-
projectId: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
17
14
|
headers: Record<string, string> | null;
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
externalAgentId: string;
|
|
19
19
|
subAgentId: string;
|
|
20
20
|
} | undefined>;
|
|
@@ -44,12 +44,12 @@ declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient
|
|
|
44
44
|
scopes: SubAgentScopeConfig;
|
|
45
45
|
}) => Promise<{
|
|
46
46
|
id: string;
|
|
47
|
-
tenantId: string;
|
|
48
|
-
projectId: string;
|
|
49
|
-
agentId: string;
|
|
50
47
|
createdAt: string;
|
|
51
48
|
updatedAt: string;
|
|
52
49
|
headers: Record<string, string> | null;
|
|
50
|
+
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
externalAgentId: string;
|
|
54
54
|
subAgentId: string;
|
|
55
55
|
}[]>;
|
|
@@ -57,12 +57,12 @@ declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabas
|
|
|
57
57
|
scopes: AgentScopeConfig;
|
|
58
58
|
}) => Promise<{
|
|
59
59
|
id: string;
|
|
60
|
-
tenantId: string;
|
|
61
|
-
projectId: string;
|
|
62
|
-
agentId: string;
|
|
63
60
|
createdAt: string;
|
|
64
61
|
updatedAt: string;
|
|
65
62
|
headers: Record<string, string> | null;
|
|
63
|
+
agentId: string;
|
|
64
|
+
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
66
66
|
externalAgentId: string;
|
|
67
67
|
subAgentId: string;
|
|
68
68
|
}[]>;
|
|
@@ -180,12 +180,12 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
180
180
|
};
|
|
181
181
|
}) => Promise<{
|
|
182
182
|
id: string;
|
|
183
|
-
tenantId: string;
|
|
184
|
-
projectId: string;
|
|
185
|
-
agentId: string;
|
|
186
183
|
createdAt: string;
|
|
187
184
|
updatedAt: string;
|
|
188
185
|
headers: Record<string, string> | null;
|
|
186
|
+
agentId: string;
|
|
187
|
+
projectId: string;
|
|
188
|
+
tenantId: string;
|
|
189
189
|
externalAgentId: string;
|
|
190
190
|
subAgentId: string;
|
|
191
191
|
}>;
|
|
@@ -197,12 +197,12 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
|
|
|
197
197
|
externalAgentId: string;
|
|
198
198
|
}) => Promise<{
|
|
199
199
|
id: string;
|
|
200
|
-
tenantId: string;
|
|
201
|
-
projectId: string;
|
|
202
|
-
agentId: string;
|
|
203
200
|
createdAt: string;
|
|
204
201
|
updatedAt: string;
|
|
205
202
|
headers: Record<string, string> | null;
|
|
203
|
+
agentId: string;
|
|
204
|
+
projectId: string;
|
|
205
|
+
tenantId: string;
|
|
206
206
|
externalAgentId: string;
|
|
207
207
|
subAgentId: string;
|
|
208
208
|
} | undefined>;
|
|
@@ -218,12 +218,12 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
|
|
|
218
218
|
};
|
|
219
219
|
}) => Promise<{
|
|
220
220
|
id: string;
|
|
221
|
-
tenantId: string;
|
|
222
|
-
projectId: string;
|
|
223
|
-
agentId: string;
|
|
224
221
|
createdAt: string;
|
|
225
222
|
updatedAt: string;
|
|
226
223
|
headers: Record<string, string> | null;
|
|
224
|
+
agentId: string;
|
|
225
|
+
projectId: string;
|
|
226
|
+
tenantId: string;
|
|
227
227
|
externalAgentId: string;
|
|
228
228
|
subAgentId: string;
|
|
229
229
|
}>;
|
|
@@ -9,11 +9,11 @@ declare const getAgentRelationById: (db: AgentsManageDatabaseClient) => (params:
|
|
|
9
9
|
relationId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
|
-
tenantId: string;
|
|
13
|
-
projectId: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
14
|
+
agentId: string;
|
|
15
|
+
projectId: string;
|
|
16
|
+
tenantId: string;
|
|
17
17
|
sourceSubAgentId: string;
|
|
18
18
|
targetSubAgentId: string | null;
|
|
19
19
|
relationType: string | null;
|
|
@@ -44,11 +44,11 @@ declare const getAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
44
44
|
scopes: SubAgentScopeConfig;
|
|
45
45
|
}) => Promise<{
|
|
46
46
|
id: string;
|
|
47
|
-
tenantId: string;
|
|
48
|
-
projectId: string;
|
|
49
|
-
agentId: string;
|
|
50
47
|
createdAt: string;
|
|
51
48
|
updatedAt: string;
|
|
49
|
+
agentId: string;
|
|
50
|
+
projectId: string;
|
|
51
|
+
tenantId: string;
|
|
52
52
|
sourceSubAgentId: string;
|
|
53
53
|
targetSubAgentId: string | null;
|
|
54
54
|
relationType: string | null;
|
|
@@ -57,11 +57,11 @@ declare const getAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
57
57
|
scopes: AgentScopeConfig;
|
|
58
58
|
}) => Promise<{
|
|
59
59
|
id: string;
|
|
60
|
-
tenantId: string;
|
|
61
|
-
projectId: string;
|
|
62
|
-
agentId: string;
|
|
63
60
|
createdAt: string;
|
|
64
61
|
updatedAt: string;
|
|
62
|
+
agentId: string;
|
|
63
|
+
projectId: string;
|
|
64
|
+
tenantId: string;
|
|
65
65
|
sourceSubAgentId: string;
|
|
66
66
|
targetSubAgentId: string | null;
|
|
67
67
|
relationType: string | null;
|
|
@@ -126,11 +126,11 @@ declare const getRelatedAgentsForAgent: (db: AgentsManageDatabaseClient) => (par
|
|
|
126
126
|
}>;
|
|
127
127
|
declare const createSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
128
128
|
id: string;
|
|
129
|
-
tenantId: string;
|
|
130
|
-
projectId: string;
|
|
131
|
-
agentId: string;
|
|
132
129
|
createdAt: string;
|
|
133
130
|
updatedAt: string;
|
|
131
|
+
agentId: string;
|
|
132
|
+
projectId: string;
|
|
133
|
+
tenantId: string;
|
|
134
134
|
sourceSubAgentId: string;
|
|
135
135
|
targetSubAgentId: string | null;
|
|
136
136
|
relationType: string | null;
|
|
@@ -145,11 +145,11 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
145
145
|
relationType: string;
|
|
146
146
|
}) => Promise<{
|
|
147
147
|
id: string;
|
|
148
|
-
tenantId: string;
|
|
149
|
-
projectId: string;
|
|
150
|
-
agentId: string;
|
|
151
148
|
createdAt: string;
|
|
152
149
|
updatedAt: string;
|
|
150
|
+
agentId: string;
|
|
151
|
+
projectId: string;
|
|
152
|
+
tenantId: string;
|
|
153
153
|
sourceSubAgentId: string;
|
|
154
154
|
targetSubAgentId: string | null;
|
|
155
155
|
relationType: string | null;
|
|
@@ -159,11 +159,11 @@ declare const getAgentRelationByParams: (db: AgentsManageDatabaseClient) => (par
|
|
|
159
159
|
*/
|
|
160
160
|
declare const upsertSubAgentRelation: (db: AgentsManageDatabaseClient) => (params: SubAgentRelationInsert) => Promise<{
|
|
161
161
|
id: string;
|
|
162
|
-
tenantId: string;
|
|
163
|
-
projectId: string;
|
|
164
|
-
agentId: string;
|
|
165
162
|
createdAt: string;
|
|
166
163
|
updatedAt: string;
|
|
164
|
+
agentId: string;
|
|
165
|
+
projectId: string;
|
|
166
|
+
tenantId: string;
|
|
167
167
|
sourceSubAgentId: string;
|
|
168
168
|
targetSubAgentId: string | null;
|
|
169
169
|
relationType: string | null;
|
|
@@ -204,13 +204,13 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
|
|
|
204
204
|
};
|
|
205
205
|
}) => Promise<{
|
|
206
206
|
id: string;
|
|
207
|
-
tenantId: string;
|
|
208
|
-
projectId: string;
|
|
209
|
-
agentId: string;
|
|
210
207
|
createdAt: string;
|
|
211
208
|
updatedAt: string;
|
|
212
|
-
toolId: string;
|
|
213
209
|
headers: Record<string, string> | null;
|
|
210
|
+
agentId: string;
|
|
211
|
+
projectId: string;
|
|
212
|
+
tenantId: string;
|
|
213
|
+
toolId: string;
|
|
214
214
|
toolPolicies: Record<string, {
|
|
215
215
|
needsApproval?: boolean;
|
|
216
216
|
}> | null;
|
|
@@ -248,13 +248,13 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
|
|
|
248
248
|
relationId: string;
|
|
249
249
|
}) => Promise<{
|
|
250
250
|
id: string;
|
|
251
|
-
tenantId: string;
|
|
252
|
-
projectId: string;
|
|
253
|
-
agentId: string;
|
|
254
251
|
createdAt: string;
|
|
255
252
|
updatedAt: string;
|
|
256
|
-
toolId: string;
|
|
257
253
|
headers: Record<string, string> | null;
|
|
254
|
+
agentId: string;
|
|
255
|
+
projectId: string;
|
|
256
|
+
tenantId: string;
|
|
257
|
+
toolId: string;
|
|
258
258
|
toolPolicies: Record<string, {
|
|
259
259
|
needsApproval?: boolean;
|
|
260
260
|
}> | null;
|
|
@@ -9,12 +9,12 @@ declare const getSubAgentTeamAgentRelationById: (db: AgentsManageDatabaseClient)
|
|
|
9
9
|
relationId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
|
-
tenantId: string;
|
|
13
|
-
projectId: string;
|
|
14
|
-
agentId: string;
|
|
15
12
|
createdAt: string;
|
|
16
13
|
updatedAt: string;
|
|
17
14
|
headers: Record<string, string> | null;
|
|
15
|
+
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
18
|
subAgentId: string;
|
|
19
19
|
targetAgentId: string;
|
|
20
20
|
} | undefined>;
|
|
@@ -44,12 +44,12 @@ declare const getSubAgentTeamAgentRelations: (db: AgentsManageDatabaseClient) =>
|
|
|
44
44
|
scopes: SubAgentScopeConfig;
|
|
45
45
|
}) => Promise<{
|
|
46
46
|
id: string;
|
|
47
|
-
tenantId: string;
|
|
48
|
-
projectId: string;
|
|
49
|
-
agentId: string;
|
|
50
47
|
createdAt: string;
|
|
51
48
|
updatedAt: string;
|
|
52
49
|
headers: Record<string, string> | null;
|
|
50
|
+
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
subAgentId: string;
|
|
54
54
|
targetAgentId: string;
|
|
55
55
|
}[]>;
|
|
@@ -57,12 +57,12 @@ declare const getSubAgentTeamAgentRelationsByAgent: (db: AgentsManageDatabaseCli
|
|
|
57
57
|
scopes: AgentScopeConfig;
|
|
58
58
|
}) => Promise<{
|
|
59
59
|
id: string;
|
|
60
|
-
tenantId: string;
|
|
61
|
-
projectId: string;
|
|
62
|
-
agentId: string;
|
|
63
60
|
createdAt: string;
|
|
64
61
|
updatedAt: string;
|
|
65
62
|
headers: Record<string, string> | null;
|
|
63
|
+
agentId: string;
|
|
64
|
+
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
66
66
|
subAgentId: string;
|
|
67
67
|
targetAgentId: string;
|
|
68
68
|
}[]>;
|
|
@@ -210,12 +210,12 @@ declare const createSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
210
210
|
};
|
|
211
211
|
}) => Promise<{
|
|
212
212
|
id: string;
|
|
213
|
-
tenantId: string;
|
|
214
|
-
projectId: string;
|
|
215
|
-
agentId: string;
|
|
216
213
|
createdAt: string;
|
|
217
214
|
updatedAt: string;
|
|
218
215
|
headers: Record<string, string> | null;
|
|
216
|
+
agentId: string;
|
|
217
|
+
projectId: string;
|
|
218
|
+
tenantId: string;
|
|
219
219
|
subAgentId: string;
|
|
220
220
|
targetAgentId: string;
|
|
221
221
|
}>;
|
|
@@ -227,12 +227,12 @@ declare const getSubAgentTeamAgentRelationByParams: (db: AgentsManageDatabaseCli
|
|
|
227
227
|
targetAgentId: string;
|
|
228
228
|
}) => Promise<{
|
|
229
229
|
id: string;
|
|
230
|
-
tenantId: string;
|
|
231
|
-
projectId: string;
|
|
232
|
-
agentId: string;
|
|
233
230
|
createdAt: string;
|
|
234
231
|
updatedAt: string;
|
|
235
232
|
headers: Record<string, string> | null;
|
|
233
|
+
agentId: string;
|
|
234
|
+
projectId: string;
|
|
235
|
+
tenantId: string;
|
|
236
236
|
subAgentId: string;
|
|
237
237
|
targetAgentId: string;
|
|
238
238
|
} | undefined>;
|
|
@@ -248,12 +248,12 @@ declare const upsertSubAgentTeamAgentRelation: (db: AgentsManageDatabaseClient)
|
|
|
248
248
|
};
|
|
249
249
|
}) => Promise<{
|
|
250
250
|
id: string;
|
|
251
|
-
tenantId: string;
|
|
252
|
-
projectId: string;
|
|
253
|
-
agentId: string;
|
|
254
251
|
createdAt: string;
|
|
255
252
|
updatedAt: string;
|
|
256
253
|
headers: Record<string, string> | null;
|
|
254
|
+
agentId: string;
|
|
255
|
+
projectId: string;
|
|
256
|
+
tenantId: string;
|
|
257
257
|
subAgentId: string;
|
|
258
258
|
targetAgentId: string;
|
|
259
259
|
}>;
|
|
@@ -10,12 +10,12 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
10
10
|
}) => Promise<{
|
|
11
11
|
id: string;
|
|
12
12
|
name: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
13
15
|
description: string | null;
|
|
14
|
-
tenantId: string;
|
|
15
|
-
projectId: string;
|
|
16
16
|
agentId: string;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
19
|
models: {
|
|
20
20
|
base?: {
|
|
21
21
|
model?: string | undefined;
|
|
@@ -30,23 +30,23 @@ declare const getSubAgentById: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
30
30
|
providerOptions?: Record<string, any> | undefined;
|
|
31
31
|
} | undefined;
|
|
32
32
|
} | null;
|
|
33
|
+
prompt: string | null;
|
|
33
34
|
stopWhen: {
|
|
34
35
|
stepCountIs?: number | undefined;
|
|
35
36
|
} | null;
|
|
36
|
-
|
|
37
|
-
updatedAt: string;
|
|
37
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
38
38
|
} | undefined>;
|
|
39
39
|
declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
40
40
|
scopes: AgentScopeConfig;
|
|
41
41
|
}) => Promise<{
|
|
42
42
|
id: string;
|
|
43
43
|
name: string;
|
|
44
|
+
createdAt: string;
|
|
45
|
+
updatedAt: string;
|
|
44
46
|
description: string | null;
|
|
45
|
-
tenantId: string;
|
|
46
|
-
projectId: string;
|
|
47
47
|
agentId: string;
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
projectId: string;
|
|
49
|
+
tenantId: string;
|
|
50
50
|
models: {
|
|
51
51
|
base?: {
|
|
52
52
|
model?: string | undefined;
|
|
@@ -61,11 +61,11 @@ declare const listSubAgents: (db: AgentsManageDatabaseClient) => (params: {
|
|
|
61
61
|
providerOptions?: Record<string, any> | undefined;
|
|
62
62
|
} | undefined;
|
|
63
63
|
} | null;
|
|
64
|
+
prompt: string | null;
|
|
64
65
|
stopWhen: {
|
|
65
66
|
stepCountIs?: number | undefined;
|
|
66
67
|
} | null;
|
|
67
|
-
|
|
68
|
-
updatedAt: string;
|
|
68
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
69
69
|
}[]>;
|
|
70
70
|
declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
|
|
71
71
|
scopes: AgentScopeConfig;
|
|
@@ -110,12 +110,12 @@ declare const listSubAgentsPaginated: (db: AgentsManageDatabaseClient) => (param
|
|
|
110
110
|
declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAgentInsert) => Promise<{
|
|
111
111
|
id: string;
|
|
112
112
|
name: string;
|
|
113
|
+
createdAt: string;
|
|
114
|
+
updatedAt: string;
|
|
113
115
|
description: string | null;
|
|
114
|
-
tenantId: string;
|
|
115
|
-
projectId: string;
|
|
116
116
|
agentId: string;
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
projectId: string;
|
|
118
|
+
tenantId: string;
|
|
119
119
|
models: {
|
|
120
120
|
base?: {
|
|
121
121
|
model?: string | undefined;
|
|
@@ -130,11 +130,11 @@ declare const createSubAgent: (db: AgentsManageDatabaseClient) => (params: SubAg
|
|
|
130
130
|
providerOptions?: Record<string, any> | undefined;
|
|
131
131
|
} | undefined;
|
|
132
132
|
} | null;
|
|
133
|
+
prompt: string | null;
|
|
133
134
|
stopWhen: {
|
|
134
135
|
stepCountIs?: number | undefined;
|
|
135
136
|
} | null;
|
|
136
|
-
|
|
137
|
-
updatedAt: string;
|
|
137
|
+
conversationHistoryConfig: ConversationHistoryConfig | null;
|
|
138
138
|
}>;
|
|
139
139
|
declare const updateSubAgent: (db: AgentsManageDatabaseClient) => (params: {
|
|
140
140
|
scopes: AgentScopeConfig;
|