import type { Scope } from "intentx-core-z"; export type IntentContext = { payload: P; state(): Readonly; scope: Scope; signal: AbortSignal; setState(fn: (draft: S) => void): void; emit(type: string, payload?: T): Promise; }; export type EffectContext = { payload: P; state(): Readonly; scope: Scope; signal: AbortSignal; emit(type: string, payload?: T): Promise; }; export type BackendContext = { state(): Readonly; set(patch: Partial): void; signal: AbortSignal; emit(type: K, payload?: unknown): Promise; }; export type ComputedDef = Record; }) => any>; export type InferComputed = { [K in keyof C]: C[K] extends (...args: any[]) => infer R ? R : never; }; export type LogicApi = { runtime: any; state: Readonly>; computed: Readonly>; actions: A; emit:

(type: string, payload?: P) => Promise; };