s0ma-lang-studi0
studi0 is s0ma's local visual development environment, and sh0w is the graph renderer it hosts. s0ma studi0 <project> starts a loopback web server and opens one page: the project's own component graph — modules, components, and the authored, derived, and verification edges between them — drawn from the artifacts that project's last build produced (PRD §7.6, FR-STUDI0-1..9).
Every fact on the page comes from s0ma-lang-dsl's single graph-export contract (s0ma_dsl.graph_export.collect_graph, the same data s0ma graph --format json --detail full prints). studi0 has no second extraction path, so it cannot show you something the project did not declare. What it has no declaration for, it says so about: nothing on the page is inferred, completed, or invented.
studi0 is a viewer. It never executes or imports the application it is showing, never calls a model, and never opens a socket beyond 127.0.0.1 — it opens the project read-only and re-reads it as builds land. It writes exactly one file into the target tree: .s0ma/studi0/active.json, the marker that says a viewer is bound to this project, removed again when studi0 exits.
Where it sits
Four distributions ship together at one version, and dependencies only ever point down the stack (PRD INV-6):
s0ma-lang-studi0 · s0ma-lang-mcp → s0ma-lang-dsl → s0ma-lang-core
s0ma-lang-studi0 is Apache-2.0, and so are s0ma-lang-core, s0ma-lang-dsl and s0ma-lang-mcp. What each distribution contains, and the license each one declares, is in the distributions s0ma ships.
Install
s0ma is on PyPI:
pip install s0ma-lang-studi0
That brings s0ma-lang-dsl and s0ma-lang-core with it. The package is named s0ma-lang-studi0 and imported as s0ma_studi0. The other ways in, working inside a checkout or building the wheels yourself, are in the root README's "Install" section, and getting started is the journey to walk once the s0ma command runs.
studi0 ships no console script of its own on purpose: the door is the s0ma CLI, which discovers this package lazily and prints an install hint if it is absent.
s0ma studi0 # view the project in the current directory
s0ma studi0 path/to/project # view a project elsewhere
s0ma studi0 --port 8731 # pin the port (default: an OS-assigned ephemeral one)
s0ma studi0 --no-open # serve and print the URL without opening a browser
The server binds the loopback interface only, prints exactly one line naming the project and the URL it really bound, opens your browser there, and serves until you interrupt it:
studi0 serving my-project at http://127.0.0.1:52544/
Programmatic use is the same call the subcommand makes: launch(Path("path/to/project"), port=0, open_browser=False) from s0ma_studi0.
What the page shows
The canvas is organized the way the project's own declarations are. Layer bands run top to bottom — PRESENTATION, APPLICATION, DOMAIN, INFRASTRUCTURE — with FRAMEWORK appearing only when you ask for it. Organs are modules, placed in the band each one declares. Nodes are components, on a grid inside their organ, with shape and a type letter carrying the declaration type, so color is never the only carrier of meaning. Edges are authored solid, derived dashed, verification dotted.
Defaults hide the noise rather than the truth: test, helper, doc_ref, doc_guide, and example declarations and FRAMEWORK-layer modules sit behind two toolbar toggles, and everything hidden stays reachable — the inspector lists a component's verification edges whether or not they are drawn. Click any node or edge for intent first, then kind, layer, visibility and declaration type, the declared fields, the relationships with their provenance, and the source location. The whole view is keyboard-drivable, every glyph carries an aria-label, and under prefers-reduced-motion nothing animates. The page is fully self-contained (FR-STUDI0-7): no CDN, no web font, no remote asset, no telemetry.
Being honest about how current it is
studi0's whole job is to be honest about what a project did and did not declare, and about how fresh the picture is.
- Build freshness is read from the build manifest and shown as one of three states:
fresh(the graph, unmarked),stale(amber markers on the affected organs and nodes, plus a banner naming the stale modules), ormissing(a full-page empty state carrying the command to run). What you see while a module is stale is the last canonical build — the declarations that were really compiled — never a guess at what the edited source now says. - Declared versus not declared. A value renders as itself; an absent field renders as a muted not declared; a field the author explicitly deferred renders as pending: <reason>, surfaced as authoring debt rather than hidden as an empty slot.
- Narration is separated from truth. While studi0 is running, the authoring server may ask the agent to say which movement of the work it is in, and studi0 tails that log in a pane beside the graph. The pane says in words that it is self-reported and unverified, it never gains a checkmark or a badge, a line that does not parse is counted and dropped rather than guessed at, and a narrated name the graph does not carry is labelled not in this graph and moves nothing.
The routes studi0 serves, the contracts its build declares, the shape of a narration line, and the one file it writes are all in studi0, the viewer — generated from studi0's own built source, so it describes the viewer that ships.
v1 limits
v1 is deliberately a pure viewer, and the honest list of what it is not is short:
- Viewer only. studi0 shows; it does not edit, scaffold, refactor, or run anything. Authoring stays in your editor and in
s0ma-lang-mcp. - Deferred, not stubbed: proposal "ghosts", evidence badges, the pause protocol, session summary and retention, multi-agent views, host theme matching, replay, and 3D. None of them are half-present in the UI.
- One project per process.
launch()serves one project root and blocks until interrupted. - The page needs JavaScript. With scripting off it says so and points at
s0ma graph --format json --detail full, which is the same data. - Local only. The server is loopback-bound by construction; there is no flag to offer it to another machine.
How this package builds
Like s0ma-lang-mcp, this package is itself a s0ma project — a viewer for s0ma models that is a s0ma model. Its behavior is authored in the DSL under s0ma_src/*.s0ma and shipped as the transpiler's committed, deterministic build output under src/s0ma_studi0/_built/; src/s0ma_studi0/__init__.py is the single handwritten Python module, which bootstraps the built modules and exposes launch(). sh0w's front end rides the same rule (FR-STUDI0-8): index.html, app.css, and app.js are plain files under s0ma_src/assets/, embedded into PUBLIC CONSTANT cells with the DSL's content: @file(...) directive, so the served page is s0ma-owned content with its bytes hash-tracked in the build manifest.
Never hand-edit anything under _built/ — a CI stage rebuilds it and byte-compares. Edit the .s0ma source, rebuild, and commit both together in one commit:
# --project-root is required: discovery anchors on the CWD, not the path argument.
# No --mode flag needed — the package's pyproject declares its own [tool.s0ma].mode.
uv run s0ma --project-root packages/s0ma-studi0 build packages/s0ma-studi0
Point studi0 at itself to see the arrangement: uv run s0ma studi0 packages/s0ma-studi0 draws five organs — the server, the state service, the watch loop, the narration side channel, and the embedded sh0w assets. CONTRIBUTING.md has the workspace setup and the one command that runs the whole gate.
Documentation
The map of record lists every document this repository keeps, what it is for, and which check keeps it honest. The paths through studi0:
- studi0, the viewer — the generated reference: routes, contracts, wire documents.
- Look at what you built, then tell us what is wrong with it — the viewer and the feedback route, end to end.
- What s0ma can do — every capability s0ma serves, on every channel.
In a terminal, s0ma docs opens the same map and s0ma docs show <topic> answers one question from it.
License
Apache License 2.0 — see LICENSE for details. The rest of the toolchain shares it: s0ma-lang-core, s0ma-lang-dsl and s0ma-lang-mcp are Apache-2.0 too, each with its own LICENSE.
Metadata
Release files for s0ma-lang-studi0 0.22.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| s0ma_lang_studi0-0.22.0.tar.gz | 189.2 kB | Without provenance | Details for s0ma_lang_studi0-0.22.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| s0ma_lang_studi0-0.22.0-py3-none-any.whl | Python 3 | none | any | Details for s0ma_lang_studi0-0.22.0-py3-none-any.whl |
Total release size: 304.3 kB
Release files / s0ma_lang_studi0-0.22.0.tar.gz
| Download URL | s0ma_lang_studi0-0.22.0.tar.gz |
|---|---|
| Size | 189.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf28a8dc8ce470461c6d5fac0c4d8589d068f9987866fecc2225577a9bcf734a
|
|
BLAKE2b-256 checksum How to use checksums |
c1cad87dcc3dd12cd532d87a8ba73269ade2761090dee25a6a7bedd213f67b36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / s0ma_lang_studi0-0.22.0-py3-none-any.whl
| Download URL | s0ma_lang_studi0-0.22.0-py3-none-any.whl |
|---|---|
| Size | 115.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f8e8b87f691b7a0e66e309775cf5dc593c21492ca5567a5622eea83318b0f89
|
|
BLAKE2b-256 checksum How to use checksums |
63add26bf010f91a5a1e538ea4fbefad6a50251da717793509ac0977827605b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for s0ma-lang-studi0 0.22.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.