These files are generated at build time and shouldn't be committed:
- dist/control-ui assets (JS/CSS bundles)
- src/canvas-host/a2ui bundle files
This removes ~100MB+ of bloat from git history by no longer tracking
repeatedly regenerated bundle files. Add to .gitignore to prevent
accidental re-addition.
Co-Authored-By: Claude <noreply@anthropic.com>
* feat(agents): skip cooldowned providers during failover
When all auth profiles for a provider are in cooldown, the failover
mechanism now skips that provider immediately rather than attempting
and waiting for the cooldown error. This prevents long delays when
multiple OAuth providers fail in sequence.
* fix(agents): correct imports and API usage for cooldown check
Wrap all bot.api.sendXxx() media calls in delivery.ts with error handler
that logs failures before re-throwing. This ensures network failures are
properly logged with context instead of causing unhandled promise rejections
that crash the gateway.
Also wrap the fetch() call in telegram onboarding with try/catch to
gracefully handle network errors during username lookup.
Fixes#2487
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(tts): generate audio when block streaming drops final reply
When block streaming succeeds, final replies are dropped but TTS was only
applied to final replies. Fix by accumulating block text during streaming
and generating TTS-only audio after streaming completes.
Also:
- Change truncate vs skip behavior when summary OFF (now truncates)
- Align TTS limits with Telegram max (4096 chars)
- Improve /tts command help messages with examples
- Add newline separator between accumulated blocks
* fix(tts): add error handling for accumulated block TTS
* feat(tts): add descriptive inline menu with action descriptions
- Add value/label support for command arg choices
- TTS menu now shows descriptive title listing each action
- Capitalize button labels (On, Off, Status, etc.)
- Update Telegram, Discord, and Slack handlers to use labels
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(gateway): gracefully handle AbortError and transient network errors
Addresses issues #1851, #1997, and #2034.
During config reload (SIGUSR1), in-flight requests are aborted, causing
AbortError exceptions. Similarly, transient network errors (fetch failed,
ECONNRESET, ETIMEDOUT, etc.) can crash the gateway unnecessarily.
This change:
- Adds isAbortError() to detect intentional cancellations
- Adds isTransientNetworkError() to detect temporary connectivity issues
- Logs these errors appropriately instead of crashing
- Handles nested cause chains and AggregateError
AbortError is logged as a warning (expected during shutdown).
Network errors are logged as non-fatal errors (will resolve on their own).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(test): update commands-registry test expectations
Update test expectations to match new ResolvedCommandArgChoice format
(choices now return {label, value} objects instead of plain strings).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: harden unhandled rejection handling and tts menus (#2451) (thanks @Glucksberg)
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Shadow <hi@shadowing.dev>
Adds process exit handlers to release all held session locks on:
- Normal process.exit() calls
- SIGTERM / SIGINT signals
This ensures locks are cleaned up even when the process terminates
unexpectedly, preventing the 'session file locked' error.
* bugfix:The Mintlify navbar (logo + search bar with ⌘K) scrolls away when scrolling down the documentation, so it disappears from view.
* fix(docs): keep navbar visible on scroll (#2445) (thanks @chenyuan99)
---------
Co-authored-by: vignesh07 <vigneshnatarajan92@gmail.com>
Fedora and some other distros install Node.js with a version suffix
(e.g., /usr/bin/node-22) and create a symlink from /usr/bin/node.
When Node resolves process.execPath, it returns the real binary path,
not the symlink, causing buildParseArgv to fail the looksLikeNode check.
This adds executable.startsWith('node-') to handle versioned binaries.
Fixes#2442
When a secondary agent's OAuth token expires and refresh fails, the agent
would error out even if the main agent had fresh, valid credentials for
the same profile.
This fix adds a fallback mechanism that:
1. Detects when OAuth refresh fails for a secondary agent (agentDir is set)
2. Checks if the main agent has fresh credentials for the same profileId
3. If so, copies those credentials to the secondary agent and uses them
4. Logs the inheritance for debugging
This prevents the situation where users have to manually copy auth-profiles.json
between agent directories when tokens expire at different times.
Fixes: Secondary agents failing with 'OAuth token refresh failed' while main
agent continues to work fine.
- Add bot.catch() to prevent unhandled rejections from middleware
- Add isRecoverableNetworkError() to retry on transient failures
- Add maxRetryTime and exponential backoff to grammY runner
- Global unhandled rejection handler now logs recoverable errors
instead of crashing (fetch failures, timeouts, connection resets)
Fixes crash loop when Telegram API is temporarily unreachable.
* fix(security): properly test Windows ACL audit for config includes
The test expected fs.config_include.perms_writable on Windows but
chmod 0o644 has no effect on Windows ACLs. Use icacls to grant
Everyone write access, which properly triggers the security check.
Also stubs execIcacls to return proper ACL output so the audit
can parse permissions without running actual icacls on the system.
Adds cleanup via try/finally to remove temp directory containing
world-writable test file.
Fixes checks-windows CI failure.
* test: isolate heartbeat runner tests from user workspace
* docs: update changelog for #2403
---------
Co-authored-by: Tyler Yust <TYTYYUST@YAHOO.COM>
Add evictOldHistoryKeys() function that removes oldest keys when the
history map exceeds MAX_HISTORY_KEYS (1000). Called automatically in
appendHistoryEntry() to bound memory growth.
The map previously grew unbounded as users interacted with more groups
over time. Growth is O(unique groups) not O(messages), but still causes
slow memory accumulation on long-running instances.
Fixes#2384