# respeak-io/episko architecture

> Architecture diagram of the GitHub repository respeak-io/episko, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/respeak-io/episko
- Repository: https://github.com/respeak-io/episko

## Overview

Episko is a native desktop cockpit for running and supervising multiple coding-agent sessions, ordinary shell panes, and project tasks. Users launch or resume work in real terminals, monitor agent state and approvals, and manage related project work from dashboards, GitHub review, history, and usage views. The frontend coordinates these surfaces with a Tauri command backend for process, Git, and GitHub operations. The README documents the major product capabilities; several implementation links below are therefore documented rather than source-verified, and unsampled modules are represented only at their known paths.

Main entry points: [`src/main.ts`](https://github.com/respeak-io/episko/blob/dev/src/main.ts) (App coordinator), [`src/providers/index.ts`](https://github.com/respeak-io/episko/blob/dev/src/providers/index.ts) (Provider adapters), [`src-tauri/src/agent.rs`](https://github.com/respeak-io/episko/blob/dev/src-tauri/src/agent.rs) (Agent control), [`src/reviewui.ts`](https://github.com/respeak-io/episko/blob/dev/src/reviewui.ts) (Review interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Session runtime"]
  node_session_model["Session state<br/>[state.ts]"]
  node_providers["Provider adapters<br/>[index.ts]"]
  node_agent_backend["Agent control<br/>[agent.rs]"]
  node_pty["PTY terminals<br/>[pty.rs]"]
  node_permissions["Permission handling<br/>[permissions.ts]"]
end

subgraph group_workspace["Project workspace"]
  node_task_catalog["Task discovery<br/>[tasks.rs]"]
  node_task_runner["Task sessions<br/>[taskrun.ts]"]
  node_git_workspaces["Git and worktrees<br/>[git.rs]"]
  node_project_dashboard["Project dashboard<br/>[dashboard.ts]"]
end

subgraph group_insights["Monitoring"]
  node_telemetry["Live telemetry<br/>[telemetry.rs]"]
  node_history["Session history<br/>[history.ts]"]
  node_usage["Usage analytics<br/>[usage.ts]"]
  node_health["Dependency health<br/>[health.rs]"]
end

subgraph group_collaboration["Review and sharing"]
  node_github_issues["Issues and claims<br/>[github.rs]"]
  node_review_logic["Review rules<br/>[review.ts]"]
  node_review_ui["Review interface<br/>[reviewui.ts]"]
  node_sync["Project sync<br/>[sync.ts]"]
  node_shared_service["Sync service<br/>[serve.rs]"]
end

subgraph group_platform["App platform"]
  node_frontend["App coordinator<br/>[main.ts]"]
  node_local_store[("Local preferences<br/>[store.ts]")]
  node_os_platform["OS integration<br/>[platform.rs]"]
end

node_user(("User"))

node_user -->|"launches and operates"| node_frontend
node_frontend -->|"coordinates sessions"| node_session_model
node_frontend -->|"selects adapters"| node_providers
node_providers -.->|"requests provider control"| node_agent_backend
node_agent_backend -.->|"starts agent terminals"| node_pty
node_agent_backend -.->|"instruments sessions"| node_telemetry
node_frontend -->|"dispatches approval actions"| node_permissions
node_frontend -->|"requests runnable tasks"| node_task_catalog
node_frontend -->|"starts task sessions"| node_task_runner
node_task_runner -->|"runs in terminal panes"| node_pty
node_frontend -->|"requests Git operations"| node_git_workspaces
node_frontend -->|"renders project view"| node_project_dashboard
node_project_dashboard -.->|"loads issue data"| node_github_issues
node_frontend -->|"renders review stage"| node_review_ui
node_review_ui -->|"uses review rules"| node_review_logic
node_review_ui -->|"submits review actions"| node_github_issues
node_providers -->|"reconciles provider history"| node_history
node_frontend -.->|"shows usage dashboard"| node_usage
node_frontend -.->|"shows dependency status"| node_health
node_frontend -->|"starts sync listeners"| node_sync
node_sync -.->|"exchanges project data"| node_shared_service
node_session_model -->|"loads preferences"| node_local_store
node_frontend -->|"invokes native commands"| node_os_platform

click node_frontend "https://github.com/respeak-io/episko/blob/dev/src/main.ts"
click node_session_model "https://github.com/respeak-io/episko/blob/dev/src/state.ts"
click node_providers "https://github.com/respeak-io/episko/blob/dev/src/providers/index.ts"
click node_agent_backend "https://github.com/respeak-io/episko/blob/dev/src-tauri/src/agent.rs"
click node_pty "https://github.com/respeak-io/episko/blob/dev/src-tauri/src/pty.rs"
click node_telemetry "https://github.com/respeak-io/episko/blob/dev/src-tauri/src/telemetry.rs"
click node_permissions "https://github.com/respeak-io/episko/blob/dev/src/permissions.ts"
click node_task_catalog "https://github.com/respeak-io/episko/blob/dev/src-tauri/src/tasks.rs"
click node_task_runner "https://github.com/respeak-io/episko/blob/dev/src/taskrun.ts"
click node_git_workspaces "https://github.com/respeak-io/episko/blob/dev/src-tauri/src/git.rs"
click node_project_dashboard "https://github.com/respeak-io/episko/blob/dev/src/dashboard.ts"
click node_github_issues "https://github.com/respeak-io/episko/blob/dev/src-tauri/src/github.rs"
click node_review_logic "https://github.com/respeak-io/episko/blob/dev/src/review.ts"
click node_review_ui "https://github.com/respeak-io/episko/blob/dev/src/reviewui.ts"
click node_history "https://github.com/respeak-io/episko/blob/dev/src/history.ts"
click node_usage "https://github.com/respeak-io/episko/blob/dev/src/usage.ts"
click node_health "https://github.com/respeak-io/episko/blob/dev/src-tauri/src/health.rs"
click node_sync "https://github.com/respeak-io/episko/blob/dev/src/sync.ts"
click node_local_store "https://github.com/respeak-io/episko/blob/dev/src/store.ts"
click node_os_platform "https://github.com/respeak-io/episko/blob/dev/src-tauri/src/platform.rs"
click node_shared_service "https://github.com/respeak-io/episko/blob/dev/episko-server/src/serve.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_session_model,node_providers,node_agent_backend,node_pty,node_permissions,node_user toneBlue
class node_task_catalog,node_task_runner,node_git_workspaces,node_project_dashboard toneAmber
class node_telemetry,node_history,node_usage,node_health toneMint
class node_github_issues,node_review_logic,node_review_ui,node_sync,node_shared_service toneRose
class node_frontend,node_local_store,node_os_platform toneIndigo
```

## Components

### Session runtime

- [Session state](https://github.com/respeak-io/episko/blob/dev/src/state.ts): `src/state.ts`
- [Provider adapters](https://github.com/respeak-io/episko/blob/dev/src/providers/index.ts): `src/providers/index.ts`
- [Agent control](https://github.com/respeak-io/episko/blob/dev/src-tauri/src/agent.rs): `src-tauri/src/agent.rs`
- [PTY terminals](https://github.com/respeak-io/episko/blob/dev/src-tauri/src/pty.rs): `src-tauri/src/pty.rs`
- [Permission handling](https://github.com/respeak-io/episko/blob/dev/src/permissions.ts): `src/permissions.ts`

### Project workspace

- [Task discovery](https://github.com/respeak-io/episko/blob/dev/src-tauri/src/tasks.rs): `src-tauri/src/tasks.rs`
- [Task sessions](https://github.com/respeak-io/episko/blob/dev/src/taskrun.ts): `src/taskrun.ts`
- [Git and worktrees](https://github.com/respeak-io/episko/blob/dev/src-tauri/src/git.rs): `src-tauri/src/git.rs`
- [Project dashboard](https://github.com/respeak-io/episko/blob/dev/src/dashboard.ts): `src/dashboard.ts`

### Monitoring

- [Live telemetry](https://github.com/respeak-io/episko/blob/dev/src-tauri/src/telemetry.rs): `src-tauri/src/telemetry.rs`
- [Session history](https://github.com/respeak-io/episko/blob/dev/src/history.ts): `src/history.ts`
- [Usage analytics](https://github.com/respeak-io/episko/blob/dev/src/usage.ts): `src/usage.ts`
- [Dependency health](https://github.com/respeak-io/episko/blob/dev/src-tauri/src/health.rs): `src-tauri/src/health.rs`

### Review and sharing

- [Issues and claims](https://github.com/respeak-io/episko/blob/dev/src-tauri/src/github.rs): `src-tauri/src/github.rs`
- [Review rules](https://github.com/respeak-io/episko/blob/dev/src/review.ts): `src/review.ts`
- [Review interface](https://github.com/respeak-io/episko/blob/dev/src/reviewui.ts): `src/reviewui.ts`
- [Project sync](https://github.com/respeak-io/episko/blob/dev/src/sync.ts): `src/sync.ts`
- [Sync service](https://github.com/respeak-io/episko/blob/dev/episko-server/src/serve.rs): `episko-server/src/serve.rs`

### App platform

- [App coordinator](https://github.com/respeak-io/episko/blob/dev/src/main.ts): `src/main.ts`
- [Local preferences](https://github.com/respeak-io/episko/blob/dev/src/store.ts): `src/store.ts`
- [OS integration](https://github.com/respeak-io/episko/blob/dev/src-tauri/src/platform.rs): `src-tauri/src/platform.rs`

### Other components

- **User**

## Connections

- User → App coordinator: launches and operates
- App coordinator → Session state: coordinates sessions (evidence: `src/main.ts`)
- App coordinator → Provider adapters: selects adapters (evidence: `src/main.ts`)
- Provider adapters → Agent control: requests provider control
- Agent control → PTY terminals: starts agent terminals
- Agent control → Live telemetry: instruments sessions
- App coordinator → Permission handling: dispatches approval actions (evidence: `src/main.ts`)
- App coordinator → Task discovery: requests runnable tasks
- App coordinator → Task sessions: starts task sessions (evidence: `src/main.ts`)
- Task sessions → PTY terminals: runs in terminal panes
- App coordinator → Git and worktrees: requests Git operations
- App coordinator → Project dashboard: renders project view (evidence: `src/main.ts`)
- Project dashboard → Issues and claims: loads issue data
- App coordinator → Review interface: renders review stage (evidence: `src/main.ts`)
- Review interface → Review rules: uses review rules (evidence: `src/reviewui.ts`)
- Review interface → Issues and claims: submits review actions (evidence: `src/reviewui.ts`)
- Provider adapters → Session history: reconciles provider history (evidence: `src/providers/index.ts`)
- App coordinator → Usage analytics: shows usage dashboard
- App coordinator → Dependency health: shows dependency status
- App coordinator → Project sync: starts sync listeners (evidence: `src/main.ts`)
- Project sync → Sync service: exchanges project data
- Session state → Local preferences: loads preferences (evidence: `src/state.ts`)
- App coordinator → OS integration: invokes native commands
