Repository navigation
fix(zsh): stop overriding the agentsfleet CLI's API URL - #47
Merged
Merged
Conversation
The command-line interface resolves its API URL as `explicitApi || creds.api_url || DEFAULT_API_URL` (cli/src/cli.ts:167), and DEFAULT_API_URL names production. A global AGENTSFLEET_API_URL therefore retargets every command away from the deployment stored in ~/.config/agentsfleet/credentials.json. Drop the three AGENTSFLEET_* exports and clear them for inherited environments, so the stored credential is the only source of truth. Telemetry consent is persisted in the config directory instead, so the opt-out survives without the environment variable.
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.
What
.zshrcexported threeAGENTSFLEET_*variables. One of them silentlyretargeted the
agentsfleetcommand-line interface away from the deploymentits own credential names.
The CLI resolves its API URL as
explicitApi || creds.api_url || DEFAULT_API_URL(cli/src/cli.ts:167), andDEFAULT_API_URLnamesproduction (
cli/src/util/url.ts:5).AGENTSFLEET_API_URLis read as theexplicitApislot (cli/src/program/entry/argv-scan.ts:85), so a globalexport beats the stored credential. Every command then ran against whatever
the variable named — here
http://localhost:3000, a port nothing listened on.Change
The state directory returns to its default,
~/.config/agentsfleet, so thecredential survives a reboot instead of living in
/tmp. The unset clearsoverrides a parent environment may still export.
Telemetry consent moves from the environment to the config directory
(
~/.config/agentsfleet/telemetry.json,consent: "denied"), which is thepersisted path the CLI already reads
(
cli/src/services/telemetry/consent.ts:79). Without that, dropping thevariable would have switched telemetry back on.
Verified
Note
This branch carries
97abfbb(mise: bun 1.4.5, rust 1.100.0, cargo-shear1.14.0), which was committed locally on
masterand not yet on GitHub.