@questionbase/deskfree 0.1.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.
- package/README.md +129 -0
- package/dist/channel.d.ts +3 -0
- package/dist/channel.d.ts.map +1 -0
- package/dist/channel.js +503 -0
- package/dist/channel.js.map +1 -0
- package/dist/client.d.ts +148 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +255 -0
- package/dist/client.js.map +1 -0
- package/dist/deliver.d.ts +22 -0
- package/dist/deliver.d.ts.map +1 -0
- package/dist/deliver.js +350 -0
- package/dist/deliver.js.map +1 -0
- package/dist/gateway.d.ts +13 -0
- package/dist/gateway.d.ts.map +1 -0
- package/dist/gateway.js +687 -0
- package/dist/gateway.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/llm-definitions.d.ts +116 -0
- package/dist/llm-definitions.d.ts.map +1 -0
- package/dist/llm-definitions.js +148 -0
- package/dist/llm-definitions.js.map +1 -0
- package/dist/offline-queue.d.ts +45 -0
- package/dist/offline-queue.d.ts.map +1 -0
- package/dist/offline-queue.js +109 -0
- package/dist/offline-queue.js.map +1 -0
- package/dist/paths.d.ts +10 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +29 -0
- package/dist/paths.js.map +1 -0
- package/dist/runtime.d.ts +17 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +24 -0
- package/dist/runtime.js.map +1 -0
- package/dist/tools.d.ts +35 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +527 -0
- package/dist/tools.js.map +1 -0
- package/dist/types.d.ts +389 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/workspace.d.ts +18 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +83 -0
- package/dist/workspace.js.map +1 -0
- package/openclaw.plugin.json +8 -0
- package/package.json +63 -0
- package/skills/deskfree/SKILL.md +271 -0
package/dist/deliver.js
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
import { getActiveTaskId } from './gateway';
|
|
2
|
+
import { resolvePluginStorePath } from './paths';
|
|
3
|
+
import { getDeskFreeRuntime } from './runtime';
|
|
4
|
+
import { randomUUID } from 'node:crypto';
|
|
5
|
+
import { createWriteStream } from 'node:fs';
|
|
6
|
+
import { mkdir, unlink } from 'node:fs/promises';
|
|
7
|
+
import { dirname, extname } from 'node:path';
|
|
8
|
+
import { Readable } from 'node:stream';
|
|
9
|
+
import { pipeline } from 'node:stream/promises';
|
|
10
|
+
import { createTypingCallbacks, logTypingFailure } from 'openclaw/plugin-sdk';
|
|
11
|
+
// Maximum file size for attachments (10MB)
|
|
12
|
+
const MAX_ATTACHMENT_SIZE = 10 * 1024 * 1024;
|
|
13
|
+
// Download timeout (30 seconds)
|
|
14
|
+
const DOWNLOAD_TIMEOUT_MS = 30 * 1000;
|
|
15
|
+
// Rate limiting: maximum attachments per message
|
|
16
|
+
const MAX_ATTACHMENTS_PER_MESSAGE = 10;
|
|
17
|
+
// Rate limiting: maximum total download size per message (50MB)
|
|
18
|
+
const MAX_TOTAL_DOWNLOAD_SIZE = 50 * 1024 * 1024;
|
|
19
|
+
// Allowed content types for security
|
|
20
|
+
const ALLOWED_CONTENT_TYPES = [
|
|
21
|
+
'image/',
|
|
22
|
+
'video/',
|
|
23
|
+
'audio/',
|
|
24
|
+
'application/pdf',
|
|
25
|
+
'text/',
|
|
26
|
+
'application/json',
|
|
27
|
+
'application/xml',
|
|
28
|
+
'application/zip',
|
|
29
|
+
'application/x-zip-compressed',
|
|
30
|
+
'application/gzip',
|
|
31
|
+
'application/msword',
|
|
32
|
+
'application/vnd.openxmlformats-officedocument',
|
|
33
|
+
'application/vnd.ms-excel',
|
|
34
|
+
'application/vnd.ms-powerpoint',
|
|
35
|
+
];
|
|
36
|
+
/**
|
|
37
|
+
* Validates if a content type is safe to download.
|
|
38
|
+
*/
|
|
39
|
+
export function isContentTypeAllowed(contentType) {
|
|
40
|
+
const normalized = contentType.toLowerCase().trim();
|
|
41
|
+
return ALLOWED_CONTENT_TYPES.some((allowed) => normalized.startsWith(allowed));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Sanitizes a filename to prevent directory traversal and other security issues.
|
|
45
|
+
*/
|
|
46
|
+
export function sanitizeFileName(fileName) {
|
|
47
|
+
return fileName
|
|
48
|
+
.replace(/[^a-zA-Z0-9._-]/g, '_') // Replace unsafe chars with underscore
|
|
49
|
+
.replace(/\.+/g, '.') // Replace multiple dots with single dot
|
|
50
|
+
.replace(/^\./, '_') // Replace leading dot
|
|
51
|
+
.substring(0, 100); // Limit length
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Validates a URL to ensure it's a proper HTTPS URL.
|
|
55
|
+
*/
|
|
56
|
+
export function validateDownloadUrl(url) {
|
|
57
|
+
try {
|
|
58
|
+
const parsed = new URL(url);
|
|
59
|
+
if (parsed.protocol !== 'https:') {
|
|
60
|
+
throw new Error('Only HTTPS URLs are allowed');
|
|
61
|
+
}
|
|
62
|
+
// Block localhost and private IP ranges
|
|
63
|
+
const hostname = parsed.hostname.toLowerCase();
|
|
64
|
+
// Strip IPv6 brackets for comparison (URL parser wraps IPv6 in brackets)
|
|
65
|
+
const bareHostname = hostname.replace(/^\[|\]$/g, '');
|
|
66
|
+
if (bareHostname === 'localhost' ||
|
|
67
|
+
bareHostname === '127.0.0.1' ||
|
|
68
|
+
bareHostname === '::1') {
|
|
69
|
+
throw new Error('Local URLs are not allowed');
|
|
70
|
+
}
|
|
71
|
+
// Block private IP ranges (RFC 1918 and others)
|
|
72
|
+
const ipv4Patterns = [
|
|
73
|
+
/^10\./, // 10.0.0.0/8
|
|
74
|
+
/^192\.168\./, // 192.168.0.0/16
|
|
75
|
+
/^172\.(1[6-9]|2[0-9]|3[0-1])\./, // 172.16.0.0/12
|
|
76
|
+
/^169\.254\./, // Link-local 169.254.0.0/16
|
|
77
|
+
/^0\./, // Current network
|
|
78
|
+
/^127\./, // Loopback
|
|
79
|
+
];
|
|
80
|
+
for (const pattern of ipv4Patterns) {
|
|
81
|
+
if (pattern.test(hostname)) {
|
|
82
|
+
throw new Error('Private IP addresses are not allowed');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// Validate URL length to prevent DoS
|
|
86
|
+
if (url.length > 2048) {
|
|
87
|
+
throw new Error('URL too long (max 2048 characters)');
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
throw new Error(`Invalid URL: ${error instanceof Error ? error.message : String(error)}`);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Downloads a file from a signed S3 URL and saves it to the plugin store.
|
|
96
|
+
* Includes security validations and error handling.
|
|
97
|
+
*/
|
|
98
|
+
async function fetchAndSaveMedia(attachment) {
|
|
99
|
+
// Validate input
|
|
100
|
+
if (!attachment.url) {
|
|
101
|
+
throw new Error('Attachment URL is required');
|
|
102
|
+
}
|
|
103
|
+
if (!attachment.name) {
|
|
104
|
+
throw new Error('Attachment name is required');
|
|
105
|
+
}
|
|
106
|
+
if (!attachment.contentType) {
|
|
107
|
+
throw new Error('Attachment content type is required');
|
|
108
|
+
}
|
|
109
|
+
// Security validations
|
|
110
|
+
validateDownloadUrl(attachment.url);
|
|
111
|
+
if (!isContentTypeAllowed(attachment.contentType)) {
|
|
112
|
+
throw new Error(`Content type not allowed: ${attachment.contentType}`);
|
|
113
|
+
}
|
|
114
|
+
if (attachment.size > MAX_ATTACHMENT_SIZE) {
|
|
115
|
+
throw new Error(`File too large: ${attachment.size} bytes (max: ${MAX_ATTACHMENT_SIZE})`);
|
|
116
|
+
}
|
|
117
|
+
// Generate safe file path with additional security checks
|
|
118
|
+
const sanitizedName = sanitizeFileName(attachment.name);
|
|
119
|
+
// Additional validation - ensure no path traversal attempts
|
|
120
|
+
if (sanitizedName.includes('..') ||
|
|
121
|
+
sanitizedName.includes('/') ||
|
|
122
|
+
sanitizedName.includes('\\')) {
|
|
123
|
+
throw new Error('Invalid filename: contains path traversal characters');
|
|
124
|
+
}
|
|
125
|
+
// Only append extension if the sanitized name doesn't already have one
|
|
126
|
+
const hasExt = extname(sanitizedName).length > 0;
|
|
127
|
+
const fileName = hasExt
|
|
128
|
+
? `${randomUUID()}_${sanitizedName}`
|
|
129
|
+
: `${randomUUID()}_${sanitizedName}${extname(attachment.name) || '.bin'}`;
|
|
130
|
+
// Final validation of complete filename
|
|
131
|
+
if (fileName.length > 255) {
|
|
132
|
+
throw new Error('Generated filename too long (max 255 characters)');
|
|
133
|
+
}
|
|
134
|
+
const filePath = resolvePluginStorePath(`media/inbound/${fileName}`);
|
|
135
|
+
// Ensure directory exists
|
|
136
|
+
await mkdir(dirname(filePath), { recursive: true });
|
|
137
|
+
// Download with timeout and validations
|
|
138
|
+
const controller = new AbortController();
|
|
139
|
+
const timeoutId = setTimeout(() => controller.abort(), DOWNLOAD_TIMEOUT_MS);
|
|
140
|
+
let fileStream = null;
|
|
141
|
+
try {
|
|
142
|
+
const response = await fetch(attachment.url, {
|
|
143
|
+
signal: controller.signal,
|
|
144
|
+
headers: {
|
|
145
|
+
'User-Agent': 'DeskFree-OpenClaw/1.0',
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
if (!response.ok) {
|
|
149
|
+
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
150
|
+
}
|
|
151
|
+
if (!response.body) {
|
|
152
|
+
throw new Error('Empty response body');
|
|
153
|
+
}
|
|
154
|
+
// Validate content type from response
|
|
155
|
+
const responseContentType = response.headers.get('content-type');
|
|
156
|
+
if (responseContentType && !isContentTypeAllowed(responseContentType)) {
|
|
157
|
+
throw new Error(`Response content type not allowed: ${responseContentType}`);
|
|
158
|
+
}
|
|
159
|
+
// Validate content length if provided
|
|
160
|
+
const contentLength = response.headers.get('content-length');
|
|
161
|
+
if (contentLength) {
|
|
162
|
+
const size = parseInt(contentLength, 10);
|
|
163
|
+
if (size > MAX_ATTACHMENT_SIZE) {
|
|
164
|
+
throw new Error(`Content too large: ${size} bytes (max: ${MAX_ATTACHMENT_SIZE})`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
// Stream the response body to disk with size tracking
|
|
168
|
+
const nodeStream = Readable.fromWeb(response.body);
|
|
169
|
+
fileStream = createWriteStream(filePath);
|
|
170
|
+
let bytesWritten = 0;
|
|
171
|
+
let sizeExceeded = false;
|
|
172
|
+
nodeStream.on('data', (chunk) => {
|
|
173
|
+
bytesWritten += chunk.length;
|
|
174
|
+
if (bytesWritten > MAX_ATTACHMENT_SIZE && !sizeExceeded) {
|
|
175
|
+
sizeExceeded = true;
|
|
176
|
+
nodeStream.destroy(new Error('File size limit exceeded during download'));
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
// Handle stream errors properly
|
|
180
|
+
nodeStream.on('error', () => {
|
|
181
|
+
if (fileStream && !fileStream.destroyed) {
|
|
182
|
+
fileStream.destroy();
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
fileStream.on('error', () => {
|
|
186
|
+
if (!nodeStream.destroyed) {
|
|
187
|
+
nodeStream.destroy();
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
await pipeline(nodeStream, fileStream);
|
|
191
|
+
return {
|
|
192
|
+
path: filePath,
|
|
193
|
+
contentType: responseContentType || attachment.contentType,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
catch (error) {
|
|
197
|
+
// Ensure streams are properly closed
|
|
198
|
+
if (fileStream && !fileStream.destroyed) {
|
|
199
|
+
fileStream.destroy();
|
|
200
|
+
fileStream = null;
|
|
201
|
+
}
|
|
202
|
+
// Clean up partial file if download failed
|
|
203
|
+
try {
|
|
204
|
+
await unlink(filePath);
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
// Ignore cleanup errors - file might not have been created
|
|
208
|
+
}
|
|
209
|
+
if (controller.signal.aborted) {
|
|
210
|
+
throw new Error(`Download timeout after ${DOWNLOAD_TIMEOUT_MS}ms`);
|
|
211
|
+
}
|
|
212
|
+
throw new Error(`Failed to download attachment: ${error instanceof Error ? error.message : String(error)}`);
|
|
213
|
+
}
|
|
214
|
+
finally {
|
|
215
|
+
clearTimeout(timeoutId);
|
|
216
|
+
// Final cleanup - ensure file stream is closed
|
|
217
|
+
if (fileStream && !fileStream.destroyed) {
|
|
218
|
+
fileStream.destroy();
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Delivers a DeskFree chat message to the OpenClaw agent pipeline.
|
|
224
|
+
*
|
|
225
|
+
* Each message produces a single inbound message.
|
|
226
|
+
* If the message has a taskId, it's set as ThreadId for conversation threading.
|
|
227
|
+
*/
|
|
228
|
+
export async function deliverMessageToAgent(ctx, message, client) {
|
|
229
|
+
const runtime = getDeskFreeRuntime();
|
|
230
|
+
const log = ctx.log ?? runtime.logging.createLogger('deskfree:deliver');
|
|
231
|
+
const peerId = message.humanId.trim().toLowerCase();
|
|
232
|
+
log.info(`Delivering message ${message.messageId} from ${message.userName ?? message.humanId}` +
|
|
233
|
+
(message.taskId ? ` (task: ${message.taskId})` : '') +
|
|
234
|
+
`: "${message.content.slice(0, 80)}${message.content.length > 80 ? '…' : ''}"`);
|
|
235
|
+
// Download attachments if present
|
|
236
|
+
const attachments = message.attachments ?? [];
|
|
237
|
+
// Validate attachment count
|
|
238
|
+
if (attachments.length > MAX_ATTACHMENTS_PER_MESSAGE) {
|
|
239
|
+
log.warn(`Message has ${attachments.length} attachments, limiting to ${MAX_ATTACHMENTS_PER_MESSAGE}`);
|
|
240
|
+
}
|
|
241
|
+
// Calculate total attachment size for rate limiting
|
|
242
|
+
const totalSize = attachments
|
|
243
|
+
.slice(0, MAX_ATTACHMENTS_PER_MESSAGE)
|
|
244
|
+
.reduce((sum, att) => sum + (att.size || 0), 0);
|
|
245
|
+
if (totalSize > MAX_TOTAL_DOWNLOAD_SIZE) {
|
|
246
|
+
log.warn(`Total attachment size ${totalSize} bytes exceeds limit ${MAX_TOTAL_DOWNLOAD_SIZE} bytes`);
|
|
247
|
+
// Don't fail the entire message, just log the warning
|
|
248
|
+
}
|
|
249
|
+
const mediaPaths = [];
|
|
250
|
+
const mediaTypes = [];
|
|
251
|
+
const mediaUrls = [];
|
|
252
|
+
for (const [index, attachment] of attachments
|
|
253
|
+
.slice(0, MAX_ATTACHMENTS_PER_MESSAGE)
|
|
254
|
+
.entries()) {
|
|
255
|
+
if (!attachment.url) {
|
|
256
|
+
log.warn(`Skipping attachment ${index}: no URL provided`);
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
try {
|
|
260
|
+
const saved = await fetchAndSaveMedia(attachment);
|
|
261
|
+
mediaPaths.push(saved.path);
|
|
262
|
+
mediaTypes.push(saved.contentType);
|
|
263
|
+
mediaUrls.push(saved.path);
|
|
264
|
+
log.info(`Downloaded attachment ${index}: ${attachment.name} (${saved.contentType})`);
|
|
265
|
+
}
|
|
266
|
+
catch (error) {
|
|
267
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
268
|
+
log.warn(`Failed to download attachment ${index} (${attachment.name}): ${errorMsg}`);
|
|
269
|
+
// Non-fatal — continue processing other attachments and the message
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
const msgCtx = runtime.channel.reply.finalizeInboundContext({
|
|
273
|
+
Body: message.content,
|
|
274
|
+
RawBody: message.content,
|
|
275
|
+
ChatType: 'dm',
|
|
276
|
+
Provider: 'deskfree',
|
|
277
|
+
Surface: 'deskfree',
|
|
278
|
+
Channel: 'deskfree',
|
|
279
|
+
From: message.humanId,
|
|
280
|
+
To: message.humanId,
|
|
281
|
+
MessageSid: message.messageId,
|
|
282
|
+
ThreadId: message.taskId ?? undefined,
|
|
283
|
+
Timestamp: message.createdAt,
|
|
284
|
+
AccountId: ctx.accountId,
|
|
285
|
+
FromName: message.userName ?? 'Unknown',
|
|
286
|
+
SessionKey: `agent:main:deskfree:dm:${peerId}`,
|
|
287
|
+
// Backward-compatible: first attachment
|
|
288
|
+
MediaPath: mediaPaths[0],
|
|
289
|
+
MediaType: mediaTypes[0],
|
|
290
|
+
MediaUrl: mediaUrls[0],
|
|
291
|
+
// Array keys for multiple attachments
|
|
292
|
+
MediaPaths: mediaPaths,
|
|
293
|
+
MediaTypes: mediaTypes,
|
|
294
|
+
MediaUrls: mediaUrls,
|
|
295
|
+
MediaCount: mediaPaths.length,
|
|
296
|
+
});
|
|
297
|
+
try {
|
|
298
|
+
const cfg = runtime.config.loadConfig();
|
|
299
|
+
const typingCallbacks = createTypingCallbacks({
|
|
300
|
+
start: async () => {
|
|
301
|
+
await client.typing({ taskId: message.taskId ?? undefined });
|
|
302
|
+
},
|
|
303
|
+
onStartError: (err) => {
|
|
304
|
+
logTypingFailure({
|
|
305
|
+
log: (m) => log.warn(m),
|
|
306
|
+
channel: 'deskfree',
|
|
307
|
+
action: 'start',
|
|
308
|
+
error: err,
|
|
309
|
+
});
|
|
310
|
+
},
|
|
311
|
+
});
|
|
312
|
+
const { dispatcher, replyOptions } = runtime.channel.reply.createReplyDispatcherWithTyping({
|
|
313
|
+
channel: 'deskfree',
|
|
314
|
+
accountId: ctx.accountId,
|
|
315
|
+
onReplyStart: typingCallbacks.onReplyStart,
|
|
316
|
+
onIdle: typingCallbacks.onIdle,
|
|
317
|
+
deliver: async (payload) => {
|
|
318
|
+
const text = typeof payload === 'string'
|
|
319
|
+
? payload
|
|
320
|
+
: (payload.text ?? payload.body ?? '');
|
|
321
|
+
if (text) {
|
|
322
|
+
// Use the message's own taskId if present, otherwise
|
|
323
|
+
// fall back to the active task for auto-threading
|
|
324
|
+
const taskId = message.taskId ?? getActiveTaskId() ?? undefined;
|
|
325
|
+
log.info(`Sending reply to DeskFree (task: ${taskId ?? 'none'}): "${text.slice(0, 80)}..."`);
|
|
326
|
+
await client.sendMessage({
|
|
327
|
+
content: text,
|
|
328
|
+
taskId,
|
|
329
|
+
});
|
|
330
|
+
log.info('Reply sent successfully.');
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
log.warn('Deliver callback called with empty text, skipping.');
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
});
|
|
337
|
+
await runtime.channel.reply.dispatchReplyFromConfig({
|
|
338
|
+
ctx: msgCtx,
|
|
339
|
+
cfg,
|
|
340
|
+
dispatcher,
|
|
341
|
+
replyOptions,
|
|
342
|
+
});
|
|
343
|
+
log.info(`Message ${message.messageId} dispatched successfully.`);
|
|
344
|
+
}
|
|
345
|
+
catch (err) {
|
|
346
|
+
const errMsg = err instanceof Error ? err.message : String(err);
|
|
347
|
+
log.warn(`Failed to dispatch message ${message.messageId}: ${errMsg}`);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
//# sourceMappingURL=deliver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deliver.js","sourceRoot":"","sources":["../src/deliver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAO/C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE9E,2CAA2C;AAC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AK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChE,GAAG,CAAC,IAAI,CAAC,8BAA8B,OAAO,CAAC,SAAS,KAAK,MAAM,EAAE,CAAC,CAAC;IACzE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ChannelGatewayContext } from './types';
|
|
2
|
+
export declare function setActiveTaskId(taskId: string | null): void;
|
|
3
|
+
export declare function getActiveTaskId(): string | null;
|
|
4
|
+
/**
|
|
5
|
+
* Main entry point for the DeskFree channel gateway.
|
|
6
|
+
* Called by OpenClaw's channel manager via gateway.startAccount().
|
|
7
|
+
*
|
|
8
|
+
* Maintains a WebSocket connection for real-time notifications
|
|
9
|
+
* and polls the messages endpoint for actual data.
|
|
10
|
+
* Falls back to interval-based polling if WebSocket is unavailable.
|
|
11
|
+
*/
|
|
12
|
+
export declare function startDeskFreeConnection(ctx: ChannelGatewayContext): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=gateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../src/gateway.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,qBAAqB,EAGtB,MAAM,SAAS,CAAC;AAejB,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAE3D;AAED,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AA6QD;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,qBAAqB,GACzB,OAAO,CAAC,IAAI,CAAC,CA+Ff"}
|