fix(sdk): sync version metadata and task status exports

DI
4mo ago
+6-2

Description

This PR fixes two SDK public-contract drifts:

  • src/version.ts now matches the package version (0.0.1-alpha.12) so generated SDK package metadata/user-agent headers do not report the stale 0.0.1-alpha.7 value.
  • the package root now exports TaskStatuses, TaskStatus, and TaskStatusListResponse, matching the already-exposed client.tasks.statuses resource.

While validating the SDK build, TypeScript 6 also required an explicit rootDir for declaration output. This PR adds the narrow SDK rootDir: "src" setting so the package build can emit declarations successfully.

Related Issues

No existing issue. This was discovered during repository analysis.

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Commands run:

  • bun -e 'import sdk, { Superset, TaskStatuses } from "./packages/sdk/dist/index.js"; import pkg from "./packages/sdk/dist/package.json" with { type: "json" }; console.log(typeof sdk, typeof Superset, TaskStatuses.name, pkg.version);' — passed (function function TaskStatuses 0.0.1-alpha.12)
  • bun --cwd packages/sdk typecheck — passed
  • bun --cwd packages/sdk build — passed
  • git diff --check — passed

Not run:

  • Biome check — the repo Biome config ignores the generated SDK source files, and biome check packages/sdk/src/index.ts packages/sdk/src/version.ts reports that no files are processed.

Screenshots (if applicable)

N/A.

Additional Notes

Risk level: low. The export additions expose already-existing SDK resource/types from the package root; runtime behavior is otherwise unchanged except for corrected version metadata.


Open in Stage

Summary by cubic

Syncs SDK version metadata and exposes task status resource/types from the package root to match the public API. Adds rootDir in the SDK tsconfig so TypeScript 6 can emit declarations.

  • Bug Fixes
    • Update src/version.ts to 0.0.1-alpha.12 to match package.json.
    • Export TaskStatuses, TaskStatus, and TaskStatusListResponse from the package root to align with client.tasks.statuses.
    • Set compilerOptions.rootDir to src in tsconfig.json for successful TS 6 declaration builds.

Summary by CodeRabbit

  • New Features
    • Added direct SDK exports for task status resources, making them easier to import from the package’s main entry point.
  • Chores
    • Updated the SDK version to the latest alpha release.
    • Improved TypeScript project configuration for more consistent package builds.