LIMONATA — PROVIDER SETUP (1.4.9)

Release1.4.9 adds Qwen3.8 27B Q4_K_M for Linux, with a 32768-token context
and up to 8192 output tokens. Qwen3.6 27B retains its 32k/8k profile. Setup verifies the requested context and full GPU loading before
READY. Existing v6 launchers retain 8192/2048 until restarted with this update.
64k context has not been qualified on 24GB MIG hardware.

The CPU-pool fix sizes the Linux GPU model's CPU worker pools from the effective
container CPU allocation, including quota, affinity and cpuset limits. It uses
floor(available cores), at least 1 and at most 8 inference threads, with at most 2
local HTTP worker threads. A 6.8-core allocation therefore selects 6 inference
threads and 2 HTTP threads. The same explicit inference setting is used for
loading probes, normal requests and retries. These are worker-pool settings,
not a new OS CPU cap or a promise that the process has only that many threads;
the driver and runtime create additional support threads. CPU usage can still
be high during useful work. Performance must be checked on the actual GPU.
The launcher prints its chosen allocation and thread counts at startup.

The preceding RAM correction is retained. Cached model files can remain charged to the container after its previous model runtime
exits. The launcher now includes an estimate of clean, unmapped file cache that
Linux can reclaim, bounded by host availability and every container ancestor.
Mapped, shared, dirty and writeback memory is excluded. Missing or invalid
statistics do not add capacity. The terminal reports detected RAM, cache credit
and allocation; an actual shortage still blocks startup. Model RAM/VRAM
requirements and conservative resource-rental budgets are unchanged.

This release retains the structured-tool fixes and safe failure diagnostics from
1.4.5. A failed Linux tool generation may retry once within its original deadline;
already delivered tools are never replayed.

To update a running Linux model launcher, finish or stop the current project
request, press Ctrl+C in its terminal, then rerun the model command from your
account. The downloaded model/runtime archives are verified and reused. The
private model session ends when its launcher closes; project files remain in
your Limonata Chat account. Open Chat / API again after READY.

LINUX / RUNPOD: CHOOSE A MODEL AND RUN ONE COMMAND
================================================
On https://limonata.xyz/marketplace choose Connect your hardware > Linux server.
Choose a model and, optionally, filter by GPU memory. Copy the generated command
into the Linux GPU terminal. Example for Qwen3.8 27B:

curl -fsS https://limonata.xyz/provider/install.sh -o limonata-setup.sh && sh limonata-setup.sh --model qwen38-27b

If the computer is already linked, its existing connection is reused. Otherwise,
open the displayed Limonata link, sign in and approve the matching connection
code. This private model connection does not require a payout wallet. If several
listings are linked on this computer, use Choose AI model on the intended listing
and copy its command, which includes --listing automatically.

Setup installs a private, pinned Ollama runtime, downloads the selected pinned
model and checks a completed response with the entire model on the GPU. It also
checks structured tool calls. Wait for READY, then choose Open chat / API in your
account. Chat and OpenCode use this same model. Keep the terminal open; Ctrl+C
stops the model and private session. Closing the web page does not stop it.
Models are cached for next time. Interrupted downloads resume and all files are
verified before use. No Docker installation or manual model-server setup needed.
Existing Ollama services use their own port; this runtime binds only to loopback
on a separate port. The launcher makes authenticated outbound connections to
Limonata. It does not expose an unauthenticated public model API.

Linux catalog (Q4_K_M; limits are advertised by the running launcher):
- Qwen3.6 27B: 32768 context / 8192 output; about17.8GB model, 24GB GPU recommended.
  This larger context is verified locally; it is not a guarantee for every 24GB host.
The remaining Linux profiles use 8192 context / 2048 output:
- Qwen3.5 27B: about17.5GB model, 24GB GPU recommended.
- Qwen3-Coder 30B: coding MoE; about18.6GB model, 24GB GPU recommended.
- Qwen3.5 9B: faster alternative; about6.6GB model, 12GB GPU recommended.
The private runtime adds about1.5GB download on first use. These are memory
estimates, not guaranteed GPU compatibility. Setup checks real free GPU memory,
available system RAM, storage and a completed GPU response. For MIG it uses the
visible partition, not the parent GPU's total memory. Models that cannot load
fully on the GPU are not reported ready. Linux automatic loading currently
requires NVIDIA CUDA; existing AMD model APIs can use general setup below.
The catalog is curated and pinned, not a claim to include every public model.

