Skip to main content

SHEET 06 OF 41

/DOC/:SLUG

PART:
03 DOCUMENTATION
CIRCULATION:
PUBLIC
SOURCE:
pages/Doc/[...Slug].astro
AS OF:
2026-12-02

Air is the persistent background daemon that offloads update management, file indexing, cryptographic operations, and health monitoring from the main editor process.

/Elements

Air

Air is the persistent background daemon that offloads update management, file indexing, cryptographic operations, and health monitoring from the main editor process.

PUBLISHED ELEMENTS Source/Content/doc/air.md UNAVAILABLE UNAVAILABLE ARCHITECTURE 0

STATUS UNAVAILABLE NEXT OPEN THE ELEMENT'S MANUAL - IT DESCRIBES THE THING THE CAPTURE WOULD HAVE SHOWN.

# PLATE_01 / AIR

FIGURE: The capture this record's evidence would show: vapor in low light macro.

The manifest is in the build and the plate beside it is not. The capture it describes is a texture study of the element's material, not a screenshot of its interface.

SUBJECT:
VAPOR IN LOW LIGHT MACRO
MANIFEST:
Public/Evidence/Air/manifest.yaml
STATE:
MANIFEST PLACEHOLDER
PLATE:
UNAVAILABLE

SOURCE: Public/Evidence/Air/manifest.yaml

Mermaid diagram

Overview 📋

Attribute Value
Language Rust (edition 2024)
Crate type Binary (Air) + library (AirLibrary, for integration tests)
IPC gRPC (tonic) on [::1]:50053, service AirService
Dependencies tokio, tonic, tonic-prost, prost, reqwest, ring, sha2, Common, Mist, Vine
Managed by Mountain ProcessManagement
  • A persistent Rust sidecar process that runs alongside Mountain
  • Handles resource-intensive operations to keep the main editor process responsive
  • Operations include: update management, file indexing, cryptographic operations, and background downloads

Architecture 🏗️

Air is structured around a central gRPC server that receives task delegation from Mountain. Internal modules handle distinct responsibilities.

Mermaid diagram

Boundary and Ownership 🧱

Air owns work that is slow, background or security-sensitive. It does not own the window, the workbench or the extension host - those belong to Mountain, Wind/Sky and Cocoon.

Concern Owner Where it lives in Air
Update check, download, verify Air Source/Updates/, Source/Downloader/
Binary and payload signing Air Source/Authentication/, Source/Security/
Workspace content indexing Air Source/Indexing/
Download queue and resume Air Source/Downloader/
Resource metrics and health Air reports; Mountain decides Source/Metrics/, Source/HealthCheck/
Process spawn, restart, timeout Mountain not in Air
Window, workbench, extensions Mountain, Wind/Sky, Cocoon not in Air

The boundary is two-way. Air serves AirService on [::1]:50053 for Mountain to call, and it is also a client: Source/Mountain/MountainClient.rs holds the connection it uses to send heartbeats and progress events back. That is why the crate ships both a binary and a library - AirLibrary is what the integration tests link against.

The module layout, the full RPC surface, the lifecycle, the configuration schema and the current limitations are Air - Deep Dive’s subject. This page states the role and the boundary.


Services 🔌

Update Manager 🔄

The update manager owns the full lifecycle of application updates:

Phase Operation Description
Check CheckForUpdate HTTP GET to update server for release manifest
Verify VerifyChecksum SHA-256 verification of downloaded artifact
Stage StageUpdate Cache update binary in staging directory
Apply ApplyUpdate Replace running binary on next restart
Rollback RollbackUpdate Restore previous version on failure

Download Manager 📥

The resilient download manager handles extension downloads, language server binaries, and dependency fetching:

Feature Implementation
Resume HTTP Range headers for partial download resume
Retry Exponential backoff with configurable max attempts
Progress Streaming progress reporting to Mountain via gRPC
Bandwidth Configurable rate limiting per download
Concurrent Parallel download queue with configurable concurrency

Indexing Service 🔍

