@inkeep/agents-core 0.62.0 → 0.62.2

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/init.js CHANGED
@@ -123,6 +123,16 @@ async function init() {
123
123
  const playgroundAppId = process.env.INKEEP_PLAYGROUND_APP_ID || "app_playground";
124
124
  const tempJwtPublicKeyB64 = process.env.INKEEP_AGENTS_TEMP_JWT_PUBLIC_KEY;
125
125
  console.log(`\nšŸŽ® Checking/creating playground app: ${playgroundAppId}`);
126
+ let allowedDomains = ["localhost", "127.0.0.1"];
127
+ const manageUiUrl = process.env.INKEEP_AGENTS_MANAGE_UI_URL;
128
+ if (manageUiUrl) try {
129
+ const url = new URL(manageUiUrl);
130
+ if (url.hostname === "localhost" || url.hostname === "127.0.0.1") allowedDomains = ["localhost", "127.0.0.1"];
131
+ else allowedDomains = [url.hostname];
132
+ } catch {
133
+ console.log(` āš ļø Invalid INKEEP_AGENTS_MANAGE_UI_URL: ${manageUiUrl}, using localhost defaults`);
134
+ }
135
+ console.log(` šŸ“‹ Playground allowed domains: ${JSON.stringify(allowedDomains)}`);
126
136
  if (await getAppById(dbClient)(playgroundAppId)) console.log(` ā„¹ļø Playground app already exists: ${playgroundAppId}`);
127
137
  else {
128
138
  const publicKeys = [];
@@ -140,7 +150,7 @@ async function init() {
140
150
  const config = {
141
151
  type: "web_client",
142
152
  webClient: {
143
- allowedDomains: ["*"],
153
+ allowedDomains,
144
154
  ...publicKeys.length > 0 ? { auth: {
145
155
  publicKeys,
146
156
  validateScopeClaims: true
@@ -159,7 +169,7 @@ async function init() {
159
169
  enabled: true,
160
170
  config
161
171
  });
162
- console.log(` āœ… Playground app created: ${playgroundAppId}`);
172
+ console.log(` āœ… Playground app created: ${playgroundAppId} (domains: ${JSON.stringify(allowedDomains)})`);
163
173
  if (publicKeys.length > 0) console.log(` āœ… RSA public key configured (kid: playground-rsa)`);
164
174
  }
165
175
  console.log("\n================================================");
@@ -5,25 +5,25 @@ import { organizationClient } from "better-auth/client/plugins";
5
5
  //#region src/auth/permissions.d.ts
6
6
  declare const ac: AccessControl;
7
7
  declare const memberRole: {
8
- authorize<K_1 extends "organization" | "invitation" | "member" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins4.Subset<"organization" | "invitation" | "member" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key] | {
9
- actions: better_auth_plugins4.Subset<"organization" | "invitation" | "member" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key];
8
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key] | {
9
+ actions: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key];
10
10
  connector: "OR" | "AND";
11
11
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins4.AuthorizeResponse;
12
- statements: better_auth_plugins4.Subset<"organization" | "invitation" | "member" | "project" | "team" | "ac", better_auth_plugins4.Statements>;
12
+ statements: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>;
13
13
  };
14
14
  declare const adminRole: {
15
- authorize<K_1 extends "organization" | "invitation" | "member" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins4.Subset<"organization" | "invitation" | "member" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key] | {
16
- actions: better_auth_plugins4.Subset<"organization" | "invitation" | "member" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key];
15
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key] | {
16
+ actions: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key];
17
17
  connector: "OR" | "AND";
18
18
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins4.AuthorizeResponse;
19
- statements: better_auth_plugins4.Subset<"organization" | "invitation" | "member" | "project" | "team" | "ac", better_auth_plugins4.Statements>;
19
+ statements: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>;
20
20
  };
21
21
  declare const ownerRole: {
22
- authorize<K_1 extends "organization" | "invitation" | "member" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins4.Subset<"organization" | "invitation" | "member" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key] | {
23
- actions: better_auth_plugins4.Subset<"organization" | "invitation" | "member" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key];
22
+ authorize<K_1 extends "organization" | "member" | "invitation" | "project" | "team" | "ac">(request: K_1 extends infer T extends K ? { [key in T]?: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key] | {
23
+ actions: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>[key];
24
24
  connector: "OR" | "AND";
25
25
  } | undefined } : never, connector?: "OR" | "AND"): better_auth_plugins4.AuthorizeResponse;
