picoclaw/pkg/config
Amir Mamaghani 544940807f
feat(pico): add pico_client outbound WebSocket channel (#1198)
* feat(pico): add pico_client outbound WebSocket channel

Add a client-mode counterpart to the existing pico server channel.
pico_client connects to a remote Pico Protocol WebSocket server,
enabling picoclaw to bridge messages with external Pico-compatible
services.

Includes config, factory registration, manager wiring, 8 unit tests,
and a minimal echo-server example for interactive testing.

* fix(pico): address PR #1198 review — goroutine leak, race, auth

- Add per-connection context cancel to picoConn to prevent pingLoop
  goroutine leak on disconnect
- Re-acquire mutex in StartTyping stop closure to avoid stale conn race
- Remove query-param token auth from echo server (header-only)
- Move ListenAndServe to main goroutine where log.Fatal is safe

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

* fix: replace ConsumeInbound with InboundChan select in client test

MessageBus does not expose a ConsumeInbound method. Use a select on
InboundChan() with context cancellation, matching the pattern used in
the bus package tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 20:43:40 +08:00
..
config.go feat(pico): add pico_client outbound WebSocket channel (#1198) 2026-03-20 20:43:40 +08:00
config_test.go feat: Add Novita provider support (#1677) 2026-03-18 18:29:27 +08:00
defaults.go Feat/wecom aibot processing message config (#1785) 2026-03-20 00:23:40 +08:00
envkeys.go refactor: centralize environment variable key constants (#1730) 2026-03-18 18:03:24 +08:00
migration.go fix(config): model_list inherits api_key/api_base from providers (#1786) 2026-03-19 21:24:46 +08:00
migration_test.go fix(config): model_list inherits api_key/api_base from providers (#1786) 2026-03-19 21:24:46 +08:00
model_config_test.go fix(config): start model round robin from the first match 2026-03-17 21:59:04 +08:00
multikey_test.go feat(config): support multiple API keys for failover (#1707) 2026-03-19 00:57:20 +08:00
version.go feat:Modify the location where version is obtained, and insert version information into the context (#1300) 2026-03-10 17:42:05 +08:00
version_test.go feat:Modify the location where version is obtained, and insert version information into the context (#1300) 2026-03-10 17:42:05 +08:00