bloby-bot 0.70.12 → 0.70.13

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 (44) hide show
  1. package/bin/cli.js +11 -3
  2. package/dist-bloby/assets/{bloby-DSNB0g4w.js → bloby-CU9KhQdP.js} +4 -4
  3. package/dist-bloby/assets/globals-DlPtwiZL.css +2 -0
  4. package/dist-bloby/assets/{globals-B3cTbITX.js → globals-mGpojCOe.js} +1 -1
  5. package/dist-bloby/assets/{highlighted-body-OFNGDK62-BLforpkr.js → highlighted-body-OFNGDK62-D0Tm_wgU.js} +1 -1
  6. package/dist-bloby/assets/mermaid-GHXKKRXX-B95J3s3s.js +1 -0
  7. package/dist-bloby/assets/{onboard-Dn2Ws_G2.js → onboard-GfjHF9nm.js} +1 -1
  8. package/dist-bloby/bloby.html +3 -3
  9. package/dist-bloby/onboard.html +3 -3
  10. package/package.json +2 -2
  11. package/scripts/install +15 -7
  12. package/scripts/install.ps1 +35 -14
  13. package/scripts/install.sh +15 -7
  14. package/shared/relay.ts +3 -1
  15. package/supervisor/channels/manager.ts +16 -11
  16. package/supervisor/chat/OnboardWizard.tsx +0 -15
  17. package/supervisor/harnesses/pi/index.ts +320 -100
  18. package/supervisor/harnesses/pi/providers/humanize-error.ts +2 -2
  19. package/supervisor/harnesses/pi/providers/retry.ts +31 -0
  20. package/supervisor/harnesses/pi/providers/stream-anthropic.ts +23 -3
  21. package/supervisor/harnesses/pi/providers/stream-google.ts +21 -3
  22. package/supervisor/harnesses/pi/providers/stream-openai-completions.ts +17 -3
  23. package/supervisor/harnesses/pi/providers/types.ts +11 -0
  24. package/supervisor/harnesses/pi/session.ts +116 -3
  25. package/supervisor/harnesses/pi/test-completion.ts +56 -0
  26. package/supervisor/harnesses/pi/tools/bash.ts +198 -22
  27. package/supervisor/harnesses/pi/tools/glob.ts +79 -0
  28. package/supervisor/harnesses/pi/tools/grep.ts +0 -0
  29. package/supervisor/harnesses/pi/tools/registry.ts +18 -6
  30. package/supervisor/harnesses/pi/tools/todo-write.ts +45 -0
  31. package/supervisor/harnesses/pi/tools/web-fetch.ts +129 -0
  32. package/supervisor/index.ts +36 -2
  33. package/worker/index.ts +18 -1
  34. package/worker/prompts/bloby-system-prompt-codex.txt +1 -1
  35. package/worker/prompts/bloby-system-prompt-pi.txt +6 -24
  36. package/worker/prompts/bloby-system-prompt.txt +1 -1
  37. package/workspace/client/src/components/Dashboard/DashboardPage.tsx +4 -117
  38. package/workspace/client/src/components/Dashboard/deleteme_placeholders.tsx +194 -0
  39. package/workspace/client/src/components/Layout/Sidebar.tsx +52 -30
  40. package/workspace/client/src/components/deleteme_onboarding/WorkspaceTour.tsx +25 -15
  41. package/workspace/client/src/components/deleteme_onboarding/tour-theme.css +24 -0
  42. package/workspace/skills/mac/SKILL.md +13 -4
  43. package/dist-bloby/assets/globals-DyeW509Y.css +0 -2
  44. package/dist-bloby/assets/mermaid-GHXKKRXX-C1H_fSCU.js +0 -1
@@ -29,6 +29,8 @@ $G5 = "`e[38;2;1;116;252m"
29
29
  $G6 = "`e[38;2;1;102;251m"
30
30
  $G7 = "`e[38;2;1;88;251m"
31
31
  $BOLD = "`e[1m"
32
+ $DIM = "`e[2m"
33
+ $YELLOW = "`e[33m"
32
34
  $RSET = "`e[0m"
33
35
 
34
36
  # Use ANSI sequences for consistent rendering; fallback to plain if no VT support
@@ -336,31 +338,50 @@ Setup-Path
336
338
 
337
339
  Write-Host ""
338
340
  if ($vtSupported) {
339
- Write-Host " ${PINK}${BOLD}✔ Bloby is ready!${RSET}"
341
+ Write-Host " ${PINK}${BOLD}✔ Bloby is installed!${RSET}"
340
342
  } else {
341
- Write-Host " ✔ Bloby is ready!" -ForegroundColor Magenta
343
+ Write-Host " ✔ Bloby is installed!" -ForegroundColor Magenta
342
344
  }
343
345
  Write-Host ""
