Commit Graph

2290 Commits

Author SHA1 Message Date
afjcjsbx 1903a18235 Merge remote-tracking branch 'upstream/main' 2026-06-02 18:59:12 +02:00
Mauro 004f9346c1 Merge pull request #2991 from chengzhichao-xydt/codex/retry-transient-llm-errors
fix(agent): retry transient LLM HTTP errors using provider error classifier
2026-06-02 18:45:35 +02:00
Mauro 827cd32ffc Merge pull request #2986 from chengzhichao-xydt/codex/session-manager-stop-cleanup
fix(tools): add Stop() to SessionManager to prevent goroutine leak
2026-06-02 18:37:55 +02:00
afjcjsbx 379ab9af2f Merge remote-tracking branch 'upstream/main' 2026-06-02 18:36:38 +02:00
程智超0668000959 e70a9fca7c fix(tools): use sync.Once for thread-safe Stop() in SessionManager
The Stop() method previously used a select/default pattern which was not
safe under concurrent calls — two goroutines could both pass the check
and attempt to close the same channel, causing a panic.

Replace with sync.Once to guarantee exactly-once close semantics,
matching the documented contract of being safe for concurrent use.

Review feedback: afjcjsbx
2026-06-02 20:20:30 +08:00
程智超0668000959 99a7179e76 fix(agent): retry transient LLM HTTP errors using provider error classifier
Previously, only timeout and network errors (matched via string
patterns) were retried. HTTP 500 server errors from
OpenRouter/OpenAI-compatible providers would fail the agent turn
immediately when no model fallback candidate was available.

This commit replaces the separate timeout/network retry branches
with a unified transientLLMRetryReason() helper that:
1. Uses providers.ClassifyError() to detect server_error (HTTP >=500),
   timeout, network, and rate_limit errors
2. Falls back to the existing string-based detection for errors
   not classified by the provider

A regression test (TestPipeline_CallLLM_HTTP5xxRetry) verifies that
HTTP 500 errors are retried and recover successfully.

This is a clean rebase of the approach originally proposed in #2768
by afjcjsbx.
2026-06-02 19:58:09 +08:00
Mauro 7b47872334 Merge pull request #2989 from yuxuan-7814/fix/2943-zhipu-error-1210
fix(providers): add Zhipu API error code 1210 to format error patterns
2026-06-02 12:20:16 +02:00
yuxuan-7814 5927ecc394 fix(providers): add Zhipu API error code 1210 to format error patterns
This fixes issue #2943 where WeChat channel image requests to Zhipu
GLM-5-Turbo vision API failed with error code 1210 (parameter error)
without triggering the fallback mechanism.

Changes:
- Added error code 1210 pattern matching to formatPatterns
- This allows the fallback mechanism to recognize Zhipu API parameter
  errors and fall back to alternative vision models

Closes #2943
2026-06-02 17:26:14 +08:00
程智超0668000959 bb57e0498c fix(tools): add Stop() to SessionManager to prevent goroutine leak
The SessionManager's background cleanup goroutine previously had no
shutdown mechanism. Each call to NewSessionManager() started a ticker
goroutine that ran indefinitely. In tests, where multiple
SessionManagers are created, this caused goroutine leaks.

