@inkeep/agents-sdk 0.21.1 → 0.22.1
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.cjs +126 -61
- package/dist/index.d.cts +50 -5
- package/dist/index.d.ts +50 -5
- package/dist/index.js +125 -62
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArtifactComponentInsert, MCPToolConfig as MCPToolConfig$1, DataComponentApiInsert, ArtifactComponentApiInsert, CredentialReferenceApiInsert, DataComponentInsert, CredentialReferenceSelect, FunctionToolConfig, SubAgentApiInsert, AgentConversationHistoryConfig, AgentStopWhen, ModelSettings, StatusUpdateSettings, FullAgentDefinition, ToolInsert, McpTransportConfig, StopWhen,
|
|
2
|
-
export { ANTHROPIC_MODELS, FunctionToolConfig, GOOGLE_MODELS, ModelSettings, OPENAI_MODELS
|
|
1
|
+
import { ArtifactComponentInsert, MCPToolConfig as MCPToolConfig$1, DataComponentApiInsert, ArtifactComponentApiInsert, CredentialReferenceApiInsert, DataComponentInsert, CredentialReferenceSelect, FunctionToolConfig, SubAgentApiInsert, AgentConversationHistoryConfig, AgentStopWhen, ModelSettings, StatusUpdateSettings, FullAgentDefinition, ToolInsert, McpTransportConfig, StopWhen, FullProjectDefinition, StatusComponent as StatusComponent$1 } from '@inkeep/agents-core';
|
|
2
|
+
export { ANTHROPIC_MODELS, FunctionToolConfig, GOOGLE_MODELS, ModelSettings, OPENAI_MODELS } from '@inkeep/agents-core';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
type ArtifactComponentConfigWithZod = Omit<ArtifactComponentInsert, 'tenantId' | 'projectId' | 'props'> & {
|
|
@@ -136,6 +136,11 @@ interface ArtifactComponentConfig extends ComponentConfig {
|
|
|
136
136
|
interface DataComponentConfig extends ComponentConfig {
|
|
137
137
|
props: Record<string, unknown> | z.ZodObject<any>;
|
|
138
138
|
}
|
|
139
|
+
interface StatusComponentConfig {
|
|
140
|
+
type: string;
|
|
141
|
+
description?: string;
|
|
142
|
+
detailsSchema?: Record<string, unknown> | z.ZodObject<any>;
|
|
143
|
+
}
|
|
139
144
|
type AgentMcpConfig = {
|
|
140
145
|
server: Tool;
|
|
141
146
|
selectedTools?: string[];
|
|
@@ -751,7 +756,6 @@ interface ProjectConfig {
|
|
|
751
756
|
summarizer?: ModelSettings;
|
|
752
757
|
};
|
|
753
758
|
stopWhen?: StopWhen;
|
|
754
|
-
sandboxConfig?: SandboxConfig;
|
|
755
759
|
agents?: () => Agent[];
|
|
756
760
|
tools?: () => Tool[];
|
|
757
761
|
dataComponents?: () => DataComponent[];
|
|
@@ -820,7 +824,6 @@ declare class Project implements ProjectInterface {
|
|
|
820
824
|
private initialized;
|
|
821
825
|
private models?;
|
|
822
826
|
private stopWhen?;
|
|
823
|
-
private sandboxConfig?;
|
|
824
827
|
private agents;
|
|
825
828
|
private agentMap;
|
|
826
829
|
private credentialReferences?;
|
|
@@ -924,6 +927,23 @@ declare class Project implements ProjectInterface {
|
|
|
924
927
|
private toFullProjectDefinition;
|
|
925
928
|
}
|
|
926
929
|
|
|
930
|
+
type StatusComponentConfigWithZod = Omit<StatusComponent$1, 'detailsSchema'> & {
|
|
931
|
+
detailsSchema?: Record<string, unknown> | z.ZodObject<any>;
|
|
932
|
+
};
|
|
933
|
+
interface StatusComponentInterface {
|
|
934
|
+
config: StatusComponent$1;
|
|
935
|
+
getType(): string;
|
|
936
|
+
getDescription(): string | undefined;
|
|
937
|
+
getDetailsSchema(): StatusComponent$1['detailsSchema'];
|
|
938
|
+
}
|
|
939
|
+
declare class StatusComponent implements StatusComponentInterface {
|
|
940
|
+
config: StatusComponent$1;
|
|
941
|
+
constructor(config: StatusComponentConfigWithZod);
|
|
942
|
+
getType(): string;
|
|
943
|
+
getDescription(): string | undefined;
|
|
944
|
+
getDetailsSchema(): StatusComponent$1['detailsSchema'];
|
|
945
|
+
}
|
|
946
|
+
|
|
927
947
|
/**
|
|
928
948
|
* Helper function to create agent - OpenAI style
|
|
929
949
|
*/
|
|
@@ -1111,6 +1131,31 @@ declare function artifactComponent(config: ArtifactComponentConfig): ArtifactCom
|
|
|
1111
1131
|
* ```
|
|
1112
1132
|
*/
|
|
1113
1133
|
declare function dataComponent(config: DataComponentConfig): DataComponent;
|
|
1134
|
+
/**
|
|
1135
|
+
* Creates a status component for structured status updates.
|
|
1136
|
+
*
|
|
1137
|
+
* Status components define the structure of status updates
|
|
1138
|
+
* that agents can generate during long-running operations.
|
|
1139
|
+
*
|
|
1140
|
+
* @param config - Status component configuration
|
|
1141
|
+
* @returns A StatusComponent instance
|
|
1142
|
+
*
|
|
1143
|
+
* @example
|
|
1144
|
+
* ```typescript
|
|
1145
|
+
* import { z } from 'zod';
|
|
1146
|
+
*
|
|
1147
|
+
* const toolCallStatus = statusComponent({
|
|
1148
|
+
* type: 'tool_call_summary',
|
|
1149
|
+
* description: 'Summary of a tool execution',
|
|
1150
|
+
* detailsSchema: z.object({
|
|
1151
|
+
* tool_name: z.string(),
|
|
1152
|
+
* summary: z.string(),
|
|
1153
|
+
* status: z.enum(['success', 'error', 'in_progress'])
|
|
1154
|
+
* })
|
|
1155
|
+
* });
|
|
1156
|
+
* ```
|
|
1157
|
+
*/
|
|
1158
|
+
declare function statusComponent(config: StatusComponentConfig): StatusComponent;
|
|
1114
1159
|
declare function agentMcp(config: AgentMcpConfig): AgentMcpConfig;
|
|
1115
1160
|
/**
|
|
1116
1161
|
* Creates a function tool that executes user-defined code in a sandboxed environment.
|
|
@@ -1278,4 +1323,4 @@ declare const run: typeof Runner.run;
|
|
|
1278
1323
|
declare const stream: typeof Runner.stream;
|
|
1279
1324
|
declare const raceAgents: typeof Runner.raceAgents;
|
|
1280
1325
|
|
|
1281
|
-
export { type AgentConfig, AgentError, type AgentInterface, type AgentResponse, type AgentTool, type AllSubAgentInterface, ArtifactComponent, type ArtifactComponentInterface, type ArtifactComponentWithZodProps, type AssistantMessage, type BuilderAgentConfig, type BuilderRelationConfig, type BuilderToolConfig, type CredentialReference, DataComponent, type DataComponentInterface, type DataComponentWithZodProps, ExternalAgent, type ExternalAgentInterface, type ExtractCredentialIds, type FetchDefinitionConfig, FunctionTool, type GenerateOptions, type MCPToolConfig, MaxTurnsExceededError, type Message, type MessageInput, Project, type RequestSchemaConfig, type RequestSchemaDefinition, type RunResult, Runner, type ServerConfig, type StreamEvent, type StreamResponse, SubAgent, type SubAgentCanUseType, type SubAgentConfig, type SubAgentInterface, type SystemMessage, Tool, type ToolCall, type ToolConfig, ToolExecutionError, type ToolMessage, type ToolResult, type TransferConfig, TransferError, type UnionCredentialIds, type UserMessage, agent, agentMcp, artifactComponent, createEnvironmentSettings, createFullProjectViaAPI, credential, credentialRef, dataComponent, deleteFullProjectViaAPI, externalAgent, externalAgents, functionTool, getFullProjectViaAPI, isCredentialReference, mcpServer, mcpTool, project, raceAgents, registerEnvironmentSettings, run, stream, subAgent, transfer, updateFullProjectViaAPI };
|
|
1326
|
+
export { type AgentConfig, AgentError, type AgentInterface, type AgentResponse, type AgentTool, type AllSubAgentInterface, ArtifactComponent, type ArtifactComponentInterface, type ArtifactComponentWithZodProps, type AssistantMessage, type BuilderAgentConfig, type BuilderRelationConfig, type BuilderToolConfig, type CredentialReference, DataComponent, type DataComponentInterface, type DataComponentWithZodProps, ExternalAgent, type ExternalAgentInterface, type ExtractCredentialIds, type FetchDefinitionConfig, FunctionTool, type GenerateOptions, type MCPToolConfig, MaxTurnsExceededError, type Message, type MessageInput, Project, type RequestSchemaConfig, type RequestSchemaDefinition, type RunResult, Runner, type ServerConfig, StatusComponent, type StatusComponentInterface, type StreamEvent, type StreamResponse, SubAgent, type SubAgentCanUseType, type SubAgentConfig, type SubAgentInterface, type SystemMessage, Tool, type ToolCall, type ToolConfig, ToolExecutionError, type ToolMessage, type ToolResult, type TransferConfig, TransferError, type UnionCredentialIds, type UserMessage, agent, agentMcp, artifactComponent, createEnvironmentSettings, createFullProjectViaAPI, credential, credentialRef, dataComponent, deleteFullProjectViaAPI, externalAgent, externalAgents, functionTool, getFullProjectViaAPI, isCredentialReference, mcpServer, mcpTool, project, raceAgents, registerEnvironmentSettings, run, statusComponent, stream, subAgent, transfer, updateFullProjectViaAPI };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ArtifactComponentInsert, MCPToolConfig as MCPToolConfig$1, DataComponentApiInsert, ArtifactComponentApiInsert, CredentialReferenceApiInsert, DataComponentInsert, CredentialReferenceSelect, FunctionToolConfig, SubAgentApiInsert, AgentConversationHistoryConfig, AgentStopWhen, ModelSettings, StatusUpdateSettings, FullAgentDefinition, ToolInsert, McpTransportConfig, StopWhen,
|
|
2
|
-
export { ANTHROPIC_MODELS, FunctionToolConfig, GOOGLE_MODELS, ModelSettings, OPENAI_MODELS
|
|
1
|
+
import { ArtifactComponentInsert, MCPToolConfig as MCPToolConfig$1, DataComponentApiInsert, ArtifactComponentApiInsert, CredentialReferenceApiInsert, DataComponentInsert, CredentialReferenceSelect, FunctionToolConfig, SubAgentApiInsert, AgentConversationHistoryConfig, AgentStopWhen, ModelSettings, StatusUpdateSettings, FullAgentDefinition, ToolInsert, McpTransportConfig, StopWhen, FullProjectDefinition, StatusComponent as StatusComponent$1 } from '@inkeep/agents-core';
|
|
2
|
+
export { ANTHROPIC_MODELS, FunctionToolConfig, GOOGLE_MODELS, ModelSettings, OPENAI_MODELS } from '@inkeep/agents-core';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
type ArtifactComponentConfigWithZod = Omit<ArtifactComponentInsert, 'tenantId' | 'projectId' | 'props'> & {
|
|
@@ -136,6 +136,11 @@ interface ArtifactComponentConfig extends ComponentConfig {
|
|
|
136
136
|
interface DataComponentConfig extends ComponentConfig {
|
|
137
137
|
props: Record<string, unknown> | z.ZodObject<any>;
|
|
138
138
|
}
|
|
139
|
+
interface StatusComponentConfig {
|
|
140
|
+
type: string;
|
|
141
|
+
description?: string;
|
|
142
|
+
detailsSchema?: Record<string, unknown> | z.ZodObject<any>;
|
|
143
|
+
}
|
|
139
144
|
type AgentMcpConfig = {
|
|
140
145
|
server: Tool;
|
|
141
146
|
selectedTools?: string[];
|
|
@@ -751,7 +756,6 @@ interface ProjectConfig {
|
|
|
751
756
|
summarizer?: ModelSettings;
|
|
752
757
|
};
|
|
753
758
|
stopWhen?: StopWhen;
|
|
754
|
-
sandboxConfig?: SandboxConfig;
|
|
755
759
|
agents?: () => Agent[];
|
|
756
760
|
tools?: () => Tool[];
|
|
757
761
|
dataComponents?: () => DataComponent[];
|
|
@@ -820,7 +824,6 @@ declare class Project implements ProjectInterface {
|
|
|
820
824
|
private initialized;
|
|
821
825
|
private models?;
|
|
822
826
|
private stopWhen?;
|
|
823
|
-
private sandboxConfig?;
|
|
824
827
|
private agents;
|
|
825
828
|
private agentMap;
|
|
826
829
|
private credentialReferences?;
|
|
@@ -924,6 +927,23 @@ declare class Project implements ProjectInterface {
|
|
|
924
927
|
private toFullProjectDefinition;
|
|
925
928
|
}
|
|
926
929
|
|
|
930
|
+
type StatusComponentConfigWithZod = Omit<StatusComponent$1, 'detailsSchema'> & {
|
|
931
|
+
detailsSchema?: Record<string, unknown> | z.ZodObject<any>;
|
|
932
|
+
};
|
|
933
|
+
interface StatusComponentInterface {
|
|
934
|
+
config: StatusComponent$1;
|
|
935
|
+
getType(): string;
|
|
936
|
+
getDescription(): string | undefined;
|
|
937
|
+
getDetailsSchema(): StatusComponent$1['detailsSchema'];
|
|
938
|
+
}
|
|
939
|
+
declare class StatusComponent implements StatusComponentInterface {
|
|
940
|
+
config: StatusComponent$1;
|
|
941
|
+
constructor(config: StatusComponentConfigWithZod);
|
|
942
|
+
getType(): string;
|
|
943
|
+
getDescription(): string | undefined;
|
|
944
|
+
getDetailsSchema(): StatusComponent$1['detailsSchema'];
|
|
945
|
+
}
|
|
946
|
+
|
|
927
947
|
/**
|
|
928
948
|
* Helper function to create agent - OpenAI style
|
|
929
949
|
*/
|
|
@@ -1111,6 +1131,31 @@ declare function artifactComponent(config: ArtifactComponentConfig): ArtifactCom
|
|
|
1111
1131
|
* ```
|
|
1112
1132
|
*/
|
|
1113
1133
|
declare function dataComponent(config: DataComponentConfig): DataComponent;
|
|
1134
|
+
/**
|
|
1135
|
+
* Creates a status component for structured status updates.
|
|
1136
|
+
*
|
|
1137
|
+
* Status components define the structure of status updates
|
|
1138
|
+
* that agents can generate during long-running operations.
|
|
1139
|
+
*
|
|
1140
|
+
* @param config - Status component configuration
|
|
1141
|
+
* @returns A StatusComponent instance
|
|
1142
|
+
*
|
|
1143
|
+
* @example
|
|
1144
|
+
* ```typescript
|
|
1145
|
+
* import { z } from 'zod';
|
|
1146
|
+
*
|
|
1147
|
+
* const toolCallStatus = statusComponent({
|
|
1148
|
+
* type: 'tool_call_summary',
|
|
1149
|
+
* description: 'Summary of a tool execution',
|
|
1150
|
+
* detailsSchema: z.object({
|
|
1151
|
+
* tool_name: z.string(),
|
|
1152
|
+
* summary: z.string(),
|
|
1153
|
+
* status: z.enum(['success', 'error', 'in_progress'])
|
|
1154
|
+
* })
|
|
1155
|
+
* });
|
|
1156
|
+
* ```
|
|
1157
|
+
*/
|
|
1158
|
+
declare function statusComponent(config: StatusComponentConfig): StatusComponent;
|
|
1114
1159
|
declare function agentMcp(config: AgentMcpConfig): AgentMcpConfig;
|
|
1115
1160
|
/**
|
|
1116
1161
|
* Creates a function tool that executes user-defined code in a sandboxed environment.
|
|
@@ -1278,4 +1323,4 @@ declare const run: typeof Runner.run;
|
|
|
1278
1323
|
declare const stream: typeof Runner.stream;
|
|
1279
1324
|
declare const raceAgents: typeof Runner.raceAgents;
|
|
1280
1325
|
|
|
1281
|
-
export { type AgentConfig, AgentError, type AgentInterface, type AgentResponse, type AgentTool, type AllSubAgentInterface, ArtifactComponent, type ArtifactComponentInterface, type ArtifactComponentWithZodProps, type AssistantMessage, type BuilderAgentConfig, type BuilderRelationConfig, type BuilderToolConfig, type CredentialReference, DataComponent, type DataComponentInterface, type DataComponentWithZodProps, ExternalAgent, type ExternalAgentInterface, type ExtractCredentialIds, type FetchDefinitionConfig, FunctionTool, type GenerateOptions, type MCPToolConfig, MaxTurnsExceededError, type Message, type MessageInput, Project, type RequestSchemaConfig, type RequestSchemaDefinition, type RunResult, Runner, type ServerConfig, type StreamEvent, type StreamResponse, SubAgent, type SubAgentCanUseType, type SubAgentConfig, type SubAgentInterface, type SystemMessage, Tool, type ToolCall, type ToolConfig, ToolExecutionError, type ToolMessage, type ToolResult, type TransferConfig, TransferError, type UnionCredentialIds, type UserMessage, agent, agentMcp, artifactComponent, createEnvironmentSettings, createFullProjectViaAPI, credential, credentialRef, dataComponent, deleteFullProjectViaAPI, externalAgent, externalAgents, functionTool, getFullProjectViaAPI, isCredentialReference, mcpServer, mcpTool, project, raceAgents, registerEnvironmentSettings, run, stream, subAgent, transfer, updateFullProjectViaAPI };
|
|
1326
|
+
export { type AgentConfig, AgentError, type AgentInterface, type AgentResponse, type AgentTool, type AllSubAgentInterface, ArtifactComponent, type ArtifactComponentInterface, type ArtifactComponentWithZodProps, type AssistantMessage, type BuilderAgentConfig, type BuilderRelationConfig, type BuilderToolConfig, type CredentialReference, DataComponent, type DataComponentInterface, type DataComponentWithZodProps, ExternalAgent, type ExternalAgentInterface, type ExtractCredentialIds, type FetchDefinitionConfig, FunctionTool, type GenerateOptions, type MCPToolConfig, MaxTurnsExceededError, type Message, type MessageInput, Project, type RequestSchemaConfig, type RequestSchemaDefinition, type RunResult, Runner, type ServerConfig, StatusComponent, type StatusComponentInterface, type StreamEvent, type StreamResponse, SubAgent, type SubAgentCanUseType, type SubAgentConfig, type SubAgentInterface, type SystemMessage, Tool, type ToolCall, type ToolConfig, ToolExecutionError, type ToolMessage, type ToolResult, type TransferConfig, TransferError, type UnionCredentialIds, type UserMessage, agent, agentMcp, artifactComponent, createEnvironmentSettings, createFullProjectViaAPI, credential, credentialRef, dataComponent, deleteFullProjectViaAPI, externalAgent, externalAgents, functionTool, getFullProjectViaAPI, isCredentialReference, mcpServer, mcpTool, project, raceAgents, registerEnvironmentSettings, run, statusComponent, stream, subAgent, transfer, updateFullProjectViaAPI };
|