26
- statements: better_auth_plugins4.Subset<"organization" | "invitation" | "member" | "project" | "team" | "ac", better_auth_plugins4.Statements>;
26
+ statements: better_auth_plugins4.Subset<"organization" | "member" | "invitation" | "project" | "team" | "ac", better_auth_plugins4.Statements>;
27
27
  };
28
28
  //#endregion
29
29
  export { ac, adminRole, memberRole, organizationClient, ownerRole };
@@ -1,9 +1,11 @@
1
1
  //#region src/constants/allowed-file-formats.d.ts
2
2
  declare const ALLOWED_IMAGE_MIME_TYPES: Set<string>;
3
+ declare const ALLOWED_TEXT_DOCUMENT_MIME_TYPES: Set<string>;
3
4
  declare const DATA_URI_IMAGE_BASE64_REGEX: RegExp;
4
5
  declare const DATA_URI_PDF_BASE64_REGEX: RegExp;
6
+ declare const DATA_URI_TEXT_BASE64_REGEX: RegExp;
5
7
  declare function normalizeMimeType(mimeType: string): string;
6
8
  declare function getExtensionFromMimeType(mimeType?: string): string;
7
9
  declare function getMimeTypeFromExtension(extension?: string): string;
8
10
  //#endregion
9
- export { ALLOWED_IMAGE_MIME_TYPES, DATA_URI_IMAGE_BASE64_REGEX, DATA_URI_PDF_BASE64_REGEX, getExtensionFromMimeType, getMimeTypeFromExtension, normalizeMimeType };
11
+ export { ALLOWED_IMAGE_MIME_TYPES, ALLOWED_TEXT_DOCUMENT_MIME_TYPES, DATA_URI_IMAGE_BASE64_REGEX, DATA_URI_PDF_BASE64_REGEX, DATA_URI_TEXT_BASE64_REGEX, getExtensionFromMimeType, getMimeTypeFromExtension, normalizeMimeType };
@@ -4,19 +4,42 @@ const ALLOWED_IMAGE_MIME_TYPES = new Set([
4
4
  "image/jpeg",
5
5
  "image/webp"
6
6
  ]);
7
+ const ALLOWED_TEXT_DOCUMENT_MIME_TYPES = new Set([
8
+ "text/plain",
9
+ "text/markdown",
10
+ "text/html",
11
+ "text/csv",
12
+ "text/x-log",
13
+ "application/json"
14
+ ]);
7
15
  const FILE_MIME_TYPE_TO_EXTENSION = {
8
16
  "image/png": "png",
9
17
  "image/jpeg": "jpg",
10
18
  "image/jpg": "jpg",
11
19
  "image/webp": "webp",
12
- "application/pdf": "pdf"
20
+ "application/pdf": "pdf",
21
+ "text/plain": "txt",
22
+ "text/markdown": "md",
23
+ "text/html": "html",
24
+ "text/csv": "csv",
25
+ "text/x-log": "log",
26
+ "application/json": "json"
13
27
  };
14
28
  const FILE_EXTENSION_TO_MIME_TYPE = {
15
29
  png: "image/png",
16
30
  jpg: "image/jpeg",
17
31
  jpeg: "image/jpeg",
18
32
  webp: "image/webp",
19
- pdf: "application/pdf"
33
+ pdf: "application/pdf",
34
+ txt: "text/plain",
35
+ text: "text/plain",
36
+ md: "text/markdown",
37
+ markdown: "text/markdown",
38
+ html: "text/html",
39
+ htm: "text/html",
40
+ csv: "text/csv",
41
+ log: "text/x-log",
42
+ json: "application/json"
20
43
  };
