Commit Graph

1332 Commits

Author SHA1 Message Date
Peter Steinberger
dbb51006cd feat: unify group policy allowlists 2026-01-06 06:40:42 +00:00
Peter Steinberger
51e8bbd2a8 style: normalize type definitions 2026-01-06 07:21:10 +01:00
Peter Steinberger
aa16b679ad fix: improve auth profile failover 2026-01-06 07:18:06 +01:00
Peter Steinberger
a7b5753dc4 Merge pull request #269 from mukhtharcm/feat/multi-account-roundrobin
feat: Multi-account OAuth with round-robin rotation
2026-01-06 06:13:19 +00:00
Peter Steinberger
b5c604b7b7 fix: require slash for control commands 2026-01-06 07:05:17 +01:00
Peter Steinberger
7d896b5f67 fix: doctor memory hint 2026-01-06 06:01:24 +00:00
Shadow
91cb2c02a7 fix: allow optional reply body 2026-01-05 23:47:33 -06:00
Shadow
69f285c5ca chore: fixed CI 2026-01-05 23:36:48 -06:00
Peter Steinberger
b759cb6f37 feat(providers): normalize location parsing 2026-01-06 06:31:09 +01:00
Nacho Iacovino
255e77f530 feat(telegram): parse location and venue messages
- Add TelegramLocation, TelegramVenue, and TelegramMessageWithLocation types
- Add formatLocationMessage() to convert location/venue shares to text
- Add extractLocationData() for structured location access in ctxPayload
- Handle both raw location pins and venue shares (places with names)
- Include location in reply-to context for quoted messages

Location messages now appear as:
- [Location: lat, lon ±accuracy] for raw pins
- [Venue: Name - Address (lat, lon)] for places

ctxPayload includes LocationLat, LocationLon, LocationAccuracy,
VenueName, and VenueAddress fields for programmatic access.
2026-01-06 06:31:09 +01:00
Muhammed Mukhthar CM
18c7795ee0 feat: treat timeout as rate limit for profile rotation
Antigravity rate limits cause requests to hang indefinitely rather than
returning 429 errors. This change detects timeouts and treats them as
potential rate limits:

- Added timedOut flag to track timeout-triggered aborts
- Timeout now triggers profile cooldown + rotation
- Logs: "Profile X timed out (possible rate limit). Trying next account..."

This ensures automatic failover when Antigravity hangs due to rate limiting.
2026-01-06 05:20:01 +00:00
Muhammed Mukhthar CM
ce6c7737c1 feat: add round-robin rotation and cooldown for auth profiles
Adds usage tracking to auth profiles for automatic rotation:

- ProfileUsageStats type with lastUsed, cooldownUntil, errorCount
- markAuthProfileUsed(): tracks successful usage, resets errors
- markAuthProfileCooldown(): applies exponential backoff (1/5/25/60min)
- isProfileInCooldown(): checks if profile should be skipped
- orderProfilesByMode(): now sorts by lastUsed (oldest first)

On auth/rate-limit failures, profiles are marked for cooldown before
rotation. On success, usage is recorded for round-robin ordering.

This enables automatic load distribution across multiple accounts
(e.g., Antigravity 5-hour rate limit windows).
2026-01-06 05:17:59 +00:00
Muhammed Mukhthar CM
06df6a955a feat: use email-based profile IDs for OAuth providers
Changes writeOAuthCredentials and applyAuthProfileConfig calls to use
the email from OAuth response as part of the profile ID instead of
hardcoded ":default".

This enables multiple accounts per provider - each login creates a
separate profile (e.g., google-antigravity:user@gmail.com) instead
of overwriting the same :default profile.

