@wodecorp/openui-vue-headless 0.1.0 → 0.1.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 +51 -1
- package/package.json +14 -7
package/README.md
CHANGED
|
@@ -1,9 +1,59 @@
|
|
|
1
1
|
# @wodecorp/openui-vue-headless
|
|
2
2
|
|
|
3
|
-
Vue 3 headless chat runtime, 7 stream protocol adapters, thread/artifact
|
|
3
|
+
Vue 3 headless chat runtime, 7 SSE stream protocol adapters, thread/artifact stores, tool activity pairing, and OpenUI Cloud artifact streaming — paired with `@openuidev/observability@^0.0.4`.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
pnpm add @wodecorp/openui-vue-headless vue zustand
|
|
9
9
|
```
|
|
10
|
+
|
|
11
|
+
Optional peer dependencies (only install the ones your adapter uses):
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm add openai # for OpenAI types / helpers
|
|
15
|
+
pnpm add ai # for vercelAIAdapter (Vercel AI SDK v6/v7)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Supported Stream Adapters
|
|
19
|
+
|
|
20
|
+
- `agUIAdapter()` — AG-UI SSE events (default)
|
|
21
|
+
- `openAIAdapter()` — OpenAI Chat Completions SSE
|
|
22
|
+
- `openAIResponsesAdapter()` — OpenAI Responses API SSE
|
|
23
|
+
- `openAIReadableStreamAdapter()` — OpenAI SDK readable streams
|
|
24
|
+
- `vercelAIAdapter()` — Vercel AI SDK `UIMessage` streams
|
|
25
|
+
- `langGraphAdapter()` — LangGraph server SSE
|
|
26
|
+
- `eveAdapter()` — Eve streaming protocol
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import {
|
|
32
|
+
ArtifactStreamStore,
|
|
33
|
+
openAIAdapter,
|
|
34
|
+
processStreamedMessage,
|
|
35
|
+
type Message,
|
|
36
|
+
} from "@wodecorp/openui-vue-headless";
|
|
37
|
+
|
|
38
|
+
const messages: Message[] = [];
|
|
39
|
+
|
|
40
|
+
await processStreamedMessage({
|
|
41
|
+
response: await fetch("/api/chat", { method: "POST" }),
|
|
42
|
+
adapter: openAIAdapter(),
|
|
43
|
+
createMessage: (msg) => messages.push(msg),
|
|
44
|
+
updateMessage: (msg) => {
|
|
45
|
+
const index = messages.findIndex((item) => item.id === msg.id);
|
|
46
|
+
if (index >= 0) messages[index] = msg;
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Key Exports
|
|
52
|
+
|
|
53
|
+
- **Providers & Hooks**: `ChatProvider`, `OpenUICloudProvider`, `useThread`, `useThreadList`, `useMessage`, `useToolActivities`, `useArtifactStream`, `useArtifactList`, `useDetailedView`
|
|
54
|
+
- **Streams & Formats**: `processStreamedMessage`, `openAIMessageFormat`, `openAIConversationMessageFormat`, `vercelAIMessageFormat`, `langGraphMessageFormat`
|
|
55
|
+
- **Storage & Cloud**: `fetchLLM`, `restStorage`, `ArtifactStreamStore`, `createInterpreterToolProvider`, `pairToolActivity`, `partialJSONParse`
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wodecorp/openui-vue-headless",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Vue 3 headless chat runtime, stream adapters, thread storage, and cloud artifact client for OpenUI",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"author": "wodecorp",
|
|
7
|
+
"homepage": "https://www.npmjs.com/org/wodecorp",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"openui",
|
|
10
|
+
"vue",
|
|
11
|
+
"vue3",
|
|
12
|
+
"headless",
|
|
13
|
+
"chat",
|
|
14
|
+
"sse",
|
|
15
|
+
"ag-ui",
|
|
16
|
+
"streaming"
|
|
17
|
+
],
|
|
6
18
|
"type": "module",
|
|
7
19
|
"engines": {
|
|
8
|
-
"node": ">=18"
|
|
20
|
+
"node": ">=18.18.0"
|
|
9
21
|
},
|
|
10
22
|
"sideEffects": false,
|
|
11
23
|
"publishConfig": {
|
|
12
24
|
"access": "public"
|
|
13
25
|
},
|
|
14
|
-
"repository": {
|
|
15
|
-
"type": "git",
|
|
16
|
-
"url": "http://10.1.1.156/wode/openuivue.git",
|
|
17
|
-
"directory": "packages/vue-headless"
|
|
18
|
-
},
|
|
19
26
|
"files": [
|
|
20
27
|
"dist",
|
|
21
28
|
"README.md",
|