Repository navigation
feat: batchSetFieldValues fills several fields in one call, all or none - #65
Merged
Merged
Conversation
bendersej
marked this pull request as draft
October 13, 2026 18:17
…ints at the generated tools
…ter, no permission notes, get_annotated_page names the WebMCP image block
…ild, web drops its browser field
…e and snake_case surfaces; web ships the batch tool as a minor; release-note figures against 0.8.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
The SimplePDF editor gains
BATCH_SET_FIELD_VALUES: it sets several existing fields in one call, all or none, as a single undo step, and reports every rejected update at once inbad_request:batch_validation_faileddetails.failures. This re-syncs the SDK's contract pin so every SDK surface exposes it.Release order: the editor change is live (SimplePDF/simple-pdf#496,
editor_version7845f7c3-20261014T100758Z); the pin is synced from the live manifest, andcheck:contractpasses.Changes
embed-api.jsonre-pinned andsrc/generated/*regenerated:batchSetFieldValues({ updates: [{ fieldId, value }] })onembed.actions, the agentic tools (/tools,/ai-sdk,/tanstack-ai) and thesimplepdf_embed_batch_set_field_valuesWebMCP tooluseEmbed().actions.batchSetFieldValuesin@simplepdf/react-embed-pdf<Code>Detailstype per error code that carries details and the mapBridgeErrorderives from, sobad_request:batch_validation_failedexposes typeddetails.failures(BatchValidationFailedDetails) next toMissingRequiredFieldsDetails(name unchanged)excludeknown-names message updated; READMEs list the new actiontools.js5056 → 3592 B gzip,ai-sdk.js5269 → 3808 B,tanstack-ai.js5247 → 3786 B); their caps are lowered (4.5 / 5 / 5 KB,schemas.js3 → 2 KB)getAnnotatedPagestates the WebMCP image block plus text block, and signature values document plain text as a typed signature (SimplePDF/simple-pdf#496)@simplepdf/embed596 → 248 KB unpacked;@simplepdf/react-embed-pdfis no longer minified, so it stays readable without maps (110 → 74 KB);@simplepdf/web-embed-pdfdrops itsbrowserfield, which sent webpack users the minified build (unpkg keepsindex.min.js)@simplepdf/web-embed-pdfbundles@simplepdf/embed, so it ships the WebMCP tool) and leaner agent requests (minor for@simplepdf/embed, whose/schemaslose the root description; patch for@simplepdf/react-embed-pdfand@simplepdf/web-embed-pdf)Verified locally:
@simplepdf/embedtest:types,test(119),check:size,check:exports,check:api; Reacttest:types,test(15),check:api,check:exportsafter rebuildingembedthenreact.@simplepdf/web-embed-pdftest:types,test:unit(11). The Changelog Check (npm run version, then React and webtest:format) passes in a scratch copy.check:contractpasses against the live manifest.Review outcomes
React build readable without maps
react/rollup.config.js
Named
batchSetFieldValues, with a short descriptionembed/src/bridge.ts
BATCH_SET_FIELD_VALUES(Google AIP-233/234 pattern); the description drops implementation detail; your callEach tool description shipped and sent once
embed/scripts/generate.mjs
Agentic bundle caps lowered
embed/scripts/check-bundle-size.mjs
schemas.js3 KB,tools.js5 KB,ai-sdk.js/tanstack-ai.js5.5 KBNo source maps anywhere; web drops its
browserfieldweb/package.json
@simplepdf/embedand React (58% and 63% of their installs); web'sbrowserfield pointed bundlers atindex.min.jsindex.js; unpkg keepsindex.min.jsTyped details for every error code that carries them
embed/scripts/generate.mjs
missing_required_fields, picked by name<Code>Detailstype per code and the mapBridgeErrorderives fromTool descriptions carry behavior, in words
embed/embed-api.json
valueparameter; "It renders document content, so it is gated exactly like get_document_content: the embedding origin must be whitelisted for the tenant." and "requires editing to be enabled"; snake_case names (get_fields,field_id,image_data_url) that are wrong on the camelCase tools;getAnnotatedPagepromisedimage_data_url, which WebMCP returns as an image blockWeb ships the batch tool as a minor
.changeset/batch-set-field-value.md
@simplepdf/embedand React only, though web bundles embed (web/rollup.config.jsexternal: [])