21
44
  const dataUriSubtypes = Array.from(ALLOWED_IMAGE_MIME_TYPES).flatMap((mime) => {
22
45
  const subtype = mime.replace("image/", "");
@@ -24,6 +47,7 @@ const dataUriSubtypes = Array.from(ALLOWED_IMAGE_MIME_TYPES).flatMap((mime) => {
24
47
  });
25
48
  const DATA_URI_IMAGE_BASE64_REGEX = /* @__PURE__ */ new RegExp(`^data:image/(${dataUriSubtypes.join("|")});base64,`);
26
49
  const DATA_URI_PDF_BASE64_REGEX = /^data:application\/pdf;base64,/;
50
+ const DATA_URI_TEXT_BASE64_REGEX = /^data:(text\/(plain|markdown|html|csv|x-log)|application\/json);base64,/;
27
51
  function normalizeMimeType(mimeType) {
28
52
  return mimeType.split(";")[0]?.trim().toLowerCase() || "";
29
53
  }
@@ -38,4 +62,4 @@ function getMimeTypeFromExtension(extension) {
38
62
  }
39
63
 
40
64
  //#endregion
41
- export { ALLOWED_IMAGE_MIME_TYPES, DATA_URI_IMAGE_BASE64_REGEX, DATA_URI_PDF_BASE64_REGEX, getExtensionFromMimeType, getMimeTypeFromExtension, normalizeMimeType };
65
+ export { ALLOWED_IMAGE_MIME_TYPES, ALLOWED_TEXT_DOCUMENT_MIME_TYPES, DATA_URI_IMAGE_BASE64_REGEX, DATA_URI_PDF_BASE64_REGEX, DATA_URI_TEXT_BASE64_REGEX, getExtensionFromMimeType, getMimeTypeFromExtension, normalizeMimeType };
@@ -10,13 +10,15 @@ import { PgColumn } from "drizzle-orm/pg-core";
10
10
  declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
11
11
  scopes: AgentScopeConfig;
12
12
  }) => Promise<{
13
- name: string;
14
13
  id: string;
14
+ name: string;
15
15
  createdAt: string;
16
16
  updatedAt: string;
17
17
  description: string | null;
18
18
  tenantId: string;
19
19
  projectId: string;
20
+ defaultSubAgentId: string | null;
21
+ contextConfigId: string | null;
20
22
  models: {
21
23
  base?: {
22
24
  model?: string | undefined;
@@ -31,11 +33,6 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
31
33
  providerOptions?: Record<string, unknown> | undefined;
32
34
  } | undefined;
33
35
  } | null;
34
- stopWhen: {
35
- transferCountIs?: number | undefined;
36
- } | null;
37
- defaultSubAgentId: string | null;
38
- contextConfigId: string | null;
39
36
  prompt: string | null;
40
37
  statusUpdates: {
41
38
  enabled?: boolean | undefined;
@@ -52,18 +49,23 @@ declare const getAgentById: (db: AgentsManageDatabaseClient) => (params: {
52
49
  } | undefined;
53
50
  }[] | undefined;
54
51
  } | null;
52
+ stopWhen: {
53
+ transferCountIs?: number | undefined;
54
+ } | null;
55
55
  executionMode: "classic" | "durable";
56
56
  } | null>;
57
57
  declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (params: {
58
58
  scopes: AgentScopeConfig;
59
59
  }) => Promise<{
60
- name: string;
61
60
  id: string;
61
+ name: string;
62
62
  createdAt: string;
63
63
  updatedAt: string;
64
64
  description: string | null;
65
65
  tenantId: string;
66
66
  projectId: string;
67
+ defaultSubAgentId: string | null;
68
+ contextConfigId: string | null;
67
69
  models: {
68
70
  base?: {
69
71
  model?: string | undefined;
@@ -78,11 +80,6 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
78
80
  providerOptions?: Record<string, unknown> | undefined;
79
81
  } | undefined;
80
82
  } | null;
81
- stopWhen: {
82
- transferCountIs?: number | undefined;
83
- } | null;
84
- defaultSubAgentId: string | null;
85
- contextConfigId: string | null;
86
83
  prompt: string | null;
87
84
  statusUpdates: {
88
85
  enabled?: boolean | undefined;
@@ -99,15 +96,19 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
99
96
  } | undefined;
100
97
  }[] | undefined;
101
98
  } | null;
99
+ stopWhen: {
100
+ transferCountIs?: number | undefined;
101
+ } | null;
102
102
  executionMode: "classic" | "durable";
