@inkeep/agents-sdk 0.6.4 → 0.6.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/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { MCPToolConfig as MCPToolConfig$1, CredentialReferenceApiInsert, CredentialReferenceSelect, DataComponentInsert, ArtifactComponentInsert, AgentApiInsert, AgentStopWhen, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, GraphStopWhen, StatusUpdateSettings, ToolInsert, McpTransportConfig, StopWhen, FullProjectDefinition } from '@inkeep/agents-core';
1
+ import { MCPToolConfig as MCPToolConfig$1, ArtifactComponentInsert, CredentialReferenceApiInsert, DataComponentInsert, CredentialReferenceSelect, AgentApiInsert, AgentStopWhen, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, GraphStopWhen, StatusUpdateSettings, FullGraphDefinition, ToolInsert, McpTransportConfig, StopWhen, FullProjectDefinition } from '@inkeep/agents-core';
2
2
  import { z } from 'zod';
3
3
 
4
4
  interface ToolInterface {
@@ -31,6 +31,34 @@ declare class Tool implements ToolInterface {
31
31
  private upsertTool;
32
32
  }
33
33
 
34
+ interface ArtifactComponentInterface {
35
+ config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>;
36
+ init(): Promise<void>;
37
+ getId(): ArtifactComponentInsert['id'];
38
+ getName(): ArtifactComponentInsert['name'];
39
+ getDescription(): ArtifactComponentInsert['description'];
40
+ getSummaryProps(): ArtifactComponentInsert['summaryProps'];
41
+ getFullProps(): ArtifactComponentInsert['fullProps'];
42
+ setContext(tenantId: string, projectId: string): void;
43
+ }
44
+ declare class ArtifactComponent implements ArtifactComponentInterface {
45
+ config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>;
46
+ private baseURL;
47
+ private tenantId;
48
+ private projectId;
49
+ private initialized;
50
+ private id;
51
+ constructor(config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>);
52
+ setContext(tenantId: string, projectId: string): void;
53
+ getId(): string;
54
+ getName(): string;
55
+ getDescription(): string;
56
+ getSummaryProps(): ArtifactComponentInsert['summaryProps'];
57
+ getFullProps(): ArtifactComponentInsert['fullProps'];
58
+ init(): Promise<void>;
59
+ private upsertArtifactComponent;
60
+ }
61
+
34
62
  /**
35
63
  * Function signature for transfer conditions
36
64
  */
@@ -95,6 +123,32 @@ type AgentMcpConfig = {
95
123
  */
96
124
  declare function transfer(targetAgent: Agent, description?: string, condition?: TransferConditionFunction): TransferConfig;
97
125
 
126
+ interface DataComponentInterface {
127
+ config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>;
128
+ init(): Promise<void>;
129
+ getId(): DataComponentInsert['id'];
130
+ getName(): DataComponentInsert['name'];
131
+ getDescription(): DataComponentInsert['description'];
132
+ getProps(): DataComponentInsert['props'];
133
+ setContext(tenantId: string, projectId: string): void;
134
+ }
135
+ declare class DataComponent implements DataComponentInterface {
136
+ config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>;
137
+ private baseURL;
138
+ private tenantId;
139
+ private projectId;
140
+ private initialized;
141
+ private id;
142
+ constructor(config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>);
143
+ setContext(tenantId: string, projectId: string): void;
144
+ getId(): string;
145
+ getName(): string;
146
+ getDescription(): string;
147
+ getProps(): DataComponentInsert['props'];
148
+ init(): Promise<void>;
149
+ private upsertDataComponent;
150
+ }
151
+
98
152
  type ExternalAgentConfig = {
99
153
  type?: 'external';
100
154
  id: string;
@@ -147,60 +201,12 @@ declare function externalAgent(config: ExternalAgentConfig): ExternalAgent;
147
201
  */
148
202
  declare function externalAgents(configs: Record<string, ExternalAgentConfig>): Record<string, ExternalAgent>;
149
203
 
150
- interface DataComponentInterface {
151
- config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>;
152
- init(): Promise<void>;
153
- getId(): DataComponentInsert['id'];
154
- getName(): DataComponentInsert['name'];
155
- getDescription(): DataComponentInsert['description'];
156
- getProps(): DataComponentInsert['props'];
157
- setContext(tenantId: string, projectId: string): void;
158
- }
159
- declare class DataComponent implements DataComponentInterface {
160
- config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>;
161
- private baseURL;
162
- private tenantId;
163
- private projectId;
164
- private initialized;
165
- private id;
166
- constructor(config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>);
167
- setContext(tenantId: string, projectId: string): void;
168
- getId(): string;
169
- getName(): string;
170
- getDescription(): string;
171
- getProps(): DataComponentInsert['props'];
172
- init(): Promise<void>;
173
- private upsertDataComponent;
174
- }
175
-
176
- interface ArtifactComponentInterface {
177
- config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>;
178
- init(): Promise<void>;
179
- getId(): ArtifactComponentInsert['id'];
180
- getName(): ArtifactComponentInsert['name'];
181
- getDescription(): ArtifactComponentInsert['description'];
182
- getSummaryProps(): ArtifactComponentInsert['summaryProps'];
183
- getFullProps(): ArtifactComponentInsert['fullProps'];
184
- setContext(tenantId: string, projectId: string): void;
185
- }
186
- declare class ArtifactComponent implements ArtifactComponentInterface {
187
- config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>;
188
- private baseURL;
189
- private tenantId;
190
- private projectId;
191
- private initialized;
192
- private id;
193
- constructor(config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>);
194
- setContext(tenantId: string, projectId: string): void;
195
- getId(): string;
196
- getName(): string;
197
- getDescription(): string;
198
- getSummaryProps(): ArtifactComponentInsert['summaryProps'];
199
- getFullProps(): ArtifactComponentInsert['fullProps'];
200
- init(): Promise<void>;
201
- private upsertArtifactComponent;
202
- }
203
-
204
+ /**
205
+ * Tool instance that may have additional metadata attached during agent processing
206
+ */
207
+ type AgentTool = Tool & {
208
+ selectedTools?: string[];
209
+ };
204
210
  interface UserMessage {
205
211
  role: 'user';
206
212
  content: string;
@@ -401,7 +407,7 @@ interface AgentInterface {
401
407
  getName(): string;
402
408
  getDescription(): string;
403
409
  getInstructions(): string;
404
- getTools(): Record<string, any>;
410
+ getTools(): Record<string, AgentTool>;
405
411
  getTransfers(): AgentInterface[];
406
412
  getDelegates(): AllAgentInterface[];
407
413
  getDataComponents(): DataComponentApiInsert[];
@@ -436,6 +442,7 @@ interface GraphInterface {
436
442
  getDefaultAgent(): AgentInterface | undefined;
437
443
  getAgent(name: string): AllAgentInterface | undefined;
438
444
  getAgents(): AllAgentInterface[];
445
+ toFullGraphDefinition(): Promise<FullGraphDefinition>;
439
446
  }
440
447
  interface BuilderToolConfig {
441
448
  name: string;
@@ -478,7 +485,7 @@ declare class Agent implements AgentInterface {
478
485
  * Get the agent's description (the human-readable description field)
479
486
  */
480
487
  getDescription(): string;
481
- getTools(): Record<string, unknown>;
488
+ getTools(): Record<string, AgentTool>;
482
489
  getModels(): typeof this$1.config.models;
483
490
  setModels(models: typeof this$1.config.models): void;
484
491
  getTransfers(): AgentInterface[];
@@ -530,7 +537,7 @@ declare class AgentGraph implements GraphInterface {
530
537
  /**
531
538
  * Convert the AgentGraph to FullGraphDefinition format for the new graph endpoint
532
539
  */
533
- private toFullGraphDefinition;
540
+ toFullGraphDefinition(): Promise<FullGraphDefinition>;
534
541
  /**
535
542
  * Initialize all tools in all agents (especially IPCTools that need MCP server URLs)
536
543
  */
@@ -1185,4 +1192,4 @@ declare const run: typeof Runner.run;
1185
1192
  declare const stream: typeof Runner.stream;
1186
1193
  declare const raceGraphs: typeof Runner.raceGraphs;
1187
1194
 
1188
- export { Agent, type AgentCanUseType, type AgentConfig, AgentError, type AgentInterface, type AgentResponse, type AllAgentInterface, ArtifactComponent, type ArtifactComponentInterface, type AssistantMessage, type BuilderAgentConfig, type BuilderRelationConfig, type BuilderToolConfig, type CredentialReference, DataComponent, type DataComponentInterface, ExternalAgent, type ExternalAgentInterface, type ExtractCredentialIds, type FetchDefinitionConfig, type GenerateOptions, type GraphConfig, type GraphInterface, type MCPToolConfig, MaxTurnsExceededError, type Message, type MessageInput, type ModelSettings, ModelSettingsSchema, Project, type RequestSchemaConfig, type RequestSchemaDefinition, type RunResult, Runner, type ServerConfig, type StreamEvent, type StreamResponse, type SystemMessage, Tool, type ToolCall, type ToolConfig, ToolExecutionError, type ToolMessage, type ToolResult, type TransferConfig, TransferError, type UnionCredentialIds, type UserMessage, agent, agentGraph, agentMcp, artifactComponent, createEnvironmentSettings, createFullProjectViaAPI, credential, credentialRef, dataComponent, deleteFullProjectViaAPI, externalAgent, externalAgents, getFullProjectViaAPI, isCredentialReference, mcpServer, mcpTool, project, raceGraphs, registerEnvironmentSettings, run, stream, transfer, updateFullProjectViaAPI };
1195
+ export { Agent, type AgentCanUseType, type AgentConfig, AgentError, type AgentInterface, type AgentResponse, type AgentTool, type AllAgentInterface, ArtifactComponent, type ArtifactComponentInterface, type AssistantMessage, type BuilderAgentConfig, type BuilderRelationConfig, type BuilderToolConfig, type CredentialReference, DataComponent, type DataComponentInterface, ExternalAgent, type ExternalAgentInterface, type ExtractCredentialIds, type FetchDefinitionConfig, type GenerateOptions, type GraphConfig, type GraphInterface, type MCPToolConfig, MaxTurnsExceededError, type Message, type MessageInput, type ModelSettings, ModelSettingsSchema, Project, type RequestSchemaConfig, type RequestSchemaDefinition, type RunResult, Runner, type ServerConfig, type StreamEvent, type StreamResponse, type SystemMessage, Tool, type ToolCall, type ToolConfig, ToolExecutionError, type ToolMessage, type ToolResult, type TransferConfig, TransferError, type UnionCredentialIds, type UserMessage, agent, agentGraph, agentMcp, artifactComponent, createEnvironmentSettings, createFullProjectViaAPI, credential, credentialRef, dataComponent, deleteFullProjectViaAPI, externalAgent, externalAgents, getFullProjectViaAPI, isCredentialReference, mcpServer, mcpTool, project, raceGraphs, registerEnvironmentSettings, run, stream, transfer, updateFullProjectViaAPI };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { MCPToolConfig as MCPToolConfig$1, CredentialReferenceApiInsert, CredentialReferenceSelect, DataComponentInsert, ArtifactComponentInsert, AgentApiInsert, AgentStopWhen, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, GraphStopWhen, StatusUpdateSettings, ToolInsert, McpTransportConfig, StopWhen, FullProjectDefinition } from '@inkeep/agents-core';
1
+ import { MCPToolConfig as MCPToolConfig$1, ArtifactComponentInsert, CredentialReferenceApiInsert, DataComponentInsert, CredentialReferenceSelect, AgentApiInsert, AgentStopWhen, DataComponentApiInsert, ArtifactComponentApiInsert, AgentConversationHistoryConfig, GraphStopWhen, StatusUpdateSettings, FullGraphDefinition, ToolInsert, McpTransportConfig, StopWhen, FullProjectDefinition } from '@inkeep/agents-core';
2
2
  import { z } from 'zod';
3
3
 
4
4
  interface ToolInterface {
@@ -31,6 +31,34 @@ declare class Tool implements ToolInterface {
31
31
  private upsertTool;
32
32
  }
33
33
 
34
+ interface ArtifactComponentInterface {
35
+ config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>;
36
+ init(): Promise<void>;
37
+ getId(): ArtifactComponentInsert['id'];
38
+ getName(): ArtifactComponentInsert['name'];
39
+ getDescription(): ArtifactComponentInsert['description'];
40
+ getSummaryProps(): ArtifactComponentInsert['summaryProps'];
41
+ getFullProps(): ArtifactComponentInsert['fullProps'];
42
+ setContext(tenantId: string, projectId: string): void;
43
+ }
44
+ declare class ArtifactComponent implements ArtifactComponentInterface {
45
+ config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>;
46
+ private baseURL;
47
+ private tenantId;
48
+ private projectId;
49
+ private initialized;
50
+ private id;
51
+ constructor(config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>);
52
+ setContext(tenantId: string, projectId: string): void;
53
+ getId(): string;
54
+ getName(): string;
55
+ getDescription(): string;
56
+ getSummaryProps(): ArtifactComponentInsert['summaryProps'];
57
+ getFullProps(): ArtifactComponentInsert['fullProps'];
58
+ init(): Promise<void>;
59
+ private upsertArtifactComponent;
60
+ }
61
+
34
62
  /**
35
63
  * Function signature for transfer conditions
36
64
  */
@@ -95,6 +123,32 @@ type AgentMcpConfig = {
95
123
  */
96
124
  declare function transfer(targetAgent: Agent, description?: string, condition?: TransferConditionFunction): TransferConfig;
97
125
 
126
+ interface DataComponentInterface {
127
+ config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>;
128
+ init(): Promise<void>;
129
+ getId(): DataComponentInsert['id'];
130
+ getName(): DataComponentInsert['name'];
131
+ getDescription(): DataComponentInsert['description'];
132
+ getProps(): DataComponentInsert['props'];
133
+ setContext(tenantId: string, projectId: string): void;
134
+ }
135
+ declare class DataComponent implements DataComponentInterface {
136
+ config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>;
137
+ private baseURL;
138
+ private tenantId;
139
+ private projectId;
140
+ private initialized;
141
+ private id;
142
+ constructor(config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>);
143
+ setContext(tenantId: string, projectId: string): void;
144
+ getId(): string;
145
+ getName(): string;
146
+ getDescription(): string;
147
+ getProps(): DataComponentInsert['props'];
148
+ init(): Promise<void>;
149
+ private upsertDataComponent;
150
+ }
151
+
98
152
  type ExternalAgentConfig = {
99
153
  type?: 'external';
100
154
  id: string;
@@ -147,60 +201,12 @@ declare function externalAgent(config: ExternalAgentConfig): ExternalAgent;
147
201
  */
148
202
  declare function externalAgents(configs: Record<string, ExternalAgentConfig>): Record<string, ExternalAgent>;
149
203
 
150
- interface DataComponentInterface {
151
- config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>;
152
- init(): Promise<void>;
153
- getId(): DataComponentInsert['id'];
154
- getName(): DataComponentInsert['name'];
155
- getDescription(): DataComponentInsert['description'];
156
- getProps(): DataComponentInsert['props'];
157
- setContext(tenantId: string, projectId: string): void;
158
- }
159
- declare class DataComponent implements DataComponentInterface {
160
- config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>;
161
- private baseURL;
162
- private tenantId;
163
- private projectId;
164
- private initialized;
165
- private id;
166
- constructor(config: Omit<DataComponentInsert, 'tenantId' | 'projectId'>);
167
- setContext(tenantId: string, projectId: string): void;
168
- getId(): string;
169
- getName(): string;
170
- getDescription(): string;
171
- getProps(): DataComponentInsert['props'];
172
- init(): Promise<void>;
173
- private upsertDataComponent;
174
- }
175
-
176
- interface ArtifactComponentInterface {
177
- config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>;
178
- init(): Promise<void>;
179
- getId(): ArtifactComponentInsert['id'];
180
- getName(): ArtifactComponentInsert['name'];
181
- getDescription(): ArtifactComponentInsert['description'];
182
- getSummaryProps(): ArtifactComponentInsert['summaryProps'];
183
- getFullProps(): ArtifactComponentInsert['fullProps'];
184
- setContext(tenantId: string, projectId: string): void;
185
- }
186
- declare class ArtifactComponent implements ArtifactComponentInterface {
187
- config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>;
188
- private baseURL;
189
- private tenantId;
190
- private projectId;
191
- private initialized;
192
- private id;
193
- constructor(config: Omit<ArtifactComponentInsert, 'tenantId' | 'projectId'>);
194
- setContext(tenantId: string, projectId: string): void;
195
- getId(): string;
196
- getName(): string;
197
- getDescription(): string;
198
- getSummaryProps(): ArtifactComponentInsert['summaryProps'];
199
- getFullProps(): ArtifactComponentInsert['fullProps'];
200
- init(): Promise<void>;
201
- private upsertArtifactComponent;
202
- }
203
-
204
+ /**
205
+ * Tool instance that may have additional metadata attached during agent processing
206
+ */
207
+ type AgentTool = Tool & {
208
+ selectedTools?: string[];
209
+ };
204
210
  interface UserMessage {
205
211
  role: 'user';
206
212
  content: string;
@@ -401,7 +407,7 @@ interface AgentInterface {
401
407
  getName(): string;
402
408
  getDescription(): string;
403
409
  getInstructions(): string;
404
- getTools(): Record<string, any>;
410
+ getTools(): Record<string, AgentTool>;
405
411
  getTransfers(): AgentInterface[];
406
412
  getDelegates(): AllAgentInterface[];
407
413
  getDataComponents(): DataComponentApiInsert[];
@@ -436,6 +442,7 @@ interface GraphInterface {
436
442
  getDefaultAgent(): AgentInterface | undefined;
437
443
  getAgent(name: string): AllAgentInterface | undefined;
438
444
  getAgents(): AllAgentInterface[];
445
+ toFullGraphDefinition(): Promise<FullGraphDefinition>;
439
446
  }
440
447
  interface BuilderToolConfig {
441
448
  name: string;
@@ -478,7 +485,7 @@ declare class Agent implements AgentInterface {
478
485
  * Get the agent's description (the human-readable description field)
479
486
  */
480
487
  getDescription(): string;
481
- getTools(): Record<string, unknown>;
488
+ getTools(): Record<string, AgentTool>;
482
489
  getModels(): typeof this$1.config.models;
483
490
  setModels(models: typeof this$1.config.models): void;
484
491
  getTransfers(): AgentInterface[];
@@ -530,7 +537,7 @@ declare class AgentGraph implements GraphInterface {
530
537
  /**
531
538
  * Convert the AgentGraph to FullGraphDefinition format for the new graph endpoint
532
539
  */
533
- private toFullGraphDefinition;
540
+ toFullGraphDefinition(): Promise<FullGraphDefinition>;
534
541
  /**
535
542
  * Initialize all tools in all agents (especially IPCTools that need MCP server URLs)
536
543
  */
@@ -1185,4 +1192,4 @@ declare const run: typeof Runner.run;
1185
1192
  declare const stream: typeof Runner.stream;
1186
1193
  declare const raceGraphs: typeof Runner.raceGraphs;
1187
1194
 
1188
- export { Agent, type AgentCanUseType, type AgentConfig, AgentError, type AgentInterface, type AgentResponse, type AllAgentInterface, ArtifactComponent, type ArtifactComponentInterface, type AssistantMessage, type BuilderAgentConfig, type BuilderRelationConfig, type BuilderToolConfig, type CredentialReference, DataComponent, type DataComponentInterface, ExternalAgent, type ExternalAgentInterface, type ExtractCredentialIds, type FetchDefinitionConfig, type GenerateOptions, type GraphConfig, type GraphInterface, type MCPToolConfig, MaxTurnsExceededError, type Message, type MessageInput, type ModelSettings, ModelSettingsSchema, Project, type RequestSchemaConfig, type RequestSchemaDefinition, type RunResult, Runner, type ServerConfig, type StreamEvent, type StreamResponse, type SystemMessage, Tool, type ToolCall, type ToolConfig, ToolExecutionError, type ToolMessage, type ToolResult, type TransferConfig, TransferError, type UnionCredentialIds, type UserMessage, agent, agentGraph, agentMcp, artifactComponent, createEnvironmentSettings, createFullProjectViaAPI, credential, credentialRef, dataComponent, deleteFullProjectViaAPI, externalAgent, externalAgents, getFullProjectViaAPI, isCredentialReference, mcpServer, mcpTool, project, raceGraphs, registerEnvironmentSettings, run, stream, transfer, updateFullProjectViaAPI };
1195
+ export { Agent, type AgentCanUseType, type AgentConfig, AgentError, type AgentInterface, type AgentResponse, type AgentTool, type AllAgentInterface, ArtifactComponent, type ArtifactComponentInterface, type AssistantMessage, type BuilderAgentConfig, type BuilderRelationConfig, type BuilderToolConfig, type CredentialReference, DataComponent, type DataComponentInterface, ExternalAgent, type ExternalAgentInterface, type ExtractCredentialIds, type FetchDefinitionConfig, type GenerateOptions, type GraphConfig, type GraphInterface, type MCPToolConfig, MaxTurnsExceededError, type Message, type MessageInput, type ModelSettings, ModelSettingsSchema, Project, type RequestSchemaConfig, type RequestSchemaDefinition, type RunResult, Runner, type ServerConfig, type StreamEvent, type StreamResponse, type SystemMessage, Tool, type ToolCall, type ToolConfig, ToolExecutionError, type ToolMessage, type ToolResult, type TransferConfig, TransferError, type UnionCredentialIds, type UserMessage, agent, agentGraph, agentMcp, artifactComponent, createEnvironmentSettings, createFullProjectViaAPI, credential, credentialRef, dataComponent, deleteFullProjectViaAPI, externalAgent, externalAgents, getFullProjectViaAPI, isCredentialReference, mcpServer, mcpTool, project, raceGraphs, registerEnvironmentSettings, run, stream, transfer, updateFullProjectViaAPI };