@inkeep/agents-sdk 0.1.1 → 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.
Files changed (60) hide show
  1. package/SUPPLEMENTAL_TERMS.md +40 -0
  2. package/dist/index.cjs +2863 -0
  3. package/dist/index.d.cts +919 -0
  4. package/dist/index.d.ts +919 -11
  5. package/dist/index.js +2840 -10
  6. package/package.json +7 -6
  7. package/dist/__tests__/utils/testTenant.d.ts +0 -7
  8. package/dist/__tests__/utils/testTenant.d.ts.map +0 -1
  9. package/dist/__tests__/utils/testTenant.js +0 -10
  10. package/dist/__tests__/utils/testTenant.js.map +0 -1
  11. package/dist/agent.d.ts +0 -47
  12. package/dist/agent.d.ts.map +0 -1
  13. package/dist/agent.js +0 -601
  14. package/dist/agent.js.map +0 -1
  15. package/dist/artifact-component.d.ts +0 -27
  16. package/dist/artifact-component.d.ts.map +0 -1
  17. package/dist/artifact-component.js +0 -116
  18. package/dist/artifact-component.js.map +0 -1
  19. package/dist/builders.d.ts +0 -211
  20. package/dist/builders.d.ts.map +0 -1
  21. package/dist/builders.js +0 -244
  22. package/dist/builders.js.map +0 -1
  23. package/dist/data-component.d.ts +0 -25
  24. package/dist/data-component.d.ts.map +0 -1
  25. package/dist/data-component.js +0 -112
  26. package/dist/data-component.js.map +0 -1
  27. package/dist/environment-settings.d.ts +0 -28
  28. package/dist/environment-settings.d.ts.map +0 -1
  29. package/dist/environment-settings.js +0 -78
  30. package/dist/environment-settings.js.map +0 -1
  31. package/dist/externalAgent.d.ts +0 -58
  32. package/dist/externalAgent.d.ts.map +0 -1
  33. package/dist/externalAgent.js +0 -161
  34. package/dist/externalAgent.js.map +0 -1
  35. package/dist/graph.d.ts +0 -200
  36. package/dist/graph.d.ts.map +0 -1
  37. package/dist/graph.js +0 -1294
  38. package/dist/graph.js.map +0 -1
  39. package/dist/graphFullClient.d.ts +0 -22
  40. package/dist/graphFullClient.d.ts.map +0 -1
  41. package/dist/graphFullClient.js +0 -189
  42. package/dist/graphFullClient.js.map +0 -1
  43. package/dist/index.d.ts.map +0 -1
  44. package/dist/index.js.map +0 -1
  45. package/dist/module-hosted-tool-manager.d.ts +0 -37
  46. package/dist/module-hosted-tool-manager.d.ts.map +0 -1
  47. package/dist/module-hosted-tool-manager.js +0 -375
  48. package/dist/module-hosted-tool-manager.js.map +0 -1
  49. package/dist/runner.d.ts +0 -38
  50. package/dist/runner.d.ts.map +0 -1
  51. package/dist/runner.js +0 -164
  52. package/dist/runner.js.map +0 -1
  53. package/dist/tool.d.ts +0 -29
  54. package/dist/tool.d.ts.map +0 -1
  55. package/dist/tool.js +0 -122
  56. package/dist/tool.js.map +0 -1
  57. package/dist/types.d.ts +0 -285
  58. package/dist/types.d.ts.map +0 -1
  59. package/dist/types.js +0 -37
  60. package/dist/types.js.map +0 -1
