Commit graph

620 commits

Author SHA1 Message Date
美電球
71491c02f1 Update config file reference from config.yaml to config.json
Closes: #565
2026-02-28 00:36:39 +08:00
daming大铭
6ffbe9d67f Merge pull request #881 from mosir/fix/onboard-include-empty-model
fix(config): keep empty agents.defaults.model in saved config
2026-02-28 00:28:02 +08:00
daming大铭
35d1a3f528 Merge pull request #824 from 0xYiliu/fix/issue-783-fallback-alias-resolution
fix: resolve fallback model alias parsing for issue #783
2026-02-28 00:25:18 +08:00
mosir
e07d31556b fix(config): keep empty agents.defaults.model in saved config 2026-02-28 00:18:10 +08:00
daming大铭
f4357e8ecf Merge pull request #877 from sipeed/refactor/channel-system
Refactor/channel system
2026-02-28 00:08:36 +08:00
美電球
d6947e98b4 Merge pull request #655 from adityakalro/main
Added a native WhatsApp channel implementation.
2026-02-27 20:25:59 +08:00
美電球
c35bd73b9e Fix formatting of WhatsAppConfig struct fields 2026-02-27 20:25:02 +08:00
美電球
2aac082d47 Resolve merge conflict in config.example.json
Removed conflicting lines and kept 'allow_from' as an empty array.
2026-02-27 20:23:20 +08:00
美電球
871eefac1d Remove ignored files from .gitignore 2026-02-27 20:22:40 +08:00
美電球
6e676e09dd Update test case for unicode letters preservation 2026-02-27 20:20:58 +08:00
美電球
a6da1b5905 Update function comment for SanitizeMessageContent 2026-02-27 20:20:25 +08:00
美電球
440ce617a3 Reformat WhatsAppConfig struct fields alignment 2026-02-27 20:20:00 +08:00
美電球
08f0d1286d Merge branch 'refactor/channel-system' into main 2026-02-27 20:04:08 +08:00
daming大铭
99f4aec504 Merge pull request #802 from biisal/reasoning-chnl
Fix Reasoning Content Being Silently Dropped by Adding Channel-Aware Reasoning Routing #645
2026-02-27 18:51:48 +08:00
Hoshina
fde413b2dd chore: fix go fmt formatting issues after rebase
Apply go fmt to files that had formatting inconsistencies
(alignment, indentation) after rebasing onto refactor/channel-system.
2026-02-27 17:35:50 +08:00
Avisek Ray
872b4efedd Merge branch 'sipeed:main' into reasoning-chnl 2026-02-27 14:50:14 +05:30
lxowalle
8a2e935cfd fix: set max tokens to 32k, default model to null (#858)
* * Set default value of max tokens to 32768

* * set max tokens to 32k, default model to null

* * Fix format error
2026-02-27 17:02:25 +08:00
Avisek
dfc00e4a3c feat: Add reasoning_channel_id to communication platform configurations and improve message bus context cancellation handling. 2026-02-27 16:58:42 +08:00
Avisek
33d56d83a4 feat: Introduce LLM reasoning fields to LLM responses and enable routing reasoning output to dedicated channels. 2026-02-27 16:58:42 +08:00
lxowalle
45a4c438b3 Prompt to modify the max_tool_iterations parameter. (#855)
* Prompt to modify the max_tool_iterations parameter.

* fix typo and set max iterations to 50
2026-02-27 15:42:47 +08:00
lxowalle
6a2bf284dd * update wechat qrcode & delete unused mp4 file (#852) 2026-02-27 14:36:26 +08:00
Aditya Kalro
1b4e143845 Complete the whatsapp native channel implementation based on the new channel interface 2026-02-26 22:35:52 -08:00
Aditya Kalro
8165e57362 Refactor whatsapp native channel based on the new channel interface 2026-02-26 22:35:20 -08:00
daming大铭
1d04dd8a6f Merge pull request #842 from sipeed/revert-767-update-wechat-group
docs: update wechat qrcode
2026-02-27 10:59:05 +08:00
Guoguo
b911d8a863 Revert "docs: update wechat qrcode (#767)"
This reverts commit 470aa4d7ab.
2026-02-27 10:52:45 +08:00
Meng Zhuo
482840e337 Merge pull request #706 from mosir/fix/atomic-file-writes
refactor(pkg/utils): add unified atomic file write utility
2026-02-27 10:42:30 +08:00
Guoguo
b16b996ee2 chore(docker): reorganize docker files and add first-run entrypoint (#812)
* chore(docker): move Dockerfile into docker/ directory

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

* feat(docker): add entrypoint script to goreleaser Dockerfile

- entrypoint.sh: on first run (config and workspace both absent) runs
  picoclaw onboard then exits for the user to configure; subsequent
  starts exec picoclaw gateway directly
- Dockerfile.goreleaser: copy and use entrypoint.sh, run as root
- .goreleaser.yaml: update dockerfile path, add entrypoint.sh to
  extra_files so it is included in the docker build context

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

* chore(docker): update docker-compose to use pre-built image and bind mount

- Use docker.io/sipeed/picoclaw:latest instead of building locally
- Replace named volume with bind mount ./data:/root/.picoclaw
- Move docker-compose.yml into docker/ directory

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

* docs: update Docker Compose section to reflect new docker/ layout

- Use docker compose -f docker/docker-compose.yml for all commands
- Update setup flow: first run generates docker/data/config.json,
  container exits, user edits config, then restarts
- Replace "Rebuild" section with "Update" (docker pull) since the
  compose file now uses the pre-built sipeed/picoclaw image
- Apply same changes to README.zh.md

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

* fix(docker): use restart: on-failure to prevent restart after first-run setup

unless-stopped restarts the container regardless of exit code, causing
an infinite loop when entrypoint exits 0 after the initial onboard.
on-failure only restarts on non-zero exit (i.e. crashes), so the
container stays stopped after setup until the user restarts it manually.

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

* docs: sync Docker Compose section across all language READMEs

Apply the same updates as the English/Chinese READMEs:
- Use docker compose -f docker/docker-compose.yml for all commands
- Update setup flow to first-run auto-config pattern
- Replace build/rebuild section with update via docker pull
- Affected: README.fr.md, README.ja.md, README.pt-br.md, README.vi.md

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 10:10:17 +08:00
Hoshina
873462fd24 docs(channels): add English README for channel system architecture 2026-02-27 03:33:21 +08:00
Hoshina
bd48688e31 docs(channels): add Chinese README for channel system architecture 2026-02-27 03:33:21 +08:00
Hoshina
aedce19c37 feat(channels): auto-orchestrate Placeholder/Typing/Reaction via capability interfaces
Define PlaceholderCapable, TypingCapable, and ReactionCapable interfaces
and have BaseChannel.HandleMessage auto-detect and trigger all three as
independent pipelines on inbound messages. This replaces the scattered
manual orchestration code in each channel's handleMessage with a single
unified dispatch in the framework layer.

Changes:
- Add PlaceholderCapable interface to interfaces.go
- Add ReactionCapable + RecordReactionUndo to interfaces.go
- BaseChannel.HandleMessage auto-triggers Typing → Reaction → Placeholder
- Manager gains reactionUndos sync.Map with TTL janitor cleanup
- Telegram: extract SendPlaceholder from manual code, add StartTyping
- Discord: add SendPlaceholder + StartTyping
- Pico: add SendPlaceholder (uses Pico Protocol message.create)
- Slack: extract ReactToMessage from manual code
- OneBot: extract ReactToMessage, remove leaked pendingEmojiMsg sync.Map
- LINE: move group-chat guard into StartTyping, remove manual orchestration
- Config: add Placeholder to PicoConfig; remove from Slack/LINE/OneBot
  (no MessageEditor, so placeholder config was dead code)
2026-02-27 03:33:21 +08:00
mosir
418498aea8 Merge branch 'sipeed:main' into fix/atomic-file-writes 2026-02-27 00:21:27 +08:00
Yiliu
7c2d4fd62d docs: add issue 783 investigation and execution plan 2026-02-26 23:50:48 +08:00
Yiliu
6d7638d25d fix(agent): resolve fallback model aliases from model_list 2026-02-26 23:50:40 +08:00
Yiliu
fcbd12b93b fix(providers): support lookup-based fallback candidate resolution 2026-02-26 23:50:33 +08:00
Hoshina
60f9582ff5 fix: resolve wastedassign lint warnings in channel subpackages
Remove wasted initial assignments before switch statements in
onebot (segType), telegram (filename), and wecom (mediaType).
2026-02-26 23:36:06 +08:00
Hoshina
2354ef4b6b fix: port main branch changes to channel subpackages after rebase
Port changes that were applied to the old pkg/channels/*.go files on main
to their new locations in channel subpackages:
- telegram: precompile regex, var transcribedText, GetModelName()
- discord: var transcribedText declaration
- onebot: resp.Body.Close(), "canceled" spelling, remove empty line
- slack: named return values in parseSlackChatID
- wecom: remove sendMarkdownMessage dead code
- whatsapp: resp.Body.Close() after Dial
- gateway/helpers: remove unused errors import
2026-02-26 23:24:35 +08:00
Hoshina
d8ac83b8b4 fix(bus): increase message bus buffer size from 16 to 64
Prevents potential backpressure under load when multiple channels
publish concurrently in gateway mode, where SDK callbacks blocking
on a full buffer can cause message loss or timeouts.
2026-02-26 22:46:57 +08:00
daming大铭
d8c58eec5d Merge pull request #766 from penzhan8451/main
fix: openrouter in providers and modellist length is greater than 0
2026-02-26 22:25:14 +08:00
ex-takashima
908687afdd fix(media): separate import groups for gci linter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 22:45:59 +09:00
ex-takashima
24ff1173be fix(media): use project logger and harden map cleanup
- Replace stdlib log.Printf with logger.InfoCF/WarnCF for consistency
  with the rest of the codebase (addresses @nikolasdehor review point #3)
- ReleaseAll: clean refToScope/refs mappings even if refs entry is missing
- CleanExpired: guard refToScope lookup before scope cleanup
- Add TestReleaseAllCleansMappingsIfRefsMissing for robustness

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 22:39:58 +09:00
mosir
7a89f811e3 style: fix gci import grouping in config, cron, and skills installer 2026-02-26 20:38:11 +08:00
mosir
2d04021e7e merge: resolve conflicts with main 2026-02-26 20:29:24 +08:00
penglp
d8c0d8621f Merge branch 'main' of https://github.com/sipeed/picoclaw 2026-02-26 19:29:32 +08:00
ex-takashima
d53d661bdc fix(line): log loading refresh errors, skip typing without recorder
Address review feedback from @alexhoshina and Codex:
- Log sendLoading errors in ticker goroutine instead of discarding
- Only start typing indicator when PlaceholderRecorder is available
  to avoid wasted API calls and unnecessary goroutine creation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:29:09 +09:00
ex-takashima
db0cab9c53 Revert "feat(line): add StartTyping and PlaceholderRecorder integration"
This reverts commit ad736d71cb.
2026-02-26 20:17:45 +09:00
mattn
4c152d0f66 Perf/precompile regex (#687)
* perf: pre-compile regexes at package level

Move regexp.MustCompile calls from inside methods to package-level
variables in web.go (7 regexes) and loader.go (2 regexes).
This avoids repeated compilation on every invocation.

Amp-Thread-ID: https://ampcode.com/threads/T-019c79c3-ea1c-7471-b09d-be90ba0e1ca0
Co-authored-by: Amp <amp@ampcode.com>

* perf: pre-compile regexes at package level

* retain the helpful comment

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-02-26 20:44:03 +11:00
ztechenbo
056dfee2a3 build: support armv81 arch in Makefile (#776)
Co-authored-by: 陈波0668000637 <chen.bo222@xydigit.com>
2026-02-26 17:41:01 +08:00
daming大铭
58f79e0fda Merge pull request #808 from alexhoshina/config/change-default-dm-scope-to-per-channel-peer
config: change default dm_scope to per-channel-peer
2026-02-26 17:39:16 +08:00
ian
f803b8e5bd feat(skills): add retry for HTTP requests in skill installer (#261)
* feat(skills): add retry mechanism for HTTP requests

Implement a retry mechanism with exponential backoff for HTTP requests in the skill installer. This improves reliability when fetching skills from GitHub by automatically retrying failed requests up to 3 times.

Add comprehensive tests to verify retry behavior under different scenarios including success on different attempts and proper delay between retries.

* fix: improve http request retry logic with status code checks

Add shouldRetry helper function to determine retryable status codes.
Close response body between retry attempts and break early for non-retryable status codes.

* refactor: remove unused BuiltinSkill struct

The struct was not being used anywhere in the codebase, so it's safe to remove it to reduce clutter and improve maintainability.

* refactor(http): move retry logic to utils package

Extract HTTP retry functionality from skills package to utils for better reusability
Add context-aware sleep function and comprehensive tests

* refactor(http): extract retry delay unit to variable

Extract hardcoded retry delay unit to a variable for better testability and flexibility. Update tests to use milliseconds for faster execution while maintaining the same behavior.

* test(http_retry): remove t.Parallel from test cases

* test(http_retry): remove redundant test cases for retry success

The removed test cases for success on second and third attempts were redundant since the retry logic is already covered by other tests. This simplifies the test suite while maintaining coverage.
2026-02-26 20:35:26 +11:00
Hoshina
c5a9e61d53 config: change default dm_scope to per-channel-peer
Change the default value of session.dm_scope from "main" to
"per-channel-peer" to provide better conversation isolation by
default. This prevents context leakage between different users
and channels.
2026-02-26 16:51:18 +08:00