精选78Claude Agent SDK TypeScript(GitHub Releases)AI 编程与模型
Claude Agent SDK TypeScript v0.3.246:新增
v0.3.246
What's changed
变更内容
- Added optional user_message_uuid to error result messages and to the first assistant message or stream_event of each turn, linking a reply or failure to the user message that triggered it
- Added modelUsage[*].costBasis ('list' | 'managed' | 'unknown') reporting which price table each model's costUSD was computed from
- Added modelPricing support in the managedSettings option for hosts that set CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST; an admin-managed settings source that sets modelPricing still wins
- Added perTaskStopAffordance option: when set, interrupt() aborts only the current turn and keeps background agents and workflows running; otherwise (and for one-shot string prompts) they stop
- 在错误结果消息以及每轮的第一个助手消息或流事件中,添加了可选的 user_message_uuid,将回复或失败与触发它的用户消息关联起来
- 添加了 modelUsage[*].costBasis('list' | 'managed' | 'unknown'),报告每个模型的 costUSD 是根据哪个价格表计算的
- 在 managedSettings 选项中为设置 CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST 的主机添加了 modelPricing 支持;设置 modelPricing 的管理员管理的设置源仍然优先
- 添加了 perTaskStopAffordance 选项:设置后,interrupt() 仅中止当前轮次,并保持后台代理和工作流运行;否则(对于一次性字符串提示),它们会停止
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]更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力