Expand description
{pack_dir:@ns/name} expansion for an addon’s [mcp.env] (GH #727).
An addon that ships its content in a kind=skills pack must learn where
that pack was materialized. The author names the variable and states which
pack it refers to; lean-ctx expands the placeholder at wiring time against
the resolved dependency version:
[mcp.env]
LEAN_MD_SKILLS_DIR = "{pack_dir:@dasTholo/lean-md-skills}"Pure by construction: the store root is a parameter, never read from the environment here, so the expansion is a deterministic function of (declared env, resolved deps, store root).
No env-scrub change is required. super::env_scrub::apply_env applies the
declared env after env_clear(), so an expanded value reaches the child
without an allowlist entry — lean-ctx computed this value, it is not a host
variable smuggled through.
Functions§
- expand_
pack_ env - Expand every
{pack_dir:@ns/name}indeclared_envagainstresolved. - referenced_
packs - Every pack name referenced by a
{pack_dir:…}placeholder invalue.