Expand description
ProjectNameAliasMiddleware — a SpawnerLayer that propagates a
task-level project alias.
When Blueprint.metadata.project_name_alias is Some(_), service:: linker::link places this layer on the stack. Just before spawn it
inserts the literal value into Ctx.meta.runtime under the
project_name_alias key.
Downstream Operator / spawner code (for example mlua-swarm-server’s
Operator::execute) reads it via
ctx.meta.runtime.get("project_name_alias") and splices it into the
Spawn directive prompt body, handing MainAI the discipline “run
mcp__lds__session_create(root=..., alias=<this>) and inject
LDS Session Alias: <this> into every SubAgent dispatch prompt”. The
authoritative discipline lives in docs/project-name-alias.md, the
public doc.
Same shape as AgentResolver / ResolverMiddleware: a thin layer that
does not touch engine state.
Structs§
- Project
Name Alias Middleware SpawnerLayerthat drops the received alias intoctxjust before spawn.
Constants§
- PROJECT_
NAME_ ALIAS_ KEY - Key under
ctx.meta.runtimethat downstream Operator code reads withget.