Downcity
Core Concepts

Invocation Routing & Isolation

Explain why plugin calls do not cross agent environments and how routing works

Invocation Routing & Isolation

Short Answer

  • one running agent binds to one project root
  • plugin calls stay inside that agent by default
  • cross-agent routing only happens when you explicitly change host/port or target project

Main Call Path

1) CLI -> plugin

  1. resolve the target project
  2. resolve the daemon endpoint
  3. call /api/plugins/list, /api/plugins/control, /api/plugins/command, or another /api/plugins/* endpoint
  4. dispatch inside the current agent

2) plugin -> plugin points

Plugins should not depend on plugin-private implementation. They only trigger the extension points they define.

  • plugin-point dispatch is in-process
  • the same agent execution context is reused
  • shell is not involved by default

Endpoint Resolution Priority

  1. explicit CLI --host/--port
  2. DC_CITY_HOST/DC_CITY_PORT
  3. current project daemon metadata
  4. default 127.0.0.1:5314