This repository was archived by the owner on Apr 18, 2026. It is now read-only.
refactor(agent): remove mega-barrel re-export and fix session memory leak#167
Open
runyaga wants to merge 1 commit into
Open
refactor(agent): remove mega-barrel re-export and fix session memory leak#167runyaga wants to merge 1 commit into
runyaga wants to merge 1 commit into
Conversation
…leak Stop re-exporting soliplex_client from soliplex_agent barrel. Consumers now import soliplex_client explicitly, making dependency ownership clear and preventing breaking changes in client from cascading through agent. Fix memory leak where autoDispose:false sessions were never removed from AgentRuntime._sessions map. AgentSession now accepts an onDispose callback that the runtime uses to auto-clean the tracking map on any disposal path. 44 files changed across agent, cli, tui, scripting. 548 unit tests pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
autoDispose: falsesessions were never removed fromAgentRuntime._sessionsmap —AgentSessionnow accepts anonDisposecallback that auto-cleans the tracking map on any disposal path_handleSessionCompleteandspawn()error path — both fixedChanges
soliplex_agent.dart): Removed 30-linesoliplex_clientre-export. Keptsignals_corere-export (part of public API surface).onDisposecallback parameter.dispose()invokes it after cleanup._removeSessionasonDisposeto session constructor. Removed now-redundant explicit_removeSessioncalls from_handleSessionCompleteandspawn()error path.import 'package:soliplex_client/soliplex_client.dart'across agent, cli, tui packages. Removed stalehide Stateand widenedshowclauses.Test plan
dart analyze --fatal-infos— 0 issues across all 4 packagesdart format— 0 changes neededdart test— 548 unit tests pass (agent: 394, cli: 16, tui: 69, scripting: 69)Addresses P0 fixes #1 and #2 from the Soliplex API Audit.
🤖 Generated with Claude Code