@@ -1,116 +0,0 @@
1
- import { generateIdFromName, getLogger, } from '@inkeep/agents-core';
2
- const logger = getLogger('artifactComponent');
3
- export class ArtifactComponent {
4
- config;
5
- baseURL;
6
- tenantId;
7
- projectId;
8
- initialized = false;
9
- id;
10
- constructor(config) {
11
- this.id = generateIdFromName(config.name);
12
- this.config = {
13
- ...config,
14
- id: this.id,
15
- tenantId: config.tenantId || 'default',
16
- projectId: config.projectId || 'default',
17
- };
18
- this.baseURL = process.env.INKEEP_API_URL || 'http://localhost:3002';
19
- this.tenantId = this.config.tenantId;
20
- this.projectId = this.config.projectId;
21
- logger.info({
22
- artifactComponentId: this.getId(),
23
- artifactComponentName: config.name,
24
- }, 'ArtifactComponent constructor initialized');
25
- }
26
- // Compute ID from name using same slug transformation as agents
27
- getId() {
28
- return this.id;
29
- }
30
- getName() {
31
- return this.config.name;
32
- }
33
- getDescription() {
34
- return this.config.description;
35
- }
36
- getSummaryProps() {
37
- return this.config.summaryProps;
38
- }
39
- getFullProps() {
40
- return this.config.fullProps;
41
- }
42
- // Public method to ensure artifact component exists in backend (with upsert behavior)
43
- async init() {
44
- if (this.initialized)
45
- return;
46
- try {
47
- // Always attempt to upsert the artifact component
48
- await this.upsertArtifactComponent();
49
- logger.info({
50
- artifactComponentId: this.getId(),
51
- }, 'ArtifactComponent initialized successfully');
52
- this.initialized = true;
53
- }
54
- catch (error) {
55
- logger.error({
56
- artifactComponentId: this.getId(),
57
- error: error instanceof Error ? error.message : 'Unknown error',
58
- }, 'Failed to initialize artifact component');
59
- throw error;
60
- }
61
- }
62
- // Private method to upsert artifact component (create or update)
63
- async upsertArtifactComponent() {
64
- const artifactComponentData = {
65
- id: this.getId(),
66
- name: this.config.name,
67
- description: this.config.description,
68
- summaryProps: this.config.summaryProps,
69
- fullProps: this.config.fullProps,
70
- };
71
- logger.info({ artifactComponentData }, 'artifactComponentData for create/update');
72
- // First try to update (in case artifact component exists)
73
- const updateResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/crud/artifact-components/${this.getId()}`, {
74
- method: 'PUT',
75
- headers: {
76
- 'Content-Type': 'application/json',
77
- },
78
- body: JSON.stringify(artifactComponentData),
79
- });
80
- logger.info({
81
- status: updateResponse.status,
82
- artifactComponentId: this.getId(),
83
- }, 'artifact component updateResponse');
84
- if (updateResponse.ok) {
85
- logger.info({
86
- artifactComponentId: this.getId(),
87
- }, 'ArtifactComponent updated successfully');
88
- return;
89
- }
90
- // If update failed with 404, artifact component doesn't exist - create it
91
- if (updateResponse.status === 404) {
92
- logger.info({
93
- artifactComponentId: this.getId(),
94
- }, 'ArtifactComponent not found, creating new artifact component');
95
- const createResponse = await fetch(`${this.baseURL}/tenants/${this.tenantId}/crud/artifact-components`, {
96
- method: 'POST',
97
- headers: {
98
- 'Content-Type': 'application/json',
99
- },
100
- body: JSON.stringify(artifactComponentData),
101
- });
102
- if (!createResponse.ok) {
103
- const errorText = await createResponse.text().catch(() => 'Unknown error');
104
- throw new Error(`Failed to create artifact component: ${createResponse.status} ${createResponse.statusText} - ${errorText}`);
105
- }
106
- logger.info({
107
- artifactComponentId: this.getId(),
108
- }, 'ArtifactComponent created successfully');
109
- return;
110
- }
111
- // If we get here, the update failed for some other reason
112
- const errorText = await updateResponse.text().catch(() => 'Unknown error');
113
- throw new Error(`Failed to update artifact component: ${updateResponse.status} ${updateResponse.statusText} - ${errorText}`);
114
- }
115
- }
116
- //# 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,EAClB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAE7B,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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AK,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,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"}
@@ -1,211 +0,0 @@
1
- import { type CredentialReferenceApiInsert, type MCPToolConfig } from '@inkeep/agents-core';
2
- import { z } from 'zod';
3
- import { Agent } from './agent';
4
- import { ArtifactComponent } from './artifact-component';
5
- import { DataComponent } from './data-component';
6
- import { Tool } from './tool';
7
- import type { AgentConfig, TransferConfig } from './types';
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
- type: string;
27
- id: 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
- type: z.ZodString;
93
- id: 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
- http: "http";
100
- sse: "sse";
101
- ipc: "ipc";
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,4BAA4B,EAEjC,KAAK,aAAa,EAEnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,C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AM,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 { CredentialReferenceApiInsertSchema, MCPToolConfigSchema, } from '@inkeep/agents-core';
2
- import { z } from 'zod';
3
- import { Agent } from './agent';
4
- import { ArtifactComponent } from './artifact-component';
5
- import { DataComponent } from './data-component';
6
- import { Tool } from './tool';
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"builders.js","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,kCAAkC,EAElC,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AA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ACnB,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"}
@@ -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,EACL,KAAK,mBAAmB,IAAI,iBAAiB,EAG9C,MAAM,qBAAqB,CAAC;AAI7B,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"}