Skip to content

chore: bump ai sdk family to ai 7.0.158 - #432

Merged
ThomasK33 merged 4 commits into
mainfrom
deps-batch-oct31
Oct 31, 2026
Merged

ThomasK33 merged 4 commits into
mainfrom
deps-batch-oct31

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Daily dependency batch (follow-up F60). Each bump is the newest version with at least 24 hours of publish age at bump time, 2026-10-31T15:52Z (from date -u, re-verified with npm view <pkg> time --json).

Versions landed

Package From To Published (UTC) Where
ai ^7.0.157 ^7.0.158 2026-10-30T15:38:30Z devDeps agent, effect, provider; deps private release-please-ai (^7.0.0 peers unchanged)
@ai-sdk/provider 4.0.34 4.0.35 (exact) 2026-10-30T15:40:29Z deps provider, agent, effect (ai 7.0.158 requires 4.0.35)
@ai-sdk/anthropic ^4.0.92 ^4.0.93 2026-10-30T15:39:27Z deps provider, private release-please-ai
@ai-sdk/openai-compatible ^3.0.81 ^3.0.82 2026-10-30T15:38:43Z deps provider
@ai-sdk/provider-utils ^5.0.71 ^5.0.72 2026-10-30T15:42:08Z devDeps effect, sandbox (sandbox peer ^5.0.0 unchanged)
@ai-sdk/harness ^1.0.168 ^1.0.169 2026-10-30T15:41:30Z devDeps effect, sandbox (sandbox peer ^1.0.0 unchanged)
@ai-sdk/harness-claude-code ^1.0.172 ^1.0.173 2026-10-30T15:40:30Z devDeps sandbox
@ai-sdk/react 4.0.161 4.0.162 (exact) 2026-10-30T15:39:33Z devDeps agent
@ai-sdk/tui ^1.0.158 ^1.0.159 2026-10-30T15:39:42Z devDeps sandbox
@ai-sdk/gateway 4.0.130 4.0.131 2026-10-30T15:38:28Z transitive, exact dep of ai 7.0.158
@ai-sdk/mcp 2.0.87 2.0.88 2026-10-30T15:40:14Z transitive, exact dep of react 4.0.162

Every bumped package depends only on versions in this table (checked with npm view <pkg>@<v> dependencies). The lockfile diff swaps exactly these 11 entries and adds nothing else. It holds one @ai-sdk/provider (4.0.35), one zod (4.6.7) and one effect (4.1.0).

Unchanged: effect 4.1.0, vitest 5.0.5, zod 4.6.7, tsup ^9.0.0, oxlint/@oxlint/plugins ^1.90.0, oxfmt ^0.75.0, @types/node ^26.6.6, ws ^8.22.0 (lockfile 8.22.0), the TypeScript alias pair, all peer ranges, packageManager pnpm 11.28.9, Node 26.12.1, mise tools, Actions.

Deferred (under 24 hours old at bump time)

Package Version Published (UTC)
ai 7.0.159 2026-10-30T22:18Z
@ai-sdk/anthropic 4.0.94 2026-10-30T22:18Z
@ai-sdk/harness 1.0.170 2026-10-30T22:17Z
@ai-sdk/harness-claude-code 1.0.174 2026-10-30T22:19Z
@ai-sdk/react 4.0.163 2026-10-30T22:21Z
@ai-sdk/tui 1.0.160 2026-10-30T22:21Z
@ai-sdk/gateway 4.0.132 2026-10-30T22:18Z
effect 4.1.1 2026-10-30T21:53Z
ws 8.22.1 2026-10-31T09:58Z

The lockfile resolves none of them. pnpm 11.28.10 is a separate PR.

API drift and code changes