344
- Write-Host " -----------------------------" -ForegroundColor DarkGray
345
- Write-Host " Get started:"
346
+ if ($vtSupported) {
347
+ Write-Host " ${BLUE}${BOLD}╭───────────────────────────────────────────────────────╮${RSET}"
348
+ Write-Host " ${BLUE}${BOLD}│${RSET} ${RSET}${BLUE}${BOLD}│${RSET}"
349
+ Write-Host " ${BLUE}${BOLD}│${RSET}${BOLD} NEXT STEP - type this, then press Enter:${RSET} ${BLUE}${BOLD}│${RSET}"
350
+ Write-Host " ${BLUE}${BOLD}│${RSET} ${RSET}${BLUE}${BOLD}│${RSET}"
351
+ Write-Host " ${BLUE}${BOLD}│${RSET}${BLUE}${BOLD} > bloby init${RSET} ${BLUE}${BOLD}│${RSET}"
352
+ Write-Host " ${BLUE}${BOLD}│${RSET} ${RSET}${BLUE}${BOLD}│${RSET}"
353
+ Write-Host " ${BLUE}${BOLD}│${RSET}${DIM} ─────────────────────────────────────────────────${RSET} ${BLUE}${BOLD}│${RSET}"
354
+ Write-Host " ${BLUE}${BOLD}│${RSET} ${RSET}${BLUE}${BOLD}│${RSET}"
355
+ Write-Host " ${BLUE}${BOLD}│${RSET}${YELLOW}${BOLD} Not working? (`"command not found`")${RSET} ${BLUE}${BOLD}│${RSET}"
356
+ Write-Host " ${BLUE}${BOLD}│${RSET} Just open a NEW terminal window and run${RSET} ${BLUE}${BOLD}│${RSET}"
357
+ Write-Host " ${BLUE}${BOLD}│${RSET} bloby init again.${RSET} ${BLUE}${BOLD}│${RSET}"
358
+ Write-Host " ${BLUE}${BOLD}│${RSET} ${RSET}${BLUE}${BOLD}│${RSET}"
359
+ Write-Host " ${BLUE}${BOLD}╰───────────────────────────────────────────────────────╯${RSET}"
360
+ } else {
361
+ Write-Host " +-------------------------------------------------------+" -ForegroundColor Cyan
362
+ Write-Host " | |" -ForegroundColor Cyan
363
+ Write-Host " | NEXT STEP - type this, then press Enter: |" -ForegroundColor Cyan
364
+ Write-Host " | |" -ForegroundColor Cyan
365
+ Write-Host " | > bloby init |" -ForegroundColor Cyan
366
+ Write-Host " | |" -ForegroundColor Cyan
367
+ Write-Host " | Not working? (`"command not found`") |" -ForegroundColor Cyan
368
+ Write-Host " | Just open a NEW terminal window and run |" -ForegroundColor Cyan
369
+ Write-Host " | bloby init again. |" -ForegroundColor Cyan
370
+ Write-Host " | |" -ForegroundColor Cyan
371
+ Write-Host " +-------------------------------------------------------+" -ForegroundColor Cyan
372
+ }
346
373
  Write-Host ""
347
374
  if ($vtSupported) {
348
- Write-Host " ${BLUE}bloby init${RSET} Set up your bot"
375
+ Write-Host " ${DIM}Other commands:${RSET}"
349
376
  Write-Host " ${BLUE}bloby start${RSET} Start your bot"
350
377
  Write-Host " ${BLUE}bloby status${RSET} Check if it's running"
351
- Write-Host ""
352
- Write-Host " ${PINK}>${RSET} Run ${BLUE}bloby init${RSET} to begin."
378
+ Write-Host " ${BLUE}bloby help${RSET} All commands"
353
379
  } else {
354
- Write-Host " bloby init " -ForegroundColor Cyan -NoNewline; Write-Host "Set up your bot"
380
+ Write-Host " Other commands:" -ForegroundColor DarkGray
355
381
  Write-Host " bloby start " -ForegroundColor Cyan -NoNewline; Write-Host "Start your bot"
356
382
  Write-Host " bloby status " -ForegroundColor Cyan -NoNewline; Write-Host "Check if it's running"
357
- Write-Host ""
358
- Write-Host " > " -ForegroundColor Magenta -NoNewline
359
- Write-Host "Run " -NoNewline
360
- Write-Host "bloby init" -ForegroundColor Cyan -NoNewline
361
- Write-Host " to begin."
383
+ Write-Host " bloby help " -ForegroundColor Cyan -NoNewline; Write-Host "All commands"
362
384
  }
363
- Write-Host " (Open a new terminal if 'bloby' isn't found yet)" -ForegroundColor DarkGray
364
385
  Write-Host ""
365
386
  Write-Host " https://bloby.bot" -ForegroundColor DarkGray
366
387
  Write-Host ""
