bloby-bot 0.19.1 → 0.19.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bloby-bot",
3
- "version": "0.19.1",
3
+ "version": "0.19.3",
4
4
  "releaseNotes": [
5
5
  "1. react router implemented",
6
6
  "2. new workspace design",
package/shared/paths.ts CHANGED
@@ -12,6 +12,7 @@ export const paths = {
12
12
  config: path.join(DATA_DIR, 'config.json'),
13
13
  db: path.join(DATA_DIR, 'memory.db'),
14
14
  widgetJs: path.join(PKG_DIR, 'supervisor', 'widget.js'),
15
+ supervisorPublic: path.join(PKG_DIR, 'supervisor', 'public'),
15
16
  cloudflared: path.join(DATA_DIR, 'bin', cfName),
16
17
  files: path.join(WORKSPACE_DIR, 'files'),
17
18
  filesAudio: path.join(WORKSPACE_DIR, 'files', 'audio'),
@@ -357,6 +357,7 @@ export class WhatsAppChannel implements ChannelProvider {
357
357
  // Voice note / audio — download and transcribe
358
358
  if (!this.transcribe) {
359
359
  log.info('[whatsapp] Audio message received but no transcribe function configured — skipping');
360
+ await this.sendMessage(msg.key.remoteJid!, 'Whisper not enabled, click on the 3 dots settings on the Chat of your bloby and provide an OpenAI API key.');
360
361
  continue;
361
362
  }
362
363
  try {
@@ -366,6 +367,7 @@ export class WhatsAppChannel implements ChannelProvider {
366
367
  const transcript = await this.transcribe(base64);
367
368
  if (!transcript) {
368
369
  log.warn('[whatsapp] Transcription returned empty — skipping');
370
+ await this.sendMessage(msg.key.remoteJid!, 'Whisper not enabled, click on the 3 dots settings on the Chat of your bloby and provide an OpenAI API key.');
369
371
  continue;
370
372
  }
371
373
  rawText = transcript;
@@ -22,6 +22,19 @@ import crypto from 'crypto';
22
22
  import { ChannelManager } from './channels/manager.js';
23
23
 
24
24
  const DIST_BLOBY = path.join(PKG_DIR, 'dist-bloby');
25
+ const SUPERVISOR_PUBLIC = path.join(PKG_DIR, 'supervisor', 'public');
26
+
27
+ // Platform assets that must survive workspace swaps — served directly by supervisor
28
+ const PLATFORM_ASSETS = new Set([
29
+ '/spritesheet.webp',
30
+ '/headphones_spritesheet.webp',
31
+ '/bloby-icon-192.png',
32
+ '/bloby-icon-512.png',
33
+ '/bloby-badge.png',
34
+ '/bloby-favicon.png',
35
+ '/bloby_frame1.png',
36
+ '/manifest.json',
37
+ ]);
25
38
 
26
39
  // Ensure dist-bloby exists (postinstall may have failed silently)
27
40
  if (!fs.existsSync(DIST_BLOBY)) {
@@ -49,6 +62,7 @@ const MIME_TYPES: Record<string, string> = {
49
62
  '.mp4': 'video/mp4',
50
63
  '.woff2': 'font/woff2',
51
64
  '.json': 'application/json',
65
+ '.webp': 'image/webp',
52
66
  };
53
67
 
54
68
  // Service worker content — embedded here so it ships with supervisor/ (always updated)
@@ -685,6 +699,22 @@ ${!connected ? '<script>setTimeout(()=>location.reload(),4000)</script>' : ''}
685
699
  return;
686
700
  }
687
701
 
702
+ // Platform assets — served from supervisor/public/ so they survive workspace swaps
703
+ const cleanUrl = (req.url || '').split('?')[0];
704
+ if (PLATFORM_ASSETS.has(cleanUrl)) {
705
+ const assetPath = path.join(SUPERVISOR_PUBLIC, cleanUrl);
706
+ try {
707
+ const stat = fs.statSync(assetPath);
708
+ if (stat.isFile()) {
709
+ const ext = path.extname(assetPath);
710
+ const mime = MIME_TYPES[ext] || 'application/octet-stream';
711
+ res.writeHead(200, { 'Content-Type': mime, 'Cache-Control': 'public, max-age=86400' });
712
+ fs.createReadStream(assetPath).pipe(res);
713
+ return;
714
+ }
715
+ } catch { /* fall through to Vite */ }
716
+ }
717
+
688
718
  // Everything else → proxy to dashboard Vite dev server
689
719
  console.log(`[supervisor] → dashboard Vite :${vitePorts.dashboard} | ${req.method} ${req.url}`);
690
720
  const proxy = http.request(
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "Bloby",
3
+ "short_name": "Bloby",
4
+ "description": "Your AI assistant",
5
+ "start_url": "/",
6
+ "display": "standalone",
7
+ "background_color": "#212121",
8
+ "theme_color": "#212121",
9
+ "icons": [
10
+ {
11
+ "src": "/bloby-icon-192.png",
12
+ "sizes": "192x192",
13
+ "type": "image/png",
14
+ "purpose": "any maskable"
15
+ },
16
+ {
17
+ "src": "/bloby-icon-512.png",
18
+ "sizes": "512x512",
19
+ "type": "image/png",
20
+ "purpose": "any maskable"
21
+ }
22
+ ]
23
+ }