Build the LangGraph stream config dict.
Injects the dcode version into metadata["lc_versions"] so LangSmith traces
can be correlated with specific releases. create_deep_agent supplies the
SDK version through the compiled graph config, and LangChain merges nested
metadata dictionaries so both versions survive at stream time.
Also records dcode_client_deepagents_version as a dcode-client diagnostic.
This describes the Deep Agents package installed alongside the TUI, which
can differ from a remote graph's Deep Agents runtime version.
Includes ls_integration metadata so LangSmith traces originating from
the app are distinguishable from bare SDK usage.
The app session thread identifier.
The dcode agent identifier, if any. When set, it is
surfaced in trace metadata under dcode_agent_name and
agent_name.
Sandbox provider name for trace metadata, or None if no
sandbox is active.