-
Notifications
You must be signed in to change notification settings - Fork 11
feat: SDK updates with API changes, type safety improvements, and Biome config #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The project was switched to pnpm but the GitHub Action was still using npm caching, causing CI failures due to missing lock files.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
The separate tsc typecheck for tests was failing due to issues with Speakeasy-generated funcs files. This step is redundant since: - pnpm run build already type-checks the source - vitest handles type-checking when running tests
Speakeasy internally runs pnpm install which requires pnpm to be installed in the CI environment.
Summary
This PR brings several improvements to the TypeScript SDK:
API Changes
debugparameter withechoUpstreamBodyoption for chat generationChatCompletionFinishReasonenum for better finish reason handlingChatStreamingChoicetype for streaming responsesPluginResponseHealingTTLsupport for cache controlDebugtype for debugging optionsallowEmptyValuesupport in query encodingType Safety Improvements
anytypes withunknownthroughout tool-types.ts:ZodType<any>→ZodType<unknown>in all tool interfacesToolWithExecute<any, any>→ proper generic constraintsToolWithGenerator<any, any>→ proper generic constraintsimport typewhere appropriateCode Quality: Biome Configuration
Added comprehensive
biome.jsonconfiguration to enforce code quality:noExplicitAny: "error"- Bans explicitanytypesnoUnusedImports: "error"- Removes dead importsnoConsole: "error"- Prevents console statementsnoDoubleEquals: "error"- Enforces strict equalityuseNodejsImportProtocol: "error"- Enforcesnode:protocoluseImportTypewith separated type importsuseConst,useBlockStatements,noParameterAssignnoAccumulatingSpread: "error"Other Changes
Test Plan
pnpm installto verify dependency installationpnpm exec biome checkto verify linting passespnpm exec tscto verify type checking passes