Skip to content

Commit db6d9e8

Browse files
committed
remove binary from sdk
1 parent 257cb37 commit db6d9e8

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

sdk/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ All notable changes to the @codebuff/sdk package will be documented in this file
1515
### Fixed
1616

1717
- `maxAgentSteps` resets every run
18+
- `CodebuffClient` no longer requires binary to be installed
1819

1920
## [0.1.8] - 2025-08-13
2021

sdk/src/client.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import { execFileSync } from 'child_process'
2-
3-
import { CODEBUFF_BINARY } from './constants'
41
import { initialSessionState, type RunState } from './run-state'
52
import { changeFile } from './tools/change-file'
63
import { getFiles } from './tools/read-files'
@@ -57,17 +54,6 @@ export class CodebuffClient {
5754
> = {}
5855

5956
constructor({ apiKey, cwd, onError, overrideTools }: CodebuffClientOptions) {
60-
// TODO: download binary automatically
61-
const isWindows = process.platform === 'win32'
62-
if (
63-
execFileSync(isWindows ? 'where' : 'which', [CODEBUFF_BINARY])
64-
.toString()
65-
.trim() === ''
66-
) {
67-
throw new Error(
68-
`Could not find ${CODEBUFF_BINARY} in PATH. Please run "npm i -g codebuff" to install codebuff.`,
69-
)
70-
}
7157
const foundApiKey = apiKey ?? process.env[API_KEY_ENV_VAR]
7258
if (!foundApiKey) {
7359
throw new Error(

0 commit comments

Comments
 (0)