@@ -349,18 +349,26 @@ create_wrapper
349
349
  setup_path
350
350
 
351
351
  printf "\n"
352
- printf " ${PINK}${BOLD}✔ Bloby is ready!${RESET}\n"
352
+ printf " ${PINK}${BOLD}✔ Bloby is installed!${RESET}\n"
353
353
  printf "\n"
354
- printf " ${DIM}─────────────────────────────${RESET}\n"
355
- printf " ${BOLD}Get started:${RESET}\n"
354
+ printf " ${BLUE}${BOLD}╭───────────────────────────────────────────────────────╮${RESET}\n"
355
+ printf " ${BLUE}${BOLD}│${RESET} ${RESET}${BLUE}${BOLD}│${RESET}\n"
356
+ printf " ${BLUE}${BOLD}│${RESET}${BOLD} NEXT STEP - type this, then press Enter:${RESET} ${BLUE}${BOLD}│${RESET}\n"
357
+ printf " ${BLUE}${BOLD}│${RESET} ${RESET}${BLUE}${BOLD}│${RESET}\n"
358
+ printf " ${BLUE}${BOLD}│${RESET}${BLUE}${BOLD} > bloby init${RESET} ${BLUE}${BOLD}│${RESET}\n"
359
+ printf " ${BLUE}${BOLD}│${RESET} ${RESET}${BLUE}${BOLD}│${RESET}\n"
360
+ printf " ${BLUE}${BOLD}│${RESET}${DIM} ─────────────────────────────────────────────────${RESET} ${BLUE}${BOLD}│${RESET}\n"
361
+ printf " ${BLUE}${BOLD}│${RESET} ${RESET}${BLUE}${BOLD}│${RESET}\n"
362
+ printf " ${BLUE}${BOLD}│${RESET}${YELLOW}${BOLD} Not working? (\"command not found\")${RESET} ${BLUE}${BOLD}│${RESET}\n"
363
+ printf " ${BLUE}${BOLD}│${RESET} Just open a NEW terminal window and run${RESET} ${BLUE}${BOLD}│${RESET}\n"
364
+ printf " ${BLUE}${BOLD}│${RESET} bloby init again.${RESET} ${BLUE}${BOLD}│${RESET}\n"
365
+ printf " ${BLUE}${BOLD}│${RESET} ${RESET}${BLUE}${BOLD}│${RESET}\n"
366
+ printf " ${BLUE}${BOLD}╰───────────────────────────────────────────────────────╯${RESET}\n"
356
367
  printf "\n"
357
- printf " ${BLUE}bloby init${RESET} Set up your bot\n"
368
+ printf " ${DIM}Other commands:${RESET}\n"
358
369
  printf " ${BLUE}bloby start${RESET} Start your bot\n"
359
370
  printf " ${BLUE}bloby status${RESET} Check if it's running\n"
360
371
  printf " ${BLUE}bloby help${RESET} All commands\n"
361
372
  printf "\n"
362
- printf " ${PINK}>${RESET} Run ${BLUE}bloby init${RESET} to begin.\n"
363
- printf " ${DIM}(Open a new terminal if 'bloby' isn't found yet)${RESET}\n"
364
- printf "\n"
365
373
  printf " ${DIM}https://bloby.bot${RESET}\n"
366
374
  printf "\n"
package/shared/relay.ts CHANGED
@@ -122,7 +122,9 @@ export function startHeartbeat(token: string, tunnelUrl?: string): void {
122
122
  };
123
123
 
124
124
  beat(); // immediate first beat
125
- heartbeatTimer = setInterval(beat, 30_000); // every 30s
125
+ // Every 120s. The relay's HEARTBEAT_TIMEOUT_MS must stay well above this (currently
126
+ // 360s = 3 missed beats of grace) so a single dropped beat never flaps a healthy bot.
127
+ heartbeatTimer = setInterval(beat, 120_000);
126
128
  }
127
129
 