Private sessions have no ten-minute limit with this launcher. Each response has
up to five minutes. Output streaming is completion-buffered. Tools execute in
the Limonata Chat workspace or API client, never on the GPU provider's host.
The session ends when stopped explicitly or when the launcher shuts down;
server-side conversations and session keys are then removed/revoked. Abrupt
network loss keeps the manual session saved but unavailable until reconnected.
This does not qualify the computer for full GPU or Linux VM rentals.

Official models: https://ollama.com/library/qwen3.6:27b
https://ollama.com/library/qwen3.5 and https://ollama.com/library/qwen3-coder

LINUX / RUNPOD: CONNECT AN EXISTING MODEL API
============================================
Without --model, the general setup assistant connects a model API that is
already running. This existing-service mode does not download a model. Installing Codex is not part
of the Limonata provider setup.

1. Start your model server in the Pod. For an existing Ollama installation,
   use "ollama serve" in another terminal and "ollama list" to see installed
   models. For vLLM or llama.cpp, use that server's actual API address.
2. Run the Linux command below. Choose "Connect an existing model API".
   The assistant queries the API and lets you select an actual model by number.
   You do not need to guess or retype a model name. Authentication is requested
   only if the API requires it. If the server is offline or has no model,
   follow the explanation, then retry or skip without restarting setup.
3. Approve the connection from your Limonata browser account, then keep the
   provider running. Model API connectivity does not qualify a GPU VM rental.

Ollama model list: curl -fsS http://127.0.0.1:11434/v1/models
GPU diagnostic: nvidia-smi
Container CPU/RAM limits are shown separately from physical server totals.
Missing Docker or KVM does not prevent connecting an existing model API.

Release1.4.3 recognizes NVIDIA MIG partitions even when the parent GPU reports
N/A memory. The assistant and account confirmation show the MIG profile from
"nvidia-smi -L". Profile sizes are not a measurement of free VRAM. Connect the
model API running on your assigned partition; this does not offer the whole GPU
for exclusive rental or prove that the model uses CUDA. No MIG settings change.

Release1.4.2 fixes reinstalling as root after the private Node runtime was
extracted with its archive owner. The installer uses a fresh verified cache
owned by the installing user, leaving the old cache and configuration intact.
Rerun the Linux install command below; no manual permission changes are needed.

========================================

Windows download
-----------------
For the private chat/API test on an already linked Windows PC with GPU test v4
completed, use https://limonata.xyz/assets/limonata-windows-ai-test-1.zip .
Extract it and open Start-Limonata-AI.cmd. Wait for READY, keep the window open,
then open the displayed marketplace link from your laptop using the same account.
Choose Open private chat / API. The test uses the existing machine connection;
it does not convert a pending server listing into a paid model or Linux VM.
The generic provider installer below registers hardware; it does not start this
resident test model when resuming a pending Windows server listing.

The private test lasts up to10 minutes; the Windows launcher has a15-minute hard
limit including startup. It reuses the verified Qwen0.5B model from GPU test v4
and downloads about37MB of pinned llama.cpp Vulkan server files on first use.
This small model tests connectivity, not coding quality. Context8192, output512,
one active request, 32KiB input and a90-second request limit apply. API/OpenCode
configuration is available inside the private workspace. SSE emits the completed
response; function-call quality depends on the model. No host tools execute.
End test revokes the keys and removes server-side conversations immediately.
Expiry denies access immediately; maintenance removes content within10 seconds.
A lost launcher connection ends the test after150 seconds without a heartbeat.
Deployment backups omit this content. External clients may retain their own
copies. No wallet, order, payment or public model endpoint is created.
The packaged native Windows execution still requires testing on the actual PC.

