SpaceMIX v0.1.0

Contract changelog

stablefor bothsince protocol 1

Every change to the extension contract, by protocol and SDK version, starting with the protocol 1 baseline.

Every change to the contract is listed here, newest first, with the protocol and SDK version it shipped in. Entries are grouped as Added, Changed, Deprecated, Removed, Fixed and Security. Anything under Deprecated keeps working for at least 12 months from the entry's date (see Deprecation).

Unreleased

Added

  • core.account is a reserved id: notices about someone's own account come from it (ACCOUNT_SOURCE in apps/desktop/src-tauri/src/auth.rs, registry::CORE_NAMESPACES). A server refuses to install an extension under that id, like the other ids SpaceMIX uses itself. See Manifest.

  • SpaceMIX Hub is optional. With SPACEMIX_HUB_URL=off a server sends the Hub nothing, and everything that needs it answers 503 { error: "SpaceMIX Hub is turned off on this server.", code: "hub_off" } (HUB_OFF and HUB_OFF_CODE in identity.rs). host.ai.complete fails, and host.ai.available() is false, when the default model is a Hub model and the Hub is off. Server surface, not extension surface, apart from host.ai. See With or without SpaceMIX Hub and AI.

  • Accounts on a server: email and password accounts (/api/auth/local/*), and auth: { local, hub } in /.well-known/spacemix. Server surface, not extension surface. See Accounts on a server.

  • Creating is now permissioned. server:extensions (Extensions) means create, install, update and remove extensions; the new server:widgets (Widgets, WIDGETS in apps/desktop/src-tauri/src/auth.rs) means create and change widgets. Someone other than the owner with server:extensions may install a package as a new id or their own earlier build (Registry::install_package_as in registry.rs, POST /api/extensions/install-package), which applies at once for them, added permissions included, and gives them extension:<id>. They can't overwrite someone else's build or a Marketplace id, or take up data others left behind; the builder record survives an uninstall, so the builder can install it again and others can't take the id. Once the owner approves one, it runs for everyone with access, acting as each viewer. The account has createGated (/api/v1/me too). A later Marketplace listing under the id of any build made on this server, the owner's too (source local or dev, never from the registry), is held with replacesBuild and asks on its extension_updates row, for the owner alone to approve or skip; approving has to choose keep or erase of the build's data (eraseData on POST /api/extensions/approve), grants are reset, it never auto-updates, and an install over it answers 403 held_for_owner. An uninstalled build stays covered until its data is erased or it is installed again. Dev installs that are builds now go in the update check for this; their hold shows as a row, with no notice. A member's build loses every tool name clash and reserves nothing against MCP connections. See Who may create extensions and widgets.

  • Extension review in the registry, experimental: every new version is reviewed before anyone can install it, and the review's screenshots are a listing's only images. VersionInfo.review (VersionReview, with ReviewState, ReviewFinding, FindingSeverity and the review's Screenshots), Listing.pending and every version in versions for the publisher and the Hub's admins only; Listing.screenshot and ListingDetail.screenshots for everyone; PUT /v1/registry/extensions/{id}/versions/{version}/screenshots (ScreenshotOrder), GET /v1/registry/screenshots/{id}, and GET /v1/registry/notices with POST /v1/registry/notices/{id}/read (RegistryNotice, RegistryNoticeKind), all in packages/sdk/src/registry.ts. See Version review.

  • @spacemix/ui Gallery (thumbnails with captions that open larger) and Lightbox (images one at a time over the page, with arrow keys and swipe), with GalleryImage, GalleryProps and LightboxProps, experimental. See Gallery, Lightbox.

  • Widgets can save data: each saved widget has a store, one JSON object kept on the server next to it (the core table widget_stores, a row per widget under its id, apart from the widget's row in widgets), shared by everyone who sees the widget, at most 256 KB (MAX_WIDGET_STORE_BYTES). Widget frame version 2 (WIDGET_FRAME_VERSION is now 2) adds operator.store (the store, set before the widget's scripts run; a copy), spacemix.save(value, { merge }?) (replace, or put top-level keys over it, a null removing one; resolves with the store after) and spacemix.onStore(fn) (changes from elsewhere); the frame → parent message { type: "save", id, value, merge }, answered with result, a new message the parent acts on (hence the bump and a security review); and the parent → frame message { type: "store", value } and render's store field. Everything in version 1 is unchanged, and widgets made for it run as before. Anyone who may view a widget (any signed-in member) may write its store, which the server enforces: the table is written only through the records operation widgetStoreSet (apps/desktop/src-tauri/src/widget_store.rs), which checks the object, its size, that the widget exists and is saved and that the store wasn't written in the last 200 ms (the app retries such a refusal twice, 250 ms apart, so writes from two viewers at once both land), stamps updatedAt and updatedBy, and writes nothing else; other writes to it are refused, and deleting a widget deletes its store. A window sends at most two writes a second per widget, folding the saves in between. In the Studio, a never-saved widget's store stays in its window until the widget is saved, and the preview of a saved widget's draft works on a copy of the real store that stays in its window and is dropped when the draft is saved or discarded, never written back. The store isn't in a widget's history, a duplicate or a widget file (whose frameVersion is now 2 only for a widget that uses the store or declares settings). Experimental, with host.widgets: Widget.settings (WidgetSetting[]: key, label, type "text", "number", "switch", "choice" or "textarea", options, default, help), the fields of a settings form whose values are the store's top-level keys, and Widget.defaultStore (WidgetStoreValue), what the store starts as, both also on WidgetVersion, DraftFields and WidgetDraft; WidgetStore (value, updatedAt, updatedBy); WidgetUpdate.store from watch; and WidgetsApi.save(widgetId, value, { merge }?) (bridge widgets.save, in WIDGETS_METHODS and WIDGETS_VIEW_METHODS): with widgets for any saved widget, with only widgets:view only for a widget the extension's frame is watching at the time (else <Name> can change a widget's data only while it shows that widget.; a guard against background writes, not a boundary, since such an extension can watch any widget, so granting widgets:view trusts it with the widgets' data), and never changing the widget itself; the widgets:view consent now reads "See the team's widgets, show them, and change the data of widgets it shows". WidgetFrame (packages/sdk/src/react.ts) watches the store itself and answers save; on a host from before the store it renders with {} after waiting 2 seconds. The assistant's widget_create and widget_update take settings and defaultStore, widget_get returns the store, settings and defaults each marked as data, never instructions, and widget_store_set changes it with the person's approval. The method lists and the DraftFields and WidgetDraft unions grew, which the contract guard counts as changed values, as with purge below. See The widget's store.

  • Widget web sources, experimental: a WidgetSource with tool WEB_SOURCE_TOOL ("web-get", a marker no extension tool name can take, since those always contain an _) and args: { url } brings public web data into a widget without giving its frame any network (the frame, its CSP and WIDGET_FRAME_VERSION are unchanged). When someone views the widget the server fetches the fixed URL anonymously: GET, https: on the default port, no user name or password, whitespace trimmed from both ends and none inside, no control or format characters, at most 2,048 characters, no headers or cookies from the widget, at most 3 redirects with every hop checked again, only public addresses (the host is resolved and the connection pinned to the checked addresses; a private or unresolvable host gets one sentence, <host> can't be reached from web sources.), 10 seconds, 1 MB; a 2xx JSON answer is the parsed JSON, a text answer the string, anything else an error naming the host. URLs are stored, approved, matched and fetched in one normalized form (new URL(url).href without the fragment). The server fetches only URLs that a widget in its widget store declares, answers are shared for 30 seconds per URL, and each person has at most 300 requests a minute (every request counts, first) and at most 60 fetches a minute that miss that cache; a refusal for either limit (429) isn't logged. An international host is called out in the approval as using non-ASCII letters. The person approves, in full, every URL a widget_create or widget_update call adds or changes before anything fetches it, and web results go back to the model marked as untrusted. spacemix.call refuses web-get, and the assistant's widget tools allow at most 5 web sources per widget. Every hop and refusal is logged in the egress log under core.widgets ("Widgets"), whose network switch turns them off. widgetWebHosts(sources) lists the hostnames, for a "Web" tag. POST /api/widgets/fetch (IPC widgets_fetch, apps/desktop/src-tauri/src/widget_net.rs). See Web sources.

  • Delete extension: one action, on an extension's page in Extensions (next to Uninstall, broken or not), in My extensions, and in the Studio's Settings for a built project (one never built gets Delete project). Its dialog (apps/desktop/src/shell/store/DeleteExtensionDialog.tsx), confirmed by typing the name, offers only what applies: Uninstall from this server (on; for someone with server:extensions and access to it, only for an extension installed with source local or dev that was never installed from the registry or the Marketplace, and never core.* or ai.spacemix.chat), Erase its data on this server (off; the server's owner only, and only together with the uninstall; anyone else gets Only the server's owner can erase an extension's data.) and Delete my Studio project (on; the person's own Studio projects for that id, also with nothing installed). Erasing takes its collection tables, host.storage and kv rows, the notifications it sent, its events and claims, its entry in shell/autoApproveExtensions and, last, extension:<id> grants. Without it the data stays, as after an uninstall. The egress log, its network and media switches, files on disk and what chats, projects and widgets say about it always stay. The id stays on the removed list, so a dev build doesn't reinstall itself; installing it from the store or a file brings it back. An erase that fails partway is finished by the owner deleting again with erase ticked, or at the next start. Tauri extensions_delete, POST /api/extensions/delete { id, eraseData? } (absent means false; Registry::delete in apps/desktop/src-tauri/src/registry.rs); deleteExtension(id, { uninstall, eraseData, studioProject }), isOwnBuild and studioProjectsFor in apps/desktop/src/lib/extensions.ts; not in /api/v1. Not extension surface; experimental. See Deleting your own build.

  • What extensions send out of the server, for its owners: the requests the server makes for an extension (host.net and host.git) are rows of the egress log (the core table egress_log, apps/desktop/src-tauri/src/egress.rs): each host.net request and redirect hop, each git connection (clone, fetch, a read's download; method git), and each attempt the server refused (not-declared, network-off, unpaid), with the extension, host, method, status, bytes out (URL path and query, headers and body; 0 for git) and in, whether it was a preview (a Studio preview or any client-supplied preview), and the time; never the path, query, headers, bodies or the person. Kept 30 days and at most 10,000 rows per extension; per-host daily totals (egress_daily), which the summary reads, are kept the full 30 days whatever the cap drops. Which extension a request is for is named by the app's window, so a person calling the routes directly can name any; the app's own git calls aren't logged, and git's bytesIn is approximate. Refusals made in the window, MCP calls, host.ai prompts, opened links and what leaves the frame (images, media, nested pages, WebRTC) are not logged. Read with server:settings through GET /api/egress/summary?days= (per host requests, refused, previewRequests, bytesOut, bytesIn, lastAt) and GET /api/egress/log?extension=&limit=&before= (IPC egress_call). A per-extension network switch for everyone on the server, the kv key shell/networkBlockedExtensions, guarded like media access (anyone may turn it off, turning it back on needs server:settings; a list that can't be read counts as off): while it is off the server refuses host.net requests and host.git add and fetch before connecting and reads don't download, and the window refuses net.fetch and MCP calls (the agent's too, on every call), through the existing "not allowed to reach" errors (... : network access is turned off for this extension on this server.); nothing else about the extension changes. host.git calls from the bridge now name the extension (extension, preview in the git request). POST /api/extensions/revoke-host ({ id, host }, IPC extensions_revoke_host, the same access as grant-host) takes back a host allowed for a net:* extension; like a person's "no", it is enforced only in the window, since the server lets net:* reach any host. Client: apps/desktop/src/lib/egress.ts; apps/desktop/src/lib/dataRisks.ts lists, from a manifest, how data could leave through it (level sandbox, declared or open, and sendsData). People read the log and turn the switch in Settings → Extensions → Data leaving; the store shows an extension's level and risks (Data and risks in its Technical details, a line under its heading in Extensions and the Marketplace) and confirms before installing one with sendsData. Not new extension surface; experimental. See What the server logs, and the network switch, What owners see before installing and, for git while the network is off, Git. WebRTC from any extension frame, not only widgets, is now listed in Known gaps in protocol 1.

  • @spacemix/ui grew into a design system, experimental: layout (Page, Section, Container, Stack, HStack, VStack, Grid, Toolbar, Divider, Spacer, ScrollArea, SplitView, ListDetail, SidebarLayout, useSidebarLayout, SidePanel, Panel, Inset, AspectRatio, Center, VisuallyHidden), actions (IconButton, ButtonGroup, SegmentedControl, Toggle, CopyButton, Link), forms (Field, useField, Label, Textarea, Checkbox, CheckboxGroup, RadioGroup, Radio, Switch, Slider, NumberInput, SearchField, PasswordInput, TagInput, FileDrop, PinInput, ColorSwatchPicker, Fieldset, FormSection, FormActions), pickers (Select, MultiSelect, Combobox, TimePicker, Calendar, DatePicker, DateRangePicker), data display (Badge, Tag, StatusDot, Avatar, AvatarGroup, Card, Stat, DescriptionList, Table, List, ListItem, Tree, Timeline, CodeBlock, InlineCode, Progress, ProgressCircle, Meter, Skeleton, Spinner, Highlight, RelativeTime, FileSize, NumberFormat, Board and formatRelativeTime, formatFileSize, formatNumber), charts (Sparkline, BarChart, LineChart, DonutChart, Heatmap, Gauge, ChartLegend, ChartTooltip), navigation (Tabs, Breadcrumbs, Pagination, paginationRange, NavList, Stepper, Accordion, Disclosure, BackLink, AnchorNav), feedback (Alert, Callout, Banner, toast, useToast, Toaster, ToastProvider, ErrorState, LoadingState, NoResults, PermissionDenied, OfflineState, InlineMessage, ConfirmInline), overlays (Tooltip, Popover, HoverCard, DropdownMenu, Dialog, Drawer, CommandMenu, CommandDialog) and the floating helpers (useFloating, computePosition, Portal, PortalContainer, useDismiss), with Size, Tone, useControllableState and every props type, in packages/ui/src/ (layout.tsx, components.tsx, forms.tsx, field.ts, popovers.tsx, floating.ts, host.ts, data.tsx, charts.tsx, navigation.tsx, feedback.tsx, types.ts, controllable.ts). Button gained size, loading, leftIcon, rightIcon, fullWidth and the "danger" variant (ButtonVariant, newly exported: stable, and may gain members); Input the size scale (a number is still the native width), invalid, leftIcon, rightIcon, leftAddon, rightAddon and htmlSize; PageHeader takes nodes for title and subtitle and a below slot; EmptyState takes nodes, an optional body, size, className, ref and the other <div> props; Kbd and Markdown take className (Markdown wraps its output in a <div> only when given one); ConfirmDialog takes a node as title. The new props are experimental; what these seven did before stays stable. On an older host the new exports are undefined: check typeof toast === "function" and the like first. Fourteen of the names are also lucide-react icons (Badge, BarChart, Calendar, Container, Gauge, Grid, LineChart, Link, List, Radio, Section, Table, Tag, Timeline); import the icons as *Icon. See UI kit and its component pages.

  • Design tokens for status and charts: --color-success, --color-warning, --color-info and their -soft tints, --color-danger-soft, the series colors --color-c1 to --color-c6 and --color-scrim (with --op-success, --op-success-soft, --op-warning, --op-warning-soft, --op-info, --op-info-soft, --op-danger-soft, --op-c1 to --op-c6 and --op-scrim) in packages/ui/src/tokens.css. Status colors are for text, icons and dots; fill with the -soft tint, not the solid. Also --color-sunk, --color-control-border, --color-accent-hover and --color-accent-text (with --op-sunk, --op-control-border, --op-accent-hover and --op-accent-text, set for light and dark): a recessed fill below surface (segmented-control tracks, chips), the edge of a text field or secondary button (3:1 or better on surface and bg), the accent a step darker for a hovered accent fill (accent-fg on it 4.5:1 or better), and accent text on accent-soft (4.5:1 or better on accent-soft over bg, surface and elevated, in both themes). --op-shadow (the shadow color as an RGB triplet, 70 50 30 in light and 2 6 12 in dark) and --op-shadow-strength (1 and 1.7, a multiplier for shadow alphas), which --shadow-pop is now built from. And --font-display (font-display), the display serif Newsreader then Georgia and the system serif, for page and view titles only (body text, controls and tables stay on --font-sans), with --font-display--font-variation-settings ("opsz" 72, Newsreader's display cut), which font-display applies with it; the frame loads Newsreader. See Design tokens.

  • Every extension frame mounts a fallback Toaster (apps/desktop/frame/main.tsx), so toast() shows without setup; a Toaster or ToastProvider the view mounts itself renders instead while it is mounted. Each frame therefore has an empty live region named "Notifications". See Toasts in an extension frame.

  • The widget frame's kit grew, within WIDGET_FRAME_VERSION 1: the helpers operator.ui.line, gauge, heatmap, meter, avatar and duration; the classes op-card, op-toolbar, op-clock, op-countdown, op-avatar, op-avatars, op-timeline, op-kv, op-chips, op-chip, op-segmented, op-field, op-select, op-textarea, op-checkbox, op-radio, op-switch, op-meter, op-gauge, op-line, op-line-x, op-heatmap, op-spinner and op-callout; the modifiers .info (on op-dot, op-badge, op-progress, op-callout), .ok, .warn and .danger on op-progress, op-button.danger, .sm and .icon, op-card.flat, op-clock.sm and .lg, op-avatar.sm and .lg, op-kv.left, op-legend.row and op-callout.accent, .ok, .warn, .danger; the hooks aria-pressed="true" on op-segmented and op-chip and data-theme on the root (:root[data-theme="dark"] matches in dark mode); and the variables --op-success, --op-warning, --op-info and the -soft tints (also of --op-danger), --cols and --level. The new helpers take a color only as var(--op-…) or a hex color. In code: apps/desktop/src-tauri/src/widget_frame.html, and the widget session's prompt in apps/desktop/src/lib/widgetTools.ts. See operator in the widget.

  • THEME_VARS (both WidgetFrames, packages/sdk/src/react.ts and apps/desktop/src/shell/widgets/WidgetFrame.tsx) also sends --op-danger-soft, --op-success, --op-success-soft, --op-warning, --op-warning-soft, --op-info and --op-info-soft into the widget frame; the frame has its own values for a parent that doesn't send them. See Messages.

  • Marketplace categories: ExtensionManifest.categories (up to 3 ExtensionCategory ids, no duplicates), with EXTENSION_CATEGORIES (the twelve ids and their labels, in the Marketplace's order), the ExtensionCategory union and MAX_EXTENSION_CATEGORIES (3) in packages/sdk/src/index.ts. defineExtension and install (check_local) refuse a value that isn't a list of strings, a duplicate or more than 3, and let ids they don't know through so the list can grow; publish (check_package) and the Studio's build also refuse an unknown id. A missing or empty list counts as other. Experimental, with the Marketplace: Listing.categories (always sent by SpaceMIX Hub, [] when none; optional for older Hubs), the search parameters category (other also finds the uncategorized) and price (free or paid), and GET /v1/registry/categories (RegistryCategories in packages/sdk/src/registry.ts: a count per category, zeros included, plus free and paid). See Categories and Registry.

  • The paid Marketplace in SpaceMIX Hub, experimental: Listing.price (ListingPrice, absent when free; forSale: false while the seller can't take payments) on search and listing responses, VersionInfo.paid and UpdateInfo.paid (a version published while the listing had a price, which it still has), and the types of the /v1/market/* routes (PriceModel, PriceInterval, PriceInput, MarketConfig, SellerStatus, DuplicatePurchase, CheckoutRequest, Purchase, EntitlementStatus, ServerEntitlement, ServerEntitlements) in packages/sdk/src/registry.ts. Money is in minor units, times in Unix seconds. Downloading a paid version answers 402 payment_required with listingId unless the server signs the request with its key and holds an entitlement for that server, or the listing's publisher is on that server (ServerEntitlement.kind publisher). Versions published while a listing was free stay free (a price set before any server but the publisher's installed the listing makes every version paid; clearing it makes every version free for good, so a later price only covers versions published from then on, or all of them on a listing still unshared), free listings download as before, and paid listings are never in GET /v1/registry/defaults. The registry's own 404s now carry code: "not_found" or code: "taken_down". A paid extension a server isn't entitled to (never bought there, or lapsed past the 7-day grace period) is turned off on that server whatever installed it, the licence following the id (apps/desktop/src-tauri/src/market.rs, registry.rs): it gets no frame, navigation, tools, Search or routes, and the server refuses its host.net requests, host.events.emit and claim, host.notifications.send, host.storage.set, collection create, update and delete, and host.fs changes with <Name> is turned off on this server until it's paid for.; reads and data are kept, and it runs again once renewed. Widget sources reading it get that sentence as their error, project_get marks its items turnedOff: true, and paid updates a server hasn't bought are held with PendingUpdate.paymentRequired: true. Finding and getting extensions moved from each server's Extensions page (no more Browse) to the Marketplace tab of the SpaceMIX Hub view (apps/desktop/src/shell/market/, src/lib/market.ts), which also has Purchases and Sell; an extension's page in Extensions no longer has Publish (it is in the Studio). See Marketplace, Turned off until it's paid for and Registry.

  • ViewApi.setFullscreen(on) and ViewApi.fullscreen() (bridge view.setFullscreen, no permission), experimental: a view asks the app to hide its navigation while it is showing, so it has the whole window's width; false gives it back. Held per frame: another view brings the navigation back, coming back re-applies it unless the user ended it, a reload drops it. On desktop widths the app keeps a slim bar of its own above the view with the extension's name and a Show navigation button; Escape on the app and the window's left edge lead out too. Once the user ends it, the frame's requests are ignored until they leave the view (or the extension is reloaded from the store or updated), and coming back doesn't bring it back by itself: the frame asks again on a user action. The frame isn't told. Older hosts don't have the method, so guard with typeof host.view.setFullscreen === "function". Experimental because the shell's ways out may still change. See Full screen.

  • MCP connections: remote MCP servers (Streamable HTTP) a whole SpaceMIX server connects to, added in Settings → MCP connections by people with server:settings, with sign-in by fixed headers or OAuth 2.1 (discovery, dynamic client registration or a manual client, PKCE, refresh). The server makes every request and keeps every secret; clients get header names and whether OAuth is connected, and people without server:settings only the address's origin. Their tools are <connection id>_<tool>, offered to the app's chats (Claude Code chats included), the server-side assistant and GET/POST /api/v1/tools (kind: "mcp", connectionId, run on the server, arguments not checked against the schema), never to host.tools or widgets, and never under an installed extension's namespace. New people-side permissions mcp:* and mcp:<id>; the seeded Members group gets mcp:*, once on existing servers. A tool is read-only only when an admin ticked it (readOnlyTools); every other one asks first in the chat unless the connection is switched to run without asking in Settings → Extensions → Approvals (kv shell/autoApproveMcp, server:settings only), and needs tools:write through the API. A hosted server (SPACEMIX_HOSTED, else Railway's variables) refuses private and local addresses unless SPACEMIX_MCP_ALLOW_PRIVATE=1. In code: apps/desktop/src-tauri/src/mcp.rs, mcp_oauth.rs, tools.rs, auth.rs, and src/lib/mcpConnections.ts, src/lib/tools.ts (connectionTools), src/shell/McpSettings.tsx. Not extension surface; experimental. See MCP connections.

  • SpaceMIX Hub models and prepaid credit: models SpaceMIX runs itself, offered to every server in Settings → Models next to its own connected models, with a name, a description and a price in euros per 1M input and output tokens, and paid from the server's SpaceMIX Hub credit, one balance per server shared by the team. A Hub model is a connected model that names only hubModel (apps/desktop/src/lib/models.ts, lib/ai.ts); the server runs it through SpaceMIX Hub with a request signed whole by its key (spacemix_auth::server::hub_request_input, purposes hub-models and credit), for the app's chats and the SpaceMIX API's assistant, and clients never see the upstream. The credit is topped up through Stripe Checkout (€5 to €1000), with optional auto-recharge from the saved card and an optional monthly cap; at zero, or at the cap, Hub models stop with 402 (credit_exhausted, monthly_cap_reached) and other models keep working. Each request reserves its most possible cost, at most 8 run per server, and the Hub keeps token counts and cost, never prompts or replies. New people-side permission server:hubModels (use Hub models, spend the credit, see it read-only); the seeded Members group gets it, once on existing servers. Topping up and the credit's settings take server:settings. The server relays GET /api/hub-models, GET /api/credit, GET /api/credit/ledger, PATCH /api/credit/settings, POST /api/credit/checkout and POST /api/credit/portal (hub_call over IPC). Hub admins keep the catalogue and adjust credit. In code: apps/desktop/src-tauri/src/hub_models.rs, ai.rs, assistant.rs, auth.rs; src/lib/hubModels.ts, src/shell/HubModelsSettings.tsx. Not extension surface; experimental, and untested against live Stripe. See SpaceMIX Hub models and credit.

  • Hosted-server billing in SpaceMIX Hub: servers the Hub creates on SpaceMIX Server Cloud need a card on the account (Stripe Checkout in setup mode, nothing charged), get a free trial on the account's first server (7 days by default; one per account and per card), and then pay by the hour from the server's SpaceMIX Hub credit wallet, the same one its Hub models use, with auto-recharge from the owner's card. An unpaid server is stopped after a grace period and deleted after a retention period, with in-app notices at each step. On such a server the credit ledger has a new kind hosting, and changing the credit's settings or opening Manage card from Settings → Models is refused with 409 managed_in_hub; top-ups there are one-off payments. In code: apps/desktop/src/shell/HubModelsSettings.tsx. Not extension surface; experimental, and untested against live Stripe and a live central. See On a server SpaceMIX Hub hosts.

  • Owners delete their own hosted servers: Delete server… in a hosted server's card menu in SpaceMIX Hub → Servers. An account that owes for hosting (a server unpaid or stopped, or a wallet below €0, deleted servers' included) can't create a billed server (402 balance_owed) until it pays; SpaceMIX Hub → Servers lists what's owed with Pay, and a deleted server's debt is paid at the exact amount, €0.50 at least. Hub admins can clear a deleted server's debt. Once a delete starts, the server's wallet makes no auto-recharges and its Hub model requests are refused with 403 server_deleting. Not extension surface; experimental, and untested against live Stripe and a live central. See On a server SpaceMIX Hub hosts.

  • One billing page per SpaceMIX ID account in SpaceMIX Hub, experimental: SpaceMIX Hub → Billing (#/hub/billing) has the account's one card, which pays for every wallet the account pays for (hosted servers' hours, Hub models, auto-recharge), each wallet's balance, this month's spend, limit and auto-recharge, handing a wallet to another account by email (accept, then confirm), and every transaction with its Stripe receipt and as CSV; Marketplace purchases are listed but stay paid to their developers. Each wallet has a payer: a hosted server's creator, or, for a server you run yourself, its owner once they choose Pay for this server from your Hub account in Settings → Models (the server's POST /api/credit/payer, owner only, which asks the Hub with the owner's own SpaceMIX ID; 403 not_connected when that account never signed in to the server) and accept it in SpaceMIX Hub. While a wallet has a payer, GET /api/credit answers managedInHub: true, Settings → Models shows the credit read-only, and the server's own settings and card portal are refused with 409 managed_in_hub (Billing for this server is managed in SpaceMIX Hub.). The Hub now prices hosted hours itself, from its own rates. In code: apps/desktop/src-tauri/src/hub_models.rs, server.rs; apps/desktop/src/lib/hubModels.ts, src/shell/HubModelsSettings.tsx. Server and Hub surface, not part of the extension contract. See Paying from a SpaceMIX Hub account.

  • host.ai on a SpaceMIX Hub model: when the person's default model is a SpaceMIX Hub model, host.ai.complete runs through SpaceMIX Hub and is billed to the server's credit. It needs server:hubModels; without it, host.ai.available() answers false and complete rejects with You don't have permission to use SpaceMIX Hub models on this server. Ask someone who manages members. (usableModel in apps/desktop/src/lib/extensionHost.ts). When the credit is used up or the monthly cap is reached, it rejects with the server's sentences from apps/desktop/src-tauri/src/hub_models.rs. See AI and Errors.

  • The SpaceMIX API: a server's public HTTP API under /api/v1, for scripts and other services, with API keys made in Settings → API (opk_<id>_<secret>, sent as Authorization: Bearer; only a SHA-256 is kept). A key acts as the account that made it, limited to eight scopes (tools, assistant, events and notifications, each :read and :write). Routes: GET me; GET tools and POST tools/<name> (collection tools run on the server, actions and MCP tools are relayed to one of the person's open SpaceMIX clients); the assistant on the server (assistant/chats, assistant/messages, ?stream=1 as NDJSON), in the same chats as the app; events/emit, events/list and GET events/stream (server-sent events); GET notifications and notifications/send. In code: apps/desktop/src-tauri/src/api.rs, api_keys.rs, tools.rs, tool_runs.rs, assistant.rs, and src/lib/toolRuns.ts, which runs relayed calls in the client. Not extension surface; experimental. See SpaceMIX API.

  • The SpaceMIX API's on/off switch: the API is off on a new server, and while it is off every /api/v1 request, GET me included, is answered 403 The SpaceMIX API is switched off on this server. before its key is looked at. Switching off also ends open events/stream connections and stops running assistant turns. Keys survive and can still be made and revoked. The switch is in Settings → API (the kv key shell/apiEnabled, on only for JSON true; enabled in apps/desktop/src-tauri/src/api.rs). See Switching the API on.

  • ProjectItem (in packages/sdk/src/index.ts): one thing inside an extension that a project links to, by extension, route, title, subtitle, icon and, for a collection's record, collection and recordId. Projects are a person's folders of chats and such items; a person adds items from Search results, so a collection route or a search action makes an extension's things addable. The assistant gets project_* tools (project_add_item links a collection record or a route it names), and a project chat's prompt lists its linked items with the <namespace>_<collection>_get tool that reads each record. An extension tool with the exact name of one of SpaceMIX's own tools is now left out of chats, with a notice. Experimental; no host.projects API yet. See Projects, Projects tools and Tool names.

  • WIDGET_FRAME_VERSION (1, in packages/sdk/src/widgets.ts) versions the widget frame that saved widgets run in, and the frame reports it as operator.version. Within version 1 the global operator, its members, the operator.ui helpers with their parameters and options, the op-* classes and modifiers, the attribute hooks, the --op-* variables and the messages to the frame only grow. See The widget contract.

  • The contract guard reads the widget frame into a new widgetFrame section of the snapshot (and versions.widgetFrame): the frame document, its CSP, the iframe's sandbox and referrer policy, THEME_VARS and the grid constants' values. A removal or change there is refused unless WIDGET_FRAME_VERSION moved; one to WIDGET_TOKEN_RE or the grid constants, which are SDK exports too, also needs PROTOCOL_VERSION or the SDK's breaking line to move; a new message from the frame to the parent counts as a change. A CSP or sandbox change that only tightens is recorded with npm run docs:update -- --csp-tightened.

  • The guard checks that the frame's spacemix.version is WIDGET_FRAME_VERSION, that the widget session's prompt names only what the frame has, and that the app's own WidgetFrame hosts the frame like the SDK's.

  • The reference now also names the chart classes (op-bars, op-hbars, op-hbar, op-spark, op-donut, op-legend), the modifiers and the --min, --h and --color properties, which the frame already had.

  • The widget data cache: what a widget's sources return is kept per viewer, in memory and in the core, and shown without fetching until it is Widget.refreshSeconds old. WidgetsApi.purge (bridge widgets.purge, in WIDGETS_METHODS and WIDGETS_VIEW_METHODS) drops it; WidgetUpdate.purged tells watchers to forget the data shown; WidgetStatus.fetching is set while the sources run. The method lists grew, which the contract guard counts as a changed value; the snapshot was rewritten for it. See The data cache.

  • ExtensionManifest.search (SearchDefinition, SearchInput, SearchResult) and CollectionDefinition.route: the app's Search finds things inside extensions, through a read-only search action or the collections, and opens them at their route. defineExtension checks both. See Being found in Search.

  • Design token --op-window-border: the edge of a window floating over the app. See UI.

  • WidgetSource.extension (WidgetExtension), WidgetStatus.missing and WidgetFrame's status prop: a widget whose extension was uninstalled says so, and which one. See Widget reference.

  • The records subscription channel ({ name }, needs nothing): one { kind, id, record? } per created, updated or deleted record of the extension's own collection, or null after a resync. useCollection uses it. See Frame protocol.

  • ListingPatch.name: a publisher can retitle a listing in the registry without publishing a new version; an empty string goes back to the manifest's name. See Registry.

Changed

  • The default SPACEMIX_HUB_URL is now https://spacemix.ai (it was http://127.0.0.1:1430). A server asks it nothing until someone uses a Hub feature; off means none. See SPACEMIX_HUB_URL.

  • A server's background Hub checks run once it uses the Hub. The update check, the install report, the purchase check and looking up a file's id before installing it run only on a server that uses the Hub (Registry::uses_hub in registry.rs, usesHub on GET /api/extensions/registry-status). Before that the server doesn't ask on its own: opening Extensions → Updates doesn't check, Check now does; a member's build isn't refused over a listing it never looked up; and a paid extension installed from a file runs unchecked, and can turn off within 10 minutes of first use. A licensed extension still expires with the Hub off, and renewing needs the Hub back on. See Registry, Marketplace and Permissions.

  • Members' builds are private until the owner approves them. A member's build runs only for people named on its exact id, its builder among them, until the owner approves it for the team (POST /api/extensions/team-approval, InstalledRecord.teamApproved). extension:* doesn't reach it, and neither does being the owner. Its changes aren't sent to others, its package can't be read by them, only the owner can name others on it or allow it a new host, a new id can't be one others already hold, and the rule stays on an uninstalled build while its builder is on record. Approving, revoking and a rebuild with a new hash each clear its netGrants and shell/autoApproveExtensions, and revoking and rebuilding clear the approval; the owner is told on each install and rebuild; removing the person's account turns their builds off; at most 10 per person. See How far a member's build reaches.

  • The security review of the widget frame's save message, added in frame 2, found that a frame could move what one viewer may read into a store everyone sees. So once any frame in a window has held data from a non-web tool, through a source or spacemix.call, every save from a frame there needs that viewer's OK for the saving widget's code, for spacemix.save and host.widgets.save alike, since frames in one window can pass data to each other. save stays in WIDGETS_VIEW_METHODS, as the one method there that writes, and nothing else that writes may join it. Saves are also limited to 120 a minute per person. See The viewer's OK.

  • host.net reaches only public addresses, checked on every redirect and pinned to what was checked, for previews and members' builds always and for every extension on a hosted server; only the owner can exempt a host (/api/extensions/net-exemptions). Refusals are logged as private-address. host.git applies the same rule: no redirects, and over http(s) the checked addresses are pinned on git 2.37 or later; over ssh it is only checked first, and git:// is refused. See Public addresses only.

  • A package's hash covers its canonical manifest too, with every field length-prefixed, under PACKAGE_FORMAT 2, so a Hub signature covers what a package asks for as well as its code. See The hash.

  • The dev.operator. id prefix from before the rename is refused on servers and on the Hub, for everyone.

  • The session cookie is Secure when SPACEMIX_PUBLIC_URL is https. Any OPERATOR_* setting still present is logged at startup, and OPERATOR_HOSTED stops the start, since ignoring it would turn off what it guards.

  • npm run docs:update now takes only a major SDK version for a breaking change, as the contract says; 0.x minors no longer count.

  • Breaking, approved by the owner: the product is now SpaceMIX, with no aliases for the old names. This breaks the extension and widget contracts at once, so WIDGET_FRAME_VERSION is 3, @spacemix/sdk is 0.3.0 and @spacemix/ui is 0.2.0. A widget's HTML and an extension's source must use the new names, and a package has to be rebuilt against them:

    • Packages: @operator/sdk, @operator/ui and their subpaths are @spacemix/sdk and @spacemix/ui, as host modules too. PACKAGE_FORMAT is 2, so install, publish and download refuse packages from before the rename, with a message that says to rebuild.
    • The widget frame's global: operator, operator.ui, operator.call and the rest are spacemix, spacemix.ui, spacemix.call and so on. The op-* classes and --op-* variables stay. Widget files are exported with the current frameVersion, and importing a file with a frameVersion below 3 is refused with a message that it's from before the rename. Saved widgets aren't checked; a one-off migration rewrites them.
    • Types and constants: OperatorHost is SpacemixHost, OperatorEvent is SpacemixEvent, OPERATOR_AUTHOR is SPACEMIX_AUTHOR (value "spacemix").
    • Extension ids: dev.operator.* is ai.spacemix.*, the reserved prefix included. The owner of the core's own tables and namespaces, operator, is spacemix.
    • Frames: the scheme and host operator-widget are spacemix-widget, the message source operator-page is spacemix-page, operator-widget-frame is spacemix-widget-frame.
    • Server: /.well-known/operator is /.well-known/spacemix; OPERATOR_* and VITE_OPERATOR_* are SPACEMIX_* and VITE_SPACEMIX_*; the headers Operator-Server-Key, -Time, -Nonce and -Signature are Spacemix-Server-*; the MCP server operator that agents get is spacemix, so its tools are mcp__spacemix__*; the signing contexts operator-server-*/v1 and operator-extension-package are spacemix-server-*/v1 and spacemix-extension-package, so signatures made before this change don't verify.
    • Storage: the database file operator.db is spacemix.db; the desktop app's data folder and keychain service dev.operator.app are ai.spacemix.app; the Hub's default data folder .operator-hub is .spacemix-hub. A one-off migration copies existing data to the new names and leaves the old files as the backup. Of the keychain it copies only the database key, so the desktop app signs in again.
    • Saved widgets: a one-off migration rewrites their calls to spacemix.* where it can be sure, parsing the code, and lists any it leaves. Widget files from before the rename, by kind "operator-widget" or a frameVersion below 3, can't be imported.
    • Versions: a one-off exception, recorded in the contract. The SDK stays 0.3.0 and PROTOCOL_VERSION stays 1, since nothing was in production. The 1.0.0 rule holds for later breaks.
  • Accepted by the owner along with the rename, and folded into the snapshot: changes from earlier commits that the contract check had flagged as breaking. DraftFields and WidgetDraft gained settings and defaultStore; WIDGET_FRAME_VERSION went from 1 to 2; WIDGETS_METHODS changed and WIDGETS_VIEW_METHODS gained save; the signatures of Button, ConfirmDialog, EmptyState, Input, Kbd, Markdown and PageHeader changed; and the widget frame gained the save message to its parent.

  • Creating now takes a permission, which changes what some members can do. On a new server server:extensions and server:widgets come with the Members group. On an existing server every default group and the group named Members get them once at start, and they stay off once taken off; nobody gets them directly, so a member outside those groups loses creating until granted, and a server:members holder outside them can't manage default members until they hold both. With both on by default, every default member can install from the registry, uninstall for the team, approve ordinary updates, change automatic updates and install the essentials (What every default member can do). Without server:widgets, creating, changing, deleting or duplicating a widget is refused with You don't have permission to create widgets on this server. (viewing, dashboards, widget_store_set, Refresh and Purge cache stay), and widget_guide, widget_create, widget_update and widget_delete aren't in a chat. Without server:extensions, creating extensions is refused with You don't have permission to create extensions on this server., there is no net.fetch with a preview and no core.studio group, and ids never installed need an exact extension:<id> grant, which extension:* isn't. studio_switch takes both. The Studio is closed with neither, and makes only what the person holds. host.widgets.deleteWidget now rejects without server:widgets and when the write fails (a widget already gone counts as deleted), and host.widgets.openStudio always resolves, without the permission showing a notice and starting no session. See Without these permissions.

  • Two contract wordings changed, by decision: an extension's data is also erased when the owner chooses erase while approving a listing that replaces a build made on this server, never for an id ever installed from SpaceMIX Hub or the Marketplace (What you may rely on); and an update that waits for a new permission means an update from the registry, so a local install applies at once, for its builder alone when it's someone's own build (Updates).

  • GET /v1/registry/updates pins what servers rely on: a version that doesn't parse sorts lowest, so <id>@0 gets the newest version back (Updates).

  • The /v1/registry routes only show approved versions, experimental: with version review on, a newly published version stays in_review until it passes. Search, GET /v1/registry/categories, a listing's latest, versions and readme, GET /v1/registry/updates, GET /v1/registry/defaults, reviews and install reports skip unapproved versions for everyone but the publisher and the Hub's admins; a listing with nothing approved answers 404 not_found to anyone else, and downloading an unapproved version answers 404 not_found whoever asks. Every version published before review was migrated to approved, so existing listings, installs and updates are unchanged. See Version review.

  • The assistant's tool text is leaner, without dropping a tool or an argument. The tools derived from a collection (collectionTools in apps/desktop/src/lib/tools.ts, collection_tools in apps/desktop/src-tauri/src/tools.rs) say what comes back: list reads "List <items>, last changed first." plus the collection's description and the shape of { total, items } (no paging; narrow with query or where), query names the fields it searches, and create says it returns the record with its id. The collection's description is sent once, on list, or on create when there is no list; a collection without create and update lists its fields' descriptions on list (on get without list). list's where now offers only the scalar fields (string, number, integer, boolean), by type and enum, without their descriptions or defaults; the core never matched an array or object field there, so no call that worked before stops working. The text of the project_* tools (apps/desktop/src/lib/projectTools.ts), tool_result_read, extension_sdk (the ui/* topics in one line) widget_create's refreshSeconds (the guidance moved to widget_guide's cache topic) and widget_update (its fields other than name and description say "As in widget_create.") is shorter too. Not contract surface and not breaking: tool names and results are unchanged, and every argument that worked before still works. For extension authors, Clear but lean gives the rules and budgets for tool text, and the checklist has an item for it; see Tools derived from a collection.

  • The widget and extension studios are one Studio (apps/desktop/src/shell/studio/Studio.tsx): it takes the whole window and has a tab per building session, kept per device, server and account (at most 12, apps/desktop/src/lib/studioTabs.ts); closing a tab deletes nothing, and sessions in hidden tabs keep running. host.widgets.openStudio opens its widget session as a tab there; what it opens is unchanged. studio_switch is a new core tool (apps/desktop/src/lib/studioSwitch.ts), offered in Studio chats and always asked, that moves a session to the other kind; its name is now one of the tool names SpaceMIX keeps, so an extension tool named studio_switch is left out of every chat. A package brought into the Studio (Import from file, Open in Studio) is refused unless its manifest id matches defineExtension's pattern. See The Studio.

  • SpaceMIX Hub reserves core. as well as ai.spacemix. by default (since the rename, dev.operator. too). The Hub's admins may publish reserved ids as well as its named publishers, and a new version of a listing under a reserved prefix (POST /v1/registry/extensions/{id}/versions) now also needs a publisher or admin (403 That id is reserved.), so a listing made before its prefix was reserved gets no more versions from anyone else. See Registry.

  • The light theme took the Firehut × Satama look, values only, no token renamed or removed (packages/ui/src/tokens.css): a limestone bg (#fbf8f3), warm sand borders (#e7dfd3, #d2c7b7), harbour-navy text (#1d2b3a, muted #5a6573, subtle #606975), a teal accent (#1f6f78, soft #e1efee), opaque -soft tints and darker status colors (success #256b42, warning #7a5200, info #2f5f8a, danger #b3261e, each 4.5:1 or better on surface, bg and its own -soft tint), and a navy scrim. The series colors --op-c2 to --op-c6 are now ochre #b07a1c, blue #4a7bb0, terracotta #c0582f, moss #4b8a5c and warm grey #8c8579, each 3:1 or better on surface and bg in light; the widget frame's own --op-c2 to --op-c6 and its light fallbacks for --op-success, --op-warning and --op-info moved with them (apps/desktop/src-tauri/src/widget_frame.html), values only, as the widget contract allows. ColorSwatchPicker's built-in names for c1 to c6 follow (Primary, Ochre, Blue, Terracotta, Moss, Gray). --font-sans is Figtree first (Inter Variable stays as the fallback for scripts outside Latin), --radius-sm and --radius-md are 7 and 10 px, and --shadow-pop is a warmer, softer drop shadow. The frame bundles Figtree and Newsreader, maps font-medium and font-semibold to Figtree's 550 and 650, and tints shadow-xs and shadow-sm warm brown in light and navy-black in dark. The dark theme took Satama's night-harbour navy, values only: bg #121c27, surface #1a2531, elevated #223040, sunk #15202b, opaque navy borders (#2a3846, #3a4a5a, the window edge #4c5d6e), control-border #76808c, limestone text (#ece7df, muted #a3acb7, subtle #8e98a3), the teal lifted to #6fc1c6 with accent-hover #5fb3b9, accent-soft #1f3a40 and accent-text #9ed8db, status colors danger #f2877d, success #74c69d, warning #e8b85a and info #8ab8e6 with opaque -soft tints (each 4.5:1 or better on surface, bg and its tint), and a navy scrim. --op-accent-fg is navy #0e1a22 in dark (8.51:1 on the accent), so text on the accent is dark there, not white. The same goes for bg-danger and the solid status fills, which are light in dark: put text-accent-fg on bg-accent and bg-danger (or use Button variant="danger") and text-surface on a solid status color, as Badge variant="solid" does, never a hard-coded white. Dark also has its own lifted series colors (--op-c2 to --op-c6: #d9a441, #7fa8d6, #e07a55, #79b58a, #a39c90, each 3:1 or better on bg, surface and elevated), so the docs' "one set for both themes" no longer holds; that wording was descriptive, not a promise. The widget frame's dark fallbacks for --op-success, --op-warning and --op-info, and its dark --op-c2 to --op-c6, moved with them, and its .op-switch knob turns --op-accent-fg when on. Switch's thumb is accent-fg when on (navy on the dark teal, white on the light one) and white when off. Kit visuals: SegmentedControl's pill shadow is warm brown; the keyboard focus ring is a 2px solid accent ring (danger on a danger button) with a 2px gap in the surface color, instead of the accent at 40%, in both themes (an inset solid ring on rows inside lists); text fields, Select, Textarea, TagInput, PinInput and secondary buttons have the control-border edge, and a focused field has a solid 2px accent edge (its border plus a 1px ring; danger when invalid); Button labels are semibold, primary has a top highlight and an accent-tinted shadow and turns accent-hover on hover, danger darkens on hover; SegmentedControl and pill Tabs sit in a sunk track; accent badges and other accent text on accent-soft use accent-text; PageHeader's title, EmptyState's title (size md) and Markdown's h1 and h2 use the display font.

  • The app took the SpaceMIX brand, values only, no token renamed or removed (packages/ui/src/tokens.css). Light: bg #f7f7f9, hover rgb(22 22 31 / 0.05), sunk #f0f0f4, borders #e2e2e8 and #cfcfd8, control-border #888896, the window edge #bdbdc8, ink text (#16161f, muted #5e5e6e, subtle #62626f), an indigo accent (#4a43c8, soft #ecebfa, accent-hover and accent-text #3d37a8), status colors danger #b02a5b, success #297350, warning #8a5e00 and info #36599e with -soft tints #f7e5ec, #e6f2ec, #f7efdc and #e6ecf7, and the scrim rgb(22 22 31 / 0.24). Dark: bg #111118, surface #191921, elevated #20202a, hover rgb(236 236 242 / 0.06), sunk #15151c, borders #2b2b36 and #3a3a48, control-border #6a6a7a, the window edge #4a4a5a, off-white text (#ececf2, muted #a2a2b2, subtle #9393a4), the accent lifted to #a49eff with accent-fg #111118, accent-soft #24223f, accent-hover #918af5 and accent-text #c3bfff, status colors danger #f2829f, success #6cc79b, warning #e2b65a and info #91aaf0 with -soft tints #3a1e29, #18302a, #33291a and #1d2640, and the scrim rgb(5 5 10 / 0.6). Each status color stays 4.5:1 or better on surface, bg and its own -soft tint. --op-shadow is 22 22 31 (ink) in light and 0 0 6 (near-black) in dark. --font-display is now the same Figtree stack as --font-sans, and --font-display--font-variation-settings is normal (it was "opsz" 72). The frame no longer bundles Newsreader: apps/desktop/src/fonts/fonts.css declares Figtree only, and Inter Variable stays the fallback for scripts outside Latin. This changes the promise in the package format's CSS section: the frame no longer provides Newsreader for font-display, so a package that names that family directly falls back. The kit's titles (PageHeader's, EmptyState's at size md, Markdown's h1 and h2) are at weight 650 and -0.02em tracking (they were 560 and -0.01em). The series colors --op-c2 to --op-c6 are #b8628f, #3e8e74, #b26a1e, #4f79b8 and #8a8a98 in light (3:1 or better on surface and bg) and #d98ab2, #6dbfa5, #e0a35e, #8fb0e8 and #9aa2b5 in dark (3:1 or better on bg, surface and elevated). Four series moved to another hue: c1 with the accent from teal to indigo, c2 from ochre to pink, c3 from blue to teal, c5 from moss green to blue. The widget frame's own --op-c2 to --op-c6 and its fallbacks for --op-success, --op-warning and --op-info took the same values, light and dark (apps/desktop/src-tauri/src/widget_frame.html). There is no WIDGET_FRAME_VERSION bump: the classes' CSS values, the series colors among them, may be tuned within a version, and the variables keep their names and role. Saved widgets aren't rebuilt, so one that chose a series for its color gets the new hue; for meaning, use the status colors. ColorSwatchPicker's built-in names for c1 to c6 follow (Primary, Pink, Teal, Amber, Blue, Gray).

  • The widget frame's ok and warn tones (op-dot, op-badge) and op-delta.up now use the status colors --op-success and --op-warning instead of the series colors --op-c2 and --op-c3: a darker green and amber in light mode, readable as text. The class names and what they mean are unchanged; only their CSS values moved, which the widget contract allows. spacemix.ui.donut now reads size and thickness as numbers (a missing or non-numeric one gets the default).

  • ConfirmDialog and ContextMenu close on Escape through the kit's dismiss stack (useDismiss), so a menu or popover open above a dialog closes alone, and render into a surrounding PortalContainer when there is one. ConfirmDialog labels itself with an id of its own (useId) instead of the fixed confirm-title, so two on one page don't collide, and its danger button is Button variant="danger". ContextMenu closes on a press outside the menu and its submenus through the same stack. Their props are unchanged. See Escape and the dismiss stack.

  • The stable @spacemix/ui components changed how they look and what they render, with nothing else changed for existing callers (packages/ui/src/components.tsx, ConfirmDialog.tsx, ContextMenu.tsx): Button's root is position: relative, and its content is wrapped in a <span class="contents"> only when loading, leftIcon or rightIcon is passed; a disabled Input looks disabled (cursor-not-allowed, muted), aria-invalid="true" gives it a danger border and a danger focus ring, and inside a Field it takes the field's id, aria-describedby, required and disabled; ConfirmDialog's backdrop uses --op-scrim (darker in dark mode), its title id comes from useId() and Escape goes through the dismiss stack (above); ContextMenu closes only the topmost layer on Escape; EmptyState renders no <p> for an empty or missing body. See UI kit.

  • requiresApproval (actions) and requireApproval (collections) are what the assistant in the SpaceMIX app asks about. Besides host.tools.call and widgets, the SpaceMIX API never asks: an API key with tools:write runs those tools, the key's scope being that decision. See Actions and ActionDefinition.

  • ActionContext.via is also set when an API key runs an action, directly or through the assistant on the server: { extension: "ai.spacemix.api", extensionName: "SpaceMIX API", label: <key name> }. Such a call runs in one of the person's open SpaceMIX windows. See ctx.via.

  • SpacemixEvent.source (and EventQuery.source) may be "api": an event a script sent with an API key, with a free snake_case type, an unchecked payload and payload.via = { apiKey }. It is in host.events.list and subscribe, not in catalog. Notifications sent with a key also have source: "api", no kind and no view. See API events and Notifications.

  • The assistant may take up to 25 model ↔ tool round-trips for one message, up from 8 (MAX_STEPS, in the app's chat loop apps/desktop/src/lib/chats.ts and the server-side assistant apps/desktop/src-tauri/src/assistant.rs). Past it the turn stops with the notice Stopped after 25 tool steps. Send another message to let it continue. The same cap holds for turns sent through POST /api/v1/assistant/chats/<id>/messages and POST /api/v1/assistant/messages. Not extension surface. See Limits.

  • The assistant gets its tools on demand. A chat's model calls carry SpaceMIX's always-there tools (the project_* tools, tools_load, tool_result_read; in a Studio chat studio_switch and the Studio's own groups) and the tool groups the chat has loaded; the system prompt lists the groups it can load, one line each (one per extension, per MCP connection, and core.widgets and core.studio). tools_load adds groups, which stay with the chat (chats.toolGroups, at most 12, the least recently used let go); calling a tool whose group isn't loaded loads it; a project chat preloads its linked extensions' groups. Tool results are stored whole up to 256 KB (1 MB per turn) instead of being cut at 12,000 characters, and the model gets a structured view of a long one and a digest of an earlier turn's, which keep each table's row count, columns and the key and id fields of every row; tool_result_read reads the rest. The widget guide moved out of widget_create's description into the new widget_guide tool, by topic. In apps/desktop/src/lib/toolGroups.ts, resultDigest.ts and chats.ts, and for the server-side assistant apps/desktop/src-tauri/src/assistant.rs, tools.rs and tool_results.rs. Every extension and MCP connection tool's name, schema, description and approval are unchanged; of SpaceMIX's own tools only widget_create's description changed. And host.tools.list and GET /api/v1/tools still list every tool. Not extension surface. See How the assistant gets its tools and What the model sees of tool results.

  • tools_load, tool_result_read and widget_guide are new core tools, so they join the tool names SpaceMIX keeps: an extension or MCP connection tool with one of these names is left out of the app's chats with a notice, and the server-side assistant leaves out tools named tools_load or tool_result_read. An extension whose id ends in .tools (action load), .tool (action result_read) or .tool-result (action read) would collide. Compatible, unless an extension already has a tool with one of these names. See Tool names.

  • Chats keep the tables their tools fetch as materials: each table of 2 or more objects in an extension's or MCP connection's result is kept in the chat (the per-user core tables chat_materials and chat_material_data), named after the tool's group and title, listed at the end of the system prompt (at most 15), and read with the new always-there core tools material_query (filter, sort, group and aggregate, pages of up to 500 rows within 12,000 characters), material_save (a query's answer as a new material) and material_refresh (runs the source tool again, only when it is read-only and doesn't ask). At most 50 per chat, 256 KB each. The chat header's Materials panel shows them as tables to copy or download and takes the person's own CSV or JSON; GET /api/v1/assistant/chats/<id> answers them as materials. The three names join the tool names SpaceMIX keeps, in the app and the server-side assistant; an extension whose id ends in .material (actions query, save, refresh) would collide. Compatible, unless an extension already has a tool with one of these names. In code: apps/desktop/src/lib/materialData.ts, materials.ts, apps/desktop/src-tauri/src/materials.rs, apps/desktop/src/shell/MaterialsPanel.tsx. See Materials.

  • Team Chat's message_sent event from a private channel no longer carries the message's text: its payload has only ids and its summary is A message in a private channel. See Team chat.

  • The extension id ai.spacemix.api is reserved for the SpaceMIX API's ctx.via: a server refuses to install a package with it, from SpaceMIX Hub or from a file (<id> is reserved for SpaceMIX's API.).

  • The ids SpaceMIX uses itself, core.extensions, core.files, core.git, core.studio_folder, core.widgets, core.studio and core.projects (CORE_NAMESPACES in apps/desktop/src-tauri/src/registry.rs), are refused at every install, from SpaceMIX Hub, a file or a dev build, with <id> is reserved for SpaceMIX itself., as ai.spacemix.api is (above, reserved_id). Other core.* ids install, but may be reserved later. SpaceMIX Hub reserves core. for publishing (its admins and named publishers excepted). See ExtensionManifest.

  • Changing the connected models (kv shell/models, shell/defaultModel, shell/studioDefaultModel, shell/provider, Settings → Models) takes server:settings; others get Only people who may change server settings can change the connected models. See Permissions.

  • Studio chats (widget and extension sessions) may have their own default model: Studio model in Settings → Models (kv shell/studioDefaultModel, a connected model's id; shown with two or more models). Unset or no longer connected, they use the chat default shell/defaultModel; a chat's pinned model wins over both. Ordinary chats, host.ai and the SpaceMIX API's assistant are unchanged. In apps/desktop/src/lib/models.ts and lib/chats.ts. Not extension surface. See Which model a session uses.

  • Switching the SpaceMIX API on or off (kv shell/apiEnabled, Settings → API) takes server:settings; others get Only people who may change server settings can switch the API on or off. See Switching the API on.

  • A host.storage.set (and so a useStored write) that the server refuses is rolled back: the host logs it, set still resolves, and the key's subscribers get the last value the server confirmed, or undefined (useStored shows initial). Before, the window kept the refused value. See Storage.

  • Who on a server may use an extension is now set per person. People hold extension:* (every extension) or extension:<id> (one), directly or through permission groups, and server:extensions, server:members and server:settings for managing extensions, people and the server; the owner has all of them (apps/desktop/src-tauri/src/auth.rs). A seeded Members group with extension:* holds every existing member and is picked for new invites, so nothing changes until someone narrows it. A person without access to an extension gets no navigation entry, frame, tools, Search results, routes, event consumer or change feed for it, and the server refuses its records, host.storage and host.net with You don't have access to <id>., for installed and uninstalled extensions alike, Studio previews included. Installing, updating, approving, skipping and uninstalling take server:extensions plus access to that extension instead of being the owner's; unsigned packages stay the owner's. Update notices go to the people who may use the extension (and, for a waiting update, who hold server:extensions). Without access to Dashboards, host.widgets reads no dashboards and dashboard changes reject with Dashboards isn't available to you.; a widget source whose extension is installed but unavailable gets { error: "<Name> isn't available to you." } rather than status.missing. No SDK surface changed; for the people who may use it, an extension sees no difference. Experimental. See Who can use an extension.

  • The app's address names the server first: #/@<server>/<extension id>/<route>, where @<server> is the server's shortcode, the first 16 characters of its id (HANDLE_LEN in apps/desktop/src/lib/servers.ts), the same for every member. A copied link opens on that server for everyone, switching to it if another one is active; a link to a server this device isn't connected to asks to connect or to open the view on the active server instead. 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, still finds the server but 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 (its id becomes its key's fingerprint, and the old one is kept as previousId), and stays the same after that, also when the server is renamed. Addresses without a shortcode, every older link, still open on the active server and get it added. Extensions never build shortcodes: the host writes them, and routes and host.view are unchanged. See View.

  • Reviewing an extension in the registry needs a connection the server confirmed: the reviewer must have connected to server, shown by the server's signed receipt at POST /v1/me/servers/{id}/connected, not merely have been issued a sign-in token for it. People who connected before count again after their next connect. See Registry.

  • host.widgets.addToDashboard rejects a widget that is still unsaved (never saved in the Studio), as the assistant's dashboard_add_widget tool already did; save it in the Studio first. See Widget reference.

  • host.widgets.openStudio({ widgetId }) on someone else's never-saved widget opens the Widgets gallery focused on it, where it is reviewed before it opens in the Studio, instead of opening the Studio directly. See Widget reference.

  • host.widgets.refresh and host.widgets.call reject a widget that is still unsaved with This widget isn't saved yet., and host.widgets.watch reports that as an error status with purged: true (also when a saved widget turns unsaved) and starts the widget once it's saved; host.widgets.purge and host.widgets.reportError resolve and do nothing for it: an unsaved widget runs only in its own Studio. A widget deleted while watched now stops and reports one error status, This widget no longer exists., with purged: true. See Widget reference.

  • A widget made without a refreshSeconds keeps its data for a day (86400 s) instead of 300 s; the viewers can still refresh it from its corner, and SpaceMIX's own data refreshes on every change anyway. widget_create and widget_update tell the assistant how fresh the sampled data is (freshness, the widget's refreshSeconds and a cacheNote), so it shortens the lifetime only for data that moves within the day. Widgets saved with the old 300 s default move to a day once per server.

  • The widget frame (its document, CSP, sandbox, messages, operator, operator.ui, classes and variables), the grid constants and the widget token format moved from experimental to stable. host.widgets, the widget types, the widget hooks and the layout helpers stay experimental. The widget frame's CSP and sandbox may be tightened for security without a version bump; loosening them never is additive. The list of experimental parts under Stability labels was brought up to date.

  • Widget.refreshSeconds is the data cache's lifetime: a widget fetches when it comes on screen with nothing fresh cached, and again when the cached data expires, instead of once a period from when it was shown. WidgetStatus.refreshedAt is when the data was fetched, which can be before the widget came on screen. A run in which a source fails leaves the data already shown up and only changes the status. See watch.

  • Collections are stored one record per row, in their own table (<extension id>.<collection>, e.g. ai.spacemix.tasks.items), and update merges its patch on the server, so two people changing different fields of the same record both land. A collection has no size limit as a whole; the 2 MB request limit from a browser applies per record. The stored channel no longer carries collections. See Collections.

  • host.storage.set rejects a value larger than 64 KB as JSON, and nothing is written (before, a value over the browser's ~2 MB request limit silently failed to persist, and the limit wasn't documented). host.storage is for settings and small state; records belong in collections. See Storage.

  • Collections conversations, messages and prefs are reserved under the extension id ai.spacemix.chat for the core's team chat tables (ai.spacemix.chat.conversations, .messages, .prefs); declaring or using one fails with ai.spacemix.chat / <name> is reserved for the team chat. No published extension is affected. See Collections.

  • host.fs reaches one folder per server, the files folder (always files in the server's data directory). roots() always returns exactly that one root, id "server", kind "dir"; every other method takes that id as before. See Files.

Removed

  • FilesApi.canPick, FilesApi.pick and FilesApi.removeRoot, and the bridge methods fs.canPick, fs.pick and fs.removeRoot: nothing is added from the computer any more, so there is nothing to pick or remove. Use the root from roots(). See Files.

Fixed

  • Widgets API gave the widget iframe's sandbox as allow-scripts; it is allow-scripts allow-forms, as WidgetFrame has always set it.

Security

  • An installed extension's code is for those who may use it: without extension:<id>, reading its package returns only its manifest, readme, hash, format and build time, and packages can't be searched by anyone but the owner (apps/desktop/src-tauri/src/records.rs). See Who can use an extension.

  • host.notifications.send refuses a source that is an id reserved for SpaceMIX, or a core.* id that isn't an installed extension's, with "<id>" is reserved for SpaceMIX itself, so nothing can be sent from it., so no member can send a notice in the server's own voice (server_voice in apps/desktop/src-tauri/src/registry.rs, send in notifications.rs). See Notifications.

  • Frame documents sandbox themselves over HTTP. /api/ext-frame, /api/widget-frame and /api/ext-page also send a second policy, Content-Security-Policy: sandbox allow-scripts allow-forms (sandboxed in apps/desktop/src-tauri/src/server.rs), because the server now serves the app's page on the same origin. Opened directly, or embedded without the attribute, they don't run as that origin. The widget frame's own CSP is unchanged, this only tightens, and no version moves. The desktop app's spacemix-widget: scheme doesn't send it. See The document and Content Security Policy.

  • The extensions and settings kv namespaces are read-only, and under widgets only the flags started and cacheDaily can be written, so plain kv can't become an install or a widget (READ_ONLY in apps/desktop/src-tauri/src/storage.rs, check_kv_write in server.rs). What the registry kept in kv is imported only on a server that never had its tables; rows found there later are moved aside unread. Under a core.* id nothing holds, writes are refused except for the owner (check_core_write in auth.rs).

  • Once at upgrade every installed package is checked against its hash. One that fails doesn't run, the owner is notified, and installing it again or uninstalling it fixes it (verify_installed_packages in registry.rs). See The check at upgrade.

  • Every key in the shell kv namespace is server-wide, and any signed-in member could write the ones not gated one by one, so a key added later was open by default. Writing any shell key now takes server:settings; others get the key's own message (models, API switch, approvals) or Only people who may change server settings can change this server setting. (check_kv_write in apps/desktop/src-tauri/src/server.rs). The sidebar's extension order is no longer one of them: it is each person's own, in the per-user kv namespace personal (personal/extensionOrder), and someone who hasn't moved anything yet starts from the old server-wide shell/extensionOrder, which is now only read. The one exception is shell/mediaBlockedExtensions: anyone with access may still turn the camera, microphone and screen off for an extension, but the server refuses a write without server:settings that removes an id (Only people who may change server settings can turn the camera, microphone and screen back on for an extension.) or isn't a list of at most 1,000 valid extension ids in at most 64 KB (The extensions turned off from the camera, microphone and screen must be a list of at most 1,000 extension ids., for everyone), checked against the stored list under the same lock as the write. Settings and the Studio show the switch disabled once it's off. These lists (and the approvals) now change one id at a time against what the server has: the client's kv write names the value it replaces, the server refuses it with 409 This setting changed while you were saving it. Try again. if another is stored, and the client reads again and retries once, so two people's changes at once no longer undo each other. See Permissions and Media.

  • Which extensions' gated tools run without asking (kv shell/autoApproveExtensions, Settings → Extensions → Approvals) is server-wide, so it applies to everyone, and any signed-in member could change it. It now takes server:settings, like shell/autoApproveMcp; others get Only people who may change server settings can change which extensions run without asking. (check_kv_write in apps/desktop/src-tauri/src/server.rs), and Settings shows the switches read-only to them. See Permissions.

  • The installed extensions' records (approved permissions, net:* grants, packages, held updates) are no longer writable by clients: the records API refuses the core's installed_extensions, extension_packages and extension_updates tables with <table> changes only through the extension commands., and a net:* grant is added only through POST /api/extensions/grant-host, by someone who may use the extension. A client-supplied Studio preview still stands in for the approved permissions on host.net; see question 22 in Open questions before we freeze.

  • A widget could navigate its frame (location.href = …, or form.submit(), which allow-forms let through) inside an extension frame that allows frame-src http: https:, and the page it landed on was still sent the widget's data and could ask for calls. The widget frame's CSP adds form-action 'none'; base-uri 'none'. Both WidgetFrames render only after the frame's first load, treat any later load as a navigation (stop posting, ignore its messages, take the frame down, report the error) and drop messages whose origin isn't "null". A widget that navigates still gets out whatever it put in the URL. See The document.

Protocol 1 / SDK 0.2.0 (2026-10-20): baseline

The first documented contract. Everything in these docs as of this date is the baseline; later entries are measured against it.

Versions at this baseline:

PROTOCOL_VERSION 1
PACKAGE_FORMAT 1
@operator/sdk (as it was called then) 0.2.0
@operator/ui (as it was called then) 0.1.0
Registry API /v1/registry
Host modules React 19, lucide-react 1.x, motion 14

What the baseline consists of:

  • Manifest: ExtensionManifest with id, name, version, description, icon, order, permissions, collections, actions, events, notifications, entry; CollectionDefinition, ActionDefinition, EventDefinition, NotificationKind, JSONSchema with options. See Manifest.
  • Permissions: storage, fs, git, chat, widgets, widgets:view, events, tools, ai:invoke, camera, microphone, screen, net:<host>, net:*.<domain>, net:*, data:<ns>:read, data:<ns>:write. See Permissions.
  • Package format 1: ExtensionPackage, the hash over id, version, JS and CSS, HOST_MODULES, __opExtension. See Package format.
  • Host API: host.storage, host.collection, host.fs, host.git, host.chat, host.net, host.widgets, host.notifications, host.events, host.tools, host.ai, host.mcp, host.shell, host.view, host.env, host.manifest; actions with ActionContext; the module's mcp servers. See Host API.
  • Frame protocol 1: the HostToFrame and FrameToHost messages, the bridge methods and subscription channels, the sandbox and CSP. See Frame protocol.
  • React hooks, UI kit, design tokens and widgets. See React hooks, UI kit, Widget reference.
  • Registry API /v1/registry/* and package signing. See Registry.

Experimental at the baseline: camera, microphone and screen capture (camera, microphone, screen, media.*, MediaWire).

Documented as they are, not yet settled: storage isn't checked; data:<ns>:* grants nothing; order and entry are ignored. See Known gaps and Open questions.

<!-- Template for the next entry: ## Protocol 1 / SDK 0.3.0 (YYYY-MM-DD) ### Added - `host.example.method` (`example` permission): what it does. [Reference](reference/host/example.md) ### Changed - Additive behavior changes only within protocol 1. ### Deprecated - `oldThing`: use `newThing`. Works until at least YYYY-MM-DD (12 months) and in every protocol 1 host. ### Fixed - What now matches the docs. -->

This page as markdown · All pages as one file