File indexing builds and maintains a searchable content index of the workspace:

  1. File system walker discovers files (respecting .gitignore and exclude patterns)
  2. Language-aware content extraction (plain text, code tokens, symbols)
  3. Inverted index construction for fast text search
  4. Incremental indexing on file system change events
  5. Index persistence across daemon restarts

Authentication Service 🔐

Manages sensitive cryptographic operations:

  • Binary signing for update authenticity verification
  • Secure token storage for remote service authentication
  • Login flow orchestration for cloud services
  • Key generation and rotation for local encryption

Data Flow 📊

Update Check Flow 🔄

Mermaid diagram

Download with Progress Flow 📥

Mermaid diagram

Startup Sequence 🚀

sequenceDiagram
    participant M as Mountain
    participant A as Air
    participant V as gRPC server ([::1]:50053)
    M->>A: spawn detached via AirStart
    Note over M,A: AIR_GRPC_ADDRESS, AIR_GRPC_BIND_ADDRESS, AIR_LOG_DIR
    A->>A: parse CLI, initialise tracing, load Air.toml
    A->>V: bind AirService
    A->>M: MountainClient connects back
    loop every 5 seconds
        M->>A: Heartbeat
        A->>M: Heartbeat + resource usage metrics
    end
    M->>A: dispatch background work
1. Mountain spawns Air via Binary/Service/AirStart.rs
   - Sets AIR_GRPC_ADDRESS and AIR_GRPC_BIND_ADDRESS to [::1]:50053
   - Sets AIR_LOG_DIR (default /tmp/air-log) and pipes stdout/stderr into
     Mountain's dev log
   - Spawns detached: Mountain holds no Child handle, so Air's lifecycle is
     independent of Mountain's boot path

2. Air Binary::main() executes
   - Parses CLI arguments
   - Initializes tracing/logging
   - Loads Air.toml (with hot-reload)

3. Air starts the gRPC server on [::1]:50053
   - Registers the AirService handlers
   - Begins listening for incoming connections

4. Air's MountainClient connects back
   - Registers available capabilities and exchanges version information

5. Heartbeat monitoring begins
   - Both sides send Heartbeat every 5 seconds
   - Air includes resource usage metrics in its heartbeat
   - Mountain detects timeout after 3 missed heartbeats

6. Air signals ready for task processing
   - Mountain begins dispatching background work

Configuration ⚙️

Air reads one file, Air.toml, from the platform config directory - <config_dir>/Air/Air.toml (~/Library/Application Support/Air/Air.toml on macOS). The schema requires SchemaVersion and profile and groups the rest into sections: grpc, download, indexing, logging, authentication, performance, update. Any field can be overridden from the environment as AIR_<SECTION>_<FIELD> - grpc.bind_address becomes AIR_GRPC_BIND_ADDRESS, which is exactly what Mountain sets when it spawns the daemon.

The full schema, the defaults and the hot-reload behaviour are on Air - Deep Dive.


Funding 💎

Air is developed as part of the CodeEditorLand project, funded through the NGI0 Commons Fund, a grant programme of the European Commission’s Next Generation Internet initiative.


Project Maintainers: Source Open (Source/[email protected]) | GitHub Repository | Report an Issue

The record this page documents, as the site files it: the six facts the claim is checked against, and the three files the manual names to check it.

WORKING, 06

FORM:
BACKGROUND SERVICE
WRITTEN IN:
RUST
BOUNDARY:
LOOPBACK DAEMON
DEPENDS ON:
MOUNTAIN
EVIDENCE:
MANIFEST PLACEHOLDER PLATE NOT IN BUILD

# TRACE / AIR 03 STEPS

  1. 01 Source/Binary.rs THE DAEMON BINARY
  2. 02 Source/HTTP/Client.rs THE UPDATE CLIENT
  3. 03 Source/Library.rs WHAT THE CRATE EXPORTS

SOURCE: /DOC/DEEP-DIVE-AIR

Elements, 17 PAGES, page 1 of 17

THE LAYER'S INDEX

NEXT: /BLOG 04 BLOG

NOTES FROM THE BUILD, NEWEST FIRST

〈06〉 /DOC/:SLUG 41 SHEETS AS OF: 2026-12-02