Commit Graph

481 Commits

Author SHA1 Message Date
yuchou87 4e330b297c test(mcp): add manager behavior and lifecycle unit tests 2026-02-22 15:13:29 +08:00
yuchou87 16a3b96dde fix(mcp): validate workspace before resolving relative env_file 2026-02-22 15:06:57 +08:00
yuchou87 6aade43236 docs: add MCP tool configuration documentation 2026-02-22 15:03:20 +08:00
yuchou87 672da984e5 Merge branch 'main' into mcp-tools-support 2026-02-22 14:48:07 +08:00
kernoeb b9a66248d8 fix: resolve Groq STT key from model_list when providers.groq is absent (#602)
When users migrate from the legacy `providers` config to the new
`model_list` format, voice transcription silently breaks on Telegram,
Discord and Slack channels.

The gateway was reading the Groq API key exclusively from
`cfg.Providers.Groq.APIKey`, which is empty once the key is defined
only inside a `model_list` entry. The transcriber was never initialized,
so voice messages fell back to a plain `[voice]` placeholder.

This fix also scans `model_list` for any entry whose `model` field
starts with `groq/` and uses its `api_key` as a fallback, preserving
full backward compatibility with the legacy `providers.groq` field.
2026-02-22 11:32:44 +11:00
Albert Simon c51ceac70b fix: updated model configuration links at readme (#544)
Signed-off-by: Albert Simon <simon.albert75@gmail.com>
2026-02-22 09:53:53 +11:00
daming大铭 40f9630eea Merge pull request #590 from alexhoshina/docs
docs: add Chinese channel documentation
2026-02-21 22:49:05 +08:00
zepan aea4f25c83 1. update wechat qrcode. 2. add CONTRIBUTING.md 2026-02-21 22:45:47 +08:00
Hoshina 023b245a28 docs: add Chinese channel documentation 2026-02-21 18:00:19 +08:00
美電球 bb8b9243b7 Merge pull request #592 from alexhoshina/main
fix: golangci-lint run --fix
2026-02-21 16:21:34 +08:00
Hoshina 0066602294 fix: golangci-lint run --fix 2026-02-21 16:20:15 +08:00
Hoshina 3df7f70540 fix: golangci-lint fmt 2026-02-21 16:05:39 +08:00
yuchou87 cfc29a1383 fix(mcp): prevent use-after-close race between CallTool and Close
A race could occur when Close() called conn.Session.Close() concurrently
with an in-flight conn.Session.CallTool(), leading to undefined behavior.

Fix by adding a sync.WaitGroup to Manager:
- CallTool increments the WaitGroup while holding the read lock (after
  checking m.closed), ensuring no new calls are counted after Close sets
  the flag
- Close sets m.closed=true, releases the write lock, then waits for all
  in-flight calls to finish via wg.Wait() before closing sessions
2026-02-21 14:10:48 +08:00
yuchou87 11dbc301f9 perf(agent): cache ListAgentIDs() result before MCP tool registration loop
ListAgentIDs() was called on every iteration of the inner tool loop,
causing repeated allocations. Capture the slice once and reuse it for
both agentCount and the registration loop.
2026-02-21 13:48:41 +08:00
yuchou87 d2b3fc1dd0 fix(mcp): include server name and cause in Close() errors
Previously Close() discarded all underlying errors and returned only
'failed to close N server(s)', making debugging impossible.

Now each error wraps the server name and original cause, and all errors
are joined so callers can inspect the full failure list.
2026-02-21 13:46:06 +08:00
yuchou87 33058b534e fix(mcp): reject empty keys in loadEnvFile
A line like '=value' would result in envVars[""] = "value", producing
an invalid environment entry for the child process. Return an error
instead when the key is empty.
2026-02-21 13:45:00 +08:00
yuchou87 59e9c55454 docs(config): restore MCP server examples in config.example.json
Add back filesystem, github, brave-search, and postgres as example MCP
server configurations. These were removed from DefaultConfig() to reduce
memory footprint, but should remain in the example config as documentation
for users setting up MCP servers.
2026-02-21 13:42:26 +08:00
yuchou87 246fdf3f33 fix(mcp): guard against nil result from CallTool
CallTool can return (nil, nil) if the underlying MCP library misbehaves.
Without a nil check, result.IsError would panic. Return an explicit error
ToolResult instead.
2026-02-21 13:40:55 +08:00
yuchou87 fb2b594060 fix(scripts): specify service name in docker compose build
Avoid building zero services when all services are gated behind profiles.
Without an explicit service target, 'docker compose build' silently skips
all profile-gated services, causing subsequent 'docker compose run' to
use stale or missing images.
2026-02-21 13:39:42 +08:00
yuchou87 d867e86dbe Merge branch 'main' into mcp-tools-support
# Conflicts:
#	config/config.example.json
#	pkg/config/config.go
2026-02-21 13:28:15 +08:00
Luke Milby 80c8b57533 Fix Memory Write (#557)
* fix issue where memory will only trigger when asked to remember something

* updated prompt for memory usage
2026-02-21 08:21:38 +08:00
Meng Zhuo 273a8a2318 Merge pull request #550 from mymmrac/govet-linter
feat(linter): Fix govet linter
2026-02-21 08:20:35 +08:00
Meng Zhuo b3e20c7c71 Merge pull request #491 from PixelTux/ollama
fix(docker): enable container-to-host connectivity for localhost services (e.g., Ollama)
2026-02-21 08:18:56 +08:00
Goksu Ceylan 244eb0b47d fix (security): ExecTool working_dir sandbox escape (#478)
* fix (security) Shell working_dir bypass

* Feedback from @mengzhuo & Discord
- reuse internal security package to validate path
- add tests for workspace escape
2026-02-21 08:15:46 +08:00
Artem Yadelskyi 02b4d9fbe2 feat(linter): Fix govet linter 2026-02-20 22:35:16 +02:00
danieldd e883e14b81 Merge pull request #548 from mymmrac/build-no-fmt
feat(ci): Remove fmt from build step
2026-02-21 03:13:22 +07:00
Artem Yadelskyi c2ace2561c feat(ci): Remove fmt from build step 2026-02-20 22:09:36 +02:00
danieldd df2c42466c Merge pull request #435 from mymmrac/fix-formatting
feat(fmt): Run formatters
2026-02-21 03:04:42 +07:00
danieldd 1e3a9eb3c4 Merge pull request #546 from harshbansal7/readme_fix
[Fix] Fix Readme Reference for Model Configuration.
2026-02-21 02:38:08 +07:00
harshbansal7 123cffa85a fix 2 2026-02-21 01:04:48 +05:30
harshbansal7 5ca239b5c5 fix 2026-02-21 01:02:35 +05:30
Artem Yadelskyi 0675ce7c38 feat(fmt): Fix formatting 2026-02-20 20:03:11 +02:00
Artem Yadelskyi ad8c2d48c8 Merge branch 'main' into fix-formatting
# Conflicts:
#	cmd/picoclaw/main.go
#	pkg/agent/context.go
#	pkg/agent/loop.go
#	pkg/channels/dingtalk.go
#	pkg/channels/feishu_64.go
#	pkg/channels/line.go
#	pkg/channels/manager.go
#	pkg/config/config.go
#	pkg/migrate/migrate_test.go
#	pkg/providers/anthropic/provider_test.go
#	pkg/providers/claude_provider_test.go
#	pkg/providers/http_provider.go
#	pkg/providers/openai_compat/provider.go
#	pkg/providers/protocoltypes/types.go
#	pkg/providers/types.go
2026-02-20 20:02:53 +02:00
daming大铭 e23795e51b Merge pull request #537 from Esubaalew/main
fix: correct documentation misalignment across translations and guides
2026-02-21 00:01:36 +08:00
Meng Zhuo 5b525f6139 Merge pull request #378 from lunareed720/fix/exec-timeout-process-tree
fix(exec): kill child process tree on timeout to prevent orphaned tasks
2026-02-20 23:32:05 +08:00
Meng Zhuo 55227762e4 Merge pull request #524 from mattn/perf/strings-builder
Use strings.Builder instead of += concatenation in loops
2026-02-20 23:24:47 +08:00
esubaalew 838a69085b fix: correct docs misalignment across translations and guides
- Fix DingTalk section referencing "QQ numbers" instead of DingTalk user IDs
- Fix Anthropic example showing OAuth when code uses paste-token auth
- Replace OpenClaw references in ANTIGRAVITY_AUTH.md with actual PicoClaw paths and Go patterns
- Fix auth file path from auth-profiles.json to auth.json in ANTIGRAVITY_USAGE.md
- Remove non-existent approval tool from tools_configuration.md, add skills tool docs
- Update Quick Start configs in fr/pt-br/vi/ja translations to use model_list format
- Fix allowFrom camelCase to allow_from in fr/pt-br translations
- Fix camelCase config keys in ja translation
- Update zh/ja web search config from old flat format to brave/duckduckgo
- Fix broken ClawdChat link and trailing commas in zh translation
- Add missing qwen/cerebras providers to fr/pt-br/vi translation tables
- Add missing protocol prefixes to migration guide
- Fix typos in community roadmap
2026-02-20 18:23:22 +03:00
daming大铭 1ef33c90ed Merge pull request #474 from swordkee/main
add wecom and wecomApp
2026-02-20 21:17:59 +08:00
swordkee 0f70f783bd feat: add wecom and wecomApp test 2026-02-20 20:01:22 +08:00
Yasuhiro Matsumoto df49f6698a Fix 2026-02-20 20:48:43 +09:00
swordkee ca481035a4 feat: add wecom and wecomApp test 2026-02-20 19:39:12 +08:00
Vernon Stinebaker 2fb2a733d4 feat(discord): add mention_only option for @-mention responses (#518)
* feat(discord): add mention_only option for @-mention responses

Add MentionOnly config option to Discord channel. When enabled, the bot
only responds when explicitly @-mentioned, useful for shared servers.

- Add MentionOnly bool field to DiscordConfig
- Store botUserID on startup for mention checking
- Check m.Mentions before processing messages when MentionOnly is true
- Update config example and README documentation

* fix(discord): resolve race condition and strip mention from content

- Get botUserID before opening session to avoid race condition
- Add stripBotMention to remove @mention from message content
- Handles both <@USER_ID> and <@!USER_ID> mention formats

* fix(discord): skip mention_only check for DMs

DMs should always be responded to regardless of mention_only setting.
Added check to skip the mention_only logic when GuildID is empty.

* Update README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Hua Audio <161028864+Huaaudio@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-20 12:18:37 +01:00
Yasuhiro Matsumoto bca92433ba Use strings.Builder instead of += concatenation in loops 2026-02-20 20:09:13 +09:00
Harsh Bansal d692cc0cc6 Feature: Implement Skill Discovery - With Clawhub Integration and Caching (#332)
* Add Find Skills and Install Skills

* Improvements

* fix file name

* Update pkg/skills/clawhub_registry.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix

* Comments addressed

* Resolve comments

* fix tests

* fixes

* Comments resolved

* Update pkg/skills/search_cache_repro_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* minor fix

* fix test

* fixes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-20 18:55:04 +08:00
swordkee 14ccfb39d9 feat: add wecom and wecomApp test 2026-02-20 18:28:10 +08:00
swordkee 59772cdbf2 feat: add wecom and wecomApp channel support 2026-02-20 17:40:59 +08:00
lxowalle f1223eec42 fix: revert enable endy patterns (#519) 2026-02-20 17:16:42 +08:00
daming大铭 36a8a038ee Merge pull request #514 from CrisisAlpha/docs/config-example-add-missing-sections
docs(config): add missing duckduckgo, exec, and qq sections to example config
2026-02-20 16:46:12 +08:00
CrisisAlpha be55204696 docs(config): add missing duckduckgo, exec, and qq sections to example config
config.example.json was missing three sections that exist in the Go
config structs and defaults:

- tools.web.duckduckgo: DuckDuckGo is enabled by default in
  defaults.go and requires no API key (free search provider), but
  users who copy the example config silently lose it since the
  section was omitted.

- tools.exec: The ExecConfig struct supports enable_deny_patterns
  and custom_deny_patterns for security hardening, but users had
  no way to discover these options from the example.

- channels.qq: The QQ channel was the only channel in ChannelsConfig
  missing from the example while all others were present.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-20 15:11:40 +08:00
daming大铭 e599573ed4 Merge pull request #492 from yinwm/feat/refactor-provider-by-protocol
feat(config): refactor provider architecture to protocol-based model_list
2026-02-20 13:31:30 +08:00