@anthropic-ai/claude-agent-sdk 0.3.281 → 0.3.282
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/bridge.mjs +61 -63
- package/browser-sdk.js +41 -41
- package/core-276encc2.mjs +38 -0
- package/core-5drmq1nt.mjs +31 -0
- package/core.d.ts +20 -0
- package/core.mjs +41 -0
- package/manifest.json +23 -23
- package/manifest.zst.json +27 -27
- package/package.json +19 -11
- package/sdk.d.ts +248 -13
- package/sdk.mjs +82 -82
package/README.md
CHANGED
|
@@ -16,6 +16,10 @@ Install the Claude Agent SDK:
|
|
|
16
16
|
npm install @anthropic-ai/claude-agent-sdk
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
## The `/core` entry (for apps that bundle the SDK)
|
|
20
|
+
|
|
21
|
+
`@anthropic-ai/claude-agent-sdk/core` exports the same `query()`, `startup()`, `tool()`, `createSdkMcpServer()`, `renameSession()`/`tagSession()`/`deleteSession()`, `resolveSettings()`/`filterEscalatingDefaultMode()` and runtime constants as the root entry, and nothing else — no session listing/reading/import helpers — so its eagerly loaded code is about a fifth of the root's; the settings resolver behind `resolveSettings()` loads on first call. Unlike the root entry it does **not** inline the SDK's peer dependencies: `zod` (^4, as declared in this package's `peerDependencies`) and `@modelcontextprotocol/sdk` (^1.29) are imported from your install — specifically the `zod/v4` subpath, plus `zod/v3` when the settings resolver loads — which is what you want when your bundler already carries them. (zod 3.25+, which carries the v4 engine under `zod/v4`, also works in practice, but ^4 is the supported range.) Import from **either** the root **or** `/core` in a given process, not both — they are separate bundles, and mixing them loads two copies of the SDK's classes and state. Its types require TypeScript 5.0+.
|
|
22
|
+
|
|
19
23
|
## Compiled binaries (`bun build --compile`)
|
|
20
24
|
|
|
21
25
|
When bundling your application into a single executable with `bun build --compile`, the SDK cannot resolve the native CLI binary at runtime — `require.resolve` doesn't work from inside the compiled `$bunfs` (or `B:\~BUN\...` on Windows) virtual filesystem.
|