Commit Graph

1849 Commits (0bc50abd73254bdef295e0e0560db81d77e51f14)

Author SHA1 Message Date
Peter Steinberger 7842109609 fix: report auth label from configured order 2026-01-09 05:17:27 +00:00
Peter Steinberger f9fe067f68 fix: normalize anthropic model ids 2026-01-09 05:07:16 +00:00
Peter Steinberger 9114331218 fix: serialize claude cli runs 2026-01-09 04:58:21 +00:00
Peter Steinberger aa5e75e853 fix: align tool rename fallout 2026-01-09 05:54:34 +01:00
Claude 333832c2e1 fix: bypass Anthropic OAuth token blocking for tool names
Anthropic blocks specific lowercase tool names (bash, read, write, edit)
when using OAuth tokens. This fix:

1. Renames blocked tools to capitalized versions (Bash, Read, Write, Edit)
   in pi-tools.ts via renameBlockedToolsForOAuth()

2. Passes all tools as customTools in splitSdkTools() to bypass
   pi-coding-agent's built-in tool filtering, which expects lowercase names

The capitalized names work with both OAuth tokens and regular API keys.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 05:48:54 +01:00
Peter Steinberger ef1ce5d9a8 fix: avoid claude-cli session id collisions 2026-01-09 04:20:58 +00:00
Peter Steinberger 64fc5fa9fc fix: allow default model outside allowlist 2026-01-09 04:18:30 +00:00
Peter Steinberger 7e4d5c9f84 test: align status and google-shared expectations 2026-01-09 05:03:12 +01:00
Peter Steinberger 709d5d9cd6 fix: add spacing to daemon status output 2026-01-09 03:52:51 +00:00
Peter Steinberger 9a8fe4d683 feat(agent): add claude cli runner 2026-01-09 04:52:37 +01:00
Peter Steinberger 8e27ea7371 feat: add raw stream logging flags 2026-01-09 03:45:21 +00:00
Peter Steinberger 69546d563d fix: combine status usage and cost line 2026-01-09 03:45:01 +00:00
Peter Steinberger 16cfd24967 fix: colorize daemon status output 2026-01-09 03:22:02 +00:00
Peter Steinberger 3e19f82af2 fix: repair status reply call 2026-01-09 03:18:20 +00:00
Peter Steinberger d8a23cf5ab fix: restore emoji-rich status output 2026-01-09 03:15:33 +00:00
Peter Steinberger b3b84ffefa fix: fallback /model list when catalog is unavailable 2026-01-09 03:56:19 +01:00
Peter Steinberger 0cbc5fea93 fix: keep status for directive-only messages 2026-01-09 03:46:00 +01:00
Peter Steinberger dc81d0a649 fix: improve /status auth label 2026-01-09 03:39:02 +01:00
Peter Steinberger 75d193a284 test: update google shared expectations 2026-01-09 02:34:16 +00:00
Peter Steinberger 3c79d5c711 fix: keep /status usage filtering 2026-01-09 03:31:02 +01:00
Peter Steinberger 151523f47b feat: add usage cost reporting 2026-01-09 02:29:54 +00:00
Peter Steinberger 1a295d9460 fix: improve status usage filtering and directives 2026-01-09 03:18:47 +01:00
Peter Steinberger 84f668f9c5 test: align google-shared expectations with pi-ai 0.40.0 2026-01-09 03:12:32 +01:00
Peter Steinberger 468889abef fix: refine status usage and elevated directives 2026-01-09 03:09:56 +01:00
Peter Steinberger 8a3e100ad1 test: update google-shared expectations 2026-01-09 03:04:16 +01:00
Kasper Neist 3b78870f33 feat(system-prompt): add messaging guidance section
Adds a brief 'Messaging' section to the system prompt to guide agents on:
- Reply in session = auto-routes to source provider
- Cross-session = use sessions_send
- Never use bash/curl for provider messaging