103
103
  defaultSubAgent: {
104
- name: string;
105
104
  id: string;
105
+ name: string;
106
106
  createdAt: string;
107
107
  updatedAt: string;
108
108
  description: string | null;
109
109
  tenantId: string;
110
110
  projectId: string;
111
+ agentId: string;
111
112
  models: {
112
113
  base?: {
113
114
  model?: string | undefined;
@@ -122,24 +123,25 @@ declare const getAgentWithDefaultSubAgent: (db: AgentsManageDatabaseClient) => (
122
123
  providerOptions?: Record<string, unknown> | undefined;
123
124
  } | undefined;
124
125
  } | null;
126
+ prompt: string | null;
125
127
  stopWhen: {
126
128
  stepCountIs?: number | undefined;
127
129
  } | null;
128
- agentId: string;
129
- prompt: string | null;
130
130
  conversationHistoryConfig: ConversationHistoryConfig | null;
131
131
  } | null;
132
132
  } | null>;
133
133
  declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
134
134
  scopes: ProjectScopeConfig;
135
135
  }) => Promise<{
136
- name: string;
137
136
  id: string;
137
+ name: string;
138
138
  createdAt: string;
139
139
  updatedAt: string;
140
140
  description: string | null;
141
141
  tenantId: string;
142
142
  projectId: string;
143
+ defaultSubAgentId: string | null;
144
+ contextConfigId: string | null;
143
145
  models: {
144
146
  base?: {
145
147
  model?: string | undefined;
@@ -154,11 +156,6 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
154
156
  providerOptions?: Record<string, unknown> | undefined;
155
157
  } | undefined;
156
158
  } | null;
157
- stopWhen: {
158
- transferCountIs?: number | undefined;
159
- } | null;
160
- defaultSubAgentId: string | null;
161
- contextConfigId: string | null;
162
159
  prompt: string | null;
163
160
  statusUpdates: {
164
161
  enabled?: boolean | undefined;
@@ -175,6 +172,9 @@ declare const listAgents: (db: AgentsManageDatabaseClient) => (params: {
175
172
  } | undefined;
176
173
  }[] | undefined;
177
174
  } | null;
175
+ stopWhen: {
176
+ transferCountIs?: number | undefined;
177
+ } | null;
178
178
  executionMode: "classic" | "durable";
179
179
  }[]>;
180
180
  declare const listAgentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
@@ -251,13 +251,15 @@ declare function listAgentsAcrossProjectMainBranches(db: AgentsManageDatabaseCli
251
251
  projectIds: string[];
252
252
  }): Promise<AvailableAgentInfo[]>;
253
253
  declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInsert) => Promise<{
254
- name: string;
255
254
  id: string;
255
+ name: string;
256
256
  createdAt: string;
257
257
  updatedAt: string;
258
258
  description: string | null;
259
259
  tenantId: string;
260
260
  projectId: string;
261
+ defaultSubAgentId: string | null;
262
+ contextConfigId: string | null;
261
263
  models: {
262
264
  base?: {
263
265
  model?: string | undefined;
@@ -272,11 +274,6 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
272
274
  providerOptions?: Record<string, unknown> | undefined;
273
275
  } | undefined;
274
276
  } | null;
275
- stopWhen: {
276
- transferCountIs?: number | undefined;
277
- } | null;
278
- defaultSubAgentId: string | null;
279
- contextConfigId: string | null;
280
277
  prompt: string | null;
281
278
  statusUpdates: {
282
279
  enabled?: boolean | undefined;
@@ -293,6 +290,9 @@ declare const createAgent: (db: AgentsManageDatabaseClient) => (data: AgentInser
293
290
  } | undefined;
294
291
  }[] | undefined;
295
292
  } | null;
293
+ stopWhen: {
294
+ transferCountIs?: number | undefined;
295
+ } | null;
296
296
  executionMode: "classic" | "durable";
297
297
  }>;
