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

Claude Agent SDK TS v0.3.234:移除 ExitReason 未用字段

v0.3.234

原文
推荐理由

使用 Claude Agent SDK TypeScript 的开发者注意:v0.3.234 移除了 ExitReason 中的 bypass_permissions_disabled 字段,升级后显式处理该分支的代码会编译报错,请升级前检查并移除相关分支。

What's changed

变更内容

  • Removed unused bypass_permissions_disabled from ExitReason type; the value was never emitted — TypeScript consumers with an explicit case branch get a compile error on upgrade (runtime unaffected)
  • Updated the ApiKeySource type to include the values system/init actually reports (ANTHROPIC_API_KEY, apiKeyHelper, /login managed key, none)
  • vcs_state_changed events report the directory the shell finished in (an inner cd is reflected)
  • A peer origin injected by the host may declare the sending session's permission class (fromMode) so a same-class message is delivered to a recipient that runs without asking
  • SDKSystemMessage (system/init) gains an optional effort field: the session's applied effort level, or null when none is sent. Set on Remote Control bridge init frames
  • 从 ExitReason 类型中移除了未使用的 bypass_permissions_disabled;该值从未被发出——具有显式 case 分支的 TypeScript 使用者在升级时会遇到编译错误(运行时不受影响)
  • 更新了 ApiKeySource 类型,以包含 system/init 实际报告的值(ANTHROPIC_API_KEY、apiKeyHelper、/login 管理的密钥、none)
  • vcs_state_changed 事件报告 shell 结束时的目录(内部 cd 会被反映出来)
  • 由宿主注入的对等来源可以声明发送会话的权限类别(fromMode),因此同类消息会被传递给无需询问即可运行的接收者
  • SDKSystemMessage(system/init)新增了一个可选的 effort 字段:会话应用的 effort 级别,未发送时为 null。在远程控制桥接初始化帧上设置

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]

更进一步:量化金融体系

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

进入量化体系 →

相似阅读

另一事件,读法相近