@lyriel/openclaw-plugin 0.4.0 → 0.4.4
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/dist/api.js +181 -0
- package/dist/api.js.map +1 -0
- package/dist/inbox.js +206 -0
- package/dist/inbox.js.map +1 -0
- package/dist/index.js +132 -0
- package/dist/index.js.map +1 -0
- package/dist/pending.js +106 -0
- package/dist/pending.js.map +1 -0
- package/dist/primer.js +27 -0
- package/dist/primer.js.map +1 -0
- package/dist/surfacing.js +100 -0
- package/dist/surfacing.js.map +1 -0
- package/dist/telegram.js +63 -0
- package/dist/telegram.js.map +1 -0
- package/dist/tools.js +463 -0
- package/dist/tools.js.map +1 -0
- package/openclaw.plugin.json +1 -2
- package/package.json +4 -2
package/dist/tools.js
ADDED
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
// Five LLM tools the Lyriel plugin exposes to the OpenClaw agent.
|
|
2
|
+
//
|
|
3
|
+
// lyriel_send_ask(to, prompt) — initiate a 1:1 ask
|
|
4
|
+
// lyriel_reply(ask_id, response) — reply to a pending inbound ask
|
|
5
|
+
// lyriel_plan_send(participants, ...) — start a group plan
|
|
6
|
+
// lyriel_plan_reply(plan_id, content) — contribute to an ongoing plan
|
|
7
|
+
// lyriel_plan_lock(plan_id, summary) — initiator locks the outcome
|
|
8
|
+
//
|
|
9
|
+
// Schemas use typebox (OpenClaw's standard). Handlers return JSON in the
|
|
10
|
+
// content[] shape OpenClaw tools use. Errors are returned as
|
|
11
|
+
// {"error": "..."} rather than thrown — the runtime surfaces the JSON back
|
|
12
|
+
// to the LLM, which then explains the failure to the user.
|
|
13
|
+
import { Type } from "typebox";
|
|
14
|
+
import * as api from "./api.js";
|
|
15
|
+
import * as pending from "./pending.js";
|
|
16
|
+
import { SUBSTRATE_PRIMER } from "./primer.js";
|
|
17
|
+
// Synchronous-completion absorption window. See clients/hermes-plugin/tools.py
|
|
18
|
+
// for the long-form reasoning. Short summary: when the ask is to an in-process
|
|
19
|
+
// system agent (today: @lyriel), the response is written to the ask row before
|
|
20
|
+
// POST /api/asks returns. Brief poll on GET /api/asks/:id afterwards so the
|
|
21
|
+
// response shows up inline in the LLM's tool result, and mark the ask
|
|
22
|
+
// "absorbed" so the inbox poll skips the duplicate forward.
|
|
23
|
+
const ABSORB_WINDOW_MS = 2_500;
|
|
24
|
+
const ABSORB_POLL_INTERVAL_MS = 250;
|
|
25
|
+
function asText(payload) {
|
|
26
|
+
return {
|
|
27
|
+
content: [
|
|
28
|
+
{
|
|
29
|
+
type: "text",
|
|
30
|
+
text: JSON.stringify(payload),
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
details: payload,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export const sendAskSchema = Type.Object({
|
|
37
|
+
to: Type.String({
|
|
38
|
+
description: "Recipient's Lyriel handle, with or without leading @. Examples: 'noor', '@charlie', 'lyriel' (for the system welcome agent).",
|
|
39
|
+
}),
|
|
40
|
+
prompt: Type.String({
|
|
41
|
+
description: "The message body to send. Plain text. The recipient's agent will surface this to their human.",
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
export const replySchema = Type.Object({
|
|
45
|
+
ask_id: Type.String({
|
|
46
|
+
description: "The UUID of the pending ask to reply to.",
|
|
47
|
+
}),
|
|
48
|
+
response: Type.String({
|
|
49
|
+
description: "The user's reply, paraphrased or verbatim.",
|
|
50
|
+
}),
|
|
51
|
+
});
|
|
52
|
+
export const planSendSchema = Type.Object({
|
|
53
|
+
participants: Type.Array(Type.String(), {
|
|
54
|
+
description: "Lyriel handles of the OTHER participants (not the user themselves). With or without leading @. Examples: ['noor', '@maya'].",
|
|
55
|
+
}),
|
|
56
|
+
description: Type.String({
|
|
57
|
+
description: "Free-form description of what the group is coordinating. Include constraints the user already knows. Be specific — every participant's agent reads this verbatim.",
|
|
58
|
+
}),
|
|
59
|
+
max_messages: Type.Optional(Type.Integer({
|
|
60
|
+
description: "Optional cap on conversation length (default 20). Auto-fails if exceeded.",
|
|
61
|
+
})),
|
|
62
|
+
});
|
|
63
|
+
export const planReplySchema = Type.Object({
|
|
64
|
+
plan_id: Type.String({
|
|
65
|
+
description: "The plan_id shown in the surface message.",
|
|
66
|
+
}),
|
|
67
|
+
content: Type.String({
|
|
68
|
+
description: "The user's contribution to the plan conversation. Speak as the user's agent representing them. Pass empty string if stay_silent=true.",
|
|
69
|
+
}),
|
|
70
|
+
stay_silent: Type.Optional(Type.Boolean({
|
|
71
|
+
description: "Set to true to opt out of this round without contributing. Default false.",
|
|
72
|
+
})),
|
|
73
|
+
});
|
|
74
|
+
export const planLockSchema = Type.Object({
|
|
75
|
+
plan_id: Type.String({
|
|
76
|
+
description: "The plan_id to lock.",
|
|
77
|
+
}),
|
|
78
|
+
summary: Type.String({
|
|
79
|
+
description: "Short, human-readable description of the locked outcome (e.g. 'Thursday 7pm at Mission Cantina'). Broadcast to every participant.",
|
|
80
|
+
}),
|
|
81
|
+
});
|
|
82
|
+
export const planCancelSchema = Type.Object({
|
|
83
|
+
plan_id: Type.String({
|
|
84
|
+
description: "The plan_id to cancel.",
|
|
85
|
+
}),
|
|
86
|
+
reason: Type.Optional(Type.String({
|
|
87
|
+
description: "Optional short reason the user gave for cancelling (e.g. 'changed my mind', 'rescheduling for next week'). Broadcast to participants alongside the cancel envelope. Omit if the user didn't give a reason.",
|
|
88
|
+
})),
|
|
89
|
+
});
|
|
90
|
+
export const updateBioSchema = Type.Object({
|
|
91
|
+
bio: Type.String({
|
|
92
|
+
description: "The bio text to set on the user's Lyriel profile. Short and substantive — what the user works on, what they're looking for, anything other agents should know when resolving their Seal. Max 280 chars (server trims and rejects longer values). Pass an empty string to clear the bio.",
|
|
93
|
+
}),
|
|
94
|
+
});
|
|
95
|
+
// All five tools share the same client config — passed in at registration.
|
|
96
|
+
export function makeHandlers(client) {
|
|
97
|
+
async function absorbIfQuick(askId) {
|
|
98
|
+
const deadline = Date.now() + ABSORB_WINDOW_MS;
|
|
99
|
+
while (Date.now() < deadline) {
|
|
100
|
+
try {
|
|
101
|
+
const data = await api.getAsk(client, askId);
|
|
102
|
+
if (data.status === "completed") {
|
|
103
|
+
return typeof data.response === "string" && data.response ? data.response : null;
|
|
104
|
+
}
|
|
105
|
+
if (data.status === "failed") {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
await new Promise((r) => setTimeout(r, ABSORB_POLL_INTERVAL_MS));
|
|
113
|
+
}
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
async function handleSendAsk(params) {
|
|
117
|
+
const to = (params.to ?? "").trim();
|
|
118
|
+
const prompt = (params.prompt ?? "").trim();
|
|
119
|
+
if (!to || !prompt) {
|
|
120
|
+
return asText({ error: "Both 'to' and 'prompt' are required" });
|
|
121
|
+
}
|
|
122
|
+
let result;
|
|
123
|
+
try {
|
|
124
|
+
result = await api.sendAsk(client, to, prompt);
|
|
125
|
+
}
|
|
126
|
+
catch (err) {
|
|
127
|
+
const e = err;
|
|
128
|
+
return asText({ error: e.message, status: e.status });
|
|
129
|
+
}
|
|
130
|
+
const askId = result.ask_id ?? "?";
|
|
131
|
+
const absorbed = await absorbIfQuick(askId);
|
|
132
|
+
if (absorbed !== null) {
|
|
133
|
+
pending.markAbsorbed(askId);
|
|
134
|
+
return asText({
|
|
135
|
+
success: true,
|
|
136
|
+
ask_id: askId,
|
|
137
|
+
recipient: result.recipient ?? to,
|
|
138
|
+
status: "completed",
|
|
139
|
+
completed_inline: true,
|
|
140
|
+
response: absorbed,
|
|
141
|
+
note: `${to} responded instantly (in-process system agent). The response is inlined below. ` +
|
|
142
|
+
`Summarize or paraphrase it to the user — do NOT wait for a separate Lyriel reply.`,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return asText({
|
|
146
|
+
success: true,
|
|
147
|
+
ask_id: askId,
|
|
148
|
+
recipient: result.recipient ?? to,
|
|
149
|
+
status: result.status ?? "dispatched",
|
|
150
|
+
note: `Ask dispatched to ${to}. The recipient's reply will arrive in this chat as a ` +
|
|
151
|
+
`🪶 Lyriel reply (ask_id ${askId}) when their agent responds. Acknowledge briefly — ` +
|
|
152
|
+
`do NOT promise or paraphrase the reply yourself; the surfacing layer delivers it.`,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
async function handleReply(params) {
|
|
156
|
+
const askId = (params.ask_id ?? "").trim();
|
|
157
|
+
const response = (params.response ?? "").trim();
|
|
158
|
+
if (!askId || !response) {
|
|
159
|
+
return asText({ error: "Both 'ask_id' and 'response' are required" });
|
|
160
|
+
}
|
|
161
|
+
const entry = pending.takeAsk(askId);
|
|
162
|
+
if (!entry) {
|
|
163
|
+
const snapshot = pending.listPendingAsks();
|
|
164
|
+
const ids = Object.keys(snapshot);
|
|
165
|
+
if (ids.length === 0) {
|
|
166
|
+
return asText({
|
|
167
|
+
error: `No pending Lyriel asks. ask_id=${askId} either already had a reply sent OR ` +
|
|
168
|
+
`was never received (check the chat for a surface message).`,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
return asText({
|
|
172
|
+
error: `No pending ask with id ${askId}. Currently pending: ${JSON.stringify(ids)}`,
|
|
173
|
+
pending_ids: ids,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
try {
|
|
177
|
+
const result = await api.sendCallback(entry.callbackUrl, entry.callbackToken, response);
|
|
178
|
+
return asText({
|
|
179
|
+
success: true,
|
|
180
|
+
ask_id: askId,
|
|
181
|
+
callback_status: result.status ?? "ok",
|
|
182
|
+
idempotent: result.idempotent ?? false,
|
|
183
|
+
note: "Reply sent through Lyriel.",
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
catch (err) {
|
|
187
|
+
pending.restoreAsk(askId, entry);
|
|
188
|
+
const e = err;
|
|
189
|
+
return asText({ error: e.message, status: e.status, retryable: true });
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
async function handlePlanSend(params) {
|
|
193
|
+
const participants = Array.isArray(params.participants) ? params.participants : [];
|
|
194
|
+
const description = (params.description ?? "").trim();
|
|
195
|
+
if (participants.length === 0 || !description) {
|
|
196
|
+
return asText({ error: "Both 'participants' and 'description' are required" });
|
|
197
|
+
}
|
|
198
|
+
try {
|
|
199
|
+
const result = await api.sendPlan(client, participants, description, params.max_messages);
|
|
200
|
+
const deduplicated = result.deduplicated === true;
|
|
201
|
+
const note = deduplicated
|
|
202
|
+
? "Lyriel matched this to a plan you already created in the last minute with the " +
|
|
203
|
+
"same description and participants — returning that existing plan instead of " +
|
|
204
|
+
"starting a duplicate. Do NOT tell the user you started a new plan; if they " +
|
|
205
|
+
"explicitly asked you to create a NEW plan, acknowledge the dedup and ask if " +
|
|
206
|
+
"they'd like to change the description or participants to differentiate it from " +
|
|
207
|
+
"the existing one."
|
|
208
|
+
: "Plan is coordinating in the background. Tell your user briefly that you've " +
|
|
209
|
+
"started planning with the named participants and will let them know when it's " +
|
|
210
|
+
"locked. Use natural language; do NOT mention tool names, plan_ids, or any " +
|
|
211
|
+
"internal mechanism. Plan rounds run silently — your user sees nothing until the " +
|
|
212
|
+
"lock notification arrives, at which point you summarize the outcome for them. " +
|
|
213
|
+
"If they want to cancel before then, they can say so.";
|
|
214
|
+
return asText({
|
|
215
|
+
success: true,
|
|
216
|
+
plan_id: result.plan_id ?? "?",
|
|
217
|
+
participants: result.participants ?? [],
|
|
218
|
+
status: result.status ?? "open",
|
|
219
|
+
deduplicated,
|
|
220
|
+
note,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
catch (err) {
|
|
224
|
+
const e = err;
|
|
225
|
+
return asText({ error: e.message, status: e.status });
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
async function handlePlanReply(params) {
|
|
229
|
+
const planId = (params.plan_id ?? "").trim();
|
|
230
|
+
const content = (params.content ?? "").trim();
|
|
231
|
+
const staySilent = Boolean(params.stay_silent);
|
|
232
|
+
if (!planId) {
|
|
233
|
+
return asText({ error: "'plan_id' is required" });
|
|
234
|
+
}
|
|
235
|
+
if (!staySilent && !content) {
|
|
236
|
+
return asText({ error: "'content' is required unless stay_silent=true" });
|
|
237
|
+
}
|
|
238
|
+
const entry = pending.takePlan(planId);
|
|
239
|
+
if (!entry) {
|
|
240
|
+
const snapshot = pending.listPendingPlans();
|
|
241
|
+
const ids = Object.keys(snapshot);
|
|
242
|
+
if (ids.length === 0) {
|
|
243
|
+
return asText({
|
|
244
|
+
error: `No pending plan callbacks. plan_id=${planId} either already had a contribution ` +
|
|
245
|
+
`this round, OR the plan locked, OR the envelope wasn't received.`,
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
return asText({
|
|
249
|
+
error: `No pending callback for plan ${planId}. Currently pending plans: ${JSON.stringify(ids)}`,
|
|
250
|
+
pending_plan_ids: ids,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
await api.sendPlanCallback(entry.callbackUrl, entry.callbackToken, content, staySilent);
|
|
255
|
+
return asText({
|
|
256
|
+
success: true,
|
|
257
|
+
plan_id: planId,
|
|
258
|
+
silent: staySilent,
|
|
259
|
+
note: "Contribution sent. The other participants' agents will now consider it in their " +
|
|
260
|
+
"next response. Further refinement rounds and the locked outcome will arrive as " +
|
|
261
|
+
"🪶 Lyriel plan updates.",
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
catch (err) {
|
|
265
|
+
pending.restorePlan(planId, entry);
|
|
266
|
+
const e = err;
|
|
267
|
+
return asText({ error: e.message, status: e.status, retryable: true });
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
async function handlePlanLock(params) {
|
|
271
|
+
const planId = (params.plan_id ?? "").trim();
|
|
272
|
+
const summary = (params.summary ?? "").trim();
|
|
273
|
+
if (!planId || !summary) {
|
|
274
|
+
return asText({ error: "Both 'plan_id' and 'summary' are required" });
|
|
275
|
+
}
|
|
276
|
+
try {
|
|
277
|
+
const result = await api.lockPlan(client, planId, summary);
|
|
278
|
+
pending.forgetPlan(planId);
|
|
279
|
+
return asText({
|
|
280
|
+
success: true,
|
|
281
|
+
plan_id: planId,
|
|
282
|
+
status: result.status ?? "locked",
|
|
283
|
+
locked_at: result.locked_at,
|
|
284
|
+
note: `Plan ${planId} locked: ${summary}. Every participant's agent has been notified and ` +
|
|
285
|
+
`will surface the final outcome to their human.`,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
catch (err) {
|
|
289
|
+
const e = err;
|
|
290
|
+
return asText({ error: e.message, status: e.status });
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
async function handlePlanCancel(params) {
|
|
294
|
+
const planId = (params.plan_id ?? "").trim();
|
|
295
|
+
const reason = (params.reason ?? "").trim() || undefined;
|
|
296
|
+
if (!planId) {
|
|
297
|
+
return asText({ error: "'plan_id' is required" });
|
|
298
|
+
}
|
|
299
|
+
try {
|
|
300
|
+
const result = await api.cancelPlan(client, planId, reason);
|
|
301
|
+
pending.forgetPlan(planId);
|
|
302
|
+
return asText({
|
|
303
|
+
success: true,
|
|
304
|
+
plan_id: planId,
|
|
305
|
+
status: result.status ?? "cancelled",
|
|
306
|
+
reason: result.reason ?? null,
|
|
307
|
+
note: "Plan cancelled. The substrate aborted in-flight rounds and notified every " +
|
|
308
|
+
"participant's agent. Tell your user briefly that you cancelled — natural " +
|
|
309
|
+
"language, do NOT mention plan_ids or tool names.",
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
catch (err) {
|
|
313
|
+
const e = err;
|
|
314
|
+
return asText({ error: e.message, status: e.status });
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
async function handleUpdateBio(params) {
|
|
318
|
+
const bio = typeof params.bio === "string" ? params.bio : null;
|
|
319
|
+
if (bio === null) {
|
|
320
|
+
return asText({ error: "'bio' is required (pass empty string to clear)." });
|
|
321
|
+
}
|
|
322
|
+
try {
|
|
323
|
+
const result = await api.updateProfile(client, { bio });
|
|
324
|
+
const profile = result.profile ?? {};
|
|
325
|
+
return asText({
|
|
326
|
+
success: true,
|
|
327
|
+
bio: profile.bio ?? null,
|
|
328
|
+
note: "Bio updated on Lyriel. Tell the user briefly what you set (or that you cleared it). " +
|
|
329
|
+
"Do NOT ask them to paste it anywhere — it's already live on their profile.",
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
catch (err) {
|
|
333
|
+
const e = err;
|
|
334
|
+
return asText({ error: e.message, status: e.status });
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
return {
|
|
338
|
+
handleSendAsk,
|
|
339
|
+
handleReply,
|
|
340
|
+
handlePlanSend,
|
|
341
|
+
handlePlanReply,
|
|
342
|
+
handlePlanLock,
|
|
343
|
+
handlePlanCancel,
|
|
344
|
+
handleUpdateBio,
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
function paramRecord(params) {
|
|
348
|
+
return params && typeof params === "object" && !Array.isArray(params)
|
|
349
|
+
? params
|
|
350
|
+
: {};
|
|
351
|
+
}
|
|
352
|
+
// Defensive narrowing: LLM-emitted tool args are unknown shape; non-string
|
|
353
|
+
// inputs should be treated as empty rather than stringified to
|
|
354
|
+
// "[object Object]". The typebox schema declares each field as a string, but
|
|
355
|
+
// don't trust the validator at this seam.
|
|
356
|
+
function asString(value) {
|
|
357
|
+
return typeof value === "string" ? value : "";
|
|
358
|
+
}
|
|
359
|
+
export function buildToolDescriptors(client) {
|
|
360
|
+
const h = makeHandlers(client);
|
|
361
|
+
return [
|
|
362
|
+
{
|
|
363
|
+
name: "lyriel_send_ask",
|
|
364
|
+
label: "Lyriel: send ask",
|
|
365
|
+
// The substrate primer is prepended here so it loads into the
|
|
366
|
+
// LLM's bound-tool context. Tool-specific instructions follow
|
|
367
|
+
// after a blank line. The other Lyriel tools have shorter,
|
|
368
|
+
// tool-specific descriptions; the primer in this one
|
|
369
|
+
// description is enough to frame the whole toolset.
|
|
370
|
+
description: SUBSTRATE_PRIMER +
|
|
371
|
+
"\n\n" +
|
|
372
|
+
"Tool — send a 1:1 ask. Use this when your user wants to ping exactly one other Lyriel user by handle. Returns an ask_id; the recipient's response arrives later as a 'reply' dispatch in the inbox, surfaced into this chat automatically — you do not need to poll. For multi-party coordination, use lyriel_plan_send instead.",
|
|
373
|
+
parameters: sendAskSchema,
|
|
374
|
+
async execute(_id, params) {
|
|
375
|
+
const p = paramRecord(params);
|
|
376
|
+
return h.handleSendAsk({
|
|
377
|
+
to: asString(p.to),
|
|
378
|
+
prompt: asString(p.prompt),
|
|
379
|
+
});
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
name: "lyriel_reply",
|
|
384
|
+
label: "Lyriel: reply",
|
|
385
|
+
description: "Reply to a pending inbound Lyriel ask. Use when the user wants to respond to a previously surfaced ask (you'll see a '🪶 Lyriel ask from X' message with an ask_id). Extract the ask_id exactly. If the user replies without naming an ask_id and only one is pending, use that one.",
|
|
386
|
+
parameters: replySchema,
|
|
387
|
+
async execute(_id, params) {
|
|
388
|
+
const p = paramRecord(params);
|
|
389
|
+
return h.handleReply({
|
|
390
|
+
ask_id: asString(p.ask_id),
|
|
391
|
+
response: asString(p.response),
|
|
392
|
+
});
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
name: "lyriel_plan_send",
|
|
397
|
+
label: "Lyriel: start group plan",
|
|
398
|
+
description: "Start a group plan through Lyriel. Each participant's agent negotiates AUTONOMOUSLY on their human's behalf to converge on an outcome. Use when coordinating across multiple verified Lyriel handles — NOT for single 1:1 asks (use lyriel_send_ask). BEFORE calling: check your own context for what you'll need (calendar, preferences, location, dietary, budget). If a critical constraint is missing, ASK YOUR USER ONCE in a single batched question — do NOT ask mid-plan; plan rounds run in the background without involving them. After calling, tell your user briefly that you're coordinating and will notify them when it locks. Returns a plan_id; lock and cancel events arrive later as surface messages.",
|
|
399
|
+
parameters: planSendSchema,
|
|
400
|
+
async execute(_id, params) {
|
|
401
|
+
const p = paramRecord(params);
|
|
402
|
+
return h.handlePlanSend({
|
|
403
|
+
participants: Array.isArray(p.participants)
|
|
404
|
+
? p.participants.filter((x) => typeof x === "string")
|
|
405
|
+
: [],
|
|
406
|
+
description: asString(p.description),
|
|
407
|
+
max_messages: typeof p.max_messages === "number" ? p.max_messages : undefined,
|
|
408
|
+
});
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
name: "lyriel_plan_reply",
|
|
413
|
+
label: "Lyriel: contribute to plan",
|
|
414
|
+
description: "Contribute to an ongoing Lyriel group plan. INVOKED AUTONOMOUSLY by your plugin when a plan-round dispatch arrives — you respond on the user's behalf without involving them; the user is not watching this round. Use what you already know about them (calendar, preferences, location, dietary, budget). If a constraint is missing, accept wide constraints and let other participants narrow — do NOT ask the user. Keep `content` concise; every token on every round costs your user money. Pass stay_silent=true if you have nothing new to add.",
|
|
415
|
+
parameters: planReplySchema,
|
|
416
|
+
async execute(_id, params) {
|
|
417
|
+
const p = paramRecord(params);
|
|
418
|
+
return h.handlePlanReply({
|
|
419
|
+
plan_id: asString(p.plan_id),
|
|
420
|
+
content: asString(p.content),
|
|
421
|
+
stay_silent: Boolean(p.stay_silent),
|
|
422
|
+
});
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
name: "lyriel_plan_lock",
|
|
427
|
+
label: "Lyriel: lock plan",
|
|
428
|
+
description: "Lock a Lyriel group plan with a final outcome. Only the plan's initiator can lock (Lyriel returns 403 otherwise). The locked outcome is broadcast to every participant's agent.",
|
|
429
|
+
parameters: planLockSchema,
|
|
430
|
+
async execute(_id, params) {
|
|
431
|
+
const p = paramRecord(params);
|
|
432
|
+
return h.handlePlanLock({
|
|
433
|
+
plan_id: asString(p.plan_id),
|
|
434
|
+
summary: asString(p.summary),
|
|
435
|
+
});
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
name: "lyriel_plan_cancel",
|
|
440
|
+
label: "Lyriel: cancel plan",
|
|
441
|
+
description: "Cancel an in-flight Lyriel group plan. Only the plan's initiator can cancel (Lyriel returns 403 otherwise). Use when the user wants to call off a plan they started — before the lock arrives, or because they changed their mind. The substrate aborts any in-flight rounds and broadcasts a plan_cancelled envelope to every participant's agent. After calling, tell your user briefly that you cancelled — natural language, no tool names or plan_ids in the user-facing message.",
|
|
442
|
+
parameters: planCancelSchema,
|
|
443
|
+
async execute(_id, params) {
|
|
444
|
+
const p = paramRecord(params);
|
|
445
|
+
return h.handlePlanCancel({
|
|
446
|
+
plan_id: asString(p.plan_id),
|
|
447
|
+
reason: typeof p.reason === "string" ? p.reason : undefined,
|
|
448
|
+
});
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
name: "lyriel_update_bio",
|
|
453
|
+
label: "Lyriel: update bio",
|
|
454
|
+
description: "Update the user's public Lyriel bio. Call this when the user asks you to write, rewrite, or update their Lyriel bio (\"write me a Lyriel bio\", \"update my Lyriel bio to mention X\", etc.). You generate the bio yourself based on what you know about the user; DO NOT ask them to copy-paste it back — this tool writes the bio to their profile directly. Bio is plain text, capped at 280 chars on the server. Pass an empty string to clear the bio.",
|
|
455
|
+
parameters: updateBioSchema,
|
|
456
|
+
async execute(_id, params) {
|
|
457
|
+
const p = paramRecord(params);
|
|
458
|
+
return h.handleUpdateBio({ bio: asString(p.bio) });
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
];
|
|
462
|
+
}
|
|
463
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../tools.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,EAAE;AACF,gEAAgE;AAChE,4EAA4E;AAC5E,gEAAgE;AAChE,2EAA2E;AAC3E,yEAAyE;AACzE,EAAE;AACF,yEAAyE;AACzE,6DAA6D;AAC7D,2EAA2E;AAC3E,2DAA2D;AAE3D,OAAO,EAAE,IAAI,EAAgB,M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": "Lyriel plugin for OpenClaw. Long-polls Lyriel's /api/inbox for inbound asks, surfaces them into the user's active session, and exposes five LLM tools for sending/replying to asks and driving group plans in natural language. Cross-provider parity with the Hermes plugin.",
|
|
5
5
|
"enabledByDefault": false,
|
|
6
6
|
"activation": {
|
|
7
|
-
"onStartup": true
|
|
8
|
-
"onCapabilities": ["tool"]
|
|
7
|
+
"onStartup": true
|
|
9
8
|
},
|
|
10
9
|
"contracts": {
|
|
11
10
|
"tools": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyriel/openclaw-plugin",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Lyriel plugin for OpenClaw.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
],
|
|
16
16
|
"main": "./dist/index.js",
|
|
17
17
|
"files": [
|
|
18
|
-
"dist",
|
|
18
|
+
"dist/**/*.js",
|
|
19
|
+
"dist/**/*.js.map",
|
|
20
|
+
"dist/**/*.d.ts",
|
|
19
21
|
"openclaw.plugin.json"
|
|
20
22
|
],
|
|
21
23
|
"scripts": {
|