Technical portal
Native execution. Governed context. Verifiable work.
Technical documentation for Samōsya: the client and server split, the run engine, the objects that carry work, the model gateway, the permission boundary, the trace, and what a self-hosted deployment actually contains.
- Engine, gateway, trace: available
- Files, Consoles: preview
- Public distribution: planned
Architecture overview
Samōsya has its own runtime. OpenCode is used to develop Samōsya; it is not a dependency of the product at run time.
Client
React and TypeScript Workbench. A narrow web interface with no host privileges. It renders server state; it is never the source of truth.
Server
Python and FastAPI. Run engine, model gateway, context builder, permission guard, tool registry, event ledger, execution trace and budget guard.
State
One durable data area mounted at /data, with additive migrations, backup and a rollback boundary. A single container is the default shape.
Scope of this portal. It documents the system as designed and the parts already observed working. There is no public API, SDK, container image or installer yet, so none is documented as if it existed.
The interface, as it runs
A real capture of the Workbench, not a rendering. It shows what the runtime actually writes into the shell: thread context revisions, a completed run with usage, and the inspector that reports context and budget.
What the capture demonstrates
- Threads carry context revisions. Each conversation shows the revision it was pinned to (
ctx r1), which is what the context builder is supposed to receive. - A run has totals, not a spinner. Input, output, reasoning, cache hit and cache miss are recorded for the round, with the run marked completed.
- Unknown is not zero. Cost, allowance and list price read Unknown when no reliable price is attached, instead of inventing a number.
- The inspector is project state. Selected model, context capacity, headroom, provenance and the budget guard live in the right panel, next to the work.
What it does not prove. A screenshot shows an interface, not a runtime guarantee. The claims on this page still rest on the release evidence record: commit, image digest, test, date and limits.
Status and evidence
Every state on this site is one of seven values. The label is a claim about evidence, not enthusiasm. The product site uses the shorter buyer-facing set: Available maps to verified or implemented, Preview is unchanged, In development maps to planned work that is next.
| Label | Means |
|---|---|
| VERIFIED | Confirmed by an adequate, reproducible test of the stated behaviour. |
| IMPLEMENTED | Code is delivered; full confirmation is missing. |
| PARTIAL | A limited scope works; the rest is not claimed. |
| PREVIEW | Interface or mock only. No real operation behind it. |
| PLANNED | Product direction. Not a delivery date. |
| BLOCKED | A known obstacle prevents progress. |
| UNKNOWN | No reliable data. Never rendered as zero or as success. |
What a verified claim must carry
For any feature described as verified, the release record must name the release, the commit, the image digest, the kind of test, the date, whether it was a real or mocked run, the scenario and the known limits. For "available" wording, it must also name the distribution address or the actual start procedure.
# evidence record shape used at release time
release: 0.7.0
commit: <sha>
image_digest: <sha256:...>
test: live provider run · approval · resume
date: 2026-10-XX
real: true
limits: single provider, single project
This portal does not reproduce screenshots as proof. A screenshot shows an interface, not a runtime behaviour; the evidence record is the source.
Current matrix
| Area | Status | Limit |
|---|---|---|
| Run engine, model gateway, read-only tools | Verified | Single container, single project scope. |
| Trace, timeline and exports | Verified | Export formats v1 and v2; credentials redacted. |
| ask_owner, request_approval, waiting, resume | Verified | Restart and concurrency handled; expiry is a separate event. |
| Budget guard, context checkpoints | Partial | Control limits are enforced; provider token caps are not absolute. |
| Eleven-tab Workbench shell | Partial | Observed in the 0.9.1 interface (2 November 2026); not an independent code audit. |
| Conversation threads | Preview | UI tree present; context pass-through needs a test. |
| Files, Consoles | Preview | Synthetic data; no write, PTY or SSH. |
| Prompt Designer, microphone | Preview | Visual only. |
| Editing, Git write, shell, browser | Planned | Stages 008 to 010. |
| Project, knowledge, skills | Planned | Stage 011. |
| Guild runtime | Planned | Stage 012. |
| Vault, OAuth, MCP | Planned | Stage 013. |
Run lifecycle
A run is the unit of governed execution. It is created from a mission contract, executed server-side and persisted at every transition.
request → effective configuration (project · agent · model · effort) → context builder (L0–L4, pinned sources) → provider call → tool proposal → permission guard (allowed · denied · approval required) → executor → result persisted → next call … or a terminal state
States
| State | Meaning |
|---|---|
| queued | Accepted, waiting for capacity. |
| running | Executing model or tool work. |
| waiting_input | A question to the owner is open. |
| waiting_owner | A decision is required outside the tool loop. |
| waiting_approval | A specific operation is held for authorisation. |
| completed | Finished with a recorded result. |
| failed | Ended with an error that is part of the record. |
| interrupted | Stopped by the environment or a shutdown. |
| cancelled | Stopped on request. |
Waiting is a state, not a loop
Questions and approvals persist as waiting states. The engine does not poll a model to keep the run alive: an answer, a denial, an expiry, a cancel and a resume are separate recorded events. That is what makes a ten-minute decision cost nothing in tokens.
Recovery rules
- Checkpoints and persistence bound how much work a reconnect can repeat.
- Answer and approval handling is idempotent; a repeated submission does not double-apply.
- Continuation is claimed with a lease, so two workers do not resume the same run.
- When the outcome of a non-idempotent tool is unknown, recovery fails closed and asks. No exactly-once guarantee is claimed for arbitrary side effects.
Object model
One chain carries the work, and the surrounding objects are references to it rather than copies.
Organization → Project → Thread → Session/Conversation → Run → Step
├─ Model Call
└─ Tool Call
related: Guild · Agent · Mission · Task · Release · Decision
Knowledge Item · Skill · Integration · Credential · Grant
Artifact · Review · Budget · Approval · Checkpoint · Trace Event
Identifiers are stable across the interface and the runtime. A "task" in the Project tab and a "task" referenced by a run are the same object; separate copies for display would make the ledger lie.
Thread is not a session. A thread is the shared, revision-pinned memory of several conversations. A session is one conversation with its own history and runs. Merging the two would either leak context or lose the record.
Model gateway
The gateway selects a concrete provider offering, not a marketing model name. Two selectors are coupled: the model and the thinking effort that the offering actually supports.
providerId deepseek providerModelId deepseek-chat offeringId pay_per_use · direct billingMode pay_per_use | subscription protocol chat-completions | responses | other capabilities tools · streaming · vision · json reasoning off | low | medium | high | extra_high | fixed | unsupported contextCapacity 128k pricingSource provider price list, dated availability live | degraded | unavailable credentials reference only, never the secret
Illustrative field shape. Values vary per offering and are read from the provider catalogue at run time.
Effort is mapped, not forwarded
"Off" is not the same as "no parameter" when the API distinguishes them. A universal reasoning field is not sent to every provider; the gateway maps the requested effort onto each protocol and records the effective value in the trace.
Billing modes are separate
A subscription allowance, a pay-per-use charge, a list-price equivalent and a local estimate are four different numbers. They are reported separately, and a missing price is shown as unknown. External inference through OpenCode Go is one offering among others; it is not the runtime and there is no automatic paid fallback.
Tools, skills and permissions
A tool is an atomic, versioned operation with a schema, a risk class, a timeout and a budget. A skill is a versioned procedure that uses tools. An agent is an executor with a mandate, a model, tools, skills and a budget.
Available today
Designed, not shipped
Write and patch operations, terminal and SSH sessions, browser automation, media analysis, document extraction, task and release operations, knowledge and Canon proposals, skill discovery and integration calls. The catalogue is a target, not an inventory. Nothing in it is callable today unless it appears in the list above or in the current release record.
Permission guard
tool_call → identity (user · agent · project) → grant lookup (scope · resource · risk) → decision allowed | denied | approval_required → execution only after the decision is persisted
Least privilege applies at user, project, guild, agent, tool and resource level. A model cannot widen its own grant, extend its budget or approve its own operation. Denied and expired are not consent.
Context and provenance
Context is assembled in layers, with explicit provenance and a bounded window.
| Layer | Content | Authority |
|---|---|---|
| L0 | Global binding instructions | Highest; cannot be narrowed by a project |
| L1 | Project policy, decisions and Canon | Binding within the project |
| L2 | Active mission or stage | Current scope |
| L3 | Task, run and decisions | Working state |
| L4 | Sources loaded on demand | Cited, not absorbed |
Provenance labels
A generated summary is not a canonical fact. A model hypothesis does not become policy. Canon changes are proposed and accepted explicitly, with the revision and the approver recorded. Contradictions are surfaced rather than blended into a confident paragraph.
Execution trace
Three views of the same events, with different purposes.
Event history
What happened, in order: states, calls, approvals, errors.
Timeline
The run as a readable sequence, including waiting time.
Forensic trace
Raw spans, timing, usage and redaction, for diagnosis.
model_call provider · model · offering · effective effort
tokens in/out · cache hit/miss · TTFT · latency
tool_call name · version · risk · decision · duration
span wall time · active time · waiting time
state queued · running · waiting_* · completed
links approval · checkpoint · artifact · error
Timestamps are UTC. Exports redact credentials; the trace is a record of what the process did, not evidence that the rule behind it was correct.
Approvals and security
Approval is an object with scope and an immutable fingerprint: it authorises a specific operation or artifact version, not "whatever the agent does next".
- Approvals record who, when and for which fingerprint; a changed operation invalidates the old approval.
- Tenant boundaries are enforced before execution, not by prompt instruction.
- Secrets are referenced, never rendered to the model or written into the trace.
- Agent environments are isolated; there is no default host socket and no unrestricted shell on a production host.
- The owner's own shell is not an agent grant. The two are different subjects.
Vault: planned. A credential and OAuth lifecycle with per-project grants belongs to stage 013. Until then, credentials are managed operationally and the interface does not claim a vault it does not have.
Files, Git and Consoles
| Surface | Now | Next |
|---|---|---|
| Files | Preview two-panel layout, synthetic content | Read, write, move, upload, permissions (008) |
| Code | Read-only tools via the agent | Editor, diff, Git status and commit (008) |
| Consoles | Preview no PTY, no SSH | Local and remote sessions, attach/detach (009) |
Surfaces are not the same domain. Files manages resources independently of Git; Code understands the repository; Consoles is the operator's terminal. The agent's execution trace is not the owner's console, and neither is a substitute for the other.
Integrations and MCP
Integrations give an agent an authorised capability in another system. A project sees only the connections and grants assigned to it; it does not inherit every secret in the organisation.
Designed scope for stage 013: Git and Forgejo, Google Workspace through OAuth, generic HTTP, MCP client and server, mail and calendars, external task systems, infrastructure, registered tools, connection tests, grant scopes and usage history.
No SDK, no published endpoints. This page does not document an API that does not exist. When an interface is published, it will carry a version, a schema and a deprecation policy.
Deployment and backup
The reference deployment is one container, one durable volume and a web interface. It is running that way on the project's own storage host; public distribution is later work.
- Shape
- Single OCI/Docker container, Linux
- Data
/datamounted from the host, persistent- Database
- SQLite with additive migrations
- Upgrade
- New image, migration, verification; rollback restores the matching data snapshot
- Backup
- Filesystem snapshot of
/data, not only the database - Distribution
- Planned: OCI image, Unraid template, installer and diagnostics (016)
What a release record contains
Commit, branch, image digest, schema version, migration evidence, test results, backup reference and rollback boundary. A deployment from an uncommitted tree without independent review does not meet the intended discipline.
Rollback is not just a previous image. The database must be consistent with the binary. A rollback therefore restores the matching snapshot instead of running new schema against an old build.
Roadmap
Stages end at an owner acceptance gate. There are no public dates.
- 001–007Foundation, runtime, human boundary
Bootstrap, Workbench reset, run engine, gateway, trace, approvals, persistence, live acceptance.
- 008Files, editing, Git
Guarded write operations and repository flows.
- 009Console and shell
PTY, remote sessions, long-running processes.
- 010Research and browser
Fetching, automation and citations.
- 011Project, knowledge, skills, Designer
The planning and knowledge surfaces, with the full composer.
- 012Guild runtime
Delegation, parallel work, review at scale.
- 013–016Vault, multimodal, distribution
Grants and MCP, voice and vision, global administration and installation.
Design system
Two palettes, one geometry. Farm is the material language, not the interface theme: no farm decoration, no blue, cyan or violet in authored UI.
Daylight — Linen & Sage
Soil — Loam & Olive
Type and spacing
Neutral sans for the interface, readable monospace for code, JSON and identifiers. Reference sizes: prose 14.5–15 px, composer 14 px, code and forensic 12.5–13 px, metadata 11.5–12 px, sidebar 12.5–13 px. Contrast targets: 4.5:1 for body text and 3:1 for large text, measured on the rendered surface rather than assumed from tokens.
Logo rules
Dodecahedron: olive outer planes and one ochre face, transparent alpha. Minimum clearance of 0.20 of the symbol width. No stretch, rotation, glow, shadow, texture or added scenery. The production vector master and micro icon remain open items; the current symbol is the approved direction, not a final technical master.