@lyriel/openclaw-plugin 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 +2 -115
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ because both runtimes integrate against the same HTTP substrate API.
|
|
|
7
7
|
|
|
8
8
|
## What you get
|
|
9
9
|
|
|
10
|
-
-
|
|
10
|
+
- **Inbound surfacing.** Lyriel asks and group-plan updates arrive in your
|
|
11
11
|
active OpenClaw session as the next turn's context. A daemon long-polls
|
|
12
12
|
`/api/inbox` and injects each dispatch via
|
|
13
13
|
`api.session.workflow.enqueueNextTurnInjection`, so the next thing your
|
|
@@ -27,60 +27,11 @@ because both runtimes integrate against the same HTTP substrate API.
|
|
|
27
27
|
|
|
28
28
|
## Install
|
|
29
29
|
|
|
30
|
-
### Local development (against a globally-installed OpenClaw)
|
|
31
|
-
|
|
32
|
-
OpenClaw's `--link` install path expects compiled JavaScript output, not raw
|
|
33
|
-
TypeScript (source-checkout fallback only applies inside the openclaw monorepo
|
|
34
|
-
itself). One-time setup from this directory:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
# 1. Symlink the global openclaw runtime so tsc can resolve plugin-sdk types.
|
|
38
|
-
mkdir -p node_modules
|
|
39
|
-
ln -sfn /opt/homebrew/lib/node_modules/openclaw node_modules/openclaw
|
|
40
|
-
|
|
41
|
-
# 2. Install local build deps.
|
|
42
|
-
npm install --no-save typebox typescript
|
|
43
|
-
|
|
44
|
-
# 3. Re-create the openclaw symlink (npm install clobbers it).
|
|
45
|
-
ln -sfn /opt/homebrew/lib/node_modules/openclaw node_modules/openclaw
|
|
46
|
-
|
|
47
|
-
# 4. Build to dist/.
|
|
48
|
-
npx tsc -p tsconfig.build.json
|
|
49
|
-
|
|
50
|
-
# 5. Link the plugin into OpenClaw.
|
|
51
|
-
openclaw plugins install --link "$(pwd)"
|
|
52
|
-
|
|
53
|
-
# 6. Restart so the runtime picks up the new plugin.
|
|
54
|
-
openclaw gateway restart
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Re-run `npx tsc -p tsconfig.build.json` after any edit to the `*.ts` files;
|
|
58
|
-
the gateway re-reads `dist/` on the next plugin reload.
|
|
59
|
-
|
|
60
|
-
### Bundled (in-tree development against the openclaw monorepo)
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
cd /path/to/openclaw
|
|
64
|
-
ln -s /path/to/lyriel-repo/clients/openclaw-plugin extensions/lyriel
|
|
65
|
-
pnpm install
|
|
66
|
-
pnpm test -- extensions/lyriel/
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
The bundled path discovers TS source directly; no precompile needed.
|
|
70
|
-
|
|
71
|
-
### Published (from npm)
|
|
72
|
-
|
|
73
30
|
```bash
|
|
74
31
|
npm install -g @lyriel/openclaw-plugin
|
|
75
32
|
openclaw plugins install @lyriel/openclaw-plugin
|
|
76
33
|
```
|
|
77
34
|
|
|
78
|
-
The `prepare` script in package.json builds `dist/` on install, so the
|
|
79
|
-
plugin is ready as soon as npm finishes. `openclaw plugins install`
|
|
80
|
-
then registers it with the OpenClaw runtime. ClawHub publish
|
|
81
|
-
(`openclaw plugins install clawhub:lyriel/openclaw-plugin`) is a v0.2
|
|
82
|
-
follow-up that wraps the same npm package.
|
|
83
|
-
|
|
84
35
|
## Configure
|
|
85
36
|
|
|
86
37
|
OpenClaw config lives at `~/.openclaw/openclaw.json`. Add a `plugins.entries.lyriel`
|
|
@@ -145,7 +96,7 @@ gateway start.
|
|
|
145
96
|
â User's OpenClaw session â
|
|
146
97
|
â â
|
|
147
98
|
â Next agent turn picks up: â
|
|
148
|
-
â
|
|
99
|
+
â Lyriel ask from @noor: "dinner thursday?" â
|
|
149
100
|
â â
|
|
150
101
|
â User says: "yes thursday works" â
|
|
151
102
|
â â
|
|
@@ -153,36 +104,6 @@ gateway start.
|
|
|
153
104
|
âââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
|
|
154
105
|
```
|
|
155
106
|
|
|
156
|
-
## Comparison with the Hermes plugin
|
|
157
|
-
|
|
158
|
-
| | Hermes plugin | This plugin |
|
|
159
|
-
|---|---|---|
|
|
160
|
-
| Language | Python | TypeScript |
|
|
161
|
-
| Surface path | Hermes `inject_message` (CLI) + gateway Telegram adapter | OpenClaw `enqueueNextTurnInjection` (channel-agnostic) |
|
|
162
|
-
| Background task | `threading.Thread(daemon=True)` | `gateway_start` lifecycle hook + `setTimeout` loop |
|
|
163
|
-
| Tool registration | `ctx.register_tool` | `api.registerTool` |
|
|
164
|
-
| Pending callback state | in-process `dict` | in-process `Map` |
|
|
165
|
-
| Proactive notification | yes â Telegram push | no â appears on next agent turn |
|
|
166
|
-
|
|
167
|
-
The "no proactive push" gap is deliberate. OpenClaw users connect via many
|
|
168
|
-
possible channels; surfacing through next-turn injection is one path that
|
|
169
|
-
works for all of them. A truly push-notification path can be added later
|
|
170
|
-
once we know which channel design partners actually live in.
|
|
171
|
-
|
|
172
|
-
## Cross-provider interop
|
|
173
|
-
|
|
174
|
-
The whole point of having a plugin per provider: a user can be on Hermes
|
|
175
|
-
and address a friend who's on OpenClaw (or vice versa) and neither side
|
|
176
|
-
needs to know about the other's runtime. The provider adapter on Lyriel's
|
|
177
|
-
server (`web/src/lib/server/agents/{hermes,openclaw}.ts`) dispatches into
|
|
178
|
-
each user's provider via that provider's inbound API. This plugin is the
|
|
179
|
-
client-side half of the OpenClaw integration.
|
|
180
|
-
|
|
181
|
-
End-to-end: Hermes user â Hermes Lyriel plugin â Lyriel API â Lyriel
|
|
182
|
-
OpenClaw adapter â OpenClaw `/v1/chat/completions` â user's OpenClaw
|
|
183
|
-
agent â OpenClaw Lyriel plugin (this) â callback â Lyriel â Hermes Lyriel
|
|
184
|
-
plugin surfaces the reply.
|
|
185
|
-
|
|
186
107
|
## Troubleshooting
|
|
187
108
|
|
|
188
109
|
**"apiKey missing" warning in logs.** Set `plugins.entries.lyriel.config.apiKey`
|
|
@@ -206,37 +127,3 @@ short-lived sub-sessions; pinning is more predictable.
|
|
|
206
127
|
**Hot reload.** OpenClaw plugin reloads keep durable session extension
|
|
207
128
|
state and re-run cleanup callbacks. The inbox loop stops cleanly on
|
|
208
129
|
`gateway_stop` and restarts on the next `gateway_start`.
|
|
209
|
-
|
|
210
|
-
## v0 limitations
|
|
211
|
-
|
|
212
|
-
- **In-process pending map.** If the gateway restarts mid-flight, pending
|
|
213
|
-
callback tokens are lost. The user will see "no pending Lyriel asks" if
|
|
214
|
-
they try to reply to an ask that arrived before the restart. Move to
|
|
215
|
-
`api.runtime.state.openKeyedStore` to survive restarts.
|
|
216
|
-
- **One-pending-per-ask.** If multiple asks pile up, the LLM disambiguates
|
|
217
|
-
via ask_id (shown in each surface message).
|
|
218
|
-
- **No truly proactive push.** Dispatches surface on the next agent turn
|
|
219
|
-
in the configured session. Adding per-channel push is a v0.2 task.
|
|
220
|
-
- **Single user per OpenClaw gateway.** One `apiKey` per plugin instance.
|
|
221
|
-
Multi-user gateways aren't supported yet.
|
|
222
|
-
|
|
223
|
-
## Publishing
|
|
224
|
-
|
|
225
|
-
The package is `@lyriel/openclaw-plugin` on npm. Prerequisites: an npm
|
|
226
|
-
account with publish rights on the `@lyriel` scope (claim it once with
|
|
227
|
-
`npm org create lyriel`), authenticated via `npm login`.
|
|
228
|
-
|
|
229
|
-
```bash
|
|
230
|
-
# 1. Bump the version in package.json (and openclaw.plugin.json if the
|
|
231
|
-
# OpenClaw-facing version should track).
|
|
232
|
-
# 2. Publish. prepublishOnly runs the TypeScript build into dist/ first;
|
|
233
|
-
# the files whitelist in package.json scopes the tarball to dist/ +
|
|
234
|
-
# openclaw.plugin.json.
|
|
235
|
-
npm publish
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
`publishConfig.access: public` in package.json lets the scoped
|
|
239
|
-
package go up without `--access public` on the command line. After
|
|
240
|
-
publish, the install paste-prompt (`npm install -g
|
|
241
|
-
@lyriel/openclaw-plugin && openclaw plugins install
|
|
242
|
-
@lyriel/openclaw-plugin`) resolves to the new version.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyriel/openclaw-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Lyriel plugin for OpenClaw. Long-polls Lyriel's /api/inbox, surfaces inbound dispatches into the user's active OpenClaw session via next-turn injection, and registers five LLM tools (lyriel_send_ask, lyriel_reply, lyriel_plan_send, lyriel_plan_reply, lyriel_plan_lock) so the user drives Lyriel in natural language. Cross-provider parity with the Hermes plugin: a Hermes user and an OpenClaw user can coordinate through Lyriel without either knowing what runtime the other is on.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"typebox": "1.1.38"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
+
"openclaw": "^2026.5.20",
|
|
41
42
|
"typescript": "^5.5.0"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|