298
298
  declare const updateAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -9,8 +9,8 @@ declare const getArtifactComponentById: (db: AgentsManageDatabaseClient) => (par
9
9
  scopes: ProjectScopeConfig;
10
10
  id: string;
11
11
  }) => Promise<{
12
- name: string;
13
12
  id: string;
13
+ name: string;
14
14
  createdAt: string;
15
15
  updatedAt: string;
16
16
  description: string | null;
@@ -65,8 +65,8 @@ declare const listArtifactComponentsPaginated: (db: AgentsManageDatabaseClient)
65
65
  };
66
66
  }>;
67
67
  declare const createArtifactComponent: (db: AgentsManageDatabaseClient) => (params: ArtifactComponentInsert) => Promise<{
68
- name: string;
69
68
  id: string;
69
+ name: string;
70
70
  createdAt: string;
71
71
  updatedAt: string;
72
72
  description: string | null;
@@ -145,8 +145,8 @@ declare const associateArtifactComponentWithAgent: (db: AgentsManageDatabaseClie
145
145
  createdAt: string;
146
146
  tenantId: string;
147
147
  projectId: string;
148
- subAgentId: string;
149
148
  agentId: string;
149
+ subAgentId: string;
150
150
  artifactComponentId: string;
151
151
  }>;
152
152
  declare const removeArtifactComponentFromAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -188,8 +188,8 @@ declare const upsertAgentArtifactComponentRelation: (db: AgentsManageDatabaseCli
188
188
  createdAt: string;
189
189
  tenantId: string;
190
190
  projectId: string;
191
- subAgentId: string;
192
191
  agentId: string;
192
+ subAgentId: string;
193
193
  artifactComponentId: string;
194
194
  } | null>;
195
195
  /**
@@ -69,8 +69,8 @@ declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient)
69
69
  createdAt: string;
70
70
  tenantId: string;
71
71
  projectId: string;
72
- subAgentId: string;
73
72
  agentId: string;
73
+ subAgentId: string;
74
74
  dataComponentId: string;
75
75
  }>;
76
76
  /**
@@ -111,8 +111,8 @@ declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient)
111
111
  createdAt: string;
112
112
  tenantId: string;
113
113
  projectId: string;
114
- subAgentId: string;
115
114
  agentId: string;
115
+ subAgentId: string;
116
116
  dataComponentId: string;
117
117
  } | null>;
118
118
  /**
@@ -53,8 +53,8 @@ declare const createFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
53
53
  data: FunctionToolApiInsert;
54
54
  scopes: AgentScopeConfig;
55
55
  }) => Promise<{
56
- name: string;
57
56
  id: string;
57
+ name: string;
58
58
  createdAt: string;
59
59
  updatedAt: string;
60
60
  description: string | null;
@@ -95,8 +95,8 @@ declare const upsertFunctionTool: (db: AgentsManageDatabaseClient) => (params: {
95
95
  data: FunctionToolApiInsert;
96
96
  scopes: AgentScopeConfig;
97
97
  }) => Promise<{
98
- name: string;
99
98
  id: string;
99
+ name: string;
100
100
  createdAt: string;
101
101
  updatedAt: string;
102
102
  description: string | null;
@@ -162,12 +162,12 @@ declare const addFunctionToolToSubAgent: (db: AgentsManageDatabaseClient) => (pa
162
162
  updatedAt: string;
163
163
  tenantId: string;
164
164
  projectId: string;
165
- subAgentId: string;
166
165
  agentId: string;
166
+ subAgentId: string;
167
+ functionToolId: string;
167
168
  toolPolicies: Record<string, {
168
169
  needsApproval?: boolean;
169
170
  }> | null;
170
- functionToolId: string;
171
171
  }>;
172
172
  /**
173
173
  * Update an agent-function tool relation
@@ -227,12 +227,12 @@ declare const associateFunctionToolWithSubAgent: (db: AgentsManageDatabaseClient
227
227
  updatedAt: string;
228
228
  tenantId: string;
229
229
  projectId: string;
230
- subAgentId: string;
231
230
  agentId: string;
231
+ subAgentId: string;
232
+ functionToolId: string;
232
233
  toolPolicies: Record<string, {
233
234
  needsApproval?: boolean;
234
235
  }> | null;
235
- functionToolId: string;
236
236
  }>;
237
237
  //#endregion
238
238
  export { addFunctionToolToSubAgent, associateFunctionToolWithSubAgent, createFunctionTool, deleteFunctionTool, getFunctionToolById, getFunctionToolsForSubAgent, getSubAgentsUsingFunctionTool, isFunctionToolAssociatedWithSubAgent, listFunctionTools, removeFunctionToolFromSubAgent, updateFunctionTool, updateSubAgentFunctionToolRelation, upsertFunctionTool, upsertSubAgentFunctionToolRelation };
@@ -8,11 +8,11 @@ declare const getSkillById: (db: AgentsManageDatabaseClient) => (params: {
8
8
  scopes: ProjectScopeConfig;
9
9
  skillId: string;
10
10
  }) => Promise<{
11
- metadata: Record<string, string> | null;
12
- name: string;
13
11
  id: string;
12
+ name: string;
14
13
  createdAt: string;
15
14
  updatedAt: string;
15
+ metadata: Record<string, string> | null;
16
16
  description: string;
17
17
  content: string;
18
18
  tenantId: string;
@@ -41,22 +41,22 @@ declare const listSkills: (db: AgentsManageDatabaseClient) => (params: {
41
41
  };
42
42
  }>;
43
43
  declare const createSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
44
- metadata: Record<string, string> | null;
45
- name: string;
46
44
  id: string;
45
+ name: string;
47
46
  createdAt: string;
48
47
  updatedAt: string;
48
+ metadata: Record<string, string> | null;
49
49
  description: string;
50
50
  content: string;
51
51
  tenantId: string;
52
52
  projectId: string;
53
53
  }>;
54
54
  declare const upsertSkill: (db: AgentsManageDatabaseClient) => (data: SkillInsert) => Promise<{
55
- metadata: Record<string, string> | null;
56
- name: string;
57
55
  id: string;
56
+ name: string;
58
57
  createdAt: string;
59
58
  updatedAt: string;
59
+ metadata: Record<string, string> | null;
60
60
  description: string;
61
61
  content: string;
62
62
  tenantId: string;
@@ -96,8 +96,8 @@ declare const upsertSubAgentSkill: (db: AgentsManageDatabaseClient) => (params:
96
96
  updatedAt: string;
97
97
  tenantId: string;
98
98
  projectId: string;
99
- subAgentId: string;
100
99
  agentId: string;
100
+ subAgentId: string;
101
101
  skillId: string;
102
102
  index: number;
103
103
  alwaysLoaded: boolean;
@@ -9,14 +9,14 @@ declare const getSubAgentExternalAgentRelationById: (db: AgentsManageDatabaseCli
9
9
  scopes: SubAgentScopeConfig;
10
10
  relationId: string;
11
11
  }) => Promise<{
12
- headers: Record<string, string> | null;
13
12
  id: string;
14
13
  createdAt: string;
15
14
  updatedAt: string;
15
+ headers: Record<string, string> | null;
16
16
  tenantId: string;
17
17
  projectId: string;
18
- subAgentId: string;
19
18
  agentId: string;
19
+ subAgentId: string;
20
20
  externalAgentId: string;
21
21
  } | undefined>;
22
22
  declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
@@ -44,27 +44,27 @@ declare const listSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClien
44
44
  declare const getSubAgentExternalAgentRelations: (db: AgentsManageDatabaseClient) => (params: {
45
45
  scopes: SubAgentScopeConfig;
46
46
  }) => Promise<{
47
- headers: Record<string, string> | null;
48
47
  id: string;
49
48
  createdAt: string;
50
49
  updatedAt: string;
50
+ headers: Record<string, string> | null;
51
51
  tenantId: string;
52
52
  projectId: string;
53
- subAgentId: string;
54
53
  agentId: string;
54
+ subAgentId: string;
55
55
  externalAgentId: string;
56
56
  }[]>;
57
57
  declare const getSubAgentExternalAgentRelationsByAgent: (db: AgentsManageDatabaseClient) => (params: {
58
58
  scopes: AgentScopeConfig;
59
59
  }) => Promise<{
60
- headers: Record<string, string> | null;
61
60
  id: string;
62
61
  createdAt: string;
63
62
  updatedAt: string;
63
+ headers: Record<string, string> | null;
64
64
  tenantId: string;
65
65
  projectId: string;
66
- subAgentId: string;
67
66
  agentId: string;
67
+ subAgentId: string;
68
68
  externalAgentId: string;
69
69
  }[]>;
70
70
  declare const getSubAgentExternalAgentRelationsByExternalAgent: (db: AgentsManageDatabaseClient) => (params: {
@@ -180,14 +180,14 @@ declare const createSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
180
180
  headers?: Record<string, string> | null;
181
181
  };
182
182
  }) => Promise<{
183
- headers: Record<string, string> | null;
184
183
  id: string;
185
184
  createdAt: string;
186
185
  updatedAt: string;
186
+ headers: Record<string, string> | null;
187
187
  tenantId: string;
188
188
  projectId: string;
189
- subAgentId: string;
190
189
  agentId: string;
190
+ subAgentId: string;
191
191
  externalAgentId: string;
192
192
  }>;
193
193
  /**
@@ -197,14 +197,14 @@ declare const getSubAgentExternalAgentRelationByParams: (db: AgentsManageDatabas
197
197
  scopes: SubAgentScopeConfig;
198
198
  externalAgentId: string;
199
199
  }) => Promise<{
200
- headers: Record<string, string> | null;
201
200
  id: string;
202
201
  createdAt: string;
203
202
  updatedAt: string;
203
+ headers: Record<string, string> | null;
204
204
  tenantId: string;
205
205
  projectId: string;
206
- subAgentId: string;
207
206
  agentId: string;
207
+ subAgentId: string;
208
208
  externalAgentId: string;
209
209
  } | undefined>;
210
210
  /**
@@ -218,14 +218,14 @@ declare const upsertSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClie
218
218
  headers?: Record<string, string> | null;
219
219
  };
220
220
  }) => Promise<{
221
- headers: Record<string, string> | null;
222
221
  id: string;
223
222
  createdAt: string;
224
223
  updatedAt: string;
224
+ headers: Record<string, string> | null;
225
225
  tenantId: string;
226
226
  projectId: string;
227
- subAgentId: string;
228
227
  agentId: string;
228
+ subAgentId: string;
229
229
  externalAgentId: string;
230
230
  }>;
231
231
  declare const updateSubAgentExternalAgentRelation: (db: AgentsManageDatabaseClient) => (params: {
@@ -204,19 +204,19 @@ declare const createAgentToolRelation: (db: AgentsManageDatabaseClient) => (para
204
204
  }> | null;
205
205
  };
206
206
  }) => Promise<{
207
- headers: Record<string, string> | null;
208
207
  id: string;
209
208
  createdAt: string;
210
209
  updatedAt: string;
210
+ headers: Record<string, string> | null;
211
211
  tenantId: string;
212
212
  projectId: string;
213
- subAgentId: string;
214
213
  agentId: string;
214
+ subAgentId: string;
215
215
  toolId: string;
216
- selectedTools: string[] | null;
217
216
  toolPolicies: Record<string, {
218
217
  needsApproval?: boolean;
219
218
  }> | null;
219
+ selectedTools: string[] | null;
220
220
  }>;
221
221
  declare const updateAgentToolRelation: (db: AgentsManageDatabaseClient) => (params: {
222
222
  scopes: AgentScopeConfig;
@@ -248,19 +248,19 @@ declare const getAgentToolRelationById: (db: AgentsManageDatabaseClient) => (par
248
248
  scopes: SubAgentScopeConfig;
249
249
  relationId: string;
250
250
  }) => Promise<{
251
- headers: Record<string, string> | null;
252
251
  id: string;
253
252
  createdAt: string;
254
253
  updatedAt: string;
254
+ headers: Record<string, string> | null;
255
255
  tenantId: string;
256
256
  projectId: string;
257
- subAgentId: string;
258
257
  agentId: string;
258
+ subAgentId: string;
259
259
  toolId: string;
260
- selectedTools: string[] | null;
261
260
  toolPolicies: Record<string, {
262
261
  needsApproval?: boolean;
263
262
  }> | null;
263
+ selectedTools: string[] | null;
264
264
  } | undefined>;
265
265
  declare const getAgentToolRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
266
266
  scopes: SubAgentScopeConfig;