@langchain/protocol
Advanced tools
+1
-1
| { | ||
| "name": "@langchain/protocol", | ||
| "version": "0.0.12", | ||
| "version": "0.0.13", | ||
| "description": "TypeScript bindings for the LangChain agent streaming protocol", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
+5
-45
@@ -75,3 +75,3 @@ // ========================================================================== | ||
| // Union of all tool-related content block types (chunk and finalized). | ||
| export type DataContentBlock = ImageContentBlock | VideoContentBlock | AudioContentBlock | PlainTextContentBlock | FileContentBlock; | ||
| export type DataContentBlock = ImageContentBlock | VideoContentBlock | AudioContentBlock | FileContentBlock; | ||
@@ -84,7 +84,4 @@ // Finalized content blocks (non-chunk types). Used in content-block-finish. | ||
| // Provider-specific metadata bag carried on content blocks and annotations. | ||
| export type BlockIndex = JsInt | string; | ||
| export type Extras = Record<string, any>; | ||
| export type TextContentBlock = Extensible & { | ||
@@ -96,3 +93,2 @@ type: string; | ||
| annotations?: Annotation[]; | ||
| extras?: Extras; | ||
| }; | ||
@@ -110,3 +106,2 @@ | ||
| cited_text?: string; | ||
| extras?: Extras; | ||
| }; | ||
@@ -125,3 +120,2 @@ | ||
| index?: BlockIndex; | ||
| extras?: Extras; | ||
| }; | ||
@@ -135,3 +129,2 @@ | ||
| index?: BlockIndex; | ||
| extras?: Extras; | ||
| }; | ||
@@ -148,3 +141,2 @@ | ||
| index?: BlockIndex; | ||
| extras?: Extras; | ||
| }; | ||
@@ -159,3 +151,2 @@ | ||
| index?: BlockIndex; | ||
| extras?: Extras; | ||
| }; | ||
@@ -169,3 +160,2 @@ | ||
| index?: BlockIndex; | ||
| extras?: Extras; | ||
| }; | ||
@@ -179,3 +169,2 @@ | ||
| index?: BlockIndex; | ||
| extras?: Extras; | ||
| }; | ||
@@ -190,3 +179,2 @@ | ||
| index?: BlockIndex; | ||
| extras?: Extras; | ||
| }; | ||
@@ -205,3 +193,2 @@ | ||
| index?: BlockIndex; | ||
| extras?: Extras; | ||
| }; | ||
@@ -220,7 +207,4 @@ | ||
| index?: BlockIndex; | ||
| extras?: Extras; | ||
| }; | ||
| // Plaintext document data (e.g., .txt/.md). Distinct from TextContentBlock, | ||
| // which carries model-authored text output. | ||
| export type VideoContentBlock = Extensible & { | ||
@@ -237,25 +221,4 @@ type: "video"; | ||
| index?: BlockIndex; | ||
| extras?: Extras; | ||
| }; | ||
| export type PlainTextContentBlock = Extensible & { | ||
| type: "text-plain"; | ||
| mime_type: "text/plain"; | ||
| id?: string; | ||
| file_id?: string; | ||
| url?: string; | ||
| /** | ||
| * Base64-encoded file data | ||
| */ | ||
| base64?: string; | ||
| /** | ||
| * Inline plaintext (optional if base64 is provided) | ||
| */ | ||
| text?: string; | ||
| title?: string; | ||
| context?: string; | ||
| index?: BlockIndex; | ||
| extras?: Extras; | ||
| }; | ||
| // Provider-specific escape hatch for content blocks not modeled above. | ||
@@ -273,3 +236,2 @@ export type FileContentBlock = Extensible & { | ||
| index?: BlockIndex; | ||
| extras?: Extras; | ||
| }; | ||
@@ -729,3 +691,3 @@ | ||
| */ | ||
| message_id?: string; | ||
| id: string; | ||
| /** | ||
@@ -748,3 +710,3 @@ * Concise provider/model metadata for AI messages | ||
| index: number; | ||
| content_block: ContentBlock; | ||
| content: ContentBlock; | ||
| }; | ||
@@ -758,3 +720,3 @@ | ||
| index: number; | ||
| content_block: ContentBlock; | ||
| content: ContentBlock; | ||
| }; | ||
@@ -766,3 +728,3 @@ | ||
| index: number; | ||
| content_block: FinalizedContentBlock; | ||
| content: FinalizedContentBlock; | ||
| }; | ||
@@ -776,3 +738,2 @@ | ||
| usage?: UsageInfo; | ||
| metadata?: Record<string, any>; | ||
| }; | ||
@@ -785,3 +746,2 @@ | ||
| total_tokens?: number; | ||
| cached_tokens?: number; | ||
| }; | ||
@@ -788,0 +748,0 @@ |
37299
-2.56%966
-3.78%