# Global runtime 1.6.1

## Choose the amount of computing you need

- **Browser only:** formulas, SI units, parameter sweeps and Newton gravity preview work without Python, Docker, an API key or GPU. After loading, these calculations do not call model providers. Browser previews are not container evidence.
- **Reproducible CPU laboratory:** Python 3.11+, a running Docker installation using Linux containers, and internet access for the first dependency/image installation. Workers are capped at 1 CPU and 512 MiB; Docker, the host and the gateway require additional memory. Models are optional. No throughput or minimum total RAM is promised across machines.
- **Language or specialist models:** connect an existing local server, private GPU server or paid API. Model weights are not downloaded. Large local LLMs still need appropriate memory and compute. A small computer can use a remote model while running fixed science recipes locally.

Run `python3 doctor.py` for a read-only preflight.

| Computer | Start from the unpacked runtime directory |
|---|---|
| macOS | `bash Start.command` |
| Linux | `bash Start-server.sh` |
| Windows | Install WSL2 and a Linux distribution; install Python 3.11+ there and enable Docker Desktop WSL integration. Run `bash Start-server.sh` inside WSL, preferably from its Linux filesystem. `Start-Windows.ps1` can invoke the default distribution from PowerShell. This is not a native Windows port. |

The first launch installs pinned Python dependencies and builds the worker image. No GPU is needed for fixed recipes. Open `http://127.0.0.1:8765`. Pair the browser using `.venv/bin/python researchctl.py pair --origin http://127.0.0.1:8765`; enter the one-use code. The operator token stays on the compute node. Public HTTPS UI requires a configured HTTPS gateway/outgoing tunnel; it cannot call an arbitrary HTTP localhost service from a public domain. No inbound home-router port is needed.

## Model connection window

In **Lab → Models → Connect a model**, choose a contract, model ID, role, location, output language and limits. Download `model-connection.json`, move it to the runtime directory, then run:

```sh
.venv/bin/python researchctl.py endpoint --kind model model-connection.json --with-key
```

The CLI asks for the operator token and API key using hidden input. Omit `--with-key` for a server without a key. The browser never collects these keys. Registering a configuration does not run inference. The explicit connection check does: it counts against the same daily call limit, may be billed, and has a 30-second cooldown.

| Contract | Base URL examples | Expected protocol |
|---|---|---|
| Ollama | `http://127.0.0.1:11434` | `/api/chat`, `/api/tags` |
| OpenAI-compatible | LM Studio `http://127.0.0.1:1234/v1`; vLLM/llama.cpp through loopback SSH; paid compatible API | `/chat/completions`, `/models` |
| Anthropic | `https://api.anthropic.com/v1` | Messages API; key in `x-api-key` |
| Gemini | `https://generativelanguage.googleapis.com/v1beta` | generateContent; bare model ID, key in `x-goog-api-key` |
| Scientific JSON | Operator-supplied `/predict` URL | `zeroexternal.request.v1` → `zeroexternal.specialist.v1` |

Remote hostnames must be explicitly added to `ZEROEXTERNAL_ALLOWED_ENDPOINT_HOSTS` in the local `runtime.env`, with HTTPS and disclosure consent. For private GPU servers, an operator-created SSH loopback tunnel is also supported. See PROTOCOLS.md for specialist request/response schemas. Not every model implements these contracts; reasoning-only or future provider models may require a new adapter. No tool calls or returned code are executed.

Default model budget: 20 attempts/day/model (UTC), at most two simultaneous broker calls, 600 output tokens; operator limits: 1–1000 calls/day, 64–2048 output tokens and 10–120 seconds. Attempts are reserved persistently before sending, including timeouts and failed calls. No automatic inference retries. This is not a monetary spending cap: set billing limits with the provider. Truncated responses cannot propose parameters. `response_language` is a BCP 47 tag; protocol keys, formulas and unit symbols remain unchanged. A provider can still fail to follow the language instruction.

## Languages and contributing translations

The selector has Russian, English and eleven additional language packs for core controls. English covers the main workspace and laboratory catalog; advanced scenes and dynamically generated scientific text may retain their original language. Core packs are not complete translations of all scientific explanations. These translations have not received professional scientific review.

**Translation coverage → Export translation template** downloads a `zeroexternal.locale.v1` JSON dictionary. Set `locale` to a valid BCP 47 tag and translate its values; preserve English keys. Import it in the same menu. This allows new languages without changing scientific protocols; it does not mean every world language is already translated. Packs are text only, limited to 512 KiB, and stored in this browser. No private text is sent to external translation services. The selected language is shared with embedded views. Arabic has RTL layout; formulas and machine fields remain LTR. Original research text, artifacts and hashes are never rewritten by the UI language switch.

## Gravity

`newton_gravity` is a fixed Newtonian exterior spherical-source recipe. Inputs: `source_mass_kg`, `test_mass_kg`, `distance_m`, `source_radius_m`. Outputs include force, acceleration, potential, potential energy and circular/escape speeds when applicable. The recipe uses measured CODATA 2022 `G = 6.67430e-11 m^3/kg/s^2`, standard uncertainty `1.5e-15`; `c = 299792458 m/s` is exact. Source: https://physics.nist.gov/cuu/Constants/Table/allascii.txt.

Require `r >= R` and `2G(M+m)/(r c²) <= 1e-4`; central speeds additionally need `m/M <= 1e-3`. These conservative application thresholds are not exact error guarantees. Assume nonrelativistic motion and no external forces. Outside the declared domain the worker returns null predictions with `outside_model_domain`. The Schwarzschild scale alone does not establish a horizon. No GR field equations, interior-density solution or orbit integration is performed.

The formula editor keeps G as an explicit input so previous formula passports remain compatible. Its arithmetic result is separate from domain validation. The fixed gravity handoff uses CODATA G; edits to G remain custom scalar calculations. Generic uncertainty sampling is not a full physical error budget.

Gravity runs through the existing fixed-recipe CPU laboratory, with repeat calculation and review. Kaska's separately attested vertical path remains the existing Markov recipe; adding gravity there requires its own capability/verifier contract.

## Validation scope

Browser and independent Python arithmetic, scientific domain checks, API adapter fixtures and budget persistence are tested. Live paid APIs, native Mac Docker and Windows/WSL have not been executed in the development environment. Installation checks report the actual local environment instead of simulating a successful container launch.

## Kaska side window

The workspace opens a compact Kaska window on the right on desktop. On a small screen use the floating Kaska button. The Agent Runtime tab uses the **same laboratory iframe and paired browser session** as the full laboratory. Expanding, docking and minimizing preserve the session and hypothesis drafts. Minimizing does not log out or cancel a running experiment. Use Disconnect in Connection to revoke the browser session, or the existing stop control to cancel a run.

The optional Kaska web-board tab accepts an operator-entered HTTPS board URL without credentials, query or fragment. It loads only after Open. The board runs in a separate sandboxed frame and receives no runtime token, scientific context or internal messages. Its authentication stays with Kaska. Embedded sign-in can be blocked by third-party cookie rules, and Kaska may prohibit framing with CSP or X-Frame-Options. The Open separately link is always available after selecting a URL. These restrictions are not bypassed. Configuring the board window does not configure the scientific supervisor.

Only the board address and window preference are remembered in this browser; the board does not automatically reconnect on page reload. Native localhost HTTP Kaska is allowed only from a localhost HTTP runtime page. A public HTTPS Physics page requires HTTPS. The shipped UI was checked against an actual local gateway and a test board; the user's live Kaska deployment was not available for this check.