This commit adds a Stop() method that cleanly shuts down the background
cleanup goroutine via a channel. Stop() is safe to call multiple times.
All existing tests now call t.Cleanup(sm.Stop) to ensure cleanup.
2026-06-02 17:13:31 +08:00
afjcjsbx e42006c10d Merge remote-tracking branch 'upstream/main' 2026-06-01 18:49:57 +02:00
Mauro 426046fca0 Merge pull request #2977 from SutraHsing/cron-get-update
feat(cron): add get and update actions to cron tool
2026-06-01 14:16:50 +02:00
sutra 28eafaeef2 refactor(cron): flatten if-else chains and suppress dupl lint 2026-06-01 20:08:40 +08:00
Mauro 1cfa781925 Merge pull request #2982 from loafoe/fix/bedrock-opus48-temperature
fix(bedrock): drop temperature for models that deprecate it (Opus 4.8)
2026-06-01 13:02:18 +02:00
Andy Lo-A-Foe 5a997a86f0 fix(bedrock): drop temperature for models that deprecate it
Claude Opus 4.8 on Bedrock rejects the temperature inference parameter
with a ValidationException ("temperature is deprecated for this model").
buildConverseParams now takes the model id and omits temperature for
claude-opus-4-8* (matching both bare model ids and region-prefixed
inference profiles), logging when it does so. max_tokens and all other
models are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-01 08:59:15 +02:00
afjcjsbx 672f86c670 Merge remote-tracking branch 'origin/main' 2026-05-31 23:11:43 +02:00
afjcjsbx 4e3e90df26 Merge remote-tracking branch 'upstream/main' 2026-05-31 23:11:18 +02:00
sutra be13201f02 feat(cron): restrict list/get/update to accessible jobs per channel 2026-05-31 19:20:41 +08:00
afjcjsbx c0f2714b66 Merge remote-tracking branch 'upstream/main' 2026-05-31 11:39:04 +02:00
Mauro ba8065923b Merge pull request #2856 from bogdanovich/feat/message-media-outbound
feat(message): support media attachments and Telegram rich delivery
2026-05-31 11:38:38 +02:00
Mauro 13e1833c81 Merge pull request #2967 from miruchigawa/main
fix(codex): preserve streamed output text deltas
2026-05-31 11:24:20 +02:00
sutra 1d8ef7dcfb feat(cron): add get and update actions to cron tool
Add GetJob and improved UpdateJob to CronService with proper cloning,
schedule diffing, and next-run recomputation. Expose get/update actions
in the cron tool so agents can inspect and partially update jobs without
losing payloads or needing remove+add cycles. Includes access control
for remote channels and command safety gates.
2026-05-31 10:55:54 +08:00
miruchigawa 93391223ea fix: format long line in codex_provider_test.go to satisfy golines 2026-05-31 05:00:22 +07:00
afjcjsbx 41a108c9af Merge remote-tracking branch 'upstream/main' 2026-05-30 20:29:53 +02:00
Mauro 1ce353ba28 Merge pull request #2969 from lc6464/feat/webchat-image-paste-dnd
feat(web): add chat image paste and drag-and-drop upload
2026-05-30 20:22:56 +02:00
Mauro 63ba146015 Merge pull request #2974 from kunalk16/feat-i18n-bangla
feat(i18n): Add Bangla support bn-in
2026-05-30 19:47:17 +02:00
Mauro 16c26338b6 Merge pull request #2971 from kunalk16/feat-azureopenai-identity
feat(provider): Add optional Azure Identity support for Azure OpenAI provider
2026-05-30 19:46:32 +02:00
Kunal Karmakar 2391f32fc1 Add Bangla support bn-in 2026-05-30 14:52:54 +00:00
Kunal Karmakar 46e5b59d5f Fix linting 2026-05-30 14:11:39 +00:00
Kunal Karmakar 995005a0ba Add azure entra id support for azure openai provider 2026-05-30 13:40:29 +00:00
lc6464 1edb873ace feat(web): add chat image paste and drag-and-drop upload 2026-05-30 18:21:40 +08:00
miruchigawa 2ff8b01cc6 fix(codex): preserve streamed output text deltas
OpenAI/Codex OAuth streams can return text through response.output_text.delta while the final response.completed payload has response.output set to null. That made PicoClaw report an empty model response even though the backend returned valid content.