Download https://limonata.xyz/assets/limonata-provider-agent-1.4.9.zip
Extract the ZIP, then open Start-Limonata.cmd. Use your normal Windows account.
The launcher fetches the matching versioned PowerShell installer over HTTPS.
It verifies the package and supplies a pinned official Node runtime privately
if needed. It does not require a global Node installation or administrator mode.

Release1.4.0 adds rental workspaces: private conversations, rental-scoped API
keys and an OpenAI-compatible SSE/function-call protocol. The gateway waits for
the completed local model response before emitting SSE; this is not live token
streaming. Model ability to use tools depends on the installed model. Customer
tools execute in the customer's client, never as commands on the provider host.
The Windows GPU smoke test remains a separate diagnostic; it does not install
a resident model API or qualify a Windows-hosted Linux VM.

Linux CPU VM / SSH (new, hardware acceptance required)
-----------------------------------------------------
On a dedicated Linux x86_64 host without a validator, install QEMU/KVM,
cloud-image-utils (cloud-localds), netcat-openbsd and a user systemd manager.
The host needs usable KVM and unprivileged user namespaces. These packages and
host settings are not installed or changed by the Limonata agent. The VM worker
has a per-rental systemd service, CPU/memory limits and a hard lifetime limit.
Use an official Linux QCOW2 cloud image with cloud-init, OpenSSH and Python3.
Verify its publisher checksum/signature, copy it into a private owned directory,
chmod600 the image, and keep its SHA256. Do not select an untrusted image.
Run setup with --configure, choose the full Linux VM option, enter the absolute
image path and verified digest. The image is pinned; renters cannot change it
or request host mounts. QEMU profiles require their own provider configuration
and state, separate from model/Kata profiles. Native Windows is not supported
as a VM host. GPU passthrough is not implemented. The current test machine hosts
a validator, so no real VM was started here; qualify on dedicated hardware
before accepting customer rentals. A reported capability is not attestation.

A customer pastes their SSH PUBLIC key when booking. After activation, choose
Open workspace > Linux server, create a rental access key, and use the client:
https://limonata.xyz/assets/limonata-ssh-client-1.zip
Its README includes Windows PowerShell commands. Node22+ and OpenSSH are needed.
The client forwards encrypted SSH over outbound WSS. No provider public SSH
port is required. The renter has sudo inside the guest and may install software.
Outbound HTTP80/HTTPS443 goes through a pinned-address proxy that rejects private,
loopback, metadata and provider-interface addresses. Other outbound protocols,
public incoming ports, nested virtualization and persistent storage are absent.
The relay limits each connection to 1GiB total and a 4MiB/second burst budget;
exceeding these limits closes that connection. It is intended for administration.
The private overlay disk and SSH access end with the rental. Systemd enforces
teardown even if the provider agent exits. Recheck cleanup after a host crash.

Private chat and external clients
--------------------------------
Active model rentals expose Private chat and API / OpenCode in Open workspace.
Conversations survive page reloads for that rental, then are removed from the
canonical store at expiry/cancellation. New deployment backups omit their text.
Existing operator backups and copies kept by external clients are outside this
mechanism; do not retain raw rental-content backups. Provider operators can see
model inputs on their own machine. This is account privacy, not confidential
computing or a promise to erase copies held by another party.
API keys are shown once, usable for one rental and expire with it. Revoke a key
from the workspace. OpenCode configuration uses an environment variable instead
of embedding the secret. Set context limits for the actual model; the fallback
is conservative. 256KiB requests, 2048 output tokens and 90-second inference
limits apply. No image/audio input is accepted. Browser conversations are capped.

Release1.3.5 strengthens Linux installation paths and workload cleanup. Setup
refuses linked or shared writable parent paths instead of placing private files
there. A failed rental cleanup no longer prevents cleanup of other rentals; any
unconfirmed resource stays unavailable. Existing accounts and connection codes
are preserved. Update prepared Linux compute hosts to receive these protections.

