Skip to content

fix(api): report effective OAuth metadata availability - #60

Closed
GuGuLiuSandao wants to merge 1 commit into
LilithGames:mainfrom
GuGuLiuSandao:codex/effective-oauth-metadata
Closed

fix(api): report effective OAuth metadata availability#60
GuGuLiuSandao wants to merge 1 commit into
LilithGames:mainfrom
GuGuLiuSandao:codex/effective-oauth-metadata

Conversation

@GuGuLiuSandao

Copy link
Copy Markdown
Contributor

What changed

  • make public Agent metadata report oauthEnabled: true only when the Agent publishes OAuth and the platform OAuth channel is configured
  • reuse the runtime isOauthChannelConfigured() gate, including the enterprise OIDC configuration and non-empty channel audience requirement
  • add regression coverage for an OAuth-published Agent on an unconfigured platform
  • update the Chinese and English in-app user manual with the effective-availability semantics

Why

Previously, /api/public/agents/metadata derived oauthEnabled only from the Agent's publish-channel list. It could therefore advertise OAuth as enabled while every invocation returned 503 OAUTH_NOT_CONFIGURED because the platform had no usable enterprise OIDC/audience configuration.

External consumers only need one answer: whether the Agent currently exposes a usable OAuth channel. The existing field now provides that answer without adding another public state field.

Impact

For published Agents whose OAuth switch is on but whose platform OAuth verification is not configured, oauthEnabled changes from true to false. No response shape or field name changes.

Validation

  • pnpm --filter @a2wave/api test -- src/routes/__tests__/public-metadata.test.ts src/lib/__tests__/oauth-channel-verify.test.ts
  • pnpm --filter @a2wave/api typecheck
  • pnpm --filter @a2wave/web typecheck
  • pnpm lint
  • pre-push workspace typecheck hook

@GuGuLiuSandao

Copy link
Copy Markdown
Contributor Author

Superseded by #61, recreated from the correct GitHub account.

@GuGuLiuSandao
GuGuLiuSandao deleted the codex/effective-oauth-metadata branch August 19, 2026 07:04
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