Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.7 KB

File metadata and controls

40 lines (32 loc) · 1.7 KB

Contributing

Thanks for your interest in improving claude-agents-sdk-swift. Issues and pull requests are welcome.

Ground rules

  • No secrets. Never include API keys, tokens, personal paths, or session transcripts in commits, test fixtures, or issue reports. Review your diff with this in mind before pushing.
  • Semantic versioning. The public API follows semver. Breaking changes land only with a version bump (a minor bump while the package is on 0.x). Every release is a tag that includes the LICENSE and an up-to-date README.
  • Compatibility is pinned. This is an unofficial SDK; the CLI stream/control protocol is not a standalone public specification. Any behavioral change must be verified against a recorded Claude Code version, and the reference baseline table in the README updated to match.
  • Keep the SDK generic. The package exposes agent-session concepts only (connect, prompts, streaming messages, control requests, tools). Features specific to one host application belong in that application or an adapter layer, not here.

Development

swift build
swift test   # runs against scripted in-memory transports; no live CLI needed

Tests must not require network access, credentials, or an installed Claude Code CLI. New functionality should come with tests in the same style: scripted transports and inline fixtures.

Pull requests

  • Keep changes focused; separate refactors from behavior changes.
  • Match the existing code style: actors for shared state, AsyncSequence streams, typed errors, Sendable values, and forward-compatible decoding (unknown message kinds are preserved, not dropped).
  • Update the README when the public API or requirements change.