feat(FN-3773): default non-ephemeral agents to active and add polling task

Non-ephemeral agents now default to `active` state on creation (FN-3773), with aligned test coverage across the agent store and dashboard routes. The even-realities plugin gains a polling notification system including a notification store, card rendering, diff logic, and API routes. Review state per

Fusion-Task-Id: FN-3773
This commit is contained in:
Fusion
2026-05-08 16:39:00 -07:00
committed by gsxdsm
parent 089c139bad
commit 7cb9ab78fe
4 changed files with 78 additions and 33 deletions

View File

@@ -559,7 +559,7 @@ export class AgentStore extends EventEmitter {
}
/**
* Create a new agent with "idle" state.
* Create a new agent with a default state based on ephemeral classification.
*
* For non-ephemeral agents, ensures `runtimeConfig.heartbeatIntervalMs` is
* persisted at creation time — previously it was only ever written when the
@@ -618,7 +618,10 @@ export class AgentStore extends EventEmitter {
id: agentId,
name: normalizedName,
role: input.role,
state: "idle",
// Non-ephemeral agents start active so they immediately participate in
// heartbeat scheduling; ephemeral/task-worker agents start idle and are
// activated by the engine when work is assigned.
state: ephemeral ? "idle" : "active",
createdAt: now,
updatedAt: now,
metadata,