Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
cfa7bbc
feat(terminal-streamer): decode a complete TRP recording
irvingoujAtDevolution Sep 26, 2026
2c33362
feat(dgw): let the AI cite the input instead of writing times
irvingoujAtDevolution Oct 7, 2026
5e51eee
feat(dgw): analyze any recording in the AI crate
irvingoujAtDevolution Oct 7, 2026
b5653d5
docs(dgw): describe recording analysis in the AI crate intent
irvingoujAtDevolution Oct 8, 2026
0715842
fix(dgw): read only the video track of a WebM recording
irvingoujAtDevolution Oct 8, 2026
32dcab8
fix(dgw): always report the reading progress first
irvingoujAtDevolution Oct 8, 2026
57e7189
docs(dgw): remove a control character from a doc comment
irvingoujAtDevolution Oct 8, 2026
56b01c1
docs(dgw): describe how terminal recordings are prepared in the AI cr…
irvingoujAtDevolution Oct 8, 2026
f38a8d5
fix(dgw): keep the provider URL out of AI transport errors
irvingoujAtDevolution Oct 8, 2026
00560de
fix(dgw): bound WebM tag and frame sizes in the AI crate
irvingoujAtDevolution Oct 13, 2026
7c977bf
fix(dgw): check cancellation while sampling a long video frame
irvingoujAtDevolution Oct 13, 2026
182d841
fix(terminal-streamer): count TRP packet headers toward the setup cap
irvingoujAtDevolution Oct 13, 2026
5c57c3f
refactor(dgw): drop the casts from the video sampling constants
irvingoujAtDevolution Oct 13, 2026
134dffa
refactor(dgw): show video decoder errors with their cause
irvingoujAtDevolution Oct 13, 2026
a016fc8
refactor(dgw): log AI analysis steps at debug level
irvingoujAtDevolution Oct 13, 2026
74f78f8
refactor(dgw): keep blocking file checks off the async AI analysis task
irvingoujAtDevolution Oct 13, 2026
0079cc5
fix(dgw): close the AI analysis events on a panic and bound long vide…
irvingoujAtDevolution Oct 13, 2026
cfa0e8c
feat(dgw): give the AI analysis working files an owner
irvingoujAtDevolution Oct 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions crates/devolutions-gateway-ai/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,26 @@ publish = false
workspace = true

[dependencies]
anyhow = "1"
base64 = "0.23"
cadeau = { version = "0.5.3", features = ["dlopen"] }
camino = "1.1"
png = "0.17"
reqwest = { version = "0.12", default-features = false, features = ["json"] }
secrecy = "0.10"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
terminal-streamer.path = "../terminal-streamer"
thiserror = "2"
time = "0.3"
tokio = { version = "1.52", features = ["fs", "macros", "rt", "time"] }
tokio-util = "0.7"
tracing = "0.1"
url = "2.5"
webm-iterable = "0.7"

[dev-dependencies]
# The example builds its own HTTP client, so it needs TLS; Gateway passes one with its own TLS settings.
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls-native-roots"] }
tempfile = "3.24"
tokio = { version = "1.52", features = ["io-util", "macros", "net", "rt-multi-thread"] }
18 changes: 17 additions & 1 deletion crates/devolutions-gateway-ai/INTENT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Background

The AI crate serves as an HTTP client and a runner for tasks that are related to AI.
We do not want to serve it as a generic LLM client only.
The crate provides methods for specific purposes, for example, to summarize a terminal session, or to generate AI analysis for a given recording video file.
The crate provides methods for specific purposes, for example, to summarize a terminal session, or to generate AI analysis for a given recording video file.

## Tasks

### Analyze Recording

Analyze recording takes a parsed manifest file and its path to a recording folder.
It returns a stream of events that contains the progress of the analysis, and final results of the analysis and the potential errors that happened during the analysis.

The final result is a series of JSON objects with timestamps and a natural language description of the events that happened during the recording.

Analyze recording is trivial for terminal recordings. We pre-process the .trp file to .cast, and strip out some noises, then send as text to the AI services.

Analyze video recordings breaks down the video into frames, and we apply motion detection altorithms to filter out idle or close enough frames. Then we send the the frames in chronological order to the AI services in batches.

Loading
Loading