@contextableai/clawg-ui 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/CHANGELOG.md +6 -0
- package/README.md +10 -10
- package/index.ts +1 -1
- package/package.json +9 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,20 +7,20 @@ An [OpenClaw](https://github.com/openclaw/openclaw) channel plugin that exposes
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install
|
|
10
|
+
npm install @contextableai/clawg-ui
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Or with the OpenClaw plugin CLI:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
openclaw plugins install
|
|
16
|
+
openclaw plugins install @contextableai/clawg-ui
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
Then restart the gateway. The plugin auto-registers the `/v1/
|
|
19
|
+
Then restart the gateway. The plugin auto-registers the `/v1/clawg-ui` endpoint and the `clawg-ui` channel.
|
|
20
20
|
|
|
21
21
|
## How it works
|
|
22
22
|
|
|
23
|
-
The plugin registers as an OpenClaw channel and adds an HTTP route at `/v1/
|
|
23
|
+
The plugin registers as an OpenClaw channel and adds an HTTP route at `/v1/clawg-ui`. When an AG-UI client POSTs a `RunAgentInput` payload, the plugin:
|
|
24
24
|
|
|
25
25
|
1. Authenticates the request using the gateway bearer token
|
|
26
26
|
2. Parses the AG-UI messages into an OpenClaw inbound context
|
|
@@ -65,7 +65,7 @@ AG-UI Client OpenClaw Gateway
|
|
|
65
65
|
### curl
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
curl -N -X POST http://localhost:18789/v1/
|
|
68
|
+
curl -N -X POST http://localhost:18789/v1/clawg-ui \
|
|
69
69
|
-H "Content-Type: application/json" \
|
|
70
70
|
-H "Accept: text/event-stream" \
|
|
71
71
|
-H "Authorization: Bearer $OPENCLAW_GATEWAY_TOKEN" \
|
|
@@ -84,7 +84,7 @@ curl -N -X POST http://localhost:18789/v1/agui \
|
|
|
84
84
|
import { HttpAgent } from "@ag-ui/client";
|
|
85
85
|
|
|
86
86
|
const agent = new HttpAgent({
|
|
87
|
-
url: "http://localhost:18789/v1/
|
|
87
|
+
url: "http://localhost:18789/v1/clawg-ui",
|
|
88
88
|
headers: {
|
|
89
89
|
Authorization: `Bearer ${process.env.OPENCLAW_GATEWAY_TOKEN}`,
|
|
90
90
|
},
|
|
@@ -94,7 +94,7 @@ const stream = agent.run({
|
|
|
94
94
|
threadId: "thread-1",
|
|
95
95
|
runId: "run-1",
|
|
96
96
|
messages: [
|
|
97
|
-
{ role: "user", content: "Hello from
|
|
97
|
+
{ role: "user", content: "Hello from CLAWG-UI" },
|
|
98
98
|
],
|
|
99
99
|
});
|
|
100
100
|
|
|
@@ -111,7 +111,7 @@ import { CopilotKit } from "@copilotkit/react-core";
|
|
|
111
111
|
function App() {
|
|
112
112
|
return (
|
|
113
113
|
<CopilotKit
|
|
114
|
-
runtimeUrl="http://localhost:18789/v1/
|
|
114
|
+
runtimeUrl="http://localhost:18789/v1/clawg-ui"
|
|
115
115
|
headers={{
|
|
116
116
|
Authorization: `Bearer ${process.env.OPENCLAW_GATEWAY_TOKEN}`,
|
|
117
117
|
}}
|
|
@@ -178,7 +178,7 @@ Authorization: Bearer <token>
|
|
|
178
178
|
The plugin uses OpenClaw's standard agent routing. By default, messages route to the `main` agent. To target a specific agent, set the `X-OpenClaw-Agent-Id` header:
|
|
179
179
|
|
|
180
180
|
```bash
|
|
181
|
-
curl -N -X POST http://localhost:18789/v1/
|
|
181
|
+
curl -N -X POST http://localhost:18789/v1/clawg-ui \
|
|
182
182
|
-H "Authorization: Bearer $OPENCLAW_GATEWAY_TOKEN" \
|
|
183
183
|
-H "X-OpenClaw-Agent-Id: my-agent" \
|
|
184
184
|
-d '{"messages":[{"role":"user","content":"Hello"}]}'
|
|
@@ -199,7 +199,7 @@ Streaming errors emit a `RUN_ERROR` event and close the connection.
|
|
|
199
199
|
## Development
|
|
200
200
|
|
|
201
201
|
```bash
|
|
202
|
-
git clone https://github.com/
|
|
202
|
+
git clone https://github.com/contextablemark/clawg-ui
|
|
203
203
|
cd clawg-ui
|
|
204
204
|
npm install
|
|
205
205
|
npm test
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contextableai/clawg-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "AG-UI protocol channel plugin for OpenClaw — connect CopilotKit and AG-UI clients to your OpenClaw gateway",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,11 +35,16 @@
|
|
|
35
35
|
],
|
|
36
36
|
"channel": {
|
|
37
37
|
"id": "clawg-ui",
|
|
38
|
-
"label": "
|
|
39
|
-
"docsPath": "/channels/
|
|
40
|
-
"docsLabel": "
|
|
38
|
+
"label": "CLAWG-UI",
|
|
39
|
+
"docsPath": "/channels/clawg-ui",
|
|
40
|
+
"docsLabel": "clawg-ui",
|
|
41
41
|
"blurb": "AG-UI protocol endpoint for CopilotKit and HttpAgent clients.",
|
|
42
42
|
"order": 90
|
|
43
|
+
},
|
|
44
|
+
"install": {
|
|
45
|
+
"npmSpec": "@contextableai/clawg-ui",
|
|
46
|
+
"localPath": "extensions/clawg-ui",
|
|
47
|
+
"defaultChoice": "npm"
|
|
43
48
|
}
|
|
44
49
|
}
|
|
45
50
|
}
|