Commit Graph

2687 Commits (c4e8b60d2caa2bb040e83d46f2e0bc14ec8f9af6)

Author SHA1 Message Date
Peter Steinberger 323200b551 test(live): harden gateway probes 2026-01-11 04:46:30 +00:00
Peter Steinberger dbe156e881 fix(agents): sanitize transcripts for strict tool APIs 2026-01-11 04:46:18 +00:00
Peter Steinberger f00038b383 fix(testing): stabilize live model runs 2026-01-11 04:22:35 +00:00
Peter Steinberger 343b6ac31b feat: add onboard reset option 2026-01-11 05:04:36 +01:00
Peter Steinberger 9046296ed3 fix: clarify sub-agent sandbox limits 2026-01-11 05:04:14 +01:00
Peter Steinberger b4e9a0c975 style: add blank line after note imports 2026-01-11 05:01:50 +01:00
Peter Steinberger 71791d5a6a fix: restore ZAI provider preference 2026-01-11 04:58:37 +01:00
Peter Steinberger 7acdaad04e style: fix note import spacing 2026-01-11 04:54:19 +01:00
Peter Steinberger b7ac9095e6 fix: skip tool-only reasoning replay 2026-01-11 04:52:16 +01:00
Peter Steinberger 30348e41c6 test: stabilize doctor + sandbox tests 2026-01-11 04:45:04 +01:00
Peter Steinberger 7343597075 chore: keep gate green 2026-01-11 04:42:44 +01:00
Peter Steinberger 50e62122bb chore: format sandbox skills test 2026-01-11 04:39:42 +01:00
Peter Steinberger eeae5ce7fd fix: stabilize notes and reasoning replay 2026-01-11 04:37:06 +01:00
Peter Steinberger 57e6a9a762 fix: clamp z.ai developer role 2026-01-11 04:28:30 +01:00
Peter Steinberger 7660a78330 fix: mirror skills for read-only sandbox 2026-01-11 04:24:19 +01:00
Peter Steinberger 29884f8d6f fix: wrap clack notes for cleaner boxes 2026-01-11 04:23:43 +01:00
Peter Steinberger 76c5bff7d6 test: cover whoami command 2026-01-11 04:20:34 +01:00
Peter Steinberger 38604acd94 fix: tighten WhatsApp ack reactions and migrate config (#629) (thanks @pasogott) 2026-01-11 04:11:04 +01:00
sheeek c928df7237 fix: remove any casts in backward compat code 2026-01-11 04:10:43 +01:00
sheeek 30b4c14296 style: fix biome linting in ack-reaction tests 2026-01-11 04:10:43 +01:00
sheeek 2daead27cf feat(whatsapp): redesign ack-reaction as whatsapp-specific feature
- Move config from messages.ackReaction to whatsapp.ackReaction
- New structure: {emoji, direct, group} with granular control
- Support per-account overrides in whatsapp.accounts.*.ackReaction
- Add Zod schema validation for new config
- Maintain backward compatibility with old messages.ackReaction format
- Update tests to new config structure (14 tests, all passing)
- Add comprehensive documentation in docs/providers/whatsapp.md
- Timing: reactions sent immediately upon message receipt (before bot reply)

Breaking changes:
- Config moved from messages.ackReaction to whatsapp.ackReaction
- Scope values changed: 'all'/'direct'/'group-all'/'group-mentions'
  → direct: boolean + group: 'always'/'mentions'/'never'
- Old config still supported via fallback for smooth migration
2026-01-11 04:10:43 +01:00
sheeek d38b232724 chore: fix linting issues in ack-reaction feature
- Remove unused mock variables in tests
- Remove unused ackReactionScope variables in simple test cases
- Fix line length for ackReactionScope declaration
- All lint checks passing (0 warnings, 0 errors)
- All tests passing (8/8)
2026-01-11 04:10:43 +01:00
sheeek c3587d6cae fix(whatsapp): ack reaction logic for group activation 'always' mode
- Fix bug where ack reaction was not sent when group activation is 'always'
- When requireMention=false (activation: always), always send reaction
- Add test case for activation='always' scenario
- Update inline comments for clarity
2026-01-11 04:10:43 +01:00
sheeek b3b507c6ea feat(whatsapp): add ack reaction support after successful replies
- Add automatic emoji reactions on inbound WhatsApp messages
- Support all ackReactionScope modes: all, direct, group-all, group-mentions
- Reaction is sent AFTER successful reply (unlike Telegram/Discord)
- Errors are logged with proper context
- Add comprehensive test suite for ack reaction logic

Config usage:
  messages:
    ackReaction: "👀"
    ackReactionScope: "group-mentions"  # default

Closes: WhatsApp ack-reaction feature request
2026-01-11 04:10:42 +01:00
Peter Steinberger 579b00503f style: format onboard providers 2026-01-11 04:08:26 +01:00
Peter Steinberger 36a21ae9b0 fix: improve telegram configuration safety 2026-01-11 03:57:52 +01:00
Peter Steinberger 11f897b7df fix(gateway): show connect vs RPC status 2026-01-11 03:57:52 +01:00
Peter Steinberger 1f9b4e3af6 fix: send heartbeat reasoning (#694) (thanks @antons) 2026-01-11 03:51:51 +01:00
Peter Steinberger 4ce2e73521 fix: improve provider issue formatting 2026-01-11 03:51:51 +01:00
Anton Sotkov c7caa9a87d fix: deliver reasoning alongside HEARTBEAT_OK 2026-01-11 03:51:51 +01:00
Anton Sotkov 7a518166bb fix: persist reasoning across session resets 2026-01-11 03:51:51 +01:00
Peter Steinberger 9d802abd9a test: cover docker setup env plumbing 2026-01-11 03:45:45 +01:00
Peter Steinberger 480bf916e2 fix(status): simplify footer guidance 2026-01-11 03:44:28 +01:00
Peter Steinberger 9a4021a277
Merge pull request #703 from mteam88/openrouter-auth-config
Openrouter auth config (AI)
2026-01-11 02:44:24 +00:00
Peter Steinberger 2b07a2a8ab fix: stabilize onboarding auth tests (#703) (thanks @mteam88) 2026-01-11 03:42:27 +01:00
Matthew 77bc11f91c chore: format OpenRouter auth edits 2026-01-11 03:35:45 +01:00
Matthew 7890bd7369 CLI: reuse OpenRouter credentials 2026-01-11 03:35:45 +01:00
Matthew b6982236a6 CLI: add OpenRouter auth choice 2026-01-11 03:35:45 +01:00
Peter Steinberger 494f41d575 docs(status): make status first-step 2026-01-11 03:34:33 +01:00
Peter Steinberger 20b4e2b859 fix: stabilize live probes and docs 2026-01-11 02:26:39 +00:00
Peter Steinberger 6668805aca fix(agents): enforce single-writer session files 2026-01-11 02:25:45 +00:00
Peter Steinberger 3a113b7752 fix: stabilize cli runner output 2026-01-11 02:25:45 +00:00
Peter Steinberger 9b6bc0e66b fix: reset unsigned launchd overrides (#695) (thanks @jeffersonwarrior) 2026-01-11 03:19:24 +01:00
Peter Steinberger 5ec3663748 fix: guard update spinner output (#701) (thanks @bjesuiter) 2026-01-11 03:03:09 +01:00
Benjamin Jesuiter f3bd6e4957 fix(update): use git status --porcelain for dirty check cross-platform 2026-01-11 03:00:43 +01:00
Benjamin Jesuiter 6cb55eaaa7 feat(update): show stderr for failed steps 2026-01-11 03:00:43 +01:00
Benjamin Jesuiter 3f27b23d5a fix(update): remove command hint from step labels 2026-01-11 03:00:43 +01:00
Benjamin Jesuiter 4102e2f1b8 refactor(update): simplify progress with proper exit codes 2026-01-11 03:00:43 +01:00
Benjamin Jesuiter 35d42be828 fix(update): show skipped status with warning indicator for dirty repo 2026-01-11 03:00:43 +01:00
Benjamin Jesuiter 6a2b8328df fix(update): restore reason in summary 2026-01-11 03:00:43 +01:00
Benjamin Jesuiter cc8e6e00a0 fix(update): hide steps in summary when shown live, fix command hint 2026-01-11 03:00:43 +01:00
Benjamin Jesuiter 6e0c1cb051 fix(update): show each step with spinner as it runs 2026-01-11 03:00:43 +01:00
Benjamin Jesuiter 8f9aa3e8c5 fix(progress): start spinner immediately when delayMs is 0 2026-01-11 03:00:43 +01:00
Benjamin Jesuiter 88c404bcfc feat(update): add progress spinner during update steps 2026-01-11 03:00:43 +01:00
Peter Steinberger 4759633df1 fix(cli): keep build/lint green 2026-01-11 02:44:24 +01:00
Peter Steinberger e824b3514b fix(status): improve diagnostics and output 2026-01-11 02:42:24 +01:00
Peter Steinberger 02270abc87 feat: add codex cli backend 2026-01-11 01:39:30 +00:00
Peter Steinberger 2d74119a08 test: cover auto-reply command gating 2026-01-11 02:27:16 +01:00
Peter Steinberger e0bf86f06c feat: improve gateway services and auto-reply commands 2026-01-11 02:27:16 +01:00
Peter Steinberger a32021dc3e fix: inject image paths for cli backends 2026-01-11 00:55:22 +00:00
Peter Steinberger 4cf3e84b39 test: add CLI backend image probe 2026-01-11 00:55:22 +00:00
Peter Steinberger 24c3ab6fe0 fix: unblock claude-cli live runs 2026-01-11 00:55:22 +00:00
Peter Steinberger d8f1124d59 feat: add CLI backend fallback 2026-01-11 00:55:22 +00:00
Peter Steinberger 07be761779 feat: add sandbox browser control allowlists 2026-01-11 01:52:32 +01:00
Peter Steinberger b0b4b33b6b fix: update gateway auth docs and clients 2026-01-11 01:51:24 +01:00
Peter Steinberger d33285a9cd fix: harden gateway auth defaults 2026-01-11 01:51:24 +01:00
Peter Steinberger 3e6d27ac4e fix(status): show gateway auth when reachable 2026-01-11 01:46:37 +01:00
Peter Steinberger 506cc9e7a1 chore(release): 2026.1.11-3 2026-01-11 01:38:15 +01:00
Peter Steinberger b339097179 style: format browser tool wiring 2026-01-11 01:34:45 +01:00
Peter Steinberger 07eed3de56 docs(status): add diagnostics commands 2026-01-11 01:31:56 +01:00
Peter Steinberger 326fb04d12 feat: add browser target selection for sandboxed agents 2026-01-11 01:31:56 +01:00
Peter Steinberger 362fc3e235
Merge pull request #692 from peschee/fix/whatsapp-lid-mention-detection
fix(whatsapp): pass authDir to jidToE164 for LID mention detection
2026-01-11 00:16:03 +00:00
Peter Steinberger 6444258ad3 fix: handle WhatsApp LID mentions (#692) (thanks @peschee) 2026-01-11 01:14:57 +01:00
Peter Steinberger 318f59ec3e fix(status): show token previews 2026-01-11 01:11:46 +01:00
Peter Steinberger 57dafec0ec docs(status): add troubleshooting footer 2026-01-11 01:06:58 +01:00
Peter Steinberger 518dfd4e42 fix(status): provider setup vs warn 2026-01-11 01:05:06 +01:00
Peter Siska 9cb1bfa1c1 fix(whatsapp): pass authDir to jidToE164 for LID mention detection
WhatsApp group mentions using the new Linked ID format (@lid) were not
being detected because jidToE164() was called without the authDir needed
to find the LID reverse mapping files.

Now isBotMentioned() and debugMention() accept an optional authDir
parameter, which is passed through from account.authDir.
2026-01-11 01:04:10 +01:00
Peter Steinberger 5fa3ac1e01 fix(status): full-width tables + better diagnosis 2026-01-11 00:54:27 +01:00
Peter Steinberger 7c76561569 fix: dedupe inbound messages across providers 2026-01-11 00:12:25 +01:00
Peter Steinberger 1d9199b529 style(test): format update-cli test 2026-01-10 23:46:11 +01:00
Peter Steinberger eff092268a fix(test): avoid update-cli import timeout 2026-01-10 23:40:27 +01:00
Peter Steinberger 621f710d60 fix(mac): add tailnet discovery fallback and debug CLI 2026-01-10 23:39:27 +01:00
Shadow c731a87d07
Discord: add fetch message action 2026-01-10 16:38:20 -06:00
Peter Steinberger 786eac1d6f test(cli): avoid update-cli import timeout 2026-01-10 23:35:04 +01:00
Peter Steinberger 1eb50ffac4 feat(status): improve status output 2026-01-10 23:32:07 +01:00
Peter Steinberger 3166cc911b
Heartbeat: optional reasoning delivery (#690)
* feat: expose heartbeat reasoning output

* docs(changelog): mention heartbeat reasoning toggle
2026-01-10 22:26:20 +00:00
Peter Steinberger 4d0e74ab6c fix: cover extra thinking tags (#688) (thanks @theglove44) 2026-01-10 23:23:23 +01:00
Chris Taylor a580639abf fix(agents): strip <thought> and <antthinking> tags from output 2026-01-10 23:19:58 +01:00
Peter Steinberger 494743a4e5 feat: run doctor after restart 2026-01-10 23:14:55 +01:00
Jonathan Wilkins 0afa370869 fix: add 'usage limit' to rate limit detection patterns
OpenAI/ChatGPT returns "You have hit your ChatGPT usage limit (plus plan)"
when users exceed their plan quota. This error wasn't being recognized as a
rate limit, so fallback to alternative models wasn't triggering.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 23:11:06 +01:00
Peter Steinberger 08cc8f2281 refactor(agents): extract transcript repair module 2026-01-10 22:07:25 +00:00
Peter Steinberger 708f04b02f fix: keep mock openai responses requests 2026-01-10 22:56:08 +01:00
Peter Steinberger 1c257f170a
Gateway: disable OpenAI HTTP chat completions by default (#686)
* feat(gateway): disable OpenAI chat completions HTTP by default

* test(gateway): deflake mock OpenAI tool-calling

* docs(changelog): note OpenAI HTTP endpoint default-off
2026-01-10 21:55:54 +00:00
Peter Steinberger 06052640e8
Merge pull request #685 from carlulsoe/fix/daemon-restart-feedback
fix(cli): improve daemon restart feedback [AI-assisted]
2026-01-10 21:53:00 +00:00
Peter Steinberger fa61699f9a fix: polish restart feedback + stabilize tests (#685) (thanks @carlulsoe) 2026-01-10 22:52:09 +01:00
Peter Steinberger 98377c7c6b fix(agents): harden tool transcript repair 2026-01-10 21:45:15 +00:00
Peter Steinberger 805a29252e test: add setup-token live smoke 2026-01-10 21:45:15 +00:00
Kit f699dc3777 fix(cli): improve daemon restart feedback
- runDaemonRestart() now returns Promise<boolean> indicating success
- update command only shows success when restart actually happened
- Fixes missing reasoningLevel type in compactEmbeddedPiSession

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Carl Ulsøe Christensen <carlulsoe@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 22:44:31 +01:00
Peter Steinberger ad17966e2f fix(doctor): warn on opencode overrides 2026-01-10 22:44:31 +01:00
Peter Steinberger 1110d96769 feat(gateway): add config toggle for chat completions endpoint 2026-01-10 22:39:06 +01:00
Peter Steinberger 050c1c5391 fix(agents): include reasoningLevel in compaction params 2026-01-10 22:39:06 +01:00
Ruby a6a9930a34
fix: enable block streaming for all providers (#684) 2026-01-10 15:25:55 -06:00
Peter Steinberger 6d70524aa8 fix: add reasoning visibility hint 2026-01-10 22:24:22 +01:00
Peter Steinberger aa30995aa1 test(live): add provider filters + google skip rules 2026-01-10 21:16:59 +00:00
Peter Steinberger 0d00d6dfd4 style(gateway): format openai-http 2026-01-10 22:11:15 +01:00
Peter Steinberger 6546a1a23a feat(gateway): allow agent via model 2026-01-10 22:11:12 +01:00
Peter Steinberger dafa8a2881 feat(gateway): add OpenAI-compatible HTTP endpoint 2026-01-10 22:11:04 +01:00
Peter Steinberger ab314a22e0 chore: refresh pi-ai patch repro note 2026-01-10 20:55:57 +00:00
Peter Steinberger 9790b39d80 feat(gateway): add agent image attachments + live probe 2026-01-10 20:44:23 +00:00
Peter Steinberger b9b1bc2726 test: relax reasoning replay expectations 2026-01-10 21:43:52 +01:00
Peter Steinberger 8a194b4abc fix: align opencode-zen provider setup 2026-01-10 21:38:18 +01:00
Peter Steinberger 46e00ad5e7 fix: describe sandboxed elevated in prompt 2026-01-10 21:37:15 +01:00
Peter Steinberger 3389231ecb feat(doctor): offer update first 2026-01-10 21:34:59 +01:00
Peter Steinberger d772ff06c8 test: update openai responses reasoning replay 2026-01-10 21:20:26 +01:00
Peter Steinberger 686b3f884c fix: expose WhatsApp sender ids in group context 2026-01-10 21:09:08 +01:00
Peter Steinberger 0ef429f532 feat: color docs search output 2026-01-10 21:02:27 +01:00
Peter Steinberger 1bd5500832 feat: add colored CLI docs links 2026-01-10 20:51:03 +01:00
Peter Steinberger cf192f8551 style: biome format 2026-01-10 19:47:17 +00:00
Peter Steinberger afede929b3 test: harden gateway tool probes 2026-01-10 19:46:13 +00:00
Peter Steinberger d44bb41d27 fix: replay OpenAI reasoning for tool calls 2026-01-10 19:46:13 +00:00
Peter Steinberger fa346d7b78 fix: accept Z_AI_API_KEY for zai 2026-01-10 19:46:13 +00:00
Peter Steinberger ec1047583a
Merge pull request #640 from mcinteerj/fix/whatsapp-group-reactions
fix(whatsapp): enable reactions in group chats
2026-01-10 19:44:05 +00:00
Peter Steinberger 7e6fa94720 fix: update WhatsApp history assertions (#640) (thanks @mcinteerj) 2026-01-10 20:41:30 +01:00
Jake 4933113252 fix(whatsapp): preserve group message IDs and normalize reaction participants 2026-01-10 20:36:32 +01:00
Peter Steinberger 4c4c167416 fix(update): harden root selection 2026-01-10 20:33:02 +01:00
Claude 777fb6b7bb CLI: add clawdbot update command and --update flag 2026-01-10 20:33:02 +01:00
Peter Steinberger 9f9098406c feat(sandbox): add sandbox explain inspector 2026-01-10 20:28:43 +01:00
Peter Steinberger 4533dd6e5d test: add image attachment regression coverage 2026-01-10 20:25:38 +01:00
Peter Steinberger 212b13b099 fix: repair tool-use history for anthropic 2026-01-10 19:15:57 +00:00
Peter Steinberger 193ebba657 fix: sniff chat attachment mime (#670) (thanks @cristip73) 2026-01-10 20:06:33 +01:00
cristip73 c4e76eb635 fix: enable image attachments in chat messages for Claude API
Images were previously converted to markdown data URLs which Claude API
treats as plain text, not as actual images.

Changes:
- Add parseMessageWithAttachments() that returns {message, images[]}
- Pass images through the stack to session.prompt() as content blocks
- Filter null/empty attachments before parsing
- Strip data URL prefix if client sends it

This enables iOS and other clients to send images that Claude can actually see.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 20:00:25 +01:00
Peter Steinberger 0279f09459 fix: avoid duplicate cli banners 2026-01-10 19:57:24 +01:00
Peter Steinberger 7947059884 test(gateway): deflake temp HOME cleanup 2026-01-10 19:53:04 +01:00
Peter Steinberger 1fe9f648b1 feat(hooks): allow gmail tailscale target URLs 2026-01-10 19:19:43 +01:00
Peter Steinberger b1664ec9c7 test: rename signal reaction-only test (#637) 2026-01-10 19:19:05 +01:00
Peter Steinberger 82f71d25e5 refactor: centralize history context wrapping 2026-01-10 19:16:26 +01:00
Peter Steinberger b977ae19af chore: fix lint and typing 2026-01-10 19:16:25 +01:00
Peter Steinberger d41372b9d9 feat: unify provider history context 2026-01-10 19:16:25 +01:00
Peter Steinberger 8c1d39064d test: adjust tool id sanitization 2026-01-10 18:15:15 +00:00
Peter Steinberger 7c925aa5a0 style: format helper 2026-01-10 18:15:15 +00:00
Peter Steinberger 651a9e9be4 fix: restore minimax tool calling 2026-01-10 18:15:15 +00:00
Peter Steinberger 8dbb22cc93 fix: signal handle dataMessage.reaction safely (#637) (thanks @neist) 2026-01-10 19:13:23 +01:00
Kasper Neist Christjansen 59e6064006 fix(signal): handle reactions in dataMessage.reaction format (#1)
* fix(signal): handle reactions inside dataMessage.reaction

Signal reactions can arrive in two formats:
1. envelope.reactionMessage (already handled)
2. envelope.dataMessage.reaction (now handled)

The signal-cli SSE events use the second format, which was being
misinterpreted as a message with attachments, leading to 'broken
media / attachments' errors.

Changes:
- Add reaction property to SignalDataMessage type
- Check both envelope.reactionMessage and dataMessage.reaction
- Improve body content detection to properly identify reaction-only messages
- Add test for dataMessage.reaction format

* fix(signal): reaction notifications work when account is phone number

When reactionNotifications mode is 'own', notifications would never fire
because resolveSignalReactionTarget() returned a UUID but
shouldEmitSignalReactionNotification() compared it against the account
phone number, which never matched.

The fix:
- Add optional 'phone' field to SignalReactionTarget type
- Extract phone number first in resolveSignalReactionTarget(), include
  it even when UUID is present
- In shouldEmitSignalReactionNotification() 'own' mode, check phone
  match first before falling back to UUID comparison

This ensures reactions to your own messages are properly detected when
the Signal account is configured as a phone number and the reaction
event contains both targetAuthor (phone) and targetAuthorUuid.

* fix(signal): include phone in reaction target for own-mode matching

When targetAuthorUuid is present, also store targetAuthor phone number
in the reaction target. This allows own-mode reaction notifications to
match when comparing account phone against UUID-based targets.
2026-01-10 19:10:39 +01:00
Anton Sotkov 26ce65995f fix(gmail): keep tailscale serve path at root
The default Gmail hook path configured by `clawdbot hooks gmail setup` is `/gmail-pubsub`. Tailscale strips the mount path before proxying, so the request lands on `/` and the hook 404s under the default configuration.

When Tailscale is enabled, always listen on `/` internally and keep the public URL on the configured path (defaulting to `/gmail-pubsub`). This makes default and custom paths work reliably.

Alternative (not implemented here): call tailscale with a full target URL so the backend keeps the path, e.g. `tailscale funnel --set-path /gmail-pubsub http://127.0.0.1:8788/gmail-pubsub`. We did not take this path because it requires changing the CLI invocation to pass URLs (not ports) plus extra validation, which is a larger behavior change.
2026-01-10 18:51:12 +01:00
Peter Steinberger 7dd0899856 fix: voicewake respects state dir override (#666) (thanks @roshanasingh4) 2026-01-10 18:32:09 +01:00
Peter Steinberger f1a1032cd6 fix: serialize telegram media-group processing 2026-01-10 18:31:36 +01:00
Peter Steinberger b383fbeed3 fix: cron wakeMode now waits for heartbeat (#666) (thanks @roshanasingh4) 2026-01-10 18:31:35 +01:00
Roshan Singh 91c870a0c4 fix(cron): wait for heartbeat to complete when wakeMode is "now"
Fixes #652

When cron jobs with sessionTarget:"main" have wakeMode:"now",
they were being marked as completed immediately without waiting for the
agent to actually process the system event.

The issue was that requestHeartbeatNow() is fire-and-forget and
doesn't wait for the heartbeat to complete. The job would finish
with durationMs: 0 before the agent had a chance to run.

This fix:
- Adds runHeartbeatOnce to CronServiceDeps
- Wires it up in gateway/server.ts to load config and pass runtime
- Modifies executeJob() to call runHeartbeatOnce when wakeMode:"now"
- Waits for heartbeat to complete and maps status to cron result:
  * "ran" → "ok"
  * "skipped" → "skipped"
  * "failed" → "error"
- Falls back to old behavior for wakeMode:"next-heartbeat" or if
  runHeartbeatOnce is not available (backward compatibility)

Benefits:
- Jobs now have accurate durationMs reflecting actual processing time
- Jobs are correctly marked with "error" status if heartbeat fails
- Prevents race condition where job completes before agent runs

[AI-assisted] - Generated with z.ai GLM-4.7
[Tested: Lightly tested - Logic validated with test scenarios, code quality checks passed, integration testing requires live Clawdbot instance]
2026-01-10 18:31:35 +01:00
Peter Steinberger 5a57cbe571
Merge pull request #667 from rubyrunsstuff/fix/discord-forwarded-snapshots
Discord: include forwarded message snapshots
2026-01-10 17:31:26 +00:00
Peter Steinberger 6480ef369f fix: telegram draft chunking defaults (#667) (thanks @rubyrunsstuff) 2026-01-10 18:30:06 +01:00
Peter Steinberger 2d105d16f8 fix(opencode-zen): keep legacy aliases + rationale (#669) (thanks @magimetal) 2026-01-10 18:25:43 +01:00
Ruby 7a836c9ff0 Discord: include forwarded message snapshots 2026-01-10 18:23:30 +01:00
Magi Metal 738269eb74 feat(opencode-zen): update models with sensible defaults
- Replace model catalog with 11 current models: gpt-5.1-codex, claude-opus-4-5,
  gemini-3-pro, alpha-glm-4.7, gpt-5.1-codex-mini, gpt-5.1, glm-4.7-free,
  gemini-3-flash, gpt-5.1-codex-max, minimax-m2.1-free, gpt-5.2
- Add accurate per-token costs from OpenCode Zen pricing
- Add accurate context windows and output limits
- Update aliases for new model families (codex, glm, minimax)
- Remove deprecated models (sonnet, haiku, o-series, gemini-2.5)
2026-01-10 18:22:26 +01:00
Peter Steinberger 9b5ce2530a
Merge pull request #665 from sebslight/fix/cloud-code-assist-schema-and-tool-ids
fix(agents): harden Cloud Code Assist compatibility
2026-01-10 17:07:58 +00:00
Peter Steinberger 38d6930fbe
Merge pull request #664 from azade-c/fix/use-state-dir-for-nodes-voicewake
fix: use resolveStateDir() for node-pairing and voicewake storage
2026-01-10 17:07:28 +00:00
Peter Steinberger 0d98e93253 fix: harden cloud code assist tool schema sanitizing (#665) (thanks @sebslight) 2026-01-10 18:07:26 +01:00
Sebastian Barrios 64babcac7a fix(agents): harden Cloud Code Assist compatibility
- Expand schema scrubber to strip additional constraint keywords rejected
  by Cloud Code Assist (examples, minLength, maxLength, minimum, maximum,
  multipleOf, pattern, format, minItems, maxItems, uniqueItems,
  minProperties, maxProperties)
- Extend tool call ID sanitization to cover toolUse and toolCall block
  types (previously only functionCall was sanitized)
- Update pi-tools test to include 'examples' in unsupported keywords

Fixes 400 errors when using google-antigravity/claude-opus-4-5-thinking:
- tools.N.custom.input_schema: JSON schema is invalid
- messages.N.content.N.tool_use.id: String should match pattern
2026-01-10 18:06:35 +01:00
Peter Steinberger 464f0645a8 fix: stabilize telegram media tests (#664) (thanks @azade-c) 2026-01-10 18:06:05 +01:00
Peter Steinberger ef08c3f038 fix(agents): stabilize cli creds cache + bash cwd 2026-01-10 18:02:21 +01:00
Azade 48ad3bbbe6 fix: use resolveStateDir() for node-pairing and voicewake storage
Both node-pairing.ts and voicewake.ts were using a local defaultBaseDir()
that hardcoded ~/.clawdbot, ignoring CLAWDBOT_STATE_DIR.

This caused nodes/paired.json and settings/voicewake.json to be stored
in ~/.clawdbot instead of the configured state directory.

Fixes the bug where paired nodes config was stored in a different
location than the rest of the gateway state.
2026-01-10 17:55:30 +01:00
Peter Steinberger 843ff5f2d4 fix(sessions): tolerate ENOENT during lock 2026-01-10 17:50:53 +01:00
Peter Steinberger 60bf349201 fix(sessions): lock store saves; wait for bash close 2026-01-10 17:47:12 +01:00
Peter Steinberger a54706a063 fix: throttle cli credential sync 2026-01-10 17:44:03 +01:00
Peter Steinberger 12722acb55 feat: wizard model picker (#611, thanks @jonasjancarik) 2026-01-10 16:32:59 +00:00
Jonáš Jančařík 687a10b8cc fix: map opencode-zen preferred provider 2026-01-10 16:32:59 +00:00
Jonáš Jančařík 9f80d8ec7c fix: skip model picker when auth choice preset 2026-01-10 16:32:59 +00:00
Jonáš Jančařík dcc41e932d feat: add shared model picker to configure/onboarding 2026-01-10 16:32:59 +00:00
Peter Steinberger e3cd431551 fix(auto-reply): RawBody commands + locked session updates (#643) 2026-01-10 17:32:31 +01:00
Peter Steinberger e2ea02160d test: add workspace path regressions 2026-01-10 17:28:43 +01:00
Peter Steinberger a1533a17f7 fix(gateway): harden chat abort semantics 2026-01-10 17:23:27 +01:00
Peter Steinberger 84d64f9395
Merge pull request #446 from tony-freedomology/feat/human-delay
feat(agent): add human-like delay between block replies
2026-01-10 16:16:52 +00:00
Peter Steinberger fb03149df4 fix: finalize human delay config typing (#446) (thanks @tony-freedomology) 2026-01-10 17:15:27 +01:00
Lloyd ab994d2c63 feat(agent): add human-like delay between block replies
Adds `agent.humanDelay` config option to create natural rhythm between
streamed message bubbles. When enabled, introduces a random delay
(default 800-2500ms) between block replies, making multi-message
responses feel more like natural human texting.

Config example:
```json
{
  "agent": {
    "blockStreamingDefault": "on",
    "humanDelay": {
      "enabled": true,
      "minMs": 800,
      "maxMs": 2500
    }
  }
}
```

- First message sends immediately
- Subsequent messages wait a random delay before sending
- Works with iMessage, Signal, and Discord providers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 17:12:50 +01:00
Muhammed Mukhthar CM de5b75eff6 fix(tools): resolve Read/Write/Edit paths against workspace directory
Previously, Read/Write/Edit tools used the global tool instances from
pi-coding-agent which had process.cwd() baked in at import time. Since
the gateway starts from /root/dev/ai/clawdbot, relative paths like
'SOUL.md' would incorrectly resolve there instead of the agent's
workspace (/root/clawd).

This fix:
- Adds workspaceDir option to createClawdbotCodingTools
- Creates fresh Read/Write/Edit tools bound to workspaceDir
- Adds cwd option to Bash tool defaults for consistency
- Passes effectiveWorkspace from pi-embedded-runner

Absolute paths and ~/... paths are unaffected. Sandboxed sessions
continue to use sandbox root as before.

Includes tests for Read/Write/Edit workspace path resolution.
2026-01-10 17:08:56 +01:00
Peter Steinberger d1943a9337 chore: format reply session 2026-01-10 17:03:17 +01:00
Peter Steinberger d781508952 fix: make chat.send non-blocking 2026-01-10 17:02:28 +01:00
Peter Steinberger b7fdc266ad test(auto-reply): cover native /model session routing 2026-01-10 16:50:32 +01:00
Peter Steinberger b99eb4c9f3 fix(auto-reply): apply native commands to target session 2026-01-10 16:48:53 +01:00
Peter Steinberger 8978ac425e fix: harden cli credential sync 2026-01-10 16:37:54 +01:00
Peter Steinberger 81f9093c3c fix(pairing): accept positional provider args 2026-01-10 16:36:43 +01:00
Peter Steinberger 41c8bdfada feat: add ZAI auth choice 2026-01-10 16:32:21 +01:00
Peter Steinberger 8b47368167 fix: harden cli credential sync 2026-01-10 16:25:40 +01:00
Peter Steinberger e60c3fc1b3 fix: doctor ignore install dir in legacy workspace check 2026-01-10 16:23:35 +01:00
Peter Steinberger 78532d76bd test: clean up lint warnings 2026-01-10 16:17:02 +01:00
Peter Steinberger 53a0c966a5 refactor: unify configure auth choice 2026-01-10 16:14:49 +01:00
Peter Steinberger 43b530ca1c fix(agents): suppress partial replies with reasoning 2026-01-10 16:03:17 +01:00
Peter Steinberger 44564df028 refactor(sessions): add mergeSessionEntry 2026-01-10 16:03:17 +01:00
Peter Steinberger 70c1732dd1 refactor: centralize messaging dedupe helpers 2026-01-10 16:02:56 +01:00
Peter Steinberger 5a93447294 fix: prevent claude-cli oauth downgrade (#654) (thanks @radek-paclt) 2026-01-10 15:50:25 +01:00
Radek Paclt a39951d463 fix(auth): enable OAuth refresh for Claude CLI credentials
When Claude CLI credentials (anthropic:claude-cli) expire, automatically
refresh using the stored refresh token instead of failing with
"No credentials found" error.

Changes:
- Read refreshToken from Claude CLI and store as OAuth credential type
- Implement bidirectional sync: after refresh, write new tokens back to
  Claude Code storage (file on Linux/Windows, Keychain on macOS)
- Prefer OAuth over Token credentials (enables auto-refresh capability)
- Maintain backward compatibility for credentials without refreshToken

This enables long-running agents to operate autonomously without manual
re-authentication when OAuth tokens expire.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-10 15:40:27 +01:00
Peter Steinberger 1281c1d155
Merge pull request #655 from antons/fix/reasoning-imsg
Fix reasoning in iMessage
2026-01-10 14:39:14 +00:00
Peter Steinberger 236f8560b3 fix: reasoning iMessage sessions + final reply (#655) (thanks @antons) 2026-01-10 15:31:57 +01:00
Peter Steinberger ae3711bfbd
Merge pull request #659 from mickahouan/fix/dedupe-message-tool
Fix: avoid duplicate replies when message tool sends
2026-01-10 14:30:02 +00:00
Peter Steinberger 449bee9645 fix: bundle node runtime for mac app 2026-01-10 15:28:37 +01:00
Peter Steinberger 4d146ea2f5 fix: dedupe message tool replies (#659) (thanks @mickahouan) 2026-01-10 15:28:13 +01:00
Anton Sotkov 3b5149ca39 fix: send only final answer with reasoning
When reasoning is enabled on non‑block providers, we now ignore interim streaming chunks and send only the final assistant answer at completion, so replies aren’t partial or duplicated.
2026-01-10 15:28:04 +01:00
Anton Sotkov 4c86da044e fix(sessions): persist reasoning/elevated across DMs 2026-01-10 15:28:04 +01:00
Mickaël Ahouansou d01e06f09a Fix: dedupe message tool sends 2026-01-10 15:25:20 +01:00
Peter Steinberger 65c2532cd5 fix: minimax apiKey optional for providers (#656) (thanks @mneves75) 2026-01-10 15:08:12 +01:00
mneves75 3e2e3eb023 Config: add MiniMax direct API authentication option
Makes apiKey optional in ModelProviderConfig so MiniMax can use auth
profiles or environment variables (MINIMAX_API_KEY) instead of requiring
explicit config.

Changes:
- src/config/types.ts: apiKey changed from required to optional
- src/config/zod-schema.ts: use z.string().min(1).optional() for validation
- src/commands/configure.ts: add minimax-api auth choice in wizard
- src/commands/onboard-auth.ts: MiniMax provider omits apiKey (uses env/auth)
- patches/@mariozechner__pi-ai@0.42.1.patch: map minimax → MINIMAX_API_KEY

Auth Resolution Order (unchanged):
1. Auth profiles (highest priority)
2. Environment variables (MINIMAX_API_KEY, etc.)
3. Custom provider apiKey from models.json (lowest priority)
2026-01-10 10:57:09 -03:00
Peter Steinberger 920b3880c1 test: add elevated mode regressions 2026-01-10 05:31:48 +01:00
Peter Steinberger 66db6c749d fix: persist elevated off override 2026-01-10 05:23:46 +01:00
Peter Steinberger 2045395ccb test(live): add optional write/bash probes 2026-01-10 04:14:39 +00:00
Peter Steinberger d3674f4d6c test(onboard): cover remote + lan token flows 2026-01-10 04:14:39 +00:00
Peter Steinberger cdb915d527 chore: normalize Clawdbot naming 2026-01-10 05:14:09 +01:00
Peter Steinberger a7c8341452 feat: show more session flags 2026-01-10 05:14:07 +01:00
Peter Steinberger 7b392ca74b test(onboard): gateway token auth flow 2026-01-10 03:54:29 +00:00
Peter Steinberger eee04fa2ce fix(onboard): persist gateway token in config 2026-01-10 03:54:25 +00:00
Peter Steinberger 4fac94f259 test(gateway): add wizard e2e + isolate live suite 2026-01-10 03:44:21 +00:00
Peter Steinberger 0f409cb99d test(telegram): force real timers for media groups 2026-01-10 03:44:21 +00:00
Peter Steinberger 241bc737cf test(telegram): deflake media groups on windows 2026-01-10 04:43:04 +01:00
Peter Steinberger 2a0d8f6e38 test(gateway): avoid real OpenAI in mock test 2026-01-10 03:25:45 +00:00
Peter Steinberger 056c4ae622 test(telegram): harden media tests 2026-01-10 04:18:05 +01:00
Peter Steinberger 6274adce3a fix(tools): keep canonical tool names for oauth 2026-01-10 04:18:00 +01:00
Peter Steinberger 4f79122068 test: stabilize gateway mock + lint 2026-01-10 03:14:13 +00:00
Peter Steinberger 7376d1e6c9 feat: improve tui status output 2026-01-10 04:07:15 +01:00
Peter Steinberger 782863ea6c test(gateway): add offline tool-calling regression 2026-01-10 03:06:02 +00:00
Peter Steinberger cc1c5f800f fix(tools): harden schemas and oauth tool names 2026-01-10 03:05:56 +00:00
Peter Steinberger f241859c98 fix: relax fetch typing for Bun 2026-01-10 04:01:06 +01:00
Peter Steinberger 8466e53b5d fix: restore Anthropic OAuth tool dispatch 2026-01-10 04:01:00 +01:00
Peter Steinberger 8e63cd9a76 feat: improve tui status line 2026-01-10 03:53:32 +01:00
Peter Steinberger 2cfed7952e test(telegram): relax media group timeouts on Windows 2026-01-10 02:32:03 +00:00
Peter Steinberger 8a5fb796c0 test(live): probe Read tool via gateway 2026-01-10 02:25:24 +00:00
Peter Steinberger 34664601e0 fix(auto-reply): default audioAsVoice to false 2026-01-10 02:25:19 +00:00
Peter Steinberger d693f02fa7 fix(msteams): download image attachments reliably 2026-01-10 02:25:14 +00:00
Peter Steinberger 003cda73e8 style: fix biome formatting 2026-01-10 02:11:43 +00:00
Peter Steinberger afe6f182ca feat: show effective config in /debug 2026-01-10 03:10:14 +01:00
Peter Steinberger 5a6ae2624e docs: add /config get alias 2026-01-10 03:10:14 +01:00
Peter Steinberger 2dc7872ad1 feat: auto-start sandbox browser 2026-01-10 02:06:21 +00:00
Peter Steinberger 8b579c91a5 feat: add /config chat config updates 2026-01-10 03:01:27 +01:00
Peter Steinberger 63b0a16357 feat(cli): colorize gateway health + daemon output 2026-01-10 03:01:27 +01:00
Peter Steinberger f28a4a34ad refactor: unify inline directives and media fetch 2026-01-10 03:01:04 +01:00
Peter Steinberger 4075895c4c refactor: consolidate reply/media helpers 2026-01-10 02:41:16 +01:00
Peter Steinberger 9cd2662a86 refactor: centralize WhatsApp target normalization 2026-01-10 02:39:52 +01:00
Peter Steinberger 8f8caa8d89 test(telegram): relax media group test timeouts 2026-01-10 02:37:59 +01:00
Peter Steinberger 991f6dda38
Merge pull request #631 from imfing/fix-normalize
fix(whatsapp): normalize targets for groups and E.164
2026-01-10 01:27:33 +00:00
Peter Steinberger 2485701835 fix: hide tui reasoning label when off 2026-01-10 01:25:15 +00:00
Peter Steinberger f634db5c17 fix: signal own reactions match uuid + phone (#632) (thanks @neist)
Co-authored-by: neist <1029724+neist@users.noreply.github.com>
2026-01-10 02:24:57 +01:00
Xin f0700e9778 fix: normalize WhatsApp targets for groups and E.164 (#631) (thanks @imfing) 2026-01-10 02:22:13 +01:00
Peter Steinberger 38e2362be6 fix: remove ack reactions after reply (#633) (thanks @levifig) 2026-01-10 02:14:14 +01:00
Levi Figueira b5858c0148 feat: add removeAckAfterReply option for Discord, Slack, and Telegram
Add `messages.removeAckAfterReply` config option to automatically remove
acknowledgment reactions after the bot sends a reply, reducing visual
clutter while still providing immediate feedback.

Platforms: Discord, Slack, Telegram

Implementation:
- Added removeAckAfterReply boolean field to MessagesConfig (default: false)
- Track ack reaction state in all three platform handlers
- Remove ack reaction after successful reply delivery
- Graceful error handling with verbose logging

Platform-specific:
- Discord: uses removeReactionDiscord()
- Slack: uses removeSlackReaction()
- Telegram: uses setMessageReaction() with empty array

Closes #627
2026-01-10 02:13:46 +01:00
Peter Steinberger a29f5dda2e test(live): gateway smoke across profile-key models 2026-01-10 01:09:41 +00:00
Peter Steinberger 623d1e11f1 refactor: centralize session agent resolution 2026-01-10 01:57:54 +01:00
Peter Steinberger f4b3869f45
Merge pull request #490 from jarvis-medmatic/feat/audio-as-voice-tag
feat(telegram): `[[audio_as_voice]]` tag support
2026-01-10 00:52:02 +00:00
Peter Steinberger c56b2f4bc1 fix: honor audio_as_voice streaming + parse tests (#490) (thanks @jarvis-medmatic) 2026-01-10 01:50:33 +01:00
Peter Steinberger cb10682d3e fix(openai): avoid invalid reasoning replay 2026-01-10 00:45:10 +00:00
Jarvis 5fedfd8d15 chore: format audioAsVoice updates
Co-authored-by: Manuel Hettich <17690367+ManuelHettich@users.noreply.github.com>
2026-01-10 01:44:57 +01:00
Jarvis 8c7d1781bc fix(pi): preserve audio_as_voice tag
- Allow flag-only chunks so audio_as_voice propagates
- Keep reply item scan aware of empty audio tag blocks

Co-authored-by: Manuel Hettich <17690367+ManuelHettich@users.noreply.github.com>
2026-01-10 01:43:51 +01:00
Jarvis 9a7f050568 refactor(telegram): centralize voice decisions
- Share voice compatibility decision logic across send + bot flows
- Keep voice fallback logging consistent
- Simplify voice handling in the audio send path
2026-01-10 01:43:23 +01:00
Jarvis ce786762db fix(telegram): guard voice note sends 2026-01-10 01:43:01 +01:00
Jarvis 2f036f7173 fix(audio): preserve audioAsVoice propagation
- Keep audioAsVoice-only payloads from being filtered out
- Allow empty payloads through when they carry the flag
- Remove temporary debug logs around audioAsVoice buffering

Co-authored-by: Manuel Hettich <17690367+ManuelHettich@users.noreply.github.com>
2026-01-10 01:42:09 +01:00
Jarvis 05a99aa49b feat(telegram): buffer audio blocks for [[audio_as_voice]] tag support
- Add [[audio_as_voice]] detection to splitMediaFromOutput()
- Pass audioAsVoice through onBlockReply callback chain
- Buffer audio blocks during streaming, flush at end with correct flag
- Non-audio media still streams immediately
- Fix: emit payloads with audioAsVoice flag even if text is empty

Co-authored-by: Manuel Hettich <17690367+ManuelHettich@users.noreply.github.com>
2026-01-10 01:41:18 +01:00
Peter Steinberger 43975a39dc fix: gate heartbeat prompt to default agent sessions (#630) (thanks @adam91holt) 2026-01-10 01:32:58 +01:00
Adam Holt c91ec2aab7 fix: only inject heartbeat prompt for default agent
The heartbeat prompt from agents.defaults.heartbeat.prompt was being
injected into the system prompt for ALL agents, causing non-default
agents to read the default agent's identity files and adopt its persona.

Now the heartbeat prompt is only included when the session's agent ID
matches the configured default agent. Other agents receive no heartbeat
section in their system prompt.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 01:32:30 +01:00
Peter Steinberger 5898304fa0 fix: abort runs between tool calls 2026-01-10 01:26:25 +01:00
Peter Steinberger 53ec8e36cb refactor: centralize failover error parsing 2026-01-10 01:26:06 +01:00
Peter Steinberger 82ffcfb181 fix(web): show all WhatsApp shared contacts 2026-01-10 00:22:31 +00:00
Peter Steinberger 20d4773f14 fix(agents): require raw for gateway config.apply (#566) (thanks @sircrumpet) 2026-01-10 00:21:15 +00:00
Peter Steinberger 52565864d1
Merge pull request #619 from rubyrunsstuff/fix/telegram-block-streaming
fix: enable block streaming for Telegram when streamMode is 'block'
2026-01-10 00:16:04 +00:00
Peter Steinberger 1fd7a6e310 fix: keep telegram streamMode draft-only (#619) (thanks @rubyrunsstuff) 2026-01-10 01:14:40 +01:00
Peter Steinberger 08015fbce6
Merge pull request #544 from jeffersonwarrior/fix/cloud-code-assist-api-errors
Fix Cloud Code Assist API errors (429/400)
2026-01-10 00:13:46 +00:00
Peter Steinberger a9bd01b523 refactor: unify contact list summaries 2026-01-10 01:13:38 +01:00
Peter Steinberger 251ed83680 fix: harden Cloud Code Assist failover (#544) (thanks @jeffersonwarrior) 2026-01-10 01:12:46 +01:00
Peter Steinberger d75b302699 style: fix pi-embedded-runner formatting (#623) (thanks @magimetal) 2026-01-10 01:12:22 +01:00
Ruby b4fbf2fe0d fix: enable block streaming for Telegram when streamMode is 'block'
- Fix disableBlockStreaming logic in telegram/bot.ts to properly enable
  block streaming when telegram.streamMode is 'block' regardless of
  blockStreamingDefault setting
- Set minChars default to 1 for Telegram block mode so chunks send
  immediately on newlines/sentences instead of waiting for 800 chars
- Skip coalescing for Telegram block mode when not explicitly configured
  to reduce chunk batching delays
- Fix newline preference to wait for actual newlines instead of breaking
  on any whitespace when buffer is under maxChars

Fixes issue where all Telegram messages were batched into one message
at the end instead of streaming as separate messages during generation.
2026-01-10 01:11:41 +01:00
Jefferson Warrior 5843733978 Fix Cloud Code Assist API errors (429/400)
- Enhanced rate limit detection for Cloud Code Assist quota exhaustion
- Added tool call ID sanitization to fix invalid request format errors
- Integrated Cloud Code Assist format error detection into failover system
- Added comprehensive error pattern matching for Cloud Code Assist APIs

Fixes #cloud-code-assist-api-errors
2026-01-10 01:10:23 +01:00
Peter Steinberger c69c4caa33 fix: polish opencode-zen onboarding (#623) (thanks @magimetal) 2026-01-10 01:09:34 +01:00
Magi Metal 05bd100f7a style: fix formatting 2026-01-10 01:09:34 +01:00
Magi Metal a399fa36c8 feat(onboard): add OpenCode Zen as model provider 2026-01-10 01:09:34 +01:00
Peter Steinberger 9b1f164447 fix: guard small context windows 2026-01-10 01:08:56 +01:00
Peter Steinberger 3554004968 fix: QuickStart provider selection (#485) 2026-01-10 01:08:00 +01:00
Jefferson Warrior 74485f171b CLI: fix Cloud Code Assist 400 API errors and missing session exports
- Add sanitizeToolCallId() to fix Cloud Code Assist tool call ID validation
- Apply sanitization in sanitizeSessionMessagesImages() for toolResult and assistant messages
- Add legacy CONFIG_PATH_CLAWDIS and STATE_DIR_CLAWDIS exports for backward compatibility
- Resolves Cloud Code Assist rejection of invalid tool call IDs with pipe characters
- Fixes missing session export functions that were blocking system startup

Addresses Cloud Code Assist API 400 errors from invalid tool call IDs like 'call_abc123|item_456'
2026-01-10 01:07:51 +01:00
Peter Steinberger 0cb28e26fc
Merge pull request #625 from mahmoudashraf93/fix/whatsapp-contact-cards-multi
fix: include numbers for WhatsApp contact arrays
2026-01-10 00:04:00 +00:00
Peter Steinberger 103dd3af64 fix: keep contact summary counts (#625) (thanks @mahmoudashraf93) 2026-01-10 01:02:28 +01:00
Peter Steinberger 21eebb6d3b fix: limit subagent bootstrap context 2026-01-10 00:01:16 +00:00
Mahmoud Ibrahim d1e10af1e1 WhatsApp: show all contacts in shares 2026-01-10 01:00:00 +01:00
Mahmoud Ibrahim 18338bc60f Style: format contact label helper 2026-01-10 01:00:00 +01:00
Mahmoud Ibrahim fd7450e5b9 WhatsApp: include numbers in contact cards 2026-01-10 01:00:00 +01:00
Peter Steinberger e311dc82e0 refactor: centralize reasoning tag handling 2026-01-10 00:53:48 +01:00
Peter Steinberger 097550c299 fix: centralize verbose overrides and tool stream gating 2026-01-10 00:52:24 +01:00
Peter Steinberger 9a8d3aed26 test: update status expectations for verbose/elevated labels 2026-01-09 23:43:24 +00:00
Peter Steinberger e18080163f fix: simplify verbose/elevated status labels 2026-01-09 23:41:57 +00:00
Peter Steinberger bd10f3d3f1 feat: allow session_status in sandbox 2026-01-09 23:41:57 +00:00
Peter Steinberger a25922a21f fix: clarify sessions_send delivery semantics 2026-01-10 00:34:24 +01:00
Peter Steinberger 96e17d407a fix: filter NO_REPLY prefixes 2026-01-09 23:29:05 +00:00
Peter Steinberger a9a70ea278 fix: persist verbose off and gate tool stream 2026-01-10 00:22:28 +01:00
Peter Steinberger 695be8e92d
Merge pull request #624 from clawdbot/refactor/vcard-utils
refactor: extract vcard parsing helper
2026-01-09 23:16:31 +00:00
Peter Steinberger b6b1b570f9 refactor: extract vcard parsing helper 2026-01-10 00:12:53 +01:00
Peter Steinberger 6016a63162 refactor(web): centralize active web listener resolution 2026-01-09 23:12:29 +00:00
Peter Steinberger 6f6acd94cc
Merge pull request #614 from zknicker/fix/block-stream-think-leak
fix: prevent <think> leakage in block streaming
2026-01-09 23:10:17 +00:00
Peter Steinberger 1277f6e27b fix: prefer FN for WhatsApp contact cards (#622) (thanks @mahmoudashraf93) 2026-01-10 00:08:30 +01:00
Mahmoud Ibrahim 30b3d6ce61 WhatsApp: handle contact cards inbound 2026-01-10 00:07:04 +01:00
Peter Steinberger 51ec578cec fix: suppress <think> leakage + split reasoning output (#614) (thanks @zknicker) 2026-01-10 00:02:13 +01:00
Zach Knickerbocker 2d0ca67c21 fix: prevent <think> leakage in block streaming 2026-01-09 23:58:48 +01:00
Peter Steinberger 88cbe2d275 fix: cap pairing requests and suppress outbound pairing replies 2026-01-09 22:58:18 +00:00
Peter Steinberger 98d0318d4e
refactor: cron payload migration cleanup (#621)
* refactor: centralize cron payload migration

* test: stabilize block streaming mocks

* test: adjust chunker fence-close case
2026-01-09 22:56:55 +00:00
Peter Steinberger 89dc6ebb8b feat(signal): add reaction notifications 2026-01-09 23:53:36 +01:00
Peter Steinberger a18743eabc fix(web): improve WhatsApp Web listener errors (#612, thanks @YuriNachos) 2026-01-09 22:40:58 +00:00
Yurii Chukhlib a9f8719cd2 fix(web): remove provider name from gateway listener error messages
Error messages in sendMessageWhatsApp, sendReactionWhatsApp, and
sendPollWhatsApp included hardcoded \"WhatsApp\" references. This caused
confusion when cron jobs using other providers (e.g., Telegram) failed
with errors mentioning WhatsApp.

Changes error messages to be provider-agnostic while maintaining the
same error handling behavior.

Fixes #461
Fixes #470

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-09 22:40:58 +00:00
Peter Steinberger 5bc3d15bba fix: handle signal reactions safely (#616) (thanks @neist) 2026-01-09 23:39:18 +01:00
Kasper Neist 94e7a98bf2 feat(signal): add reaction message support
- Add SignalReactionMessage type with emoji, targetAuthor, timestamp
- Handle reaction messages in monitor (log and skip for now)
- Prevents reactions from showing as unknown media
2026-01-09 23:37:33 +01:00
Peter Steinberger 3b91148a0a fix: handle fence-close paragraph breaks 2026-01-09 22:20:22 +00:00
Peter Steinberger 22b3bd4415 fix: migrate cron payload channel alias 2026-01-09 22:20:22 +00:00
Peter Steinberger bdee50da6b fix(test): reduce gateway port collisions 2026-01-09 22:18:57 +00:00
Peter Steinberger 2af3853bfa fix(protocol): keep agent provider string 2026-01-09 23:09:10 +01:00
Peter Steinberger 79f5ccc99d fix(gateway): harden agent provider routing 2026-01-09 23:00:36 +01:00
Peter Steinberger 3adec35632 fix: make forced block chunking fence-safe 2026-01-09 21:52:47 +00:00
Peter Steinberger 79af03ba5e fix(auto-reply): tighten block streaming defaults 2026-01-09 22:41:10 +01:00
Peter Steinberger f8bf041396 test(gateway): cover internal provider defaults 2026-01-09 22:40:37 +01:00
Peter Steinberger 40b4341a1d test: fix Windows path in LID mapping test 2026-01-09 21:34:35 +00:00
Peter Steinberger 35083fcb37 fix(gateway): avoid whatsapp fallback for internal runs 2026-01-09 22:33:05 +01:00
Peter Steinberger 53f51786f2 fix: default block streaming coalesce idle to 1s 2026-01-09 22:31:19 +01:00
Peter Steinberger 6c7a27c010 refactor: normalize main session key handling 2026-01-09 22:30:15 +01:00
Peter Steinberger 304ec1abe5 fix(agents): sessions_spawn inherits provider (#528) 2026-01-09 22:21:33 +01:00
Peter Steinberger 55e830b009 fix: harden onboarding for non-systemd environments 2026-01-09 22:17:09 +01:00
Peter Steinberger 402c35b91c refactor(agents): centralize failover normalization 2026-01-09 22:15:06 +01:00
Peter Steinberger 6220106ab2 refactor: centralize main session key resolution 2026-01-09 22:13:20 +01:00
Peter Steinberger c37b77855b
Merge pull request #464 from austinm911/fix/slack-thread-replies
feat(slack): implement configurable reply threading
2026-01-09 21:10:39 +00:00
Peter Steinberger 84046cbad8 fix(slack): mrkdwn + thread edge cases (#464) (thanks @austinm911) 2026-01-09 22:09:02 +01:00
Peter Steinberger c27b1441f7 fix(auth): billing backoff + cooldown UX 2026-01-09 22:00:14 +01:00
Austin Mudd 8890fbcf38 Slack: fix message tool not passing threading context to handleSlackAction 2026-01-09 21:59:51 +01:00
Austin Mudd 8ae0429162 Slack: add mrkdwn formatter for proper bold/italic/strikethrough rendering 2026-01-09 21:59:51 +01:00
Austin Mudd 909c14d443 fix: resolve merge conflicts and fix threading tests
- Update MessageToolOptions type to include Slack threading options
- Remove duplicate threadTs property in slack/actions.ts
- Fix replyThreadTs parameter name in monitor.ts
- Update test to correctly verify 'first' mode threading behavior:
  - 'off' mode: no threading unless already in a thread
  - 'first' mode: first reply starts a thread
- Add new test case for 'first' mode threading
2026-01-09 21:59:51 +01:00
Austin Mudd b4663ed11c Slack: implement replyToMode threading for tool path
- Add shared hasRepliedRef state between auto-reply and tool paths
- Extract buildSlackThreadingContext helper in agent-runner.ts
- Extract resolveThreadTsFromContext helper in slack-actions.ts
- Update docs with clear replyToMode table (off/first/all)
- Add tests for first mode behavior across multiple messages
2026-01-09 21:59:51 +01:00
Austin Mudd 29e6f13b29 Test: add threadTs passthrough test for Slack sendMessage 2026-01-09 21:59:27 +01:00
Austin Mudd 1be8d06cca Slack: expose threadTs in agent sendMessage tool for thread replies 2026-01-09 21:59:27 +01:00
Peter Steinberger 42a0089b3b fix: require explicit system event session keys 2026-01-09 21:59:01 +01:00
Peter Steinberger a5065b354e fix(whatsapp): resolve lid mappings for inbound 2026-01-09 21:46:18 +01:00
Peter Steinberger 5fa26bfec7 feat: add per-agent elevated controls 2026-01-09 20:42:19 +00:00
Peter Steinberger 1a97aadb6b fix: broadcast group history consistency (#547) 2026-01-09 21:39:58 +01:00
Peter Steinberger 7641b142ad refactor: harden broadcast groups 2026-01-09 21:39:58 +01:00
Peter Steinberger 374aa856f2 refactor(agents): centralize failover handling 2026-01-09 21:31:18 +01:00
Peter Steinberger cfeaa34c16 refactor: centralize cli timeout parsing 2026-01-09 21:29:52 +01:00
Peter Steinberger 2bb9716598 fix: write clawdbot config atomically 2026-01-09 21:27:51 +01:00
Peter Steinberger 564caf49bb feat: add config --section 2026-01-09 21:27:51 +01:00
Peter Steinberger 24605379b9 refactor: centralize skills prompt resolution 2026-01-09 21:27:20 +01:00
Peter Steinberger e8dbb350ae fix: honor config timeout in tui 2026-01-09 21:22:50 +01:00
Peter Steinberger 4861f09f78 fix: inject skills prompt list 2026-01-09 21:20:51 +01:00
Peter Steinberger 0297b38ce0 fix(discord): remove unused import 2026-01-09 21:18:26 +01:00
Peter Steinberger 65cb9dc3f7 fix(agents): fail over on billing/credits errors 2026-01-09 21:17:07 +01:00
Peter Steinberger e0089bb4eb
Merge pull request #547 from pasogott/feature/broadcast-groups
feat: add broadcast groups for multi-agent responses
2026-01-09 20:15:42 +00:00
Peter Steinberger 76964162c7 fix: land broadcast groups (#547) (thanks @pasogott) 2026-01-09 21:14:19 +01:00
Nicholas Spisak d1b0a3584f
fix(discord): add zombie connection detection with HELLO timeout
Add 30-second timeout after WebSocket opens to detect when Discord
never sends HELLO (zombie state). If isConnected stays false after
timeout, forces a fresh connection instead of hanging indefinitely.

Relates to #595
2026-01-09 14:12:38 -06:00
Nicholas Spisak 90be8c632a
fix(discord): log gateway debug events for disconnect visibility
Add listener for Carbon GatewayPlugin 'debug' events to capture WebSocket
connection state changes. Critical events (close, reconnect, resume) are
logged at INFO level always; all debug messages logged in verbose mode.

Fixes #595
2026-01-09 14:12:38 -06:00
Peter Steinberger 4121f9e6dc feat(agents): add session_status tool 2026-01-09 21:09:42 +01:00
Peter Steinberger d309d4fe8b fix(discord): log gateway reconnects 2026-01-09 21:06:19 +01:00
Peter Steinberger e73b812236 fix: dedupe telegram updates 2026-01-09 21:06:06 +01:00
sheeek 09769d127f feat: add broadcast groups for multi-agent responses
Enables multiple agents to process the same message simultaneously,
allowing teams of specialized agents with atomic tasks to work together
in the same group using one phone number.

Key features:
- Configure multiple agents per WhatsApp group/DM via routing.broadcast
- Parallel (default) or sequential processing strategies
- Full session isolation (separate history, workspace, tools per agent)
- Minimal code changes (~50 lines in auto-reply.ts)
- Backward compatible with existing routing

Use cases:
- Specialized agent teams (code reviewer + security scanner + docs)
- Multi-language support (EN + DE + ES agents)
- Quality assurance workflows (support + QA agents)
- Task automation (tracker + logger + reporter)

Example config:
{
  "routing": {
    "broadcast": {
      "strategy": "parallel",
      "120363403215116621@g.us": ["alfred", "baerbel", "assistant3"]
    }
  }
}

This enables scaling to hundreds of focused micro-agents on a single
phone number, each handling specific atomic tasks.
2026-01-09 21:05:58 +01:00
Peter Steinberger 6d378ee608 feat(telegram): inline keyboard buttons (#491)
Co-authored-by: Azade <azade@hey.com>
2026-01-09 20:47:03 +01:00
Peter Steinberger fb989cd0f8
Merge pull request #600 from samratjha96/fix/discord-duplicate-messages
fix(queue): deduplicate followup queue entries
2026-01-09 19:45:10 +00:00