@agents24/react 0.2.0 → 0.2.2
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 +19 -2
- package/compatibility.json +10 -10
- package/dist/index.js +863 -166
- package/dist/index.js.map +1 -1
- package/dist/initial-thread.d.ts +11 -0
- package/dist/model.d.ts +132 -37
- package/dist/runtime-event-buffer.d.ts +9 -0
- package/dist/state.d.ts +34 -1
- package/dist/use-agent-chat.d.ts +10 -3
- package/dist/use-agent-resources.d.ts +13 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Agents24 React
|
|
2
2
|
|
|
3
|
-
Last Updated: 2026-07-
|
|
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
|
|
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.
|
package/compatibility.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"contractHash": "
|
|
2
|
+
"contractHash": "a409af6996d10a8d94e0f6332c9a381c3535a9c8511314b6c42b237d7e057029",
|
|
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": "
|
|
19
|
-
"runtime": "run-stream.
|
|
18
|
+
"contract": "a409af6996d10a8d94e0f6332c9a381c3535a9c8511314b6c42b237d7e057029",
|
|
19
|
+
"runtime": "run-stream.v3"
|
|
20
20
|
},
|
|
21
21
|
"@agents24/node": {
|
|
22
|
-
"contract": "
|
|
22
|
+
"contract": "a409af6996d10a8d94e0f6332c9a381c3535a9c8511314b6c42b237d7e057029",
|
|
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": "
|
|
30
|
+
"contract": "a409af6996d10a8d94e0f6332c9a381c3535a9c8511314b6c42b237d7e057029",
|
|
31
31
|
"protocolOwner": "@agents24/client"
|
|
32
32
|
},
|
|
33
33
|
"agents24": {
|
|
34
|
-
"contract": "
|
|
34
|
+
"contract": "a409af6996d10a8d94e0f6332c9a381c3535a9c8511314b6c42b237d7e057029",
|
|
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.
|
|
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":
|
|
51
|
-
"node":
|
|
52
|
-
"python":
|
|
50
|
+
"client": 22,
|
|
51
|
+
"node": 79,
|
|
52
|
+
"python": 70
|
|
53
53
|
}
|
|
54
54
|
}
|