Samōsya Technical

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.

Real screen Workbench v0.9.1, 2 November 2026, Soil theme. Header and status bar cropped to leave out internal host details. Full size ↗

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.

LabelMeans
VERIFIEDConfirmed by an adequate, reproducible test of the stated behaviour.
IMPLEMENTEDCode is delivered; full confirmation is missing.
PARTIALA limited scope works; the rest is not claimed.
PREVIEWInterface or mock only. No real operation behind it.
PLANNEDProduct direction. Not a delivery date.
BLOCKEDA known obstacle prevents progress.
UNKNOWNNo 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

AreaStatusLimit
Run engine, model gateway, read-only toolsVerifiedSingle container, single project scope.
Trace, timeline and exportsVerifiedExport formats v1 and v2; credentials redacted.
ask_owner, request_approval, waiting, resumeVerifiedRestart and concurrency handled; expiry is a separate event.
Budget guard, context checkpointsPartialControl limits are enforced; provider token caps are not absolute.
Eleven-tab Workbench shellPartialObserved in the 0.9.1 interface (2 November 2026); not an independent code audit.
Conversation threadsPreviewUI tree present; context pass-through needs a test.
Files, ConsolesPreviewSynthetic data; no write, PTY or SSH.
Prompt Designer, microphonePreviewVisual only.
Editing, Git write, shell, browserPlannedStages 008 to 010.
Project, knowledge, skillsPlannedStage 011.
Guild runtimePlannedStage 012.
Vault, OAuth, MCPPlannedStage 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

StateMeaning
queuedAccepted, waiting for capacity.
runningExecuting model or tool work.
waiting_inputA question to the owner is open.
waiting_ownerA decision is required outside the tool loop.
waiting_approvalA specific operation is held for authorisation.
completedFinished with a recorded result.
failedEnded with an error that is part of the record.
interruptedStopped by the environment or a shutdown.
cancelledStopped 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

read_fileglobgreplist_directoryask_ownerrequest_approval

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.

LayerContentAuthority
L0Global binding instructionsHighest; cannot be narrowed by a project
L1Project policy, decisions and CanonBinding within the project
L2Active mission or stageCurrent scope
L3Task, run and decisionsWorking state
L4Sources loaded on demandCited, not absorbed

Provenance labels

owner_decision source_evidence working_hypothesis generated_summary

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

SurfaceNowNext
FilesPreview two-panel layout, synthetic contentRead, write, move, upload, permissions (008)
CodeRead-only tools via the agentEditor, diff, Git status and commit (008)
ConsolesPreview no PTY, no SSHLocal 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
/data mounted 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.

  1. 001–007Foundation, runtime, human boundary

    Bootstrap, Workbench reset, run engine, gateway, trace, approvals, persistence, live acceptance.

  2. 009Console and shell

    PTY, remote sessions, long-running processes.

  3. 010Research and browser

    Fetching, automation and citations.

  4. 011Project, knowledge, skills, Designer

    The planning and knowledge surfaces, with the full composer.

  5. 012Guild runtime

    Delegation, parallel work, review at scale.

  6. 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.

Real screen The same build in Daylight. Both palettes are applied to the shipped components, not to a colour swatch only. Full size ↗

Daylight — Linen & Sage

canvas#F5F2E8
reading#FCFBF7
sidebar#ECEADF
border#D8D3C3
text#262B24
accent#3D6339
ochre#88601F
error#A44339

Soil — Loam & Olive

canvas#161713
sidebar#1D201A
surface#23261F
border#3B4337
text#EAE7DC
accent#B7D779
earth#B89D78
error#CE8277

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.