@inkeep/agents-sdk 0.1.0 → 0.1.6
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/LICENSE.md +22 -17
- package/SUPPLEMENTAL_TERMS.md +40 -0
- package/dist/index.cjs +2863 -0
- package/dist/index.d.cts +919 -0
- package/dist/index.d.ts +919 -11
- package/dist/index.js +2840 -10
- package/package.json +24 -18
- package/dist/__tests__/utils/testTenant.d.ts +0 -7
- package/dist/__tests__/utils/testTenant.d.ts.map +0 -1
- package/dist/__tests__/utils/testTenant.js +0 -10
- package/dist/__tests__/utils/testTenant.js.map +0 -1
- package/dist/agent.d.ts +0 -47
- package/dist/agent.d.ts.map +0 -1
- package/dist/agent.js +0 -601
- package/dist/agent.js.map +0 -1
- package/dist/artifact-component.d.ts +0 -27
- package/dist/artifact-component.d.ts.map +0 -1
- package/dist/artifact-component.js +0 -117
- package/dist/artifact-component.js.map +0 -1
- package/dist/builders.d.ts +0 -211
- package/dist/builders.d.ts.map +0 -1
- package/dist/builders.js +0 -244
- package/dist/builders.js.map +0 -1
- package/dist/data-component.d.ts +0 -25
- package/dist/data-component.d.ts.map +0 -1
- package/dist/data-component.js +0 -113
- package/dist/data-component.js.map +0 -1
- package/dist/environment-settings.d.ts +0 -28
- package/dist/environment-settings.d.ts.map +0 -1
- package/dist/environment-settings.js +0 -78
- package/dist/environment-settings.js.map +0 -1
- package/dist/externalAgent.d.ts +0 -58
- package/dist/externalAgent.d.ts.map +0 -1
- package/dist/externalAgent.js +0 -161
- package/dist/externalAgent.js.map +0 -1
- package/dist/graph.d.ts +0 -200
- package/dist/graph.d.ts.map +0 -1
- package/dist/graph.js +0 -1294
- package/dist/graph.js.map +0 -1
- package/dist/graphFullClient.d.ts +0 -22
- package/dist/graphFullClient.d.ts.map +0 -1
- package/dist/graphFullClient.js +0 -189
- package/dist/graphFullClient.js.map +0 -1
- package/dist/hosted-tool-manager.d.ts +0 -28
- package/dist/hosted-tool-manager.d.ts.map +0 -1
- package/dist/hosted-tool-manager.js +0 -256
- package/dist/hosted-tool-manager.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/ipc-hosted-tool-manager.d.ts +0 -51
- package/dist/ipc-hosted-tool-manager.d.ts.map +0 -1
- package/dist/ipc-hosted-tool-manager.js +0 -409
- package/dist/ipc-hosted-tool-manager.js.map +0 -1
- package/dist/module-hosted-tool-manager.d.ts +0 -37
- package/dist/module-hosted-tool-manager.d.ts.map +0 -1
- package/dist/module-hosted-tool-manager.js +0 -375
- package/dist/module-hosted-tool-manager.js.map +0 -1
- package/dist/runner.d.ts +0 -38
- package/dist/runner.d.ts.map +0 -1
- package/dist/runner.js +0 -164
- package/dist/runner.js.map +0 -1
- package/dist/tool.d.ts +0 -29
- package/dist/tool.d.ts.map +0 -1
- package/dist/tool.js +0 -122
- package/dist/tool.js.map +0 -1
- package/dist/types.d.ts +0 -285
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -37
- package/dist/types.js.map +0 -1
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { generateIdFromName, } from '@inkeep/agents-core';
|
|
2
|
-
import { getLogger } from '@inkeep/agents-core';
|
|
3
|
-
const logger = getLogger('artifactComponent');
|
|
4
|
-
export class ArtifactComponent {
|
|
5
|
-
config;
|
|
6
|
-
baseURL;
|
|
7
|
-
tenantId;
|
|
8
|
-
projectId;
|
|
9
|
-
initialized = false;
|
|
10
|
-
id;
|
|
11
|
-
constructor(config) {
|
|
12
|
-
this.id = generateIdFromName(config.name);
|
|
13
|
-
this.config = {
|
|
14
|
-
...config,
|
|
15
|
-
id: this.id,
|
|
16
|
-
tenantId: config.tenantId || 'default',
|
|
17
|
-
projectId: config.projectId || 'default',
|
|
18
|
-
};
|
|
19
|
-
this.baseURL = process.env.INKEEP_API_URL || 'http://localhost:3002';
|
|
20
|
-
this.tenantId = this.config.tenantId;
|
|
21
|
-
this.projectId = this.config.projectId;
|
|
22
|
-
logger.info({
|
|
23
|
-
artifactComponentId: this.getId(),
|
|
24
|
-
artifactComponentName: config.name,
|
|
25
|
-
}, 'ArtifactComponent constructor initialized');
|
|
26
|
-
}
|
|
27
|
-
// Compute ID from name using same slug transformation as agents
|
|
28
|
-
getId() {
|
|
29
|
-
return this.id;
|
|
30
|
-
}
|
|
31
|
-
getName() {
|
|
32
|
-
return this.config.name;
|
|
33
|
-
}
|
|
34
|
-
getDescription() {
|
|
35
|
-
return this.config.description;
|
|
36
|
-
}
|
|
37
|
-
getSummaryProps() {
|
|
38
|
-
return this.config.summaryProps;
|
|
39
|
-
}
|
|
40
|
-
getFullProps() {
|
|
41
|
-
return this.config.fullProps;
|
|
42
|
-
}
|
|
43
|
-
// Public method to ensure artifact component exists in backend (with upsert behavior)
|
|
44
|
-
async init() {
|
|
45
|
-
if (this.initialized)
|
|
46
|
-
return;
|
|
47
|
-
try {
|
|
48
|
-
// Always attempt to upsert the artifact component
|
|
49
|
-
await this.upsertArtifactComponent();
|
|
50
|
-
logger.info({
|
|
51
|
-
artifactComponentId: this.getId(),
|
|
52
|
-
}, 'ArtifactComponent initialized successfully');
|
|
53
|
-
this.initialized = true;
|
|
54
|
-
}
|
|
55
|
-
catch (error) {
|
|
56
|
-
logger.error({
|
|
57
|
-
artifactComponentId: this.getId(),
|
|
58
|
-
error: error instanceof Error ? error.message : 'Unknown error',
|
|
59
|
-
}, 'Failed to initialize artifact component');
|
|
60
|
-
throw error;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
// Private method to upsert artifact component (create or update)
|
|
64
|
-
async upsertArtifactComponent() {
|
|
65
|
-
const artifactComponentData = {
|
|
66
|
-
id: this.getId(),
|
|
67
|
-
name: this.config.name,
|
|
68
|
-
description: this.config.description,
|
|
69
|
-
summaryProps: this.config.summaryProps,
|
|
70
|
-
fullProps: this.config.fullProps,
|
|
71
|
-
};
|
|
72
|
-
logger.info({ artifactComponentData }, 'artifactComponentData for create/update');
|
|
73
|
-
// First try to update (in case artifact component exists)
|
|
74
|
-
const updateResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/crud/artifact-components/${this.getId()}`, {
|
|
75
|
-
method: 'PUT',
|
|
76
|
-
headers: {
|
|
77
|
-
'Content-Type': 'application/json',
|
|
78
|
-
},
|
|
79
|
-
body: JSON.stringify(artifactComponentData),
|
|
80
|
-
});
|
|
81
|
-
logger.info({
|
|
82
|
-
status: updateResponse.status,
|
|
83
|
-
artifactComponentId: this.getId(),
|
|
84
|
-
}, 'artifact component updateResponse');
|
|
85
|
-
if (updateResponse.ok) {
|
|
86
|
-
logger.info({
|
|
87
|
-
artifactComponentId: this.getId(),
|
|
88
|
-
}, 'ArtifactComponent updated successfully');
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
// If update failed with 404, artifact component doesn't exist - create it
|
|
92
|
-
if (updateResponse.status === 404) {
|
|
93
|
-
logger.info({
|
|
94
|
-
artifactComponentId: this.getId(),
|
|
95
|
-
}, 'ArtifactComponent not found, creating new artifact component');
|
|
96
|
-
const createResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/crud/artifact-components`, {
|
|
97
|
-
method: 'POST',
|
|
98
|
-
headers: {
|
|
99
|
-
'Content-Type': 'application/json',
|
|
100
|
-
},
|
|
101
|
-
body: JSON.stringify(artifactComponentData),
|
|
102
|
-
});
|
|
103
|
-
if (!createResponse.ok) {
|
|
104
|
-
const errorText = await createResponse.text().catch(() => 'Unknown error');
|
|
105
|
-
throw new Error(`Failed to create artifact component: ${createResponse.status} ${createResponse.statusText} - ${errorText}`);
|
|
106
|
-
}
|
|
107
|
-
logger.info({
|
|
108
|
-
artifactComponentId: this.getId(),
|
|
109
|
-
}, 'ArtifactComponent created successfully');
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
// If we get here, the update failed for some other reason
|
|
113
|
-
const errorText = await updateResponse.text().catch(() => 'Unknown error');
|
|
114
|
-
throw new Error(`Failed to update artifact component: ${updateResponse.status} ${updateResponse.statusText} - ${errorText}`);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
//# sourceMappingURL=artifact-component.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-component.js","sourceRoot":"","sources":["../src/artifact-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,MAAM,MAAM,GAAG,SAAS,CAAC,mBAAmB,CAAC,CAAC;AAY9C,MAAM,OAAO,iBAAiB;IACrB,MAAM,CAAwB;IAC7B,OAAO,CAAS;IAChB,QAAQ,CAAoC;IAC5C,SAAS,CAAqC;IAC9C,WAAW,GAAG,KAAK,CAAC;IACpB,EAAE,CAA8B;IAExC,YAAY,MAAyC;QACnD,IAAI,CAAC,EAAE,GAAG,kBAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAE1C,IAAI,CAAC,MAAM,GAAG;YACZ,GAAG,MAAM;YACT,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,SAAS;YACtC,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,SAAS;SACzC,CAAC;QACF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,uBAAuB,CAAC;QACrE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;QACrC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QACvC,MAAM,CAAC,IAAI,CACT;YACE,mBAAmB,EAAE,IAAI,CAAC,KAAK,EAAE;YACjC,qBAAqB,EAAE,MAAM,CAAC,IAAI;SACnC,EACD,2CAA2C,CAC5C,CAAC;IACJ,CAAC;IAED,gEAAgE;IAChE,KAAK;QACH,OAAO,IAAI,CAAC,EAAE,CAAC;IACj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CAAC;gBAC3E,MAAM,IAAI,KAAK,CACb,wCAAwC,cAAc,CAAC,MAAM,IAAI,cAAc,CAAC,UAAU,MAAM,SAAS,EAAE,CAC5G,CAAC;YACJ,CAAC;YAED,MAAM,CAAC,IAAI,CACT;gBACE,mBAAmB,EAAE,IAAI,CAAC,KAAK,EAAE;aAClC,EACD,wCAAwC,CACzC,CAAC;YACF,OAAO;QACT,CAAC;QAED,0DAA0D;QAC1D,MAAM,SAAS,GAAG,MAAM,cAAc,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;QAC3E,MAAM,IAAI,KAAK,CACb,wCAAwC,cAAc,CAAC,MAAM,IAAI,cAAc,CAAC,UAAU,MAAM,SAAS,EAAE,CAC5G,CAAC;IACJ,CAAC;CACF"}
|
package/dist/builders.d.ts
DELETED
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { Agent } from './agent.js';
|
|
3
|
-
import { ArtifactComponent } from './artifact-component.js';
|
|
4
|
-
import { DataComponent } from './data-component.js';
|
|
5
|
-
import { Tool } from './tool.js';
|
|
6
|
-
import { type CredentialReferenceApiInsert, type MCPToolConfig } from '@inkeep/agents-core';
|
|
7
|
-
import type { AgentConfig, TransferConfig } from './types.js';
|
|
8
|
-
/**
|
|
9
|
-
* Creates a new agent with stable ID enforcement.
|
|
10
|
-
*
|
|
11
|
-
* @param config - Agent configuration including required stable ID
|
|
12
|
-
* @returns A new Agent instance
|
|
13
|
-
* @throws Error if config.id is not provided (stable IDs are required)
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```typescript
|
|
17
|
-
* const myAgent = agent({
|
|
18
|
-
* id: 'customer-support-agent',
|
|
19
|
-
* name: 'Customer Support',
|
|
20
|
-
* prompt: 'Help customers with their questions'
|
|
21
|
-
* });
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
export declare function agent(config: AgentConfig): Agent;
|
|
25
|
-
export declare function credential(config: CredentialReferenceApiInsert): {
|
|
26
|
-
id: string;
|
|
27
|
-
type: string;
|
|
28
|
-
credentialStoreId: string;
|
|
29
|
-
retrievalParams?: Record<string, unknown> | null | undefined;
|
|
30
|
-
};
|
|
31
|
-
export declare const ToolConfigSchema: z.ZodObject<{
|
|
32
|
-
id: z.ZodOptional<z.ZodString>;
|
|
33
|
-
name: z.ZodString;
|
|
34
|
-
description: z.ZodString;
|
|
35
|
-
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
36
|
-
schema: z.ZodOptional<z.ZodUnknown>;
|
|
37
|
-
}, z.core.$strip>;
|
|
38
|
-
export declare const ToolSchema: z.ZodObject<{
|
|
39
|
-
id: z.ZodOptional<z.ZodString>;
|
|
40
|
-
name: z.ZodString;
|
|
41
|
-
description: z.ZodString;
|
|
42
|
-
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
43
|
-
schema: z.ZodOptional<z.ZodUnknown>;
|
|
44
|
-
execute: z.ZodAny;
|
|
45
|
-
}, z.core.$strip>;
|
|
46
|
-
/**
|
|
47
|
-
* Creates a tool with automatic ID generation (unlike agents which require explicit IDs).
|
|
48
|
-
*
|
|
49
|
-
* Tools automatically generate IDs from their name, whereas agents require stable IDs
|
|
50
|
-
* to be explicitly provided for consistency across deployments.
|
|
51
|
-
*
|
|
52
|
-
* @param config - Tool configuration with auto-generated ID
|
|
53
|
-
* @returns A Tool instance with auto-generated ID based on name
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* ```typescript
|
|
57
|
-
* const searchTool = tool({
|
|
58
|
-
* name: 'Search Database',
|
|
59
|
-
* description: 'Search the product database',
|
|
60
|
-
* execute: async (params) => { ... }
|
|
61
|
-
* });
|
|
62
|
-
* // ID will be auto-generated as 'search-database'
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
export declare function tool(config: {
|
|
66
|
-
name: string;
|
|
67
|
-
description: string;
|
|
68
|
-
execute: (params: any) => Promise<any>;
|
|
69
|
-
parameters?: Record<string, any>;
|
|
70
|
-
schema?: z.ZodJSONSchema;
|
|
71
|
-
}): {
|
|
72
|
-
id: string;
|
|
73
|
-
name: string;
|
|
74
|
-
description: string;
|
|
75
|
-
execute: (params: any) => Promise<any>;
|
|
76
|
-
parameters: Record<string, any> | undefined;
|
|
77
|
-
schema: unknown;
|
|
78
|
-
type: "function";
|
|
79
|
-
};
|
|
80
|
-
export declare const McpServerConfigSchema: z.ZodObject<{
|
|
81
|
-
id: z.ZodOptional<z.ZodString>;
|
|
82
|
-
name: z.ZodString;
|
|
83
|
-
description: z.ZodString;
|
|
84
|
-
tenantId: z.ZodOptional<z.ZodString>;
|
|
85
|
-
deployment: z.ZodOptional<z.ZodEnum<{
|
|
86
|
-
local: "local";
|
|
87
|
-
remote: "remote";
|
|
88
|
-
}>>;
|
|
89
|
-
port: z.ZodOptional<z.ZodNumber>;
|
|
90
|
-
serverUrl: z.ZodOptional<z.ZodString>;
|
|
91
|
-
credential: z.ZodOptional<z.ZodObject<{
|
|
92
|
-
id: z.ZodString;
|
|
93
|
-
type: z.ZodString;
|
|
94
|
-
credentialStoreId: z.ZodString;
|
|
95
|
-
retrievalParams: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
96
|
-
}, z.core.$strip>>;
|
|
97
|
-
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
98
|
-
transport: z.ZodOptional<z.ZodEnum<{
|
|
99
|
-
sse: "sse";
|
|
100
|
-
ipc: "ipc";
|
|
101
|
-
http: "http";
|
|
102
|
-
}>>;
|
|
103
|
-
activeTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
104
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
105
|
-
}, z.core.$strip>;
|
|
106
|
-
/**
|
|
107
|
-
* Creates an MCP (Model Context Protocol) server for tool functionality.
|
|
108
|
-
*
|
|
109
|
-
* This unified builder replaces tool(), mcpTool(), ipcTool(), and hostedTool().
|
|
110
|
-
* All tools are MCP servers - either local (with execute function) or remote (with URL).
|
|
111
|
-
*
|
|
112
|
-
* @param config - MCP server configuration
|
|
113
|
-
* @returns An MCP server instance that can be used as a tool in agents
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* ```typescript
|
|
117
|
-
* // Local MCP server with execute function (auto-wrapped via IPC)
|
|
118
|
-
* const searchServer = mcpServer({
|
|
119
|
-
* name: 'search',
|
|
120
|
-
* description: 'Search the database',
|
|
121
|
-
* execute: async (params) => {
|
|
122
|
-
* // Implementation
|
|
123
|
-
* return results;
|
|
124
|
-
* }
|
|
125
|
-
* });
|
|
126
|
-
*
|
|
127
|
-
* // Remote MCP server
|
|
128
|
-
* const apiServer = mcpServer({
|
|
129
|
-
* name: 'external_api',
|
|
130
|
-
* description: 'External API service',
|
|
131
|
-
* serverUrl: 'https://api.example.com/mcp'
|
|
132
|
-
* });
|
|
133
|
-
* ```
|
|
134
|
-
*/
|
|
135
|
-
export declare function mcpServer(config: {
|
|
136
|
-
name: string;
|
|
137
|
-
description: string;
|
|
138
|
-
deployment?: 'local' | 'remote';
|
|
139
|
-
execute?: (params: any) => Promise<any>;
|
|
140
|
-
port?: number;
|
|
141
|
-
serverUrl?: string;
|
|
142
|
-
id?: string;
|
|
143
|
-
parameters?: Record<string, z.ZodJSONSchema>;
|
|
144
|
-
credential?: CredentialReferenceApiInsert;
|
|
145
|
-
tenantId?: string;
|
|
146
|
-
transport?: 'ipc' | 'http' | 'sse';
|
|
147
|
-
activeTools?: string[];
|
|
148
|
-
headers?: Record<string, string>;
|
|
149
|
-
}): Tool;
|
|
150
|
-
export declare function mcpTool(config: MCPToolConfig): Tool;
|
|
151
|
-
export declare const TransferConfigSchema: z.ZodObject<{
|
|
152
|
-
agent: z.ZodCustom<Agent, Agent>;
|
|
153
|
-
description: z.ZodOptional<z.ZodString>;
|
|
154
|
-
}, z.core.$strip>;
|
|
155
|
-
export declare const TransferSchema: z.ZodObject<{
|
|
156
|
-
agent: z.ZodCustom<Agent, Agent>;
|
|
157
|
-
description: z.ZodOptional<z.ZodString>;
|
|
158
|
-
condition: z.ZodOptional<z.ZodAny>;
|
|
159
|
-
}, z.core.$strip>;
|
|
160
|
-
export declare function transfer(targetAgent: Agent, description?: string, condition?: (context: unknown) => boolean): TransferConfig;
|
|
161
|
-
export declare function agentRelation(targetAgent: string, relationType?: 'transfer' | 'delegate'): {
|
|
162
|
-
targetAgent: string;
|
|
163
|
-
relationType: "transfer" | "delegate";
|
|
164
|
-
};
|
|
165
|
-
/**
|
|
166
|
-
* Creates an artifact component with automatic ID generation.
|
|
167
|
-
*
|
|
168
|
-
* @param config - Artifact component configuration
|
|
169
|
-
* @returns An ArtifactComponent instance with auto-generated ID
|
|
170
|
-
*
|
|
171
|
-
* @example
|
|
172
|
-
* ```typescript
|
|
173
|
-
* const productCard = artifactComponent({
|
|
174
|
-
* name: 'Product Card',
|
|
175
|
-
* description: 'Display product information',
|
|
176
|
-
* summaryProps: { title: 'Product', price: '$0' },
|
|
177
|
-
* fullProps: { title: 'Product', price: '$0', description: '...' }
|
|
178
|
-
* });
|
|
179
|
-
* ```
|
|
180
|
-
*/
|
|
181
|
-
export declare function artifactComponent(config: {
|
|
182
|
-
name: string;
|
|
183
|
-
description: string;
|
|
184
|
-
summaryProps: Record<string, any>;
|
|
185
|
-
fullProps: Record<string, any>;
|
|
186
|
-
tenantId?: string;
|
|
187
|
-
projectId?: string;
|
|
188
|
-
}): ArtifactComponent;
|
|
189
|
-
/**
|
|
190
|
-
* Creates a data component with automatic ID generation.
|
|
191
|
-
*
|
|
192
|
-
* @param config - Data component configuration
|
|
193
|
-
* @returns A DataComponent instance with auto-generated ID
|
|
194
|
-
*
|
|
195
|
-
* @example
|
|
196
|
-
* ```typescript
|
|
197
|
-
* const userProfile = dataComponent({
|
|
198
|
-
* name: 'User Profile',
|
|
199
|
-
* description: 'User profile data',
|
|
200
|
-
* props: { userId: '123', name: 'John Doe' }
|
|
201
|
-
* });
|
|
202
|
-
* ```
|
|
203
|
-
*/
|
|
204
|
-
export declare function dataComponent(config: {
|
|
205
|
-
name: string;
|
|
206
|
-
description: string;
|
|
207
|
-
props: Record<string, any>;
|
|
208
|
-
tenantId?: string;
|
|
209
|
-
projectId?: string;
|
|
210
|
-
}): DataComponent;
|
|
211
|
-
//# sourceMappingURL=builders.d.ts.map
|
package/dist/builders.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,KAAK,4BAA4B,EAEjC,KAAK,aAAa,EAEnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE9D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,KAAK,CAEhD;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,4BAA4B;;;;;EAE9D;AAGD,eAAO,MAAM,gBAAgB;;;;;;iBAM3B,CAAC;AAGH,eAAO,MAAM,UAAU;;;;;;;iBAErB,CAAC;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,K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CAAC,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,GACxC,cAAc,CAchB;AAED,wBAAgB,aAAa,CAC3B,WAAW,EAAE,MAAM,EACnB,YAAY,GAAE,UAAU,GAAG,UAAuB;;;EAMnD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,iBAAiB,CAMpB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,aAAa,CAMhB"}
|
package/dist/builders.js
DELETED
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { Agent } from './agent.js';
|
|
3
|
-
import { ArtifactComponent } from './artifact-component.js';
|
|
4
|
-
import { DataComponent } from './data-component.js';
|
|
5
|
-
import { Tool } from './tool.js';
|
|
6
|
-
import { CredentialReferenceApiInsertSchema, MCPToolConfigSchema, } from '@inkeep/agents-core';
|
|
7
|
-
/**
|
|
8
|
-
* Creates a new agent with stable ID enforcement.
|
|
9
|
-
*
|
|
10
|
-
* @param config - Agent configuration including required stable ID
|
|
11
|
-
* @returns A new Agent instance
|
|
12
|
-
* @throws Error if config.id is not provided (stable IDs are required)
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
* const myAgent = agent({
|
|
17
|
-
* id: 'customer-support-agent',
|
|
18
|
-
* name: 'Customer Support',
|
|
19
|
-
* prompt: 'Help customers with their questions'
|
|
20
|
-
* });
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
export function agent(config) {
|
|
24
|
-
return new Agent(config);
|
|
25
|
-
}
|
|
26
|
-
export function credential(config) {
|
|
27
|
-
return CredentialReferenceApiInsertSchema.parse(config);
|
|
28
|
-
}
|
|
29
|
-
// Separate schema for non-function properties
|
|
30
|
-
export const ToolConfigSchema = z.object({
|
|
31
|
-
id: z.string().optional(),
|
|
32
|
-
name: z.string(),
|
|
33
|
-
description: z.string(),
|
|
34
|
-
parameters: z.record(z.string(), z.any()).optional(),
|
|
35
|
-
schema: z.unknown().optional(),
|
|
36
|
-
});
|
|
37
|
-
// Keep the old schema name for backward compatibility, but make it clear it's partial
|
|
38
|
-
export const ToolSchema = ToolConfigSchema.extend({
|
|
39
|
-
execute: z.any(), // Function - validated separately at runtime
|
|
40
|
-
});
|
|
41
|
-
/**
|
|
42
|
-
* Creates a tool with automatic ID generation (unlike agents which require explicit IDs).
|
|
43
|
-
*
|
|
44
|
-
* Tools automatically generate IDs from their name, whereas agents require stable IDs
|
|
45
|
-
* to be explicitly provided for consistency across deployments.
|
|
46
|
-
*
|
|
47
|
-
* @param config - Tool configuration with auto-generated ID
|
|
48
|
-
* @returns A Tool instance with auto-generated ID based on name
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```typescript
|
|
52
|
-
* const searchTool = tool({
|
|
53
|
-
* name: 'Search Database',
|
|
54
|
-
* description: 'Search the product database',
|
|
55
|
-
* execute: async (params) => { ... }
|
|
56
|
-
* });
|
|
57
|
-
* // ID will be auto-generated as 'search-database'
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
export function tool(config) {
|
|
61
|
-
// Validate function separately with clear error message
|
|
62
|
-
if (typeof config.execute !== 'function') {
|
|
63
|
-
throw new Error('execute must be a function');
|
|
64
|
-
}
|
|
65
|
-
// Validate non-function properties with schema
|
|
66
|
-
const { execute, ...configWithoutFunction } = config;
|
|
67
|
-
const validatedConfig = ToolConfigSchema.parse(configWithoutFunction);
|
|
68
|
-
// Combine validated config with function
|
|
69
|
-
const fullConfig = { ...validatedConfig, execute };
|
|
70
|
-
// Return function tool format
|
|
71
|
-
const computedId = fullConfig.name
|
|
72
|
-
.toLowerCase()
|
|
73
|
-
.replace(/[^a-z0-9]+/g, '-')
|
|
74
|
-
.replace(/^-+|-+$/g, '');
|
|
75
|
-
return {
|
|
76
|
-
id: computedId,
|
|
77
|
-
name: fullConfig.name,
|
|
78
|
-
description: fullConfig.description,
|
|
79
|
-
execute: fullConfig.execute,
|
|
80
|
-
parameters: fullConfig.parameters,
|
|
81
|
-
schema: fullConfig.schema,
|
|
82
|
-
type: 'function',
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
// MCP Server Configuration Schema
|
|
86
|
-
export const McpServerConfigSchema = z.object({
|
|
87
|
-
id: z.string().optional(),
|
|
88
|
-
name: z.string(),
|
|
89
|
-
description: z.string(),
|
|
90
|
-
tenantId: z.string().optional(),
|
|
91
|
-
// Deployment configuration
|
|
92
|
-
deployment: z.enum(['local', 'remote']).optional(),
|
|
93
|
-
// For local MCP servers
|
|
94
|
-
port: z.number().optional(),
|
|
95
|
-
// For remote MCP servers
|
|
96
|
-
serverUrl: z.string().optional(),
|
|
97
|
-
credential: CredentialReferenceApiInsertSchema.optional(),
|
|
98
|
-
// Additional configuration
|
|
99
|
-
parameters: z.record(z.string(), z.any()).optional(),
|
|
100
|
-
transport: z.enum(['ipc', 'http', 'sse']).optional(),
|
|
101
|
-
activeTools: z.array(z.string()).optional(),
|
|
102
|
-
headers: z.record(z.string(), z.string()).optional(),
|
|
103
|
-
});
|
|
104
|
-
/**
|
|
105
|
-
* Creates an MCP (Model Context Protocol) server for tool functionality.
|
|
106
|
-
*
|
|
107
|
-
* This unified builder replaces tool(), mcpTool(), ipcTool(), and hostedTool().
|
|
108
|
-
* All tools are MCP servers - either local (with execute function) or remote (with URL).
|
|
109
|
-
*
|
|
110
|
-
* @param config - MCP server configuration
|
|
111
|
-
* @returns An MCP server instance that can be used as a tool in agents
|
|
112
|
-
*
|
|
113
|
-
* @example
|
|
114
|
-
* ```typescript
|
|
115
|
-
* // Local MCP server with execute function (auto-wrapped via IPC)
|
|
116
|
-
* const searchServer = mcpServer({
|
|
117
|
-
* name: 'search',
|
|
118
|
-
* description: 'Search the database',
|
|
119
|
-
* execute: async (params) => {
|
|
120
|
-
* // Implementation
|
|
121
|
-
* return results;
|
|
122
|
-
* }
|
|
123
|
-
* });
|
|
124
|
-
*
|
|
125
|
-
* // Remote MCP server
|
|
126
|
-
* const apiServer = mcpServer({
|
|
127
|
-
* name: 'external_api',
|
|
128
|
-
* description: 'External API service',
|
|
129
|
-
* serverUrl: 'https://api.example.com/mcp'
|
|
130
|
-
* });
|
|
131
|
-
* ```
|
|
132
|
-
*/
|
|
133
|
-
export function mcpServer(config) {
|
|
134
|
-
// Auto-detect deployment type
|
|
135
|
-
const deployment = config.deployment || (config.execute ? 'local' : 'remote');
|
|
136
|
-
// Generate ID if not provided
|
|
137
|
-
const id = config.id ||
|
|
138
|
-
config.name
|
|
139
|
-
.toLowerCase()
|
|
140
|
-
.replace(/[^a-z0-9]+/g, '-')
|
|
141
|
-
.replace(/^-+|-+$/g, '');
|
|
142
|
-
if (deployment === 'local') {
|
|
143
|
-
// Local MCP server with execute function
|
|
144
|
-
if (!config.execute) {
|
|
145
|
-
throw new Error('Local MCP server requires an execute function');
|
|
146
|
-
}
|
|
147
|
-
throw new Error('Local MCP servers are no longer supported. Please use remote MCP servers instead.');
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
// Remote MCP server
|
|
151
|
-
if (!config.serverUrl) {
|
|
152
|
-
throw new Error('Remote MCP server requires a serverUrl');
|
|
153
|
-
}
|
|
154
|
-
// Use Tool class for remote MCP servers
|
|
155
|
-
return new Tool({
|
|
156
|
-
id,
|
|
157
|
-
name: config.name,
|
|
158
|
-
description: config.description,
|
|
159
|
-
serverUrl: config.serverUrl,
|
|
160
|
-
tenantId: config.tenantId,
|
|
161
|
-
credential: config.credential,
|
|
162
|
-
activeTools: config.activeTools,
|
|
163
|
-
headers: config.headers,
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
export function mcpTool(config) {
|
|
168
|
-
const validatedConfig = MCPToolConfigSchema.parse(config);
|
|
169
|
-
return new Tool(validatedConfig);
|
|
170
|
-
}
|
|
171
|
-
// Separate schema for non-function transfer properties
|
|
172
|
-
export const TransferConfigSchema = z.object({
|
|
173
|
-
agent: z.instanceof(Agent),
|
|
174
|
-
description: z.string().optional(),
|
|
175
|
-
});
|
|
176
|
-
// Full schema for backward compatibility (but functions validated separately)
|
|
177
|
-
export const TransferSchema = TransferConfigSchema.extend({
|
|
178
|
-
condition: z.any().optional(), // Function - validated separately at runtime when present
|
|
179
|
-
});
|
|
180
|
-
export function transfer(targetAgent, description, condition) {
|
|
181
|
-
// Validate function if provided
|
|
182
|
-
if (condition !== undefined && typeof condition !== 'function') {
|
|
183
|
-
throw new Error('condition must be a function when provided');
|
|
184
|
-
}
|
|
185
|
-
const config = {
|
|
186
|
-
agent: targetAgent,
|
|
187
|
-
description: description || `Hand off to ${targetAgent.getName()}`,
|
|
188
|
-
condition,
|
|
189
|
-
};
|
|
190
|
-
// Validate the configuration (functions are validated separately above)
|
|
191
|
-
return TransferSchema.parse(config);
|
|
192
|
-
}
|
|
193
|
-
export function agentRelation(targetAgent, relationType = 'transfer') {
|
|
194
|
-
return {
|
|
195
|
-
targetAgent,
|
|
196
|
-
relationType,
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Creates an artifact component with automatic ID generation.
|
|
201
|
-
*
|
|
202
|
-
* @param config - Artifact component configuration
|
|
203
|
-
* @returns An ArtifactComponent instance with auto-generated ID
|
|
204
|
-
*
|
|
205
|
-
* @example
|
|
206
|
-
* ```typescript
|
|
207
|
-
* const productCard = artifactComponent({
|
|
208
|
-
* name: 'Product Card',
|
|
209
|
-
* description: 'Display product information',
|
|
210
|
-
* summaryProps: { title: 'Product', price: '$0' },
|
|
211
|
-
* fullProps: { title: 'Product', price: '$0', description: '...' }
|
|
212
|
-
* });
|
|
213
|
-
* ```
|
|
214
|
-
*/
|
|
215
|
-
export function artifactComponent(config) {
|
|
216
|
-
return new ArtifactComponent({
|
|
217
|
-
...config,
|
|
218
|
-
tenantId: config.tenantId || 'default',
|
|
219
|
-
projectId: config.projectId || 'default',
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Creates a data component with automatic ID generation.
|
|
224
|
-
*
|
|
225
|
-
* @param config - Data component configuration
|
|
226
|
-
* @returns A DataComponent instance with auto-generated ID
|
|
227
|
-
*
|
|
228
|
-
* @example
|
|
229
|
-
* ```typescript
|
|
230
|
-
* const userProfile = dataComponent({
|
|
231
|
-
* name: 'User Profile',
|
|
232
|
-
* description: 'User profile data',
|
|
233
|
-
* props: { userId: '123', name: 'John Doe' }
|
|
234
|
-
* });
|
|
235
|
-
* ```
|
|
236
|
-
*/
|
|
237
|
-
export function dataComponent(config) {
|
|
238
|
-
return new DataComponent({
|
|
239
|
-
...config,
|
|
240
|
-
tenantId: config.tenantId || 'default',
|
|
241
|
-
projectId: config.projectId || 'default',
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
//# sourceMappingURL=builders.js.map
|
package/dist/builders.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builders.js","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MA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AM,GAAG;QACb,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,WAAW,IAAI,eAAe,WAAW,CAAC,OAAO,EAAE,EAAE;QAClE,SAAS;KACV,CAAC;IAEF,wEAAwE;IACxE,OAAO,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,WAAmB,EACnB,eAAwC,UAAU;IAElD,OAAO;QACL,WAAW;QACX,YAAY;KACb,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAOjC;IACC,OAAO,IAAI,iBAAiB,CAAC;QAC3B,GAAG,MAAM;QACT,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,SAAS;QACtC,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,SAAS;KACzC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,aAAa,CAAC,MAM7B;IACC,OAAO,IAAI,aAAa,CAAC;QACvB,GAAG,MAAM;QACT,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,SAAS;QACtC,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,SAAS;KACzC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/data-component.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type DataComponentInsert as DataComponentType } from '@inkeep/agents-core';
|
|
2
|
-
export interface DataComponentInterface {
|
|
3
|
-
config: Omit<DataComponentType, 'id'>;
|
|
4
|
-
init(): Promise<void>;
|
|
5
|
-
getId(): DataComponentType['id'];
|
|
6
|
-
getName(): DataComponentType['name'];
|
|
7
|
-
getDescription(): DataComponentType['description'];
|
|
8
|
-
getProps(): DataComponentType['props'];
|
|
9
|
-
}
|
|
10
|
-
export declare class DataComponent implements DataComponentInterface {
|
|
11
|
-
config: DataComponentType;
|
|
12
|
-
private baseURL;
|
|
13
|
-
private tenantId;
|
|
14
|
-
private projectId;
|
|
15
|
-
private initialized;
|
|
16
|
-
private id;
|
|
17
|
-
constructor(config: Omit<DataComponentType, 'id'>);
|
|
18
|
-
getId(): string;
|
|
19
|
-
getName(): string;
|
|
20
|
-
getDescription(): string;
|
|
21
|
-
getProps(): DataComponentType['props'];
|
|
22
|
-
init(): Promise<void>;
|
|
23
|
-
private upsertDataComponent;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=data-component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-component.d.ts","sourceRoot":"","sources":["../src/data-component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,IAAI,iBAAiB,EAAsB,MAAM,qBAAqB,CAAC;AAKxG,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;IACtC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,KAAK,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACrC,cAAc,IAAI,iBAAiB,CAAC,aAAa,CAAC,CAAC;IACnD,QAAQ,IAAI,iBAAiB,CAAC,OAAO,CAAC,CAAC;CACxC;AAED,qBAAa,aAAc,YAAW,sBAAsB;IACnD,MAAM,EAAE,iBAAiB,CAAC;IACjC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAgC;IAChD,OAAO,CAAC,SAAS,CAAiC;IAClD,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,EAAE,CAA0B;gBAExB,MAAM,EAAE,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC;IAsBjD,KAAK,IAAI,MAAM;IAIf,OAAO,IAAI,MAAM;IAIjB,cAAc,IAAI,MAAM;IAIxB,QAAQ,IAAI,iBAAiB,CAAC,OAAO,CAAC;IAKhC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YA4Bb,mBAAmB;CAkFlC"}
|