Skip to content

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

Merged
tatelilith merged 1 commit into
LilithGames:mainfrom
lilith-hyh:codex/effective-oauth-metadata
Aug 19, 2026
Merged

fix(api): report effective OAuth metadata availability#61
tatelilith merged 1 commit into
LilithGames:mainfrom
lilith-hyh:codex/effective-oauth-metadata

Conversation

@lilith-hyh

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

@lilith-hyh
lilith-hyh marked this pull request as ready for review August 19, 2026 07:12
@lilith-hyh
lilith-hyh force-pushed the codex/effective-oauth-metadata branch from e9c4127 to b3480d3 Compare August 19, 2026 07:53
@tatelilith
tatelilith merged commit d60ab16 into LilithGames:main Aug 19, 2026
23 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