Commit Graph

7514 Commits

Author SHA1 Message Date
Sergii Kozak
b629fe6ded Discord: honor accountId across channel actions (refs #1489) 2026-01-23 00:50:50 -08:00
Sergii Kozak
b683a3c933 Discord: preserve accountId in message actions (refs #1489) 2026-01-22 23:51:58 -08:00
Peter Steinberger
9c9bd7bfdc fix: sanitize assistant session text (#1456) (thanks @zerone0x) 2026-01-23 07:05:31 +00:00
Peter Steinberger
09f78e2066 fix: prioritize Anthropic token auth option 2026-01-23 07:04:18 +00:00
zerone0x
668f8a1f29 fix: sanitize tool call text in sessions-helpers extractAssistantText
Adds sanitization to extractAssistantText in sessions-helpers.ts to
prevent tool call text from leaking to users. Previously, messages
retrieved from chat history via sessions-helpers.ts could expose:

- Minimax XML tool calls (<invoke>...</invoke>)
- Downgraded tool call markers ([Tool Call: name (ID: ...)])
- Thinking tags (<think>...</think>)

This fix:
- Exports the stripping functions from pi-embedded-utils.ts
- Adds a new sanitizeTextContent helper in sessions-helpers.ts
- Updates extractAssistantText to sanitize before returning
- Updates extractMessageText in commands-subagents.ts to sanitize

Fixes #1269

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 07:03:26 +00:00
Peter Steinberger
981cf00d19 fix(tui): hide off think/verbose in footer 2026-01-23 07:02:56 +00:00
Peter Steinberger
5c1f8f6f4d docs: highlight compaction safeguards in changelog 2026-01-23 06:41:23 +00:00
Peter Steinberger
4134a0e457 test: avoid double cron finish wait 2026-01-23 06:40:14 +00:00
Peter Steinberger
0598561c63 test: harden onboarding/discord/telegram test setup 2026-01-23 06:38:16 +00:00
Peter Steinberger
80f03adc9c test: stabilize cron + async search timings 2026-01-23 06:38:16 +00:00
Dave Lauer
0c045bf135 feat(compaction): add adaptive chunk sizing, progressive fallback, and UI indicator (#1466)
* fix(ui): allow relative URLs in avatar validation

The isAvatarUrl check only accepted http://, https://, or data: URLs,
but the /avatar/{agentId} endpoint returns relative paths like /avatar/main.
This caused local file avatars to display as text instead of images.

Fixes avatar display for locally configured avatar files.

* fix(gateway): resolve local avatars to URL in HTML injection and RPC

The frontend fix alone wasn't enough because:
1. serveIndexHtml() was injecting the raw avatar filename into HTML
2. agent.identity.get RPC was returning raw filename, overwriting the
   HTML-injected value

Now both paths resolve local file avatars (*.png, *.jpg, etc.) to the
/avatar/{agentId} endpoint URL.

* feat(compaction): add adaptive chunk sizing and progressive fallback

- Add computeAdaptiveChunkRatio() to reduce chunk size for large messages
- Add isOversizedForSummary() to detect messages too large to summarize
- Add summarizeWithFallback() with progressive fallback:
  - Tries full summarization first
  - Falls back to partial summarization excluding oversized messages
  - Notes oversized messages in the summary output
- Add SAFETY_MARGIN (1.2x) buffer for token estimation inaccuracy
- Reduce MIN_CHUNK_RATIO to 0.15 for very large messages

This prevents compaction failures when conversations contain
unusually large tool outputs or responses that exceed the
summarization model's context window.

* feat(ui): add compaction indicator and improve event error handling

Compaction indicator:
- Add CompactionStatus type and handleCompactionEvent() in app-tool-stream.ts
- Show '🧹 Compacting context...' toast while active (with pulse animation)
- Show '🧹 Context compacted' briefly after completion
- Auto-clear toast after 5 seconds
- Add CSS styles for .callout.info, .callout.success, .compaction-indicator

Error handling improvements:
- Wrap onEvent callback in try/catch in gateway.ts to prevent errors
  from breaking the WebSocket message handler
- Wrap handleGatewayEvent in try/catch with console.error logging
  to isolate errors and make them visible in devtools

These changes address UI freezes during heavy agent activity by:
1. Showing users when compaction is happening
2. Preventing uncaught errors from silently breaking the event loop

* fix(control-ui): add agentId to DEFAULT_ASSISTANT_IDENTITY

TypeScript inferred the union type without agentId when falling back to
DEFAULT_ASSISTANT_IDENTITY, causing build errors at control-ui.ts:222-223.
2026-01-23 06:32:30 +00:00
Peter Steinberger
0d725a3588 fix: reduce Slack WebClient retries 2026-01-23 06:31:53 +00:00
Peter Steinberger
ea165b6fac fix: fall back to non-PTY exec 2026-01-23 06:27:26 +00:00
Peter Steinberger
12700696f8 test: trim plugin + telegram test setup 2026-01-23 06:22:09 +00:00
Peter Steinberger
9c5a339d0e test(memory): speed up batch coverage 2026-01-23 06:22:09 +00:00
Peter Steinberger
35e20753e7 test(agents): merge sessions_spawn group announce coverage 2026-01-23 06:22:09 +00:00
Peter Steinberger
e2a98bc69c test(commands): streamline onboarding tests 2026-01-23 06:22:09 +00:00
Peter Steinberger
9513dec35f test(gateway): consolidate server suites for speed 2026-01-23 06:22:09 +00:00
ganghyun kim
d72a8a5cd6 fix: clarify Discord onboarding hint (#1487)
Thanks @kyleok.

Co-authored-by: Ganghyun Kim <58307870+kyleok@users.noreply.github.com>
2026-01-23 06:11:41 +00:00
Peter Steinberger
cf2d0645fb fix: always skip browser opens in tests 2026-01-23 06:00:21 +00:00
Peter Steinberger
389cafd078 fix: extend gateway chat test timeout on windows 2026-01-23 05:55:35 +00:00
Peter Steinberger
a9b0f99d48 fix: gateway summary lookup + test browser opens 2026-01-23 05:54:51 +00:00
Peter Steinberger
eeda206294 docs: update media auto-detect 2026-01-23 05:47:16 +00:00
Peter Steinberger
436cb68861 test: add media auto-detect coverage 2026-01-23 05:47:13 +00:00
Peter Steinberger
09933a74cc feat: improve media auto-detect 2026-01-23 05:47:09 +00:00
Peter Steinberger
0892eefa2b docs: expand slack replyToModeByChatType examples 2026-01-23 05:38:28 +00:00
Peter Steinberger
a1878d0d3c feat: add slack replyToModeByChatType overrides 2026-01-23 05:38:28 +00:00
Peter Steinberger
281c7e9905 fix: improve matrix direct room resolution (#1436) (thanks @sibbl) (#1486)
* fix: improve matrix direct room resolution (#1436) (thanks @sibbl)

* docs: update changelog for matrix fix (#1486) (thanks @sibbl)
2026-01-23 05:38:04 +00:00
Sebastian Schubotz
78b8f172a3 fix(matrix): broken import and enhance direct room resolve logic (#1436)
* fix(matrix): fix broken import again

* fix(matrix): improve error handling and fallback logic in resolveDirectRoomId
2026-01-23 05:35:01 +00:00
Stefan Galescu
aa3972d93d feat(slack): add dm-specific replyToMode configuration (#1442)
Adds support for separate replyToMode settings for DMs vs channels:

- Add channels.slack.dm.replyToMode for DM-specific threading
- Keep channels.slack.replyToMode as default for channels
- Add resolveSlackReplyToMode helper to centralize logic
- Pass chatType through threading resolution chain

Usage:
```json5
{
  channels: {
    slack: {
      replyToMode: "off",     // channels
      dm: {
        replyToMode: "all"    // DMs always thread
      }
    }
  }
}
```

When dm.replyToMode is set, DMs use that mode; channels use the
top-level replyToMode. Backward compatible when not configured.
2026-01-23 05:13:23 +00:00
Peter Steinberger
865ede2731 test: harden docker onboarding waits 2026-01-23 05:10:59 +00:00
Travis Irby
f653b57aee hydrate files from thread root message on replies
When replying to a Slack thread, files attached to the root message were
  not being fetched. The existing `resolveSlackThreadStarter()` fetched the
  root message text via `conversations.replies` but ignored the `files[]`
  array in the response.

  Changes:
  - Add `files` to `SlackThreadStarter` type and extract from API response
  - Download thread starter files when the reply message has no attachments
  - Add verbose log for thread starter file hydration

  Fixes issue where asking about a PDF in a thread reply would fail because
  the model never received the file content from the root message.
2026-01-23 05:10:36 +00:00
Neo
e1f68407fb fix: follow soul.md more closely (#1434)
* Agents: honor SOUL.md persona guidance

* fix: harden SOUL.md detection (#1434) (thanks @neooriginal)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-01-23 05:00:13 +00:00
Tak hoffman
bf4a5b3987 CLI: fix Windows gateway startup 2026-01-23 04:47:01 +00:00
Peter Steinberger
74cfee1395 docs: note #1482 in changelog 2026-01-23 04:38:08 +00:00
Peter Steinberger
4b7726fed7 fix: harden BlueBubbles voice memos (#1477) (thanks @Nicell) 2026-01-23 04:38:08 +00:00
Clawd
172b351f73 feat(bluebubbles): add asVoice support for voice memos
Add asVoice parameter to sendBlueBubblesAttachment that converts audio
to iMessage voice memo format (Opus CAF at 48kHz) and sets isAudioMessage
flag in the BlueBubbles API.

This follows the existing asVoice pattern used by Telegram.

- Convert audio to Opus CAF format using ffmpeg when asVoice=true
- Set isAudioMessage=true in BlueBubbles attachment API
- Pass asVoice through action handler and media-send
2026-01-23 04:34:19 +00:00
Peter Steinberger
aada663f26 feat: refine onboarding hatch flow 2026-01-23 04:32:23 +00:00
Peter Steinberger
1fce0abe13 test: speed up gateway suite setup 2026-01-23 04:28:02 +00:00
Rodrigo Uroz
b5bf4716c7 fix: read Slack thread replies for message reads (#1450) (#1450)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Rodrigo Uroz <rodrigouroz@users.noreply.github.com>
2026-01-23 04:17:45 +00:00
Peter Steinberger
fc24be2173 refactor: add config logging helpers 2026-01-23 04:16:39 +00:00
Peter Steinberger
04bc47cb9a fix: put plugin descriptions under source 2026-01-23 04:02:42 +00:00
Peter Steinberger
a93fbf4af0 refactor: centralize config update logging 2026-01-23 04:01:26 +00:00
Paulo Portella
93b81197da docs: add pauloportella to clawtributors 2026-01-23 03:58:57 +00:00
Peter Steinberger
bd5e06d94c chore: add open-prose license 2026-01-23 03:53:03 +00:00
Peter Steinberger
3ad48d3786 fix: prefer ~ for home paths in output 2026-01-23 03:44:31 +00:00
Peter Steinberger
07a3c11404 fix: resolve changelog merge markers 2026-01-23 03:44:14 +00:00
Peter Steinberger
62cc5256c8 Merge pull request #1432 from tobiasbischoff/main
fix(auth): skip auth profiles in cooldown during selection and rotation
2026-01-23 03:35:25 +00:00
Peter Steinberger
476020008c Merge origin/main into pr-1432 2026-01-23 03:35:16 +00:00
Peter Steinberger
c23ecdc487 docs: add changelog entry for #1432 2026-01-23 03:31:42 +00:00