observe mode or apply them in enforce mode.
Initialize
cascadeflow.json or cascadeflow.config.json, and built-in defaults.
Scoped Run
run() takes an optional policy object and a callback. The callback receives the active HarnessRunContext.
AsyncLocalStorage to preserve nested and concurrent run context.
Run Options
kpiWeights affects built-in model selection. kpiTargets is retained as policy metadata but is not currently used by the built-in scoring decision.
Summary and Trace
Function Policy Metadata
The root package exports the harness function wrapper asharnessAgent to avoid a naming conflict with CascadeAgent.
harnessAgent() attaches policy metadata. It does not create a scoped run automatically.
Errors and Reset
Current Instrumentation Scope
See Feature Parity before relying on Python examples in a TypeScript application.