Skip to content

Releases: NimbleBrainInc/synapse

v0.8.0

27 Apr 22:48
18505a3

Choose a tag to compare

Fixes the file picker, which was effectively dead in NimbleBrain hosts and inflated bytes through tool-call JSON. pickFile / pickFiles now resolve to a stable workspace file ID; the host persists the bytes server-side over multipart.

Breaking

  • FileResult.base64Data removed; FileResult.id (workspace file ID, fl_ + 24 hex) added. Tools that need the bytes look the file up by ID server-side instead of receiving them inline. The prior shape capped uploads at the JSON body limit; this removes that ceiling.

Fixed

  • pickFile / pickFiles sent synapse/pick-file, but the NimbleBrain bridge handles synapse/request-file — calls would hang until the iframe's request timeout. Both methods now send synapse/request-file.

v0.7.0

27 Apr 22:48
6d9f484

Choose a tag to compare

Adds iframe-side support for the MCP 2025-11-25 tasks utility so widgets can fire long-running tools without blocking. See PR #8.

Added

  • synapse.callToolAsTask(name, args?, opts?) returns a TaskHandle (result() / refresh() / cancel() / onStatus()) for long-running tools.
  • useCallToolAsTask(name) React hook with notification subscription and polling fallback.
  • Task, TaskStatus, CreateTaskResult, TasksCapability, TaskHandle, CallToolAsTaskOptions, UseCallToolAsTaskResult exports.

Changed

  • createSynapse() advertises appCapabilities.tasks on init; parseToolResult preserves _meta (including io.modelcontextprotocol/related-task).

Breaking

  • TypeScript mocks of Synapse must add stubs for callToolAsTask and _hostTasksCapability (now required interface members). Runtime API unchanged.

v0.6.0

27 Apr 22:48
14ee5e9

Choose a tag to compare

Breaking

  • HostInfo no longer carries a theme field. It was redundant after the host-context unification; read theme via synapse.getTheme() / useTheme() instead. HostInfo reports identity only (host name, protocol version, isNimbleBrain).

Added

  • useHostContext() React hook and synapse.getHostContext() / synapse.onHostContextChanged() for reading and observing the full ext-apps host context — including host-specific extensions like NimbleBrain's workspace field. Returns the spec-typed McpUiHostContext.

Changed

  • getTheme() / useTheme() / onThemeChanged() are now selectors over the unified host-context state. Same API and behavior, but onThemeChanged no longer fires when only non-theme fields (e.g. workspace) change.

v0.5.0

27 Apr 22:48
5fac4d1

Choose a tag to compare

Minor bump: removes a public method from the Synapse interface. Also changes the wire format of synapse/download-file (now sends a Blob, not a string) — must ship paired with a host bridge that accepts a Blob payload.

Fixed

  • downloadFile() with a Blob now delivers the actual bytes. Previously the Blob path replaced the content with the literal string "[Blob content not serializable]" before sending, producing a 31-byte text file on disk. downloadFile() now sends the Blob directly over the postMessage structured-clone channel; the host bridge downloads it as-is. String content is wrapped in a Blob before sending so exactly one shape travels the wire.
  • When a Blob is passed with an intrinsic type and no explicit mimeType arg, the Blob's type is used on the wire (previously the SDK would emit application/octet-stream and the host would rewrap the Blob, losing the correct MIME). Precedence is: explicit mimeType arg > Blob's intrinsic type > application/octet-stream fallback.

Removed

  • BREAKING: saveFile() / synapse/save-file. The method had no host handler (silently no-op) and its signature was indistinguishable from downloadFile(). Use downloadFile(). If you need to persist a generated file to the workspace so the agent can reference it, that will be a distinct, spec'd API when the need arises.

v0.4.4

27 Apr 22:48

Choose a tag to compare

Fixed

  • Spec-compliant theme propagation in Vite preview and createSynapse handshake. Preview host now sends tokens under hostContext.styles.variables and emits ui/notifications/host-context-changed (replacing the legacy hostContext.tokens field and synapse/theme-changed method). createSynapse now injects host CSS variables and notifies theme subscribers immediately after the handshake resolves, so widgets see the host-provided theme on first paint instead of only on subsequent changes.

v0.4.3

17 Apr 07:36

Choose a tag to compare

Added

  • Synapse.readResource(uri) — reads an MCP resource from the originating server via the ext-apps resources/read bridge. Returns the spec-shaped ReadResourceResult.
  • App.readServerResource(params) — spec-aligned equivalent on the low-level App type. Accepts ReadResourceRequest["params"] so callers can pass _meta (progress tokens, related-task).
  • ReadResourceRequest and ReadResourceResult re-exported from the package root so consumers don't need a direct @modelcontextprotocol/sdk import.

Fixed

  • Vite preview harness no longer emits synapse/data-changed on UI-initiated tool-call responses. The old behavior created a feedback loop (tool call → data-changeduseDataSync refetches → tool call → …).

v0.4.0

02 Apr 04:16

Choose a tag to compare

Breaking changes

  • Spec-compliant field names: appInfo (not clientInfo), appCapabilities (not capabilities), hostInfo (not serverInfo), hostContext.styles.variables (not theme.tokens)
  • Removed synapse/theme-changed: Use ui/notifications/host-context-changed (ext-apps spec)
  • openLink() sends a request (with id), not a notification — required by Claude Desktop

Added

  • All message types and method strings imported from @modelcontextprotocol/ext-apps — compile-time enforcement
  • spec-compliance.test.ts — 40+ tests that fail if wire format drifts from spec
  • CLAUDE.md with hard rules for spec compliance

Fixed

  • Blank widget in Claude Desktop (wrong init field names)
  • LinkedIn links not opening in Claude Desktop (notification vs request)