Commit graph

84 commits

Author SHA1 Message Date
Cytown
f5e779e22e refactor: make agent loop support parallel and update docs 2026-04-16 14:43:15 +08:00
lxowalle
e22b4e1eee
feat(agent): support btw side questions (#2532) 2026-04-16 10:53:09 +08:00
afjcjsbx
e60a687387 fix lint 2026-04-14 22:35:02 +02:00
afjcjsbx
7824bc715f add test 2026-04-14 22:31:30 +02:00
Hoshina
0c6ad33a9c merge: integrate main into refactor-inbound-context-routing-session 2026-04-13 13:25:07 +08:00
lc6464
86917faa9b
fix(ci): resolve lint header casing and fallback test routing 2026-04-11 02:23:35 +08:00
lc6464
c8bac699fe
fix(pico): separate thought and normal messages 2026-04-10 20:23:12 +08:00
lc6464
bd88385923
fix(agent): gate pico interim publish for internal turns 2026-04-10 00:19:45 +08:00
lc6464
9982ee29a8
fix(pico): avoid duplicate final websocket message 2026-04-09 22:59:36 +08:00
lc6464
2aeed8fb3a
fix(pico): stream assistant text between tool calls 2026-04-09 22:32:35 +08:00
Hoshina
3d60385958 refactor(session): tighten legacy boundary and tool context 2026-04-07 22:39:46 +08:00
Hoshina
9f23ec22d6 refactor(agent): normalize dispatch and outbound turn metadata 2026-04-07 22:12:23 +08:00
Hoshina
e32a209683 Merge branch 'main' into refactor-inbound-context-routing-session
# Conflicts:
#	pkg/agent/eventbus_test.go
#	pkg/agent/loop.go
#	pkg/bus/bus.go
#	pkg/bus/types.go
#	pkg/channels/pico/pico.go
#	pkg/channels/telegram/telegram.go
#	pkg/config/config.go
#	web/backend/api/session.go
#	web/backend/api/session_test.go
2026-04-07 21:41:02 +08:00
Hoshina
718a5e7c75 refactor(runtime): merge bus context and handled tool delivery 2026-04-07 21:05:53 +08:00
corevibe555
6ce0306c66
fix: use per candidate provider for model_fallbacks (#2143)
* fix: use per-candidate provider for model_fallbacks

Each fallback model now uses its own api_base and api_key from
model_list instead of inheriting the primary model's provider config.

Previously, a single LLMProvider was created from the primary model's
ModelConfig and reused for all fallback candidates — only the model ID
string was swapped. This caused all fallback requests to be routed to
the primary provider's endpoint, making cross-provider fallback chains
non-functional (e.g., OpenRouter primary with Gemini fallback would
send the Gemini request to OpenRouter's API).

Fix: pre-create a per-candidate LLMProvider at agent initialization
time by looking up each candidate's ModelConfig from model_list. The
fallback run closure now selects the correct provider per candidate
via CandidateProviders map, falling back to agent.Provider when no
override is found.

Fixes #2140

Made-with: Cursor

test: add test for instance.go

fix: fix test

refactor: optimize

fix: fix Golang lint issues

chore: comment cleanup

* refactor: use resolvedModelConfig() instead of buildModelIndex()

* fix
2026-04-07 20:07:56 +08:00
Hoshina
bef17d6453 feat(routing): add ordered dispatch rules 2026-04-01 22:13:04 +08:00
Hoshina
19a01d4264 refactor(routing): remove legacy bindings config 2026-04-01 21:34:39 +08:00
Hoshina
59dee895fc refactor(runtime): drop non-session legacy context compatibility 2026-04-01 20:56:48 +08:00
Hoshina
ca9652e120 refactor(session): replace dm scope with dimensions policy 2026-04-01 17:19:50 +08:00
Hoshina
bb2167e3f3 feat(event): log turn context fields 2026-04-01 15:46:35 +08:00
Hoshina
fcab3a1b7c refactor(routing): move session allocation out of router 2026-04-01 14:26:12 +08:00
Hoshina
2095ec8700 refactor(agent): route using inbound context 2026-04-01 14:08:44 +08:00
DimonB
6c0798ca3f
feat(channels): make Channel.Send return delivered message IDs (#2190)
* feat(channels): Channel.Send and MediaSender.SendMedia return delivered message IDs

Change Channel.Send signature from (ctx, msg) error to (ctx, msg) ([]string, error)
and MediaSender.SendMedia similarly, so callers can capture platform message IDs
for threading, reactions, and history annotation.

Adapters that return real IDs: Telegram (per-chunk MessageID), Discord (Message.ID),
Slack Send (ts), QQ (sentMsg.ID), Matrix (EventID). Slack SendMedia returns nil
because UploadFileV2 does not expose the posted message timestamp in its response.
All other adapters return nil IDs.

preSend and sendWithRetry in manager.go updated to propagate ([]string, bool).
README examples updated for both English and Chinese docs.

* style: apply golangci-lint fixes (golines)

* docs: fix Send migration guide — restore old error-only signature in before/after example
2026-03-31 11:07:32 +08:00
Alix-007
e88df4ff9c
feat(tools): add reaction tool and reply-aware message sends (#2156)
- Add `reaction` tool that reacts to a message (defaults to current inbound message via context)
- Extend `message` tool with optional `reply_to_message_id` parameter
- Introduce `WithToolInboundContext` to inject inbound message IDs into tool execution context
- Surface `MessageID` and `ReplyToMessageID` in `processOptions` for tool-surface consumption

Refs #2137
2026-03-30 16:31:34 +08:00
Guoguo
62d40a02d4
fix: resolve typecheck errors in loop_test.go and dingtalk_test.go (#2122)
- loop_test.go: replace undefined WithSecurity/SecurityConfig/ModelSecurityEntry
  with direct APIKeys field using SimpleSecureStrings()
- dingtalk_test.go: use ClientSecret.String() and ClientSecret.Set()
  instead of non-existent ClientSecret() and SetClientSecret() methods

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:58:09 +08:00
xiwuqi
e011284d8f
fix(agent): use light provider for routed model calls (#2038) 2026-03-28 15:25:23 +08:00
Cytown
f1cb7cc8f5
fix gateway reload will cause pico stop working issue (#2082)
* fix gateway reload will cause pico stop working issue

* fix for review
2026-03-28 11:30:31 +08:00
Cytown
b646d3b8fe
refactor config and security to simplified the structure (#2068) 2026-03-28 00:03:34 +08:00
Badgerbees
ae94893605 adding test units 2026-03-26 03:03:19 +07:00
xiwuqi
85dfb341a8
fix(agent): suppress heartbeat tool feedback (#1937) 2026-03-25 14:22:41 +08:00
daming大铭
1b9445b806
Merge pull request #1955 from alexhoshina/refactor/wecom
Refactor/wecom
2026-03-24 23:37:35 +08:00
Mauro
2a0efb6e52
Merge pull request #1889 from afjcjsbx/fix/binary-tool-output-handling
fix(tool): route binary outputs through the media pipeline
2026-03-24 15:37:06 +01:00
Hoshina
a1f95f02bc refactor(wecom): rebuild ai bot channel 2026-03-24 20:23:29 +08:00
美電球
f2f6987f00
test(agent): allow mock custom tool args (#1965) 2026-03-24 19:27:29 +08:00
Orkun Manap
dd9adf8a04
feat: add ElevenLabs Scribe STT transcriber and Telegram SendVoice support (#1905)
* feat: add ElevenLabs Scribe STT transcriber and Telegram SendVoice support

Add ElevenLabsTranscriber as an alternative speech-to-text provider using
the ElevenLabs Scribe API (scribe_v1). This enables voice message
transcription for users who already have an ElevenLabs API key, without
requiring a separate Groq account.

Changes:
- Add ElevenLabsTranscriber implementing the Transcriber interface
- Update DetectTranscriber to check providers.elevenlabs.api_key first,
  falling back to Groq for backward compatibility
- Add ElevenLabs to ProvidersConfig
- Add "voice" media type for OGG files with "voice" in filename
- Add SendVoice support in Telegram channel for voice bubble messages
- Add comprehensive tests for ElevenLabs transcriber

Configuration:
  "providers": {
    "elevenlabs": {
      "api_key": "sk_your_key_here"
    }
  }

Closes #1503 (partial)

* fix: move voice-bubble detection into Telegram channel to avoid regression in other channels

Address review feedback: keep inferMediaType returning "audio" for all
OGG files. Voice-bubble detection (SendVoice vs SendAudio) is now done
inside the Telegram channel based on filename, so other channels that
map "audio" explicitly are unaffected.

* fix: align VoiceConfig struct tags to pass golines formatter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(agent): use ModelName in loop test added by upstream

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 22:11:10 +01:00
daming大铭
2c48cd3461
Merge pull request #1907 from xiwuqi/wuxi/fix-reasoning-channel-content
fix(agent): route reasoning_content to reasoning channel
2026-03-24 01:24:14 +08:00
afjcjsbx
5d5536a1a6 fix delivery and steering 2026-03-23 14:09:52 +01:00
afjcjsbx
8ed171dbe6 resolved conflicts 2026-03-23 13:43:02 +01:00
afjcjsbx
fddfd56b50 Merge branch 'main' into fix/binary-tool-output-handling
# Conflicts:
#	pkg/agent/loop.go
#	pkg/agent/loop_test.go
#	pkg/commands/builtin_test.go
#	pkg/tools/send_file_test.go
2026-03-23 13:16:23 +01:00
uiyzzi
d1d2155edb Use ModelName instead of Model in test config structs 2026-03-23 16:47:13 +08:00
Mauro
054b55fdfc
Merge pull request #1893 from afjcjsbx/feat/skill-channel-commands
feat(skills): add channel commands to list and force installed skills
2026-03-23 09:04:06 +01:00
Cytown
7bf4831059 Merge branch 'main' into version 2026-03-23 10:54:08 +08:00
xiwuqi
336d5d4c07 fix(agent): route reasoning_content to reasoning channel 2026-03-22 19:57:47 -05:00
afjcjsbx
1e98f86fa9 fix Ooutboundmedia 2026-03-23 00:08:43 +01:00
afjcjsbx
b90c5007f6 resolve conflicts 2026-03-22 23:36:25 +01:00
afjcjsbx
14a4983af3 Merge branch 'main' into fix/binary-tool-output-handling
# Conflicts:
#	pkg/agent/loop.go
#	pkg/tools/result.go
2026-03-22 23:08:27 +01:00
afjcjsbx
d3ba40090b Merge branch 'main' into feat/skill-channel-commands
# Conflicts:
#	pkg/agent/loop.go
2026-03-22 20:51:16 +01:00
afjcjsbx
d7d2bf69bf feat(skills): add channel commands to list and force installed skills 2026-03-22 15:33:25 +01:00
Administrator
f7f27e237a merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
afjcjsbx
df4f322f09 fix(tool): route binary outputs through the media pipeline. 2026-03-22 12:05:28 +01:00