@agents24/react 0.2.14 → 0.2.15

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "contractHash": "0394b689ce7604b444b11c8792050fae0c1da4233d6b318d22832c3b89516a4a",
2
+ "contractHash": "010b6a4647e7b995ac3a63399d94b2c9fcdfc58ba67026e89577e4a23560b90d",
3
3
  "contractVersion": "0.3.0",
4
4
  "corpus": "conformance/v1/corpus.json",
5
5
  "generatedBy": "@agents24/sdk-contract",
@@ -15,11 +15,11 @@
15
15
  "reactDom": ">=19 <20"
16
16
  },
17
17
  "@agents24/client": {
18
- "contract": "0394b689ce7604b444b11c8792050fae0c1da4233d6b318d22832c3b89516a4a",
18
+ "contract": "010b6a4647e7b995ac3a63399d94b2c9fcdfc58ba67026e89577e4a23560b90d",
19
19
  "runtime": "run-stream.v3"
20
20
  },
21
21
  "@agents24/node": {
22
- "contract": "0394b689ce7604b444b11c8792050fae0c1da4233d6b318d22832c3b89516a4a",
22
+ "contract": "010b6a4647e7b995ac3a63399d94b2c9fcdfc58ba67026e89577e4a23560b90d",
23
23
  "node": "^22.0.0 || ^24.0.0"
24
24
  },
25
25
  "@agents24/react": {
@@ -27,11 +27,11 @@
27
27
  "react": ">=19 <20"
28
28
  },
29
29
  "@talmudpedia/runtime-sdk": {
30
- "contract": "0394b689ce7604b444b11c8792050fae0c1da4233d6b318d22832c3b89516a4a",
30
+ "contract": "010b6a4647e7b995ac3a63399d94b2c9fcdfc58ba67026e89577e4a23560b90d",
31
31
  "protocolOwner": "@agents24/client"
32
32
  },
33
33
  "agents24": {
34
- "contract": "0394b689ce7604b444b11c8792050fae0c1da4233d6b318d22832c3b89516a4a",
34
+ "contract": "010b6a4647e7b995ac3a63399d94b2c9fcdfc58ba67026e89577e4a23560b90d",
35
35
  "python": ">=3.10"
36
36
  }
37
37
  },
@@ -0,0 +1,27 @@
1
+ import type { AbortSignalLike, AgentClient, ThreadSummaryEvent } from "@agents24/client";
2
+ import type { AbortControllerFactory, VisibilitySource } from "./lifecycle";
3
+ export type ChatObservationState = {
4
+ threadId: string | null;
5
+ running: boolean;
6
+ waiting: boolean;
7
+ pending: boolean;
8
+ paused: boolean;
9
+ degraded?: boolean;
10
+ mode?: "on-demand" | "realtime";
11
+ };
12
+ /** One observation policy for SDK chats and platform transport adapters. */
13
+ export declare function createChatObservation(input: {
14
+ createAbortController: AbortControllerFactory;
15
+ events: AgentClient["threads"]["events"];
16
+ refresh(signal: AbortSignalLike): Promise<void>;
17
+ onEvent(event: ThreadSummaryEvent): void;
18
+ onError(error: unknown): void;
19
+ onRecovered(): void;
20
+ onDetach(): void;
21
+ onResume(): void;
22
+ visibility?: VisibilitySource;
23
+ }): {
24
+ refresh: () => Promise<void>;
25
+ update(next: ChatObservationState): void;
26
+ dispose(): void;
27
+ };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from "./lifecycle";
2
+ export * from "./chat-observation";
3
+ export * from "./use-chat-observation";
2
4
  export * from "./model";
3
5
  export * from "./provider";
4
6
  export * from "./runtime-event-buffer";
@@ -6,3 +8,5 @@ export * from "./state";
6
8
  export * from "./thread-message-queue";
7
9
  export * from "./use-agent-chat";
8
10
  export * from "./use-agent-resources";
11
+ export * from "./operation-ownership";
12
+ export { useAgentChatFeedback } from "./use-agent-chat-feedback";