Conversation
Upgrade ScalaJS mirror from SDK 0.2.22 to 0.2.31 with new features: - AgentOptions: Add debug, debugFile, strictMcpConfig fields - SandboxSettings: Enhanced with network config, ripgrep, weaker nested sandbox, excluded commands - AgentDefinition: Add skills field for preloading skills into agent context - HookEvent: Add Setup event for init/maintenance triggers - SystemEvent: Add FilesPersisted event for file persistence tracking - QueryStream: Add initializationResult() method for SDK control response - McpServerConfig: Add ClaudeAIProxy type for claude.ai proxy servers Resolves TJC-726 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Pull Request Review: SDK Upgrade to 0.2.31I've reviewed this pull request upgrading from SDK 0.2.22 to 0.2.31. Overall, this is a well-executed upgrade with comprehensive type mappings. Here's my detailed feedback: ✅ Strengths
🔍 Code Quality ObservationsAgentOptions.scala:621-646Good: The def withDebug(enabled: Boolean = true, file: Option[String] = None)This allows both simple SandboxSettings.scala (Complete Rewrite)Concern: The complete rewrite of Impact: This will break existing code using the old sandbox API. Consider:
Documentation Note: The comment at SandboxSettings.scala:6-11 is helpful in clarifying that permissions are separate from sandbox settings, but users migrating from the old API may be confused. AgentDefinition.scala:247-256Suggestion: The def withSkills(skillNames: String*): AgentDefinition =
agent.copy(skills = skillNames.toList)This matches the pattern used in other "with" methods and allows HookEvent.scalaGood: The new 🐛 Potential Issues
🔒 Security Considerations
⚡ Performance Considerations
📝 Documentation Suggestions
📊 Test Coverage GapThe PR description mentions:
Recommendation: Before merging, add:
🎯 Recommendations SummaryBefore Merging:
Nice to Have: ✨ Overall AssessmentThis is a solid SDK upgrade with good type safety and API design. The main concerns are:
Once tests are added and versioning is addressed, this will be ready to merge. Rating: 7/10 (would be 9/10 with proper test coverage and version bump) Review generated with Claude Code |
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code Review: Claude Agent SDK 0.2.31 UpgradeI've completed a thorough review of this PR upgrading the SDK from 0.2.22 to 0.2.31. Overall, this is a well-structured upgrade that correctly mirrors the new SDK features. Here's my detailed feedback: ✅ Strengths1. Comprehensive Feature CoverageAll new SDK features are properly mirrored:
2. Excellent Code Quality
3. Strong Type Safety
4. Good Backward Compatibility
🔍 Areas for Improvement1. Missing Test Coverage
|
Summary
Changes
AgentOptions
debug: Boolean- Enable debug mode for verbose loggingdebugFile: Option[String]- Write debug logs to a filestrictMcpConfig: Boolean- Enforce strict MCP server validationSandboxSettings (Complete Rewrite)
autoAllowBashIfSandboxed- Auto-allow Bash when sandboxedallowUnsandboxedCommands- Allow unsandboxed commandsnetwork: Option[SandboxNetworkConfig]- Network proxy configurationignoreViolations- Violation ignore patternsenableWeakerNestedSandbox- Enable weaker nested sandboxexcludedCommands- Commands excluded from sandboxripgrep: Option[RipgrepConfig]- Custom ripgrep configurationAgentDefinition
skills: List[String]- Skill names to preload into agent contextHookEvent
Setup- New hook event for initialization/maintenance triggersSystemEvent
FilesPersisted- Track persisted/failed files withPersistedFileandFailedFiletypesQueryStream
initializationResult: Task[InitializationResult]- Get full SDK control responseMcpServerConfig
ClaudeAIProxy- New server type for claude.ai proxyTest plan
./mill agent.compileResolves TJC-726
🤖 Generated with Claude Code