picoclaw/pkg
sky5454 329e68e017
refactor(agent): Agent Looper refactor phase2, restructure pipeline and rename loop files to agent (#2585)
* refactor(agent): introduce interfaces for MessageBus and ChannelManager

Phase 2 of loop.go refactor — dependency inversion using adapter pattern.

- Add interfaces.MessageBus and interfaces.ChannelManager interfaces
- Create adapters/messagebus.go wrapping *bus.MessageBus
- Create adapters/channelmanager.go wrapping *channels.Manager
- Update AgentLoop to use interfaces instead of concrete types
- Update registerSharedTools to accept interfaces.MessageBus

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

* refactor(agent): restructure pipeline and rename loop files

Pipeline refactoring:
- Split pipeline.go (1400 lines) into focused files:
  - pipeline_setup.go (~115 lines): SetupTurn method
  - pipeline_llm.go (~519 lines): CallLLM method
  - pipeline_execute.go (~693 lines): ExecuteTools method
  - pipeline_finalize.go (~78 lines): Finalize method
- Pipeline struct and NewPipeline remain in pipeline.go (~39 lines)

Agent file renaming:
- Rename loop_*.go to agent_*.go for consistent naming:
  - loop.go -> agent.go, loop_message.go -> agent_message.go, etc.
- Merge turn.go + turn_exec.go into turn_state.go
- Rename loop_turn.go -> turn_coord.go

Documentation:
- Update docs/pipeline-restructuring-plan.md
- Add docs/agent-rename-plan.md

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

* fix(agent): code format  fixed

* refactor(agent): code test file added/renamed

* docs(agent): update agent refactor docs

* fix(agent): fix agent hardAbortX

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 10:55:50 +08:00
..
agent refactor(agent): Agent Looper refactor phase2, restructure pipeline and rename loop files to agent (#2585) 2026-04-21 10:55:50 +08:00
audio refactor(docs): reorganize docs by type and locale 2026-04-17 14:00:45 +08:00
auth fix(auth): improve no-browser OAuth login 2026-04-16 23:01:28 +08:00
bus fix(session): address review regressions 2026-04-13 22:51:44 +08:00
channels Revert "Feat/channel tool feedback animation (#2569)" (#2596) 2026-04-20 18:30:29 +08:00
commands feat(agent): support btw side questions (#2532) 2026-04-16 10:53:09 +08:00
config Revert "Feat/channel tool feedback animation (#2569)" (#2596) 2026-04-20 18:30:29 +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 config and security to simplified the structure (#2068) 2026-03-28 00:03:34 +08:00
cron refactor(cron): remove deliver and type params, unify agent execution path (#2147) 2026-03-29 22:52:34 +08:00
devices refactor(runtime): drop non-session legacy context compatibility 2026-04-01 20:56:48 +08:00
fileutil Merge pull request #1829 from perhapzz/test/add-fileutil-health-tests 2026-03-26 10:42:13 +01:00
gateway refactor(web): secure Pico websocket access behind launcher auth 2026-04-20 10:11:03 +08:00
health fix(host): modernize default host selection order 2026-04-14 14:03:23 +08:00
heartbeat refactor(runtime): drop non-session legacy context compatibility 2026-04-01 20:56:48 +08:00
identity fix(identity): support negative integers in isNumeric for Telegram group IDs 2026-03-21 17:09:02 +07:00
isolation refactor(docs): reorganize docs by type and locale 2026-04-17 14:00:45 +08:00
logger unify all panic event to panic log file (#2250) 2026-04-01 23:26:49 +08:00
mcp Feat/support isolation (#2423) 2026-04-08 18:15:42 +08:00
media Fix 1886 media cleanup policy (#1887) 2026-03-23 12:13:59 +08:00
memory fix(session): address review regressions 2026-04-13 22:51:44 +08:00
migrate refactor(config): make config.Channel to multiple instance support 2026-04-13 22:21:21 +08:00
netbind fix(web): address latest Copilot review points 2026-04-14 23:39:59 +08:00
pid fix(gateway): validate PID ownership and clean stale pid files (#2422) 2026-04-08 14:23:21 +08:00
providers Revert "Feat/channel tool feedback animation (#2569)" (#2596) 2026-04-20 18:30:29 +08:00
routing feat(routing): add ordered dispatch rules 2026-04-01 22:13:04 +08:00
seahorse test(seahorse): add TestTriggerMigration for old-DB trigger upgrade path 2026-04-13 11:37:50 +08:00
session fix(session): address review regressions 2026-04-13 22:51:44 +08:00
skills refactor skills registries and add GitHub-backed skill discovery (#2442) 2026-04-14 15:14:16 +08:00
state refactor Config to add Version and migratable 2026-03-12 13:52:55 +08:00
tokenizer feat(seahorse): implement short-term memory engine (LCM) (#2285) 2026-04-05 09:05:16 +08:00
tools fix(tools): centralize shared LLM note constants 2026-04-17 14:31:43 +08:00
updater fix(updater): retry release fetches (#2511) 2026-04-14 10:44:21 +08:00
utils Revert "Feat/channel tool feedback animation (#2569)" (#2596) 2026-04-20 18:30:29 +08:00
env.go Merge branch 'main' into version 2026-03-19 18:04:58 +08:00