Repository navigation
rutis v0.19.0
rutis 0.19.0
0.19.0 is for host owners (#694): you can call a service in a running host from the command line, install plugins with rutis-host add, and let plugins add and remove rows through the service loader, written back to rutis.json. Remote runtimes, devices and nodes are all connection rows now (rutis-host/dial, rutis-host/listen), with one session plugin behind them (remote connections: one session plugin), and the platform drops interfaces nothing uses (platform cleanup). This release has breaking changes, and the host, every language runtime and every SDK must be upgraded together: 0.19 refuses 0.18 and earlier at the handshake. Read migrating to 0.19 before upgrading.
Upgrade in this order: move the host, the language runtimes and the SDKs to 0.19 together; rebuild Go and Swift binaries built with an older SDK against the 0.19 SDK; then run rutis-host check with 0.19, which lists the fields and plugin names it no longer knows.
Breaking changes
Each item says what to change; details and examples are in migrating to 0.19.
-
Session protocol 4: the host, runtimes and SDKs upgrade together (#695, #849; #814, #815, #817, #818, #824, #826). Sessions keep only the endpoint format; each end always reports its own id. 0.19 refuses hosts, runtimes, nodes and SDKs of 0.18 and earlier at the handshake and says which end to upgrade, for example
incompatible session: the far end speaks protocol 2, this side 4: upgrade the far endandthis endpoint speaks rutis.4, the dialer offered rutis.3: upgrade the dialer. A 0.18 host starting a 0.19 local runtime makes the runtime stop before the handshake:a local channel needs --id <endpoint>: fd:3; a host older than rutis 0.19 started this runtime: upgrade the host.- What to change: upgrade the host, Node, Bun, Python, Go, Swift and Kotlin to 0.19 together; rebuild Go and Swift binaries with the 0.19 SDK.
- If you start runtime processes yourself: local channels (
fd:3, a socket path,tcp:) also take--id <name>; the Node and Bun runtimes'--formatis removed;rutisProtocolinpackage.jsonis 4; the WebSocket subprotocol isrutis.4; Go'sadvanced.ServeConn(conn, defs...)becomesadvanced.ServeConn(conn, id, defs...).
-
Remote runtimes and devices are connection rows (#695, #870, #872).
runtimes.remoteis removed, with no conversion; a remote runtime is arutis-host/dialrow (rutis dials) or arutis-host/listenrow (the far end dials in), and a plugin running on the far side is a row<connection row>:<plugin>:{ "id": "gpu", "name": "rutis-host/dial", "config": { "address": "wss://gpu.example.com:7443/rutis" } }, { "id": "embedder", "name": "gpu:embedder" }- A rutis.json with
runtimes.remotegets the 0.18 unknown-field error, with no dedicated hint:rutis-host: rutis.json: unknown fieldremote, expected one of …. - The row id names the connection: the runtime's
--id, the token's name (RUTIS_TOKEN_<row id>) and the output prefix all use it. A runtime that used to dial in and let rutis decide its plugins now listens, and rutis dials it withrutis-host/dial. - Many devices (formerly
listen+instancesand aninstancedgroup): onerutis-host/listenrow; the Kotlin and Swift apps on the devices install their own plugins, with their config inRutisApp(configs: …), and once connected announce the services they provide, registered as<device id>:<plugin>. Rows the host ran once per device (such aspy:coach) are no longer supported: move them onto the device, or have a plugin on the host add a row per device throughloaderon therutis/serviceevent (example in Swift apps). - On
rutis-host/listen, a new connection with the same id replaces the old one: the old connection's remote plugins are all unloaded first, then the old connection is closed with code 4002. - A missing plugin fails only its row (#696, #768), checked again the next time the far end connects:
embedder: unresolved: entry "embedder" rejected: runtime gpu: this connection does not contain plugin embedder. Rust embedders matchingLoaderError::NotFoundfor this case userutis_loader::report::Unavailable::is(&error).
- A rutis.json with
-
Nodes are connection rows (#695, #883).
rutis-bridge/peerrows andpeer:<peer>/<plugin>rows are removed, with no conversion; one node writesrutis-host/dial, the otherrutis-host/listen(connecting nodes). A row still namingrutis-bridge/peerfails as an unknown plugin:office (rutis-bridge/peer): no plugin named "rutis-bridge/peer".export,import,host,rows,peer,require,declare,transportandidentityare no longer written: services are visible on both sides, events are one bus, and the far end's id comes from the handshake. The same service name follows the kernel's rule, the later registration is refused:office:weather: weather is provided here by row weather: not registered from office. To keep a service from the far side, useisolateon the row providing it.- Running a plugin on another node: formerly
host: true+rows: true+ a rowpeer:office/scanner; now a rowoffice:scanner, with nothing to open on the far side. - Giving out a token lets the far end run any plugin it can resolve on this node: connect only to nodes you trust. Services received over one connection reach a third node over another (formerly one hop only).
@arcships/rutis-runtime/bridge(a Cordis app as a node:Link,Export,Import,Host,Events) is removed: a Cordis app joins rutis by running its plugins in the Node runtime.
-
The host side reads only
RUTIS_TOKEN_<name>(#822). It no longer falls back to the sharedRUTIS_TOKEN; the runtime side'sRUTIS_TOKENis unchanged.<name>is the connection row's id, upper case, with-written as_.- What to change: a host that set only
RUTIS_TOKENsets one per connection row. Unchanged, arutis-host/listenrow fails withphone: set RUTIS_TOKEN_PHONE: the token the far ends present when they connect, and arutis-host/dialrow is refused by the far end and retries every 30 seconds:office: disconnected (auth-rejected: …); retrying in 30s.
- What to change: a host that set only
-
Connection output changed. Connection status lines start with the connection row's id and use only
connectedanddisconnected, with the reason in parentheses (formerlyruntime <name>: link …and<row id>: link connected/link downand so on):gpu: connected gpu: disconnected (gpu.example.com:7443: Connection refused); retrying in 2.1s gpu: disconnected (incompatible: this endpoint speaks rutis.3, the dialer offered rutis.4: upgrade this endpoint (PyPI rutis)); stopped phone: connected phone-1 phone: disconnected phone-1 (replaced by a new connection)rutis-host statushas one line per connection row underconnections:: a dial row saysconnected/disconnected, a listen row lists the ids connected (none connectedwhen there are none). Scripts readingrun's output follow the new format. -
Go and Swift row names keep only the language prefix (#876).
go-<binary>:<plugin>andswift-<binary>:<plugin>are removed; writego:<plugin>andswift:<plugin>. Arutis.jsonstill using the old form fails when read, with the new form in the message. When two binaries have a plugin of the same name, that row fails, naming both files. -
Every language's test tool runs plugins on a real host (#875, #878, #894, #895, #881, #882, #885, #899).
@arcships/rutis/testing,rutis.testing,rutistest,RutisTestand the Kotlin test tool run the plugin under test as a row ofrutis-host test:rutis-hostmust be onPATH, or its path given inRUTIS_HOST(projects made byrutis-host newalready have it). What a test sees is what the host does: a service name already provided, a config that does not pass and the like fail in the test, as in a real host.- The test tools have no scopes any more:
scope,scopes,strict,deadline,runtimeand similar options are removed (Go'sInScope,InChain,RuntimeName, Swift'sRutisTest.scopeandruntimeName:, Kotlin'sload(scope:)andload(runtime:), and so on); the row id isid/row:, and isolation is the sameisolateas inrutis.json. A load failure reads as the line the host writes for the row, such asweather: config: city is required;reportedis a method youawait, each item being the line the host printed. - TypeScript / Bun: add
@arcships/rutis-runtime(@arcships/rutis-bununder Bun) and@arcships/rutis-hostto the dev dependencies; the plugin under test must be its module's default export. Python:rutis.configis removed. Kotlin: the test tool is a separate artifact,io.github.arcships:rutis-testing. - Config is validated and filled with defaults only in the host; the SDKs only decode. Plugins an app installs itself (
RutisApp) are not validated by the host: missing keys take the defaults written in the type, and a missing required key or a wrong type fails with a line such asconfig: <key> is required. - Every event goes through the host, even when all the listeners are in the same process: a plugin looking at its listeners' results after an
emitwaits for one round trip through the host; in Go,ctx.Emitafter the session ended fails withthe host disconnected; in Kotlin, a synchronousbailon the Android main thread is always refused. If you implement a runtime, drop your handling ofevents.elsewhere(the host no longer sends it, #908). - What to change in each language: the migration guide's TypeScript and Bun, Python, Go, Swift and Kotlin.
- The test tools have no scopes any more:
-
The Kotlin SDK is used from source (#893). It is not published to Maven: fetch this repository's tag
v0.19.0, bring it in withincludeBuild("../rutis/kotlin/rutis"), and write the dependencies without a version (implementation("io.github.arcships:rutis"),ksp("io.github.arcships:rutis-ksp")); see the Kotlin app guide. -
Python 3.12 or later (#860). Python 3.10 and 3.11 are no longer supported.
-
SDK roots keep only the names plugin authors use (#692; #762, #763, #769, #775, #777, #778; old names removed in #819, #821, #835, #827, #829). The other names move to advanced:
@arcships/rutis/advanced,rutis.advanced,github.com/arcships/rutis/go/rutis/advanced,Rutis.Advanced,arcships.rutis.advanced; what macro- and KSP-generated code uses is inRutis._Generatedandarcships.rutis.generated. The old locations are gone: using them is a not-found error at compile or import time.- What to change: imports only, by the table in the migration guide.
definePlugin/define_plugin/Define/Rutis.defineand the methods onctxare unchanged; the plugin API version is unchanged. - Kotlin:
rutis-kspmust be the SDK's version; precompiled Kotlin plugin libraries are recompiled against the 0.19 SDK. - Python: plugins and the runtime share the host environment's
rutis, so they upgrade with the host.
- What to change: imports only, by the table in the migration guide.
-
Rust: the connection, session and local runtime API (#833, #843, #834, #849, #870, #872, #880, #883). A local language runtime is now, like a remote one, the far end of a session. The full table is in the migration guide under "Rust embedding"; the main changes:
Transport,Dial,transport_keyand the*Plugin/*Transporttypes are removed;websocket::dial,websocket::listen,pipe::spawnandmemory::pairgive aChanneldirectly. A connection of your own is a connection plugin callingSession::new(channel)(orSession::handshake(&ctx, channel).awaitfirst).LinkPlugin,PeerPlugin,ExportPlugin,ImportPlugin,HostPlugin,AccessPointPlugin, theIdentity,AdmissionandRegistrationfamilies, and rutis-loader'speerfeature are removed.LocalRuntimeandRuntimePluginare removed: a local runtime isrutis_host::connect::SpawnPlugin::new(name, launcher, anchor)(the pluginrutis-host/spawn),launcherbeingrutis_host::languages::node::launcher(&package)and so on; rutis-bridge carries no language any more, and its featuresnode,python,go,bun,swiftandkotlinare removed; the runtime's state is inRuntimeStates.RuntimeResolverbecomes onerutis_loader::runtime::SessionResolvershared by all runtimes; Rust no longer resolves npm names, the Node runtime does.Closer::replaced()/rejected(r)/close(&str)becomeclose(Close::…);ChannelInfois removed;Connection::open(channel, dispatch, endpoint);session::PROTOCOL,FormatandLinkConfigare removed andENDPOINT_PROTOCOLis 4;Embedding.transportsandEmbedding.identityare removed; an embedder mounting aSessionitself providesrutis_bridge::LocalId(id)at the root.rutis_host::control::servetakes one more argument after theLoader, aReport, obtained withHost::status_report().
-
Platform cleanup: Rust APIs without users are removed (#694; #832, #845, #848, #840, #837, #839, #836, #838, #841, #820, #880). No compatibility layer: what was removed is a compile error; the full table is in the migration guide under "Platform cleanup". The main ones:
- Kernel:
ctx.plugin_from→ implementPluginFactoryand usectx.plugin_with;waterfall_sync→waterfallor a synchronousbail; service interceptors, thecheck()gate,FiberView::effects(),EventBus::observe_dispatch,take_cleanup_errors()and theanyhowfeature are removed; config validation isrutis::config::check(schema, config). - Call limits and service lists (
call_limit,kill_on_timeout,allowed_services, the error codetimeout) are removed: callers set their own time limits, and the host decides which services a plugin can use. - Loader:
set_overlay/overlays()removed;waiting_for→waits;locate→row;schema_of→resolve(name).await?.schema;ServiceCatalog::share_by_name()andshare_registered_only()removed;status::RowState→report::EntryStatus,report::RowStaterenamedRowEventState; the Go and SwiftGo*/Swift*types merge intoruntime::binary::*<Go|Swift>; the loader no longer restarts crashed Go/Swift runtimes (backoff,RestartPolicy,superviseremoved): the restart policy is rutis-host'sruntimes.<key>.restart. - The generator moves from rutis-bridge to the new crate
rutis-types(#844):rutis_bridge::build::Exports→rutis_types::Exports, and the build-dependencyrutis-bridge = { features = ["exports"] }becomesrutis-types; usage is the same. Error types outside rutis namedErrorget generated types named after their module (IoErrorThrown,AnyhowErrorThrown, #862). rutis_bridge::cordis::build::rutis_pluginandcordis::serverare removed (a Cordis host mounting Rust plugins is no longer supported, #836).- Also:
rutis_loader::internalfolded away (#887),*_keyreplaced byKeyand*_at(#898), language knowledge moved out of rutis-bridge (#906), the bridge no longer declaring old capabilities (#888), andevents.elsewhereandDispatch::arrived/repliedremoved (#908): the table is in the migration guide under "Platform cleanup".
- Kernel:
-
The wire error name
CordisErrorbecomesError(#825). Arutis::Errorthrown to another language is namedError; the generated typeCordisErrorThrownisErrorThrown. Code that tests for the nameCordisErrorchanges. -
Tools:
rutis-devis removed; userutis-host dev(#820).rutis-migrateis no longer released; the 0.17 migration still works withcargo install rutis-migrate --version 0.18.0(#816).rutis-host go addis removed; userutis-host add <module>@<version>(#851). -
The service name
loaderis taken (#185, #842). A host usingLoaderPlugin(rutis-host included) provides a service namedloader; a row providing its ownloaderfails with the same-name error (service loader is already provided by …: row <row> cannot provide it too): rename its service. -
A runtime's rows are isolated by
isolatein rutis too (#896). Rows of Node, Bun, Python, Go, Swift and Kotlin plugins behave like Rust rows: for a name inisolatethey see only the providers inside the isolation, not those outside it, the host's services included; services they provide under those names stay inside the isolation. In 0.18 an isolated row could use a same-named service provided outside (the host's included); in 0.19 it waits for a provider inside. To use the service from outside, take the name out of the row'sisolate. -
Go plugins: binaries built before 0.18 are rebuilt with the 0.18 SDK or later (the
requiredexception is removed).
New features
rutis-host call(#670, #772, #804):rutis-host call [--config <rutis.json | dir>] <service>.<method> [args…]calls a service in a runningrunordevfrom another terminal and prints the result as JSON. Each argument is read as JSON. It uses the same user-only socket asstatus. Not available on Windows.- Installing plugins (#691, #805, #850):
rutis-host add <reference>(npm:,pypi:, a Go module path, a local directory,.tgz,.whlor binary) installs the plugin and whatever its runtime lacks, and writes the rows and theinstalledfield; it checks the new rows before writing, and exits with 1 leaving the file alone when they do not resolve.rutis-host removeandrutis-host upgraderemove and upgrade by the recorded source. You do not need to know the plugin's language. - Plugins add and remove rows through the service
loader, andrunwrites them back torutis.json(#185, #842, #852, #857): a plugin in any language thatinjects["loader"]can callcreate,reload,removeandstatus, like Cordis'sctx.loader; failures throw anErrorwhosedatais{row}.runwrites the rows added and removed back torutis.json, changing onlyrowsand keeping the other fields and the key order; when the file cannot be written the row is added anyway and the error says<row>: added, but rutis.json could not be written: <reason>.devwrites no file:createandremovegetthis host keeps no editable configuration, so rows cannot be added or removed. See managing plugins withloader. - Connection plugins in any language (#870): the session plugin
rutis-bridge/sessionprovides the servicesessions, whoseopen(far)turns a connection you built into a session; in Rust,Session::new(channel). rutis-host comes withrutis-host/spawn,rutis-host/dialandrutis-host/listen. rutis-host test(#875, #878):rutis-host test <plugin> -- <runtime command…> <project>orrutis-host test <plugin> --channel <channel>, for the SDKs' test tools: it starts a host with no rows of its own, loads the plugin driving the test in a real runtime, and the servicerutis-host/test(load,update,unload,reported) lets it load the plugins under test in that runtime. Plugin authors do not run it themselves. See running plugins under test.- Every subcommand takes
--help/-h(#856):rutis-host <command> --helpprints that command's usage and exits with 0, doing nothing else.run --helpused to take--helpas the configuration file, andadd --helpas a plugin name. rutis-host devprints the services (#794, #847, #871): once every row is running, waiting or failed,rutis-host dev: services: forecast (weather), llm (llm); again whenever the services change.- Test tools listen to events (#770): the TypeScript / Bun and Python test tools gain
on(name, listener), receiving what the plugin emits and what the test emits itself, by the same rules as Go'sloaded.On. - Python types from Rust services (#684, #798, #810):
rutis-host types --python <file>, and.python(path)/.declared_python(path, python)onrutis_types::Exports. They generatetyping.Protocol,TypedDictand friends from#[rutis::service], so pyright finds wrong calls to host services while you write a Python plugin. - Guides rewritten by layer (#671; #854, #858, #861, #863, #864, #866, #867, #868, #869): the plugin guides of the six languages follow the same eight-step short path, with the advanced material moved into "Plugin API"; the "rutis-host" guide opens for people assembling plugins; a new guide, "A host open to plugins". The published crates' doc comments are in English, and rutis-loader's public paths are tidied (#764).
Fixes
- A row's
rutis/rowfollowing uses one listener perLoader(#806, #808, thanks to @yyhhyyyyyy). Each row used to register a listener at the root, so with many rows every state change ran every row's callback, and queued deliveries held a lot of memory. - After a
LoaderPluginrestart, rows load again with the enabled state they had (#812, #828). Every row used to come back disabled, and that was written into the editable layer. rutis-host devprints the services line again when a runtime provides its services after the row is ready (#847).- In one Go runtime, a row calling another row's service with a function in an argument of type
anyno longer fails to decode; it gets a*advanced.Function, as across processes (#884). In one Swift runtime, a@RutisServiceobject passed to a parameter typed as a@RutisClientprotocol becomes a client forwarding to the object, as across processes (#886). - When the filter of an
emita runtime sends through the host fails, it is reported asFilterFailed, like the kernel's own filter failures, so the host's error receiver can tell which row it was (#879). Rust code recognizing this failure byPluginFailedmatchesFilterFailedinstead; the printed text is unchanged.
Compatibility
- 0.19 cannot connect to 0.18 or earlier: the handshake refuses and says which end to upgrade (protocol 4 against 3). Cross-version meetings hold only between neighbouring releases without breaking changes.
rutis.json'sformatis still 1, and local runtimes (runtimes.node/py/go/swift/bun) are written as before. This release is the first exception to rutis.json being readable across versions: a file withruntimes.remoteis no longer read by 0.19; a file withrutis-bridge/peernode rows is read, but those rows fail as unknown plugins. The 0.8–0.18 persisted samples drop these forms.- The plugin API version (
PLUGIN_API) is unchanged: a plugin written with the 0.18 SDK runs on the 0.19 runtimes once its imports are fixed; Go and Swift binaries are rebuilt because of the protocol change. - dylib plugins are rebuilt with the 0.19 SDK, as for every release.
- Swift:
.package(url: "https://github.com/arcships/rutis", from: "0.18.0")resolves to 0.19; an app not ready to upgrade writes.upToNextMinor(from: "0.18.0").
Packages
All of these are version 0.19.0: on crates.io rutis, rutis-macros, rutis-bridge, rutis-loader, rutis-types (new), rutis-host, rutis-sdk, rutis-dylib, rutis-dylib-meta, rutis-dylib-launcher; on npm @arcships/rutis, @arcships/rutis-runtime, @arcships/rutis-bun, @arcships/rutis-host and the five platform packages; on PyPI rutis, rutis-host; the Go module github.com/arcships/rutis/go/rutis (tag go/rutis/v0.19.0); the Swift package (v0.19.0); the rutis-host binaries on the GitHub release page. rutis-migrate leaves the train and stays at 0.18.0. The Kotlin SDK is not published to Maven: fetch this repository's tag v0.19.0 and use it from source with includeBuild, writing the dependencies without a version (Kotlin app guide, #893).