Skip to content

v1.2.1

Choose a tag to compare

@ya-luotao ya-luotao released this 06 Oct 02:54
· 34 commits to main since this release

An internal release: three refactors that move duplicated or scattered logic into one private module each. No public API, signature (sig/) or documented behavior changes; one cleanup difference is noted below.

Changed

  • ClaudeAgentSDK.query and Client share one implementation of session setup, prompt writes, message delivery and teardown (SessionAssembly, @api private); a session's observers, callback_scheduling and callback_wrapper travel in one object (Dispatch, @api private) instead of being passed at every call site. The documented differences between the two entry points are preserved and now pinned by specs that run both side by side. One cleanup difference: when a Client is reconnected while its previous disconnect is still removing the materialized directory of a store-backed resume, the finishing disconnect no longer clears the new session, so the new session's resume directory is removed by its own disconnect (it used to be left behind). (#169)
  • The decision of when query() may close stdin lives in one private class, Query::RunLifecycle; Query feeds it events and supplies the timer. Its specs go through that interface instead of Query's instance variables. (#168)
  • Hash-form option interpretation (system_prompt, thinking, tools, output_format, task_budget, plugins, sandbox, mcp_servers, agents) lives in one private module, OptionForms; every existing per-option spelling and key policy is preserved as it was. (#167)

What's changed

  • #167 Move Hash-form option interpretation into one private module (OptionForms) — @ya-luotao
  • #168 Extract the run-end decision into Query::RunLifecycle — @ya-luotao
  • #169 Share one session assembly between query() and Client — @ya-luotao

Full Changelog: v1.2.0...v1.2.1


gem install claude-agent-sdk -v 1.2.1