API Reference
Cinder.setContextProvider
Register a runtime context provider so local resolution and fallback can use application state explicitly.
Need the shortest path?
Use Quick Start when you want the smallest working route → scan → graph → run flow first.
Something feels off?
Inspect scan output, graph state, active route/context, and dispatch in a practical order.
Need the full surface?
Browse all runtime methods, hooks, extension points, and lifecycle APIs.
Use setContextProvider() when command resolution needs explicit app state that does not live in semantic tags alone.
Example
ts
4 lines
Cinder.setContextProvider(() => ({
accountId: currentAccount.id,
region: currentRegion,
}));You can also return a promise:
ts
5 lines
Cinder.setContextProvider(async () => {
return {
accountId: await getSelectedAccountId(),
};
});Important behavior
resolve()uses a synchronous provider result when available, otherwise it uses cached contextrun()awaits fresh async context before local resolution happens- fallback requests can also include the injected runtime context
Related pages
Continue reading