Release1.3.4 fixes restarting after deleting a rig on the website. Setup checks
the saved connection before reusing it. If its key was revoked/expired or all its
bound listings were removed, choose "Keep a private backup and create a new
connection code?" (Enter accepts). The old standard configuration and internal
credentials are retained in a private sibling .previous-* folder. Select a CPU
budget or an installed model API, then accept "Connect this machine to your
Limonata account?" to display the new eight-character Connection code.

A valid existing connection shows its workspace URL and does not create duplicate
listings. Network failures, active/uncertain workloads, existing runtime locks,
custom core paths and Linux automatic-provider units preserve the old setup and
require review. External credential files are never moved. The backup is private;
do not copy its keys into the website. Windows native remains model-API only for
execution; CPU/GPU VM listings can be registered but stay offline.

Release1.3.3 improves Windows GPU detection: it tries other trusted NVIDIA driver
locations after a failed copy, including a bounded DriverStore lookup. Adapters
observed by Windows remain visible by their real model name in the assistant and
browser even when NVIDIA driver details are unavailable. AMD/Intel adapters are
shown too. Their UUID/VRAM are never guessed and observation alone does not make
them eligible for GPU rentals. Active-display, MIG and unknown-mode restrictions
are explained. Running setup again refreshes local detection while preserving
existing listings/keys; an already pending browser connection retains its saved
inventory until it is completed or expires. Native Windows VM support stays offline.

Release1.3.2 fixes the "[eval]:1" failure after the Node runtime download on
Windows PowerShell5.1. The installer queries Node's version directly instead of
passing inline JavaScript through legacy native argument quoting. A previously
downloaded runtime is verified and reused; private configuration is retained.

Release1.3.1 fixes the launcher rejecting an otherwise private application-data
parent owned by SYSTEM or Administrators. Use the new ZIP if an older launcher
said "Application data must be owned by your account." Do not change AppData
permissions or run as administrator. Existing private configuration is retained.

You can also use the Windows choice in the marketplace setup window to copy the
PowerShell command. The direct installer is https://limonata.xyz/provider/install.ps1
The execution-policy argument applies only to that child PowerShell process;
no system execution policy, Defender setting, GPU driver, firewall or WSL feature
is changed. Installer downloads, ZIP paths and existing installations are checked.

The assistant detects CPU/RAM/local storage/NVIDIA hardware and connects the PC
through the same short browser code as Linux. Account/payout approval, automatic
scoped-key delivery, private configuration, resume and price/resource review are
shared. There is no manual JSON or API-key copy step.
Private Windows settings: %LOCALAPPDATA%\LimonataProvider\config
Their DACL is protected for the current account, SYSTEM and Administrators.
Unsupported filesystems, untrusted writable ancestors, links and reparse points
are refused rather than treating POSIX mode bits as Windows security.

Windows native can serve an already installed local model API, such as a compatible
Ollama/vLLM-style service. Keep the provider console open while serving. Automatic
Windows startup tasks are not installed in this release. CPU/GPU VM rentals remain
pending/offline on Windows native; Docker Desktop/WSL detection does not certify
an isolated rental VM. The software does not download or invent an installed AI model.

Validation boundary: Windows scripts were parsed/tested with portable PowerShell,
and hardware/ACL/runtime fixtures plus browser/API pairing were exercised. This
environment has no physical Windows machine: native Windows DACL enforcement,
installer execution and hardware/GPU behavior still require a Windows acceptance
run. This is not a signed graphical .exe installer or a certified GPU VM release.

LIMONATA — CONNECT A LINUX PROVIDER
==================================

Recommended setup: automatic detection and account pairing
---------------------------------------------------------
Run this command ON THE LINUX SERVER you want to connect (for example after SSH):

  curl -fsS https://limonata.xyz/provider/install.sh -o limonata-setup.sh && sh limonata-setup.sh

The installer verifies the provider package and uses a supported Node runtime,
installing a pinned runtime privately if necessary. It does not need a global
Node installation and does not change your kernel, firewall, GPU drivers or
Docker daemon. Linux x86_64 and arm64 are supported. Alpine needs a supported
Node release from its distribution if one is not already installed.

