feat(desktop): embed BoosAPI Desktop client as a subproject

Vendor the rebranded BoosAPI Desktop client (Tauri + Vue) into metapi as
a monorepo subdirectory under desktop/. Source only — node_modules,
dist, Cargo target and the upstream .git history are excluded.

desktop/ keeps its own independent Cargo workspace (desktop/src-tauri
with crates/*); it is not part of the backend boosapi crate, so a
`cargo check` at the metapi root still compiles only the backend. Build
the desktop app from desktop/src-tauri per desktop/README.md.

Note: app icons are still placeholder assets pending the final BoosAPI
logo. The updater signing keys live outside the repo and are not
included.
This commit is contained in:
boos
2026-06-22 11:32:57 +08:00
parent d9c78ecc73
commit e0a5f57793
2305 changed files with 449355 additions and 0 deletions
@@ -0,0 +1,51 @@
// Example 10: Permissions
//
// Read-only agent with AllowedTools restriction.
// Can only use Read, Glob, Grep — no write or execute.
//
// Run: cargo run --example 10-permissions
use open_agent_sdk::{Agent, AgentOptions, SDKMessage};
use open_agent_sdk::types;
#[tokio::main]
async fn main() {
println!("--- Example 10: Permissions ---");
let mut agent = Agent::new(AgentOptions {
max_turns: Some(10),
allowed_tools: Some(vec![
"Read".to_string(),
"Glob".to_string(),
"Grep".to_string(),
]),
..Default::default()
})
.await
.unwrap();
let (mut rx, handle) = agent
.query("Review the code in src/lib.rs for best practices and potential improvements.")
.await;
while let Some(event) = rx.recv().await {
match event {
SDKMessage::Assistant { message, .. } => {
let text = types::extract_text(&message);
if !text.is_empty() {
print!("{}", text);
}
}
SDKMessage::Result { cost_usd, .. } => {
println!("\n\n--- Done (${:.4}) ---", cost_usd);
}
SDKMessage::Error { message } => {
eprintln!("Error: {}", message);
}
_ => {}
}
}
handle.await.unwrap();
agent.close().await;
}