Commit Graph

3476 Commits

Author SHA1 Message Date
Peter Steinberger
4c28ab602b refactor(relay): add --smoke entrypoint 2026-01-07 03:12:30 +00:00
Peter Steinberger
94259f0b57 fix(relay): guard QR smoke mode 2026-01-07 02:42:55 +00:00
Peter Steinberger
21a7a49ed4 Merge PR #358 2026-01-07 02:42:53 +00:00
Peter Steinberger
53879a88e1 refactor: unify outbound result envelopes 2026-01-07 02:36:05 +00:00
DB Hurley
efc6767f1c fix(relay): implement CLAWDBOT_SMOKE_QR handler for packaging 2026-01-06 21:32:04 -05:00
Peter Steinberger
a9371fa4eb refactor: streamline outbound payload handling 2026-01-07 02:30:42 +00:00
Peter Steinberger
9e1dc67ba1 fix(outbound): guard optional delivery fields 2026-01-07 02:19:42 +00:00
Peter Steinberger
e8b6da659a fix(telegram): import native reply helper 2026-01-07 02:19:42 +00:00
Peter Steinberger
8fc99495e4 refactor(telegram): polish topic threading 2026-01-07 02:19:42 +00:00
Peter Steinberger
4cb8925026 fix(telegram): support forum topics
Co-authored-by: Daniel Griesser <HazAT@users.noreply.github.com>
Co-authored-by: Nacho Iacovino <nachoiacovino@users.noreply.github.com>
Co-authored-by: Randy Ventures <RandyVentures@users.noreply.github.com>
2026-01-07 02:19:42 +00:00
Peter Steinberger
12347967f1 test: cover gmail tailscale error formatting 2026-01-07 03:16:52 +01:00
Peter Steinberger
8ff1d8356a fix: improve gmail tailscale errors 2026-01-07 03:10:35 +01:00
Peter Steinberger
46f0197bc7 docs: note community nickname for MiniMax 2026-01-07 03:02:22 +01:00
Peter Steinberger
b041656908 docs: add CLI reference and model links 2026-01-07 02:52:41 +01:00
Peter Steinberger
cd767a3569 feat: add sandbox scope default 2026-01-07 02:52:41 +01:00
Peter Steinberger
a92e52c04d docs: add changelog for PR #348 2026-01-07 02:52:41 +01:00
Peter Steinberger
bd73d288c2 refactor: reuse gateway output helpers 2026-01-07 01:43:02 +00:00
Peter Steinberger
e5ac5c5d79 chore: clean up lint and scratchpad 2026-01-07 01:28:46 +00:00
Peter Steinberger
7e0ed3e79b refactor: unify outbound delivery formatting 2026-01-07 01:26:09 +00:00
Peter Steinberger
99851cdec1 test: align outbound normalization 2026-01-07 01:22:55 +00:00
Peter Steinberger
8a589f0c10 style: fix send json indent 2026-01-07 01:21:29 +00:00
Peter Steinberger
9b82c2287f style: format direct send json 2026-01-07 01:21:03 +00:00
Peter Steinberger
5e75ea1ea2 style: align outbound delivery formatting 2026-01-07 01:20:40 +00:00
Peter Steinberger
ee1dfc589d refactor: normalize outbound payload delivery 2026-01-07 01:19:47 +00:00
Peter Steinberger
502c8e1297 refactor: centralize outbound target validation 2026-01-07 01:16:39 +00:00
Peter Steinberger
0d18b2a650 docs: fix internal doc links 2026-01-07 02:15:46 +01:00
buddyh
05c4b7919c Docs: sanitize AGENTS.md guidance 2026-01-07 01:15:37 +00:00
Peter Steinberger
28fdd7ea00 refactor: unify outbound delivery 2026-01-07 01:13:04 +00:00
Peter Steinberger
fbf1786518 feat: add docs search command 2026-01-07 02:03:06 +01:00
Peter Steinberger
6e1b28f09a docs: update changelog and clawtributor list for PR #341 2026-01-07 01:46:37 +01:00
Erik
1de65f223b fix(agent): capture compaction retry AbortError for model fallback
Wrap waitForCompactionRetry() in try/catch to capture AbortError
that was escaping and bypassing the model fallback mechanism.

When a timeout fires, session.abort() causes both session.prompt()
and waitForCompactionRetry() to throw AbortError. Previously only
the prompt error was captured, allowing the compaction error to
escape to model-fallback.ts where it was immediately re-thrown
(line 199: isAbortError check), bypassing fallback model attempts.

