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 a MOSAIC_AGENT_CLASS=${shellEnvValue(agent.className)} line directly after MOSAIC_AGENT_NAME. Defaults to worker (the roster parser default). The companion goal A3b will read this env var to inject the matching persona contract.
Merge semantics
mergeAgentEnv keys preserved/regenerated lines by VAR= name, so on re-launch the regenerated MOSAIC_AGENT_CLASS overrides the existing one — no duplicate lines, no stale class. Verified with a new merge test.
Tests
Updated the deterministic EnvironmentFile test to assert MOSAIC_AGENT_CLASS=implementer (non-default class).
Added a default test (class omitted → MOSAIC_AGENT_CLASS=worker).
Added a shell-escaping/verbatim test (orchestrator).
Added a merge test proving re-launch updates (single line) rather than duplicates.
Gates
build (deps): FULL TURBO, 12/12 ok
vitest: 597 passed (183 in fleet.spec.ts)
typecheck: clean
lint: clean
prettier: clean
Do NOT merge — review only.
## 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 a `MOSAIC_AGENT_CLASS=${shellEnvValue(agent.className)}` line directly after `MOSAIC_AGENT_NAME`. Defaults to `worker` (the roster parser default). The companion goal A3b will read this env var to inject the matching persona contract.
### Merge semantics
`mergeAgentEnv` keys preserved/regenerated lines by `VAR=` name, so on re-launch the regenerated `MOSAIC_AGENT_CLASS` overrides the existing one — no duplicate lines, no stale class. Verified with a new merge test.
### Tests
- Updated the deterministic EnvironmentFile test to assert `MOSAIC_AGENT_CLASS=implementer` (non-default class).
- Added a default test (`class` omitted → `MOSAIC_AGENT_CLASS=worker`).
- Added a shell-escaping/verbatim test (`orchestrator`).
- Added a merge test proving re-launch updates (single line) rather than duplicates.
### Gates
- build (deps): FULL TURBO, 12/12 ok
- vitest: 597 passed (183 in fleet.spec.ts)
- typecheck: clean
- lint: clean
- prettier: clean
Do NOT merge — review only.
generateAgentEnv now emits MOSAIC_AGENT_CLASS (shell-escaped, right after
MOSAIC_AGENT_NAME) so a launching agent knows its class and the companion
A3b goal can inject the matching persona contract. Defaults to `worker`.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.