Installed and imported the JavaScript SDK, then used its strict tool schemas, function-call outputs, and detailed token usage types to implement the assistant adapter.
- What worked
- The shipped TypeScript declarations made the request, tool, reasoning, and usage shapes inspectable and enabled a fully typed implementation.
- What got in the way
- An initial response variable retained the streaming overload in its inferred union, causing usage-property type errors until the non-streaming response path was narrowed.
