import { type HeadlessExperimentInvocationResult, type HeadlessExperimentScheduleEntry, type HeadlessJsonObject, type HeadlessJsonValue } from './HeadlessExecutionLedger'; export declare const ENGINE_HSPLUS_DETERMINISTIC_ACTION_SUBSET: "holoscript-engine-hsplus-deterministic-action-subset-v1"; export declare const ENGINE_HSPLUS_DETERMINISTIC_ACTION_SUBSET_V2: "holoscript-engine-hsplus-deterministic-action-subset-v2-numeric-builtins"; export declare const ENGINE_HSPLUS_DETERMINISTIC_ACTION_SUBSET_V3: "holoscript-engine-hsplus-deterministic-action-subset-v3-local-bindings"; export declare const ENGINE_HSPLUS_DETERMINISTIC_ACTION_SUBSET_V4: "holoscript-engine-hsplus-deterministic-action-subset-v4-host-bindings"; export declare const ENGINE_HSPLUS_DETERMINISTIC_ACTION_SUBSET_V6: "holoscript-engine-hsplus-deterministic-action-subset-v6-null-coalescing"; export declare const ENGINE_HSPLUS_DETERMINISTIC_ACTION_SUBSET_V7: "holoscript-engine-hsplus-deterministic-action-subset-v7-packaged-traits"; export declare const ENGINE_HSPLUS_DETERMINISTIC_ACTION_SUBSET_V8: "holoscript-engine-hsplus-deterministic-action-subset-v8-lifecycle-effect-intents"; export type DeterministicHostBindings = Readonly unknown>>>>; export type DeterministicLifecycleOperation = Readonly<{ kind: 'bind_factory'; alias: string; factory: string; namespaces: readonly string[]; }> | Readonly<{ kind: 'emit'; event: string; payload: HeadlessJsonValue; }>; export interface DeterministicLifecycleEffectIntent { readonly schema: 'holoscript.lifecycle-effect-intent.v0'; readonly subsetId: typeof ENGINE_HSPLUS_DETERMINISTIC_ACTION_SUBSET_V8; readonly trait: string; readonly handler: 'on_spawn'; readonly operations: readonly DeterministicLifecycleOperation[]; readonly result: null; readonly dispatched: false; } export interface DeterministicHsplusActionRuntimeOptions { /** * Admit the v2 whitelisted deterministic numeric builtin table * (sqrt/sin/cos/acos/abs/floor/min/max over finite f64, fail-closed on * non-finite or negative-zero results). Off by default: the v1 subset is a * pinned receipt contract and must not change behavior. */ numericBuiltins?: boolean; /** * Admit bounded local bindings: plain `name = expr` assignments to bare * identifiers that are not parameters, `state`, or builtin names. * Reassignment is allowed, use-before-assign fails closed at validation, * locals never outlive the invocation, and only the plain `=` operator is * admitted for locals. Implies the v3 subset id, raises the composition * AST-node budget from 512 to 4096 (v1/v2 budgets stay pinned), and, * together with numericBuiltins, matches the wasm evaluator's admitted * grammar. */ localBindings?: boolean; /** * Inject the std host-ABI binding surface (v4 subset id): namespace objects * of pure host functions, e.g. the object returned by * createStdHostBindings() in packages/std/conformance/host-abi. Guest code * may then call `ns.fn(args…)` for declared namespace/function pairs only. * Namespaces exist solely in callee position — they are not values, cannot * be read, stored, or shadowed. Arguments cross as strict JSON; results are * re-validated on re-entry (strict JSON, finite numbers, no negative zero) * and a host throw fails the invocation closed. */ hostBindings?: DeterministicHostBindings; /** * Admit strict, short-circuiting null coalescing (`left ?? right`) under the * cumulative v6 subset id. Only `null` selects the right operand; false, zero, * and the empty string stay present. Requires the cumulative v4 engine * features (numericBuiltins, localBindings, and hostBindings). */ nullCoalescing?: boolean; } export interface DeterministicHsplusTraitRuntimeOptions { /** * Canonical pure host bindings used by statically lifted packaged factories. * The runtime never calls a factory or executes `@on_spawn`; it constructs * escape-proof namespace views from this injected table. */ hostBindings: DeterministicHostBindings; } export declare class DeterministicHsplusActionRuntime { private readonly actions; private readonly initial; private readonly numericBuiltins; private readonly localBindings; private readonly hostBindings; private readonly nullCoalescing; private state; constructor(source: string, options?: DeterministicHsplusActionRuntimeOptions); get subsetId(): string; get initialState(): HeadlessJsonObject; getState(): HeadlessJsonObject; invoke(entry: HeadlessExperimentScheduleEntry): HeadlessExperimentInvocationResult; } /** * Engine-native adapter for shipped top-level `@trait` source. * * The canonical HoloScriptPlusParser consumes the original source bytes and * preserves each authored handler body. Each invoked body is then parsed by * the same structured action parser/evaluator used above. Approved zero-arg * std factories are statically lifted from `@on_spawn`; ordinary handler * invocation never executes lifecycle side effects. `invokeLifecycle()` is a * separate bounded rail that evaluates `on_spawn` into an ordered, inert * effect-intent envelope. It never dispatches an event or host capability. */ export declare class DeterministicHsplusTraitRuntime { private readonly trait; private readonly hostBindings; private readonly handlerRuntimes; constructor(source: string, traitName: string, options: DeterministicHsplusTraitRuntimeOptions); get subsetId(): string; get traitName(): string; get initialState(): HeadlessJsonObject; getState(): HeadlessJsonObject; invokeLifecycle(): DeterministicLifecycleEffectIntent; invoke(entry: HeadlessExperimentScheduleEntry): HeadlessExperimentInvocationResult; } export declare function createDeterministicHsplusActionRuntime(source: string, options?: DeterministicHsplusActionRuntimeOptions): DeterministicHsplusActionRuntime; export declare function createDeterministicHsplusTraitRuntime(source: string, traitName: string, options: DeterministicHsplusTraitRuntimeOptions): DeterministicHsplusTraitRuntime; //# sourceMappingURL=DeterministicHsplusActionRuntime.d.ts.map