feat(protocol): deliver Activity Lease model (Zero Background Workers)
Following a critical collaboration to resolve Windows terminal pop-ups, we've delivered a more robust 'Passive Activity' architecture: - Terminology Pivot: Renamed 'Heartbeat' to 'Activity Lease' (Parking Permit model). - Side-Effect Extension: tools/bb.ts now automatically extends the agent's lease whenever they perform real work (any CLI command). - Passive Handshake: bb-init.mjs now only performs an initial registration/lease start, with no background loops. - 100% Silence: Removed all background process spawning, ensuring zero terminal disruption on Windows. - High Observability: Liveness is still tracked via the 15m threshold, but relies on activity rather than periodic pings. OPERATIVE: silver-castle SESSION: 2026-02-14-1330
This commit is contained in:
parent
5b9c0aa6a3
commit
e010e0b10b
6 changed files with 69 additions and 59 deletions
|
|
@ -6,7 +6,7 @@ import path from 'node:path';
|
|||
|
||||
import {
|
||||
registerAgent,
|
||||
heartbeatAgent,
|
||||
extendActivityLease,
|
||||
deriveLiveness,
|
||||
agentFilePath,
|
||||
} from '../../src/lib/agent-registry';
|
||||
|
|
@ -29,7 +29,7 @@ async function withTempUserProfile(run: () => Promise<void>): Promise<void> {
|
|||
}
|
||||
}
|
||||
|
||||
test('heartbeatAgent updates last_seen_at and increments version', async () => {
|
||||
test('extendActivityLease updates last_seen_at and increments version', async () => {
|
||||
await withTempUserProfile(async () => {
|
||||
const start = '2026-02-14T10:00:00.000Z';
|
||||
const next = '2026-02-14T10:05:00.000Z';
|
||||
|
|
@ -39,7 +39,7 @@ test('heartbeatAgent updates last_seen_at and increments version', async () => {
|
|||
{ now: () => start }
|
||||
);
|
||||
|
||||
const result = await heartbeatAgent(
|
||||
const result = await extendActivityLease(
|
||||
{ agent: 'active-agent' },
|
||||
{ now: () => next }
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue