Skip to content

docs: synapse pickFile result shape + breakage history#8

Merged
mgoldsborough merged 1 commit into
mainfrom
docs/file-picker-result-shape
Apr 27, 2026
Merged

docs: synapse pickFile result shape + breakage history#8
mgoldsborough merged 1 commit into
mainfrom
docs/file-picker-result-shape

Conversation

@mgoldsborough
Copy link
Copy Markdown
Contributor

Summary

  • Update the synapse.pickFile() example in apps/synapse.mdx to show the new FileResult shape ({ id, filename, mimeType, size }) and the intended downstream usage — pass the id to a tool, let the tool read bytes server-side via the host's file APIs.
  • Add a caution Aside noting that pickFile / pickFiles were broken in NimbleBrain hosts before `@nimblebrain/synapse@0.8.0` (the SDK sent `synapse/pick-file` while the host bridge handles `synapse/request-file`; calls would hang).
  • Tighten the `synapse/request-file` row in `apps/bridge.mdx` to mention the persisted-file return shape.

Coordination

This PR documents the post-merge state of two upstream PRs:

Hold this docs PR's merge until after `@nimblebrain/synapse@0.8.0` publishes to npm. Until then, the docs would describe a contract the published SDK doesn't honor yet. Both upstream PRs are linked above.

Test plan

  • `npm run build` — clean Astro/Starlight build, no broken links or MDX errors
  • Visual check: example renders, both Aside callouts render correctly

The Synapse SDK 0.8.0 changes `FileResult` from carrying `base64Data`
to carrying a workspace file `id`. Update the example in apps/synapse
to show the new shape and the intended downstream usage (pass id to a
tool, tool reads bytes server-side). Add a caution Aside noting that
the picker was broken in NimbleBrain hosts before 0.8.0 — the SDK was
sending the wrong method name and calls would hang.

Tighten the apps/bridge `synapse/request-file` table row to mention
the persisted-file shape so readers don't have to cross-reference.
@mgoldsborough mgoldsborough merged commit f88dad6 into main Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant