@lobu/worker 2.8.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.
Files changed (117) hide show
  1. package/dist/core/error-handler.d.ts +7 -0
  2. package/dist/core/error-handler.d.ts.map +1 -0
  3. package/dist/core/error-handler.js +58 -0
  4. package/dist/core/error-handler.js.map +1 -0
  5. package/dist/core/project-scanner.d.ts +9 -0
  6. package/dist/core/project-scanner.d.ts.map +1 -0
  7. package/dist/core/project-scanner.js +64 -0
  8. package/dist/core/project-scanner.js.map +1 -0
  9. package/dist/core/types.d.ts +102 -0
  10. package/dist/core/types.d.ts.map +1 -0
  11. package/dist/core/types.js +8 -0
  12. package/dist/core/types.js.map +1 -0
  13. package/dist/core/url-utils.d.ts +5 -0
  14. package/dist/core/url-utils.d.ts.map +1 -0
  15. package/dist/core/url-utils.js +13 -0
  16. package/dist/core/url-utils.js.map +1 -0
  17. package/dist/core/workspace.d.ts +29 -0
  18. package/dist/core/workspace.d.ts.map +1 -0
  19. package/dist/core/workspace.js +104 -0
  20. package/dist/core/workspace.js.map +1 -0
  21. package/dist/embedded/just-bash-bootstrap.d.ts +21 -0
  22. package/dist/embedded/just-bash-bootstrap.d.ts.map +1 -0
  23. package/dist/embedded/just-bash-bootstrap.js +215 -0
  24. package/dist/embedded/just-bash-bootstrap.js.map +1 -0
  25. package/dist/gateway/gateway-integration.d.ts +57 -0
  26. package/dist/gateway/gateway-integration.d.ts.map +1 -0
  27. package/dist/gateway/gateway-integration.js +209 -0
  28. package/dist/gateway/gateway-integration.js.map +1 -0
  29. package/dist/gateway/message-batcher.d.ts +27 -0
  30. package/dist/gateway/message-batcher.d.ts.map +1 -0
  31. package/dist/gateway/message-batcher.js +102 -0
  32. package/dist/gateway/message-batcher.js.map +1 -0
  33. package/dist/gateway/sse-client.d.ts +74 -0
  34. package/dist/gateway/sse-client.d.ts.map +1 -0
  35. package/dist/gateway/sse-client.js +748 -0
  36. package/dist/gateway/sse-client.js.map +1 -0
  37. package/dist/gateway/types.d.ts +60 -0
  38. package/dist/gateway/types.d.ts.map +1 -0
  39. package/dist/gateway/types.js +6 -0
  40. package/dist/gateway/types.js.map +1 -0
  41. package/dist/index.d.ts +3 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/dist/index.js +112 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/instructions/builder.d.ts +8 -0
  46. package/dist/instructions/builder.d.ts.map +1 -0
  47. package/dist/instructions/builder.js +53 -0
  48. package/dist/instructions/builder.js.map +1 -0
  49. package/dist/instructions/providers.d.ts +13 -0
  50. package/dist/instructions/providers.d.ts.map +1 -0
  51. package/dist/instructions/providers.js +26 -0
  52. package/dist/instructions/providers.js.map +1 -0
  53. package/dist/modules/lifecycle.d.ts +18 -0
  54. package/dist/modules/lifecycle.d.ts.map +1 -0
  55. package/dist/modules/lifecycle.js +56 -0
  56. package/dist/modules/lifecycle.js.map +1 -0
  57. package/dist/openclaw/custom-tools.d.ts +17 -0
  58. package/dist/openclaw/custom-tools.d.ts.map +1 -0
  59. package/dist/openclaw/custom-tools.js +195 -0
  60. package/dist/openclaw/custom-tools.js.map +1 -0
  61. package/dist/openclaw/instructions.d.ts +15 -0
  62. package/dist/openclaw/instructions.d.ts.map +1 -0
  63. package/dist/openclaw/instructions.js +32 -0
  64. package/dist/openclaw/instructions.js.map +1 -0
  65. package/dist/openclaw/model-resolver.d.ts +30 -0
  66. package/dist/openclaw/model-resolver.d.ts.map +1 -0
  67. package/dist/openclaw/model-resolver.js +147 -0
  68. package/dist/openclaw/model-resolver.js.map +1 -0
  69. package/dist/openclaw/plugin-loader.d.ts +39 -0
  70. package/dist/openclaw/plugin-loader.d.ts.map +1 -0
  71. package/dist/openclaw/plugin-loader.js +347 -0
  72. package/dist/openclaw/plugin-loader.js.map +1 -0
  73. package/dist/openclaw/processor.d.ts +38 -0
  74. package/dist/openclaw/processor.d.ts.map +1 -0
  75. package/dist/openclaw/processor.js +182 -0
  76. package/dist/openclaw/processor.js.map +1 -0
  77. package/dist/openclaw/session-context.d.ts +44 -0
  78. package/dist/openclaw/session-context.d.ts.map +1 -0
  79. package/dist/openclaw/session-context.js +151 -0
  80. package/dist/openclaw/session-context.js.map +1 -0
  81. package/dist/openclaw/tool-policy.d.ts +23 -0
  82. package/dist/openclaw/tool-policy.d.ts.map +1 -0
  83. package/dist/openclaw/tool-policy.js +151 -0
  84. package/dist/openclaw/tool-policy.js.map +1 -0
  85. package/dist/openclaw/tools.d.ts +6 -0
  86. package/dist/openclaw/tools.d.ts.map +1 -0
  87. package/dist/openclaw/tools.js +158 -0
  88. package/dist/openclaw/tools.js.map +1 -0
  89. package/dist/openclaw/worker.d.ts +39 -0
  90. package/dist/openclaw/worker.d.ts.map +1 -0
  91. package/dist/openclaw/worker.js +1340 -0
  92. package/dist/openclaw/worker.js.map +1 -0
  93. package/dist/server.d.ts +7 -0
  94. package/dist/server.d.ts.map +1 -0
  95. package/dist/server.js +304 -0
  96. package/dist/server.js.map +1 -0
  97. package/dist/shared/audio-provider-suggestions.d.ts +13 -0
  98. package/dist/shared/audio-provider-suggestions.d.ts.map +1 -0
  99. package/dist/shared/audio-provider-suggestions.js +105 -0
  100. package/dist/shared/audio-provider-suggestions.js.map +1 -0
  101. package/dist/shared/processor-utils.d.ts +6 -0
  102. package/dist/shared/processor-utils.d.ts.map +1 -0
  103. package/dist/shared/processor-utils.js +30 -0
  104. package/dist/shared/processor-utils.js.map +1 -0
  105. package/dist/shared/provider-auth-hints.d.ts +6 -0
  106. package/dist/shared/provider-auth-hints.d.ts.map +1 -0
  107. package/dist/shared/provider-auth-hints.js +51 -0
  108. package/dist/shared/provider-auth-hints.js.map +1 -0
  109. package/dist/shared/tool-display-config.d.ts +16 -0
  110. package/dist/shared/tool-display-config.d.ts.map +1 -0
  111. package/dist/shared/tool-display-config.js +67 -0
  112. package/dist/shared/tool-display-config.js.map +1 -0
  113. package/dist/shared/tool-implementations.d.ts +55 -0
  114. package/dist/shared/tool-implementations.d.ts.map +1 -0
  115. package/dist/shared/tool-implementations.js +519 -0
  116. package/dist/shared/tool-implementations.js.map +1 -0
  117. package/package.json +55 -0
