Skip to main content

nemo_flow/api/
runtime.rs

1// SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2// SPDX-License-Identifier: Apache-2.0
3
4//! Advanced runtime state, callbacks, and scope-stack helpers.
5
6pub mod callbacks;
7pub mod global;
8pub mod scope_stack;
9pub mod state;
10
11pub use callbacks::{
12    EventSubscriberFn, LlmCollectorFn, LlmConditionalFn, LlmExecutionFn, LlmExecutionNextFn,
13    LlmFinalizerFn, LlmJsonStream, LlmRequestInterceptFn, LlmSanitizeRequestFn,
14    LlmSanitizeResponseFn, LlmStreamExecutionFn, LlmStreamExecutionNextFn,
15    LlmStreamExecutionRegistryRef, LlmStreamExecutionRegistryRefs, ToolConditionalFn,
16    ToolExecutionFn, ToolExecutionNextFn, ToolInterceptFn, ToolSanitizeFn,
17};
18pub use global::global_context;
19pub use scope_stack::{
20    ScopeStack, ScopeStackHandle, TASK_SCOPE_STACK, ThreadScopeStackBinding,
21    capture_thread_scope_stack, create_scope_stack, current_scope_stack, propagate_scope_to_thread,
22    restore_thread_scope_stack, scope_stack_active, set_thread_scope_stack,
23    sync_thread_scope_stack, task_scope_push, task_scope_remove, task_scope_top,
24};
25pub use state::NemoFlowContextState;