@agents24/react 0.2.0 → 0.2.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
@@ -1,10 +1,10 @@
1
1
  # Agents24 React
2
2
 
3
- Last Updated: 2026-07-16
3
+ Last Updated: 2026-07-29
4
4
 
5
5
  `@agents24/react` is the DOM-free React state layer for `@agents24/client`. It owns providers, hooks, stable optimistic message identity, thread hydration and pagination, runtime-event state projection, attach/detach/cancel behavior, attachment state, repeated HITL resume, MCP authorization state, and unmount aborts.
6
6
 
7
- It does not render elements, construct routes, fetch directly, parse SSE, refresh credentials, or reference browser DOM globals. Hosts inject an `AbortControllerFactory`; `@agents24/chat-react` supplies the browser implementation for `AgentChatApp`.
7
+ It does not render elements, construct routes, fetch directly, parse SSE, refresh credentials, or reference browser DOM globals. Hosts inject an `AbortControllerFactory`; `@agents24/chat-react/runtime` supplies the shared browser orchestration and `@agents24/chat-react/scaffold` supplies the complete application.
8
8
 
9
9
  ## Public API
10
10
 
@@ -18,6 +18,7 @@ It does not render elements, construct routes, fetch directly, parse SSE, refres
18
18
  - `useAgentHitl`
19
19
  - `useAgentMcp`
20
20
  - chat state, message, part, storage, and abort-capability types
21
+ - `getThreadActivity`, which interprets canonical `active_run` and terminal `last_run_status` summary state
21
22
 
22
23
  ```tsx
23
24
  <Agents24Provider
@@ -29,3 +30,19 @@ It does not render elements, construct routes, fetch directly, parse SSE, refres
29
30
  ```
30
31
 
31
32
  Use `@agents24/chat-react` when the host needs the accessible browser UI or complete default application layout.
33
+
34
+ ## Canonical chat parts
35
+
36
+ `ChatMessage.parts` is the canonical ordered, UI-ready projection of backend
37
+ `response_blocks`. `partsFromResponseBlocks` preserves backend order and gives
38
+ every projected part a stable `id`; tool and HITL lifecycle updates retain that
39
+ identity and position. Parts also carry optional `runId`, sequence/timestamp
40
+ metadata, and typed tool presentation data for labels, activity, grouping,
41
+ detail, child-run progress, and thread links.
42
+
43
+ This package owns the canonical state only. A host may derive a copied display
44
+ sequence, but must never mutate `message.parts`. Use
45
+ `AgentResponseTimeline` from `@agents24/chat-react/ui` for the default
46
+ presentation or its exported part primitives for a custom host timeline.
47
+
48
+ Hosts may control selection with `activeThreadId`. An explicit `null` means New Chat and must not fall through to stored selection; a non-null initial value is hydrated even when it is already the initial state value. The controller adopts the backend `thread_id` from the first runtime event so a host can update its URL before the stream completes. URL shape and History API behavior remain host-owned.
@@ -1,5 +1,5 @@
1
1
  {
2
- "contractHash": "90a64d2df2facc3c4510edc7a0762cb86a336578667d3bc6cfeb7ae035133e00",
2
+ "contractHash": "13f59fd11fc838b1f7a51afe15afcdb6f1429fed94e37a1341c97061882e57d2",
3
3
  "contractVersion": "0.2.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": "90a64d2df2facc3c4510edc7a0762cb86a336578667d3bc6cfeb7ae035133e00",
19
- "runtime": "run-stream.v2"
18
+ "contract": "13f59fd11fc838b1f7a51afe15afcdb6f1429fed94e37a1341c97061882e57d2",
19
+ "runtime": "run-stream.v3"
20
20
  },
21
21
  "@agents24/node": {
22
- "contract": "90a64d2df2facc3c4510edc7a0762cb86a336578667d3bc6cfeb7ae035133e00",
22
+ "contract": "13f59fd11fc838b1f7a51afe15afcdb6f1429fed94e37a1341c97061882e57d2",
23
23
  "node": "^22.0.0 || ^24.0.0"
24
24
  },
25
25
  "@agents24/react": {
@@ -27,18 +27,18 @@
27
27
  "react": ">=19 <20"
28
28
  },
29
29
  "@talmudpedia/runtime-sdk": {
30
- "contract": "90a64d2df2facc3c4510edc7a0762cb86a336578667d3bc6cfeb7ae035133e00",
30
+ "contract": "13f59fd11fc838b1f7a51afe15afcdb6f1429fed94e37a1341c97061882e57d2",
31
31
  "protocolOwner": "@agents24/client"
32
32
  },
33
33
  "agents24": {
34
- "contract": "90a64d2df2facc3c4510edc7a0762cb86a336578667d3bc6cfeb7ae035133e00",
34
+ "contract": "13f59fd11fc838b1f7a51afe15afcdb6f1429fed94e37a1341c97061882e57d2",
35
35
  "python": ">=3.10"
36
36
  }
37
37
  },
38
38
  "protocols": {
39
39
  "runtime": {
40
40
  "minimum": "2.0.0",
41
- "wire": "run-stream.v2"
41
+ "wire": "run-stream.v3"
42
42
  },
43
43
  "threadSummary": {
44
44
  "minimum": "1.0.0",
@@ -47,8 +47,8 @@
47
47
  },
48
48
  "schemaVersion": "agents24.compatibility.v1",
49
49
  "targetOperationCounts": {
50
- "client": 19,
51
- "node": 60,
52
- "python": 55
50
+ "client": 22,
51
+ "node": 78,
52
+ "python": 69
53
53
  }
54
54
  }