Commit Graph

156 Commits (3e1ed0032d650ca5cad7d6dbafc890a45ffbb9e2)

Author SHA1 Message Date
Peter Steinberger f66b23de75 chore(release): bump versions to 2026.2.20 9 months ago
Peter Steinberger b0e55283d5 chore: bump release metadata to 2026.2.19 9 months ago
zerone0x 3feb7fc3a3
fix(matrix): detect mentions in formatted_body matrix.to links (#16941)
* fix(matrix): detect mentions in formatted_body matrix.to links

Many Matrix clients (including Element) send mentions using HTML links
in formatted_body instead of or in addition to the m.mentions field:

```json
{
  "formatted_body": "<a href=\"https://matrix.to/#/@bot:matrix.org\">Bot</a>: hello",
  "m.mentions": null
}
```

This change adds detection for matrix.to links in formatted_body,
supporting both plain and URL-encoded user IDs.

Changes:
- Add checkFormattedBodyMention() helper function
- Check formatted_body in resolveMentions()
- Add comprehensive test coverage

Fixes #6982

* Update extensions/matrix/src/matrix/monitor/mentions.ts

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: zerone0x <zerone0x@users.noreply.github.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
9 months ago
Mariano 45db2aa0cd
Security: disable plugin runtime command execution primitive (#20828)
Co-authored-by: mbelinky <mbelinky@users.noreply.github.com>
9 months ago
Peter Steinberger 983a68c23e test(matrix): cover directory context and group exact-match resolution 9 months ago
Peter Steinberger eb4f1e765c refactor(matrix): dedupe directory/target match helpers 9 months ago
Peter Steinberger 98fac87a9e test(matrix): add coverage for deduped action helpers 9 months ago
Peter Steinberger f5c3702191 refactor(matrix): dedupe action limit and pin/reaction helpers 9 months ago
Peter Steinberger 4bf3338834 chore: bump version to 2026.2.18 unreleased 9 months ago
Peter Steinberger b8b43175c5 style: align formatting with oxfmt 0.33 9 months ago
Peter Steinberger 31f9be126c style: run oxfmt and fix gate failures 9 months ago
Peter Steinberger 6dcc052bb4 fix: stabilize model catalog and pi discovery auth storage compatibility 9 months ago
Tyler Yust 087dca8fa9
fix(subagent): harden read-tool overflow guards and sticky reply threading (#19508)
* fix(gateway): avoid premature agent.wait completion on transient errors

* fix(agent): preemptively guard tool results against context overflow

* fix: harden tool-result context guard and add message_id metadata

* fix: use importOriginal in session-key mock to include DEFAULT_ACCOUNT_ID

The run.skill-filter test was mocking ../../routing/session-key.js with only
buildAgentMainSessionKey and normalizeAgentId, but the module also exports
DEFAULT_ACCOUNT_ID which is required transitively by src/web/auth-store.ts.

Switch to importOriginal pattern so all real exports are preserved alongside
the mocked functions.

* pi-runner: guard accumulated tool-result overflow in transformContext

* PI runner: compact overflowing tool-result context

* Subagent: harden tool-result context recovery

* Enhance tool-result context handling by adding support for legacy tool outputs and improving character estimation for message truncation. This includes a new function to create legacy tool results and updates to existing functions to better manage context overflow scenarios.

* Enhance iMessage handling by adding reply tag support in send functions and tests. This includes modifications to prepend or rewrite reply tags based on provided replyToId, ensuring proper message formatting for replies.

* Enhance message delivery across multiple channels by implementing sticky reply context for chunked messages. This includes preserving reply references in Discord, Telegram, and iMessage, ensuring that follow-up messages maintain their intended reply targets. Additionally, improve handling of reply tags in system prompts and tests to support consistent reply behavior.

* Enhance read tool functionality by implementing auto-paging across chunks when no explicit limit is provided, scaling output budget based on model context window. Additionally, add tests for adaptive reading behavior and capped continuation guidance for large outputs. Update related functions to support these features.

* Refine tool-result context management by stripping oversized read-tool details payloads during compaction, ensuring repeated read calls do not bypass context limits. Introduce new utility functions for handling truncation content and enhance character estimation for tool results. Add tests to validate the removal of excessive details in context overflow scenarios.

* Refine message delivery logic in Matrix and Telegram by introducing a flag to track if a text chunk was sent. This ensures that replies are only marked as delivered when a text chunk has been successfully sent, improving the accuracy of reply handling in both channels.

* fix: tighten reply threading coverage and prep fixes (#19508) (thanks @tyler6204)
9 months ago
Peter Steinberger 9a2c39419e chore(release): bump version to 2026.2.17 9 months ago
cpojer d0cb8c19b2
chore: wtf. 9 months ago
Sebastian ed11e93cf2 chore(format) 9 months ago
cpojer a741985574
chore: Fix more extension test types, 2/N. 9 months ago
cpojer 90ef2d6bdf
chore: Update formatting. 9 months ago
cpojer 1e13a3933c
chore: Update deps. 9 months ago
Peter Steinberger d89d951c3e refactor(onboarding): reuse allowFrom merge helper in matrix 9 months ago
Peter Steinberger 544ffbcf7b refactor(extensions): dedupe connector helper usage 9 months ago
Peter Steinberger 39fa81dc96 chore: bump version to 2026.2.16 9 months ago
Peter Steinberger 0653e8d2ec refactor(matrix): dedupe group config resolution 9 months ago
Shadow c6b3736fe7 fix: dedupe probe/token base types (#16986) (thanks @iyoda) 9 months ago
Peter Steinberger 379b445582 chore: bump version to 2026.2.15 9 months ago
Peter Steinberger 1ff15e60d3 chore(release): bump versions to 2026.2.14 9 months ago
Peter Steinberger 6543ce717c perf(test): avoid plugin-sdk barrel imports 9 months ago
Peter Steinberger db72184de6 perf(test): speed up Matrix send tests 9 months ago
Peter Steinberger 6ebf503fa8 refactor(media): centralize voice compatibility policy 9 months ago
Azade 🐐 1b95220a99
fix(media): recognize MP3 and M4A as voice-compatible audio (#15438)
* fix(media): recognize MP3 and M4A as voice-compatible audio

Telegram sendVoice supports OGG/Opus, MP3, and M4A, but
isVoiceCompatibleAudio only recognized OGG/Opus formats.

- Add MP3 and M4A extensions and MIME types
- Use explicit MIME set instead of substring matching
- Handle MIME parameters (e.g. 'audio/ogg; codecs=opus')
- Add test coverage for all supported and unsupported formats

* fix: narrow MIME allowlist per review feedback

Remove audio/mp4 and audio/aac from voice MIME types — too broad.
Keep only M4A-specific types (audio/x-m4a, audio/m4a).
Add audio/mp4 and audio/aac as negative test cases.

* fix: align voice compatibility and channel coverage (#15438) (thanks @azade-c)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
9 months ago
Peter Steinberger 93dd51bce0 perf(matrix): lazy-load music-metadata parsing 9 months ago
Peter Steinberger 2b685b08c2 fix: harden matrix multi-account routing (#7286) (thanks @emonty) 9 months ago
Monty Taylor a76ac1344e fix: resolveAllowFrom uses cfg+accountId params, not account 9 months ago
Monty Taylor 1a17466a60 fix: use account-aware config paths in resolveDmPolicy and resolveAllowFrom 9 months ago
Monty Taylor 3985ef7b37 fix: merge top-level config into per-account config so inherited settings apply 9 months ago
Monty Taylor ed5a8dff8a chore: fix CHANGELOG.md formatting 9 months ago
Monty Taylor da00f6cf8e fix: deep-merge nested config, prefer default account in send fallback, simplify credential filenames 9 months ago
Monty Taylor 1a72902991 refactor: read accounts from cfg.channels.matrix.accounts directly for clarity 9 months ago
Monty Taylor bf4e348440 fix: de-duplicate normalized account IDs and add case-insensitive config lookup to send/client 9 months ago
Monty Taylor a6dd50fede fix: normalize account config keys for case-insensitive matching 9 months ago
Monty Taylor c89b8d99fc fix: normalize accountId in active-client and send/client for consistent keying 9 months ago
Monty Taylor caf5d2dd7c feat(matrix): Add multi-account support to Matrix channel
The Matrix channel previously hardcoded `listMatrixAccountIds` to always
return only `DEFAULT_ACCOUNT_ID`, ignoring any accounts configured in
`channels.matrix.accounts`. This prevented running multiple Matrix bot
accounts simultaneously.

Changes:
- Update `listMatrixAccountIds` to read from `channels.matrix.accounts`
  config, falling back to `DEFAULT_ACCOUNT_ID` for legacy single-account
  configurations
- Add `resolveMatrixConfigForAccount` to resolve config for a specific
  account ID, merging account-specific values with top-level defaults
- Update `resolveMatrixAccount` to use account-specific config when
  available
- The multi-account config structure (channels.matrix.accounts) was not
  defined in the MatrixConfig type, causing TypeScript to not recognize
  the field. Added the accounts field to properly type the multi-account
  configuration.
- Add stopSharedClientForAccount() to stop only the specific account's
  client instead of all clients when an account shuts down
- Wrap dynamic import in try/finally to prevent startup mutex deadlock
  if the import fails
- Pass accountId to resolveSharedMatrixClient(), resolveMatrixAuth(),
  and createMatrixClient() to ensure the correct account's credentials
  are used for outbound messages
- Add accountId parameter to resolveMediaMaxBytes to check account-specific
  config before falling back to top-level config
- Maintain backward compatibility with existing single-account setups

This follows the same pattern already used by the WhatsApp channel for
multi-account support.

Fixes #3165
Fixes #3085

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
9 months ago
Peter Steinberger 67251e97bd
fix(ci): sync extension versions to root release (#15199) 9 months ago
Peter Steinberger 7695b4842b chore: bump version to 2026.2.12 9 months ago
cpojer 9df89ceda2
chore: Update deps. 9 months ago
Peter Steinberger 1872d0c592 chore: bump version to 2026.2.10 10 months ago
williamtwomey 5fab11198d
Fix matrix media attachments (#12967) thanks @williamtwomey
Co-authored-by: Gustavo Madeira Santana @gumadeiras
10 months ago
Peter Steinberger 53273b490b fix(auto-reply): prevent sender spoofing in group prompts 10 months ago
peetzweg/ 49c60e9065
feat(matrix): add thread session isolation (#8241)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
10 months ago
max 40b11db80e
TypeScript: add extensions to tsconfig and fix type errors (#12781)
* TypeScript: add extensions to tsconfig and fix type errors

- Add extensions/**/* to tsconfig.json includes
- Export ProviderAuthResult, AnyAgentTool from plugin-sdk
- Fix optional chaining for messageActions across channels
- Add missing type imports (MSTeamsConfig, GroupPolicy, etc.)
- Add type annotations for provider auth handlers
- Fix undici/fetch type compatibility in zalo proxy
- Correct ChannelAccountSnapshot property usage
- Add type casts for tool registrations
- Extract usage view styles and types to separate files

* TypeScript: fix optional debug calls and handleAction guards
10 months ago