docs: cover the new request options in the migration guide - #12
Conversation
#11 merged before the 3.0.0 release PR, so the 16 request options ship IN 3.0.0 rather than a later minor. MIGRATING.md was written when 3.0.0 was only the wire realignment, which left it describing a smaller release than the one about to publish, and left one line it now contradicts. The contradiction: "Raising it needs max_rows, which this SDK does not expose yet." 3.0.0 exposes maxRows. Same class as the README line that said requesting a specific format is not configurable — a claim true when written and false at publish. Adds a New options section covering only what a 2.x reader would otherwise get wrong, rather than restating the README tables: - TakoCardSourceOptions is now TakoDataSourceOptions. The alias keeps working, but data and web options are no longer interchangeable, so an object passed to both will not type-check against the new fields. - content_format now names two things pointing opposite ways: the response field renamed from `format`, and a new request option that chooses it. Defaults differ by surface (json_compact on sources.data, csv on takoContents) and that is the API's behaviour, not this SDK's choice. - maxRows, quoteOnly and strict each carry a consequence worth knowing before use — silent clamping plus billing, a free price quote that returns no content, and a construction-time throw without nodeIds. - sources.data.mode is accepted and inert. Also softens the opening scope line, which promised only type realignment. Docs only: no version bump, so release-please folds this into the pending 3.0.0 release rather than cutting another. Verified every claim against src/ and the vendored spec, and that the README anchor resolves. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Validated the whole option surface against the live API (staging, employee token) before this ships. 20 checks, everything documented here now confirmed against behavior rather than the spec document alone. The claim I could not previously verify is now verified.
One finding fed back into the docs (407a99f). A quote returns a non-zero Two things worth recording that are not defects here:
No probe code is committed — it read the host and token from the environment and was deleted. @claude-address |
Why
Merge this before #8. #11 landed before the release PR, so the 16 request options ship inside 3.0.0 rather than a later minor.
MIGRATING.mdwas written when 3.0.0 was only the wire realignment, which leaves the migration guide describing a smaller release than the one about to publish — and leaves one line the release itself contradicts.The contradiction, at
MIGRATING.md:103:3.0.0 exposes
maxRows. This is the same class as the README line that said requesting a specific format "is not configurable yet" — true when written, false at publish, and pointed at exactly the reader least able to tell.What changed
One file, +31/-2. A New options section covering only what a 2.x reader would otherwise get wrong; the README already carries the full tables and this does not restate them.
TakoCardSourceOptions→TakoDataSourceOptionssources.dataandsources.webstops type-checking against the new fields.content_formatnow names two thingsformat, and a new request option that chooses it — same concept, opposite direction. Shown side by side, since the guide already has a section about the response field under that name.maxRowsquoteOnlymode/contentFormaton a quote.stricttakoSearch()/takoAnswer()withoutnodeIds; ids come from/v1/graph, which this SDK does not wrap.sources.data.modeAlso softens the opening scope line, which promised type realignment only, and separates "changes that may require an edit" from "additive options that never do".
Verification
Docs only — no
src/ortests/change, so no version bump. release-please folds this into the pending 3.0.0 release rather than cutting another.src/and the vendored spec: the deprecated alias atsrc/types.ts:102, the construction-time assert in both tool factories,quoteOnlyignoringmodeandcontentFormat, and the two differingcontent_formatdefaults./README.md#search-and-answer-optionsanchor resolves against an actual headinggrepconfirms no "does not expose / not configurable / not surfaced yet" claim survives anywhere inMIGRATING.md,README.md, orsrc/Dropped one claim during review of my own draft: an earlier version opened with "2.x could reach 6 of the API's 22 request options." That number is not defensible — it depends on whether you count container properties like
sourcesandoutput_settingsalongside their nested leaves. Replaced with the figure the contract suite actually asserts: 16 newly reachable, and every property of every request schema now covered.What this does not do
Does not document the
/v1/graphendpointsnodeIdsdepends on — this SDK does not wrap them, and the guide says so rather than implying otherwise.🤖 Generated with Claude Code