Fixes #313
2026-01-07 01:44:37 +01:00
Peter Steinberger
d701a999e8 fix: gateway:watch args 2026-01-07 00:37:32 +00:00
Peter Steinberger
9ed4db9da2 docs: recommend WSL2 for Windows installs 2026-01-07 01:21:36 +01:00
Peter Steinberger
9922096c69 feat: add onboarding doc links 2026-01-07 01:19:31 +01:00
Peter Steinberger
f61079ceb4 fix(auth): serialize profile stats updates 2026-01-07 01:06:51 +01:00
Peter Steinberger
46429566d5 fix(auth): lock auth profile updates 2026-01-07 01:00:47 +01:00
Muhammed Mukhthar CM
f3e5e04414 fix(auth): improve multi-account round-robin rotation and 429 handling
This commit fixes several issues with multi-account OAuth rotation that
were causing slow responses and inefficient account cycling.

## Changes

### 1. Fix usageStats race condition (auth-profiles.ts)

The `markAuthProfileUsed`, `markAuthProfileCooldown`, `markAuthProfileGood`,
and `clearAuthProfileCooldown` functions were using a stale in-memory store
passed as a parameter. Long-running sessions would overwrite usageStats
updates from concurrent sessions when saving.

**Fix:** Re-read the store from disk before each update to get fresh
usageStats from other sessions, then merge the update.

### 2. Capture AbortError from waitForCompactionRetry (pi-embedded-runner.ts)

When a request timed out, `session.abort()` was called which throws an
`AbortError`. The code structure was:

```javascript
try {
  await session.prompt(params.prompt);
} catch (err) {
  promptError = err;  // Catches AbortError here
}
await waitForCompactionRetry();  // But THIS also throws AbortError!
```

The second `AbortError` from `waitForCompactionRetry()` escaped and
bypassed the rotation/fallback logic entirely.

**Fix:** Wrap `waitForCompactionRetry()` in its own try/catch to capture
the error as `promptError`, enabling proper timeout handling.

Root cause analysis and fix proposed by @erikpr1994 in #313.

Fixes #313

### 3. Fail fast on 429 rate limits (pi-ai patch)

The pi-ai library was retrying 429 errors up to 3 times with exponential
backoff before throwing. This meant a rate-limited account would waste
30+ seconds retrying before our rotation code could try the next account.

**Fix:** Patch google-gemini-cli.js to:
- Throw immediately on first 429 (no retries)
- Not catch and retry 429 errors in the network error handler

This allows the caller to rotate to the next account instantly on rate limit.

Note: We submitted this fix upstream (https://github.com/badlogic/pi-mono/pull/504)
but it was closed without merging. Keeping as a local patch for now.

## Testing

With 6 Antigravity accounts configured:
- Accounts rotate properly based on lastUsed (round-robin)
- 429s trigger immediate rotation to next account
- usageStats persist correctly across concurrent sessions
- Cooldown tracking works as expected

## Before/After

**Before:** Multiple 429 retries on same account, 30-90s delays
**After:** Instant rotation on 429, responses in seconds
2026-01-07 00:56:32 +01:00
Peter Steinberger
5f2d886dea chore: make bun optional for source builds 2026-01-06 23:48:24 +00:00
Peter Steinberger
5898eb4938 docs: reorganize documentation structure 2026-01-07 00:45:46 +01:00
Peter Steinberger
84f2cab7ff docs: note discord voice message fix 2026-01-06 23:36:09 +00:00
VAC
0d6e65bd86 fix(discord): handle voice messages with empty content
Discord voice messages have empty `content` with the audio in attachments.
The nullish coalescing operator (`??`) doesn't fall through on empty strings,
so voice messages were being dropped as 'empty content'.

Changed to logical OR (`||`) so empty string falls through to media placeholder.
2026-01-06 23:35:30 +00:00
Peter Steinberger
8901f28659 docs: add Mintlify link rules 2026-01-06 23:32:18 +00:00
Peter Steinberger
cbc718f60a docs: normalize Mintlify links 2026-01-06 23:32:12 +00:00
Peter Steinberger
7f92e0b47f docs: clarify gmail pubsub tailscale requirement 2026-01-06 23:28:49 +00:00
Peter Steinberger
9d79777442 docs: rewrite provider docs 2026-01-07 00:25:16 +01:00
Peter Steinberger
b37edc7e2b fix: prefer home linuxbrew paths 2026-01-07 00:18:07 +01:00
Peter Steinberger
56bc79a2d8 fix(sessions_spawn): hard-fail invalid model overrides 2026-01-06 23:17:35 +00:00
Azade
01a8576b73 test(sessions_spawn): add test for model parameter 2026-01-06 23:17:35 +00:00
Azade
7e03d33aab feat(sessions_spawn): add model parameter for sub-agent model override 2026-01-06 23:17:35 +00:00
Peter Steinberger
31feb23a1c chore: remove duplicate daemon runtime imports 2026-01-07 00:14:08 +01:00