For AI agents: the complete documentation index is available at https://scriptedalchemy.github.io/agent-bundle/zh/llms.txt, the full documentation bundle is available at https://scriptedalchemy.github.io/agent-bundle/zh/llms-full.txt, and this page is available as Markdown at https://scriptedalchemy.github.io/agent-bundle/zh/api/variables/index.pluginRootEnvAnchor.md.
  • 简体中文
  • Variable: pluginRootEnvAnchor

    const pluginRootEnvAnchor: "AGENT_BUNDLE_PLUGIN_ROOT" = 'AGENT_BUNDLE_PLUGIN_ROOT'

    Well-known environment variable every adapter injects into emitted stdio MCP server entries, holding the plugin install root in the target's native representation (${CLAUDE_PLUGIN_ROOT}, ${PLUGIN_ROOT}, ${CURSOR_PLUGIN_ROOT}, or Codex's ./ resolved against the entry's plugin-root cwd). Server runtime code should resolve persistent state and bundled assets against it instead of the process working directory, which not every host anchors to the plugin root. A user-declared env entry with this key always wins over the injected value.