-
Notifications
You must be signed in to change notification settings - Fork 7
chore: Rename project to claude-agent-sdk-go #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aligns with official Python SDK rename (Issue #54): - Update module path in go.mod - Update all import statements (ast-grep) - Update documentation and badges - Update CI/CD workflows and build configs All tests pass with 90.1% coverage.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Bug fixes: - Remove omitempty from hook Matcher fields to allow empty string matchers (wildcard matching) to serialize correctly - Auto-configure PermissionPromptToolName when CanUseTool callback is set Example improvements: - Refactor MCP examples (06, 07) to use mcp-server-time instead of non-existent AWS tools - Update permission callback example (11) to use Write/Bash operations that trigger callbacks (Read operations are auto-approved by CLI) - Add exampleDir() helper to examples 11, 12, 13 for correct demo file paths when run from any directory - Remove unused demo files from example 11 (now uses /tmp) Documentation: - Add note about Read/Glob being auto-approved and not triggering permission callbacks
The input parameter in runToolFilterExample's permission callback was unused since the callback only filters by tool name.
The error channel may emit shutdown errors before closing when the transport is disconnected. The test now drains any errors and verifies the channel eventually closes rather than expecting immediate closure.
…lName When CanUseTool callback is set but PermissionPromptToolName is not, validateOptions automatically configures it to "stdio" to enable the control protocol to route permission prompts back to the SDK.
- Fix *string type mismatch in examples 01-10: properly check nil and dereference msg.Result before using with format verbs - Remove emojis from examples 04, 05, 08, 09, 10 per code standards - Fix race condition in example 13: drain message channel completely before exiting to ensure UserMessage UUID is captured - Update example 11 to use PermissionModeAcceptEdits for proper callback invocation (callbacks run after permission mode check) - Update README.md documentation to match actual example names
Example 11 (permission_callback): - Changed PermissionModeAcceptEdits to PermissionModeDefault to ensure callbacks are invoked (AcceptEdits auto-approves without callbacks) - Added documentation about known CLI bug with ALLOW responses - Updated comments to clarify permission mode requirements Example 13 (file_checkpointing): - Changed query to trigger actual file operations (read demo/notes.txt) since simple queries don't generate UserMessage with UUID - Improved message loop with drain timeout pattern to prevent blocking - Fixed goto labels to ensure Step 3 output is displayed - Increased context timeout from 60s to 90s
…tures - Fix nil pointer dereference bugs in Query and Client API examples (msg.Result is *string, not string) - Add all 14 examples in clean table format with correct paths - Add Advanced Features section linking to examples 11-14 - Remove emojis from section headers per CLAUDE.md guidelines - Add "Advanced capabilities" to Key Features list
Update all references from "Claude Code SDK" to "Claude Agent SDK" to align with the module rename to claude-agent-sdk-go. Files updated: - README.md, CLAUDE.md, doc.go - .goreleaser.yml release header - All 14 examples (print statements and comments) - examples/README.md, examples/CLAUDE.md - internal/CLAUDE.md, internal/shared/errors.go, internal/shared/options.go Note: References to "Claude Code CLI" remain unchanged as that refers to the Anthropic CLI tool this SDK integrates with.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Rename from
claude-code-sdk-gotoclaude-agent-sdk-goto align with official Python SDK rename.Closes #54
Changes
go.modtogithub.com/severity1/claude-agent-sdk-goVerification
go fmt ./...- cleango vet ./...- cleango build ./...- successgo test -race ./...- all passgo test -cover ./...- 90.1% coveragegolangci-lint run- 0 issuesPost-Merge Steps
After merging this PR:
gh repo rename claude-agent-sdk-goNotes
Options,Client) remain unchanged per Go conventionsCLAUDE_CODE_ENTRYPOINTenv var unchanged (CLI-controlled)