Discover, load, and tear down Python extensions.
Opt into experimental, unstable dcode behavior.
Off by default; parsed by is_env_truthy (see there for the accepted truthy
values). Marks experimental runs in UI/trace metadata. Behavior behind this
flag may change or be removed without notice.
Return whether env var name is set to a recognizably truthy value.
Unlike bool(os.environ.get(name)), this does not treat "0" or
"false" as enabled. Use this for on/off flags where the user would
reasonably expect VAR=0 to mean "disabled".
Resolve all authorized sources in deterministic load order.
Return the extension directory beneath project_root.
Load one extension transactionally.
Resolve extension settings through the shared config generation.
Return whether extension execution is trusted for a project.
Load every authorized extension while isolating failures.
Retain the server-owned extension runtime for lifespan teardown.
Return sanitized metadata for the local provenance endpoint.
Run teardown callbacks while isolating individual failures.
Release server-owned extensions on the persistent event loop.
Factory-scoped registrar and read-only session context.
Each extension receives a dedicated instance, which attributes every registration to the extension's source without exposing mutable dcode application state.
Runtime mode exposed to extensions.
Default decision for project-authored extension code.
Registrations and isolated errors from one load pass.