feat(platform-sdk): comprehensive Go SDK with multi-project support#802
feat(platform-sdk): comprehensive Go SDK with multi-project support#802Gkrumbach07 merged 1 commit intomainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
626d5d6 to
bd46530
Compare
This comment has been minimized.
This comment has been minimized.
Add doForProject and doWithQueryForProject methods to support cross-project operations. Remove AMBIENT_PROJECT requirement from NewClientFromEnv and add ForProject variants to Session and ProjectSettings APIs. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
bd46530 to
5361040
Compare
Claude Code ReviewSummaryPR 802 makes the Go SDK project field optional at client initialization and introduces Issues by SeverityBlocker IssuesNone. Critical Issues1.
// session_api.go
func (a *SessionAPI) Create(ctx context.Context, resource *types.Session) (*types.Session, error) {
return a.CreateForProject(ctx, resource, "") // always ""
}In
func (a *SessionAPI) Create(ctx context.Context, resource *types.Session) (*types.Session, error) {
return a.CreateForProject(ctx, resource, a.client.project)
}
func (a *SessionAPI) List(ctx context.Context, opts *types.ListOptions) (*types.SessionList, error) {
return a.ListForProject(ctx, opts, a.client.project)
}Apply the same pattern to Major Issues2. No tests for the new
3. Silent failure mode: removing early validation shifts errors downstream
// project is optional. If empty, callers must use *ForProject variants.
// Without a project, the server will reject requests lacking X-Ambient-Project.Minor Issues4. Double blank line artifact in
5. Missing GoDoc comments on new exported methods
Positive Highlights
Recommendations
🤖 Generated with Claude Code 🔍 View AI decision process (logs available for 90 days) 📋 View memory system files loaded (click to expand)What Amber Loaded for Code ReviewAmber automatically loaded these repository standards from the memory system:
Impact: This review used your repository's specific code quality standards, security patterns, and best practices from the memory system (PRs #359, #360) - not just generic code review guidelines. |
|
from local Amber: Summary Review of the platform-sdk component shows a well-implemented, modern Go/Python/TypeScript SDK with proper security practices and appropriate language idioms. The code is generated from OpenAPI specifications and follows current best practices for Issues by Severity Blocker Issues None Critical Issues None Major Issues None Minor Issues None Positive Highlights
Recommendations No code changes needed - This is well-implemented generated code that follows current best practices. Focus on testing and validation of the SDK functionality rather than code modifications. Note: My previous review incorrectly applied TypeScript standards to Go code and contained outdated information. The current implementation is correct and follows modern Go practices. |
- Add --watch (-w) and --watch-timeout flags to get sessions command - Implement polling-based watch with real-time session change detection - Show CREATED, UPDATED, DELETED events with session details - Include validation for watch-only on sessions resource type - Add proper signal handling for graceful shutdown Dependencies: - Uses upstream SDK from merged PR #802 via local replace directive - Implements polling-based watch (compatible with current SDK)
Summary
This PR introduces the new platform-sdk component with comprehensive SDK support for the Ambient Code Platform API, including flexible project handling to fix CI build issues.
Key Changes
SDK Architecture
Flexible Project Handling (CI Fix)
/api/ambient/v1endpoint to match upstream changesMulti-Language Support
Examples & Documentation
CI Build Fix
This resolves the CLI Build and Unit Tests failure by removing the strict project requirement that was causing dependency issues when CLI tried to import the SDK.
Test Plan
🤖 Generated with Claude Code