Companion to mngr#2408: system_interface lifecycle state from the full observe stream#250
Draft
gnguralnick wants to merge 5 commits into
Draft
Companion to mngr#2408: system_interface lifecycle state from the full observe stream#250gnguralnick wants to merge 5 commits into
gnguralnick wants to merge 5 commits into
Conversation
Switch the agent manager from `mngr observe --discovery-only` (a state-less metadata stream that forced every agent to a hardcoded RUNNING) to `mngr observe --stream-events`, whose AGENT_STATE / AGENTS_FULL_STATE / AGENT_REMOVED events carry each agent's real probed lifecycle state. - Fold observe events into a per-id AgentDetails view: full-state rebuilds the set, agent-state upserts one, agent-removed drops one. AgentStateItem.state is now the real state; messaging identity comes from AgentDetails.host. - A lifecycle-state change (e.g. RUNNING -> STOPPED when a process dies) now re-gates the activity indicator through the unchanged is_agent_running gate, so a stopped agent drops its "Thinking..." indicator to idle. - Only the source of the state changed; the dot / activity-indicator UI is untouched. _initial_discover is kept (it also seeds the assist-auto-open baseline and already carries real state). Depends on the corresponding mngr change (the observe --stream-events mode, AGENT_REMOVED event, and parse_observe_event_line) being vendored in; until then this branch will not import. Co-authored-by: Sculptor <sculptor@imbue.com>
Tracks 35b59cf47fb79fbdd30a3cc8658784da24e9c8b1 in mngr.
The vendored mngr now exposes `observe --stream-events`, so the live-CLI argv contract check passes; remove the temporary skip. Co-authored-by: Sculptor <sculptor@imbue.com>
The vendor/mngr refresh (Sync to 35b59cf47) changed the vendored mngr's dependencies (e.g. psutil >=7.2 for the observe PID-watch, plus other deps accumulated since the last vendor); regenerate the lock to match. Co-authored-by: Sculptor <sculptor@imbue.com>
…atch # Conflicts: # vendor/mngr/apps/minds/CHANGELOG.md # vendor/mngr/apps/minds/UNABRIDGED_CHANGELOG.md # vendor/mngr/dev/CHANGELOG.md # vendor/mngr/dev/UNABRIDGED_CHANGELOG.md # vendor/mngr/libs/mngr/CHANGELOG.md # vendor/mngr/libs/mngr/UNABRIDGED_CHANGELOG.md # vendor/mngr/libs/mngr_latchkey/CHANGELOG.md # vendor/mngr/libs/mngr_latchkey/UNABRIDGED_CHANGELOG.md # vendor/mngr/libs/mngr_modal/CHANGELOG.md # vendor/mngr/libs/mngr_modal/UNABRIDGED_CHANGELOG.md
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.
Companion to mngr#2408 (the two land/merge separately).
Summary
Switch the
system_interfaceagent manager frommngr observe --discovery-only(a state-less metadata stream that pinned every agent to a hardcodedRUNNING) tomngr observe --stream-events, whoseAGENT_STATE/AGENTS_FULL_STATE/AGENT_REMOVEDevents carry each agent's real probed lifecycle state.AgentDetailsview: full-state rebuilds the set, agent-state upserts one, agent-removed drops one.AgentStateItem.stateis now the real state; messaging identity comes fromAgentDetails.host.RUNNING->STOPPEDwhen a process dies) re-gates the activity indicator through the unchangedis_agent_runninggate, so a stopped agent drops its "Thinking..." indicator to idle._initial_discoveris kept (it also seeds the assist-auto-open baseline and already carries real state).Vendor
origin/main; the merge's only conflict wasvendor/mngr, resolved by a coherent re-vendor of the whole tree from mngrbdec83414(which contains the release36 SHAc55d2b225that main vendored, plus the mngr#2408 change). Verified vendor-match:vendor/mngrequals mngrbdec83414file-for-file (modulo the.minds/files FCT's ignore strips).system_interfacefold change is isolated in its own commit for review; the vendor refresh + the merge are separate commits.Testing
apps/system_interfacesuite against the merged tree (main's new system_interface code + the re-vendored mngr): 557 passed (-m 'not tmux and not modal and not docker and not docker_sdk and not acceptance and not release' --no-cov). Two failures are environmental, not from this change:test_start_observe_spawns_long_lived_subprocess(mngr'sis_allowed_in_pytestconfig guard aborts the real subprocess locally — flag-independent, passes in CI) andtest_no_type_errors(localtycan't resolvemodal/minds/latchkey; 0 errors in touched files).AGENT_STATESTOPPED flips state + re-gates activity to IDLE;AGENTS_FULL_STATErebuild;AGENT_REMOVEDremoval side-effects; location matching fromAgentDetails.host; assist auto-open.tyclean onagent_manager.py; ruff clean.