feat(cli): implement local persistent state for agent tracking#229
Merged
lijingrs merged 1 commit intomofa-org:mainfrom Feb 23, 2026
Merged
feat(cli): implement local persistent state for agent tracking#229lijingrs merged 1 commit intomofa-org:mainfrom
lijingrs merged 1 commit intomofa-org:mainfrom
Conversation
a348265 to
50d9e88
Compare
Collaborator
|
Your forked code is outdated. Please sync the fork to the latest version and merge the main branch into your current branch. |
50d9e88 to
09968ad
Compare
09968ad to
6fe1022
Compare
lijingrs
approved these changes
Feb 23, 2026
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.
📋 Summary
Implements a JSON-based local persistence layer for the MoFA CLI. Agents started via
mofa agent startare now recorded to a local state file so thatmofa agent listcan display real data instead of hardcoded mock entries.🔗 Related Issues
Closes #227
🧠 Context
The mofa agent commands (list, start, etc.) currently use hardcoded mock data, making it impossible to track agent lifecycle across terminal sessions. This is a prerequisite for functional CLI-based agent management.
🛠️ Changes
agent startto persist agent metadata on invocationagent listto read from the local state filechronodependency for timestamps and uptime calculation🧪 How you Tested
If breaking:
🧹 Checklist
Code Quality
cargo fmtruncargo clippypasses without warningsTesting
cargo testpasses locally without any errorDocumentation
PR Hygiene
main🧩 Additional Notes for Reviewers
Clippy Notes
cargo clippywas executed across the workspace. Pre-existing warnings are present inmofa-kernel, but this PR does not introduce any new warnings.This PR tracks logical CLI state only. OS-level process management (PID monitoring, daemonization) is explicitly out of scope.
State file location: %APPDATA%/mofa/state.json (Windows).