Original text(via HN AI)
Some content is hidden
CONTRIBUTING.md
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
@@ -152,7 +152,8 @@ the scripts, whose language automation/source/script.rs documents. | ||
| 152 | 152 | sentences; tables for reference; commands, code and paths in backticks; |
| 153 | 153 | a link rather than a repetition; no emojis. |
| 154 | 154 | - Retake pictures with their scripts. The README's screenshots come |
| 155 | - from documentation/screenshots.vts , Interceptor's from | |
| 155 | + from documentation/screenshots.vts , the two it opens with (Desktop | |
| 156 | + Mode and Agentic Mode) from documentation/modes.vts , Interceptor's from | |
| 156 | 157 | documentation/interceptor.vts . |
| 157 | 158 | |
| 158 | 159 | ## Commits |
Cargo.lock
README.md
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -7,17 +7,22 @@ | ||
| 7 | 7 | |
| 8 | 8 | The Agentic-Native Operating System |
| 9 | 9 | |
| 10 | - An operating system written in Rust, with a voice agent built into the system. | |
| 10 | + An operating system written in Rust, with an agent built into the system : use it as a desktop, or hand it the screen . | |
| 11 | 11 | |
| 12 | 12 | [ ![ License: GPL-3.0-only ] ( https://img.shields.io/badge/license-GPL--3.0--only-blue )] ( LICENSE ) |
| 13 | 13 | [ ![ Written in Rust ] ( https://img.shields.io/badge/written%20in-Rust-b7410e?logo=rust&logoColor=white )] ( documentation/RUST.md ) |
| 14 | 14 | [ ![ Runs on x86-64 PCs and QEMU, and on ARM64 in QEMU ] ( https://img.shields.io/badge/runs%20on-x86--64%20PCs%20%26%20QEMU%2C%20ARM64%20in%20QEMU-555 )] ( #quick-start ) |
| 15 | 15 | |
| 16 | - [ Screenshots ] ( #screenshots ) · [ Quick start ] ( #quick-start ) · [ Make an app agentic ] ( #make-an-app-agentic ) · [ Architecture ] ( #architecture ) · [ Documentation ] ( #documentation ) | |
| 16 | + [ Two modes ] ( #two-modes ) · [ Screenshots ] ( #screenshots ) · [ Quick start ] ( #quick-start ) · [ Make an app agentic ] ( #make-an-app-agentic ) · [ Architecture ] ( #architecture ) · [ Documentation ] ( #documentation ) | |
| 17 | 17 | |
| 18 | 18 | </ div > |
| 19 | 19 | |
| 20 | - [ ![ Veda in one minute, on YouTube: a Deepgram key entered, the voice agent waking, and the agent at work in Photos, Music, the Text Editor and Interceptor ] ( documentation/images/demo.jpg )] ( https://www.youtube.com/watch?v=gXIS-6cVNAk ) | |
| 20 | + < table > | |
| 21 | + < tr > | |
| 22 | + <td width="50%"><p align="center"><b>Desktop Mode</b><br>You work in windows; the agent assists from its corner.</p><img src="documentation/images/desktop.png" alt="Veda in Desktop Mode: the wallpaper, desktop icons and the taskbar, with the agent's window open and thinking over live previews of the Text Editor, where it wrote a Rust program, and Photos, both working in the background"></td> | |
| 23 | + <td width="50%"><p align="center"><b>Agentic Mode</b><br>You say or type what you want; the agent has the screen.</p><img src="documentation/images/agentic.png" alt="Veda in Agentic Mode, with the same request: at the left the agent's ring, the request typed to it, each thing it did as a ticked step and its answer, over the field to write in; at the right the stage, with the Text Editor live and large, showing the Rust program it wrote, and Photos under it; a shelf of both at the foot, and the time, network, sound, power and the way back to the desktop at the top right"></td> | |
| 24 | + </ tr > | |
| 25 | + </ table > | |
| 21 | 26 | |
| 22 | 27 | Say "Hey Veda, switch my wallpaper to the dunes" and it is done. The agent |
| 23 | 28 | works in every application through the same code as your keyboard and |
| @@ -38,12 +43,28 @@ and the applications. | ||
| 38 | 43 | </ tr > |
| 39 | 44 | </ table > |
| 40 | 45 |
automation/source/agentsim.rs
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -9,7 +9,10 @@ | ||
| 9 | 9 | //! Deepgram: it answers the Settings message with Welcome and |
| 10 | 10 | //! SettingsApplied, and then does what the script says — send a function |
| 11 | 11 | //! call and collect its result, play voice, report that the user started |
| 12 | - //! speaking — while recording everything the agent sends. | |
| 12 | + //! speaking — while recording everything the agent sends. A turn the | |
| 13 | + //! agent gives it as the user's (InjectUserMessage) it reports as | |
| 14 | + //! Deepgram does, like one it heard: the user started speaking, then the | |
| 15 | + //! turn's words. What answers the turn is the script's to say. | |
| 13 | 16 | //! |
| 14 | 17 | //! It also stands in for Deepgram's streaming speech recognition, which |
| 15 | 18 | //! the agent uses to hear its name while asleep: the script decides what |
| @@ -341,6 +344,13 @@ fn receive(socket: &Socket) -> Result<Option<Message>> { | ||
| 341 | 344 | } |
| 342 | 345 | } |
| 343 | 346 | |
| 347 | + /// The turn a message from the agent gives as the user's | |
| 348 | + /// (InjectUserMessage), if it is one. | |
| 349 | + fn given_turn ( message : & str ) -> Option < String > { | |
| 350 | + let v : Value = serde_json :: from_str ( message ) . ok ( ) ? ; | |
| 351 | + ( v [ "type" ] == "InjectUserMessage" ) . then ( ││ v [ "content" ] . as_str ( ) . map ( str :: to_string ) ) ? | |
| 352 | + } | |
| 353 | + | |
| 344 | 354 | /// One connection from the agent: the upgrade (with Deepgram's token |
| 345 | 355 | /// authentication), then the conversation or speech recognition its path |
| 346 | 356 | /// asks for. |
| @@ -380,6 +390,11 @@ fn serve(stream: TcpStream, shared: &Shared) -> Result { | ||
| 380 | 390 | send ( & socket , Message :: text ( r#"{"type":"SettingsApplied"}"# ) ) ? ; |
| 381 | 391 | conversation . configured . store ( true , Ordering :: SeqCst ) ; |
| 382 | 392 | } |
automation/source/automate.rs
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -688,6 +688,11 @@ fn run_step(s: &mut Session, x: &mut Extras, step: &Step, disk: &Path) -> Result | ||
| 688 | 688 | } |
| 689 | 689 | Step :: AgentSpeak ( secs ) => x . agent ( ) ? . speak ( * secs ) ? , |
| 690 | 690 | Step :: AgentInterrupt => x . agent ( ) ? . send_json ( r#"{"type":"UserStartedSpeaking"}"# ) ? , |
| 691 | + Step :: AgentText { agent , text } => { | |
| 692 | + let role = if * agent { "assistant" } else { "user" } ; | |
| 693 | + let said = serde_json :: json! ( { "type" : "ConversationText" , "role" : role , "content" : text } ) ; | |
| 694 | + x . agent ( ) ? . send_json ( & said . to_string ( ) ) ? | |
| 695 | + } | |
| 691 | 696 | Step :: AgentHear { text , timeout } => x . agent ( ) ? . hear ( text , * timeout ) ? , |
| 692 | 697 | Step :: AgentListens ( n ) => { |
| 693 | 698 | let opened = x . agent ( ) ? . listen_connections ( ) ; |
automation/source/runner.rs
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -83,6 +83,7 @@ const HOST_TESTED: &[(&str, &[&str])] = &[ | ||
| 83 | 83 | ( "browser" , & [ ] ) , |
| 84 | 84 | ( "compositor" , & [ ] ) , |
| 85 | 85 | ( "lock" , & [ ] ) , |
| 86 | + ( "shell" , & [ ] ) , | |
| 86 | 87 | ( "screensaver" , & [ ] ) , |
| 87 | 88 | ( "shell-common" , & [ ] ) , |
| 88 | 89 | ( "filesystem" , & [ ] ) , |
automation/source/script.rs
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -53,6 +53,7 @@ | ||
| 53 | 53 | //! agent-expect "InjectUserMessage" 30 # wait until the agent sends a message containing the text |
| 54 | 54 | //! agent-speak 3 # the simulated agent talks for 3 s (a voice-like buzz) |
| 55 | 55 | //! agent-interrupt # the simulated recogniser hears the user start speaking |
| 56 | + //! agent-text user "Play some music" # the simulated service reports what the user (or agent) said, in words | |
| 56 | 57 | //! agent-audio 3200 # fail unless the agent streamed at least this many bytes of microphone audio |
| 57 | 58 | //! agent-hear "Hey Veda, hello" 30 # the simulated recogniser hears this, once the agent streams speech to it |
| 58 | 59 | //! agent-hear "Hey Veda. │ Hi" 30 # " │ " splits it into final transcripts 0.3 s apart (the last ends the utterance) |
| @@ -361,6 +362,11 @@ pub enum Step { | ||
| 361 | 362 | } , |
| 362 | 363 | AgentSpeak ( f64 ) , |
| 363 | 364 | AgentInterrupt , |
| 365 | + /// What was said, in words: by the agent (true) or the user. | |
| 366 | + AgentText { | |
| 367 | + agent : bool , | |
| 368 | + text : String , | |
| 369 | + } , | |
| 364 | 370 | AgentHear { |
| 365 | 371 | text : String , |
| 366 | 372 | timeout : Duration , |
| @@ -445,6 +451,7 @@ impl Script { | ||
| 445 | 451 | │ Step :: AgentExpect { .. } |
| 446 | 452 | │ Step :: AgentSpeak ( _ ) |
| 447 | 453 | │ Step :: AgentInterrupt |
| 454 | + │ Step :: AgentText { .. } | |
| 448 | 455 | │ Step :: AgentHear { .. } |
| 449 | 456 | │ Step :: AgentListens ( _ ) |
| 450 | 457 | │ Step :: AgentListensAtMost ( _ ) |
| @@ -759,6 +766,14 @@ impl Line { | ||
| 759 | 766 | "agent-expect" => Step :: AgentExpect { text : self . text ( "text" ) ? , timeout : self . seconds ( Some ( 60.0 ) ) ? } , |