EngineAdvanced L3

Lifecycle

Understand source loading, enabled hooks, frame ordering, and request-time evaluation.

The session loads L3 source as a module with optional config, app, and intent exports. At least one callable hook is needed for enabled evaluation.

Enable deliberately

config.enabled: false disables evaluation. When a callable hook exists and enabled is not explicitly false, the module is enabled. Examples state enabled: true so the intended behavior is visible.

An app-only module observes or coordinates frames without an intent decision. An intent-only module can review requests without a frame hook. A missing intent hook allows the request at this layer.

Source loading and reuse

The session reuses an already loaded module when its source is unchanged. When the source changes, it disposes the previous exported hooks and loads the new module.

That reload does not establish a migration or reset contract for your custom context.l3State keys. Start a fresh historical run when changing state semantics, or implement an explicit version/reset rule.

There is no separate L3 initialization export in this module contract. Initialize the state each hook needs when it runs, rather than assuming the frame hook always ran first.

Frame processing

The shared runner sets the current bar and invokes L3 before SJS, applicable L2/L1 algorithms, and native Pine. The runtime records frame diagnostics and awaits the L3 frame hook.

A long-running awaited provider call therefore adds work before later strategy processing. Design cadence, caching, and expiration explicitly; L3 does not automatically infer how often your analysis should run.

Intent processing

An execution method can invoke the intent hook during its own request path. The hook receives that request alongside an L3 frame scope. It may be called multiple times in one frame, including a close followed by delegated placement.

Returning false from app is not a substitute for returning false from intent. Use each hook for its actual contract.

Continue with context and modules.

On this page