Skip to content

Commit 270cb27

Browse files
Merge pull request #31 from steve-the-edwards/sedwards/no-ticket/desktop-sidecar
Add desktop sidecar for live queue visibility
2 parents 31e3b89 + 0467fde commit 270cb27

11 files changed

Lines changed: 909 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ thoughts/
3737
# IntelliJ Plugin
3838
intellij-plugin/build/
3939
intellij-plugin/.gradle/
40+
41+
# Desktop sidecar
42+
desktop-sidecar/build/
43+
desktop-sidecar/.gradle/

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,32 @@ With the queue:
120120
- **Zombie Protection**: Detects dead processes, kills orphans, clears stale locks
121121
- **Auto-Kill**: Tasks running > 120 minutes are terminated
122122

123+
## Desktop Sidecar
124+
125+
The repo also includes a minimal Compose Multiplatform desktop app in [desktop-sidecar](desktop-sidecar/README.md) for watching the queue in real time.
126+
127+
It reads the same local SQLite database as `tq` and the IntelliJ plugin, then shows:
128+
129+
- running tasks
130+
- waiting tasks
131+
- exact queues grouped by their root scope (for example `gradle/build` and `gradle/emulator-5554` under `gradle`)
132+
133+
Run it with:
134+
135+
```bash
136+
cd desktop-sidecar
137+
./gradlew run
138+
```
139+
140+
Or point it at a different queue data directory:
141+
142+
```bash
143+
cd desktop-sidecar
144+
./gradlew run --args="--data-dir /path/to/agent-task-queue"
145+
```
146+
147+
The sidecar defaults to `$TASK_QUEUE_DATA_DIR` or `/tmp/agent-task-queue`. It visualizes live occupancy from `queue.db`; configured `--queue-capacity` limits are process-local and are not stored in SQLite, so the UI shows live tasks and queue topology rather than persisted capacity settings.
148+
123149
## Installation
124150

125151
```bash

desktop-sidecar/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Agent Task Queue Desktop Sidecar
2+
3+
Minimal Compose Multiplatform desktop app for watching the local `agent-task-queue` database in real time.
4+
5+
The sidecar reads the existing SQLite queue DB directly and shows:
6+
7+
- running tasks
8+
- waiting tasks
9+
- exact queues grouped by root scope so hierarchical queue activity is easier to understand
10+
11+
It is intentionally read-only. There is no new MCP protocol or server surface.
12+
13+
## Run
14+
15+
```bash
16+
./gradlew run
17+
```
18+
19+
By default the app reads `$TASK_QUEUE_DATA_DIR` or `/tmp/agent-task-queue`.
20+
21+
Use a specific queue directory with:
22+
23+
```bash
24+
./gradlew run --args="--data-dir /path/to/agent-task-queue"
25+
```
26+
27+
## Package
28+
29+
```bash
30+
./gradlew packageDistributionForCurrentOS
31+
```
32+
33+
## Notes
34+
35+
- `./gradlew` in this directory delegates to the checked-in Gradle wrapper under `../intellij-plugin/` so the sidecar stays lightweight.
36+
- Queue capacities configured with `--queue-capacity` are process-local and are not persisted in `queue.db`, so the app visualizes live tasks and queue layout rather than stored capacity numbers.

desktop-sidecar/build.gradle.kts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
plugins {
2+
kotlin("multiplatform") version "2.3.20"
3+
kotlin("plugin.compose") version "2.3.20"
4+
id("org.jetbrains.compose") version "1.10.3"
5+
}
6+
7+
repositories {
8+
mavenCentral()
9+
google()
10+
}
11+
12+
kotlin {
13+
jvm("desktop")
14+
jvmToolchain(21)
15+
16+
sourceSets {
17+
val desktopMain by getting {
18+
dependencies {
19+
implementation(compose.desktop.currentOs)
20+
implementation(compose.foundation)
21+
implementation(compose.material3)
22+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2")
23+
implementation("org.xerial:sqlite-jdbc:3.53.0.0")
24+
}
25+
}
26+
27+
val desktopTest by getting {
28+
dependencies {
29+
implementation(kotlin("test"))
30+
}
31+
}
32+
}
33+
}
34+
35+
compose.desktop {
36+
application {
37+
mainClass = "com.block.agenttaskqueue.sidecar.MainKt"
38+
39+
nativeDistributions {
40+
targetFormats(org.jetbrains.compose.desktop.application.dsl.TargetFormat.Dmg)
41+
packageName = "AgentTaskQueueSidecar"
42+
packageVersion = "1.0.0"
43+
description = "Desktop sidecar for visualizing agent-task-queue state"
44+
}
45+
}
46+
}

desktop-sidecar/gradlew

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

desktop-sidecar/gradlew.bat

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rootProject.name = "agent-task-queue-sidecar"

0 commit comments

Comments
 (0)