picoclaw/pkg
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
..
agent Merge pull request #1390 from kiannidev/fix/1323-telegram-endless-typing 2026-03-19 21:52:10 +01:00
auth refactor: centralize environment variable key constants (#1730) 2026-03-18 18:03:24 +08:00
bus fix: Fixed the bug where the bus was closed and consumers had unfinished messages. (#1179) 2026-03-18 00:12:12 +08:00
channels feat(pico): add pico_client outbound WebSocket channel (#1198) 2026-03-20 20:43:40 +08:00
commands feat: add /reload to gateway api and command (#1725) 2026-03-19 13:42:36 +08:00
config feat(pico): add pico_client outbound WebSocket channel (#1198) 2026-03-20 20:43:40 +08:00
constants refactor: replace bool map with set-style map for internal channels (#472) 2026-02-19 11:48:17 +01:00
credential refactor: centralize environment variable key constants (#1730) 2026-03-18 18:03:24 +08:00
cron feat(cron): refactor scheduler to event-driven model and add unit tests (#1313) 2026-03-18 00:02:51 +08:00
devices refactor: cleanup dead code and turn on dead code detection in CI (#515) 2026-02-24 21:52:25 +08:00
fileutil refactor(pkg): move atomic file write to dedicated fileutil package 2026-02-24 23:57:13 +08:00
gateway refactor[gateway]: just reload the changed channels on reload occurred (#1773) 2026-03-19 15:28:52 +08:00
health feat: add /reload to gateway api and command (#1725) 2026-03-19 13:42:36 +08:00
heartbeat enable dupl check 2026-03-01 18:17:32 +11:00
identity fix(identity): prevent allowlist ID entries from matching usernames (#1406) 2026-03-13 15:41:18 +08:00
logger feat(web): implement macOS app feature and file logger (#1723) 2026-03-18 14:43:58 +08:00
mcp Feat/add tool enable or disable configuration (#1071) 2026-03-05 14:53:26 +08:00
media refactor(media): centralize temp media dir path 2026-03-14 12:01:47 +08:00
memory fix: skip meta json files during session migration (#1340) 2026-03-11 14:29:42 +08:00
migrate feat: telegram use parse mode ModeMarkdownV2 instead of ModeHTML (#1018) 2026-03-18 21:29:21 +08:00
providers feat(provider): add Alibaba Coding Plan and regional Qwen endpoints (#1748) 2026-03-19 22:07:30 +08:00
routing fix(routing): address review feedback on CJK estimation and observability 2026-03-06 13:10:20 +08:00
session fix(security): harden unauthenticated tool-exec paths (#1360) 2026-03-11 19:22:20 +08:00
skills enhance skill installer (#1252) 2026-03-13 14:04:02 +08:00
state fix(security): harden unauthenticated tool-exec paths (#1360) 2026-03-11 19:22:20 +08:00
tools feat(tool): anti cloudflare challenge in web_fetch (#1762) 2026-03-19 17:01:45 +08:00
utils Merge branch 'main' into feat/markdown-output-format-web-fetch 2026-03-17 16:37:22 +01:00
voice Fix lint 2026-03-04 10:21:59 +00:00