@inkeep/agents-sdk 0.0.0-dev-20250910233441 → 0.0.0-dev-20250911000146
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/{chunk-SMQ7HFDN.js → chunk-BCJFVUMJ.js} +7 -8
- package/dist/index.cjs +7 -26
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +4 -22
- package/dist/tool-6K5MVNKA.js +1 -0
- package/package.json +2 -2
- package/dist/tool-MDKZB6AJ.js +0 -1
|
@@ -10,13 +10,15 @@ var Tool = class {
|
|
|
10
10
|
__publicField(this, "baseURL");
|
|
11
11
|
__publicField(this, "tenantId");
|
|
12
12
|
__publicField(this, "initialized", false);
|
|
13
|
+
__publicField(this, "projectId");
|
|
13
14
|
this.config = config;
|
|
14
15
|
this.baseURL = process.env.INKEEP_API_URL || "http://localhost:3002";
|
|
15
16
|
this.tenantId = config.tenantId || "default";
|
|
17
|
+
this.projectId = config.projectId || "default";
|
|
16
18
|
logger.info(
|
|
17
19
|
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
Id: this.getId(),
|
|
21
|
+
Name: config.name
|
|
20
22
|
},
|
|
21
23
|
"Tool constructor initialized"
|
|
22
24
|
);
|
|
@@ -70,19 +72,16 @@ var Tool = class {
|
|
|
70
72
|
const toolDataForUpdate = {
|
|
71
73
|
id: this.getId(),
|
|
72
74
|
name: this.config.name,
|
|
73
|
-
// Don't send description as it's not in the database schema
|
|
74
|
-
// Explicitly set to null when undefined to ensure removal
|
|
75
75
|
credentialReferenceId: this.config.credential?.id ?? null,
|
|
76
|
-
// Explicitly set headers to null when undefined to ensure removal
|
|
77
76
|
headers: this.config.headers ?? null,
|
|
78
77
|
imageUrl: this.config.imageUrl,
|
|
79
|
-
// Include image URL
|
|
80
78
|
config: {
|
|
81
79
|
type: "mcp",
|
|
82
80
|
mcp: {
|
|
83
81
|
server: {
|
|
84
82
|
url: this.config.serverUrl
|
|
85
83
|
},
|
|
84
|
+
transport: this.config.transport,
|
|
86
85
|
activeTools: this.config.activeTools
|
|
87
86
|
}
|
|
88
87
|
}
|
|
@@ -92,7 +91,7 @@ var Tool = class {
|
|
|
92
91
|
};
|
|
93
92
|
logger.info({ toolDataForCreate }, "toolDataForCreate");
|
|
94
93
|
const updateResponse = await fetch(
|
|
95
|
-
`${this.baseURL}/tenants/${this.tenantId}/crud/tools/${this.getId()}`,
|
|
94
|
+
`${this.baseURL}/tenants/${this.tenantId}/crud/projects/${this.projectId}/tools/${this.getId()}`,
|
|
96
95
|
{
|
|
97
96
|
method: "PUT",
|
|
98
97
|
headers: {
|
|
@@ -119,7 +118,7 @@ var Tool = class {
|
|
|
119
118
|
"Tool not found, creating new tool"
|
|
120
119
|
);
|
|
121
120
|
const createResponse = await fetch(
|
|
122
|
-
`${this.baseURL}/tenants/${this.tenantId}/crud/tools`,
|
|
121
|
+
`${this.baseURL}/tenants/${this.tenantId}/crud/projects/${this.projectId}/tools`,
|
|
123
122
|
{
|
|
124
123
|
method: "POST",
|
|
125
124
|
headers: {
|
package/dist/index.cjs
CHANGED
|
@@ -30,13 +30,15 @@ var init_tool = __esm({
|
|
|
30
30
|
__publicField(this, "baseURL");
|
|
31
31
|
__publicField(this, "tenantId");
|
|
32
32
|
__publicField(this, "initialized", false);
|
|
33
|
+
__publicField(this, "projectId");
|
|
33
34
|
this.config = config;
|
|
34
35
|
this.baseURL = process.env.INKEEP_API_URL || "http://localhost:3002";
|
|
35
36
|
this.tenantId = config.tenantId || "default";
|
|
37
|
+
this.projectId = config.projectId || "default";
|
|
36
38
|
logger3.info(
|
|
37
39
|
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
Id: this.getId(),
|
|
41
|
+
Name: config.name
|
|
40
42
|
},
|
|
41
43
|
"Tool constructor initialized"
|
|
42
44
|
);
|
|
@@ -90,19 +92,16 @@ var init_tool = __esm({
|
|
|
90
92
|
const toolDataForUpdate = {
|
|
91
93
|
id: this.getId(),
|
|
92
94
|
name: this.config.name,
|
|
93
|
-
// Don't send description as it's not in the database schema
|
|
94
|
-
// Explicitly set to null when undefined to ensure removal
|
|
95
95
|
credentialReferenceId: this.config.credential?.id ?? null,
|
|
96
|
-
// Explicitly set headers to null when undefined to ensure removal
|
|
97
96
|
headers: this.config.headers ?? null,
|
|
98
97
|
imageUrl: this.config.imageUrl,
|
|
99
|
-
// Include image URL
|
|
100
98
|
config: {
|
|
101
99
|
type: "mcp",
|
|
102
100
|
mcp: {
|
|
103
101
|
server: {
|
|
104
102
|
url: this.config.serverUrl
|
|
105
103
|
},
|
|
104
|
+
transport: this.config.transport,
|
|
106
105
|
activeTools: this.config.activeTools
|
|
107
106
|
}
|
|
108
107
|
}
|
|
@@ -112,7 +111,7 @@ var init_tool = __esm({
|
|
|
112
111
|
};
|
|
113
112
|
logger3.info({ toolDataForCreate }, "toolDataForCreate");
|
|
114
113
|
const updateResponse = await fetch(
|
|
115
|
-
`${this.baseURL}/tenants/${this.tenantId}/crud/tools/${this.getId()}`,
|
|
114
|
+
`${this.baseURL}/tenants/${this.tenantId}/crud/projects/${this.projectId}/tools/${this.getId()}`,
|
|
116
115
|
{
|
|
117
116
|
method: "PUT",
|
|
118
117
|
headers: {
|
|
@@ -139,7 +138,7 @@ var init_tool = __esm({
|
|
|
139
138
|
"Tool not found, creating new tool"
|
|
140
139
|
);
|
|
141
140
|
const createResponse = await fetch(
|
|
142
|
-
`${this.baseURL}/tenants/${this.tenantId}/crud/tools`,
|
|
141
|
+
`${this.baseURL}/tenants/${this.tenantId}/crud/projects/${this.projectId}/tools`,
|
|
143
142
|
{
|
|
144
143
|
method: "POST",
|
|
145
144
|
headers: {
|
|
@@ -1006,24 +1005,6 @@ function tool(config) {
|
|
|
1006
1005
|
type: "function"
|
|
1007
1006
|
};
|
|
1008
1007
|
}
|
|
1009
|
-
zod.z.object({
|
|
1010
|
-
id: zod.z.string().optional(),
|
|
1011
|
-
name: zod.z.string(),
|
|
1012
|
-
description: zod.z.string(),
|
|
1013
|
-
tenantId: zod.z.string().optional(),
|
|
1014
|
-
// Deployment configuration
|
|
1015
|
-
deployment: zod.z.enum(["local", "remote"]).optional(),
|
|
1016
|
-
// For local MCP servers
|
|
1017
|
-
port: zod.z.number().optional(),
|
|
1018
|
-
// For remote MCP servers
|
|
1019
|
-
serverUrl: zod.z.string().optional(),
|
|
1020
|
-
credential: agentsCore.CredentialReferenceApiInsertSchema.optional(),
|
|
1021
|
-
// Additional configuration
|
|
1022
|
-
parameters: zod.z.record(zod.z.string(), zod.z.any()).optional(),
|
|
1023
|
-
transport: zod.z.enum(["ipc", "http", "sse"]).optional(),
|
|
1024
|
-
activeTools: zod.z.array(zod.z.string()).optional(),
|
|
1025
|
-
headers: zod.z.record(zod.z.string(), zod.z.string()).optional()
|
|
1026
|
-
});
|
|
1027
1008
|
function mcpServer(config) {
|
|
1028
1009
|
const deployment = config.deployment || (config.execute ? "local" : "remote");
|
|
1029
1010
|
const id = config.id || config.name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CredentialReferenceSelect, AgentApiInsert, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, CredentialReferenceApiInsert, ToolInsert, McpTransportConfig, ArtifactComponentInsert, DataComponentInsert, MCPToolConfig as MCPToolConfig$1 } from '@inkeep/agents-core';
|
|
1
|
+
import { CredentialReferenceSelect, AgentApiInsert, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, CredentialReferenceApiInsert, ToolInsert, McpTransportConfig, ArtifactComponentInsert, DataComponentInsert, MCPToolConfig as MCPToolConfig$1, MCPTransportType } from '@inkeep/agents-core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ExternalAgentConfig = {
|
|
@@ -437,6 +437,7 @@ declare class Tool implements ToolInterface {
|
|
|
437
437
|
private baseURL;
|
|
438
438
|
private tenantId;
|
|
439
439
|
private initialized;
|
|
440
|
+
private projectId;
|
|
440
441
|
constructor(config: MCPToolConfig$1);
|
|
441
442
|
getId(): string;
|
|
442
443
|
getName(): string;
|
|
@@ -468,9 +469,9 @@ declare class Tool implements ToolInterface {
|
|
|
468
469
|
*/
|
|
469
470
|
declare function agent(config: AgentConfig): Agent;
|
|
470
471
|
declare function credential(config: CredentialReferenceApiInsert): {
|
|
471
|
-
type: string;
|
|
472
472
|
id: string;
|
|
473
473
|
credentialStoreId: string;
|
|
474
|
+
type: "nango" | "memory" | "keychain";
|
|
474
475
|
retrievalParams?: Record<string, unknown> | null | undefined;
|
|
475
476
|
};
|
|
476
477
|
/**
|
|
@@ -547,7 +548,7 @@ declare function mcpServer(config: {
|
|
|
547
548
|
parameters?: Record<string, z.ZodJSONSchema>;
|
|
548
549
|
credential?: CredentialReferenceApiInsert;
|
|
549
550
|
tenantId?: string;
|
|
550
|
-
transport?:
|
|
551
|
+
transport?: keyof typeof MCPTransportType;
|
|
551
552
|
activeTools?: string[];
|
|
552
553
|
headers?: Record<string, string>;
|
|
553
554
|
}): Tool;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CredentialReferenceSelect, AgentApiInsert, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, CredentialReferenceApiInsert, ToolInsert, McpTransportConfig, ArtifactComponentInsert, DataComponentInsert, MCPToolConfig as MCPToolConfig$1 } from '@inkeep/agents-core';
|
|
1
|
+
import { CredentialReferenceSelect, AgentApiInsert, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, CredentialReferenceApiInsert, ToolInsert, McpTransportConfig, ArtifactComponentInsert, DataComponentInsert, MCPToolConfig as MCPToolConfig$1, MCPTransportType } from '@inkeep/agents-core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ExternalAgentConfig = {
|
|
@@ -437,6 +437,7 @@ declare class Tool implements ToolInterface {
|
|
|
437
437
|
private baseURL;
|
|
438
438
|
private tenantId;
|
|
439
439
|
private initialized;
|
|
440
|
+
private projectId;
|
|
440
441
|
constructor(config: MCPToolConfig$1);
|
|
441
442
|
getId(): string;
|
|
442
443
|
getName(): string;
|
|
@@ -468,9 +469,9 @@ declare class Tool implements ToolInterface {
|
|
|
468
469
|
*/
|
|
469
470
|
declare function agent(config: AgentConfig): Agent;
|
|
470
471
|
declare function credential(config: CredentialReferenceApiInsert): {
|
|
471
|
-
type: string;
|
|
472
472
|
id: string;
|
|
473
473
|
credentialStoreId: string;
|
|
474
|
+
type: "nango" | "memory" | "keychain";
|
|
474
475
|
retrievalParams?: Record<string, unknown> | null | undefined;
|
|
475
476
|
};
|
|
476
477
|
/**
|
|
@@ -547,7 +548,7 @@ declare function mcpServer(config: {
|
|
|
547
548
|
parameters?: Record<string, z.ZodJSONSchema>;
|
|
548
549
|
credential?: CredentialReferenceApiInsert;
|
|
549
550
|
tenantId?: string;
|
|
550
|
-
transport?:
|
|
551
|
+
transport?: keyof typeof MCPTransportType;
|
|
551
552
|
activeTools?: string[];
|
|
552
553
|
headers?: Record<string, string>;
|
|
553
554
|
}): Tool;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __publicField, Tool } from './chunk-
|
|
2
|
-
export { Tool } from './chunk-
|
|
3
|
-
import { getLogger,
|
|
1
|
+
import { __publicField, Tool } from './chunk-BCJFVUMJ.js';
|
|
2
|
+
export { Tool } from './chunk-BCJFVUMJ.js';
|
|
3
|
+
import { getLogger, generateIdFromName, CredentialReferenceApiInsertSchema, MCPToolConfigSchema, createDatabaseClient, getProject } from '@inkeep/agents-core';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
6
|
var logger = getLogger("artifactComponent");
|
|
@@ -614,7 +614,7 @@ var Agent = class {
|
|
|
614
614
|
);
|
|
615
615
|
return;
|
|
616
616
|
}
|
|
617
|
-
const { Tool: Tool2 } = await import('./tool-
|
|
617
|
+
const { Tool: Tool2 } = await import('./tool-6K5MVNKA.js');
|
|
618
618
|
let tool2;
|
|
619
619
|
if (toolConfig instanceof Tool2) {
|
|
620
620
|
logger3.info(
|
|
@@ -844,24 +844,6 @@ function tool(config) {
|
|
|
844
844
|
type: "function"
|
|
845
845
|
};
|
|
846
846
|
}
|
|
847
|
-
z.object({
|
|
848
|
-
id: z.string().optional(),
|
|
849
|
-
name: z.string(),
|
|
850
|
-
description: z.string(),
|
|
851
|
-
tenantId: z.string().optional(),
|
|
852
|
-
// Deployment configuration
|
|
853
|
-
deployment: z.enum(["local", "remote"]).optional(),
|
|
854
|
-
// For local MCP servers
|
|
855
|
-
port: z.number().optional(),
|
|
856
|
-
// For remote MCP servers
|
|
857
|
-
serverUrl: z.string().optional(),
|
|
858
|
-
credential: CredentialReferenceApiInsertSchema.optional(),
|
|
859
|
-
// Additional configuration
|
|
860
|
-
parameters: z.record(z.string(), z.any()).optional(),
|
|
861
|
-
transport: z.enum(["ipc", "http", "sse"]).optional(),
|
|
862
|
-
activeTools: z.array(z.string()).optional(),
|
|
863
|
-
headers: z.record(z.string(), z.string()).optional()
|
|
864
|
-
});
|
|
865
847
|
function mcpServer(config) {
|
|
866
848
|
const deployment = config.deployment || (config.execute ? "local" : "remote");
|
|
867
849
|
const id = config.id || config.name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tool } from './chunk-BCJFVUMJ.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-sdk",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20250911000146",
|
|
4
4
|
"description": "SDK for building and managing agents in the Inkeep Agent Framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"nanoid": "^5.1.5",
|
|
10
10
|
"zod": "^4.1.5",
|
|
11
|
-
"@inkeep/agents-core": "^0.0.0-dev-
|
|
11
|
+
"@inkeep/agents-core": "^0.0.0-dev-20250911000146"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@biomejs/biome": "2.1.4",
|
package/dist/tool-MDKZB6AJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Tool } from './chunk-SMQ7HFDN.js';
|