contract library

Public surface of the v1 extension contract (PRD §7).

EXPERIMENTAL — types and behaviour exported here are subject to the versioning posture documented on LeonardExtension.

Classes

BusyState
Whether a extension reports the app as busy (settling, loading, animating, ...).
ExecutedAction
Record of a tool the harness just executed; passed to LeonardExtension.onActionExecuted.
ExtensionContext
Per-extension context handed to LeonardExtension.initialize.
ExtensionRegistry
Registry that owns extension lifecycle dispatch for the host binding.
JsonSchema
Opaque holder for a JSON Schema fragment describing a tool's input.
LeonardExtension
EXPERIMENTAL — v1 extension contract (PRD §7).
LeonardTool
A single tool exposed by an LeonardExtension.
PerceptionAnchor<T>
A synchronous snapshot bridge between imperative host state (Navigator, RouterDelegate, …) and a perception build.
RouteSnapshot
Value-type snapshot of route state — the exact triple the router observation fragment carries.
ToolResult
Outcome of an LeonardTool invocation.

Mixins

PerceptionExtension
Marks an LeonardExtension as the sole observation surface for its namespace. The binding's single observation loop emits a extensions.<namespace> fragment for every registered extension that mixes this in (subject to isPerceptionIdle); extensions that do NOT mix it in contribute no fragment (mirroring the retired observe() => null).

Typedefs

ExtensionHandler = Future<ServiceExtensionResponse> Function(String method, Map<String, String> parameters)
VM service extension handler signature.