- engineering-docs → archive/2026-03-29-engineering-docs (63/63 tasks complete) - phase-2-production-ready → archive/2026-03-29-phase-2-production-ready (89/89 tasks complete) - openspec/specs/ synced with all Phase 1 + Phase 2 + engineering-docs capabilities (22 specs total) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2.4 KiB
2.4 KiB
ADDED Requirements
Requirement: SDK integration guide
The system SHALL include a document (docs/engineering/11-sdk-guide.md) that explains how each of the four language SDKs is structured, how to use them, and how to contribute to or extend them.
Scenario: SDK architecture overview present
- WHEN a new engineer reads 11-sdk-guide.md
- THEN they SHALL understand that all four SDKs (Node.js, Python, Go, Java) implement the same API surface (14 endpoints, 4 service clients, 1 TokenManager, 1 error type) with identical semantics, and why consistency across SDKs is a non-negotiable standard
Scenario: Node.js SDK documented
- WHEN a new engineer reads the Node.js SDK section
- THEN they SHALL find: installation (
npm install @sentryagent/idp-sdk), the AgentIdPClient constructor, all 4 service clients (agents, credentials, tokens, audit), TokenManager auto-refresh behaviour, AgentIdPError structure, and a complete working code example for the most common flow (register agent → generate credential → issue token)
Scenario: Python SDK documented
- WHEN a new engineer reads the Python SDK section
- THEN they SHALL find: installation (
pip install sentryagent-idp), both sync (AgentIdPClient) and async (AsyncAgentIdPClient) variants, TokenManager and AsyncTokenManager auto-refresh, AgentIdPError, and a complete working example for sync and async usage
Scenario: Go SDK documented
- WHEN a new engineer reads the Go SDK section
- THEN they SHALL find: installation (
go get github.com/sentryagent/idp-sdk-go), AgentIdPClient construction, goroutine-safe TokenManager, context.Context usage pattern, AgentIdPError with Code/HTTPStatus/Details, and a complete working example
Scenario: Java SDK documented
- WHEN a new engineer reads the Java SDK section
- THEN they SHALL find: Maven/Gradle dependency snippet, AgentIdPClient construction with builder pattern, sync methods and CompletableFuture async counterparts, thread-safe TokenManager, AgentIdPException, and a complete working example
Scenario: SDK contribution guide included
- WHEN a new engineer needs to add a new endpoint to all SDKs
- THEN the guide SHALL provide a step-by-step checklist for adding a new method to all four SDKs consistently: where to add the method, what the signature pattern is, how to write the corresponding test, and how to verify it compiles/passes in each language