feat(fleet): export MOSAIC_AGENT_CLASS into agent env (A3a) #663
Reference in New Issue
Block a user
Delete Branch "feat/a3a-agent-class-env"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
North Star A3a
Export the agent's class into its pane environment so the launcher can load the right persona.
What
generateAgentEnv(packages/mosaic/src/commands/fleet.ts) now emits aMOSAIC_AGENT_CLASS=${shellEnvValue(agent.className)}line directly afterMOSAIC_AGENT_NAME. Defaults toworker(the roster parser default). The companion goal A3b will read this env var to inject the matching persona contract.Merge semantics
mergeAgentEnvkeys preserved/regenerated lines byVAR=name, so on re-launch the regeneratedMOSAIC_AGENT_CLASSoverrides the existing one — no duplicate lines, no stale class. Verified with a new merge test.Tests
MOSAIC_AGENT_CLASS=implementer(non-default class).classomitted →MOSAIC_AGENT_CLASS=worker).orchestrator).Gates
Do NOT merge — review only.