@economic/agents-react 1.3.0 → 1.3.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/README.md +0 -1
- package/dist/index.d.mts +8 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -196,4 +196,3 @@ The package also exports the handler types `AssistantActions`, `GetChatsHandler`
|
|
|
196
196
|
## Authentication
|
|
197
197
|
|
|
198
198
|
Pass a JWT as `authToken`. It is sent both as an `Authorization: Bearer …` header and as a WebSocket subprotocol (`["bearer", token]`), matching the server-side [`getJwtAuthConfig`](../agents/README.md#authentication). When verification fails, the connection status becomes `"unauthorized"`.
|
|
199
|
-
.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import * as _$agents_client0 from "agents/client";
|
|
2
|
-
import * as _$ai from "ai";
|
|
3
|
-
import * as _$_ai_sdk_react0 from "@ai-sdk/react";
|
|
4
|
-
|
|
5
1
|
//#region ../../node_modules/partysocket/ws-Cg2f-sDL.d.ts
|
|
6
2
|
//#region src/type-helper.d.ts
|
|
7
3
|
type TypedEventTarget<EventMap extends object> = {
|
|
@@ -268,8 +264,8 @@ declare function useAgent(options: UseAgentOptions): Omit<PartySocket, "path"> &
|
|
|
268
264
|
ready: Promise<void>;
|
|
269
265
|
state: AgentConnectionState | undefined;
|
|
270
266
|
setState: (state: AgentConnectionState) => void;
|
|
271
|
-
call: <T = unknown>(method: string, args?: unknown[], options?:
|
|
272
|
-
stub:
|
|
267
|
+
call: <T = unknown>(method: string, args?: unknown[], options?: import("agents/client").CallOptions | import("agents/client").StreamOptions) => Promise<T>;
|
|
268
|
+
stub: import("agents/client").UntypedAgentStub;
|
|
273
269
|
getHttpUrl: () => string;
|
|
274
270
|
};
|
|
275
271
|
//#endregion
|
|
@@ -292,11 +288,11 @@ declare function useChat<ToolContext extends Record<string, unknown>>(options: U
|
|
|
292
288
|
ready: Promise<void>;
|
|
293
289
|
state: AgentConnectionState | undefined;
|
|
294
290
|
setState: (state: AgentConnectionState) => void;
|
|
295
|
-
call: <T = unknown>(method: string, args?: unknown[], options?:
|
|
296
|
-
stub:
|
|
291
|
+
call: <T = unknown>(method: string, args?: unknown[], options?: import("agents/client").CallOptions | import("agents/client").StreamOptions) => Promise<T>;
|
|
292
|
+
stub: import("agents/client").UntypedAgentStub;
|
|
297
293
|
getHttpUrl: () => string;
|
|
298
294
|
};
|
|
299
|
-
chat: Omit<
|
|
295
|
+
chat: Omit<import("@ai-sdk/react").UseChatHelpers<import("ai").UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>>, "addToolOutput"> & {
|
|
300
296
|
clearHistory: () => void;
|
|
301
297
|
addToolOutput: (opts: {
|
|
302
298
|
toolCallId: string;
|
|
@@ -339,11 +335,11 @@ declare function useAssistant<ToolContext extends Record<string, unknown>>(optio
|
|
|
339
335
|
ready: Promise<void>;
|
|
340
336
|
state: AgentConnectionState | undefined;
|
|
341
337
|
setState: (state: AgentConnectionState) => void;
|
|
342
|
-
call: <T = unknown>(method: string, args?: unknown[], options?:
|
|
343
|
-
stub:
|
|
338
|
+
call: <T = unknown>(method: string, args?: unknown[], options?: import("agents/client").CallOptions | import("agents/client").StreamOptions) => Promise<T>;
|
|
339
|
+
stub: import("agents/client").UntypedAgentStub;
|
|
344
340
|
getHttpUrl: () => string;
|
|
345
341
|
};
|
|
346
|
-
chat: Omit<
|
|
342
|
+
chat: Omit<import("@ai-sdk/react").UseChatHelpers<import("ai").UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>>, "addToolOutput"> & {
|
|
347
343
|
clearHistory: () => void;
|
|
348
344
|
addToolOutput: (opts: {
|
|
349
345
|
toolCallId: string;
|