feat(sdk): optional token, relative baseUrl, display_name, execution fields#1513
feat(sdk): optional token, relative baseUrl, display_name, execution fields#1513markturansky merged 12 commits intomainfrom
Conversation
Consolidates PRs #1508 and #1509: - Make token and project optional in TS SDK templates (browser support) - Accept relative baseUrl, reject protocol-relative URLs - Go SDK: add AgentID validation and alphabetize ScheduledSessionPatch fields - Full SDK regeneration needed (run make generate-sdk) Supersedes: #1508, #1509 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (93)
Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📝 WalkthroughWalkthroughThis PR refactors the Ambient SDK and CLI to make project context implicit in client configuration rather than explicit in method parameters. SDK client templates, generated API methods, type definitions, and CLI commands are updated to use project-scoped base paths and new ChangesProject-Scoped SDK Refactoring
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
|
✅ Deploy Preview for cheerful-kitten-f556a0 canceled.
|
…extensions Full SDK regeneration removed streamingClient, doMultiStatus, and changed API signatures that hand-written Go extension files and the CLI depend on. Revert Go and Python SDKs to main, keeping only TS SDK regeneration and source changes (templates, Go types, tests). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Syncs the Go SDK generator template with the streaming client, multi-status response handling, and Project() accessor that were added in 55e85ca but not back-ported to the template. This ensures `make generate-sdk` produces output compatible with hand-written extension files (session_messages.go, agent_extensions.go). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ent-code/platform into jsell/feat/sdk-consolidated
…ation The SDK regeneration overwrote hand-written methods in generated files. This adds extension files (not overwritten by the generator) for: - ScheduledSession: project-scoped CRUD, Suspend, Resume, Trigger, Runs, GetByName - Credential: GetToken - Agent: rename Start→StartInProject to avoid conflict with generated Start Updates all CLI callers to use the new InProject method names. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…patterns - Rename List/GetInProject → ListByProject/GetByProject to match agent_extensions.go convention - UpdateInProject takes map[string]any (not any) matching agent pattern - ScheduledSessionPatch includes all 11 fields from the PatchBuilder - TUI client passes map directly instead of round-tripping through struct Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covers ScheduledSession project-scoped CRUD, Suspend, Resume, Trigger, GetByName, Agent StartInProject, Credential GetToken, doMultiStatus variadic status check, and Project() accessor. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds tests for gaps found by coverage audit: - ScheduledSessionAPI.Runs (project-scoped, verifies path and response) - streamingClient initialization (DisableCompression=true) - WithInsecureSkipVerify applies to both httpClient and streamingClient - ScheduledSessionPatch JSON round-trip (all 11 fields, omitempty semantics) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
CodeRabbit chat interactions are restricted to organization members for this repository. Ask an organization member to interact with CodeRabbit, or set |
Summary
Consolidates #1508 and #1509 into a single PR with full SDK regeneration.
tokenandprojectoptional inAmbientClientConfig(browser support)baseUrl(e.g./api/proxy), reject protocol-relative URLs (//)projectis needed but absentScheduledSessionPatchfields, addAgentIDvalidation in builderdisplay_nameon Project and latest spec changesSupersedes #1508 and #1509.
Test plan
make build-generator && make generate-sdkcompletesmake verify-sdkpasses (no drift)Post-merge
After regeneration, watch for Go extension file conflicts (
agent_extensions.go,session_messages.go) that depend on client methods.🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Improvements