Open
Conversation
…-discovery-only' The streaming functionality doesn't belong in 'list' because none of the list filtering/sorting options make sense with it. It fits naturally as a mode of 'observe' since observe already runs it internally. - Extract discovery stream logic from cli/list.py to api/discovery_events.py as run_discovery_stream() with an optional on_line callback - Add --discovery-only flag to 'mngr observe' CLI - Remove --stream flag from 'mngr list' CLI - Update AgentObserver to spawn 'mngr observe --discovery-only' subprocess - Update MngrStreamManager in minds app to use new command - Move stream tests to discovery_events_test.py, update list tests - Regenerate CLI docs, update tutorial examples - Fix pre-existing ruff issues in observe.py (unused pdb import, B007) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: The `poll_until` import from `imbue.mngr.utils.polling` was placed before the `OnlineHostInterface` import from `imbue.mngr.interfaces.host`, breaking alphabetical ordering within the first-party import block. Fix: Swap the two imports to restore correct alphabetical order. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: The `poll_until` import from `imbue.mngr.utils.polling` was placed before the `imbue.mngr.primitives` imports, violating the isort rules enforced by the pre-commit hook (ruff --select I). Additionally, the blank line separator between third-party and first-party imports was missing. Fix: Reordered imports to match ruff isort conventions, placing `imbue.mngr.primitives` before `imbue.mngr.utils.polling` and adding the required blank line after third-party imports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: Private attribute _list_stream_process and methods _start_list_stream, _on_list_stream_output still used the old "list_stream" naming even though the command was changed from "mngr list --stream" to "mngr observe --discovery-only". Fix: Renamed to _discovery_stream_process, _start_discovery_stream, and _on_discovery_stream_output to match the actual operation being performed. Updated corresponding tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…treamManager Problem: Method _on_list_stream_output in MngrStreamManager still used the old "list_stream" naming even though the command was changed from "mngr list --stream" to "mngr observe --discovery-only". Fix: Renamed to _on_discovery_stream_output to match the actual operation being performed. Updated corresponding tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: error_behavior was computed before the if/else branch in observe.py, making it appear to apply to both the --discovery-only and full observe paths. In reality, AgentObserver hardcodes ErrorBehavior.CONTINUE, so the --on-error option had no effect in the full observe path. This is misleading dead code. Fix: Move error_behavior computation inside the if opts.discovery_only block to make it clear that --on-error only applies to discovery-only mode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: The file was named list_stream_test.py but no longer contains any stream-related tests after those were moved to discovery_events_test.py. The remaining tests are all watch mode tests. Fix: Rename to list_watch_test.py to accurately reflect the file contents. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Problem: test_discovery_stream_tail_detects_new_content manually replaced sys.stdout with a StringIO to capture output, which is fragile when running concurrent threads and unnecessary since _discovery_stream_tail_events_file accepts an on_line callback parameter for exactly this purpose. Fix: Use the on_line callback (captured_lines.append) instead of manipulating sys.stdout. Remove the now-unused sys and StringIO imports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Automated PR created by Claude Code session.