Repository navigation
Releases
Semauri 0.79.0
Semauri v0.79.0 — Exact whole-word and whole-line matching
Semauri adds two natural, strictly typed text predicates for cases where
substring matching is too broad.
New expressions
let message be "Ada Lovelace\nGrace Hopper\nAda".
assert message has word "Ada".
assert message does not have word "Lov".
assert message has line "Grace Hopper".
assert message does not have line "Hopper".
print "Whole-text matching OK".
Output: Whole-text matching OK.
TEXT has word VALUE: search Unicode whitespace-delimited words.TEXT has line VALUE: search exact LF/CRLF-delimited lines.TEXT does not have word VALUEandTEXT does not have line VALUE: boolean negation.
The existing contains remains a substring/membership operator; it
is not changed. Whole-word matching is punctuation-sensitive, not
linguistic tokenization: "hello!" has word "hello" is false.
Matching is case-sensitive, Unicode-aware, and does not perform regex,
normalization, or locale-specific matching. Empty text contains no words or
lines. Lines preserve interior blanks and omit the final empty field.
Safety, tooling and compatibility
The parser lowers these forms to existing typed words of /
lines of plus contains and optional boolean not.
Both inputs are evaluated once, type errors remain compile-time errors, and
the runtime/effects/optimizer need no new operations. The formatter
canonicalizes only complete predicates, preserving variable names.
Existing programs and CLI behavior are unchanged.
The release adds a runnable example, integration tests, and language-guide
documentation. No new Rust dependencies or permissions are introduced.
Semauri 0.78.0
Semauri v0.78.0 — Text composition and project directory entrypoints
Semauri introduces more natural text-processing expressions, and simplifies
running a complete project, while keeping the same static type checks and
explicit capabilities.
New language expressions
let message be " Hello ñ 🌍 ".
assert word count of message is equal to 3.
assert first word of message is equal to "Hello".
assert last word of message is equal to "🌍".
print normalize whitespace of message.
Output: Hello ñ 🌍.
first word of TEXT,last word of TEXTfirst line of TEXT,last line of TEXTword count of TEXT,line count of TEXTnormalize whitespace of TEXT
These are pure compositions of existing typed text and collection operations.
They preserve Unicode scalar values, don't introduce new permissions, and
evaluate the input once. Text must be statically typed as a string. Selection
from empty words/lines retains existing first/last runtime errors.
Whitespace normalization collapses Unicode whitespace (not Unicode NFC/case).
Project runner
semauri init demo
semauri check demo
semauri run demo
# From within the project:
semauri run .
semauri .Directory execution selects main.suri only; source imports and runtime
configuration resolution follow the actual entry path, and filesystem, AI,
configuration, and secure randomness continue to require their existing
explicit permissions. A directory with no main.suri is rejected.
Quality and compatibility
A new runnable example, examples/text_composition.suri, and integration
tests cover type safety, Unicode behavior, formatter contextualization,
compile/optimizer/effect compatibility, project execution and permission
isolation. Existing syntax and CLI commands remain supported. No new Rust
dependencies are introduced.
Semauri 0.77.0
Semauri 0.77.0 — Run and print without extra flags
Semauri's simplest program now works from the terminal immediately:
print "Hello, Semauri!".
semauri run hello.suri
# Or simply:
semauri hello.suriWhat's new
- Console output by default:
printno longer requires
--allow console_writein normal execution. - Direct .suri execution:
semauri FILE.suriworks as a shorthand
forsemauri run FILE.suri; options such as--allowwork with either. - Easy testing:
semauri test PATHandsemauri verify PROJECT
allow console prints without--allow-console. - Explicit strict mode:
--deny-consoledisables printing for
run,testandverify. Even a legacy explicit console grant
does not override the denial. - Clearer documentation: a shorter README focused on installation,
language composition, actual code and its core features. - Better regression coverage: end-to-end tests for defaults, the new
shortcut, backwards compatibility, strict behavior and permission isolation.
Safety and compatibility
Only the terminal-output capability changed its default. Filesystem,
network, AI, configuration and secure random effects still need explicit
grants (for example --allow secure_random).
Old commands using --allow console_write or --allow-console remain
supported. semauri check FILE --allow-none continues to enforce a strict
policy when requested, and all source type checks remain unchanged.
No new runtime dependencies.
Run cargo test --all-targets and semauri check examples/quickstart.suri
when building from source.
Semauri 0.76.0
Semauri 0.76.0 — Natural counting and machine-readable version
This release adds a concise natural-language count expression and a stable JSON
version response while keeping Semauri's explicit capability model intact.
Count items or Unicode characters
let tasks be a list of "design", "check", "ship".
let task_count be count of tasks.
let character_count be count of "ñ🌍".
assert task_count is equal to 3.
assert character_count is equal to 2.
count of is equivalent to length of, including strict static type checking,
Unicode scalar semantics, optimization and runtime behavior. It does not change
count every x in values if PREDICATE, and a variable may still be named
count.
Run semauri check examples/count_of.suri and
semauri run --allow console_write examples/count_of.suri.
Version introspection for tools
semauri version --json{"name":"semauri","version":"0.76.0"}Text semauri version is unchanged. Invalid extra version arguments now
produce a usage error instead of silently succeeding.
Compatibility
- No new dependencies or permissions.
- No breaking changes to existing language syntax or semantics.
- Expanded integration tests for counting, contextual variable names,
formatting, optimizer/effect analysis and CLI JSON introspection. - Release metadata and documentation updated.
Semauri 0.75.1
Semauri 0.75.1 — Secure random generation and contextual variable names
This maintenance release consolidates the new secure-password functionality from v0.75.0 and corrects contextual parsing so common names such as password remain legal variables.
Generate a password
let password be password of 20 characters.
print password.
semauri run examples/secure_password.suri --allow secure_random --allow console_writeThe default alphabet contains lowercase and uppercase letters, digits and common punctuation. For a custom alphabet:
let token be secure random string of 32 characters from "abcdef0123456789".
let dice be draw random integer from 1 to 6.
let letter be pick random character from "ABCD".
Fixed compatibility
Random-operation verbs password, secure, draw and pick are recognized contextually, not as universally reserved identifiers. You can now declare and reference variables with those names while still invoking the corresponding secure random operation. Function names such as pick remain supported.
Security and bounds
- Random values are sampled from the operating system CSPRNG:
/dev/urandom(Linux/macOS) orBCryptGenRandom(Windows). - Rejection sampling avoids modulo bias for strings, Unicode character choices and inclusive signed 64-bit integer ranges.
- Strings must have 1–4096 characters; custom alphabets must contain 1–4096 distinct Unicode scalar values.
- All random operations require
--allow secure_random;printadditionally requires--allow console_write. Do not print production secrets into logs. - No new Rust dependencies or changes to previous capability requirements.
This release includes PR #346, the compatibility fix PR #348 and release metadata. See the language guide for the complete specification.
Semauri 0.75.0
Semauri 0.75.0 — Secure passwords and random generation
Release date: 2026-11-11.
New built-in random generation
Semauri can now generate passwords, tokens, uniform integers and random
Unicode characters without needing another language or a third-party package:
let generated_password be password of 20 characters.
let custom_token be secure random string of 32 characters from "abcdef0123456789".
let dice_roll be draw random integer from 1 to 6.
let selected_letter be pick random character from "ABCD".
print generated_password.
semauri run examples/secure_password.suri --allow secure_random --allow console_writeSecurity and correctness
- Cryptographic OS-provided randomness:
/dev/urandomon Linux and macOS,
andBCryptGenRandomusing the Windows system-preferred RNG. - Rejection sampling, avoiding modulo bias in selections even when alphabet
lengths or integer ranges do not divide a power of two. - Exact inclusive signed 64-bit integer bounds, including large values beyond
2^53, and Unicode scalar-aware character selection. - One to 4096 characters per generated password/string, unique custom alphabet
characters only; malformed lengths, duplicate/empty alphabets and invalid
integer ranges fail with source-located runtime errors. - Explicit
--allow secure_randomcapability. Compiler and plan metadata
do not contain generated secret values; printed secrets still need cautious
handling. No silent fallback to a predictable pseudo-random seed. - No new Rust dependencies.
Tooling and compatibility
- README password walkthrough, runnable example, language guide, VS Code
syntax highlighting and Jupyter completion keywords updated. - Rust regression tests cover static type rejection, Unicode characters,
length bounds, effect permissions, repeated independent generation,
numeric ranges, editor formatting and runnable examples. - This release includes PR #346
and retains the improvements from v0.74.0.
Note: Passwords are selected independently from an alphabet; the default
alphabet includes upper/lowercase ASCII, numbers and common symbols but does
not force every class to appear. Use a sufficient length (20+ recommended) and
avoid exposing generated secrets in console logs.
Semauri 0.74.0
Semauri 0.74.0 — Core expressions, bounded agents and structured JSON
Release date: 2026-11-11. This release includes all development pull requests #342, #343 and #344, merged into main before publication.
Improvements to Semauri the programming language
- Exclusive-or: write
a xor bwith strict Boolean typing, predictable precedence betweenandandor, optimizer folding and contextual syntax (an identifier namedxorstill works). - Dynamic Boolean expressions:
not,xor,is equal toandis not equal tocan operate on runtime values through typed, pure SSAcoreoperations; assertions and dataflow remain inspectable. - Dynamic numeric expressions: unary
minus, subtraction and strict/inclusive numeric comparison support values read at runtime. Integer subtraction and ordering remain exact beyond 2^53; signed overflow raises source-located S470 or S358 rather than silently wrapping. - The existing formatter, static type checker, optimizer, CLI capability gates, VS Code syntax highlighting and Jupyter completions are updated, with new tests and examples.
Safer AI orchestration and data processing
- Enforce per-agent turn limits, including successful cache hits; maintain distinct system contexts for cache isolation.
- Bound cached responses with
constrain ai cache to N entries.(FIFO eviction),reset ai response cache., andrestrict ai outputs to N characters. - Validate text with
validate ai json DATA against schema CONTRACTandnormalize ai json DATA against schema CONTRACT. The strict, bounded subset supports primitive types, object properties, required fields, nested arrays, string enumerations, and size limits. Unknown schema keywords and duplicate keys fail closed. - Permit the nominal
ai.responsetype as a string input while keeping model, tool and agent identity types distinct. Extendreport ai usagemetrics without exposing prompts.
Compatibility, testing and limitations
- No new core Rust dependencies. Existing 0.73.0 syntax and explicit
--allowpermissions are preserved. - Runtime-dependent
and/orand conditional branches remain intentionally unsupported until a proper control-flow graph is introduced. Other runtime arithmetic is not yet lowered. local/*AI models remain deterministic simulators. This release does not introduce a real third-party model provider or full JSON Schema support.- CI validates Rust tests, native Jupyter, compiler performance, Clippy and six native distribution targets (Linux/macOS/Windows, x86_64 and ARM64). Release files include SHA-256 checksums.
Pull requests
- #342 — Bounded AI runtime and strict structured JSON
- #343 — Typed XOR and dynamic Boolean expressions
- #344 — Checked runtime numeric operations
See the language guide for examples and constraints.
Semauri 0.73.0
Semauri 0.73.0 — Typed data, library namespaces and AI governance
This release consolidates the work from development PR #341 on top of v0.72.0
and adds runtime guards and machine-readable accounting for local AI workflows.
Better foundations for AI programs
- Structural records:
record of ("name": "Ada", "age": 37)
with typedfield "name" of RECORDaccess. Use explicit structural types in
function parameters, nested records, and deterministic JSON serialization. - Homogeneous dictionaries:
dictionary of ("label": "cat"),
entry "label" of DICTIONARY, explicit typed empty dictionaries,
has entry "label" in DICTIONARY,keys of DICTIONARY,
and lazyentry "missing" of DICTIONARY with default "unknown".
Typed lookups avoid missing-key crashes when a default is supplied. - Named imported libraries:
import "library:math_kit" as math.
theninvoke math.square to 7. Aliases prevent collisions between
functions exported by different Semauri libraries.
These changes span the parser, type system, intermediate representations,
optimizer, formatter, effect checker and runtime, with source-located errors
and new Rust regression suites.
Bounded AI prompts and usage telemetry
bound ai prompts to 4 characters.
cap ai requests to 1.
memoize ai response cache.
let model be connect language model "local/test".
let first be prompt model with "hola".
let again be prompt model with "hola".
let metrics be report ai usage.
print metrics.
The report is deterministic JSON containing requests, request_limit,
prompt_character_limit, cache_hits and cache_entries. Prompts and
model identifiers are not included. Input bounds count Unicode scalars;
oversized prompts are rejected before requests or cache hits. Embeddings
now also obey the request budget and input bound.
These are local runtime policies, not provider-side token or monetary
budgets. Model execution remains limited to the existing local/*
backend without an added provider adapter. All model, network, inference
and output effects still require explicit --allow permissions.
Compatibility and distribution
- No additional compiler dependencies or implicit capabilities.
- Existing unaliased imports remain compatible. Records and dictionaries
are immutable; dynamically constructed schemas and native plugin ABI
support are not included. - The Jupyter integration remains native Rust; CI pins a supported Ubuntu
runner and retries package retrieval to reduce runner-image instability. - Package, lockfile, citation metadata, Jupyter language version and
release notes advance together to 0.73.0. - The release workflow builds, smoke-tests and publishes six archives for
Linux, macOS and Windows (x86_64 / ARM64) withSHA256SUMSonly after
all distribution jobs succeed.
See the language guide and runnable
AI governance example.
Semauri 0.72.0
Semauri 0.72.0 — External libraries and Rust-only tooling
Semauri v0.72.0 introduces explicit, versioned, locally installed complementary
libraries so authors can share and reuse .suri functions across projects.
It also adds natural-language syntax enhancements and replaces the project's
remaining Python-based internal tooling and Jupyter adapter with Rust.
Create a Semauri-compatible library
A library consists of ordinary Semauri source and a small descriptor:
# libraries/math_boost/lib.suri
define function triple taking n as number to (n times 3).
{
"schema": 1,
"name": "math_boost",
"version": "1.0.0",
"entry": "lib.suri"
}Save the descriptor as libraries/math_boost/.semauri-library.json,
and declare it in the application's .semauri-libraries.json:
{
"schema": 1,
"libraries": [
{"name": "math_boost", "version": "1.0.0", "path": "libraries/math_boost"}
]
}The application can import and call it using checked Semauri syntax:
import "library:math_boost".
print invoke triple to 7.
semauri libraries app
semauri check app/main.suri
semauri run --allow console_write app/main.suriThe output is 21. Use semauri init app to create a project with an
empty library catalog. Libraries can be placed in an explicit sibling folder
outside the project; nested imports remain confined to each library's
canonical directory. Catalogs pin a MAJOR.MINOR.PATCH version and check
library identity on every load, with S417 for declaration errors.
Security: Semauri still statically checks third-party sources, preserves
source-file diagnostics, and enforces --allow capabilities when running
imported effects. It rejects unlisted dependencies, cycles, symlink escapes
and unrestricted external imports. This first version handles offline,
locally installed .suri source libraries only: it is not a remote package
registry, automatic downloader, cryptographic lockfile or native Rust/C ABI.
See the short README tutorial,
the full guide, and the
complete example.
New language expressions
x is not greater than y,x is no greater than y: checkedx ≤ y.x is not less than y,x is no less than y: checkedx ≥ y.x is not greater than or equal to yand
x is not less than or equal to y: strict complementsx < y/x > y.range from 1 through 5is an inclusive alias forrange from 1 to 5.- Optional trailing commas in lists (
a list of 1, 2,.) and
function calls (invoke combine to (1, 2,)).
These additions preserve precise numeric typing, existing diagnostics and
runtime capabilities. They are tested in
tests/natural_language_ergonomics.rs.
Rust-only internal tools and Jupyter support
- Replace five Python benchmarking/report scripts with the
semauri_benchRust CLI and update the performance CI. - Replace the Python Jupyter kernel adapter with a native Rust ZeroMQ kernel,
authenticated messaging, permission-aware isolated cell execution and
integration protocol tests. - Remove repository-owned Python source files; guard against their
reintroduction in Rust regression tests. - Accept an optional leading UTF-8 BOM on
.surisource files and imports. - Keep project creation, diagnostics, build, test, and verification workflows
compatible with existing Semauri programs.
JupyterLab itself remains a separate application and may have Python
dependencies; Semauri's own kernel integration is written in Rust.
Release, compatibility and downloads
The Semauri compiler package, CLI, Cargo lockfile, citation metadata, and
native Jupyter language identifier have been updated to 0.72.0. No
additional root compiler crate dependencies or implicit runtime permissions
are introduced.
The release workflow builds and smoke-tests native packages for
Linux (x86_64, ARM64), macOS (Intel, Apple Silicon), and
Windows (x86_64, ARM64) and publishes a SHA256SUMS integrity file
when all package jobs complete.
See GitHub Releases
for release downloads, and read the
language guide for full syntax and capabilities.
Semauri 0.71.0
Semauri 0.71.0 — Numerical series and model evaluation
Semauri v0.71.0 extends natural-language-inspired numerical programming with
typed running computations, sequential differences, and prediction
error metrics. It builds on v0.70.0's checked difference between expressions.
Cumulative and sequential calculations
Use readable expressions to analyze a sequence without writing a loop:
let readings be a list of 3, 5, 2, 6.
let totals be running total of readings.
let averages be running average of readings.
let minima be running minimum of readings.
let maxima be cumulative maximum of readings.
let products be running product of readings.
let changes be adjacent differences of readings.
assert totals is equal to (a list of 3, 8, 10, 16).
assert (averages at 3) is equal to 4.
assert minima is equal to (a list of 3, 3, 2, 2).
assert maxima is equal to (a list of 3, 5, 5, 6).
assert products is equal to (a list of 3, 15, 30, 180).
assert changes is equal to (a list of 2, (minus 3), 4).
Supported alternatives include running sum / cumulative sum,
cumulative average, cumulative minimum, cumulative maximum,
cumulative product, running min/max, and successive differences.
These operations process typed numeric lists in linear time. All are pure,
evaluate the source list once, and return an empty list for empty input.
Checked signed 64-bit accumulation and products retain integer precision.
Prefix extrema compare large integers exactly; decimals require finite results.
Error metrics for predictive models
Given signed residuals (observed minus predicted), common error and bias
statistics are expressible directly:
let observed be a list of 3, 6, 5.
let predicted be a list of 1, 9, 4.
let residuals be zip every actual in observed with estimate in predicted
to (difference between actual and estimate).
assert (mae of residuals) is equal to 2.
assert (mse of residuals) is equal to (14 divided by 3).
assert (rmse of residuals) is equal to (sqrt of (14 divided by 3)).
assert (mbe of residuals) is equal to 0.
The same operators support natural-language long forms:
mean absolute error of ERRORS,mean magnitude of ERRORS,
sum of magnitudes of ERRORS, andmax magnitude of ERRORSmean squared error of ERRORS,mean square of ERRORS,
sum of squares of ERRORSroot mean squared error of ERRORS,root mean square of ERRORSmean bias error of ERRORSandmean error of ERRORS
MAE measures average absolute error; MSE averages squared error;
RMSE takes the square root of MSE; MBE preserves signed errors
to measure bias. All take already-computed residual lists, not two separate
series. Inputs are checked and arithmetic errors remain source-located.
Documentation, compatibility and distribution
- Four new runnable
.suriexamples:running_statistics.suri,
squared_statistics.suri,absolute_error_statistics.suri,
andmodel_error_metrics.suri. - Regression tests for exact large integers, decimals, empty and invalid
lists, overflow, formatter round trips, typed AST/HIR, and effect analysis. - Updated language guide, Jupyter completions/help, and VS Code highlighting.
- No new Rust dependencies or runtime capabilities. Existing permissions
and source compatibility are unchanged; the new phrases remain contextual.
Prebuilt archives are provided for Linux (x86_64, ARM64),
macOS (Intel, Apple Silicon) and Windows (x86_64, ARM64),
alongside SHA256SUMS for integrity verification.
Install using the commands in the repository
README, or visit
the GitHub releases page.