fix(init): clean up agent onboarding leftovers and persist onboarding source - #102
Merged
Conversation
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.
Addresses items 1–3 of #91 . Item 4 (login's 5-minute localhost callback wait) is covered by the device flow work in #92 and is intentionally left out here.
1. Remove orphaned
init_agent_guide.mdsteel init --agentstopped printing this guide when--agentwas repurposed to mean "auto-accept prompts". The file has had zero references since, and its content is stale (predates the steel-dev/skills install flow and claims cross-device auth works, which the127.0.0.1callback does not allow).2. Sync
--agentdocs with actual behaviorinstall.shdocstring and the comment above thesteel init --agentinvocation still described the removed print-and-exit behavior.Getting Startedblock insteel --helpsaid the same thing.Both now describe what
--agentdoes: run non-interactively, auto-accept prompts, print agent-friendly output.3. Persist onboarding attribution and attach it to telemetry
install.sh --from <agent>exportedSTEEL_ONBOARDING_FROM, but the only consumer was astatus!()line ininit.login_completedfired with empty properties, and since login usually happens in a later shell, the env var was gone by then anyway.Now:
steel initpersists the value toconfig.jsonasonboarding.source.onboarding.sourceat startup and attaches it asonboarding_sourceon every event, sologin_completedand first-session events carry it even in a later shell.steel initprocess, the source is pushed into the telemetry state immediately sologin_completedpicks it up before the config is re-read.