cablehead/xs
54.6
Adequate · 8 November 2026
20k
lines of production code
Rust
primary language
7
measurements over time
What this system is
Features
Add Datastar TodoMVC example with Nushell backend and interaction metrics
This location introduces a new TodoMVC example built with the Datastar frontend and a Nushell/cross.stream backend. The example includes a server script (serve.nu) that exposes an SSE stream for real-time updates and REST endpoints for managing todos, alongside a projection module (projection.nu) that tracks interaction counts and time-to-first-view metrics. The entry also adds a test suite (projection\_test.nu) to verify the state projection logic and a README with a live demo link, though it is marked as deprecated for Datastar v1.0.0-RC.5 due to subsequent breaking changes in the SDK.
examples/datastar-todomvc · high confidence
Add SolidJS UI example for macOS clipboard history
Introduces a new SolidJS-based web interface for the \x-macos-pasteboard\ example, allowing users to view and explore clipboard history. The UI connects to the \xs\ service via Server-Sent Events to stream clipboard frames and fetches content through a Content-Addressable Storage (CAS) API, rendering text, JSON, and images in a card-based layout. The package includes a Nushell handler to map raw clipboard data to content types and is configured to run with Deno and Vite.
examples/x-macos-pasteboard/solid-ui · high confidence
Initial project scaffolding and Nushell integration
This change introduces the foundational structure for the cross.stream project, including the MIT license, a comprehensive README with quick-start and feature highlights, and an AGENTS.md file defining commit and code quality standards. It adds a Nix flake (flake.nix/flake.lock) providing development shells for Rust and Nushell, and a Dagger configuration for build pipelines. Crucially, it adds the initial version of xs.nu, a Nushell module that exposes commands like .cat, .last, .append, .get, and .cas to interact with the cross.stream event store, establishing the primary interface for Nushell users.
(repo-wide) · high confidence
Initial release of the cross-stream (xs) library and CLI
This change introduces the \cross-stream\ (\xs\) crate, an embeddable, local-first event stream store for Rust applications. It provides a core \Store\ API for appending and reading time-sorted frames (using scru128 IDs) with optional TTL and content-addressed storage (CAS). The library includes an HTTP/Unix-socket server (\api\ module) exposing endpoints for streaming events (\/\, \/last\), managing CAS content, and evaluating Nushell scripts (\/eval\). A CLI (\xs\) is provided to interact with the store, supporting commands like \cat\, \append\, \last\, \cas\, and \eval\. The implementation supports hierarchical topic indexing, wildcard queries, and Server-Sent Events (SSE) for streaming. It also includes a Nushell runtime (\nu\ module) for embedded scripting and a hierarchical tracing subscriber (\trace\ module) for structured logging.
src · high confidence
Introduce Nushell engine integration with VFS module support
This change adds a new Nushell (nu) integration layer that allows the system to execute Nushell scripts as configuration and logic. It includes a new \Engine\ struct to manage the Nushell state, a \parse\_config\ function to evaluate scripts and extract closures, and a Virtual File System (VFS) mechanism that loads Nushell modules from the content-addressable store (CAS) so they can be imported by scripts. The implementation also includes a suite of tests for the engine, command handling, and module loading. Also in this area: 2 commits (1 fix) modifying src/processor.
src/nu, src/processor · medium confidence
Introduce new HTTP client with Iroh peer-to-peer and HTTPS support
The client module has been rewritten to support multiple connection backends, including direct Unix sockets, standard TCP, TLS (HTTPS), and Iroh peer-to-peer networking via tickets. This enables the CLI to connect to stores behind HTTPS with basic authentication and to participate in decentralized networks. The client also implements new API behaviors such as direct CAS reads for local stores, an updated append route at POST /append/\<topic\>, and support for metadata base64 encoding to handle unicode characters.
src/client · high confidence
New Discord bot example with dice-rolling and bookmarking capabilities
Added a new example in examples/discord-bot that demonstrates building a Discord bot using the xs framework. The example includes a README with setup instructions and ASCII diagrams, along with Nushell actor scripts: actor-heartbeat.nu manages the WebSocket connection lifecycle (including authentication and reconnection logic), actor-roller.nu handles text-based dice rolls (e.g., ./roll 1d4), actor-slash-dice.nu implements slash command support for dice rolls, and actor-bookmarklet.nu provides message bookmarking via emoji reactions. The example uses the Discord API v10 and requires websocat for the WebSocket connection.
examples/discord-bot · high confidence
New Nushell command surface for event stream and content-addressable storage
This change introduces a new set of embedded Nushell commands in the \src/nu/commands\ module, providing a programmatic interface to the application's store and CAS. Users can now write data to the content-addressable store and append frames to topics using \.append\ (which supports metadata, TTL, and timestamp flags) and \.cas-post\. Reading is handled by \.cat\ (streaming or historical event logs with filtering, limits, and follow modes), \.last\ (retrieving the most recent frame(s) for a topic), and \.get\ (fetching a specific frame by ID). Content retrieval from the CAS is available via \.cas\, while \.remove\ allows frame deletion and \.import\ enables restoring frames verbatim. Additionally, \.id\ provides SCRU128 ID generation and unpacking/packing capabilities.
src/nu/commands · high confidence
New action processor with unified lifecycle management
The system now includes a new action processor located in src/processor/action that handles the definition, execution, and response routing of user-defined actions. This component manages the action lifecycle by emitting specific events (such as xs.action.\<name\>.active and xs.action.\<name\>.invalid) and routes action outputs to frame metadata or CAS storage based on return options. It relies on a shared two-slot compaction state machine (src/processor/lifecycle/slots.rs) to manage create, active, invalid, and term events for actors, services, and actions, ensuring consistent state transitions and fallback behavior during hot-replacements.
src/processor/action · high confidence
Behavioural changes
Actor closure signature now requires two parameters (frame, state)
Actors must now define their closure to accept exactly two positional parameters: the incoming frame and the current state. Closures with a different number of arguments (such as the previous single-argument shape) are rejected at registration time with an error, ensuring consistent state threading across all actor instances.
src/processor/actor · high confidence
Configurable fsync policy and hierarchical topic indexing
The store now allows users to control data durability against power loss via a new \Fsync\ policy (configurable as \always\, \never\, or an \interval:\<ms\>\ duration, defaulting to 1 second) exposed through \StoreOptions\. Additionally, the store supports hierarchical topic queries, enabling readers to filter by exact topics, prefix wildcards (e.g., \clip.\*\), or comma-separated patterns, with the underlying index optimized for lexicographical ordering and bloom filters.
src/store · high confidence
Datastar TodoMVC example adds interaction metrics and reverses todo list order
The Datastar TodoMVC example now displays interaction metrics, including an interaction count and time to first view, within the todo section footer. Additionally, the list of todos is now rendered in reverse order, showing the most recently added items at the top.
examples/datastar-todomvc/templates · high confidence
Deprecated Datastar TodoMVC example with updated UI and pinned SDK version
The Datastar TodoMVC example has been deprecated and pinned to Datastar v1.0.0-RC.5, with a visible notice in the interface warning users that the SDK has since shipped breaking changes. The demo now features a new dark-themed UI with interactive link cards and includes an embedded video player (via Mux) to demonstrate the tutorial. The entry point is now a standalone HTML file with local CSS assets, replacing previous structures.
examples/datastar-todomvc/www · high confidence
Migrate binary builds to Dagger pipelines with multi-platform support
The build system has moved from previous CI scripts to Dagger pipelines, introducing native support for building binaries on macOS (aarch64), Linux (arm64 and amd64), and Windows (amd64). This change ensures that macOS builds fail loudly if the resulting binary is missing or if unexpected build errors occur, preventing the accidental shipping of empty tarballs. The pipelines also implement specific caching strategies for Cargo registry, git, and target directories to optimize build times across these platforms.
.dagger · high confidence
Service lifecycle and output handling now use unified xs.service topics and metadata
The service processor now manages services using a unified lifecycle model where output records are stored in frame metadata by default, and service events (such as active, finished, or error states) are emitted to specific xs.service.\<name\>.\<event\> topics. This change introduces a restart policy (defaulting to on-success) and ensures that service output suffixes are concatenated verbatim, aligning with actor and action behavior. Users will see service outputs and lifecycle changes reflected in the store's metadata and dedicated event frames, providing a more consistent and observable service execution model.
src/processor/service · high confidence
Fixes
Automated quality checks now include documentation validation
The new check.sh script ensures code quality by running cargo fmt, clippy, and tests, and now also validates the documentation build process by executing Astro checks and building the docs site to catch MDX errors early.
scripts · high confidence
Test coverage
Added integration tests for CLI commands and Nushell module; Added throughput benchmarks for store and actor operations.
Dependencies
Project rebranded to cross-stream with Nushell 0.115.1 and Dagger build infrastructure
The Rust crate is now published as cross-stream (v0.13.5-dev), featuring an upgrade to Nushell 0.115.1 and a minimum Rust version of 1.95.0. The build system now includes a new .dagger/go.mod module for Dagger pipelines, and the Cargo manifest enables LTO and single codegen units for release builds while adding binstall metadata for pre-built binaries.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 51 → 55 (+4.0)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 65 → 66 (+0.6)
- Architecture 90 → 85 (-4.9)
- Maturity 55 → 81 (+26.6)
- Readiness 71 → 71 (+0.0)
- Security 35 → 34 (-0.5)
- Event Sourcing 100 → 100 (+0.0)
- Performance 79 → 79 (+0.0)
Resolved (12)
- Ambiguous retrieval operations. get retrieves by ID, while cas_read retrieves by hash/integrity. While technically distinct, the naming convention cas_read vs get is inconsistent with standard CRUD patterns where get or read is the primary lookup. cas_read implies a Content-Addressable Storage specific operation, but get is generic. If the store is primarily CAS, get should likely be get_by_id or cas_read should be get_by_hash to be explicit.
- Checkable ADR rule enforced only by prose: ADR 0005: Lifecycle Topics (docs/adr/0005-lifecycle-topics.md)
- Duplicate functionality with different signatures (sync variants). Same issue as the async versions: cas_insert_bytes_sync is a subset of cas_insert_sync.
- Duplicate functionality with different signatures. cas_insert takes impl AsRef<[u8]> which covers &[u8], Vec<u8>, String, etc. cas_insert_bytes takes &[u8] specifically. The latter is a strict subset of the former's capability, creating unnecessary API surface bloat.
- Duplicated block (5 lines × 3) (src/processor/action/serve.rs)
- Duplicated block (7 lines × 2) (src/main.rs)
- Duplicated block (9–10 lines × 3) (src/client/commands.rs)
- Inconsistent naming for sync/async pairs. While cas_reader vs cas_reader_sync is clear, the library also has read vs read_sync and get (no sync variant shown, implying it might be blocking or async via receiver). The existence of _sync suffixes for some CAS operations but not others (like get) suggests an inconsistent pattern for blocking vs non-blocking I/O.
- Medium vulnerability: RUSTSEC-2026-0346 (Cargo.lock)
- Medium vulnerability: RUSTSEC-2026-0367 (Cargo.lock)
- MethodTooLong: Store.read (src/store/mod.rs)
- Redundant error checking utilities. Both methods check for 'not found' conditions but have different names and likely different internal logic (one checks a specific type, the other checks IO errors). This forces users to know which specific error variant they are handling to pick the right helper.
New (23)
- Classify ADR enforcement: 0006: Store builtins on a prepared, cloneable engine (docs/adr/0006-store-builtins-on-prepared-engine.md)
- Classify ADR enforcement: 0007: Engine tree (docs/adr/0007-engine-tree.md)
- Classify ADR enforcement: 0008: Follow: scan first, subscribe after, error on a live lag (docs/adr/0008-follow-scan-first.md)
- Classify ADR enforcement: 0009: Supervisors catch up after falling behind (docs/adr/0009-supervisors-catch-up.md)
- Classify ADR enforcement: ADR 0001: Topic Names and Hierarchical Queries (docs/adr/0001-hierarchical-topic-index.md)
- Classify ADR enforcement: ADR 0002: Disallow Numeric Prefix in Topic Names (docs/adr/0002-topic-no-numeric-prefix.md)
- Classify ADR enforcement: ADR 0003: Rename Processors to Service, Actor, Action (docs/adr/0003-rename-processors.md)
- Classify ADR enforcement: ADR 0004: Prefer Meta Over CAS for Structured Data (docs/adr/0004-actor-output-meta-over-cas.md)
- Classify ADR enforcement: ADR 0005: Lifecycle Topics (docs/adr/0005-lifecycle-topics.md)
- Critical CVE: [GHSA redacted] (Cargo.lock)
- Duplicated block (11 lines × 2) (src/client/commands.rs)
- Duplicated block (5 lines × 3) (src/processor/action/serve.rs)
- Duplicated block (7 lines × 2) (src/main.rs)
- Hotspot: src/api.rs (src/api.rs)
- Hotspot: src/processor/action/serve.rs (src/processor/action/serve.rs)
- Hotspot: src/processor/actor/serve.rs (src/processor/actor/serve.rs)
- Hotspot: src/processor/service/serve.rs (src/processor/service/serve.rs)
- Medium advisory (unsound): RUSTSEC-2026-0386 (Cargo.lock)
- Medium vulnerability: [GHSA redacted] (Cargo.lock)
- Medium vulnerability: RUSTSEC-2026-0385 (Cargo.lock)
- …and 3 more
Changes since last survey
- 13 commits — 9 feature/other, 4 fixes
By area
- src/processor — 5 commits
- (root) — 4 commits
- .github/workflows — 1 commit
- docs/src — 1 commit
- src/client — 1 commit
- src/main.rs — 1 commit
Notable commits
- fix: fix: a service whose external exits non-zero stops with .fin.error
- fix: fix: a supervisor that falls behind live reads what it missed from the store (#172)
- fix: fix: read stored frames before subscribing, end a live lag with xs.lagged (ADR 0008) (#170)
- fix: fix: xs cat writes to a regular file or /dev/null (#173)
- change: chore: bump to 0.14.3-dev
- change: chore: bump to 0.15.1-dev
- change: chore: release 0.14.2
- change: chore: release 0.15.0
- change: docs: note that actor appends land when the closure returns (#167)
- change: feat: write an actor's appends and out frame as one batch (#168)
- change: refactor: use xs::Error for the crate's boxed error, not written out or private aliases (#171)
- change: test: fix clippy warnings in the integration tests (#174)
- change: test: the watch test fails at once with the service's error, and names inotify exhaustion as an environment limit (#175)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
cablehead/xs was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 8 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 670edd62c3f3cc92087498b68fdc598c8b839e53 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.