1. The assistant detects CPU, available RAM, storage and NVIDIA GPU hardware.
   It respects cgroup limits and leaves resources for the host. You select what
   to offer; hardware specifications are filled in automatically. MIG/display
   GPUs are shown but are excluded from automatic exclusive-GPU proposals.
2. It shows a short-lived connection code and a Limonata verification URL.
   Open that URL in your browser, sign in/create an account, and compare the code
   with your server terminal. Only approve a machine you actually control.
3. Review the detected proposals, reduce allocations if desired, enter your region
   and hourly LIMO price, and link your payout wallet with a free signature.
   Choose Connect and publish, or save drafts. There is no listing fee or gas.
4. Confirm the account/payout identity in the terminal. The provider key and private
   configuration are created automatically; there is no API key to copy and no
   JSON configuration file to edit. A stopped setup can resume its private pairing
   for the remaining ten-minute connection window.
5. Choose a prepared service and start the provider, or finish local prerequisites
   first. Existing compatible model services can be discovered locally. CPU VM
   activation needs Kata and an owner-approved installed service image. Unprepared
   resources remain pending/offline; detecting a GPU does not install GPU VM support.

Default private configuration directory: ~/.config/limonata-provider (mode0700).
It contains provider.json, provider-key.txt and private state/connection files.
Never publish this directory, token files or a support dump containing them.
The browser never receives the machine's API secret; it is encrypted for that
machine during pairing. No hostname, MAC address, machine IP, model credential
or running-container inventory is sent with the hardware report.

Repeat the downloaded installer with --configure to finish service configuration
using the same saved listings/key, without creating duplicate advertisements:

  sh limonata-setup.sh --configure

Other options: --dry-run reports local detection without pairing or publishing;
--start starts configured services; --install-services reviews/installs optional
per-user service units after your explicit choice. --directory selects a private
configuration directory. The assistant does not enable machine services silently.
If no service can yet start, the resources remain connected to the account and
can be configured later without entering their hardware specifications again.

Local model discovery checks only known loopback endpoints after your choice.
Credentials, when needed, are entered privately and stored in a protected local
file; they are not transmitted to Limonata. The selected service/model must really
exist. This assistant does not invent an installed model or rent out GPU hardware
as a certified VM. The current Kata driver is CPU/server only.

The manual listing form and advanced profile configuration remain available.
Architecture: https://limonata.xyz/marketplace/security
Current package: https://limonata.xyz/assets/limonata-provider-agent-1.4.9.tar.gz

ADVANCED CONFIGURATION AND PROTOCOL REFERENCE
=============================================

LIMONATA PROVIDER AGENT — GPU, SERVER AND MODEL API RENTALS
=========================================================

What runs
---------
The provider agent connects OUTBOUND to the marketplace over HTTPS using a scoped
API key. It reports availability, leases only jobs for its installed listings,
provisions an approved local profile, and returns results. The marketplace never
fetches a URL supplied by a renter or listing. Model URLs and credentials stay
on the provider host. No inbound public provider port is required.

Customers obtain resource access only after confirmed escrow funding AND confirmed
onchain activation. Reservation/claim/renewal and duplicate completion handling are
durable. A cancelled rental immediately loses API access. Its capacity remains
unavailable until teardown is confirmed, preventing a second booking on a machine
that may still be running the previous tenant.

Install and register
--------------------
1. Create a marketplace account, link the payout wallet, and publish a GPU, server
   or model listing. Prices and payout identity remain fixed for a booked order.
2. Create a provider API key with providers:write scope. Select ONLY the listings
   installed on this machine and choose a key lifetime (default90days). Store the secret in the
   provider host's secret manager or protected environment, never in a listing,
   source control, a command line argument or a public endpoint URL.
