Skip to main content

Module expand

Module expand 

Source
Expand description

${CALIBAN_PLUGIN_ROOT} (+ ${CLAUDE_PLUGIN_ROOT} alias) expansion.

Other ${VAR} references are passed through unchanged — downstream loaders (MCP client, hooks) own their own env-var expansion rules.

This module delegates the actual parsing to caliban_common::expand::expand_vars with the plugin-root binding pre-seeded and a pass-through missing-var policy so unrelated vars survive untouched.

Constants§

PLUGIN_ROOT_VARS
Recognized aliases for the plugin root variable.

Functions§

expand
Replace every occurrence of ${CALIBAN_PLUGIN_ROOT} and the ${CLAUDE_PLUGIN_ROOT} alias in s with the plugin’s absolute path. Other ${VAR} references are passed through untouched.
expand_json_in_place
In-place expand every string in a serde_json::Value tree (objects, arrays, and string scalars). Numbers and booleans are left alone. Useful for stamping hook config / mcp config snippets.