The host pubsub identity this runtime was built with, or undefined when the host configured none. Exposed so callers can verify the identity and so an agent runner sharing this runtime's isolate takes THIS instance rather than building a second feed.
The deployment's start reservations, or undefined for a host with no database to reserve against. Exposed for the same reason the fence is: the surfaces ABOVE this runtime reserve and claim against it, and two stores over two bindings would be two different tables answering the same key.
status() for a caller about to CONCLUDE something irreversible from what it reads — delete a wake record, spend an abandonment budget, resume a run.
Mastra answers a state read from an in-memory Run whenever storage is
unavailable or the row lookup comes back empty while this isolate still
holds the run, and that fallback reports the Run object's own status
('pending' until something updates it) with no suspended paths and no
requestContext at all. Projecting it is indistinguishable from evidence
about the run. Mastra stamps isFromInMemory on it at its single
construction site and the persisted branch builds its result field by
field without ever copying the marker, so this throws on exactly the reads
that did not reach storage. null still means the read SUCCEEDED and
found nothing.
status() stays the projection read, unchanged for every existing caller: a summary is still the best answer an HTTP status route can give.
Interrupt the in-isolate Mastra execution before waiting on the run lock. A deadline CAS is checked from persisted state first, so a stale sweep can never cancel a live run whose deadline was extended.
Optionalcas: RunLifecycleCasMarks idempotent terminal side-effect cleanup after every hook succeeds.
Is this run EXECUTING in this isolate right now?
The liveness half of the idempotent-start replay decision, answered from
the same #activeRuns map the cancel path uses — the runtime's own record
of runs it is currently driving. It is in-memory ON PURPOSE: liveness is a
property of an isolate that is running code, and any durable proxy for it
(a journal, a heartbeat, a timestamp) would keep saying "live" after the
isolate that wrote it was evicted, which is precisely the case the probe
exists to detect.
A false here therefore means "not running HERE", which is authoritative
only where the run has exactly one possible host — a run Durable Object
addressed by idFromName(workflowId:runId), or the thread object an agent
run is bound to. Callers that probe across an object boundary must ask the
object that owns the run, never their own runtime.
Reconcile an interrupted start against the token stored in the
authoritative workflow snapshot. Mastra's createRun() first persists a
tokenless pending shell; if no executed snapshot replaced it, the shell is
abandoned and must not become a successful FlowSafe run.
Register an agent that a runtime-owned workflow resolves by id.
Durable-agent workflows persist only the agent id. Keeping the raw agent on the same Mastra instance as the workflow lets a resumed run resolve it after isolate eviction, when the original DurableAgent instance is gone.
Reattach to a suspended run — the designed fresh-process pattern: createRun({ runId }) does not clobber an existing snapshot; resume() loads it and re-enters the engine at the suspended step.
The PROJECTION read: the best answer available about a run, which is what an HTTP status route, a broadcast frame or an existence check wants.
It can answer from Mastra's in-memory fallback, so a caller about to conclude something IRREVERSIBLE from what it reads — deleting wake state, spending an abandonment budget, resuming a run, deleting a row — must use RunnerRuntime.authoritativeStatus instead, which refuses a read that did not reach storage.
Idempotently cancel a live run from its persisted snapshot.
Trusted host variant that persists the exact identities allowed to retry.
CAS-guarded deadline transition driven through the owner Durable Object.
Trusted host deadline transition with retry principals persisted atomically.
The deployment execution fence this runtime enforces, or undefined when the host built an unfenced runtime. Exposed so the surfaces ABOVE the runtime — the run object's routes, the thread DO's signal routes — gate on the same store rather than constructing a second one, and so DurableObjectRunner can assert that a runtime built against a bound database is never fence-less.