@ag-ui/core 0.0.59 → 1.0.0-canary.1789569879.0
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/.gitattributes +1 -0
- package/README.md +12 -2
- package/dist/index.d.mts +164 -17988
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +164 -17988
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +901 -851
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +897 -757
- package/dist/index.mjs.map +1 -1
- package/dist/schemas.d.mts +3569 -0
- package/dist/schemas.d.mts.map +1 -0
- package/dist/schemas.d.ts +3569 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +1270 -0
- package/dist/schemas.js.map +1 -0
- package/dist/schemas.mjs +1157 -0
- package/dist/schemas.mjs.map +1 -0
- package/dist/version-B0r3SE97.d.ts +2935 -0
- package/dist/version-B0r3SE97.d.ts.map +1 -0
- package/dist/version-Bmsu0NB0.js +63 -0
- package/dist/version-Bmsu0NB0.js.map +1 -0
- package/dist/version-Cy59PsJM.d.mts +2935 -0
- package/dist/version-Cy59PsJM.d.mts.map +1 -0
- package/dist/version-DQ7V2LqS.mjs +51 -0
- package/dist/version-DQ7V2LqS.mjs.map +1 -0
- package/package.json +31 -3
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
src/generated/** linguist-generated=true
|
package/README.md
CHANGED
|
@@ -7,22 +7,32 @@ TypeScript definitions & runtime schemas for the **Agent-User Interaction (AG-UI
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
+
# types and constants only — no runtime dependencies
|
|
10
11
|
npm install @ag-ui/core
|
|
11
12
|
pnpm add @ag-ui/core
|
|
12
13
|
yarn add @ag-ui/core
|
|
14
|
+
|
|
15
|
+
# to use the validators on @ag-ui/core/schemas, add zod (3.25.18+ or 4.x)
|
|
16
|
+
npm install @ag-ui/core zod
|
|
13
17
|
```
|
|
14
18
|
|
|
19
|
+
zod is an optional peer dependency: the main entry never loads it, so an
|
|
20
|
+
application that only needs the types installs nothing else.
|
|
21
|
+
|
|
15
22
|
## Features
|
|
16
23
|
|
|
17
24
|
- 🧩 **Typed data models** – `Message`, `Tool`, `Context`, `RunAgentInput`, `State` …
|
|
18
|
-
- 🔄 **Streaming events** –
|
|
25
|
+
- 🔄 **Streaming events** – over 30 event kinds covering assistant messages, tool calls, state updates, reasoning, activity, and the run and subagent lifecycles.
|
|
19
26
|
- ✅ **Runtime validation** – schemas catch malformed payloads early.
|
|
20
27
|
- 🚀 **Framework-agnostic** – works in Node.js, browsers and any agent framework that can emit JSON.
|
|
21
28
|
|
|
22
29
|
## Quick example
|
|
23
30
|
|
|
24
31
|
```ts
|
|
25
|
-
import {
|
|
32
|
+
import { EventType } from "@ag-ui/core";
|
|
33
|
+
// Validators live on the /schemas subpath and need zod installed; the main
|
|
34
|
+
// entry is types and constants only, so type-only consumers need no zod.
|
|
35
|
+
import { EventSchemas } from "@ag-ui/core/schemas";
|
|
26
36
|
|
|
27
37
|
// Validate an incoming event
|
|
28
38
|
EventSchemas.parse({
|