@economic/agents-react 1.2.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 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?: _$agents_client0.CallOptions | _$agents_client0.StreamOptions) => Promise<T>;
272
- stub: _$agents_client0.UntypedAgentStub;
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?: _$agents_client0.CallOptions | _$agents_client0.StreamOptions) => Promise<T>;
296
- stub: _$agents_client0.UntypedAgentStub;
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<_$_ai_sdk_react0.UseChatHelpers<_$ai.UIMessage<unknown, _$ai.UIDataTypes, _$ai.UITools>>, "addToolOutput"> & {
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;
@@ -307,6 +303,7 @@ declare function useChat<ToolContext extends Record<string, unknown>>(options: U
307
303
  }) => void;
308
304
  isServerStreaming: boolean;
309
305
  isStreaming: boolean;
306
+ isRecovering: boolean;
310
307
  isToolContinuation: boolean;
311
308
  };
312
309
  submitMessageFeedback: MessageFeedbackHandler;
@@ -338,11 +335,11 @@ declare function useAssistant<ToolContext extends Record<string, unknown>>(optio
338
335
  ready: Promise<void>;
339
336
  state: AgentConnectionState | undefined;
340
337
  setState: (state: AgentConnectionState) => void;
341
- call: <T = unknown>(method: string, args?: unknown[], options?: _$agents_client0.CallOptions | _$agents_client0.StreamOptions) => Promise<T>;
342
- stub: _$agents_client0.UntypedAgentStub;
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;
343
340
  getHttpUrl: () => string;
344
341
  };
345
- chat: Omit<_$_ai_sdk_react0.UseChatHelpers<_$ai.UIMessage<unknown, _$ai.UIDataTypes, _$ai.UITools>>, "addToolOutput"> & {
342
+ chat: Omit<import("@ai-sdk/react").UseChatHelpers<import("ai").UIMessage<unknown, import("ai").UIDataTypes, import("ai").UITools>>, "addToolOutput"> & {
346
343
  clearHistory: () => void;
347
344
  addToolOutput: (opts: {
348
345
  toolCallId: string;
@@ -353,6 +350,7 @@ declare function useAssistant<ToolContext extends Record<string, unknown>>(optio
353
350
  }) => void;
354
351
  isServerStreaming: boolean;
355
352
  isStreaming: boolean;
353
+ isRecovering: boolean;
356
354
  isToolContinuation: boolean;
357
355
  };
358
356
  submitMessageFeedback: MessageFeedbackHandler;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@economic/agents-react",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist"
@@ -21,8 +21,8 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@ai-sdk/react": "^3.0.182",
24
- "@cloudflare/ai-chat": ">=0.7.2 <1.0.0",
25
- "agents": ">=0.13.3 <1.0.0",
24
+ "@cloudflare/ai-chat": ">=0.8.3 <1.0.0",
25
+ "agents": ">=0.14.3 <1.0.0",
26
26
  "ai": "^6.0.180",
27
27
  "zod": "^4.4.3"
28
28
  },