picoclaw/pkg/agent
sky5454 12d5421c26 refactor(agent): split loop.go into focused sub-packages
Break up the monolithic 4384-line loop.go into 12 focused files:
- loop.go: core AgentLoop struct and main Run loop
- loop_turn.go: turn execution logic (runTurn, askSideQuestion, etc.)
- loop_utils.go: pure utility functions (formatters, helpers)
- loop_init.go: constructor and tool registration
- loop_message.go: message handling (processMessage, routing)
- loop_command.go: command processing (/use, /btw, etc.)
- loop_mcp.go: MCP runtime management
- loop_event.go: event/hook system helpers
- loop_media.go: media resolution and artifact handling
- loop_outbound.go: response publishing
- loop_transcribe.go: audio transcription
- loop_steering.go: steering queue and continuation
- loop_inject.go: setter injection methods

No functional changes - pure code movement with updated imports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 11:17:12 +08:00
..
context.go fix(agent): preserve reused tool call IDs across turns (#2528) 2026-04-15 20:18:09 +08:00
context_budget.go feat(seahorse): implement short-term memory engine (LCM) (#2285) 2026-04-05 09:05:16 +08:00
context_budget_test.go feat(seahorse): implement short-term memory engine (LCM) (#2285) 2026-04-05 09:05:16 +08:00
context_cache_test.go feat(web): support image messages in pico chat (#2299) 2026-04-03 14:15:20 +08:00
context_legacy.go merge: integrate main seahorse context changes 2026-04-13 23:02:38 +08:00
context_manager.go feat(agent): /clear now clears seahorse DB in addition to JSONL 2026-04-13 11:04:45 +08:00
context_manager_test.go feat(agent): /clear now clears seahorse DB in addition to JSONL 2026-04-13 11:04:45 +08:00
context_seahorse.go feat(agent): /clear now clears seahorse DB in addition to JSONL 2026-04-13 11:04:45 +08:00
context_seahorse_test.go feat(seahorse): implement short-term memory engine (LCM) (#2285) 2026-04-05 09:05:16 +08:00
context_seahorse_unsupported.go fix(agent): disable seahorse context manager on freebsd/arm (#2417) 2026-04-08 10:57:22 +08:00
context_test.go fix(agent): preserve reused tool call IDs across turns (#2528) 2026-04-15 20:18:09 +08:00
definition.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
definition_test.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
dispatch_request.go fix(session): address review regressions 2026-04-13 22:51:44 +08:00
dispatch_request_test.go fix(session): address review regressions 2026-04-13 22:51:44 +08:00
eventbus.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
eventbus_test.go Merge branch 'main' into refactor-inbound-context-routing-session 2026-04-07 21:41:02 +08:00
events.go Merge branch 'main' into refactor-inbound-context-routing-session 2026-04-07 21:41:02 +08:00
hook_mount.go merge: resolve conflicts between refactor/agent and main 2026-03-22 19:21:58 +08:00
hook_mount_test.go Merge branch 'main' into version 2026-03-23 10:54:08 +08:00
hook_process.go Feat/support isolation (#2423) 2026-04-08 18:15:42 +08:00
hook_process_test.go Feat/support isolation (#2423) 2026-04-08 18:15:42 +08:00
hooks.go merge: integrate main into refactor-inbound-context-routing-session 2026-04-13 13:25:07 +08:00
hooks_test.go feat(agent): support btw side questions (#2532) 2026-04-16 10:53:09 +08:00
instance.go Feat/support isolation (#2423) 2026-04-08 18:15:42 +08:00
instance_test.go fix: use per candidate provider for model_fallbacks (#2143) 2026-04-07 20:07:56 +08:00
llm_media.go refactor: make agent loop support parallel and update docs 2026-04-16 14:43:15 +08:00
loop.go refactor(agent): split loop.go into focused sub-packages 2026-04-17 11:17:12 +08:00
loop_command.go refactor(agent): split loop.go into focused sub-packages 2026-04-17 11:17:12 +08:00
loop_event.go refactor(agent): split loop.go into focused sub-packages 2026-04-17 11:17:12 +08:00
loop_init.go refactor(agent): split loop.go into focused sub-packages 2026-04-17 11:17:12 +08:00
loop_inject.go refactor(agent): split loop.go into focused sub-packages 2026-04-17 11:17:12 +08:00
loop_mcp.go fix(agent): reinitialize MCP and discovery tools after reload 2026-04-12 21:37:19 +02:00
loop_mcp_test.go fix(agent): reinitialize MCP and discovery tools after reload 2026-04-12 21:37:19 +02:00
loop_media.go resolve conflicts 2026-03-22 23:36:25 +01:00
loop_message.go refactor(agent): split loop.go into focused sub-packages 2026-04-17 11:17:12 +08:00
loop_outbound.go refactor(agent): split loop.go into focused sub-packages 2026-04-17 11:17:12 +08:00
loop_steering.go refactor(agent): split loop.go into focused sub-packages 2026-04-17 11:17:12 +08:00
loop_test.go refactor: make agent loop support parallel and update docs 2026-04-16 14:43:15 +08:00
loop_transcribe.go refactor(agent): split loop.go into focused sub-packages 2026-04-17 11:17:12 +08:00
loop_turn.go refactor(agent): split loop.go into focused sub-packages 2026-04-17 11:17:12 +08:00
loop_utils.go refactor(agent): split loop.go into focused sub-packages 2026-04-17 11:17:12 +08:00
memory.go refactor(modernize): apply safe modernize fixes 2026-02-27 16:35:07 +08:00
mock_provider_test.go feat(fmt): Fix formatting 2026-02-19 22:05:15 +02:00
model_resolution.go feat(model): llm rate limiting (#2198) 2026-04-02 19:26:26 +08:00
registry.go refactor(runtime): drop non-session legacy context compatibility 2026-04-01 20:56:48 +08:00
registry_test.go refactor Config to add Version and migratable 2026-03-12 13:52:55 +08:00
steering.go refactor: make agent loop support parallel and update docs 2026-04-16 14:43:15 +08:00
steering_test.go refactor: make agent loop support parallel and update docs 2026-04-16 14:43:15 +08:00
subturn.go refactor(agent): normalize dispatch and outbound turn metadata 2026-04-07 22:12:23 +08:00
subturn_test.go Merge branch 'main' into version 2026-03-23 10:54:08 +08:00
thinking.go feat: add extended thinking support for Anthropic models (#1076) 2026-03-05 09:51:18 +08:00
thinking_test.go feat: add extended thinking support for Anthropic models (#1076) 2026-03-05 09:51:18 +08:00
turn.go refactor: make agent loop support parallel and update docs 2026-04-16 14:43:15 +08:00
turn_context.go refactor(session): replace dm scope with dimensions policy 2026-04-01 17:19:50 +08:00