Skip to content

[codex] Add AgentTeams STS auth compatibility - #85

Merged
Sunrisea merged 2 commits into
mainfrom
codex/sts-agentteams-auth
Jun 22, 2026
Merged

Sunrisea merged 2 commits into
mainfrom
codex/sts-agentteams-auth

Conversation

@shiyiyue1102

Copy link
Copy Markdown
Collaborator

Summary

Add sts-agentteams as an AgentTeams-compatible STS auth type while keeping the existing STS credential refresh and SPAS signing flow unchanged.

Changes

  • Accept sts-agentteams in CLI flags, env auth type, profile config, and interactive profile prompts.
  • Read AGENTTEAMS_CONTROLLER_URL and AGENTTEAMS_AUTH_TOKEN_FILE for sts-agentteams.
  • Read AGENTTEAMS_CLUSTER_ID for the optional STS cluster header in sts-agentteams mode.
  • Keep sts-hiclaw behavior on the existing HICLAW_* variables.

Validation

  • go test ./cmd ./internal/client ./internal/config ./internal/terminal
  • go test ./...

Change-Id: I8a631641a759fd03b83d2fac1107484a11f37ea0
@shiyiyue1102
shiyiyue1102 requested a review from Sunrisea June 20, 2026 01:46
@Sunrisea

Copy link
Copy Markdown
Member

I found one compatibility regression around profile loading.

Before this PR, hasCommandLineConfig only treated --auth-type sts-hiclaw as enough to skip profile loading. After changing it to authType != "", any explicit --auth-type now skips loading the current/default profile.

This can break existing usage such as:

nacos-cli --auth-type aliyun skill-list
# or
nacos-cli --auth-type nacos skill-list

If the profile already contains host/port and credentials, users may expect --auth-type to only override the auth type while still reusing the profile. With the new logic, the profile is skipped, so the command falls back to the default server and loses accessKey/secretKey or username/password.

Could we narrow this condition to only the STS auth types that need env-based bootstrap, for example sts-hiclaw, sts-agentteams, and sts-url, instead of all non-empty auth types?

Change-Id: I4d8077cb078eee5b1cfb22f411fafd8eea413cd6
@shiyiyue1102

Copy link
Copy Markdown
Collaborator Author

Thanks for catching this. Fixed in c70bd49 by narrowing the profile-skip condition to STS auth types only. Explicit --auth-type nacos / --auth-type aliyun now still loads the active profile, and I added a regression test for the aliyun override case.

Validation: go test ./... passed.

@Sunrisea
Sunrisea merged commit f321fc5 into main Jun 22, 2026
8 checks passed
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.

2 participants