128
130
  export function stopHeartbeat(): void {
@@ -68,6 +68,17 @@ interface BufferedMessage {
68
68
  content: string;
69
69
  }
70
70
 
71
+ /** Cap a rolling per-customer history buffer AND keep the window starting on a
72
+ * user message. A blind length-splice can leave the window assistant-first,
73
+ * which the Anthropic Messages API rejects outright once the pi harness sends
74
+ * the buffer as structured chat history — every reply in that thread then
75
+ * silently fails (audit C-7). Trimming at the source fixes it for every
76
+ * provider flavor at once. */
77
+ function trimCustomerBuffer(buf: BufferedMessage[]): void {
78
+ if (buf.length > MAX_BUFFER_MESSAGES) buf.splice(0, buf.length - MAX_BUFFER_MESSAGES);
79
+ while (buf.length > 0 && buf[0].role !== 'user') buf.shift();
80
+ }
81
+
71
82
  interface DebounceEntry {
72
83
  messages: string[];
73
84
  attachments: InboundMessageAttachment[];
@@ -600,7 +611,7 @@ export class ChannelManager {
600
611
  const buf = this.customerBuffers.get(target.assistantBufferKey);
601
612
  if (buf) {
602
613
  buf.push({ role: 'assistant', content: eventData.content });
603
- if (buf.length > MAX_BUFFER_MESSAGES) buf.splice(0, buf.length - MAX_BUFFER_MESSAGES);
614
+ trimCustomerBuffer(buf);
604
615
  }
605
616
  }
606
617
  return;
@@ -1305,10 +1316,8 @@ export class ChannelManager {
1305
1316
  // Add the new user message to the buffer
1306
1317
  buffer.push({ role: 'user', content: msg.text });
1307
1318
 
1308
- // Trim buffer to max size
1309
- if (buffer.length > MAX_BUFFER_MESSAGES) {
1310
- buffer.splice(0, buffer.length - MAX_BUFFER_MESSAGES);
1311
- }
1319
+ // Trim buffer to max size (user-first — see trimCustomerBuffer)
1320
+ trimCustomerBuffer(buffer);
1312
1321
 
1313
1322
  // Build recent messages for context (everything except the last one, which is the current message)
1314
1323
  const recentMessages: RecentMessage[] = buffer.length > 1
@@ -1376,9 +1385,7 @@ export class ChannelManager {
1376
1385
  if (type === 'bot:response' && eventData.content) {
1377
1386
  // Add full response to the conversation buffer
1378
1387
  buffer!.push({ role: 'assistant', content: eventData.content });
1379
- if (buffer!.length > MAX_BUFFER_MESSAGES) {
1380
- buffer!.splice(0, buffer!.length - MAX_BUFFER_MESSAGES);
1381
- }
1388
+ trimCustomerBuffer(buffer!);
1382
1389
 
1383
1390
  // Send remaining text after the last tool use (or full response if no tools were used)
1384
1391
  const remaining = waChunkBuf.trim();
@@ -1424,9 +1431,7 @@ export class ChannelManager {
1424
1431
  }
1425
1432
  const label = fromMe ? 'me' : (senderName || chatId);
1426
1433
  buffer.push({ role: 'user', content: `[${label}]: ${text}` });
1427
- if (buffer.length > MAX_BUFFER_MESSAGES) {
1428
- buffer.splice(0, buffer.length - MAX_BUFFER_MESSAGES);
1429
- }
1434
+ trimCustomerBuffer(buffer);
1430
1435
  log.info(`[channels] Assistant context stored: ${bufferKey} | ${buffer.length} msgs | [${label}]: "${text.slice(0, 60)}"`);
1431
1436
  }
1432
1437
 
@@ -3539,21 +3539,6 @@ export default function OnboardWizard({ onComplete, isInitialSetup = false, onSa
3539
3539
  {/* ── Auth flow: Anthropic ── */}
3540
3540
  {provider === 'anthropic' && (
3541
3541
  <div className="space-y-2.5">
3542
- {/* Anthropic third-party usage policy notice — shown to anyone considering Claude. */}
3543
- <div className="rounded-xl border border-amber-500/20 bg-amber-500/[0.06] px-4 py-3.5">
3544
- <div className="flex items-center gap-2 mb-2">
3545
- <TriangleAlert className="h-4 w-4 text-amber-400 shrink-0" />
3546
- <h3 className="text-[12.5px] font-semibold text-amber-200/90">Anthropic Third-Party App Policy Update</h3>
3547
- </div>
3548
- <div className="space-y-2 text-amber-100/70 text-[12px] leading-relaxed">
3549
- <p>Starting June 15, 2026, Anthropic will provide a separate Third-Party App credit equal to the amount you pay for your subscription.</p>
3550
- <p>For example, if you have the Max 5x plan at $100/month, you will receive $100 in credits to use with third-party tools like Bloby.</p>
3551
- <p>Unfortunately, this is only a fraction of the usage Bloby users had before. We don&apos;t control Anthropic&apos;s rules, but we do need to follow them.</p>
3552
- <p>The best alternative right now is a <span className="font-medium text-amber-100/90">ChatGPT subscription</span>, which also offers $100 and $200 plans with much higher usage limits for Bloby.</p>
3553
- <p>In the short term, Bloby will be optimized for ChatGPT. In the long term, we are building our own model harness so Bloby has more control, more flexibility, and does not depend too heavily on providers that can change their rules at any moment.</p>
3554
- </div>
3555
- </div>
3556
-
3557
3542
  {isConnected && (
3558
3543
  <div className="space-y-2.5">
3559
3544
  <div className="bg-emerald-500/8 border border-emerald-500/15 rounded-lg px-3.5 py-2.5">