3. Install Node.js >=20. Download the provider package from
   https://limonata.xyz/assets/limonata-provider-agent-1.4.9.tar.gz
   and extract it into a private provider directory. It includes provider/agent.mjs,
   runtime.mjs, service-path.mjs, guest-http.mjs and cleanup tooling
   (or use the corresponding marketplace/provider files
   from your checkout).
   The reference agent uses Node built-ins, with no npm dependency installation.
   For compute profiles install Docker >=28 with isolated gateway networking.
   CPU VM profiles additionally require a working Kata/KVM installation with the
   io.containerd.kata.v2 runtime. The driver never falls back to a plain container.
   Approved images need Node >=20 at /usr/local/bin/node for the fixed in-guest
   HTTP transport. GPU access in a trusted-container profile also needs a supported
   NVIDIA container toolkit; this does not create a GPU VM. Approved images must already
   contain their packages/models: workload networks have no internet route.
4. Write a PRIVATE provider JSON file (mode0600), using the actual listing ID.
5. From the extracted directory start:
   node provider/agent.mjs /absolute/private/provider.json
   From a source checkout use marketplace/provider/agent.mjs instead.
   Set MARKETPLACE_PROVIDER_KEY in the process environment using your host's
   secret management. Never paste that variable's value into a support report.

Model profile example (replace the listing ID and model name with your real ones)
-------------------------------------------------------------------------------
{
  "marketplaceOrigin": "https://limonata.xyz",
  "workerId": "my-model-host",
  "stateFile": ".limonata-provider-state.json",
  "listings": {
    "REPLACE_WITH_32_HEX_CHARACTER_LISTING_ID": {
      "kind": "model",
      "profileId": "default",
      "model": "REPLACE_WITH_EXACT_LISTED_MODEL_NAME",
      "url": "http://127.0.0.1:8000",
      "healthPath": "/health",
      "completionsPath": "/v1/chat/completions",
      "tokenEnv": "MY_LOCAL_MODEL_TOKEN"
    }
  }
}

The local endpoint must implement non-streaming OpenAI-compatible chat completions:
text messages, model, max_tokens, temperature and stream:false, plus tools/tool_choice and tool-result history when the model supports them. Replies need exactly
one assistant choice and integer prompt_tokens/completion_tokens usage. A configured
credential is sent as an Authorization: Bearer header only to that installed origin.
HTTPS external model connectors are supported when configured by the host owner;
plaintext HTTP is permitted only for literal127.0.0.1 or::1. Redirects are refused.

A model job never carries an endpoint URL or token from the marketplace. It carries
only the listed model, bounded conversation and optional function schemas/results. The provider must actually keep that model
loaded and ready on its own GPU/model runtime. Heartbeats do not certify GPU hardware.

CPU VM service profile (template; replace placeholders before starting)
-----------------------------------------------------------------------
{
  "marketplaceOrigin": "https://limonata.xyz",
  "workerId": "my-vm-host",
  "stateFile": ".limonata-provider-state.json",
  "watchdogFile": ".limonata-provider-watchdog.json",
  "listings": {
    "REPLACE_WITH_32_HEX_CHARACTER_LISTING_ID": {
      "kind": "kata",
      "isolation": "vm",
      "serviceHelper": "node",
      "profileId": "default",
      "image": "REPLACE_WITH_APPROVED_IMAGE_REPOSITORY@sha256:REPLACE_WITH_64_HEX_DIGEST",
      "containerPort": 8080,
      "memoryMb": 8192,
      "cpus": 4,
      "user": "1000:1000",
      "tokenEnv": "LIMONATA_SERVICE_TOKEN",
      "healthPath": "/health",
      "allowedPaths": ["/api"],
      "command": ["/usr/local/bin/node", "/app/server.mjs"]
    }
  }
}

This is a CPU/server VM service profile, not GPU passthrough or an SSH server.
The approved image must include its actual /app/server.mjs service and Node at
/usr/local/bin/node. The installed service must expose /health and the allowed
/api routes, and accept its configured token as Authorization: Bearer. Replace
the fixed command/paths with those of the approved service; this template does
not install an application or certify a third-party notebook's authentication.
An absent/misconfigured Kata runtime causes provisioning to fail.

The host chooses the exact digest-pinned image, fixed command, ports, path allowlist,
CPU and RAM permissions. A customer cannot supply runtime options, image, shell,
host mount, model credentials or provider URL. The example is a profile template,
not a claim that an image/model/provider has already been installed or verified.