Accumulate streamed output_text delta events during the Codex response stream and use them as a fallback when the parsed final response has no content. Add a regression test covering the null final output case from issue #2953.
2026-05-30 10:12:29 +07:00
afjcjsbx e1bada5b94 Merge remote-tracking branch 'upstream/main' 2026-05-29 10:16:05 +02:00
Mauro e81d37108b Merge pull request #2932 from KrtCZ/feat/czech-i18n
feat(i18n): add Czech (cs) locale
2026-05-29 10:14:42 +02:00
Mauro 4e280c5f5e Merge pull request #2961 from sipeed/dependabot/go_modules/github.com/pion/rtp-1.10.2
build(deps): bump github.com/pion/rtp from 1.10.1 to 1.10.2
2026-05-29 10:11:30 +02:00
Mauro 6247f47628 Merge pull request #2960 from sipeed/dependabot/go_modules/github.com/caarlos0/env/v11-11.4.1
build(deps): bump github.com/caarlos0/env/v11 from 11.4.0 to 11.4.1
2026-05-29 10:11:08 +02:00
afjcjsbx 32282beef8 Merge remote-tracking branch 'upstream/main' 2026-05-29 10:03:53 +02:00
Guoguo f9f53e30ee docs: update wechat qrcode (#2966) 2026-05-29 10:33:02 +08:00
dependabot[bot] a34669a2d8 build(deps): bump github.com/pion/rtp from 1.10.1 to 1.10.2
Bumps [github.com/pion/rtp](https://github.com/pion/rtp) from 1.10.1 to 1.10.2.
- [Release notes](https://github.com/pion/rtp/releases)
- [Commits](https://github.com/pion/rtp/compare/v1.10.1...v1.10.2)

---
updated-dependencies:
- dependency-name: github.com/pion/rtp
  dependency-version: 1.10.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-28 19:27:12 +00:00
dependabot[bot] f797172a86 build(deps): bump github.com/caarlos0/env/v11 from 11.4.0 to 11.4.1
Bumps [github.com/caarlos0/env/v11](https://github.com/caarlos0/env) from 11.4.0 to 11.4.1.
- [Release notes](https://github.com/caarlos0/env/releases)
- [Commits](https://github.com/caarlos0/env/compare/v11.4.0...v11.4.1)

---
updated-dependencies:
- dependency-name: github.com/caarlos0/env/v11
  dependency-version: 11.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-28 19:27:05 +00:00
afjcjsbx 8e0964be24 Merge remote-tracking branch 'upstream/main' 2026-05-28 19:57:53 +02:00
Mauro 85751492c6 Merge pull request #2950 from yuxuan-7814/fix/2912-add-funding-yml
docs: add FUNDING.yml for GitHub Sponsors
2026-05-28 19:50:38 +02:00
Mauro 0b7e18cd9e Merge pull request #2949 from yuxuan-7814/fix/2944-termux-ssl-cert
fix: auto-detect Termux SSL certificate path
2026-05-28 19:43:18 +02:00
yuxuan-7814 e9e653fb13 docs: add FUNDING.yml for GitHub Sponsors
Add FUNDING.yml file to enable GitHub Sponsors button on the repo.
This makes it easy for users who benefit from PicoClaw to support
the project financially.

Closes #2912
2026-05-26 16:53:33 +08:00
yuxuan-7814 5755b5b323 fix: auto-detect Termux SSL certificate path
When running PicoClaw inside Termux or termux-chroot, HTTPS
requests fail with X509 certificate errors because the Go TLS
stack does not automatically detect the Termux CA bundle path.

This change adds automatic detection of Termux environments and
sets SSL_CERT_FILE to the correct CA bundle path before any
network operations. The detection checks:
- HOME or PATH contains 'com.termux'
- Common CA bundle locations in Termux prefix

Fixes #2944
2026-05-26 16:49:42 +08:00
afjcjsbx 65c09d4270 Merge remote-tracking branch 'upstream/main' 2026-05-26 09:22:23 +02:00
LC 28ec5793a8 feat(web): add line numbers and wrap toggle for code blocks (#2933)
* feat(web): add line numbers and wrap toggle for code blocks

* fix(web): preserve markdown code block copy semantics
2026-05-26 14:57:52 +08:00
Mauro c5a016ccc6 Merge pull request #2946 from lc6464/feat/seahorse-created-at-history
fix(seahorse,session): preserve created_at across history bootstrap
2026-05-26 08:40:52 +02:00
lc6464 9825b4782f fix(seahorse,session): preserve created_at across history bootstrap 2026-05-26 14:05:20 +08:00
afjcjsbx f5f6fdc1f9 Merge remote-tracking branch 'origin/main' 2026-05-25 15:33:21 +02:00
afjcjsbx cfbddcd117 Merge remote-tracking branch 'upstream/main' 2026-05-25 15:32:55 +02:00