@@ -0,0 +1,519 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.uploadUserFile = uploadUserFile;
40
+ exports.askUserQuestion = askUserQuestion;
41
+ exports.scheduleReminder = scheduleReminder;
42
+ exports.cancelReminder = cancelReminder;
43
+ exports.listReminders = listReminders;
44
+ exports.generateImage = generateImage;
45
+ exports.generateAudio = generateAudio;
46
+ exports.getChannelHistory = getChannelHistory;
47
+ exports.callMcpTool = callMcpTool;
48
+ const nodeFs = __importStar(require("node:fs"));
49
+ const fs = __importStar(require("node:fs/promises"));
50
+ const path = __importStar(require("node:path"));
51
+ const core_1 = require("@lobu/core");
52
+ const form_data_1 = __importDefault(require("form-data"));
53
+ const audio_provider_suggestions_1 = require("./audio-provider-suggestions");
54
+ const logger = (0, core_1.createLogger)("shared-tools");
55
+ function textResult(text) {
56
+ return { content: [{ type: "text", text }] };
57
+ }
58
+ function formatError(error) {
59
+ return error instanceof Error ? error.message : String(error);
60
+ }
61
+ function withErrorHandling(label, fn) {
62
+ return fn().catch((error) => {
63
+ logger.error(`${label} error:`, error);
64
+ return textResult(`Error: ${formatError(error)}`);
65
+ });
66
+ }
67
+ async function parseErrorBody(response) {
68
+ return response
69
+ .json()
70
+ .catch(() => ({ error: response.statusText }));
71
+ }
72
+ async function gatewayFetch(gw, urlPath, options = {}, errorPrefix) {
73
+ const { method, body, headers: extraHeaders } = options;
74
+ const headers = {
75
+ Authorization: `Bearer ${gw.workerToken}`,
76
+ ...extraHeaders,
77
+ };
78
+ if (body) {
79
+ headers["Content-Type"] = "application/json";
80
+ }
81
+ const response = await fetch(`${gw.gatewayUrl}${urlPath}`, {
82
+ method,
83
+ headers,
84
+ body,
85
+ });
86
+ if (!response.ok) {
87
+ const errorData = await parseErrorBody(response);
88
+ logger.error(`${errorPrefix}: ${response.status}`, errorData);
89
+ return {
90
+ error: textResult(`Error: ${errorData.error || errorPrefix}`),
91
+ };
92
+ }
93
+ const data = (await response.json());
94
+ return { data };
95
+ }
96
+ // ============================================================================
97
+ // Utility: Content type detection
98
+ // ============================================================================
99
+ const CONTENT_TYPES = {
100
+ ".png": "image/png",
101
+ ".jpg": "image/jpeg",
102
+ ".jpeg": "image/jpeg",
103
+ ".gif": "image/gif",
104
+ ".webp": "image/webp",
105
+ ".pdf": "application/pdf",
106
+ ".csv": "text/csv",
107
+ ".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
108
+ ".json": "application/json",
109
+ ".html": "text/html",
110
+ ".svg": "image/svg+xml",
111
+ ".mp4": "video/mp4",
112
+ ".webm": "video/webm",
113
+ ".txt": "text/plain",
114
+ ".md": "text/markdown",
115
+ ".py": "text/x-python",
116
+ ".js": "text/javascript",
117
+ ".ts": "text/typescript",
118
+ ".zip": "application/zip",
119
+ ".tar": "application/x-tar",
120
+ ".gz": "application/gzip",
121
+ };
122
+ function getContentType(fileName) {
123
+ const ext = path.extname(fileName).toLowerCase();
124
+ return CONTENT_TYPES[ext] || "application/octet-stream";
125
+ }
126
+ // ============================================================================
127
+ // Utility: FormData buffer serialisation
128
+ // ============================================================================
129
+ async function formDataToBuffer(formData) {
130
+ return new Promise((resolve, reject) => {
131
+ const chunks = [];
132
+ formData.on("data", (chunk) => {
133
+ if (typeof chunk === "string") {
134
+ chunks.push(Buffer.from(chunk));
135
+ }
136
+ else {
137
+ chunks.push(chunk);
138
+ }
139
+ });
140
+ formData.on("end", () => resolve(Buffer.concat(chunks)));
141
+ formData.on("error", (err) => reject(err));
142
+ formData.resume();
143
+ });
144
+ }
145
+ // ============================================================================
146
+ // UploadUserFile
147
+ // ============================================================================
148
+ async function uploadUserFile(gw, args) {
149
+ return withErrorHandling("Show file tool", async () => {
150
+ logger.info(`Show file to user: ${args.file_path}, description: ${args.description || "none"}`);
151
+ const filePath = path.isAbsolute(args.file_path)
152
+ ? args.file_path
153
+ : path.join(process.cwd(), args.file_path);
154
+ const stats = await fs.stat(filePath).catch(() => null);
155
+ if (!stats || !stats.isFile()) {
156
+ return textResult(`Error: Cannot show file - not found or is not a file: ${args.file_path}`);
157
+ }
158
+ if (stats.size === 0) {
159
+ return textResult(`Error: Cannot show empty file: ${args.file_path}`);
160
+ }
161
+ const fileName = path.basename(filePath);
162
+ const fileBuffer = await fs.readFile(filePath);
163
+ const formData = new form_data_1.default();
164
+ formData.append("file", fileBuffer, {
165
+ filename: fileName,
166
+ contentType: getContentType(fileName),
167
+ });
168
+ formData.append("filename", fileName);
169
+ if (args.description) {
170
+ formData.append("comment", args.description);
171
+ }
172
+ const formDataBuffer = await formDataToBuffer(formData);
173
+ const fdHeaders = formData.getHeaders();
174
+ const response = await fetch(`${gw.gatewayUrl}/internal/files/upload`, {
175
+ method: "POST",
176
+ headers: {
177
+ Authorization: `Bearer ${gw.workerToken}`,
178
+ "X-Channel-Id": gw.channelId,
179
+ "X-Conversation-Id": gw.conversationId,
180
+ ...fdHeaders,
181
+ "Content-Length": formDataBuffer.length.toString(),
182
+ },
183
+ body: formDataBuffer,
184
+ });
185
+ if (!response.ok) {
186
+ const error = await response.text();
187
+ logger.error(`Failed to show file: ${response.status} - ${error}`);
188
+ return textResult(`Error: Failed to show file to user: ${response.status} - ${error}`);
189
+ }
190
+ const result = (await response.json());
191
+ logger.info(`Successfully showed file to user: ${result.fileId} - ${result.name}`);
192
+ return textResult(`Successfully showed ${fileName} to the user`);
193
+ });
194
+ }
195
+ // ============================================================================
196
+ // AskUserQuestion
197
+ // ============================================================================
198
+ async function askUserQuestion(gw, args) {
199
+ return withErrorHandling("AskUserQuestion", async () => {
200
+ logger.info(`AskUserQuestion: ${args.question}`);
201
+ const { error } = await gatewayFetch(gw, "/internal/interactions/create", {
202
+ method: "POST",
203
+ body: JSON.stringify({
204
+ interactionType: "question",
205
+ question: args.question,
206
+ options: args.options,
207
+ }),
208
+ }, "Failed to post question");
209
+ if (error)
210
+ return error;
211
+ return textResult("Question posted with buttons. Your session will end now. The user's answer will arrive as your next message.");
212
+ });
213
+ }
214
+ // ============================================================================
215
+ // ScheduleReminder
216
+ // ============================================================================
217
+ async function scheduleReminder(gw, args) {
218
+ return withErrorHandling("ScheduleReminder", async () => {
219
+ const scheduleType = args.cron
220
+ ? `cron: ${args.cron}`
221
+ : `${args.delayMinutes} minutes`;
222
+ logger.info(`ScheduleReminder: ${scheduleType} - ${args.task.substring(0, 50)}...`);
223
+ const { data, error } = await gatewayFetch(gw, "/internal/schedule", {
224
+ method: "POST",
225
+ body: JSON.stringify({
226
+ delayMinutes: args.delayMinutes,
227
+ cron: args.cron,
228
+ maxIterations: args.maxIterations,
229
+ task: args.task,
230
+ }),
231
+ }, "Failed to schedule reminder");
232
+ if (error)
233
+ return error;
234
+ const result = data;
235
+ logger.info(`Scheduled reminder: ${result.scheduleId} for ${result.scheduledFor}${result.isRecurring ? ` (recurring: ${result.cron})` : ""}`);
236
+ const recurringInfo = result.isRecurring
237
+ ? `\nRecurring: ${result.cron} (max ${result.maxIterations} iterations)`
238
+ : "";
239
+ return textResult(`Reminder scheduled successfully!\n\nSchedule ID: ${result.scheduleId}\nFirst trigger: ${new Date(result.scheduledFor).toLocaleString()}${recurringInfo}\n\nYou can cancel this with CancelReminder if needed.`);
240
+ });
241
+ }
242
+ // ============================================================================
243
+ // CancelReminder
244
+ // ============================================================================
245
+ async function cancelReminder(gw, args) {
246
+ return withErrorHandling("CancelReminder", async () => {
247
+ logger.info(`CancelReminder: ${args.scheduleId}`);
248
+ const { data, error } = await gatewayFetch(gw, `/internal/schedule/${encodeURIComponent(args.scheduleId)}`, { method: "DELETE" }, "Failed to cancel reminder");
249
+ if (error)
250
+ return error;
251
+ const result = data;
252
+ return textResult(result.success
253
+ ? "Reminder cancelled successfully."
254
+ : `Could not cancel reminder: ${result.message}`);
255
+ });
256
+ }
257
+ // ============================================================================
258
+ // ListReminders
259
+ // ============================================================================
260
+ async function listReminders(gw) {
261
+ return withErrorHandling("ListReminders", async () => {
262
+ logger.info("ListReminders");
263
+ const { data, error } = await gatewayFetch(gw, "/internal/schedule", {}, "Failed to list reminders");
264
+ if (error)
265
+ return error;
266
+ const { reminders } = data;
267
+ if (reminders.length === 0) {
268
+ return textResult("No pending reminders scheduled.");
269
+ }
270
+ const formatted = reminders
271
+ .map((r, i) => {
272
+ const timeStr = r.minutesRemaining < 60
273
+ ? `${r.minutesRemaining} minutes`
274
+ : `${Math.round(r.minutesRemaining / 60)} hours`;
275
+ const recurringInfo = r.isRecurring
276
+ ? `\n Recurring: ${r.cron} (iteration ${r.iteration}/${r.maxIterations})`
277
+ : "";
278
+ return `${i + 1}. [${r.scheduleId}]\n Task: ${r.task}\n Next trigger in: ${timeStr} (${new Date(r.scheduledFor).toLocaleString()})${recurringInfo}`;
279
+ })
280
+ .join("\n\n");
281
+ return textResult(`Pending reminders (${reminders.length}):\n\n${formatted}`);
282
+ });
283
+ }
284
+ // ============================================================================
285
+ // Utility: Upload generated file (image/audio) to gateway
286
+ // ============================================================================
287
+ async function uploadGeneratedFile(gw, buffer, filename, mimeType, extraHeaders) {
288
+ let tempPath = null;
289
+ try {
290
+ tempPath = `/tmp/${filename}_${Date.now()}`;
291
+ await fs.writeFile(tempPath, Buffer.from(buffer));
292
+ const formData = new form_data_1.default();
293
+ formData.append("file", nodeFs.createReadStream(tempPath), {
294
+ filename,
295
+ contentType: mimeType,
296
+ });
297
+ formData.append("filename", filename);
298
+ formData.append("comment", "Generated content");
299
+ const formDataBuffer = await formDataToBuffer(formData);
300
+ const fdHeaders = formData.getHeaders();
301
+ const uploadResponse = await fetch(`${gw.gatewayUrl}/internal/files/upload`, {
302
+ method: "POST",
303
+ headers: {
304
+ Authorization: `Bearer ${gw.workerToken}`,
305
+ "X-Channel-Id": gw.channelId,
306
+ "X-Conversation-Id": gw.conversationId,
307
+ ...fdHeaders,
308
+ "Content-Length": formDataBuffer.length.toString(),
309
+ ...extraHeaders,
310
+ },
311
+ body: formDataBuffer,
312
+ });
313
+ if (!uploadResponse.ok) {
314
+ const uploadError = await uploadResponse.text();
315
+ return textResult(`Generated content but failed to send: ${uploadError}`);
316
+ }
317
+ return null;
318
+ }
319
+ finally {
320
+ if (tempPath) {
321
+ await fs.unlink(tempPath).catch(() => undefined);
322
+ }
323
+ }
324
+ }
325
+ // ============================================================================
326
+ // GenerateImage
327
+ // ============================================================================
328
+ function imageExtFromMime(mimeType) {
329
+ if (mimeType.includes("jpeg"))
330
+ return "jpg";
331
+ if (mimeType.includes("webp"))
332
+ return "webp";
333
+ return "png";
334
+ }
335
+ async function generateImage(gw, args) {
336
+ return withErrorHandling("GenerateImage", async () => {
337
+ logger.info(`GenerateImage: ${args.prompt.substring(0, 80)}...`);
338
+ const capResponse = await fetch(`${gw.gatewayUrl}/internal/images/capabilities`, {
339
+ headers: { Authorization: `Bearer ${gw.workerToken}` },
340
+ });
341
+ if (capResponse.ok) {
342
+ const capabilities = (await capResponse.json());
343
+ if (!capabilities.available) {
344
+ const providerList = capabilities.providers?.map((p) => p.name).join(", ") || "OpenAI";
345
+ return textResult(`Image generation is not configured. Supported providers: ${providerList}.\n\nAsk an admin to connect one of these providers for the base agent.`);
346
+ }
347
+ }
348
+ const response = await fetch(`${gw.gatewayUrl}/internal/images/generate`, {
349
+ method: "POST",
350
+ headers: {
351
+ Authorization: `Bearer ${gw.workerToken}`,
352
+ "Content-Type": "application/json",
353
+ },
354
+ body: JSON.stringify({
355
+ prompt: args.prompt,
356
+ size: args.size,
357
+ quality: args.quality,
358
+ background: args.background,
359
+ format: args.format,
360
+ }),
361
+ });
362
+ if (!response.ok) {
363
+ const errorData = (await parseErrorBody(response));
364
+ const errorMessage = errorData.error || "Unknown error";
365
+ const lowerError = errorMessage.toLowerCase();
366
+ const missingImagePermission = lowerError.includes("missing scopes") ||
367
+ lowerError.includes("missing_scope") ||
368
+ (lowerError.includes("scope") &&
369
+ (lowerError.includes("image") ||
370
+ lowerError.includes("model.request")));
371
+ if (errorData.availableProviders?.length) {
372
+ return textResult(`Image generation failed: ${errorMessage}.\n\nAsk an admin to connect one of the supported providers for the base agent.`);
373
+ }
374
+ if (missingImagePermission) {
375
+ return textResult(`Image generation failed because the current credential lacks required image permissions.\n\nAsk an admin to connect a provider with image generation access for the base agent.`);
376
+ }
377
+ return textResult(`Error generating image: ${errorMessage}`);
378
+ }
379
+ const imageBuffer = await response.arrayBuffer();
380
+ const mimeType = response.headers.get("Content-Type") || "image/png";
381
+ const provider = response.headers.get("X-Image-Provider") || "unknown";
382
+ const ext = imageExtFromMime(mimeType);
383
+ const uploadError = await uploadGeneratedFile(gw, imageBuffer, `generated_image.${ext}`, mimeType);
384
+ if (uploadError)
385
+ return uploadError;
386
+ logger.info(`Image generated and sent using ${provider}`);
387
+ return textResult(`Image sent successfully (generated with ${provider}).`);
388
+ });
389
+ }
390
+ // ============================================================================
391
+ // GenerateAudio
392
+ // ============================================================================
393
+ function audioExtFromMime(mimeType) {
394
+ if (mimeType.includes("opus"))
395
+ return "opus";
396
+ if (mimeType.includes("ogg"))
397
+ return "ogg";
398
+ return "mp3";
399
+ }
400
+ async function generateAudio(gw, args) {
401
+ return withErrorHandling("GenerateAudio", async () => {
402
+ logger.info(`GenerateAudio: ${args.text.substring(0, 50)}...`);
403
+ const suggestions = await (0, audio_provider_suggestions_1.fetchAudioProviderSuggestions)({
404
+ gatewayUrl: gw.gatewayUrl,
405
+ workerToken: gw.workerToken,
406
+ });
407
+ const providerList = suggestions.providerDisplayList || "an audio-capable provider";
408
+ if (suggestions.available === false) {
409
+ return textResult(`Audio generation is not configured. To enable it, ask an admin to connect one of the available providers for the base agent: ${providerList}.`);
410
+ }
411
+ const response = await fetch(`${gw.gatewayUrl}/internal/audio/synthesize`, {
412
+ method: "POST",
413
+ headers: {
414
+ Authorization: `Bearer ${gw.workerToken}`,
415
+ "Content-Type": "application/json",
416
+ },
417
+ body: JSON.stringify({
418
+ text: args.text,
419
+ voice: args.voice,
420
+ speed: args.speed,
421
+ }),
422
+ });
423
+ if (!response.ok) {
424
+ const errorData = (await parseErrorBody(response));
425
+ const errorMessage = errorData.error || "Unknown error";
426
+ const lowerError = errorMessage.toLowerCase();
427
+ const missingOpenAiAudioScope = (lowerError.includes("missing scopes") ||
428
+ lowerError.includes("missing_scope")) &&
429
+ lowerError.includes("api.model.audio.request");
430
+ if (errorData.availableProviders?.length) {
431
+ return textResult(`Audio generation failed: ${errorMessage}. No provider configured.\n\nAsk an admin to connect an audio provider for the base agent.`);
432
+ }
433
+ if (missingOpenAiAudioScope) {
434
+ return textResult(`Audio generation failed because the current OpenAI token lacks api.model.audio.request.\n\nAsk an admin to connect a provider with audio permission for the base agent, or to connect an alternative audio provider (${providerList}).`);
435
+ }
436
+ return textResult(`Error generating audio: ${errorMessage}`);
437
+ }
438
+ const audioBuffer = await response.arrayBuffer();
439
+ const mimeType = response.headers.get("Content-Type") || "audio/mpeg";
440
+ const provider = response.headers.get("X-Audio-Provider") || "unknown";
441
+ const ext = audioExtFromMime(mimeType);
442
+ const uploadError = await uploadGeneratedFile(gw, audioBuffer, `voice_response.${ext}`, mimeType, { "X-Voice-Message": "true" });
443
+ if (uploadError)
444
+ return uploadError;
445
+ logger.info(`Audio generated and sent using ${provider}`);
446
+ return textResult(`Voice message sent successfully (generated with ${provider}).`);
447
+ });
448
+ }
449
+ // ============================================================================
450
+ // GetChannelHistory
451
+ // ============================================================================
452
+ async function getChannelHistory(gw, args) {
453
+ return withErrorHandling("GetChannelHistory", async () => {
454
+ const limit = Math.min(Math.max(args.limit || 50, 1), 100);
455
+ const platform = gw.platform || "slack";
456
+ logger.info(`GetChannelHistory: limit=${limit}, before=${args.before || "none"}`);
457
+ const params = new URLSearchParams({
458
+ platform,
459
+ channelId: gw.channelId,
460
+ conversationId: gw.conversationId,
461
+ limit: String(limit),
462
+ });
463
+ if (args.before) {
464
+ params.set("before", args.before);
465
+ }
466
+ const { data, error } = await gatewayFetch(gw, `/internal/history?${params}`, {}, "Failed to fetch channel history");
467
+ if (error)
468
+ return error;
469
+ const history = data;
470
+ if (history.note) {
471
+ return textResult(history.note);
472
+ }
473
+ if (history.messages.length === 0) {
474
+ return textResult("No messages found in channel history.");
475
+ }
476
+ const formatted = history.messages
477
+ .map((msg) => {
478
+ const time = new Date(msg.timestamp).toLocaleString();
479
+ const sender = msg.isBot ? `[Bot] ${msg.user}` : msg.user;
480
+ return `[${time}] ${sender}: ${msg.text}`;
481
+ })
482
+ .join("\n\n");
483
+ let result = `Found ${history.messages.length} messages:\n\n${formatted}`;
484
+ if (history.hasMore && history.nextCursor) {
485
+ result += `\n\n---\nMore messages available. Use before="${history.nextCursor}" to fetch older messages.`;
486
+ }
487
+ return textResult(result);
488
+ });
489
+ }
490
+ // ============================================================================
491
+ // MCP Tools (route to MCP proxy /mcp/{mcpId}/tools/{toolName})
492
+ // ============================================================================
493
+ async function callMcpTool(gw, mcpId, toolName, args) {
494
+ return withErrorHandling(`${mcpId}/${toolName}`, async () => {
495
+ const response = await fetch(`${gw.gatewayUrl}/mcp/${mcpId}/tools/${toolName}`, {
496
+ method: "POST",
497
+ headers: {
498
+ Authorization: `Bearer ${gw.workerToken}`,
499
+ "Content-Type": "application/json",
500
+ },
501
+ body: JSON.stringify(args),
502
+ });
503
+ const data = (await response.json());
504
+ if (!response.ok || data.isError) {
505
+ const contentText = data.content
506
+ ?.filter((c) => c.type === "text")
507
+ .map((c) => c.text)
508
+ .join("\n");
509
+ const errorMsg = data.error || contentText || `${toolName} failed (${response.status})`;
510
+ return textResult(`Error: ${errorMsg}`);
511
+ }
512
+ const text = data.content
513
+ ?.filter((c) => c.type === "text")
514
+ .map((c) => c.text)
515
+ .join("\n");
516
+ return textResult(text || `${toolName} completed.`);
517
+ });
518
+ }
519
+ //# sourceMappingURL=tool-implementations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-implementations.js","sourceRoot":"","sources":["../../src/shared/tool-implementations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoJA,wCAqEC;AAMD,0CA0BC;AAMD,4CAuDC;AAMD,wCA2BC;AAMD,sCA6CC;AAoED,sCA8FC;AAYD,sCA+EC;AAMD,8CAmEC;AAMD,kCAyCC;AA/vBD,gDAAkC;AAClC,qDAAuC;AACvC,gDAAkC;AAClC,qCAA0C;AAC1C,0DAAiC;AACjC,6EAA6E;AAE7E,MAAM,MAAM,GAAG,IAAA,mBAAY,EAAC,cAAc,CAAC,CAAC;AAQ5C,SAAS,UAAU,CAAC,IAAY;IAC9B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I,CAAC;iBAClB,IAAI,CAAC,IAAI,CAAC,CAAC;YACd,MAAM,QAAQ,GACZ,IAAI,CAAC,KAAK,IAAI,WAAW,IAAI,GAAG,QAAQ,YAAY,QAAQ,CAAC,MAAM,GAAG,CAAC;YACzE,OAAO,UAAU,CAAC,UAAU,QAAQ,EAAE,CAAC,CAAC;QAC1C,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO;YACvB,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC;aACjC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;aAClB,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,OAAO,UAAU,CAAC,IAAI,IAAI,GAAG,QAAQ,aAAa,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@lobu/worker",
3
+ "version": "2.8.0",
4
+ "description": "Lobu worker runtime - run in your own Docker image or use our base image",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "lobu-worker": "./dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "dev": "tsc --watch",
13
+ "start": "node dist/index.js",
14
+ "test": "bun test",
15
+ "typecheck": "tsc --noEmit",
16
+ "prepublishOnly": "bun run build"
17
+ },
18
+ "keywords": [
19
+ "lobu",
20
+ "worker",
21
+ "ai",
22
+ "agent"
23
+ ],
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/lobu-ai/lobu.git",
27
+ "directory": "packages/worker"
28
+ },
29
+ "license": "Apache-2.0",
30
+ "engines": {
31
+ "node": ">=18.0.0"
32
+ },
33
+ "peerDependencies": {
34
+ "bun": ">=1.0.0"
35
+ },
36
+ "dependencies": {
37
+ "@hono/node-server": "^1.19.9",
38
+ "@lobu/core": "2.8.0",
39
+ "@lobu/owletto-openclaw": "^3.0.2",
40
+ "@mariozechner/pi-agent-core": "^0.51.6",
41
+ "@mariozechner/pi-ai": "^0.51.6",
42
+ "@mariozechner/pi-coding-agent": "^0.51.6",
43
+ "@sentry/node": "^10.6.0",
44
+ "@sinclair/typebox": "^0.34.33",
45
+ "form-data": "^4.0.4",
46
+ "hono": "^4.11.7",
47
+ "just-bash": "^2.12.8",
48
+ "owletto": "^1.4.0",
49
+ "zod": "^3.24.1"
50
+ },
51
+ "devDependencies": {
52
+ "@types/node": "^20.0.0",
53
+ "typescript": "^5.8.3"
54
+ }
55
+ }