Affected files:
- src/commands/onboard-auth.ts (generic writeOAuthCredentials)
- src/commands/configure.ts (Antigravity flow)
- src/wizard/onboarding.ts (Antigravity flow)
2026-01-06 05:17:59 +00:00
Shadow
88cb13dc82 Auto-reply: fix typing stop race (#270) 2026-01-05 22:57:04 -06:00
Peter Steinberger
35a2140e48 fix: clean up poll merge 2026-01-06 04:51:05 +00:00
Peter Steinberger
0b27964693 feat: unify poll support
Co-authored-by: DBH <5251425+dbhurley@users.noreply.github.com>
2026-01-06 04:51:05 +00:00
Asleep
8880128ebf Format messages so they work with Gemini API (#266)
* fix: Gemini stops working after one message in a session

* fix: small issue in test file

* test: cover google role-merge behavior

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-01-06 04:45:40 +00:00
DBH
2737e17c67 feat: Add WhatsApp poll support (#248)
Implements issue #123 - WhatsApp Poll Support

## Gateway Protocol
- Add `poll` RPC method with params: to, question, options (2-12), selectableCount

## ActiveWebListener
- Add `sendPoll(to, poll)` method to interface
- Implementation uses Baileys poll message type

## CLI Command
- `clawdbot poll --to <jid> -q <question> -o <opt1> -o <opt2> [-s count]`
- Supports --dry-run, --json, --verbose flags
- Validates 2-12 options

## Changes
- src/gateway/protocol/schema.ts: Add PollParamsSchema
- src/gateway/protocol/index.ts: Export validator and types
- src/web/active-listener.ts: Add sendPoll to interface
- src/web/inbound.ts: Implement sendPoll using Baileys
- src/web/outbound.ts: Add sendPollWhatsApp function
- src/gateway/server-methods/send.ts: Add poll handler
- src/commands/poll.ts: New CLI command
- src/cli/program.ts: Register poll command

Closes #123
2026-01-06 04:44:15 +00:00
Peter Steinberger
ea6ee16461 chore: fix lint warnings 2026-01-06 05:41:24 +01:00
Peter Steinberger
77789cb9a8 fix: improve compaction queueing and oauth flows 2026-01-06 05:41:24 +01:00
Marcus Neves
9ab0b88ac6 feat(whatsapp,telegram): add groupPolicy config option (#216)
Co-authored-by: Marcus Neves <conhecendo.contato@gmail.com>
Co-authored-by: Shadow <hi@shadowing.dev>
2026-01-05 22:41:19 -06:00
Peter Steinberger
53c9feb597 test: cover slack thread reply routing 2026-01-06 05:11:06 +01:00
Steve Caldwell
7034d4f807 fix(slack): preserve thread context in auto-replies
When replying to a message in a Slack thread, the response now stays
in the thread instead of going to the channel root.

Only threads replies when the incoming message was already in a thread
(has thread_ts). Top-level messages get top-level replies.

Fixes #250
2026-01-06 05:09:04 +01:00
Ayaan Zaidi
bd735182b6 feat(telegram): support media groups (multi-image messages) (#220) 2026-01-05 22:04:33 -06:00
VACInc
fb2513e265 fix(discord): Use channel ID for DMs instead of user ID (#261)
Co-authored-by: VAC <vac@vacs-mac-mini.localdomain>
2026-01-05 22:02:33 -06:00
Peter Steinberger
13eb9c9ee9 refactor: centralize reply dispatch 2026-01-06 04:55:00 +01:00
Peter Steinberger
5946f4c341 test: extend typing idle coverage 2026-01-06 03:42:33 +00:00
Peter Steinberger
1a4f7d3388 feat: add ack reaction defaults 2026-01-06 03:28:47 +00:00
Peter Steinberger
58186aa56e test: cover typing idle gate 2026-01-06 03:28:47 +00:00
Peter Steinberger
ca8f66f844 refactor: unify group allowlist policy 2026-01-06 04:27:51 +01:00
Ayaan Zaidi
b1bb3ff6a6 feat: add reaction to acknowledge message in createTelegramBot 2026-01-06 03:21:56 +00:00
Peter Steinberger
9d656f4269 style: satisfy lint 2026-01-06 03:11:42 +00:00
Peter Steinberger
d5f088978a fix: stop typing after dispatcher idle 2026-01-06 03:09:49 +00:00
Josh Palmer
cbc39bd005 use process PATH for bash tool (#202)
what: default bash PATH to process.env.PATH

why: ensure Nix-provided tools on PATH inside sessions

tests: not run

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-01-06 03:05:21 +00:00
Peter Steinberger
20a361a3cf refactor: centralize agent timeout defaults 2026-01-06 02:48:44 +00:00
Martin Schürrer
d83ca74c18 gateway: honor agent timeout for chat.send (#229)
Co-authored-by: clawd@msch <clawd@msch>
2026-01-06 02:45:02 +00:00
Peter Steinberger
9b5610aa45 style: format telegram bot test 2026-01-06 03:43:05 +01:00
Peter Steinberger
9623bd7763 fix: route agent CLI via gateway 2026-01-06 03:41:56 +01:00
Peter Steinberger
0398f684e7 fix: add gateway stop/restart commands 2026-01-06 03:25:32 +01:00
Peter Steinberger
cc0ef4d012 fix(telegram): improve gif handling 2026-01-06 02:22:19 +00:00
Marcus Neves
67e1452f4a Cron: normalize cron.add inputs + align channels (#256)
* fix: harden cron add and align channels

* fix: keep cron tool id params

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-01-06 02:09:48 +00:00
Peter Steinberger
00061b2fd3 fix: harden config form 2026-01-06 03:05:56 +01:00
Peter Steinberger
20705d1b37 fix: set codex oauth model default 2026-01-06 02:49:45 +01:00
Peter Steinberger
b6ac2d860d fix: resolve embedded api key lookup 2026-01-06 02:49:44 +01:00
Peter Steinberger
b30bae89ed feat: track compaction count + verbose notice 2026-01-06 02:49:03 +01:00
Peter Steinberger
3c6dea3ef3 style: format gmail watcher test 2026-01-06 01:46:59 +00:00
Peter Steinberger
55b33b4e69 fix: stop gmail watcher restart on bind error 2026-01-06 01:40:15 +00:00
Peter Steinberger
87f4efda8d fix: restore auth fallback ordering 2026-01-06 01:38:15 +00:00
Peter Steinberger
6f541d6304 fix: improve discord permission errors 2026-01-06 01:38:15 +00:00
Echo
162f8e9bb7 fix(discord): convert readMessages timestamps to local time (#240)
Co-authored-by: Cash Williams <cashwilliams@gmail.com>
2026-01-05 19:37:05 -06:00