@hsafa/ui-sdk 0.5.5 → 5.5.7

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
@@ -110,7 +110,7 @@ type AssistantContentPart = {
110
110
  type: 'tool-call';
111
111
  toolCallId: string;
112
112
  toolName?: string;
113
- input?: any;
113
+ input?: unknown;
114
114
  };
115
115
  type ChatMessage = {
116
116
  id: string;
@@ -123,23 +123,31 @@ type ChatMessage = {
123
123
  id: string;
124
124
  role: 'assistant';
125
125
  content?: string | AssistantContentPart[];
126
- items: any[];
126
+ items: unknown[];
127
127
  reasoning?: string;
128
128
  reasoningOpen?: boolean;
129
- mainAgentActions?: any[];
129
+ mainAgentActions?: unknown[];
130
130
  createdAt?: number;
131
131
  };
132
- type HsafaTool = ((input: any) => any | Promise<any>) | {
133
- tool: (input: any) => any | Promise<any>;
132
+ type HsafaTool = ((input: unknown) => unknown | Promise<unknown>) | {
133
+ tool: (input: unknown) => unknown | Promise<unknown>;
134
134
  executeEachToken?: boolean;
135
+ inputting_start?: (input: unknown, ctx: {
136
+ toolCallId: string;
137
+ toolName: string;
138
+ }) => void;
139
+ running_start?: (input: unknown, ctx: {
140
+ toolCallId: string;
141
+ toolName: string;
142
+ }) => void;
135
143
  };
136
144
  type CustomToolUIRenderProps = {
137
145
  toolName: string;
138
146
  toolCallId: string;
139
- input: any;
140
- output: any;
147
+ input: unknown;
148
+ output: unknown;
141
149
  status?: string;
142
- addToolResult: (result: any) => void;
150
+ addToolResult: (result: unknown) => void;
143
151
  };
144
152
  interface HsafaChatProps {
145
153
  agentId: string;
package/dist/index.d.ts CHANGED
@@ -110,7 +110,7 @@ type AssistantContentPart = {
110
110
  type: 'tool-call';
111
111
  toolCallId: string;
112
112
  toolName?: string;
113
- input?: any;
113
+ input?: unknown;
114
114
  };
115
115
  type ChatMessage = {
116
116
  id: string;
@@ -123,23 +123,31 @@ type ChatMessage = {
123
123
  id: string;
124
124
  role: 'assistant';
125
125
  content?: string | AssistantContentPart[];
126
- items: any[];
126
+ items: unknown[];
127
127
  reasoning?: string;
128
128
  reasoningOpen?: boolean;
129
- mainAgentActions?: any[];
129
+ mainAgentActions?: unknown[];
130
130
  createdAt?: number;
131
131
  };
132
- type HsafaTool = ((input: any) => any | Promise<any>) | {
133
- tool: (input: any) => any | Promise<any>;
132
+ type HsafaTool = ((input: unknown) => unknown | Promise<unknown>) | {
133
+ tool: (input: unknown) => unknown | Promise<unknown>;
134
134
  executeEachToken?: boolean;
135
+ inputting_start?: (input: unknown, ctx: {
136
+ toolCallId: string;
137
+ toolName: string;
138
+ }) => void;
139
+ running_start?: (input: unknown, ctx: {
140
+ toolCallId: string;
141
+ toolName: string;
142
+ }) => void;
135
143
  };
136
144
  type CustomToolUIRenderProps = {
137
145
  toolName: string;
138
146
  toolCallId: string;
139
- input: any;
140
- output: any;
147
+ input: unknown;
148
+ output: unknown;
141
149
  status?: string;
142
- addToolResult: (result: any) => void;
150
+ addToolResult: (result: unknown) => void;
143
151
  };
144
152
  interface HsafaChatProps {
145
153
  agentId: string;