@kjerneverk/execution-anthropic 1.0.6 → 1.0.8

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/README.md CHANGED
@@ -81,3 +81,4 @@ interface ProviderResponse {
81
81
  Apache-2.0
82
82
 
83
83
  <!-- v1.0.0 -->
84
+ TEST
package/dist/index.d.ts CHANGED
@@ -19,6 +19,10 @@ declare class AnthropicProvider implements Provider {
19
19
  * Execute a request against Anthropic
20
20
  */
21
21
  execute(request: Request_2, options?: ExecutionOptions): Promise<ProviderResponse>;
22
+ /**
23
+ * Execute a request with streaming response
24
+ */
25
+ executeStream(request: Request_2, options?: ExecutionOptions): AsyncIterable<StreamChunk>;
22
26
  }
23
27
  export { AnthropicProvider }
24
28
  export default AnthropicProvider;
@@ -48,6 +52,7 @@ export declare type Model = string;
48
52
  export declare interface Provider {
49
53
  readonly name: string;
50
54
  execute(request: Request_2, options?: ExecutionOptions): Promise<ProviderResponse>;
55
+ executeStream?(request: Request_2, options?: ExecutionOptions): AsyncIterable<StreamChunk>;
51
56
  supportsModel?(model: Model): boolean;
52
57
  }
53
58
 
@@ -73,10 +78,49 @@ declare interface Request_2 {
73
78
  model: Model;
74
79
  responseFormat?: any;
75
80
  validator?: any;
81
+ tools?: ToolDefinition[];
76
82
  addMessage(message: Message): void;
77
83
  }
78
84
  export { Request_2 as Request }
79
85
 
86
+ export declare interface StreamChunk {
87
+ type: StreamChunkType;
88
+ text?: string;
89
+ toolCall?: {
90
+ id?: string;
91
+ index?: number;
92
+ name?: string;
93
+ argumentsDelta?: string;
94
+ };
95
+ usage?: {
96
+ inputTokens: number;
97
+ outputTokens: number;
98
+ };
99
+ }
100
+
101
+ export declare type StreamChunkType = 'text' | 'tool_call_start' | 'tool_call_delta' | 'tool_call_end' | 'usage' | 'done';
102
+
103
+ export declare interface ToolDefinition {
104
+ name: string;
105
+ description: string;
106
+ parameters: ToolParameterSchema;
107
+ }
108
+
109
+ export declare interface ToolParameterSchema {
110
+ type: 'object';
111
+ properties: Record<string, {
112
+ type: string;
113
+ description?: string;
114
+ enum?: string[];
115
+ items?: {
116
+ type: string;
117
+ };
118
+ default?: any;
119
+ }>;
120
+ required?: string[];
121
+ additionalProperties?: boolean;
122
+ }
123
+
80
124
  /**
81
125
  * Package version
82
126
  */