Commit Graph

264 Commits

Author SHA1 Message Date
jaydenfyi
6d7305c901 fix store path arg 2026-01-25 21:50:50 +08:00
jaydenfyi
506135925b
Merge branch 'main' into feature/twitch-plugin 2026-01-25 21:38:27 +08:00
jaydenfyi
11d00f663c default requireMention to true 2026-01-25 21:35:48 +08:00
Peter Steinberger
a14ca1a337 test: normalize gemini oauth paths 2026-01-25 13:32:25 +00:00
jaydenfyi
ad828b9f0b remove strip markdown config, enabled by default 2026-01-25 21:16:04 +08:00
Ben Stein
f618859761
fix(gemini-cli-auth): auto-extract OAuth credentials from installed Gemini CLI (#1773)
Fixes #1765

- Extract client ID and secret from Gemini CLI's bundled oauth2.js
- Cross-platform binary lookup (no shell commands)
- Fallback to env vars for user override
- Add tests for credential extraction
2026-01-25 13:07:19 +00:00
Peter Steinberger
026def686e fix(matrix): decrypt E2EE media + size guard (#1744)
Thanks @araa47.

Co-authored-by: Akshay <araa47@users.noreply.github.com>
2026-01-25 12:53:57 +00:00
jaydenfyi
be3a16f294
Merge branch 'main' into feature/twitch-plugin 2026-01-25 20:26:52 +08:00
jaydenfyi
e03d8470f5 strip markdown in monitor 2026-01-25 20:25:14 +08:00
plum-dawg
c96ffa7186
feat: Add Line plugin (#1630)
* feat: add LINE plugin (#1630) (thanks @plum-dawg)

* feat: complete LINE plugin (#1630) (thanks @plum-dawg)

* chore: drop line plugin node_modules (#1630) (thanks @plum-dawg)

* test: mock /context report in commands test (#1630) (thanks @plum-dawg)

* test: limit macOS CI workers to avoid OOM (#1630) (thanks @plum-dawg)

* test: reduce macOS CI vitest workers (#1630) (thanks @plum-dawg)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-01-25 12:22:36 +00:00
jaydenfyi
46a6b223d9 format 2026-01-25 20:06:14 +08:00
jaydenfyi
900d7b74c9 update tests 2026-01-25 20:05:56 +08:00
Dan Guido
101d0f451f
fix(voice-call): prevent audio overlap with TTS queue (#1713)
* fix(voice-call): prevent audio overlap with TTS queue

Add a TTS queue to serialize audio playback and prevent overlapping
speech during voice calls. Previously, concurrent speak() calls could
send audio chunks simultaneously, causing garbled/choppy output.

Changes:
- Add queueTts() to MediaStreamHandler for sequential TTS playback
- Wrap playTtsViaStream() audio sending in the queue
- Clear queue on barge-in (when user starts speaking)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(voice-call): use iterative queue processing to prevent heap exhaustion

The recursive processQueue() pattern accumulated stack frames, causing
JavaScript heap out of memory errors on macOS CI. Convert to while loop
for constant stack usage regardless of queue depth.

* fix: prevent voice-call TTS overlap (#1713) (thanks @dguido)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-01-25 12:02:17 +00:00
jaydenfyi
cc9af164a8 update docs 2026-01-25 19:59:51 +08:00
jaydenfyi
5a155697fa remove duplicate log tags + log received messages 2026-01-25 19:15:42 +08:00
Dan Guido
48aea87028
feat: add prek pre-commit hooks and dependabot (#1720)
* feat: add prek pre-commit hooks and dependabot

Pre-commit hooks (via prek):
- Basic hygiene: trailing-whitespace, end-of-file-fixer, check-yaml, check-added-large-files, check-merge-conflict
- Security: detect-secrets, zizmor (GitHub Actions audit)
- Linting: shellcheck, actionlint, oxlint, swiftlint
- Formatting: oxfmt, swiftformat

Dependabot:
- npm and GitHub Actions ecosystems
- Grouped updates (production/development/actions)
- 7-day cooldown for supply chain protection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: add prek install instruction to AGENTS.md

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 10:53:23 +00:00
jaydenfyi
80fc5babd1 simplify config object 2026-01-25 18:27:50 +08:00
Peter Steinberger
98cecc9c56 fix: harden message aborts + bluebubbles dm create (#1751) (thanks @tyler6204) 2026-01-25 10:20:14 +00:00
Tyler Yust
0f662c2935
fix(bluebubbles): route phone-number targets to direct chats; prevent internal IDs leaking in cross-context prefix (#1751)
* fix(bluebubbles): prefer DM resolution + hide routing markers

* fix(bluebubbles): prevent message routing to group chats when targeting phone numbers

When sending a message to a phone number like +12622102921, the
resolveChatGuidForTarget function was finding and returning a GROUP
CHAT containing that phone number instead of a direct DM chat.

The bug was in the participantMatch fallback logic which matched ANY
chat containing the phone number as a participant, including groups.

This fix adds a check to ensure participantMatch only considers DM
chats (identified by ';-;' separator in the chat GUID). Group chats
(identified by ';+;' separator) are now explicitly excluded from
handle-based matching.

If a phone number only exists in a group chat (no direct DM exists),
the function now correctly returns null, which causes the send to
fail with a clear error rather than accidentally messaging a group.

Added test case to verify this behavior.

* feat(bluebubbles): auto-create new DM chats when sending to unknown phone numbers

When sending to a phone number that doesn't have an existing chat,
instead of failing with 'chatGuid not found', now automatically creates
a new chat using the /api/v1/chat/new endpoint.

- Added createNewChatWithMessage() helper function
- When resolveChatGuidForTarget returns null for a handle target,
  uses the new chat endpoint with addresses array and message
- Includes helpful error message if Private API isn't enabled
- Only applies to handle targets (phone numbers), not group chats

* fix(bluebubbles): hide internal routing metadata in cross-context markers

When sending cross-context messages via BlueBubbles, the origin marker was
exposing internal chat_guid routing info like '[from bluebubbles:chat_guid:any;-;+19257864429]'.

This adds a formatTargetDisplay() function to the BlueBubbles plugin that:
- Extracts phone numbers from chat_guid formats (iMessage;-;+1234567890 -> +1234567890)
- Normalizes handles for clean display
- Avoids returning raw chat_guid formats containing internal routing metadata

Now cross-context markers show clean identifiers like '[from +19257864429]' instead
of exposing internal routing details to recipients.

* fix: prevent cross-context decoration on direct message tool sends

Two fixes:

1. Cross-context decoration (e.g., '[from +19257864429]' prefix) was being
   added to ALL messages sent to a different target, even when the agent
   was just composing a new message via the message tool. This decoration
   should only be applied when forwarding/relaying messages between chats.

   Fix: Added skipCrossContextDecoration flag to ChannelThreadingToolContext.
   The message tool now sets this flag to true, so direct sends don't get
   decorated. The buildCrossContextDecoration function checks this flag
   and returns null when set.

2. Aborted requests were still completing because the abort signal wasn't
   being passed through the message tool execution chain.

   Fix: Added abortSignal propagation from message tool → runMessageAction →
   executeSendAction → sendMessage → deliverOutboundPayloads. Added abort
   checks at key points in the chain to fail fast when aborted.

Files changed:
- src/channels/plugins/types.core.ts: Added skipCrossContextDecoration field
- src/infra/outbound/outbound-policy.ts: Check skip flag before decorating
- src/agents/tools/message-tool.ts: Set skip flag, accept and pass abort signal
- src/infra/outbound/message-action-runner.ts: Pass abort signal through
- src/infra/outbound/outbound-send-service.ts: Check and pass abort signal
- src/infra/outbound/message.ts: Pass abort signal to delivery

* fix(bluebubbles): preserve friendly display names in formatTargetDisplay
2026-01-25 10:03:08 +00:00
Peter Steinberger
83f92e34af refactor: align voice-call TTS with core config 2026-01-25 09:29:57 +00:00
jaydenfyi
196ea43f78 format 2026-01-25 16:30:23 +08:00
jaydenfyi
cf311730df adjust access control logic 2026-01-25 16:30:23 +08:00
jaydenfyi
497e8493fe fix tests 2026-01-25 16:30:23 +08:00
jaydenfyi
75845606c4 remove comments + fromat 2026-01-25 16:30:23 +08:00
jaydenfyi
d8ca472e52 more readme fixes 2026-01-25 16:30:23 +08:00
jaydenfyi
0412ee0aba update docs and remove bot channel fallback 2026-01-25 16:30:23 +08:00
jaydenfyi
d9093572ac fix tests 2026-01-25 16:30:23 +08:00
jaydenfyi
fecc028709 use spread 2026-01-25 16:30:23 +08:00
jaydenfyi
938f55e679 use uuid 2026-01-25 16:30:23 +08:00
jaydenfyi
a7cf0c660d await authProvider setup 2026-01-25 16:30:23 +08:00
jaydenfyi
054ac2f006 chain debug log 2026-01-25 16:30:23 +08:00
jaydenfyi
47f5ffa8b0 less mutation 2026-01-25 16:30:23 +08:00
jaydenfyi
cad8c92128 no mutation 2026-01-25 16:30:23 +08:00
jaydenfyi
7d11bf8adb format 2026-01-25 16:30:23 +08:00
jaydenfyi
5af8dddcc7 code review fixes 2026-01-25 16:30:23 +08:00
jaydenfyi
1d12c9e91f fix monitor 2026-01-25 16:30:23 +08:00
jaydenfyi
960bb108d0 format 2026-01-25 16:30:23 +08:00
jaydenfyi
3dbca21334 fix probe logic 2026-01-25 16:30:22 +08:00
jaydenfyi
7234f9d24b adjust log level 2026-01-25 16:30:22 +08:00
jaydenfyi
92d95263b9 use accountId 2026-01-25 16:30:22 +08:00
jaydenfyi
0a99064a99 refactor: improve Twitch plugin code quality and fix all tests
- Extract client manager registry for centralized lifecycle management
- Refactor to use early returns and reduce mutations
- Fix status check logic for clientId detection
- Add comprehensive test coverage for new modules
- Remove tests for unimplemented features (index.test.ts, resolver.test.ts)
- Fix mock setup issues in test suite (149 tests now passing)
- Improve error handling with errorResponse helper in actions.ts
- Normalize token handling to eliminate duplication

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-25 16:30:22 +08:00
jaydenfyi
9693933b9e wip type changes 2026-01-25 16:30:22 +08:00
jaydenfyi
ebf7dcc054 copy polugin files 2026-01-25 16:30:22 +08:00
jaydenfyi
98639c909d wip 2026-01-25 16:30:22 +08:00
Peter Steinberger
458e731f8b fix: newline chunking across channels 2026-01-25 04:11:36 +00:00
Peter Steinberger
3a35d313d9 fix: signal reactions 2026-01-25 03:24:44 +00:00
Tyler Yust
92e794dc18
feat: add chunking mode option for BlueBubbles (#1645)
* feat: add chunking mode for outbound messages

- Introduced `chunkMode` option in various account configurations to allow splitting messages by "length" or "newline".
- Updated message processing to handle chunking based on the selected mode.
- Added tests for new chunking functionality, ensuring correct behavior for both modes.

* feat: enhance chunking mode documentation and configuration

- Added `chunkMode` option to the BlueBubbles account configuration, allowing users to choose between "length" and "newline" for message chunking.
- Updated documentation to clarify the behavior of the `chunkMode` setting.
- Adjusted account merging logic to incorporate the new `chunkMode` configuration.

* refactor: simplify chunk mode handling for BlueBubbles

- Removed `chunkMode` configuration from various account schemas and types, centralizing chunk mode logic to BlueBubbles only.
- Updated `processMessage` to default to "newline" for BlueBubbles chunking.
- Adjusted tests to reflect changes in chunk mode handling for BlueBubbles, ensuring proper functionality.

* fix: update default chunk mode to 'length' for BlueBubbles

- Changed the default value of `chunkMode` from 'newline' to 'length' in the BlueBubbles configuration and related processing functions.
- Updated documentation to reflect the new default behavior for chunking messages.
- Adjusted tests to ensure the correct default value is returned for BlueBubbles chunk mode.
2026-01-25 00:47:10 +00:00
Peter Steinberger
c147962434 fix: normalize googlechat targets 2026-01-25 00:04:47 +00:00
Peter Steinberger
5570e1a946 fix: polish Google Chat plugin (#1635) (thanks @iHildy)
Co-authored-by: Ian Hildebrand <ian@jedi.net>
2026-01-24 23:30:45 +00:00
iHildy
c64184fcfa googlechat: implement typing indicator via message editing 2026-01-24 23:30:45 +00:00