fix: register embedded profiles in CLI metadata on daemon start#546
Open
nicoloboschi wants to merge 1 commit intomainfrom
Open
fix: register embedded profiles in CLI metadata on daemon start#546nicoloboschi wants to merge 1 commit intomainfrom
nicoloboschi wants to merge 1 commit intomainfrom
Conversation
When HindsightEmbedded(profile="myapp") starts a daemon, the profile
was never written to metadata.json or given a .env file, making it
invisible to `hindsight-embed profile list` and other CLI commands.
Add _register_profile() to DaemonEmbedManager which saves HINDSIGHT_API_*
config to ~/.hindsight/profiles/{name}.env and registers the port in
metadata.json. Called after a successful new daemon start and when the
daemon is already running, so orphaned profiles also get registered on
next use.
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
HindsightEmbedded(profile="myapp")starts a daemon but never wrote~/.hindsight/profiles/myapp.envor registered the profile inmetadata.json, sohindsight-embed profile list(and the rest of the CLI) was blind to it_register_profile()toDaemonEmbedManagerwhich savesHINDSIGHT_API_*config keys to the profile.envfile and registers the port inmetadata.jsonTest plan
HindsightEmbedded(profile="myapp")→uvx hindsight-embed profile listshowsmyapp"") is skipped (no registration needed, CLI discovers it via~/.hindsight/embedfile)create_profileis idempotent)