mirror of
https://github.com/cline/cline.git
synced 2026-09-19 02:05:44 +08:00
We want users to install `@clinebot/sdk` instead of `@clinebot/core` because "sdk" rolls off the tongue better as the public-facing package name. `@clinebot/core` already re-exports the key types from `@clinebot/agents`, `@clinebot/llms`, and `@clinebot/shared`, so `@clinebot/sdk` is a thin wrapper that just does `export * from "@clinebot/core"`. ## What changed New `packages/sdk/` directory containing: - `package.json` -- named `@clinebot/sdk`, version `0.0.36` (matching current published packages), single dependency on `@clinebot/core` via `workspace:*`. Same publish-related fields (`main`, `types`, `exports`, `files`, `publishConfig`) as core, adapted for the simpler single-entrypoint structure. - `src/index.ts` -- literally just `export * from "@clinebot/core"`. - `bun.mts` -- minimal Bun.build config that externalizes `@clinebot/core` so the output JS is just a re-export, not a bundle of core's internals. - `tsconfig.json` / `tsconfig.build.json` -- follows the same pattern as other packages (extends `tsconfig.base.json`, emits declarations only via tsc). The release script (`scripts/release.ts`) was updated to add `"sdk"` to `SDK_PUBLISH_ORDER` after `"core"`, so it gets published in the correct dependency order during `bun release sdk`. The help text was also updated to reflect the new package in the list. No changes were needed for: - Workspace registration: root `package.json` uses `"packages/*"` glob, so `packages/sdk` is auto-discovered. - Version bumping: `scripts/version.ts` iterates all package directories and bumps non-internal packages automatically. - Publish verification: `scripts/check-publish.ts` auto-discovers non-internal packages. Verified it picks up `@clinebot/sdk` and the package passes all checks (packing, manifest version alignment, npm install in isolation, module resolution). ## Verification - `bun run build:sdk` succeeds, `@clinebot/sdk` builds cleanly alongside all other packages - `bun -F @clinebot/sdk typecheck` passes - `bun scripts/check-publish.ts` passes with all 5 published packages (shared, llms, agents, core, sdk) verified - Built output is minimal: `dist/index.js` is `export*from"@clinebot/core";` and `dist/index.d.ts` is the corresponding re-export declaration ## Test plan - [x] `bun run build:sdk` builds all packages including sdk - [x] `bun -F @clinebot/sdk typecheck` passes - [x] `bun scripts/check-publish.ts` verifies all 5 packages pack, install, and resolve correctly - [ ] After merge, `bun release sdk` should publish `@clinebot/sdk` to npm alongside the other packages