Each rental receives a gateway-less isolated internal bridge and a non-root,
read-only workload with all capabilities dropped, no-new-privileges, PID/CPU/RAM
limits, limited log rotation and bounded ephemeral writable tmpfs. Kata executes
the workload in a VM with a separate kernel; plain Docker shares the host kernel.
No host ports, host filesystem, Docker socket or privileged mode are exposed.
The agent uses a fixed Node helper inside the rental through docker exec with
request data on stdin, rather than connecting from the host to a tenant IP.
Runtime identity, ownership labels, image, limits, network and mounts are inspected
before reuse. No default route, bridge gateway or external DNS is installed. Approved workloads should be
built for this restriction and should not rely on downloading dependencies at boot.
The per-order service token stays in the private provider state file. It is injected
only into the container's configured environment and provider-side HTTP requests.

Trusted-container/GPU profiles
------------------------------
Plain Docker requires kind:docker and the explicit isolation:trusted-container
declaration. Use this only for trusted workloads on a dedicated compute host;
unknown renters running code require VM isolation. For trusted GPU workloads set
gpuDevices:["GPU-REPLACE_WITH_REAL_FULL_GPU_UUID"] in the private profile. The old
gpus:true/all-GPU option is refused. Each UUID can belong to only one installed
listing in an agent; do not create a second agent to bypass that allocation.
The current Kata driver deliberately rejects GPU devices. A real GPU VM requires
separately qualified hardware/IOMMU/VFIO, drivers, device reset and isolation tests.
Neither a heartbeat nor capabilities metadata proves that a VM/GPU is attested.

VM isolation is not proof of GPU correctness or confidentiality from the host
owner. Providers must maintain the GPU/host stack and define their workload policy.
Kata/container profiles support bounded HTTP services (e.g. notebook/API access).
Full SSH access belongs to the separate QEMU CPU-VM profile described above.
There is no browser WebSocket terminal. Customer workloads and state are ephemeral at teardown;
providers must explicitly arrange a separate reviewed storage/backup service for
persistent data before advertising it.

Customer API
------------
All paths below are under /api/marketplace. Cookie requests require the normal
session Origin/CSRF controls. Bearer keys need compute:write for mutations and
orders:read for reads; owner identity is enforced in both cases.

POST /orders/:orderId/provision {"profileId":"default"}
GET  /orders/:orderId/access
  access.kind=model-api or reverse-http; startedAt/expiresAt Unix milliseconds.

POST /orders/:orderId/inference
  {"idempotencyKey":"unique-request-id","request":{
    "messages":[{"role":"user","content":"Your prompt"}],
    "max_tokens":512,"temperature":0.7
  }}
  ->202 {id,orderId,status:"pending",createdAt}

POST /orders/:orderId/requests
  {"idempotencyKey":"unique-request-id","request":{
    "method":"GET","path":"/api/status"
  }}
  POST requests may include body as a text/JSON-serialized string (max16KiB).
  Aliased route: /orders/:orderId/service/request.

GET /inference/:requestId
  ->pending, succeeded with response, or failed with a sanitized error.
  Model response has choices/usage; service response has status/contentType/body.
  A request ID is private to its owning buyer, never a public bearer credential.

POST /orders/:orderId/cancel {}
  Immediately revokes access, asks the host to stop, then closes/refunds the
  unserved portion using confirmed settlement. Completion billing is capped at
  cancellation time, so a slow teardown cannot add charges after access is revoked.

Input budgets: 32KiB prompt envelope;1..64 text messages;max_tokens1..2048;
4 pending requests/account and30 requests/minute/rental;non-streaming responses
up to64KiB transport, validated assistant content and integer token usage.
These token counters describe provider-reported usage; LIMO rental settlement
uses the agreed service duration and authenticated service receipts, not a
provider's unverified token count.

Provider routes (providers:write API key only)
----------------------------------------------
POST /providers/jobs/claim {workerId,listingIds:[...]}
  ->{job:null} or{id,orderId,listingId,type,payload,leaseToken,leaseUntil,attempt}
