@inkeep/agents-core 0.0.0-dev-20260106154123 → 0.0.0-dev-20260106194315
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 +146 -146
- package/dist/auth/auth.d.ts +37 -37
- package/dist/auth/permissions.d.ts +13 -13
- package/dist/client-exports.d.ts +14 -2
- package/dist/data-access/agents.d.ts +42 -42
- package/dist/data-access/apiKeys.d.ts +12 -12
- package/dist/data-access/artifactComponents.d.ts +32 -12
- package/dist/data-access/artifactComponents.js +22 -1
- package/dist/data-access/contextConfigs.d.ts +8 -8
- package/dist/data-access/conversations.d.ts +12 -12
- package/dist/data-access/dataComponents.d.ts +6 -6
- package/dist/data-access/functionTools.d.ts +8 -8
- package/dist/data-access/messages.d.ts +27 -27
- package/dist/data-access/subAgentExternalAgentRelations.d.ts +24 -24
- package/dist/data-access/subAgentRelations.d.ts +20 -20
- package/dist/data-access/subAgentTeamAgentRelations.d.ts +24 -24
- package/dist/data-access/subAgents.d.ts +18 -18
- package/dist/data-access/tasks.d.ts +4 -4
- package/dist/data-access/tools.d.ts +27 -27
- package/dist/db/schema.d.ts +429 -404
- package/dist/db/schema.js +1 -0
- package/dist/index.js +1 -1
- package/dist/validation/drizzle-schema-helpers.d.ts +3 -3
- package/dist/validation/schemas.d.ts +1291 -1111
- package/drizzle/0007_slim_karma.sql +1 -0
- package/drizzle/meta/0007_snapshot.json +3772 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
|
@@ -7,14 +7,18 @@ declare const getArtifactComponentById: (db: DatabaseClient) => (params: {
|
|
|
7
7
|
scopes: ProjectScopeConfig;
|
|
8
8
|
id: string;
|
|
9
9
|
}) => Promise<{
|
|
10
|
-
description: string | null;
|
|
11
|
-
name: string;
|
|
12
10
|
id: string;
|
|
11
|
+
name: string;
|
|
13
12
|
createdAt: string;
|
|
14
13
|
updatedAt: string;
|
|
15
|
-
tenantId: string;
|
|
16
14
|
projectId: string;
|
|
15
|
+
tenantId: string;
|
|
16
|
+
description: string | null;
|
|
17
17
|
props: Record<string, unknown> | null;
|
|
18
|
+
render: {
|
|
19
|
+
component: string;
|
|
20
|
+
mockData: Record<string, unknown>;
|
|
21
|
+
} | null;
|
|
18
22
|
} | undefined>;
|
|
19
23
|
declare const listArtifactComponents: (db: DatabaseClient) => (params: {
|
|
20
24
|
scopes: ProjectScopeConfig;
|
|
@@ -22,6 +26,10 @@ declare const listArtifactComponents: (db: DatabaseClient) => (params: {
|
|
|
22
26
|
createdAt: string;
|
|
23
27
|
updatedAt: string;
|
|
24
28
|
props: Record<string, unknown> | null;
|
|
29
|
+
render: {
|
|
30
|
+
component: string;
|
|
31
|
+
mockData: Record<string, unknown>;
|
|
32
|
+
} | null;
|
|
25
33
|
name: string;
|
|
26
34
|
description: string | null;
|
|
27
35
|
projectId: string;
|
|
@@ -41,14 +49,18 @@ declare const listArtifactComponentsPaginated: (db: DatabaseClient) => (params:
|
|
|
41
49
|
};
|
|
42
50
|
}>;
|
|
43
51
|
declare const createArtifactComponent: (db: DatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
|
|
44
|
-
description: string | null;
|
|
45
|
-
name: string;
|
|
46
52
|
id: string;
|
|
53
|
+
name: string;
|
|
47
54
|
createdAt: string;
|
|
48
55
|
updatedAt: string;
|
|
49
|
-
tenantId: string;
|
|
50
56
|
projectId: string;
|
|
57
|
+
tenantId: string;
|
|
58
|
+
description: string | null;
|
|
51
59
|
props: Record<string, unknown> | null;
|
|
60
|
+
render: {
|
|
61
|
+
component: string;
|
|
62
|
+
mockData: Record<string, unknown>;
|
|
63
|
+
} | null;
|
|
52
64
|
}>;
|
|
53
65
|
declare const updateArtifactComponent: (db: DatabaseClient) => (params: {
|
|
54
66
|
scopes: ProjectScopeConfig;
|
|
@@ -58,6 +70,10 @@ declare const updateArtifactComponent: (db: DatabaseClient) => (params: {
|
|
|
58
70
|
createdAt: string;
|
|
59
71
|
updatedAt: string;
|
|
60
72
|
props: Record<string, unknown> | null;
|
|
73
|
+
render: {
|
|
74
|
+
component: string;
|
|
75
|
+
mockData: Record<string, unknown>;
|
|
76
|
+
} | null;
|
|
61
77
|
name: string;
|
|
62
78
|
description: string | null;
|
|
63
79
|
projectId: string;
|
|
@@ -77,6 +93,10 @@ declare const getArtifactComponentsForAgent: (db: DatabaseClient) => (params: {
|
|
|
77
93
|
name: string;
|
|
78
94
|
description: string | null;
|
|
79
95
|
props: Record<string, unknown> | null;
|
|
96
|
+
render: {
|
|
97
|
+
component: string;
|
|
98
|
+
mockData: Record<string, unknown>;
|
|
99
|
+
} | null;
|
|
80
100
|
createdAt: string;
|
|
81
101
|
updatedAt: string;
|
|
82
102
|
}[]>;
|
|
@@ -84,12 +104,12 @@ declare const associateArtifactComponentWithAgent: (db: DatabaseClient) => (para
|
|
|
84
104
|
scopes: SubAgentScopeConfig;
|
|
85
105
|
artifactComponentId: string;
|
|
86
106
|
}) => Promise<{
|
|
87
|
-
subAgentId: string;
|
|
88
107
|
id: string;
|
|
89
108
|
createdAt: string;
|
|
90
|
-
tenantId: string;
|
|
91
|
-
projectId: string;
|
|
92
109
|
agentId: string;
|
|
110
|
+
projectId: string;
|
|
111
|
+
tenantId: string;
|
|
112
|
+
subAgentId: string;
|
|
93
113
|
artifactComponentId: string;
|
|
94
114
|
}>;
|
|
95
115
|
declare const removeArtifactComponentFromAgent: (db: DatabaseClient) => (params: {
|
|
@@ -127,12 +147,12 @@ declare const upsertAgentArtifactComponentRelation: (db: DatabaseClient) => (par
|
|
|
127
147
|
scopes: SubAgentScopeConfig;
|
|
128
148
|
artifactComponentId: string;
|
|
129
149
|
}) => Promise<{
|
|
130
|
-
subAgentId: string;
|
|
131
150
|
id: string;
|
|
132
151
|
createdAt: string;
|
|
133
|
-
tenantId: string;
|
|
134
|
-
projectId: string;
|
|
135
152
|
agentId: string;
|
|
153
|
+
projectId: string;
|
|
154
|
+
tenantId: string;
|
|
155
|
+
subAgentId: string;
|
|
136
156
|
artifactComponentId: string;
|
|
137
157
|
} | null>;
|
|
138
158
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { artifactComponents, subAgentArtifactComponents, subAgentRelations, subAgents } from "../db/schema.js";
|
|
2
2
|
import { validatePropsAsJsonSchema } from "../validation/props-validation.js";
|
|
3
3
|
import { generateId } from "../utils/conversations.js";
|
|
4
|
+
import { validateRender } from "../validation/render-validation.js";
|
|
4
5
|
import { and, count, desc, eq } from "drizzle-orm";
|
|
5
6
|
|
|
6
7
|
//#region src/data-access/artifactComponents.ts
|
|
@@ -36,6 +37,15 @@ const createArtifactComponent = (db) => async (params) => {
|
|
|
36
37
|
throw new Error(`Invalid props schema: ${errorMessages}`);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
40
|
+
if (params.render !== void 0 && params.render !== null) {
|
|
41
|
+
if (typeof params.render === "object" && params.render !== null && "component" in params.render && "mockData" in params.render) {
|
|
42
|
+
const renderValidation = validateRender(params.render);
|
|
43
|
+
if (!renderValidation.isValid) {
|
|
44
|
+
const errorMessages = renderValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
|
|
45
|
+
throw new Error(`Invalid render: ${errorMessages}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
39
49
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
40
50
|
const [artifactComponent] = await db.insert(artifactComponents).values({
|
|
41
51
|
...params,
|
|
@@ -52,6 +62,15 @@ const updateArtifactComponent = (db) => async (params) => {
|
|
|
52
62
|
throw new Error(`Invalid props schema: ${errorMessages}`);
|
|
53
63
|
}
|
|
54
64
|
}
|
|
65
|
+
if (params.data.render !== void 0 && params.data.render !== null) {
|
|
66
|
+
if (typeof params.data.render === "object" && params.data.render !== null && "component" in params.data.render && "mockData" in params.data.render) {
|
|
67
|
+
const renderValidation = validateRender(params.data.render);
|
|
68
|
+
if (!renderValidation.isValid) {
|
|
69
|
+
const errorMessages = renderValidation.errors.map((e) => `${e.field}: ${e.message}`).join(", ");
|
|
70
|
+
throw new Error(`Invalid render: ${errorMessages}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
55
74
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
56
75
|
const [updated] = await db.update(artifactComponents).set({
|
|
57
76
|
...params.data,
|
|
@@ -75,6 +94,7 @@ const getArtifactComponentsForAgent = (db) => async (params) => {
|
|
|
75
94
|
name: artifactComponents.name,
|
|
76
95
|
description: artifactComponents.description,
|
|
77
96
|
props: artifactComponents.props,
|
|
97
|
+
render: artifactComponents.render,
|
|
78
98
|
createdAt: artifactComponents.createdAt,
|
|
79
99
|
updatedAt: artifactComponents.updatedAt
|
|
80
100
|
}).from(artifactComponents).innerJoin(subAgentArtifactComponents, eq(artifactComponents.id, subAgentArtifactComponents.artifactComponentId)).where(and(eq(artifactComponents.tenantId, params.scopes.tenantId), eq(artifactComponents.projectId, params.scopes.projectId), eq(subAgentArtifactComponents.agentId, params.scopes.agentId), eq(subAgentArtifactComponents.subAgentId, params.scopes.subAgentId))).orderBy(desc(artifactComponents.createdAt));
|
|
@@ -148,7 +168,8 @@ const upsertArtifactComponent = (db) => async (params) => {
|
|
|
148
168
|
data: {
|
|
149
169
|
name: params.data.name,
|
|
150
170
|
description: params.data.description,
|
|
151
|
-
props: params.data.props
|
|
171
|
+
props: params.data.props,
|
|
172
|
+
render: params.data.render
|
|
152
173
|
}
|
|
153
174
|
});
|
|
154
175
|
return await createArtifactComponent(db)(params.data);
|
|
@@ -11,11 +11,11 @@ declare const getContextConfigById: (db: DatabaseClient) => (params: {
|
|
|
11
11
|
id: string;
|
|
12
12
|
createdAt: string;
|
|
13
13
|
updatedAt: string;
|
|
14
|
-
tenantId: string;
|
|
15
|
-
projectId: string;
|
|
16
14
|
headersSchema: unknown;
|
|
17
15
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
18
16
|
agentId: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
19
|
} | undefined>;
|
|
20
20
|
declare const listContextConfigs: (db: DatabaseClient) => (params: {
|
|
21
21
|
scopes: AgentScopeConfig;
|
|
@@ -23,11 +23,11 @@ declare const listContextConfigs: (db: DatabaseClient) => (params: {
|
|
|
23
23
|
id: string;
|
|
24
24
|
createdAt: string;
|
|
25
25
|
updatedAt: string;
|
|
26
|
-
tenantId: string;
|
|
27
|
-
projectId: string;
|
|
28
26
|
headersSchema: unknown;
|
|
29
27
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
30
28
|
agentId: string;
|
|
29
|
+
projectId: string;
|
|
30
|
+
tenantId: string;
|
|
31
31
|
}[]>;
|
|
32
32
|
declare const listContextConfigsPaginated: (db: DatabaseClient) => (params: {
|
|
33
33
|
scopes: AgentScopeConfig;
|
|
@@ -45,11 +45,11 @@ declare const createContextConfig: (db: DatabaseClient) => (params: ContextConfi
|
|
|
45
45
|
id: string;
|
|
46
46
|
createdAt: string;
|
|
47
47
|
updatedAt: string;
|
|
48
|
-
tenantId: string;
|
|
49
|
-
projectId: string;
|
|
50
48
|
headersSchema: unknown;
|
|
51
49
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
52
50
|
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
53
|
}>;
|
|
54
54
|
declare const updateContextConfig: (db: DatabaseClient) => (params: {
|
|
55
55
|
scopes: AgentScopeConfig;
|
|
@@ -85,11 +85,11 @@ declare const upsertContextConfig: (db: DatabaseClient) => (params: {
|
|
|
85
85
|
id: string;
|
|
86
86
|
createdAt: string;
|
|
87
87
|
updatedAt: string;
|
|
88
|
-
tenantId: string;
|
|
89
|
-
projectId: string;
|
|
90
88
|
headersSchema: unknown;
|
|
91
89
|
contextVariables: Record<string, ContextFetchDefinition> | null;
|
|
92
90
|
agentId: string;
|
|
91
|
+
projectId: string;
|
|
92
|
+
tenantId: string;
|
|
93
93
|
}>;
|
|
94
94
|
//#endregion
|
|
95
95
|
export { countContextConfigs, createContextConfig, deleteContextConfig, getContextConfigById, hasContextConfig, listContextConfigs, listContextConfigsPaginated, updateContextConfig, upsertContextConfig };
|
|
@@ -14,14 +14,14 @@ declare const listConversations: (db: DatabaseClient) => (params: {
|
|
|
14
14
|
total: number;
|
|
15
15
|
}>;
|
|
16
16
|
declare const createConversation: (db: DatabaseClient) => (params: ConversationInsert) => Promise<{
|
|
17
|
-
|
|
17
|
+
metadata: ConversationMetadata | null;
|
|
18
18
|
id: string;
|
|
19
19
|
createdAt: string;
|
|
20
20
|
updatedAt: string;
|
|
21
21
|
userId: string | null;
|
|
22
|
-
metadata: ConversationMetadata | null;
|
|
23
|
-
tenantId: string;
|
|
24
22
|
projectId: string;
|
|
23
|
+
tenantId: string;
|
|
24
|
+
title: string | null;
|
|
25
25
|
activeSubAgentId: string;
|
|
26
26
|
lastContextResolution: string | null;
|
|
27
27
|
}>;
|
|
@@ -65,14 +65,14 @@ declare const getConversation: (db: DatabaseClient) => (params: {
|
|
|
65
65
|
scopes: ProjectScopeConfig;
|
|
66
66
|
conversationId: string;
|
|
67
67
|
}) => Promise<{
|
|
68
|
-
|
|
68
|
+
metadata: ConversationMetadata | null;
|
|
69
69
|
id: string;
|
|
70
70
|
createdAt: string;
|
|
71
71
|
updatedAt: string;
|
|
72
72
|
userId: string | null;
|
|
73
|
-
metadata: ConversationMetadata | null;
|
|
74
|
-
tenantId: string;
|
|
75
73
|
projectId: string;
|
|
74
|
+
tenantId: string;
|
|
75
|
+
title: string | null;
|
|
76
76
|
activeSubAgentId: string;
|
|
77
77
|
lastContextResolution: string | null;
|
|
78
78
|
} | undefined>;
|
|
@@ -89,14 +89,14 @@ declare const createOrGetConversation: (db: DatabaseClient) => (input: Conversat
|
|
|
89
89
|
metadata?: ConversationMetadata | null | undefined;
|
|
90
90
|
contextConfigId?: string | undefined;
|
|
91
91
|
} | {
|
|
92
|
-
|
|
92
|
+
metadata: ConversationMetadata | null;
|
|
93
93
|
id: string;
|
|
94
94
|
createdAt: string;
|
|
95
95
|
updatedAt: string;
|
|
96
96
|
userId: string | null;
|
|
97
|
-
metadata: ConversationMetadata | null;
|
|
98
|
-
tenantId: string;
|
|
99
97
|
projectId: string;
|
|
98
|
+
tenantId: string;
|
|
99
|
+
title: string | null;
|
|
100
100
|
activeSubAgentId: string;
|
|
101
101
|
lastContextResolution: string | null;
|
|
102
102
|
}>;
|
|
@@ -115,14 +115,14 @@ declare const getActiveAgentForConversation: (db: DatabaseClient) => (params: {
|
|
|
115
115
|
scopes: ProjectScopeConfig;
|
|
116
116
|
conversationId: string;
|
|
117
117
|
}) => Promise<{
|
|
118
|
-
|
|
118
|
+
metadata: ConversationMetadata | null;
|
|
119
119
|
id: string;
|
|
120
120
|
createdAt: string;
|
|
121
121
|
updatedAt: string;
|
|
122
122
|
userId: string | null;
|
|
123
|
-
metadata: ConversationMetadata | null;
|
|
124
|
-
tenantId: string;
|
|
125
123
|
projectId: string;
|
|
124
|
+
tenantId: string;
|
|
125
|
+
title: string | null;
|
|
126
126
|
activeSubAgentId: string;
|
|
127
127
|
lastContextResolution: string | null;
|
|
128
128
|
} | undefined>;
|
|
@@ -64,12 +64,12 @@ declare const associateDataComponentWithAgent: (db: DatabaseClient) => (params:
|
|
|
64
64
|
scopes: SubAgentScopeConfig;
|
|
65
65
|
dataComponentId: string;
|
|
66
66
|
}) => Promise<{
|
|
67
|
-
subAgentId: string;
|
|
68
67
|
id: string;
|
|
69
68
|
createdAt: string;
|
|
70
|
-
tenantId: string;
|
|
71
|
-
projectId: string;
|
|
72
69
|
agentId: string;
|
|
70
|
+
projectId: string;
|
|
71
|
+
tenantId: string;
|
|
72
|
+
subAgentId: string;
|
|
73
73
|
dataComponentId: string;
|
|
74
74
|
}>;
|
|
75
75
|
/**
|
|
@@ -106,12 +106,12 @@ declare const upsertAgentDataComponentRelation: (db: DatabaseClient) => (params:
|
|
|
106
106
|
scopes: SubAgentScopeConfig;
|
|
107
107
|
dataComponentId: string;
|
|
108
108
|
}) => Promise<{
|
|
109
|
-
subAgentId: string;
|
|
110
109
|
id: string;
|
|
111
110
|
createdAt: string;
|
|
112
|
-
tenantId: string;
|
|
113
|
-
projectId: string;
|
|
114
111
|
agentId: string;
|
|
112
|
+
projectId: string;
|
|
113
|
+
tenantId: string;
|
|
114
|
+
subAgentId: string;
|
|
115
115
|
dataComponentId: string;
|
|
116
116
|
} | null>;
|
|
117
117
|
/**
|
|
@@ -53,14 +53,14 @@ declare const createFunctionTool: (db: DatabaseClient) => (params: {
|
|
|
53
53
|
data: FunctionToolApiInsert;
|
|
54
54
|
scopes: AgentScopeConfig;
|
|
55
55
|
}) => Promise<{
|
|
56
|
-
description: string | null;
|
|
57
|
-
name: string;
|
|
58
56
|
id: string;
|
|
57
|
+
name: string;
|
|
59
58
|
createdAt: string;
|
|
60
59
|
updatedAt: string;
|
|
61
|
-
tenantId: string;
|
|
62
|
-
projectId: string;
|
|
63
60
|
agentId: string;
|
|
61
|
+
projectId: string;
|
|
62
|
+
tenantId: string;
|
|
63
|
+
description: string | null;
|
|
64
64
|
functionId: string;
|
|
65
65
|
}>;
|
|
66
66
|
/**
|
|
@@ -95,14 +95,14 @@ declare const upsertFunctionTool: (db: DatabaseClient) => (params: {
|
|
|
95
95
|
data: FunctionToolApiInsert;
|
|
96
96
|
scopes: AgentScopeConfig;
|
|
97
97
|
}) => Promise<{
|
|
98
|
-
description: string | null;
|
|
99
|
-
name: string;
|
|
100
98
|
id: string;
|
|
99
|
+
name: string;
|
|
101
100
|
createdAt: string;
|
|
102
101
|
updatedAt: string;
|
|
103
|
-
tenantId: string;
|
|
104
|
-
projectId: string;
|
|
105
102
|
agentId: string;
|
|
103
|
+
projectId: string;
|
|
104
|
+
tenantId: string;
|
|
105
|
+
description: string | null;
|
|
106
106
|
functionId: string;
|
|
107
107
|
}>;
|
|
108
108
|
declare const getFunctionToolsForSubAgent: (db: DatabaseClient) => (params: {
|
|
@@ -9,26 +9,26 @@ declare const getMessageById: (db: DatabaseClient) => (params: {
|
|
|
9
9
|
scopes: ProjectScopeConfig;
|
|
10
10
|
messageId: string;
|
|
11
11
|
}) => Promise<{
|
|
12
|
-
|
|
13
|
-
toSubAgentId: string | null;
|
|
14
|
-
fromExternalAgentId: string | null;
|
|
15
|
-
toExternalAgentId: string | null;
|
|
16
|
-
taskId: string | null;
|
|
17
|
-
a2aTaskId: string | null;
|
|
12
|
+
metadata: MessageMetadata | null;
|
|
18
13
|
id: string;
|
|
19
14
|
createdAt: string;
|
|
20
15
|
updatedAt: string;
|
|
21
|
-
metadata: MessageMetadata | null;
|
|
22
16
|
role: string;
|
|
23
|
-
tenantId: string;
|
|
24
17
|
projectId: string;
|
|
18
|
+
tenantId: string;
|
|
19
|
+
content: MessageContent;
|
|
25
20
|
conversationId: string;
|
|
21
|
+
fromSubAgentId: string | null;
|
|
22
|
+
toSubAgentId: string | null;
|
|
23
|
+
fromExternalAgentId: string | null;
|
|
24
|
+
toExternalAgentId: string | null;
|
|
26
25
|
fromTeamAgentId: string | null;
|
|
27
26
|
toTeamAgentId: string | null;
|
|
28
|
-
content: MessageContent;
|
|
29
27
|
visibility: string;
|
|
30
28
|
messageType: string;
|
|
29
|
+
taskId: string | null;
|
|
31
30
|
parentMessageId: string | null;
|
|
31
|
+
a2aTaskId: string | null;
|
|
32
32
|
a2aSessionId: string | null;
|
|
33
33
|
} | undefined>;
|
|
34
34
|
declare const listMessages: (db: DatabaseClient) => (params: {
|
|
@@ -140,26 +140,26 @@ declare const getVisibleMessages: (db: DatabaseClient) => (params: {
|
|
|
140
140
|
id: string;
|
|
141
141
|
}[]>;
|
|
142
142
|
declare const createMessage: (db: DatabaseClient) => (params: MessageInsert) => Promise<{
|
|
143
|
-
|
|
144
|
-
toSubAgentId: string | null;
|
|
145
|
-
fromExternalAgentId: string | null;
|
|
146
|
-
toExternalAgentId: string | null;
|
|
147
|
-
taskId: string | null;
|
|
148
|
-
a2aTaskId: string | null;
|
|
143
|
+
metadata: MessageMetadata | null;
|
|
149
144
|
id: string;
|
|
150
145
|
createdAt: string;
|
|
151
146
|
updatedAt: string;
|
|
152
|
-
metadata: MessageMetadata | null;
|
|
153
147
|
role: string;
|
|
154
|
-
tenantId: string;
|
|
155
148
|
projectId: string;
|
|
149
|
+
tenantId: string;
|
|
150
|
+
content: MessageContent;
|
|
156
151
|
conversationId: string;
|
|
152
|
+
fromSubAgentId: string | null;
|
|
153
|
+
toSubAgentId: string | null;
|
|
154
|
+
fromExternalAgentId: string | null;
|
|
155
|
+
toExternalAgentId: string | null;
|
|
157
156
|
fromTeamAgentId: string | null;
|
|
158
157
|
toTeamAgentId: string | null;
|
|
159
|
-
content: MessageContent;
|
|
160
158
|
visibility: string;
|
|
161
159
|
messageType: string;
|
|
160
|
+
taskId: string | null;
|
|
162
161
|
parentMessageId: string | null;
|
|
162
|
+
a2aTaskId: string | null;
|
|
163
163
|
a2aSessionId: string | null;
|
|
164
164
|
}>;
|
|
165
165
|
declare const updateMessage: (db: DatabaseClient) => (params: {
|
|
@@ -193,26 +193,26 @@ declare const deleteMessage: (db: DatabaseClient) => (params: {
|
|
|
193
193
|
scopes: ProjectScopeConfig;
|
|
194
194
|
messageId: string;
|
|
195
195
|
}) => Promise<{
|
|
196
|
-
|
|
197
|
-
toSubAgentId: string | null;
|
|
198
|
-
fromExternalAgentId: string | null;
|
|
199
|
-
toExternalAgentId: string | null;
|
|
200
|
-
taskId: string | null;
|
|
201
|
-
a2aTaskId: string | null;
|
|
196
|
+
metadata: MessageMetadata | null;
|
|
202
197
|
id: string;
|
|
203
198
|
createdAt: string;
|
|
204
199
|
updatedAt: string;
|
|
205
|
-
metadata: MessageMetadata | null;
|
|
206
200
|
role: string;
|
|
207
|
-
tenantId: string;
|
|
208
201
|
projectId: string;
|
|
202
|
+
tenantId: string;
|
|
203
|
+
content: MessageContent;
|
|
209
204
|
conversationId: string;
|
|
205
|
+
fromSubAgentId: string | null;
|
|
206
|
+
toSubAgentId: string | null;
|
|
207
|
+
fromExternalAgentId: string | null;
|
|
208
|
+
toExternalAgentId: string | null;
|
|
210
209
|
fromTeamAgentId: string | null;
|
|
211
210
|
toTeamAgentId: string | null;
|
|
212
|
-
content: MessageContent;
|
|
213
211
|
visibility: string;
|
|
214
212
|
messageType: string;
|
|
213
|
+
taskId: string | null;
|
|
215
214
|
parentMessageId: string | null;
|
|
215
|
+
a2aTaskId: string | null;
|
|
216
216
|
a2aSessionId: string | null;
|
|
217
217
|
}>;
|
|
218
218
|
declare const countMessagesByConversation: (db: DatabaseClient) => (params: {
|
|
@@ -8,14 +8,14 @@ declare const getSubAgentExternalAgentRelationById: (db: DatabaseClient) => (par
|
|
|
8
8
|
scopes: SubAgentScopeConfig;
|
|
9
9
|
relationId: string;
|
|
10
10
|
}) => Promise<{
|
|
11
|
-
|
|
11
|
+
headers: Record<string, string> | null;
|
|
12
12
|
id: string;
|
|
13
13
|
createdAt: string;
|
|
14
14
|
updatedAt: string;
|
|
15
|
-
headers: Record<string, string> | null;
|
|
16
|
-
tenantId: string;
|
|
17
|
-
projectId: string;
|
|
18
15
|
agentId: string;
|
|
16
|
+
projectId: string;
|
|
17
|
+
tenantId: string;
|
|
18
|
+
subAgentId: string;
|
|
19
19
|
externalAgentId: string;
|
|
20
20
|
} | undefined>;
|
|
21
21
|
declare const listSubAgentExternalAgentRelations: (db: DatabaseClient) => (params: {
|
|
@@ -43,27 +43,27 @@ declare const listSubAgentExternalAgentRelations: (db: DatabaseClient) => (param
|
|
|
43
43
|
declare const getSubAgentExternalAgentRelations: (db: DatabaseClient) => (params: {
|
|
44
44
|
scopes: SubAgentScopeConfig;
|
|
45
45
|
}) => Promise<{
|
|
46
|
-
|
|
46
|
+
headers: Record<string, string> | null;
|
|
47
47
|
id: string;
|
|
48
48
|
createdAt: string;
|
|
49
49
|
updatedAt: string;
|
|
50
|
-
headers: Record<string, string> | null;
|
|
51
|
-
tenantId: string;
|
|
52
|
-
projectId: string;
|
|
53
50
|
agentId: string;
|
|
51
|
+
projectId: string;
|
|
52
|
+
tenantId: string;
|
|
53
|
+
subAgentId: string;
|
|
54
54
|
externalAgentId: string;
|
|
55
55
|
}[]>;
|
|
56
56
|
declare const getSubAgentExternalAgentRelationsByAgent: (db: DatabaseClient) => (params: {
|
|
57
57
|
scopes: AgentScopeConfig;
|
|
58
58
|
}) => Promise<{
|
|
59
|
-
|
|
59
|
+
headers: Record<string, string> | null;
|
|
60
60
|
id: string;
|
|
61
61
|
createdAt: string;
|
|
62
62
|
updatedAt: string;
|
|
63
|
-
headers: Record<string, string> | null;
|
|
64
|
-
tenantId: string;
|
|
65
|
-
projectId: string;
|
|
66
63
|
agentId: string;
|
|
64
|
+
projectId: string;
|
|
65
|
+
tenantId: string;
|
|
66
|
+
subAgentId: string;
|
|
67
67
|
externalAgentId: string;
|
|
68
68
|
}[]>;
|
|
69
69
|
declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: DatabaseClient) => (params: {
|
|
@@ -179,14 +179,14 @@ declare const createSubAgentExternalAgentRelation: (db: DatabaseClient) => (para
|
|
|
179
179
|
headers?: Record<string, string> | null;
|
|
180
180
|
};
|
|
181
181
|
}) => Promise<{
|
|
182
|
-
|
|
182
|
+
headers: Record<string, string> | null;
|
|
183
183
|
id: string;
|
|
184
184
|
createdAt: string;
|
|
185
185
|
updatedAt: string;
|
|
186
|
-
headers: Record<string, string> | null;
|
|
187
|
-
tenantId: string;
|
|
188
|
-
projectId: string;
|
|
189
186
|
agentId: string;
|
|
187
|
+
projectId: string;
|
|
188
|
+
tenantId: string;
|
|
189
|
+
subAgentId: string;
|
|
190
190
|
externalAgentId: string;
|
|
191
191
|
}>;
|
|
192
192
|
/**
|
|
@@ -196,14 +196,14 @@ declare const getSubAgentExternalAgentRelationByParams: (db: DatabaseClient) =>
|
|
|
196
196
|
scopes: SubAgentScopeConfig;
|
|
197
197
|
externalAgentId: string;
|
|
198
198
|
}) => Promise<{
|
|
199
|
-
|
|
199
|
+
headers: Record<string, string> | null;
|
|
200
200
|
id: string;
|
|
201
201
|
createdAt: string;
|
|
202
202
|
updatedAt: string;
|
|
203
|
-
headers: Record<string, string> | null;
|
|
204
|
-
tenantId: string;
|
|
205
|
-
projectId: string;
|
|
206
203
|
agentId: string;
|
|
204
|
+
projectId: string;
|
|
205
|
+
tenantId: string;
|
|
206
|
+
subAgentId: string;
|
|
207
207
|
externalAgentId: string;
|
|
208
208
|
} | undefined>;
|
|
209
209
|
/**
|
|
@@ -217,14 +217,14 @@ declare const upsertSubAgentExternalAgentRelation: (db: DatabaseClient) => (para
|
|
|
217
217
|
headers?: Record<string, string> | null;
|
|
218
218
|
};
|
|
219
219
|
}) => Promise<{
|
|
220
|
-
|
|
220
|
+
headers: Record<string, string> | null;
|
|
221
221
|
id: string;
|
|
222
222
|
createdAt: string;
|
|
223
223
|
updatedAt: string;
|
|
224
|
-
headers: Record<string, string> | null;
|
|
225
|
-
tenantId: string;
|
|
226
|
-
projectId: string;
|
|
227
224
|
agentId: string;
|
|
225
|
+
projectId: string;
|
|
226
|
+
tenantId: string;
|
|
227
|
+
subAgentId: string;
|
|
228
228
|
externalAgentId: string;
|
|
229
229
|
}>;
|
|
230
230
|
declare const updateSubAgentExternalAgentRelation: (db: DatabaseClient) => (params: {
|
|
@@ -11,9 +11,9 @@ declare const getAgentRelationById: (db: DatabaseClient) => (params: {
|
|
|
11
11
|
id: string;
|
|
12
12
|
createdAt: string;
|
|
13
13
|
updatedAt: string;
|
|
14
|
-
tenantId: string;
|
|
15
|
-
projectId: string;
|
|
16
14
|
agentId: string;
|
|
15
|
+
projectId: string;
|
|
16
|
+
tenantId: string;
|
|
17
17
|
sourceSubAgentId: string;
|
|
18
18
|
targetSubAgentId: string | null;
|
|
19
19
|
relationType: string | null;
|
|
@@ -46,9 +46,9 @@ declare const getAgentRelations: (db: DatabaseClient) => (params: {
|
|
|
46
46
|
id: string;
|
|
47
47
|
createdAt: string;
|
|
48
48
|
updatedAt: string;
|
|
49
|
-
tenantId: string;
|
|
50
|
-
projectId: string;
|
|
51
49
|
agentId: string;
|
|
50
|
+
projectId: string;
|
|
51
|
+
tenantId: string;
|
|
52
52
|
sourceSubAgentId: string;
|
|
53
53
|
targetSubAgentId: string | null;
|
|
54
54
|
relationType: string | null;
|
|
@@ -59,9 +59,9 @@ declare const getAgentRelationsByAgent: (db: DatabaseClient) => (params: {
|
|
|
59
59
|
id: string;
|
|
60
60
|
createdAt: string;
|
|
61
61
|
updatedAt: string;
|
|
62
|
-
tenantId: string;
|
|
63
|
-
projectId: string;
|
|
64
62
|
agentId: string;
|
|
63
|
+
projectId: string;
|
|
64
|
+
tenantId: string;
|
|
65
65
|
sourceSubAgentId: string;
|
|
66
66
|
targetSubAgentId: string | null;
|
|
67
67
|
relationType: string | null;
|
|
@@ -128,9 +128,9 @@ declare const createSubAgentRelation: (db: DatabaseClient) => (params: SubAgentR
|
|
|
128
128
|
id: string;
|
|
129
129
|
createdAt: string;
|
|
130
130
|
updatedAt: string;
|
|
131
|
-
tenantId: string;
|
|
132
|
-
projectId: string;
|
|
133
131
|
agentId: string;
|
|
132
|
+
projectId: string;
|
|
133
|
+
tenantId: string;
|
|
134
134
|
sourceSubAgentId: string;
|
|
135
135
|
targetSubAgentId: string | null;
|
|
136
136
|
relationType: string | null;
|
|
@@ -147,9 +147,9 @@ declare const getAgentRelationByParams: (db: DatabaseClient) => (params: {
|
|
|
147
147
|
id: string;
|
|
148
148
|
createdAt: string;
|
|
149
149
|
updatedAt: string;
|
|
150
|
-
tenantId: string;
|
|
151
|
-
projectId: string;
|
|
152
150
|
agentId: string;
|
|
151
|
+
projectId: string;
|
|
152
|
+
tenantId: string;
|
|
153
153
|
sourceSubAgentId: string;
|
|
154
154
|
targetSubAgentId: string | null;
|
|
155
155
|
relationType: string | null;
|
|
@@ -161,9 +161,9 @@ declare const upsertSubAgentRelation: (db: DatabaseClient) => (params: SubAgentR
|
|
|
161
161
|
id: string;
|
|
162
162
|
createdAt: string;
|
|
163
163
|
updatedAt: string;
|
|
164
|
-
tenantId: string;
|
|
165
|
-
projectId: string;
|
|
166
164
|
agentId: string;
|
|
165
|
+
projectId: string;
|
|
166
|
+
tenantId: string;
|
|
167
167
|
sourceSubAgentId: string;
|
|
168
168
|
targetSubAgentId: string | null;
|
|
169
169
|
relationType: string | null;
|
|
@@ -203,15 +203,15 @@ declare const createAgentToolRelation: (db: DatabaseClient) => (params: {
|
|
|
203
203
|
}> | null;
|
|
204
204
|
};
|
|
205
205
|
}) => Promise<{
|
|
206
|
-
|
|
206
|
+
headers: Record<string, string> | null;
|
|
207
207
|
id: string;
|
|
208
208
|
createdAt: string;
|
|
209
209
|
updatedAt: string;
|
|
210
|
-
headers: Record<string, string> | null;
|
|
211
|
-
tenantId: string;
|
|
212
|
-
projectId: string;
|
|
213
210
|
agentId: string;
|
|
211
|
+
projectId: string;
|
|
212
|
+
tenantId: string;
|
|
214
213
|
toolId: string;
|
|
214
|
+
subAgentId: string;
|
|
215
215
|
selectedTools: string[] | null;
|
|
216
216
|
toolPolicies: Record<string, {
|
|
217
217
|
needsApproval?: boolean;
|
|
@@ -247,15 +247,15 @@ declare const getAgentToolRelationById: (db: DatabaseClient) => (params: {
|
|
|
247
247
|
scopes: SubAgentScopeConfig;
|
|
248
248
|
relationId: string;
|
|
249
249
|
}) => Promise<{
|
|
250
|
-
|
|
250
|
+
headers: Record<string, string> | null;
|
|
251
251
|
id: string;
|
|
252
252
|
createdAt: string;
|
|
253
253
|
updatedAt: string;
|
|
254
|
-
headers: Record<string, string> | null;
|
|
255
|
-
tenantId: string;
|
|
256
|
-
projectId: string;
|
|
257
254
|
agentId: string;
|
|
255
|
+
projectId: string;
|
|
256
|
+
tenantId: string;
|
|
258
257
|
toolId: string;
|
|
258
|
+
subAgentId: string;
|
|
259
259
|
selectedTools: string[] | null;
|
|
260
260
|
toolPolicies: Record<string, {
|
|
261
261
|
needsApproval?: boolean;
|