Harden architecture hot paths

This commit is contained in:
gsxdsm
2026-04-12 15:13:27 -07:00
parent 476ef812dc
commit 428b8f7b17
38 changed files with 1212 additions and 561 deletions

View File

@@ -52,6 +52,41 @@ fn dashboard --dev
---
## `fn serve`
Start Fusion as a headless node (API server + AI engine, no frontend UI).
```bash
fn serve [--port <port>] [--host <host>] [--paused]
fn serve --interactive
```
| Option | Description |
|---|---|
| `--port`, `-p` | Port for the API server (default `4040`). |
| `--host` | Host to bind (default `0.0.0.0`, all interfaces). |
| `--paused` | Start with engine paused (automation disabled). |
| `--interactive` | Interactive port selection. |
---
## `fn desktop`
Launch the Fusion desktop app (Electron).
```bash
fn desktop
fn desktop --dev
fn desktop --paused
```
| Option | Description |
|---|---|
| `--dev` | Launch with hot-reload (connects to Vite dev server). |
| `--paused` | Launch with automation paused. |
---
## `fn task`
Task lifecycle and task operations.
@@ -138,13 +173,25 @@ Manage external execution nodes.
```bash
fn node list --json
fn node add edge-runner --url https://node.example.com --api-key $NODE_API_KEY --max-concurrent 4
fn node connect edge-runner --url https://node.example.com --api-key $NODE_API_KEY --max-concurrent 4
fn node disconnect edge-runner --force
fn node show edge-runner
fn node health edge-runner
fn node remove edge-runner --force
```
Subcommands: `list|ls`, `add`, `remove|rm`, `show|info`, `health`.
Subcommands: `list|ls`, `connect`, `disconnect`, `show|info`, `health`.
---
## `fn mesh`
Mesh network status.
```bash
fn mesh status [--json]
```
Subcommands: `status`.
---
@@ -173,9 +220,10 @@ fn agent stop AGENT-001
fn agent start AGENT-001
fn agent mailbox AGENT-001
fn agent import ./companies-manifest.yaml --dry-run
fn agent export ./output-dir --company-name "My Company" --company-slug my-company
```
Subcommands: `stop`, `start`, `mailbox`, `import`.
Subcommands: `stop`, `start`, `mailbox`, `import`, `export`.
---
@@ -233,14 +281,32 @@ fn backup --cleanup
---
## `fn plugin`
Plugin lifecycle management.
```bash
fn plugin list
fn plugin install <path>
fn plugin uninstall <id> --force
fn plugin enable <id>
fn plugin disable <id>
fn plugin create <name>
```
Subcommands: `list|ls`, `install`, `uninstall`, `enable`, `disable`, `create`.
---
## Useful option flags by context
| Option | Used by |
|---|---|
| `--port`, `-p` | `fn dashboard` |
| `--interactive` | `fn dashboard`, `fn task import`, `fn project add` |
| `--paused` | `fn dashboard` |
| `--dev` | `fn dashboard` |
| `--port`, `-p` | `fn dashboard`, `fn serve` |
| `--host` | `fn serve` |
| `--interactive` | `fn dashboard`, `fn serve`, `fn task import`, `fn project add` |
| `--paused` | `fn dashboard`, `fn serve`, `fn desktop` |
| `--dev` | `fn dashboard`, `fn desktop` |
| `--attach` | `fn task create` |
| `--depends` | `fn task create` |
| `--feedback` | `fn task refine` |

View File

@@ -79,7 +79,7 @@ Features:
Visual customization includes:
- Theme mode: dark/light/system
- **30 color themes** (including Ocean, Forest, Nord, Dracula, Gruvbox, Tokyo Night, and more)
- **55 color themes** (including Ocean, Forest, Nord, Dracula, Gruvbox, Tokyo Night, and more)
Theme preferences are stored in global settings.

View File

@@ -96,6 +96,7 @@ Defaults from `DEFAULT_PROJECT_SETTINGS`; key scope from `PROJECT_SETTINGS_KEYS`
| `buildRetryCount` | `number` | `0` | Build retry attempts during merge. |
| `buildTimeoutMs` | `number` | `300000` | Build timeout in ms (5 minutes). |
| `requirePlanApproval` | `boolean` | `false` | Require manual approval before triage → todo. |
| `reviewHandoffPolicy` | `"disabled" \| "comment-triggered" \| "always"` | `"disabled"` | Policy for agent-to-user review handoff. |
| `showQuickChatFAB` | `boolean` | `false` | Show floating quick-chat button. Chat accessible from More menu when hidden. |
| `taskStuckTimeoutMs` | `number` | `undefined` | Inactivity timeout for stuck-task recovery. |
| `autoUnpauseEnabled` | `boolean` | `true` | Auto-unpause after rate-limit-triggered pauses. |
@@ -104,6 +105,9 @@ Defaults from `DEFAULT_PROJECT_SETTINGS`; key scope from `PROJECT_SETTINGS_KEYS`
| `maxStuckKills` | `number` | `6` | Max stuck-task terminations before permanent failure. |
| `maxSpawnedAgentsPerParent` | `number` | `5` | Max child agents per parent. |
| `maxSpawnedAgentsGlobal` | `number` | `20` | Max total spawned agents in an executor instance. |
| `missionStaleThresholdMs` | `number` | `600000` | Time in ms after which a mission in `activating` state is considered stale and eligible for self-healing recovery. |
| `missionMaxTaskRetries` | `number` | `3` | Maximum automatic retry attempts for a failed mission-linked task before its feature is marked as blocked for manual intervention. |
| `missionHealthCheckIntervalMs` | `number` | `300000` | Interval in ms between mission feature/task consistency checks. Set to 0 to disable periodic health checks. |
| `maintenanceIntervalMs` | `number` | `900000` | Maintenance interval in ms (15 min). |
| `autoUpdatePrStatus` | `boolean` | `false` | Auto-refresh PR status badges. |
| `autoCreatePr` | `boolean` | `false` | Auto-create PRs for completed tasks. |
@@ -124,6 +128,11 @@ Defaults from `DEFAULT_PROJECT_SETTINGS`; key scope from `PROJECT_SETTINGS_KEYS`
| `memoryBackendType` | `string` | `"file"` | Memory backend type: `file` or `readonly`. |
| `runStepsInNewSessions` | `boolean` | `false` | Run each task step in a fresh agent session. |
| `maxParallelSteps` | `number` | `2` | Max concurrent step sessions (14). |
| `aiSessionTtlMs` | `number` | `604800000` | TTL in ms for persisted AI planning, subtask breakdown, and mission interview sessions. Valid range: 600000 (10 min) to 2592000000 (30 days). |
| `aiSessionCleanupIntervalMs` | `number` | `3600000` | Interval in ms for scheduled AI session cleanup sweeps. Valid range: 60000 (1 min) to 86400000 (24 hours). |
| `reflectionEnabled` | `boolean` | `false` | Enable/disable agent self-reflection workflows. |
| `reflectionIntervalMs` | `number` | `3600000` | How often periodic reflections occur in milliseconds. |
| `reflectionAfterTask` | `boolean` | `true` | When true, automatically trigger reflection after task completion. |
| `agentPrompts` | `object` | `undefined` | Custom agent prompt templates + role assignments. |
| `promptOverrides` | `Record<string, string>` | `undefined` | Fine-grained prompt segment overrides (e.g., `{"executor-welcome": "..."}`). |