跳到主内容
@wquguru
精选75Claude Agent SDK TypeScript(GitHub Releases)AI 编程与模型

Claude Agent SDK v0.3.238:新增任务事件字段与生命周期状态

v0.3.238

原文
发到 X

What's changed

变更内容

  • Added is_backgrounded and spawn_depth to task_started events for subagent tasks (is_backgrounded also on background Bash tasks)
  • Added suppressOriginalPrompt to UserPromptExpansion hook output, matching UserPromptSubmit
  • Added command_lifecycle state refused: a cross-session peer message the session's receive-side policy declines now reports this terminal state instead of producing no lifecycle frames
  • Fixed SDK hook callbacks silently not applying after a host re-sends initialize to an already-running CLI; the response now reports hooks_applied
  • Fixed CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=true not keeping prompt_suggestion messages on when the account is near, but not over, its usage limit
  • Changed vcs_state_changed push events to emit one event per pushed branch
  • 为子代理任务的 task_started 事件新增了 is_backgrounded 和 spawn_depth 字段(后台 Bash 任务也新增了 is_backgrounded 字段)
  • 在 UserPromptExpansion 钩子输出中新增了 suppressOriginalPrompt 字段,与 UserPromptSubmit 保持一致
  • 新增了 command_lifecycle 状态 refused:当会话接收端策略拒绝跨会话对等消息时,现在会报告此终止状态,而不是不产生生命周期帧
  • 修复了主机向已运行的 CLI 重新发送 initialize 后,SDK 钩子回调静默不生效的问题;现在响应会报告 hooks_applied
  • 修复了当账户接近但未超过使用限制时,CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=true 无法保持 prompt_suggestion 消息开启的问题
  • 将 vcs_state_changed 推送事件改为每个推送的分支发出一个事件

Update

更新

代码 · 7
npm install @anthropic-ai/[email protected]
# or
yarn add @anthropic-ai/[email protected]
# or
pnpm add @anthropic-ai/[email protected]
# or
bun add @anthropic-ai/[email protected]
代码 · 7
npm install @anthropic-ai/[email protected]
# or
yarn add @anthropic-ai/[email protected]
# or
pnpm add @anthropic-ai/[email protected]
# or
bun add @anthropic-ai/[email protected]

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

另一事件,读法相近