# AIfra

AIfra is a Russian, agent-first SaaS for short-lived previews of already-built static sites. Public beta is enabled.

## Exact contract

- Input: a prebuilt directory/archive containing browser-only static files.
- Output: a preview URL and server-assigned expiry time.
- TTL: 48 hours; an update never extends the original expiry.
- Quotas: 3 active previews per source IP, 50 MiB uploaded and extracted per preview, 150 MiB active extracted content per source IP.
- Management: a secret token is returned once; only its hash is stored.
- Required: explicit accept_terms: true for create and update.
- Never supported: registration, billing, custom domains, server-side builds, user backend execution, SSR, functions, databases or user containers.

## Interfaces

- API origin: https://api.aifra.ru (use only when the announced beta/staging is enabled)
- Agent handoff: https://aifra.ru/docs/agent/
- CLI documentation: https://aifra.ru/docs/cli/
- REST documentation: https://aifra.ru/docs/rest/
- OpenAPI 3.1: https://aifra.ru/openapi.json
- MCP status: https://aifra.ru/docs/mcp/ (published local stdio MCP; no public remote endpoint)

## Install and connect

- Published npm package: https://www.npmjs.com/package/aifra/v/0.2.0-beta.1 (MIT, Node.js 24).
- Install in the trusted project: npm install --save-dev --save-exact --ignore-scripts --no-audit --no-fund aifra@0.2.0-beta.1
- After explicit terms consent: node node_modules/aifra/aifra.cjs deploy ./dist --api-origin https://api.aifra.ru --accept-terms --json
- For local MCP run node <absolute-package-path>/aifra.cjs mcp with AI_DEPLOY_API_ORIGIN and AIFRA_PROJECT_ROOT.
- Local MCP tools: get_deploy_instructions, create_preview, update_preview, get_preview_status, delete_preview.
- create/update accept directory relative to the configured project and accept_terms: true; delete requires confirm_delete: true.
- Tokens are stored privately by MCP and are never tool parameters or results.
- Suitable output includes static websites, HTML presentations and browser-only prototypes with index.html.
- npm availability is not automatic installation, Registry listing or endorsement.

## Rules and contact

- Terms: https://aifra.ru/legal/terms/
- Privacy: https://aifra.ru/legal/privacy/
- Retention: https://aifra.ru/legal/retention/
- Abuse: https://aifra.ru/abuse/
- Support: support@aifra.ru
- Terms version: 2026-09-17-v1; explicit acceptance is not blanket personal-data consent.

## Agent instruction

Read the AIfra ai.md and /docs/cli/ at the supplied website origin.
Check whether public beta is open; never invent an available API or MCP endpoint.
Use AIfra only for a prebuilt browser-only static directory with index.html.
If the task needs a backend, SSR, functions, a database, secrets, or permanent hosting,
explain the mismatch. Ask before building locally if that is not already authorized.
Before uploading, show the public exposure, 48-hour TTL and limits, and obtain explicit
terms acceptance. Use the pinned published aifra CLI or the already configured local MCP.
For direct REST, read /docs/rest/ and send only reviewed static output as raw application/zip.
Store the management token in a private file outside Git. Never print it, read it into
an agent conversation, include it in URLs, or follow upload redirects.
Return only the viewer URL and expires_at. Updates use the same ID and do not extend TTL.
Do not retry an uncertain POST automatically: it may already have created a preview.
Use source=unknown unless the calling client is known. Do not evade IP quotas with VPNs.
CLI and local stdio MCP are published as aifra@0.2.0-beta.1 on npm (Node.js 24).
Local MCP accepts a relative directory, not archive bytes or arbitrary URLs.
Do not pass management tokens into MCP tools. No public remote MCP endpoint is available.

Reviewed: 2026-09-17. This file is a convenience description, not a replacement for OpenAPI or server enforcement.
