Commit Graph

889 Commits

Author SHA1 Message Date
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
09933a74cc feat: improve media auto-detect 2026-01-23 05:47:09 +00:00
Peter Steinberger
a1878d0d3c feat: add slack replyToModeByChatType overrides 2026-01-23 05:38:28 +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
8f0de26e26 fix: honor gateway env token for doctor/security
Co-authored-by: azade-c <azade-c@users.noreply.github.com>
2026-01-23 03:16:52 +00:00
Peter Steinberger
2576cb47c1 fix: improve tool summaries 2026-01-23 01:00:24 +00:00
Peter Steinberger
3dc404530d Merge pull request #1440 from robbyczgw-cla/fix/token-count-after-compaction
fix: update token count display after compaction
2026-01-23 00:10:46 +00:00
Peter Steinberger
fa2bcd3ab7 refactor: require session state for directive handling 2026-01-22 22:42:46 +00:00
Peter Steinberger
3d8a360bbd fix: cover missing session key model switch persist (#1465) (thanks @robbyczgw-cla) 2026-01-22 21:41:05 +00:00
Robby
aefe12da3c test: add unit tests for model switch persist behavior
Tests verify:
- Success message shown when session state available
- Error message shown when sessionEntry missing
- Error message shown when sessionStore missing
- No model message when no /model directive

Covers edge cases for #1435 fix.
2026-01-22 20:40:41 +00:00
Robby
bb30a670c8 fix: only show model switch success when persist succeeds (fixes #1435)
Previously, the /model command would display 'Model set to X' even when
the session state wasn't actually persisted (when sessionEntry, sessionStore,
or sessionKey were missing). This caused confusion as users saw success
messages but the model didn't actually change.

This fix:
- Tracks whether the model override was actually persisted
- Only shows success message when persist happened
- Shows a clear error message when persist fails

AI-assisted: Claude Opus 4.5 via Clawdbot
Testing: lightly tested (code review, no runtime test)
2026-01-22 20:31:06 +00:00
Robby
ef0c75d58c style: fix formatting 2026-01-22 17:47:52 +00:00
Robby
8722e446c4 fix: update token count display after compaction (#1299) 2026-01-22 09:58:07 +00:00
Peter Steinberger
92ff93d424 fix: carry reply tags across streamed chunks 2026-01-22 08:01:34 +00:00
Peter Steinberger
d7f45900aa fix: allow MEDIA local paths with spaces 2026-01-22 07:51:09 +00:00
Peter Steinberger
11f6f2ec07 fix: inherit model overrides for thread sessions 2026-01-22 06:03:23 +00:00
Peter Steinberger
80b1e09be0 fix: subagents list uses command session 2026-01-22 05:43:50 +00:00
Peter Steinberger
c260b5d585 feat: add elevated ask/full modes 2026-01-22 05:41:11 +00:00
Peter Steinberger
c5025bd120 feat: surface repo root in runtime prompt 2026-01-22 05:20:42 +00:00
Peter Steinberger
54d667f194 fix: localize system event timestamps 2026-01-22 04:15:39 +00:00
Peter Steinberger
69aad2d1b2 fix: default envelope timestamps to local 2026-01-22 04:10:06 +00:00
Peter Steinberger
c2b25dac8e fix: msteams attachments + plugin prompt hints
Co-authored-by: Christof <10854026+Evizero@users.noreply.github.com>
2026-01-22 03:37:29 +00:00
Peter Steinberger
258fe35d5b fix: finish model list alias + heartbeat session (#1256) (thanks @zknicker) 2026-01-22 01:36:58 +00:00
Peter Steinberger
ca5b9edbdf test: update fuzzy model selection expectations (#1372) (thanks @zerone0x) 2026-01-22 01:16:59 +00:00
Peter Steinberger
ee4e9b0758 fix: enforce Mistral tool call ids (#1372) (thanks @zerone0x) 2026-01-22 00:43:15 +00:00
Peter Steinberger
cf3666c416 fix: refine model directive handling 2026-01-22 00:29:27 +00:00
Peter Steinberger
6b7bcc9e8e fix: stabilize ci 2026-01-21 22:59:11 +00:00
Peter Steinberger
147e28ba95 Merge pull request #1398 from vignesh07/feat/models-command
fix(chat): add /models and stop /model from dumping full model list
2026-01-21 21:54:16 +00:00
Vignesh Natarajan
71a2cf71ad fix(models): include configured providers/models + ignore page with all 2026-01-21 13:14:18 -08:00
Vignesh Natarajan
8cfa2a6728 fix(models): handle out-of-range pages 2026-01-21 12:54:02 -08:00
Peter Steinberger
d3647b2c65 refactor: unify threading contexts 2026-01-21 20:35:12 +00:00
Vignesh Natarajan
71be660bbb feat(commands): add /models and fix /model listing UX 2026-01-21 11:53:29 -08:00
Echo
ba1f1f1e5d feat(sessions): add channelIdleMinutes config for per-channel session idle durations (#1353)
* feat(sessions): add channelIdleMinutes config for per-channel session idle durations

Add new `channelIdleMinutes` config option to allow different session idle
timeouts per channel. For example, Discord sessions can now be configured
to last 7 days (10080 minutes) while other channels use shorter defaults.

Config example:
  sessions:
    channelIdleMinutes:
      discord: 10080  # 7 days

The channel-specific idle is passed as idleMinutesOverride to the existing
resolveSessionResetPolicy, integrating cleanly with the new reset policy
architecture.

* fix

* feat: add per-channel session reset overrides (#1353) (thanks @cash-echo-bot)

---------

Co-authored-by: Cash Williams <cashwilliams@gmail.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-01-21 19:10:31 +00:00
Peter Steinberger
f5ffaf0117 feat(queue): add per-channel debounce overrides 2026-01-21 18:50:55 +00:00
Peter Steinberger
70172800c5 test: align NO_REPLY typing expectations 2026-01-21 17:12:50 +00:00
Peter Steinberger
d9b07b5e76 fix: start instant typing at run start 2026-01-21 17:12:50 +00:00
Peter Steinberger
cad71dfd3b Merge pull request #1369 from tyler6204/fix/bluebubbles-gc-guid-resolution
BlueBubbles: short ID mapping, action resolution, and threading/typing fixes
2026-01-21 17:06:09 +00:00
Peter Steinberger
f02e4200b1 fix: model picker allowlist fallbacks 2026-01-21 11:22:33 +00:00
Peter Steinberger
177d14ce35 fix: limit /model list output 2026-01-21 10:47:37 +00:00
Peter Steinberger
12e7b3a571 refactor: centralize sandbox runtime label 2026-01-21 09:07:21 +00:00
Peter Steinberger
b72917c8a2 fix: report sandboxed runtime in status 2026-01-21 08:59:32 +00:00
Tyler Yust
1291588784 feat: enhance message context with full ID support for replies and caching
- Updated message processing to include full message IDs alongside short IDs for better context resolution.
- Improved reply handling by caching inbound messages, allowing for accurate sender and body resolution without exposing dropped content.
- Adjusted tests to validate the new full ID properties and their integration into the message handling workflow.
2026-01-21 00:45:01 -08:00
Tyler Yust
b7fcc1045c feat: implement short ID mapping for BlueBubbles messages and enhance reply context caching
- Added functionality to resolve short message IDs to full UUIDs and vice versa, optimizing token usage.
- Introduced a reply cache to store message context for replies when metadata is omitted in webhook payloads.
- Updated message handling to utilize short IDs for outbound messages and replies, improving efficiency.
- Enhanced error messages to clarify required parameters for actions like react, edit, and unsend.
- Added tests to ensure correct behavior of new features and maintain existing functionality.
2026-01-21 00:45:01 -08:00
SocialNerd42069
d8e01c195e fix(slack): respect verbose setting and preserve thread context for tool notifications
Fixes two bugs in Slack tool notification delivery:

1. Tool notifications ignored verbose=false - normalized verbose values so
   boolean false/'false' are properly treated as 'off'

2. Thread context lost - Slack outbound adapter now falls back to threadId
   when replyToId is missing, and MessageThreadId is set for thread replies

Closes #1333
2026-01-21 06:29:36 +00:00
Peter Steinberger
5b77132a53 fix: normalize model override auth handling 2026-01-21 06:00:21 +00:00
Peter Steinberger
5f6f8b812a feat: add /allowlist command 2026-01-21 05:34:53 +00:00
Peter Steinberger
ef13e11eba Merge pull request #1350 from Jackten/fix/fallback-authprofile-provider-scope
test(auto-reply): regression for authProfileId across provider fallback
2026-01-21 03:53:07 +00:00
Peter Steinberger
25114602b6 fix: guard media status parts filter 2026-01-21 03:43:42 +00:00
Peter Steinberger
e693d987b8 fix: hide empty status rows 2026-01-21 03:32:16 +00:00
Vultr-Clawd Admin
e0ba4fa4f3 test(auto-reply): drop auth profile on provider fallback 2026-01-20 23:07:33 -04:00