Skip to main content

Interface: Runtime

Defined in: packages/core/src/runtime.ts:111

Complete runtime abstraction interface All @unblessed/core modules accept this interface for platform operations

Core APIs (always required):

  • fs, path, process, buffer, url, utils

Optional APIs (use feature detection):

  • images: PNG/GIF rendering (only needed by Image widgets)
  • processes: Child process spawning (Terminal widget, image tools)
  • networking: Network and TTY operations (GPM mouse - very rare)

Properties

fs

fs: FileSystemAPI

Defined in: packages/core/src/runtime.ts:117

File system operations


path

path: PathAPI

Defined in: packages/core/src/runtime.ts:119

Path manipulation operations


process

process: ProcessAPI

Defined in: packages/core/src/runtime.ts:121

Process operations (stdin/stdout/env/etc)


buffer

buffer: BufferAPI

Defined in: packages/core/src/runtime.ts:123

Buffer operations


url

url: UrlAPI

Defined in: packages/core/src/runtime.ts:125

URL operations (fileURLToPath for module resolution)


util

util: UtilAPI

Defined in: packages/core/src/runtime.ts:127

Utility functions (inspect, format)


stream

stream: StreamAPI

Defined in: packages/core/src/runtime.ts:129

Stream operations (Readable, Writable)


stringDecoder

stringDecoder: StringDecoderAPI

Defined in: packages/core/src/runtime.ts:131

String decoder for buffer/string conversion


events

events: EventsAPI

Defined in: packages/core/src/runtime.ts:133

Event emitter for event-driven programming


images?

optional images: ImageAPI

Defined in: packages/core/src/runtime.ts:140

Image processing (PNG/GIF rendering) - Optional


processes?

optional processes: ProcessesAPI

Defined in: packages/core/src/runtime.ts:142

Process spawning - Optional


networking?

optional networking: NetworkingAPI

Defined in: packages/core/src/runtime.ts:144

Networking and TTY operations - Optional