Skip to content

fix: register embedded profiles in CLI metadata on daemon start#546

Open
nicoloboschi wants to merge 1 commit intomainfrom
fix/embed-profile-registration
Open

fix: register embedded profiles in CLI metadata on daemon start#546
nicoloboschi wants to merge 1 commit intomainfrom
fix/embed-profile-registration

Conversation

@nicoloboschi
Copy link
Collaborator

Summary

  • HindsightEmbedded(profile="myapp") starts a daemon but never wrote ~/.hindsight/profiles/myapp.env or registered the profile in metadata.json, so hindsight-embed profile list (and the rest of the CLI) was blind to it
  • Added _register_profile() to DaemonEmbedManager which saves HINDSIGHT_API_* config keys to the profile .env file and registers the port in metadata.json
  • Called both after a successful new daemon start and when the daemon is already running — so orphaned profiles from before this fix also get registered on next use

Test plan

  • HindsightEmbedded(profile="myapp")uvx hindsight-embed profile list shows myapp
  • Re-attaching to an already-running embedded daemon also registers the profile
  • Default profile ("") is skipped (no registration needed, CLI discovers it via ~/.hindsight/embed file)
  • Existing CLI-created profiles are unaffected (create_profile is idempotent)

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant