feat(tess): add configurable Pi interaction service (#728)
All checks were successful
ci/woodpecker/push/publish Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful

This commit was merged in pull request #728.
This commit is contained in:
2026-07-13 02:59:27 +00:00
parent 24b07d0f83
commit e3b5113be2
20 changed files with 550 additions and 7 deletions

View File

@@ -165,6 +165,19 @@ describe('composeContract — overlay composer', () => {
expect(composeContract('codex', fixture.home)).not.toContain('# pi runtime contract');
});
it('injects the configured operator-interaction tool policy into the runtime contract', () => {
const previous = process.env['MOSAIC_AGENT_TOOL_POLICY'];
try {
process.env['MOSAIC_AGENT_TOOL_POLICY'] = 'operator-interaction';
const out = composeContract('pi', fixture.home);
expect(out).toContain('# Fleet Tool Policy (operator-interaction)');
expect(out).toContain('Denied by default: coding/general orchestration claims');
} finally {
if (previous === undefined) delete process.env['MOSAIC_AGENT_TOOL_POLICY'];
else process.env['MOSAIC_AGENT_TOOL_POLICY'] = previous;
}
});
// ── Persona contract injection (A3b) ──────────────────────────────────────
// composeContract reads MOSAIC_AGENT_CLASS and injects the resolved persona
// (override-aware). Save/restore the env so these tests don't leak state.