Skip to main content

Module project_name_alias

Module project_name_alias 

Source
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§

ProjectNameAliasMiddleware
SpawnerLayer that drops the received alias into ctx just before spawn.

Constants§

PROJECT_NAME_ALIAS_KEY
Key under ctx.meta.runtime that downstream Operator code reads with get.