feat(ai-psychosis): add pushback_count + domain_context state fields

This commit is contained in:
Kjell Tore Guttormsen 2026-05-01 17:06:09 +02:00
commit 080f2414ad
4 changed files with 14 additions and 0 deletions

View file

@ -11,6 +11,7 @@ function freshState() {
tool_count: 0, edit_count: 0,
last_event_epoch: 0, burst_count: 0,
dep_flags: 0, esc_flags: 0, fatigue_flags: 0, val_flags: 0,
pushback_count: 0, domain_context: null,
last_warning_epoch: 0,
};
}

View file

@ -46,4 +46,13 @@ describe('session-start', () => {
assert.equal(out.continue, true);
assert.ok(!out.hookSpecificOutput);
});
it('initializes pushback_count and domain_context fields (v1.1.0)', () => {
dir = setupTestDir();
runHook('session-start.mjs', { session_id: 's4', cwd: '/tmp' }, dir);
const state = readState(dir, 's4');
assert.ok(state);
assert.equal(state.pushback_count, 0);
assert.equal(state.domain_context, null);
});
});