This helps prevent agents from using shell workarounds for messaging
when Clawdbot already handles routing internally.
2026-01-09 03:00:40 +01:00
Peter Steinberger 0a722de65c test: cover log line parsing 2026-01-09 02:54:04 +01:00
Peter Steinberger 3a99ac7e9a fix: honor mention-bypass for group commands 2026-01-09 02:52:44 +01:00
Peter Steinberger efa5f0bfe0 feat: improve logs output and docs 2026-01-09 02:51:17 +01:00
Peter Steinberger e1789ba9e5 fix: set gemini default model for api-key auth (#489) - thanks @jonasjancarik 2026-01-09 02:49:42 +01:00
Jonáš Jančařík 302d51fd40 feat: add Gemini API key onboarding 2026-01-09 02:45:15 +01:00
Ogulcan Celik 7bb0841f42 fix: prevent systemd hang on restart with podman sandboxes
Add KillMode=process to generated systemd unit file. Without this,
podman's conmon processes (which monitor sandbox containers) block
shutdown since they're children of the gateway process.

This preserves the desired behavior of keeping containers alive
across restarts while preventing systemd from waiting indefinitely.
2026-01-09 02:37:00 +01:00
Peter Steinberger a738ade0ec chore: update dependencies 2026-01-09 02:34:39 +01:00
Peter Steinberger 97635a8966 test: assert WhatsApp queued routing context (#534) thanks @mcinteerj 2026-01-09 02:04:05 +01:00
Peter Steinberger f2246df875 fix: route WhatsApp queued replies to sender (#534) 2026-01-09 02:03:30 +01:00
Jake a52e75d978 WhatsApp: fix routing for queued messages by using correct OriginatingTo 2026-01-09 02:01:33 +01:00
Peter Steinberger 455723375e fix: show directive options on query 2026-01-09 01:40:44 +01:00
Peter Steinberger 948ce5eb5f feat(models): add oauth auth health 2026-01-09 00:34:38 +00:00
Jonathan D. Rhyne debdd2aa95 fix(tui): status bar not updating after /verbose, /reasoning, /think commands
The status bar refresh failed because refreshSessionInfo() compared
currentSessionKey (e.g. 'main') against the canonical session keys
returned by the gateway (e.g. 'agent:default:main').

This fix uses parseAgentSessionKey to also match canonical keys by
their 'rest' component, allowing 'main' to match 'agent:default:main'.

Fixes: status bar showing stale values after setting changes
AI-assisted: yes (Claude)
Testing: lightly tested (build passes, logic verified)
2026-01-09 01:05:10 +01:00
Peter Steinberger 714e170c16 feat(tui): add agent picker and agents list rpc 2026-01-09 01:05:10 +01:00
Peter Steinberger e5dbba7b67 fix: sort imports for lint 2026-01-09 00:57:17 +01:00
Peter Steinberger 27adabbeea test: cover reasoning directive spacing (thanks @joshp123) (#539) 2026-01-09 00:51:05 +01:00
Peter Steinberger f666f60731 fix: preserve inline directive spacing tests (thanks @joshp123) (#539) 2026-01-09 00:37:40 +01:00
Josh Palmer 43545a4864 🤖 codex: preserve spacing after inline directives (issue-telegram-inline-spacing) 2026-01-09 00:37:40 +01:00
Peter Steinberger 4e92ccc0dd style: format 2026-01-09 00:33:09 +01:00
Peter Steinberger 71309c064a fix: drop redundant telegram audit union 2026-01-09 00:33:09 +01:00
Peter Steinberger 01b8f4582f fix: align discord monitor + whatsapp activity 2026-01-09 00:33:09 +01:00
Peter Steinberger e09708e82d feat: sync skills into sandbox workspace 2026-01-09 00:33:09 +01:00
Peter Steinberger 561fa99d95 feat(providers): show status spinner message 2026-01-08 23:30:38 +00:00
Peter Steinberger 7ece3717e6 refactor(pairing): centralize reply formatting 2026-01-08 23:29:23 +00:00
Peter Steinberger e0439df4ce feat(pairing): show sender ids across providers 2026-01-08 23:19:13 +00:00
Peter Steinberger 7c7858a519 refactor(signal): normalize sender identity 2026-01-08 23:08:25 +00:00
Kasper Neist 9e9f2babeb fix(signal): use sourceUuid as fallback when sourceNumber is null
Users without a visible phone number (like some Signal users)
were being silently dropped. Now falls back to UUID for sender ID.

- Add sourceUuid to SignalEnvelope type
- Use sourceUuid when sourceNumber is not available
- Only check against bot account when sourceNumber exists (avoid UUID comparison issues)
2026-01-08 23:08:25 +00:00
Peter Steinberger 490bbd10fc feat(telegram): show user id in pairing 2026-01-09 00:01:23 +01:00
Shadow 9f8336c92b
Discord: harden gateway resilience 2026-01-08 16:52:44 -06:00
Peter Steinberger 769b76cd40 test(provider-activity): restore real timers 2026-01-08 23:52:07 +01:00
Peter Steinberger 69f8af530d feat(providers): improve doctor + status probes 2026-01-08 23:48:37 +01:00
Peter Steinberger 41d484d239 test: cover browser and canvas verbose summaries 2026-01-08 23:48:37 +01:00
Peter Steinberger 2f1ce51b2c test: stabilize doctor + bash tool tests 2026-01-08 23:44:54 +01:00
Peter Steinberger cdfae0b9d3 fix(daemon): normalize audit paths 2026-01-08 22:28:51 +00:00
Peter Steinberger ed80860c34 chore(format): apply biome fixes 2026-01-08 22:22:17 +00:00
Peter Steinberger 1f215848be chore(test): align auth choice options formatting 2026-01-08 23:18:33 +01:00
Peter Steinberger b01d7e39d5 fix(onboarding): preflight claude cli keychain 2026-01-08 23:18:33 +01:00
Peter Steinberger 36fa3c3cd3 fix: improve ws close diagnostics 2026-01-08 22:18:07 +00:00
Peter Steinberger 1cf8503017 fix(daemon): audit runtime best practices 2026-01-08 22:18:07 +00:00
Peter Steinberger cd2f3bd355 feat(status): add Telegram/WhatsApp troubleshooting warnings 2026-01-08 23:14:11 +01:00
Peter Steinberger a33271d374 refactor: share paren-aware chunk break scan 2026-01-08 23:09:34 +01:00
Peter Steinberger 7392387ec1 feat(status): warn on Discord message content intent 2026-01-08 23:07:34 +01:00
Peter Steinberger b48ed56635 test: add DM elevated regression coverage 2026-01-08 22:58:15 +01:00
Peter Steinberger 014667e00b fix: tighten group elevated targeting 2026-01-08 22:57:18 +01:00
Peter Steinberger cda2025c49 fix: align env config schema 2026-01-08 22:57:18 +01:00
Peter Steinberger 59f89678b2 feat: allow inline env vars in config 2026-01-08 22:57:18 +01:00
Peter Steinberger 9a1267b530 fix(doctor): run legacy migrations in non-interactive 2026-01-08 21:37:22 +00:00
Peter Steinberger 5b46214379 refactor(cron): centralize telegram targets + delivery helpers 2026-01-08 21:36:53 +00:00
Peter Steinberger 5939dff092 fix: avoid synthesizing agent defaults 2026-01-08 22:26:29 +01:00
Peter Steinberger 2c7d64232e feat: enable adaptive context pruning by default 2026-01-08 22:23:03 +01:00
Peter Steinberger d58cdf7c9f fix: normalize gateway cli option strings 2026-01-08 22:18:06 +01:00
Peter Steinberger 35ba99c245 fix: honor non-interactive legacy migrations 2026-01-08 22:13:57 +01:00
Peter Steinberger e75ca23e7d test(cron): cover telegram topic delivery (#478) (thanks @nachoiacovino) 2026-01-08 21:13:39 +00:00
Nacho Iacovino 5391f1141e fix(cron): parse :topic: suffix for Telegram topic delivery
When cron jobs specify a Telegram topic in the 'to' field like
'-1003420657307:topic:60', the delivery code now correctly parses
this into separate chatId and messageThreadId values.

Previously, the entire string was passed as chatId, causing messages
to fail delivery to forum topics.
2026-01-08 21:12:15 +00:00
Peter Steinberger 699ba410fe fix: resolve WhatsApp LID inbound mapping 2026-01-08 22:08:54 +01:00
Josh Palmer 2fae8eda66 🤖 codex: strip empty assistant blocks from history (#210) 2026-01-08 21:53:33 +01:00
Peter Steinberger 884e734809 feat(doctor): audit config + state permissions 2026-01-08 21:51:34 +01:00
Peter Steinberger 2d4ec35e1c feat(doctor): add repair/force flows 2026-01-08 21:47:35 +01:00
Peter Steinberger 0373574f0b refactor(telegram): centralize target parsing 2026-01-08 21:38:59 +01:00
Peter Steinberger 88039a69a2 style(cli): format daemon config warnings 2026-01-08 21:38:54 +01:00
Peter Steinberger ea748f9440 fix(doctor): handle missing service readCommand 2026-01-08 21:38:51 +01:00
Peter Steinberger 01641b34ea feat(doctor): audit supervisor config + docs 2026-01-08 21:28:48 +01:00
Peter Steinberger 58a9e35233 style(cron): format telegram target tests 2026-01-08 21:23:07 +01:00
Peter Steinberger 5fea53d89c fix(cron): parse telegram targets with prefixes (thanks @mitschabaude-bot) 2026-01-08 21:23:07 +01:00
Azade 3a8d8bc6a4 fix(daemon): align systemd unit with documentation
Align generated systemd service file with docs:
https://docs.clawd.bot/gateway#supervision-systemd-user-unit

Adds:
- After=network-online.target
- Wants=network-online.target
- RestartSec=5
2026-01-08 21:16:19 +01:00
Peter Steinberger 31fb5867e8 refactor(outbound): centralize telegram account defaults 2026-01-08 21:05:01 +01:00
Peter Steinberger 7905a27416 style: format gateway-cli log lines 2026-01-08 20:04:10 +00:00
Peter Steinberger 04e0e10411 fix: restore hidden gateway-daemon alias 2026-01-08 19:54:23 +00:00
Peter Steinberger 871c9e5286 fix(heartbeat): telegram accountId + cron jobId compat (#516, thanks @YuriNachos) 2026-01-08 20:47:22 +01:00
Yurii Chukhlib 9d42972b8a fix(heartbeat): pass accountId for Telegram delivery
Heartbeat Telegram delivery was failing when the bot token was
configured only via telegram.botToken in config (without TELEGRAM_BOT_TOKEN
environment variable).

Root cause: deliverOutboundPayloads was called without accountId parameter,
so sendMessageTelegram couldn't determine which account to use and couldn't
find the token from config.

Fix: Resolve default Telegram accountId when provider is "telegram" and pass
it to deliverOutboundPayloads. This follows the same pattern used elsewhere in
the codebase (e.g., cron uses resolveTelegramToken).

Changes:
- Added import for resolveDefaultTelegramAccountId
- Added accountId resolution for telegram provider
- Updated deliverOutboundPayloads call to include accountId

Fixes #318

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 20:47:22 +01:00
Yurii Chukhlib 4dac298ae2 fix(cron): use jobId parameter instead of id for AI tool schema
Fixes parameter mismatch between AI tool schema and internal validation.
The TypeBox schema now uses `jobId` for update/remove/run/runs actions,
matching what users expect based on the returned job objects.

Changes:
- Changed parameter from `id` to `jobId` in TypeBox schema for update/remove/run/runs
- Updated execute function to read `jobId` parameter
- Updated tests to use `jobId` in input parameters

The gateway protocol still uses `id` internally - the tool now maps
`jobId` from the AI to `id` for the gateway call.

Fixes #185

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 20:47:22 +01:00
Peter Steinberger 4a918ccf47 fix: avoid splitting outbound chunks inside parentheses (#499) — thanks @philipp-spiess 2026-01-08 20:39:28 +01:00
Philipp Spiess 4082b90aa4 Chunking: avoid splits inside parentheses 2026-01-08 20:38:00 +01:00
Peter Steinberger ba19173b96 test: cover status model provider prefix 2026-01-08 20:23:38 +01:00