feat(FN-4401): complete remaining auto-claim snapshot integration
Fusion-Task-Id: FN-4401 Fusion-Task-Lineage: c1b6c497-b22c-48d5-b1c8-299877bf09ac
This commit is contained in:
@@ -504,6 +504,7 @@ The `runtimeConfig` field on agents supports the following options:
|
||||
| `enabled` | `boolean` | `true` | Whether heartbeat triggers are enabled for this agent |
|
||||
| `heartbeatIntervalMs` | `number` | — | How often the agent should wake up for heartbeat checks (ms) |
|
||||
| `autoClaimRelevantTasks` | `boolean` | `true` | During no-task heartbeats, opportunistically claim unowned relevant todo tasks that align with the agent's role/soul |
|
||||
| `autoClaimCandidatesInPrompt` | `number` | `5` | Per-agent override for no-task candidate lines rendered in prompts. Integer `0-10`; `0` suppresses candidate injection. |
|
||||
| `heartbeatTimeoutMs` | `number` | — | Time without heartbeat before agent is considered unresponsive (ms) |
|
||||
| `maxConcurrentRuns` | `number` | `1` | Max concurrent heartbeat runs for this agent |
|
||||
| `runMissedHeartbeatOnStartup` | `boolean` | `false` | When enabled, if the server was down across this agent's scheduled heartbeat tick, fire one catch-up heartbeat at startup (only when `lastHeartbeatAt` is older than the resolved interval) |
|
||||
@@ -524,6 +525,16 @@ Project setting `heartbeatMultiplier` (default `1`) scales resolved heartbeat in
|
||||
|
||||
`allowParallelExecution` defaults to `true` when unset; setting it to `false` is serialized explicitly so operators can enforce non-parallel heartbeat/executor behavior for that permanent agent. Configure it in **Agent Detail → Settings → Heartbeat Settings → Allow Parallel Execution**.
|
||||
|
||||
### Auto-claim candidate snapshot (FN-4401)
|
||||
|
||||
No-task heartbeats now consume a project-wide in-memory `AutoClaimSnapshotManager` cache (TTL 30s) instead of each agent scanning the board independently. Rebuilds occur on TTL expiry and scheduler invalidations (`task:created`, `task:moved` when todo edge touched, and `task:updated`).
|
||||
|
||||
Prompt candidate rendering uses:
|
||||
- project setting `autoClaimCandidatesInPrompt` (default `5`, range `0-10`)
|
||||
- optional per-agent runtime override `runtimeConfig.autoClaimCandidatesInPrompt`
|
||||
|
||||
`0` suppresses candidate injection in no-task prompts (wake summary shows `disabled (prompt-suppressed)`). The Agent Detail heartbeat section also includes a **Coordination-only agent** preset that disables auto-claim and sets candidate injection to `0` for routing/CEO-style agents.
|
||||
|
||||
`skipHeartbeatWhenIdle` defaults to `false`; when enabled, only scheduled timer ticks are skipped while the agent has no assigned task. Assignment-triggered wakeups and manual/on-demand runs still execute. Configure it in **Agent Detail → Settings → Heartbeat Settings → Skip heartbeat when idle**.
|
||||
|
||||
### No-task auto-claim behavior
|
||||
|
||||
@@ -178,6 +178,7 @@ Defaults from `DEFAULT_PROJECT_SETTINGS`; key scope from `PROJECT_SETTINGS_KEYS`
|
||||
| `maxWorktrees` | `number` | `4` | Max git worktrees. |
|
||||
| `pollIntervalMs` | `number` | `15000` | Scheduler poll interval (ms). |
|
||||
| `heartbeatMultiplier` | `number` | `1` | Global multiplier applied to all agent heartbeat intervals. Configured from the Agents screen (not Settings). |
|
||||
| `autoClaimCandidatesInPrompt` | `number` | `5` | Default no-task heartbeat candidate list length. Integer range `0-10`; `0` suppresses candidate prompt injection. |
|
||||
| `defaultNodeId` | `string` | `undefined` | Optional project default execution node for task dispatch. When set, tasks without a per-task `nodeId` override resolve to this node (`routing source: project-default`). See [Task Management → Node Routing](./task-management.md#node-routing). |
|
||||
| `unavailableNodePolicy` | `"block" \| "fallback-local"` | `"block"` | Project routing policy used during scheduler dispatch when a task resolves to a remote node and node health is known. `"block"` keeps the task in `todo` if the node is unhealthy; `"fallback-local"` reroutes dispatch to local execution. See [Architecture → Task Routing Architecture](./architecture.md#task-routing-architecture). |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user