POST /providers/jobs/:jobId/renew {leaseToken}
POST /providers/jobs/:jobId/complete {leaseToken,result}
POST /providers/jobs/:jobId/fail {leaseToken,reason}
POST /providers/heartbeat {listingId,ready:true|false}

The agent renews a45-second lease every10seconds. Jobs expire after bounded time
and at most3 attempts. Old/foreign lease tokens cannot complete work. Provider
API keys are restricted by selected listing IDs, expire and can be revoked through
the account. Mixed scopes cannot bypass the selected listings. Rotate old keys
created before expiry/listing bindings were supported. No connector credentials, Docker
stderr or raw infrastructure errors are returned to customers. Prompts are discarded
from the durable job when a result is accepted. Response retention is at most 24hours and ends earlier when the rental ends.
Private chat history lasts only until rental expiry/cancellation. Deployment
backups omit request/response text and chat histories.

Operations
----------
Keep the reference agent and independent cleanup watchdog supervised. SIGINT/SIGTERM
stops new polling, marks installed listings unavailable and tears down local rentals.
The independent watchdog is required for agent crashes/SIGKILL or failed shutdown.
Existing active API access remains bounded by the marketplace rental expiry.
Failed teardown, a missing state entry or a timeout never proves capacity free.

For Docker/Kata hosts, start the watchdog in a SEPARATE supervised process before
the agent. Give it the same exact installed listing IDs and a private health file:

  node provider/watchdog.mjs /absolute/private/.limonata-provider-watchdog.json LISTING_ID [LISTING_ID...]

Set watchdogFile in provider.json to that health file (relative to the JSON or
absolute). The watchdog checks expiry every5seconds and needs no marketplace
API key. Its health must come from another live process and be at most15seconds
old; compute provisioning/HTTP access fails closed if this independent supervision
is absent. Model-only connectors do not need Docker cleanup supervision. This
package does not install/start system services automatically. Use the dedicated
provider host's service supervisor, not a blockchain validator's service units.

Renew/revoke provider keys through the account before their expiration. Loss or
revocation of the key stops new work and causes local shutdown; it is not a way
to keep charging an inaccessible rental. Host-level power loss, Docker outages
and teardown failures still need operator recovery; the platform does not reassign
that resource merely because its timer or availability report expired.

Only one unsigned, unexpired reservation per buyer is allowed across listings;
funded active rentals may span multiple resources. This limit is enforced under
the same durable transaction lock that reserves capacity.

The provider state file contains private per-instance service tokens; protect and
back it up separately from source. Do not run multiple reference agents against
the same state file: each worker gets its own private configuration/state and its
own listing IDs. Runtime state version2 is incompatible with old version1 records:
first stop/reconcile old instances and preserve the old state privately. Do not
delete state or locks to bypass the migration guard. Unattended host reboot/recovery
needs supervision and the independent cleanup policy for orphaned workloads.

Marketplace server must periodically call compute.expire() and compute.reconcile()
(and does so via the production HTTP service integration). These methods persist
and retry settlement receipt delivery after an RPC interruption. Confirmed payment
and onchain activation are required; no operator flag simply treats a request as paid.

Validation executed locally
----------------------------
node --test marketplace/compute.test.mjs marketplace/compute-security.test.mjs
Tests cover funding/activation gates, ownership, fresh availability, atomic booking,
listing-specific job claims, lease expiry/retry, private bounded inference,
request idempotency, durable settlement callbacks, cancellation-time billing,
confirmed teardown, offline-provider stop/refund, usable HTTP service and a real loopback model/poller cycle, bounded synchronous waits and client cancellation.

Real Docker integration:
MARKETPLACE_TEST_IMAGE=<locally installed digest-pinned Node image> \
  node marketplace/provider/docker.integration.mjs
This creates one temporary read-only non-root internal-network HTTP service,
checks actual trusted-container isolation, no published ports/default route/host
gateway, performs a real HTTP request through the in-guest helper and denies a
path outside the profile, then removes the
container and network. No production listing, keys or funds are used.
This Docker test does not qualify a Kata VM or a GPU. Test those separately on
the dedicated provider hardware before advertising their availability.
