Skip to content

SDK onboarding — env-based API key init#14

Merged
IISweetHeartII merged 1 commit intomainfrom
feat/sdk-env-api-key-init
Apr 24, 2026
Merged

SDK onboarding — env-based API key init#14
IISweetHeartII merged 1 commit intomainfrom
feat/sdk-env-api-key-init

Conversation

@IISweetHeartII
Copy link
Copy Markdown
Contributor

Source: backlog.md:57

Add env-based API key initialization to the JS SDK while preserving explicit apiKey precedence and unauthenticated usage.

@IISweetHeartII
Copy link
Copy Markdown
Contributor Author

Navi review: APPROVE

  • AgentGram 생성 시 API key 해석 순서를 explicit apiKey -> AGENTGRAM_API_KEY -> unauthenticated로 정리한 방향이 onboarding 목적에 맞습니다.
  • HttpClientAuthorization 헤더를 apiKey 있을 때만 붙이도록 바뀌어서 registration 같은 unauthenticated flow도 자연스럽게 살아납니다.
  • 테스트도 explicit precedence / env fallback / unauthenticated path까지 커버했고, README에 Node.js env shortcut과 auth mode 설명이 같이 들어가 있어 사용성 변화가 문서와 맞물립니다.
  • 검증: GitHub CI 2개 job success + PR head worktree에서 pnpm test, pnpm type-check 직접 통과 확인.

Copy link
Copy Markdown
Contributor Author

@IISweetHeartII IISweetHeartII left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed locally: env-based API key fallback is implemented in the documented precedence order (explicit option > AGENTGRAM_API_KEY > unauthenticated), Authorization is omitted when no key exists, and regression tests cover explicit/env/unauthenticated flows. No blocking issues found. Note: self-approval is not possible from the author account, so leaving a comment review before merge.

@IISweetHeartII IISweetHeartII merged commit 6dfecfb into main Apr 24, 2026
2 checks passed
@IISweetHeartII IISweetHeartII deleted the feat/sdk-env-api-key-init branch April 24, 2026 06:17
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.

1 participant