feat(setup)!: replace init/login/logout with unified agentage setup#145
Merged
feat(setup)!: replace init/login/logout with unified agentage setup#145
Conversation
Single command replaces `agentage init`, `agentage login`, and `agentage logout`. Interactive when invoked from a TTY (one confirmation prompt) and fully headless with `--yes`, `--token`, `--machine-id`, `--reauth`, or `--disconnect` flags. Cloud-init / scripted installs target: agentage setup --machine-id $ID --token $TK --hub $URL --yes --no-interactive The daemon's existing `resolveMachine` precedence (machine.json first) means `--machine-id` writes the file before the daemon boots and is adopted automatically — no daemon code change needed. BREAKING CHANGE: `agentage init`, `agentage login`, and `agentage logout` are removed. Commander now responds with `unknown command` for any straggler invocation. Replace with the corresponding `agentage setup [--reauth|--disconnect]` form.
d4eea36 to
9f0f01f
Compare
Contributor
|
🎉 PR Validation ✅ PASSED Commit: Checks:
Ready to merge! ✨ 🔗 View workflow run |
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
agentage init,agentage login, andagentage logoutwith a unifiedagentage setupcommand.Connect machine "foo" to https://agentage.io ? [Y/n]).--yes,--token,--machine-id,--reauth, or--disconnect(or when no TTY is present and--token/--no-loginare supplied).agentage setup --machine-id $ID --token $TK --hub $URL --yes --no-interactive. The daemon's existingresolveMachineprecedence (readsmachine.jsonfirst) means the supplied--machine-idis adopted on first boot — no daemon code change.Spec:
work/specs/cli-setup.md(vault, draft).BREAKING CHANGE
agentage init,agentage login,agentage logoutare removed in this PR — no deprecation wrappers, no warnings. Commander responds withunknown commandfor any straggler invocation. CHANGELOG entry under[Unreleased].Migration:
agentage init …→agentage setup …(same--name,--hub,--dirflags supported)agentage login→agentage setup(interactive) oragentage setup --reauthagentage login --token T→agentage setup --token Tagentage logout→agentage setup --disconnectWhat changed
src/commands/setup.tsrunSetup()+registerSetup()src/commands/setup.test.tssrc/commands/{init,login,logout}{,.test}.tssrc/cli.tsregisterInit/Login/Logout→registerSetupsrc/commands/{run,runs,machines,agents}.tsREADME.mdCHANGELOG.md[Unreleased]BREAKING entryDiff: +856 / −573 across 15 files.
Behavior matrix (covered by tests)
agentage setupagentage setupagentage setupcannot prompt)agentage setup --yesagentage setup --token T --machine-id M --hub Hagentage setup --reauthagentage setup --disconnectagentage setup --no-loginExit codes
--token+ no--no-login--reauth+--disconnectmutually exclusive--machine-idchange without--forceTest plan
npm run verifygreen (type-check + lint + format:check + test + build)agentage init,agentage login,agentage logoutreject withunknown command(asserted in 3 tests)--machine-idwrites~/.agentage/machine.jsonbefore daemon boot (asserted)--tokenskips browser pathy/yes; aborts onnagentage setupinteractively againsthttps://dev.agentage.ioand confirm one-prompt OAuth flowagentage init,agentage login,agentage logoutinagents/,web/landing/,e2e/,infrastructure/and update any stragglers (not in this PR)