I ran npm pack on the old and new version of every package that packages/*/src imports (ai, @ai-sdk/provider, @ai-sdk/provider-utils, @ai-sdk/anthropic, @ai-sdk/openai-compatible, @ai-sdk/harness), plus harness-claude-code, tui and react, and diffed every .d.ts file.

  1. @ai-sdk/provider-utils 5.0.72 adds three required methods to Experimental_SandboxSession: stat, listDirectory and deleteFile (new types SandboxFileStat, SandboxDirectoryEntry and their option types). Without a change, @coder/ai-sdk-sandbox fails tsc: CoderWorkspaceSession no longer implements HarnessV1NetworkSandboxSession, and restricted() misses the methods. Fix (packages/sandbox/src/file-io.ts, coder-workspace-session.ts): the session and its restricted() view implement the three methods over the transport's exec, the same way as the existing file I/O:
    • stat runs stat -L (GNU/busybox -c '%F|%s', BSD -f '%HT|%z') in the C locale. It follows symlinks and needs no read permission. Directory sizes are what stat reports (the contract leaves them implementation-defined).
    • listDirectory lists one level with find . -mindepth 1 -maxdepth 1 -print0 under pipefail, keeps dotfiles, and reports symlinks as symlink without following them. Login-profile glob options do not apply, and a directory it cannot read rejects. It rejects when the path is not a directory. Names cross the transport as NUL-separated base64, so newlines and spaces in names survive.
    • deleteFile runs rm (stdin /dev/null, no -f), removes a symlink itself (not its target), and rejects for a directory.
    • All three report a missing path (null, null, false) only when the tool's diagnostic ends with the ENOENT text, or when BSD stat -L falls back to the link itself (its documented behavior for a link it cannot resolve). A symlink loop, a permission error or any other failure rejects with the tool's message. Each command starts with set +e, so a profile that enables errexit cannot change the result.
  2. The same release defines relative paths: every method, including the workingDirectory option of run and spawn, resolves relative paths against one base directory. File I/O already did that. run/spawn passed a relative workingDirectory to cd as is, so it resolved against the SSH start directory. The session now resolves it with resolveRemotePath. A new unit test in session.test.ts fails without this change.
  3. New tests in integration-local.test.ts run the three new methods through the fake coder/ssh (real bash) against a temp tree with a dotfile, a name with a newline and a *, a symlink to a directory, a dangling symlink, a symlink loop, a mode-000 file, a mode-0311 directory, a child of a mode-0600 directory, a path that contains the words "No such file or directory", a stand-in BSD stat, and BASH_ENV profiles that set dotglob failglob or set -e. The permission cases skip when the tests run as root.
  4. @ai-sdk/provider 4.0.35 adds only standalone model-catalog types (ModelCapabilities, ModelCapability, ModelEntry, ModelProviderOptions, ProviderOptionDefinition(s)). No new union member (finish reasons, stream parts, content, warnings, tool-result outputs) and no new or changed field on LanguageModelV4 call options or results. The agent translators and the effect bridge (language-model.ts, errors.ts) need no change.
  5. ai 7.0.158 only re-exports the two new sandbox types. @ai-sdk/openai-compatible 3.0.82 widens apiKey/headers to Resolvable<...> (a value, a function, or a promise). We pass plain values, so behavior is unchanged. @ai-sdk/anthropic 4.0.93 changes only /internal (getModelCapabilities moved to a model catalog), which we do not import. harness, harness-claude-code and tui have no .d.ts change. react 4.0.162 exports MCPAppRenderer as stable (we do not use it).

packages/sandbox/src/EGM.md lists the new methods and their behavior.

Review

Round 1 (head 3eef80f): the normal review raised two P2 findings, both fixed in 0030d09 with tests that fail on 3eef80f: login-profile glob options could duplicate or hide listDirectory entries, and stat needed read permission (wc -c). The security review on 3eef80f found no issues.

Round 2 (head 0030d09): two more P2 findings, both fixed in 8a9d592 with tests that fail on 0030d09: listDirectory listed an unreadable directory as empty, and stat returned null for a symlink loop or a permission error. I changed the design instead of patching each case: the three methods now treat only ENOENT as missing, and listDirectory enumerates with find instead of a glob. The security review on 0030d09 found no issues.

Round 3 (head 8a9d592): three more P2 findings in the same area, all fixed in ce806f3 with tests that fail on 8a9d592: the ENOENT match also searched the echoed path, an errexit-enabling profile ended the shell before the probe was classified, and BSD stat -L reports a dangling link instead of failing. The security review on 8a9d592 found no issues. Round 4 (head ce806f3): the normal review found no major issues and the security review found no security issues. Total: 4 review rounds.

Advisor pass (clean-context sub-agent, given the goal, diff, findings and test results): "ready with tracked follow-ups". It found no blocker and confirmed the 24-hour ages, the upstream contract match, path quoting and that deleteFile cannot remove a directory tree. Its notes: the BSD stat -f branch runs here only against a stand-in stat (no macOS CI cell), and the sandbox peer stays ^5.0.0 on purpose (the class only adds members, so older provider-utils types still accept it).

Published runtime range changes

Package Change
@coder/ai-sdk-provider @ai-sdk/anthropic ^4.0.93, @ai-sdk/openai-compatible ^3.0.82, @ai-sdk/provider 4.0.35
@coder/ai-sdk-agent @ai-sdk/provider 4.0.35
@coder/ai-sdk-effect @ai-sdk/provider 4.0.35
@coder/ai-sdk-sandbox none (code change only: the three new session methods)

No peerDependencies change. The held effect release PR #325 (effect 0.1.0) will pick up the @ai-sdk/provider 4.0.35 pin. The provider and agent releases from this change reach npm before #325 merges, because #325 is held for owner npm steps.

Validation

Toolchain: mise Node 26.12.1 (node --version inside pnpm exec prints v26.12.1), pnpm 11.28.9.

  • Guarded install: temporary minimumReleaseAge: 1440 with the minimumReleaseAgeExclude block removed (no @coder/* npm pins exist), pnpm install, pnpm dedupe (already up to date), then pnpm-workspace.yaml restored byte for byte. Every added lockfile version is at least 24.2 hours old at bump time.
  • Empty-cache frozen install (scratch store and cache): passed ("Lockfile passes supply-chain policies", 455 entries). rm -rf node_modules && CI=true pnpm install --frozen-lockfile with the default store: passed.
  • pnpm -r build, pnpm check (oxfmt, oxlint, typecheck), pnpm -r test (provider 22, release-please-ai 15, agent 393, sandbox 205, effect 101 unit tests), pnpm publint, pnpm attw: all pass.
  • .agents/skills/verify-agent-stream-exactly-once/check.sh: all scenarios pass, 0 violating runs.
  • Live against dogfood on 3eef80f (coder whoami ok, server v2.38.5-devel; the later commits change only sandbox file I/O, which these suites do not use): agent pnpm exec vitest run test/e2e 7/7, effect pnpm exec vitest run test/e2e 3/3. No unarchived chats left behind.

Verification tier for the sandbox contract claims: verified against the published @ai-sdk/provider-utils 5.0.72 .d.ts, and exercised locally through the fake coder transport (real bash). Not exercised against a live Coder workspace or a macOS (BSD userland) workspace.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Dependency batch. Each bump is the newest version with at least 24
hours of publish age at bump time (2026-10-31T15:52Z):

- ai ^7.0.157 -> ^7.0.158 (devDeps: agent, effect, provider; deps:
  private release-please-ai)
- @ai-sdk/provider 4.0.34 -> 4.0.35 (deps: agent, effect, provider;
  exact pin, required by ai 7.0.158)
- @ai-sdk/anthropic ^4.0.92 -> ^4.0.93 (deps: provider, private
  release-please-ai)
- @ai-sdk/openai-compatible ^3.0.81 -> ^3.0.82 (deps: provider)
- @ai-sdk/provider-utils ^5.0.71 -> ^5.0.72 (devDeps: effect, sandbox)
- @ai-sdk/harness ^1.0.168 -> ^1.0.169 (devDeps: effect, sandbox)
- @ai-sdk/harness-claude-code ^1.0.172 -> ^1.0.173 (devDeps: sandbox)
- @ai-sdk/react 4.0.161 -> 4.0.162 (devDeps: agent, exact pin)
- @ai-sdk/tui ^1.0.158 -> ^1.0.159 (devDeps: sandbox)
- @ai-sdk/gateway 4.0.130 -> 4.0.131 (transitive, exact dep of ai)
- @ai-sdk/mcp 2.0.87 -> 2.0.88 (transitive, exact dep of react)

API drift: provider-utils 5.0.72 adds three required methods to
Experimental_SandboxSession (stat, listDirectory, deleteFile), so the
sandbox package failed tsc. CoderWorkspaceSession and its restricted()
view now implement them over the transport's exec, like the existing
file I/O: stat follows symlinks and returns null for a missing path,
listDirectory lists one level (symlinks reported, names moved as
NUL-separated base64) and returns null for a missing path,
deleteFile removes a symlink itself and returns false for a missing
path. Both list and delete reject on the wrong path type. The same
release defines that a relative run/spawn workingDirectory resolves
against the base directory used for relative file paths, so the session
now resolves it with resolveRemotePath. @ai-sdk/provider 4.0.35 adds
only standalone model-catalog types (ModelCapabilities and friends):
no new union member and no LanguageModelV4 change.

Published runtime range changes: @coder/ai-sdk-provider
(@ai-sdk/anthropic ^4.0.93, @ai-sdk/openai-compatible ^3.0.82,
@ai-sdk/provider 4.0.35), @coder/ai-sdk-agent (@ai-sdk/provider
4.0.35), @coder/ai-sdk-effect (@ai-sdk/provider 4.0.35). Sandbox has
no runtime range change. No peerDependencies change. zod stays 4.6.7
and effect 4.1.0, one copy each. Deferred (under 24 hours old): the
2026-10-30T22:17Z wave (ai 7.0.159 and family), effect 4.1.1 and
ws 8.22.1.

_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_

Change-Id: I7f02205177818f3e91df97c3b486e511da7f56e3
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T16:23:31.919445Z ce806f3 Manual request
🔒 Security Review ✅ Completed 2026-10-31T16:23:32.751239Z ce806f3 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 3eef80f70e

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3eef80f70e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/sandbox/src/file-io.ts Resolved
Comment thread packages/sandbox/src/file-io.ts Resolved
Review round 1 (two P2 findings):

- listDirectory pins the bash glob options (unset GLOBIGNORE, dotglob
  and nullglob on, failglob and nocaseglob off) and globs `*` once, so a
  login profile that sets dotglob no longer duplicates dotfiles and
  failglob no longer empties a listing.
- stat reads a regular file's size from metadata (`stat -L -c %s`, BSD
  fallback `stat -L -f %z`) instead of `wc -c`, so a file the workspace
  user cannot read still stats.

Both new integration tests fail without the change.

_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_

Change-Id: Ied7215309f70320494271eee0aed23bb085fd571
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0030d09c14

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0030d09c14

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/sandbox/src/file-io.ts Resolved
Comment thread packages/sandbox/src/file-io.ts Resolved
…teFile

Review round 2 (two P2 findings):

- stat runs `stat -L` (GNU/busybox `-c '%F|%s'`, BSD `-f '%HT|%z'`)
  in the C locale. stat, listDirectory and deleteFile now treat a path as
  missing only when the tool reports ENOENT; a symlink loop or a
  permission error throws instead of returning null/false.
- listDirectory enumerates with `find . -mindepth 1 -maxdepth 1
  -print0` under pipefail instead of a glob, so a directory it can
  search but not read throws instead of listing as empty. This also
  replaces the round 1 glob-option pinning.
- deleteFile runs `rm` (stdin /dev/null, no -f) and classifies its error.

The new integration tests fail on the previous commit.

_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_

Change-Id: I31bd553c456a6c8f7cbfb7879a06a1b32a542656
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 8a9d59202c

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8a9d59202c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/sandbox/src/file-io.ts Resolved
Comment thread packages/sandbox/src/file-io.ts Resolved
Comment thread packages/sandbox/src/file-io.ts Resolved
Review round 3 (three P2 findings):

- The ENOENT match is anchored to the end of the diagnostic, where
  stat/rm print the errno text, so a path that contains "No such file or
  directory" no longer turns EACCES into missing.
- Each stat/listDirectory/deleteFile command starts with `set +e`, so a
  login profile or BASH_ENV that enables errexit cannot end the shell at
  the expected-to-fail probe.
- BSD `stat -L` falls back to lstat for a link it cannot resolve; its
  "Symbolic Link" result now also means missing.

The new integration tests fail on the previous commit.

_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_

Change-Id: I8ec097cc42f221ecedc2fa7623b2efeb39c8584b
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: ce806f36fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: ce806f36fe

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33
ThomasK33 added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 3f12117 Oct 31, 2026
8 checks passed
@ThomasK33
ThomasK33 deleted the deps-batch-oct31 branch October 31, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant