Skip to main content

HostActionEnvelope

interface

One action in flight, with everything an interceptor needs to judge it. The envelope answers who asked, from where, in what scope, and with what input. It is handed to interceptors, never constructed by a mod.

interface HostActionEnvelope<K extends HostActionId>

Import

import { HostActionEnvelope } from '@modular/sdk/view';

Members11

actionId
K

Which action is running.

actor
HostActor

Who caused this: the user, an agent, a mod, or a mod view.

id
string

Identifies this run. Distinct from `actionId`, which names the action.

input
CanonicalHostActionInput<K>

The payload as it stands at this point in the interceptor chain.

parentActionIdoptional
string

The run that caused this one, when it was dispatched from another.

scope
HostScope

Where it applies: root, a workspace, an editor, or a session.

signal
HostActionAbortSignal

Fires when the run is cancelled. Check it before slow work.

source
HostActionSource

How it was triggered: a command, a keybinding, a UI element, a tool.

startedAt
number

Epoch milliseconds when the run began.

traceId
string

Correlates the span this action writes to the causal trace.

workflowId
string

Groups every action in the same causal chain under one id.

Notes

category
Context