The extension contract
What SpaceMIX promises extension developers: what the contract consists of, how it is versioned, what may change and how, what you may rely on, and what is still open before we freeze it.
This page is our promise to people who build extensions for SpaceMIX. It says what the contract between an extension and SpaceMIX consists of, how it is versioned, what we will and won't change, and how we will tell you. It is also honest about what we haven't settled yet.
The promise
An extension that works today, using only what these docs mark stable, keeps working without a rebuild on every SpaceMIX release that speaks protocol 1. Within protocol 1 we only add to the contract. The rename to SpaceMIX is the one exception, made before anything was in production: see Versions. When something has to go, we deprecate it first, keep it working for at least 12 months, and remove it only in a new protocol version. A host that speaks a new protocol will keep running packages built for protocol 1 for at least 12 months after that protocol ships.
Today a package doesn't say which protocol it was built for (see Open questions). Until it can, a new protocol version can't tell old packages apart, so in practice we will not make a breaking change at all until the manifest carries that information, the rename's one-off exception aside.
"Works" means: does what these pages say it does. If the code and these pages disagree, the pages describe what we promise, and we fix the code. The changelog says when we do.
What the contract consists of
| Part | Defined in | Documented in |
|---|---|---|
| The manifest: identity, permissions, collections, actions, events, notification kinds, search | ExtensionManifest and friends in packages/sdk/src/index.ts |
Manifest |
| Permission strings and what each unlocks | Permission; the need checks in apps/desktop/src/lib/extensionHost.ts |
Permissions |
The package format: ExtensionPackage, its hash, the bundle's module shape, HOST_MODULES, CSS and tokens |
packages/sdk/src/index.ts, scripts/build-extensions.mjs, apps/desktop/src/lib/extensionBuild.ts |
Package format |
The host object and every host.* API |
packages/sdk/src/index.ts, runtime.ts, widgets.ts, widgetLayout.ts, media.ts |
Host API |
React hooks, @spacemix/sdk/react |
packages/sdk/src/react.ts |
React hooks |
The UI kit @spacemix/ui and the design tokens in tokens.css |
packages/ui/src/ |
UI kit |
| Widgets | packages/sdk/src/widgets.ts, widgetLayout.ts |
Widget reference |
| Projects: one item inside an extension that a project links to | ProjectItem in packages/sdk/src/index.ts |
Projects |
The widget frame that saved widgets run in: its document and CSP, its messages, the spacemix global and spacemix.ui, the op-* classes and --op-* variables, WIDGET_FRAME_VERSION |
apps/desktop/src-tauri/src/widget_frame.html, src-tauri/src/widget.rs, packages/sdk/src/widgets.ts, WidgetFrame in packages/sdk/src/react.ts |
The widget contract |
The frame: sandbox, CSP, lifecycle, the wire between frame and host, PROTOCOL_VERSION |
packages/sdk/src/protocol.ts, runtime.ts, apps/desktop/frame/main.tsx, src-tauri/src/ext_frame.rs |
Frame protocol |
| What the assistant gets from your manifest: tool names, tool shapes, approval defaults, collection events | apps/desktop/src/lib/tools.ts, lib/data.ts, collectionEvents |
Manifest |
The registry API in SpaceMIX Hub, /v1/registry/*, and package signing |
packages/sdk/src/registry.ts |
Registry |
Everything a reference page marks stable, as a whole page or one section of it, is covered by the promise. experimental and internal items are not; see Stability labels.
Versions
There are six version numbers. Each guards something different.
| Version | Today | Guards | Checked where |
|---|---|---|---|
PROTOCOL_VERSION |
1 |
The wire between the host and the frame runtime, and the protocol line this promise is made for. | The frame runtime refuses an init with a different number. The host doesn't check yet. |
PACKAGE_FORMAT |
2 |
The shape of ExtensionPackage and how a bundle is loaded (HOST_MODULES, __opExtension). |
Install, publish, the Studio, and every registry download refuse any other format. |
WIDGET_FRAME_VERSION |
3 |
The widget frame surface saved widgets depend on: the document, its CSP and sandbox, its messages, spacemix, spacemix.ui and its options, the op-* classes and --op-* variables; also the grid constants and WIDGET_TOKEN_RE. |
npm run docs:check fails on any removal or change against the widgetFrame section of the snapshot; npm run docs:update refuses to record one unless this moved (for the grid constants and WIDGET_TOKEN_RE, also PROTOCOL_VERSION or the SDK's breaking line). The frame reports it as spacemix.version. |
@spacemix/sdk |
0.3.0 |
The types, host, the helpers and hooks extension code calls. |
Not checked: the bundle runs against whatever SDK the host provides. |
@spacemix/ui |
0.2.0 |
Components and design tokens. | Not checked, same as the SDK. |
Your manifest's version |
yours | Your extension, as other people and extensions see it. | Publishing needs a higher version than every one before it. |
The registry API is versioned in its path: /v1/registry.
How they move:
PROTOCOL_VERSIONchanges only for a breaking change. Additive changes (a new messagetype, a new optional field, a new method or channel) keep it at1.FrameInit.routeis an example: it was added as an optional field, and a host that doesn't send it means"".PACKAGE_FORMATchanges only when the package shape or the way a bundle is loaded changes incompatibly: a host module removed, a global renamed, a new major version of React,lucide-reactormotion. Adding a host module doesn't change it.WIDGET_FRAME_VERSIONchanges only for a breaking change to the widget frame, and the new frame must keep widgets saved for the old version rendering: they are stored as HTML and never rebuilt. Frame 3 (the SpaceMIX rename) is the one exception: saved widgets were carried over by a one-time migration. A newspacemix.uihelper, option, class or message to the frame keeps it where it is. The frame's CSP, sandbox and navigation limits may be tightened for security without a bump (with a changelog entry); loosening them, or a new message from the frame that the parent acts on, needs a security review and a bump. See The widget contract.- The SDK follows semver. While it is
0.x, a minor release (0.3.0→0.4.0) only adds, and a patch release only fixes. A breaking SDK release would be1.0.0or later and would come with a new protocol version. - The UI kit follows the same rules as the SDK.
One-off exception: the rename to SpaceMIX. Renaming the product broke the SDK and the UI kit in a minor release (@spacemix/sdk 0.3.0, @spacemix/ui 0.2.0) and kept PROTOCOL_VERSION at 1, because nothing was in production yet and the owner approved it. It also changed what a package's hash is computed over, under PACKAGE_FORMAT 2: length-prefixed fields, with the canonical manifest among them. Widgets saved before it are rewritten by a one-off migration rather than kept rendering. This exception covers only that rename: every later breaking change follows the rules above, including 1.0.0 and a new protocol version for the SDK.
How your code meets the host
The most important fact behind these rules: your bundle doesn't contain the SDK, React or the UI kit. It imports them, and the frame hands it SpaceMIX's own copies as globals (HOST_MODULES). host, defineExtension, useCollection, Button, useState: all of them are whatever version the server you're running on ships.
That has two consequences.
- Old bundle, new host. A bundle built against SDK 0.3.0 runs against SDK 0.4.0 next year without being rebuilt. That only works if 0.4.0 still has everything 0.3.0 had, with the same meaning. This is why every change to the contract must be additive.
- New bundle, old host. A bundle built against a newer SDK can run on a server that hasn't updated. A method added in 0.4.0 is missing there. The manifest can't declare a minimum yet, so test for what you use:
if (host.tools),typeof host.view.focused === "function". Optional APIs (host.fs,host.net, …) are absent when the permission isn't approved, too.
Compatibility rules
Additive: allowed within protocol 1
- New
host.*APIs and methods, new optional arguments at the end, new fields in results. - New optional manifest fields, new optional fields in declarations (
CollectionDefinition,ActionDefinition, …). - New permission strings. An existing extension doesn't have them and is unaffected.
- New
HostToFrameandFrameToHostmessage types, new optional fields in messages, new bridge methods, new subscription channels. Each side ignores what it doesn't know. - New exports from
@spacemix/sdk,@spacemix/sdk/reactand@spacemix/ui; new design tokens; new host modules. - New registry routes, new optional request fields, new response fields.
- Raising a limit or a timeout.
- Fixing behavior that contradicts these docs.
Breaking: needs a new protocol version, a changelog entry, and the deprecation period
- Removing or renaming a
hostAPI, method, type, field, export, component, design token or host module. - Changing a signature, a type, a default or the meaning of anything documented. Defaults count:
requireApprovaldefaulting to["delete"],listtools defaulting to 20 items,searchFieldsdefaulting to every string field, the names and payloads of collection events. - Making something optional required, in the manifest, in a call or in a message.
- Rejecting something that was accepted: tighter checks in
defineExtension(which runs from the host's SDK, so a tighter check would stop old bundles from loading), on install, on publish, or in argument validation. - Starting to enforce a permission that was declared but not enforced (
storagetoday). - Removing a permission string, or making one grant less.
- Changing how tool names are derived (
<ns>_<collection>_<op>,<ns>_<action>), how<ns>is derived, or the hash input. - Removing a message type, a method, a channel, or changing the shape of a field on the wire.
- A new major version of a host module (React,
lucide-react,motion). - Tightening the extension frame's sandbox or CSP in a way that stops documented code from working. (The widget frame's CSP and sandbox may be tightened at any time; its other changes go by
WIDGET_FRAME_VERSION, see The widget contract.) - Lowering a documented limit or timeout.
- Removing or changing a
/v1registry route or field.
Deprecation
When something has to change incompatibly, we:
- Add the replacement first, as an additive change.
- Mark the old thing deprecated in three places:
@deprecatedin its JSDoc (so your editor shows it), a Deprecated note on its reference page, and an entry under Deprecated in the changelog, with the date and what to use instead. - Keep it working for at least 12 months after that changelog entry, and in every host that speaks the protocol version it was deprecated in.
- Remove it only in a new protocol version (or
/v2for the registry), listed under Removed in the changelog.
Nothing is deprecated today.
What you may rely on
- Every signature, behavior, default, limit and error condition a reference page documents as
stable. hostbeing connected before the first line of your bundle runs;host.manifestandhost.envat module level.- Your storage and collections being scoped to your extension's id, kept when the extension is uninstalled, and shared by everyone on the same server. They are erased only by the server's owner's explicit choice: deleting the extension with Erase its data on this server, or choosing to erase them while approving a listing that replaces a build made on this server (see When a listing takes a build's id). That is offered only for a build installed on this server from a package file, the Studio or a dev build, never for an id this server ever installed from SpaceMIX Hub or the Marketplace. See Deleting your own build.
- The tools and collection events the host derives from your manifest, with the names and shapes on the manifest page.
- The modules in
HOST_MODULESbeing there, at the major versions listed in Package format. - The design tokens and their utilities (
bg-surface,text-muted,border-border, …) following the light and dark theme, anddata-themeon<html>naming the theme. - Your route being part of the app's address as
#/@<server>/<extension id>/<route>.@<server>is the server's shortcode (the first 16 characters of its id), so a link opens on the same server for everyone; an address without it still opens on the active server. A link with an 8- to 15-character shortcode (links made before the shortcode grew to 16 had 8) or with a server's id from before it moved to key-based identity asks Open this link on <name>? before switching. A server's id, and so its shortcode, changes once, when the server moves to key-based identity, and stays the same after that, also when the server is renamed. The host writes the shortcode; extensions never build it. - Search calling only the read-only action your manifest names in
search, with a trimmed, non-emptyqueryand alimit, and showing what it returns as plain text; withoutsearch, Search reading your collections without starting your frame. See Being found in Search. - The frame having no scripted network access (
connect-src 'none'), andhost.net.fetchbeing the way out. - A package with a matching hash and a valid signature being installed as published.
What you may not rely on
- SpaceMIX's DOM, styles or routes. Your frame can't reach the app's document, and nothing about it is promised.
- The storage layout. The
kv:prefix on storage keys, how collections are laid out in tables (one table per collection, one row per record, today), the namespace and table names, and the keys of thestoredsubscription channel are implementation details. Usehost.storage,host.collection,useStoredanduseCollection. - Timing. When a frame starts, how long a hidden frame stays alive, how many instances run (one per open window or browser tab today), the order in which instances hear an event, or how quickly a write reaches another window. Use
host.events.claimfor anything that must happen once. Likewise how often Search calls your search action, how long it waits for an answer, and how many results it shows. - Durability on resolve. A resolved
host.storage.setor collection write means the change is applied in this window and on its way to the server, not that the server has stored it. - Error wording. Errors cross the bridge as strings. Show them; don't parse them.
- Anything not documented: other globals in the frame, the frame document's structure, the Studio's probe, the
/api/*routes of a SpaceMIX server, the blank page at/api/ext-page,@spacemix/sdk/runtime'srequest,subscribeandconnect. - Fields that do nothing yet:
ExtensionManifest.orderandExtensionManifest.entryare accepted and ignored. - Tailwind theme variables beyond the design tokens, and Tailwind's
dark:variant (it follows the operating system, not SpaceMIX). See CSS.
Stability labels
Every reference page and API carries one of three labels. A page's front matter gives the label for the page as a whole; a page can override it part by part with a Stability table or a Stability line per section, as the Widget reference does.
stable: covered by this promise. Changes are additive; anything else goes through deprecation.experimental: works and is documented, but may change in a minor SDK release without the deprecation period. Each experimental item says why. Today:- camera, microphone and screen capture (the
camera,microphoneandscreenpermissions,media.*andMediaWire): the capture proxy hasn't been tested with real devices in every browser (Media); host.git: not yet exercised against many hosts (Git);host.chat: its notifications and events are tied to one extension id, andviais taken from the caller (Team chat);host.events: not yet exercised live with several windows and extensions; limits may change (Events);host.tools: not yet exercised live across many extensions; the{ error }convention is likely to change (Tools);host.ai: one completion per call, no streaming or model choice yet (AI);host.mcp: requests depend on the server's CORS policy and its host check differs fromhost.net.fetch(MCP);host.widgets(WidgetsApi,WidgetsViewApi), the widget types,useWidgetList,useWidgetFeed,WidgetFrameand the widget layout helpers: built for Dashboards and Team Chat and not yet exercised live by others (Widget reference). The widget frame itself, the grid constants and the widget token format arestable.- Who can use an extension (
extension:*,extension:<id>,mcp:*,mcp:<id>and theserver:permissions people hold): new, and the people-side permissions may still change; what an extension sees doesn't (Permissions). - The
@spacemix/uicomponents added with the design system, by module:layout.tsx(Page,Stack,Grid,SplitView,ListDetail,SidebarLayoutand the rest of Layout), the actions incomponents.tsx(IconButton,ButtonGroup,SegmentedControl,Toggle,CopyButton,Link,Spinner, Actions),forms.tsxandfield.ts(Forms),popovers.tsx(Pickers and Overlays),floating.tsandhost.ts(the floating helpers andPortalContainer),data.tsx(Data display),charts.tsx(Charts),navigation.tsx(Navigation),feedback.tsx(Feedback),types.ts(Size,Tone) andcontrollable.ts(useControllableState); and the new props of the stable components (Button'ssize,loading,leftIcon,rightIcon,fullWidthand"danger"variant;Input'ssizescale,invalid,leftIcon,rightIcon,leftAddon,rightAddonandhtmlSize;PageHeader'stitleandsubtitleas nodes andbelow;EmptyState'stitleandbodyas nodes, optionalbody,size, andclassName,refand the other<div>props;Kbd's andMarkdown'sclassName;ConfirmDialog'stitleas a node): new in this release, and names and props may still be adjusted before they are promised. The components that were there before and the design tokens staystable;ButtonVariant, exported for the first time in this release, isstableand may gain members (UI kit). host.view.setFullscreenandhost.view.fullscreen: the shell's ways out of full screen may still change; the two methods and what they mean won't (Full screen).- The paid Marketplace (
/v1/market/*,Listing.price,VersionInfo.paid,UpdateInfo.paid, the Marketplace types inpackages/sdk/src/registry.ts, the402payment_requireddownload, the server's signed requests) and what a server does with an extension until it's paid for: new, and not yet exercised with real payments; prices, the grace period and the signed-request format may still change. A free extension sees none of it (Marketplace, Turned off until it's paid for). ProjectItem: there is nohost.projectsAPI yet to hand it over; the type may grow but its fields won't change meaning (Projects).- The SpaceMIX API (
/api/v1, API keys and their scopes): new, server surface rather than extension surface, and not yet exercised by many integrations. What an extension sees of it (ctx.viawithextension: "ai.spacemix.api", events and notifications withsource: "api") follows the pages it is on (SpaceMIX API).
- camera, microphone and screen capture (the
internal: visible in the code but not for extensions. It can change or disappear at any time.
Your extension's own contract
Your manifest's version is your promise to the people and extensions that depend on you. Automations call your tools by name and react to your events by type; other extensions read your event payloads. Treat removing or renaming a collection, field, action or event, or tightening a schema, as a major version. Adding a permission makes an update from the registry wait until someone who manages extensions on the server (the owner, or a member with server:extensions) approves it; a local install applies at once only for whoever it runs for: the owner's for the team, and a member's own build only for its builder, until the owner approves it for the team (see How far a member's build reaches). See Manifest versions.
Known gaps in protocol 1
These are true today and documented as they are. They are part of what we must settle before we freeze the contract.
storageis declared but not checked: storage and collections work without it.data:<ns>:readanddata:<ns>:writeare accepted and shown in the store, and grant nothing.orderandentryin the manifest are ignored.defineExtension's checks run when the bundle loads in a frame and in the Studio, not in the build script or on install, so a package can install and then fail to load.- The bridge and the core match
net:permissions slightly differently (bare domains fornet:*.<domain>, ports fornet:<host>); the core's stricter rule applies tohost.net.fetch, the bridge's looser one to MCP. - A package's CSS can use Tailwind theme variables the frame doesn't define.
- Errors have no codes.
- A widget on a dashboard or in a Team Chat card, in the desktop app as in the browser, can navigate its frame to any URL and leak what it puts in that URL, and a page that never finishes loading keeps a bridge to every installed extension's read-only tools; see Widgets: Known gaps.
RTCPeerConnectionisn't covered by the CSP, so a widget may leak data over WebRTC (STUN, DNS) in any engine; untested. See Widgets: Known gaps.- The site behind a widget's web source sees when and how often the widget is viewed, and
host.widgets.refreshlets an extension withwidgets:viewmake it fetch, a slow timing channel to that site. See Widgets: Known gaps. - The same holds for every extension frame:
RTCPeerConnectionworks in an extension's view (calls between people use it, see Media) and the CSP doesn't cover it, so an extension can send data over WebRTC without anet:permission. Neither the egress log nor the network switch covers it (see What the server logs).
Open questions before we freeze
Each of these would be hard to change once third parties depend on the current behavior. We intend to answer all of them, additively where possible, before declaring protocol 1 frozen.
- The manifest declares no target. A package doesn't say which protocol, package format or SDK version it was built for (
ExtensionManifest,packages/sdk/src/index.ts). Without it, no future host can run old and new packages side by side, and no old host can refuse a package that needs a newer one. Proposal: an optionalsdk(orprotocol) field the build fills in, and a minimum the host checks; missing means protocol 1. - Extensions can't see the host's version.
HostEnvhas no protocol or SDK version, so feature detection is the only option. Proposal: addhost.env.protocolandhost.env.sdk. - Host module versions aren't pinned per protocol. React,
lucide-reactandmotioncome from the host. Alucide-reactminor release that removes an icon would break bundles importing it. Proposal: pin the majors perPACKAGE_FORMATand keep removed icons as aliases. - Tailwind theme variables. Package CSS references variables (
--container-3xl,--text-xl,--color-amber-500) that exist in the frame only if SpaceMIX's own frame code uses the same utility (apps/desktop/frame/styles.css,scripts/build-extensions.mjs:165). The set changes whenever SpaceMIX's code does. Proposal: the frame defines Tailwind's full default theme, or the build emits the variables a package uses. dark:doesn't follow SpaceMIX's theme. Proposal: define adarkcustom variant on[data-theme=dark]intokens.css; that changes what existingdark:classes do, so decide before freezing.storageenforcement. Enforce it (breaking for extensions that don't declare it) or document it as informational for good.data:<ns>:*. Implement cross-extension collection access or remove the strings fromPermission. Removing them later is breaking.- Tool name collisions.
<ns>is only the last segment of the id (namespaceOf), socom.acme.tasksandai.spacemix.taskscollide, and the one first in navigation order wins (apps/desktop/src/lib/tools.ts:215). Nothing checks collisions between an action and a collection tool, or tool names over 64 characters. Proposal: detect collisions at install and refuse or prefix. - One set of manifest checks.
defineExtension, the build script (which stubs it,scripts/build-extensions.mjs:143), install (check_local) and publish (check_package) check different things; ids allowed by install and the registry (-in the first segment) faildefineExtension. Proposal: one validator, run at build, install and publish. Any check added later rejects packages that were accepted, so the full set must be decided now. - Errors have no codes. Every error is a string (
protocol.ts,handleRequestinextensionHost.ts:1109). Proposal: an optionalcodeonresandcall-resulterrors and on the rejectedError. - The handshake has no range. The frame requires an exact
PROTOCOL_VERSION(apps/desktop/frame/main.tsx:128) and the host ignores the one inready(onMessageinextensionHost.ts:1134). In a browser the frame comes from the active server, which can run another version than the page. Proposal: both sides send the range they support. net:matching differs between the bridge and the core (extensionHost.ts:501,src-tauri/src/net.rs:151). Proposal: one rule, the core's, in both places.- The frame CSP allows images, media and nested frames from any
http:/https:host (src-tauri/src/ext_frame.rs:58-59). Extensions rely on it (remote avatars, embedded editors), so removing it would break them; keeping it means data can leave the frame without anet:permission. Decide which we promise. - Timeouts are asymmetric.
tools.callmay wait 10 minutes in the frame, but the host gives every action 60 seconds (extensionHost.ts:58,runtime.ts:26). There is no load timeout for a frame. - Storage at scale. Collections are now stored one record per row and merged on the server, but
host.storagevalues (now capped at 64 KB) are still written whole, with cross-window lost updates, and writes that resolve before they are stored (writeStoredinlib/useStored.ts:66). Changing any of this changes behavior people may depend on. - Partly-permissioned objects.
host.mcpandhost.eventsare always present, but most of their methods need a permission, and a refused subscription only logs to the console (runtime.ts:117). Proposal: make the absent-when-not-permitted rule uniform, or havesubscribereport failure. - The storage layout leaks through the
storedchannel. Itskeyis the raw storage key,kv:<key>(protocol.ts:42,runtime.ts:136). Collections moved to their ownrecordschannel; proposal: astoragechannel keyed without the prefix, so the layout can change. - The blank page has no API. The WordPress extension finds
/api/ext-pagefrom its frame's own location (extensions/wordpress/view/editor/wpRuntime.ts:173,frameSrc). Proposal: expose its URL throughhost, or keep it internal and say so in the extension. - Prerelease ordering compares prerelease tags as strings (
packages/sdk/src/registry.ts:175, and the same on the server and the Hub):beta.10sorts beforebeta.9. Changing the order later could reorder published versions. - Size limits disagree: 2 MB in the Studio, 8 MB for publishing, none in the build script (
extensionBuild.ts:29). - Unused manifest fields.
orderandentryare accepted and ignored. Giving them a meaning later is additive only if the meaning matches what packages already put there. - A client-supplied preview stands in for the approved permissions. The approved permissions and
net:*grants live in the core'sinstalled_extensionstable (extensionspacemix), which clients can read but not write: the records API refuses it withinstalled_extensions changes only through the extension commands.(server_ownedinsrc-tauri/src/records.rs:1404), and the only client path to a new grant isPOST /api/extensions/grant-host, which needs access to the extension (grant_hostinsrc-tauri/src/registry.rs:2189). Butnet.fetchtakes apreviewfrom the client in place of that record (fetchinsrc-tauri/src/net.rs:386): someone withserver:extensionswho may use an installed extension, or who is working on an id that was never installed, can fetch as it with anynet:permissions. Extensions can't reach this, but approving permissions is enforced for previews only in the app's UI. - Install reports are unauthenticated, so anyone can inflate install counts, and anyone signed in to some server can make that server eligible to review any extension.
- Chat's
viais taken from the caller (src-tauri/src/chat.rs:1669-1678), so any extension withchatcan post "as SpaceMIX" naming another extension. Proposal: the host stampsvia.extension, astools.calldoes. - Chat is tied to one extension id. Its notifications and events name
ai.spacemix.chat(SOURCEinsrc-tauri/src/chat.rs:41), sohost.chatfrom any other extension sends people to that extension. Proposal: use the calling extension's id, or say in the contract thatchatbelongs to one view. - A result shaped like
{ error: string }becomes an error.tools.calland widgets treat it as a failure (extensionHost.ts:833), so an action can't return that shape. Proposal: carry failures out of band before people rely on the shape. widgets:viewreaches every extension's read-only tools.widgets.callruns any read-only tool without checking the widget exists or that the tool is one of its sources (extensionHost.ts:992,callFromWidgetinwidgetRuntime.ts:126). Proposal: limit it to the widget's sources, or documentwidgets:viewas read access to all extensions' data.
Where changes are recorded
Every change to the contract, additive or not, gets an entry in the changelog, with the protocol and SDK version it shipped in.