@paymanai/payman-typescript-ask-sdk 4.0.10 → 4.0.14

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.mts CHANGED
@@ -198,18 +198,11 @@ type MessageDisplay = {
198
198
  feedback?: MessageFeedbackState | null;
199
199
  isStreaming?: boolean;
200
200
  streamingContent?: string;
201
- currentWorker?: string;
202
201
  currentMessage?: string;
203
202
  streamProgress?: StreamProgress;
204
203
  steps?: StreamingStep[];
205
204
  isCancelled?: boolean;
206
205
  currentExecutingStepId?: string;
207
- /** Current thinking block text (live, resets per block) */
208
- activeThinkingText?: string;
209
- /** All thinking accumulated across blocks (for post-stream display) */
210
- allThinkingText?: string;
211
- /** Pre-formatted thinking text built from steps + allThinkingText (v2 streaming format, matches demo) */
212
- formattedThinkingText?: string;
213
206
  /** True while RAG image URLs are being resolved after the final response is shown */
214
207
  isResolvingImages?: boolean;
215
208
  /**
@@ -527,17 +520,6 @@ type StreamOptions = {
527
520
  */
528
521
  declare function streamWorkflowEvents(url: string, body: Record<string, unknown>, headers: Record<string, string>, options?: StreamOptions): Promise<void>;
529
522
 
530
- /**
531
- * Build a richly-formatted thinking string from the SDK's `steps` array
532
- * and raw `allThinkingText`. This matches the demo's streaming format
533
- * so both the SDK and demo produce identical thinking output.
534
- *
535
- * The SDK's `allThinkingText` only contains raw `INTENT_THINKING_CONT`
536
- * deltas — no phase headers. This function reconstructs the full format
537
- * from the steps array, which stores every event the SDK processes.
538
- */
539
- declare function buildFormattedThinking(steps: StreamingStep[] | undefined, allThinkingText: string): string;
540
-
541
523
  /**
542
524
  * Classify a `USER_ACTION_REQUIRED` event into a render kind. Primary
543
525
  * discriminator is the MCP elicitation `action`; we fall back to the
@@ -545,9 +527,7 @@ declare function buildFormattedThinking(steps: StreamingStep[] | undefined, allT
545
527
  */
546
528
  declare function classifyUserActionKind(action: string | undefined, schema: RequestedSchema | undefined): UserActionKind;
547
529
  type V2EventProcessorState = {
548
- formattedThinkingText: string;
549
530
  finalResponse: string;
550
- currentWorker: string;
551
531
  lastEventType: string;
552
532
  sessionId?: string;
553
533
  executionId?: string;
@@ -659,4 +639,4 @@ declare function resendUserAction(config: ChatConfig, userActionId: string): Pro
659
639
 
660
640
  declare function migrateActiveStream(oldUserId: string, newUserId: string): void;
661
641
 
662
- export { type APIConfig, type ActiveUserAction, type AgentStage, type AnalysisMode, type ChatCallbacks, type ChatConfig, type ChunkDisplay, type FieldWidget, type JsonSchemaField, type JsonSchemaOption, type MessageDisplay, type MessageFeedbackState, type MessageRole, type RequestedSchema, type SendMessageOptions, type SessionParams, type StreamEvent, type StreamOptions, type StreamProgress, type StreamingStep, type UseChatV2Return, type UseVoiceReturn, type UserActionKind, type UserActionRequest, UserActionStaleError, type UserActionState, type UserActionStatus, type UserActionSubAction, type UserNotification, type V2EventProcessorState, type VerificationType, type VoiceCallbacks, type VoiceConfig, type VoicePermissions, type VoiceResult, type VoiceState, buildContent, buildFormattedThinking, cancelUserAction, classifyField, classifyUserActionKind, coerceValue, createInitialV2State, defaultValueFor, generateId, getOptions, isNestedOrUnsupported, isRequired, migrateActiveStream, processStreamEventV2, renderableFields, resendUserAction, streamWorkflowEvents, submitUserAction, useChatV2, useVoice, validateField, validateForm };
642
+ export { type APIConfig, type ActiveUserAction, type AgentStage, type AnalysisMode, type ChatCallbacks, type ChatConfig, type ChunkDisplay, type FieldWidget, type JsonSchemaField, type JsonSchemaOption, type MessageDisplay, type MessageFeedbackState, type MessageRole, type RequestedSchema, type SendMessageOptions, type SessionParams, type StreamEvent, type StreamOptions, type StreamProgress, type StreamingStep, type UseChatV2Return, type UseVoiceReturn, type UserActionKind, type UserActionRequest, UserActionStaleError, type UserActionState, type UserActionStatus, type UserActionSubAction, type UserNotification, type V2EventProcessorState, type VerificationType, type VoiceCallbacks, type VoiceConfig, type VoicePermissions, type VoiceResult, type VoiceState, buildContent, cancelUserAction, classifyField, classifyUserActionKind, coerceValue, createInitialV2State, defaultValueFor, generateId, getOptions, isNestedOrUnsupported, isRequired, migrateActiveStream, processStreamEventV2, renderableFields, resendUserAction, streamWorkflowEvents, submitUserAction, useChatV2, useVoice, validateField, validateForm };
package/dist/index.d.ts CHANGED
@@ -198,18 +198,11 @@ type MessageDisplay = {
198
198
  feedback?: MessageFeedbackState | null;
199
199
  isStreaming?: boolean;
200
200
  streamingContent?: string;
201
- currentWorker?: string;
202
201
  currentMessage?: string;
203
202
  streamProgress?: StreamProgress;
204
203
  steps?: StreamingStep[];
205
204
  isCancelled?: boolean;
206
205
  currentExecutingStepId?: string;
207
- /** Current thinking block text (live, resets per block) */
208
- activeThinkingText?: string;
209
- /** All thinking accumulated across blocks (for post-stream display) */
210
- allThinkingText?: string;
211
- /** Pre-formatted thinking text built from steps + allThinkingText (v2 streaming format, matches demo) */
212
- formattedThinkingText?: string;
213
206
  /** True while RAG image URLs are being resolved after the final response is shown */
214
207
  isResolvingImages?: boolean;
215
208
  /**
@@ -527,17 +520,6 @@ type StreamOptions = {
527
520
  */
528
521
  declare function streamWorkflowEvents(url: string, body: Record<string, unknown>, headers: Record<string, string>, options?: StreamOptions): Promise<void>;
529
522
 
530
- /**
531
- * Build a richly-formatted thinking string from the SDK's `steps` array
532
- * and raw `allThinkingText`. This matches the demo's streaming format
533
- * so both the SDK and demo produce identical thinking output.
534
- *
535
- * The SDK's `allThinkingText` only contains raw `INTENT_THINKING_CONT`
536
- * deltas — no phase headers. This function reconstructs the full format
537
- * from the steps array, which stores every event the SDK processes.
538
- */
539
- declare function buildFormattedThinking(steps: StreamingStep[] | undefined, allThinkingText: string): string;
540
-
541
523
  /**
542
524
  * Classify a `USER_ACTION_REQUIRED` event into a render kind. Primary
543
525
  * discriminator is the MCP elicitation `action`; we fall back to the
@@ -545,9 +527,7 @@ declare function buildFormattedThinking(steps: StreamingStep[] | undefined, allT
545
527
  */
546
528
  declare function classifyUserActionKind(action: string | undefined, schema: RequestedSchema | undefined): UserActionKind;
547
529
  type V2EventProcessorState = {
548
- formattedThinkingText: string;
549
530
  finalResponse: string;
550
- currentWorker: string;
551
531
  lastEventType: string;
552
532
  sessionId?: string;
553
533
  executionId?: string;
@@ -659,4 +639,4 @@ declare function resendUserAction(config: ChatConfig, userActionId: string): Pro
659
639
 
660
640
  declare function migrateActiveStream(oldUserId: string, newUserId: string): void;
661
641
 
662
- export { type APIConfig, type ActiveUserAction, type AgentStage, type AnalysisMode, type ChatCallbacks, type ChatConfig, type ChunkDisplay, type FieldWidget, type JsonSchemaField, type JsonSchemaOption, type MessageDisplay, type MessageFeedbackState, type MessageRole, type RequestedSchema, type SendMessageOptions, type SessionParams, type StreamEvent, type StreamOptions, type StreamProgress, type StreamingStep, type UseChatV2Return, type UseVoiceReturn, type UserActionKind, type UserActionRequest, UserActionStaleError, type UserActionState, type UserActionStatus, type UserActionSubAction, type UserNotification, type V2EventProcessorState, type VerificationType, type VoiceCallbacks, type VoiceConfig, type VoicePermissions, type VoiceResult, type VoiceState, buildContent, buildFormattedThinking, cancelUserAction, classifyField, classifyUserActionKind, coerceValue, createInitialV2State, defaultValueFor, generateId, getOptions, isNestedOrUnsupported, isRequired, migrateActiveStream, processStreamEventV2, renderableFields, resendUserAction, streamWorkflowEvents, submitUserAction, useChatV2, useVoice, validateField, validateForm };
642
+ export { type APIConfig, type ActiveUserAction, type AgentStage, type AnalysisMode, type ChatCallbacks, type ChatConfig, type ChunkDisplay, type FieldWidget, type JsonSchemaField, type JsonSchemaOption, type MessageDisplay, type MessageFeedbackState, type MessageRole, type RequestedSchema, type SendMessageOptions, type SessionParams, type StreamEvent, type StreamOptions, type StreamProgress, type StreamingStep, type UseChatV2Return, type UseVoiceReturn, type UserActionKind, type UserActionRequest, UserActionStaleError, type UserActionState, type UserActionStatus, type UserActionSubAction, type UserNotification, type V2EventProcessorState, type VerificationType, type VoiceCallbacks, type VoiceConfig, type VoicePermissions, type VoiceResult, type VoiceState, buildContent, cancelUserAction, classifyField, classifyUserActionKind, coerceValue, createInitialV2State, defaultValueFor, generateId, getOptions, isNestedOrUnsupported, isRequired, migrateActiveStream, processStreamEventV2, renderableFields, resendUserAction, streamWorkflowEvents, submitUserAction, useChatV2, useVoice, validateField, validateForm };