# kcode-kennedy-kweb-loader
This crate projects durable Kweb nodes into `kcode_kweb_context` for Kennedy.
```rust
pub fn load_durable_batch(
manager: &kcode_kweb_manager::KwebManager,
context: &mut kcode_kweb_context::Context,
durable_ids: &[String],
) -> anyhow::Result<serde_json::Value>;
pub fn node_from_value(
value: &serde_json::Value,
) -> anyhow::Result<kcode_kweb_context::Node>;
```
`load_durable_batch` reads each canonical node ID, verifies that the returned node has the requested identity, and projects its fixed and recent connections and owner. The context is updated only after every requested node and required connection has been read and projected successfully; an error leaves it unchanged. The returned value is `{"loads":[...]}` in request order.
`node_from_value` decodes the legacy stored-node JSON representation used when restoring older context metadata.
The crate performs reads only. Callers retain ownership of roots, session policy, Kweb writes, tool dispatch, provider execution, and final commit.