Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
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
16 changes: 16 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,22 @@ When compressing context, create a continuation-oriented coding handoff summary.

---

## Third-party licenses & [NOTICE](NOTICE)

Before adding a third-party dependency or asset, check its license is compatible with this repo. **Do not** take copyleft that would force Atmos itself open under GPL/AGPL-style terms without an explicit product decision.

**Write an entry in root [`NOTICE`](NOTICE)** when we **redistribute** something whose license requires retaining copyright/attribution in our tree or install artifacts, for example:

- Vendored source under `vendor/`
- Fonts, icons, or other assets copied into the repo / product bundles
- **Downloaded binaries / SDKs / engines we ship or install for users** (even if rebranded), e.g. pinned release tarballs

**Usually skip `NOTICE`** for normal package-manager deps whose license files stay in the registry install (`bun`/`npm` → `node_modules`, `cargo` → crates.io). Those are not copied into our source tree; their licenses live with the package metadata.

When in doubt: if the file is **in this monorepo** or **we redistribute the binary**, put it in `NOTICE`; if it only appears via install-time lockfiles, don’t.

---

## Coding Behavioral Guidelines

**Tradeoff**: These guidelines bias toward caution over speed. For trivial tasks, use judgment.
Expand Down
13 changes: 13 additions & 0 deletions Cargo.lock

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

109 changes: 109 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,115 @@ agent-client-protocol-schema
License: Apache License, Version 2.0 — see vendor/agent-client-protocol-schema/LICENSE
Copyright 2025 Zed Industries, Inc. and contributors

-------------------------------------------------------------------------------
5. Desktop control engine (cua-driver-rs / trycua)
-------------------------------------------------------------------------------

Source: https://github.com/trycua/cua
Component: cua-driver / cua-driver-rs (pinned official release artifacts)
Pin: crates/desktop-use/manifest/default.json (e.g. cua-driver-rs-v0.17.0)
Usage: Optional Atmos Desktop Use runtime. Downloaded on demand into
user-managed storage (~/.atmos/desktop-use/), installed as the
managed binary atmos-desktop-control and host app
"Atmos Desktop Use" (com.atmos.desktop.use). Not vendored as full
monorepo source in this repository.
License: MIT
Copyright (c) 2025 Cua AI, Inc.

The MIT License (MIT)

Copyright (c) 2025 Cua AI, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Optional bundled file in upstream release packages:
cua_driver_node_runtime.node
Derived from uniffi-bindgen-react-native N-API runtime (MPL-2.0).
Upstream notice: libs/cua-driver/scripts/node-runtime-NOTICE.md in trycua/cua.
MPL-2.0: https://www.mozilla.org/MPL/2.0/
Source available at the matching trycua/cua release tag.

Product branding for the managed host (Atmos Desktop Use) is Atmos-owned;
this notice covers the upstream engine software license only and does not
grant trademark rights to "Cua" or related marks.

-------------------------------------------------------------------------------
6. Local model runtime (llama.cpp / llama-server)
-------------------------------------------------------------------------------

Source: https://github.com/ggml-org/llama.cpp
Component: llama-server (and related llama.cpp binaries from official releases)
Usage: Optional Atmos Local Model Runtime. Upstream release assets are
repackaged and published under Atmos release tags
(local-model-runtime-*), then downloaded on demand as
atmos-llama-server-* (managed install under user data). Pin /
packaging: crates/local-model-runtime/manifest/default.json and
.github/workflows/release-local-model-runtime.yml.
License: MIT
Copyright (c) 2023-2026 The ggml authors

The MIT License (MIT)

Copyright (c) 2023-2026 The ggml authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

-------------------------------------------------------------------------------
7. Catalog local models (GGUF weights, optional download)
-------------------------------------------------------------------------------

Catalog entries live in crates/local-model-runtime/manifest/default.json.
Weights are downloaded on demand from Hugging Face (not vendored in-repo).
Each entry carries SPDX license + license_url; the product surfaces the
license before download. Current catalog (update NOTICE when the catalog
gains a different license family):

Qwen3.5 2B / 4B Instruct GGUF (and related Qwen3.5 base model cards)
License: Apache License, Version 2.0
Model cards (license text / terms):
https://huggingface.co/Qwen/Qwen3.5-2B
https://huggingface.co/Qwen/Qwen3.5-4B
GGUF packaging may be hosted by third-party repos listed in the
manifest (e.g. unsloth / openresearchtools); weights remain subject to
the base model license above.

User-imported custom GGUF URLs are the user's responsibility; Atmos does
not re-license those weights.

Full Apache-2.0 text: https://www.apache.org/licenses/LICENSE-2.0

-------------------------------------------------------------------------------
End of NOTICE
-------------------------------------------------------------------------------
1 change: 1 addition & 0 deletions apps/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ sysinfo = "0.30"
tokio = { workspace = true }
runtime-manager = { path = "../../crates/runtime-manager", features = ["supervisor"] }
desktop-use = { path = "../../crates/desktop-use" }
browser-use = { path = "../../crates/browser-use" }
176 changes: 176 additions & 0 deletions apps/cli/src/commands/browser_use.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
//! `atmos browser-use` — page CDP control (separate from Desktop Use).

use browser_use::{execute, BrowserAction, BrowserBackendKind, BrowserRequest};
use clap::{Args, Subcommand};
use serde_json::{json, Value};

pub async fn execute_cmd(command: BrowserUseCommand) -> Result<Value, String> {
let req = match command {
BrowserUseCommand::Prepare(a) => BrowserRequest {
backend: parse_backend(&a.backend)?,
action: BrowserAction::Prepare,
pid: a.pid,
window_id: a.window_id,
session: a.session,
profile_strategy: a.strategy,
..Default::default()
},
BrowserUseCommand::State(a) => BrowserRequest {
backend: parse_backend(&a.backend)?,
action: BrowserAction::State,
pid: a.pid,
window_id: a.window_id,
target_id: a.target_id,
tab_id: a.tab_id,
session: a.session,
..Default::default()
},
BrowserUseCommand::Click(a) => BrowserRequest {
backend: parse_backend(&a.backend)?,
action: BrowserAction::Click,
target_id: Some(a.target_id),
tab_id: Some(a.tab_id),
element_ref: Some(a.element_ref),
session: a.session,
..Default::default()
},
BrowserUseCommand::Type(a) => BrowserRequest {
backend: parse_backend(&a.backend)?,
action: BrowserAction::Type,
target_id: Some(a.target_id),
tab_id: Some(a.tab_id),
text: Some(a.text),
element_ref: Some(a.element_ref),
session: a.session,
..Default::default()
},
BrowserUseCommand::Navigate(a) => BrowserRequest {
backend: parse_backend(&a.backend)?,
action: BrowserAction::Navigate,
target_id: Some(a.target_id),
tab_id: Some(a.tab_id),
url: Some(a.url),
session: a.session,
..Default::default()
},
};
let res = execute(req);
serde_json::to_value(res).map_err(|e| e.to_string())
}

fn parse_backend(s: &str) -> Result<BrowserBackendKind, String> {
BrowserBackendKind::parse(s).ok_or_else(|| {
format!(
"invalid --backend {:?} (use cua|external|embedded|atmos)",
s
)
})
}

#[derive(Debug, Subcommand)]
pub enum BrowserUseCommand {
/// Attach / prepare a browser CDP endpoint (CUA external Chromium).
Prepare(PrepareArgs),
/// Read browser state / tabs / snapshot refs.
State(StateArgs),
/// Click a page element by ref in a bound tab.
Click(ClickArgs),
/// Type into the bound tab (optional ref).
Type(TypeArgs),
Comment on lines +78 to +79

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Correct the Type help text: --ref is required.

The help text says the ref is optional. TypeArgs.element_ref at Line 147 is a required String, and crates/browser-use/src/backends/cua.rs Line 129 also requires it. The text misleads users of atmos browser-use type --help.

📝 Proposed help-text fix
-    /// Type into the bound tab (optional ref).
+    /// Type text into a page element by ref in a bound tab.
     Type(TypeArgs),
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/// Type into the bound tab (optional ref).
Type(TypeArgs),
/// Type text into a page element by ref in a bound tab.
Type(TypeArgs),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/cli/src/commands/browser_use.rs` around lines 78 - 79, Update the `Type`
command help text to state that the bound tab reference is required, matching
the required `TypeArgs.element_ref` field and backend contract. Change only the
misleading “optional ref” wording while preserving the command’s existing
behavior.

/// Navigate a bound tab to a URL.
Navigate(NavigateArgs),
}

#[derive(Debug, Args)]
pub struct PrepareArgs {
/// Backend: cua (system Chromium) | embedded (Atmos webview stub until APP-053).
#[arg(long, default_value = "cua")]
pub backend: String,
#[arg(long)]
pub pid: Option<i32>,
/// Required when --strategy existing_profile (engine 0.17).
#[arg(long)]
pub window_id: Option<i64>,
#[arg(long)]
pub session: Option<String>,
/// existing_profile (needs --window-id) | isolated_new | isolated_named. Default: omit strategy.
#[arg(long)]
pub strategy: Option<String>,
}

#[derive(Debug, Args)]
pub struct StateArgs {
#[arg(long, default_value = "cua")]
pub backend: String,
/// Bind mode: native browser pid (with --window-id).
#[arg(long)]
pub pid: Option<i32>,
/// Bind mode: native window id (with --pid).
#[arg(long)]
pub window_id: Option<i64>,
/// Snapshot mode: opaque target id from prior bind.
#[arg(long)]
pub target_id: Option<String>,
/// Snapshot mode: opaque tab id from prior bind.
#[arg(long)]
pub tab_id: Option<String>,
#[arg(long)]
pub session: Option<String>,
}

#[derive(Debug, Args)]
pub struct ClickArgs {
#[arg(long, default_value = "cua")]
pub backend: String,
#[arg(long)]
pub target_id: String,
#[arg(long)]
pub tab_id: String,
#[arg(long = "ref")]
pub element_ref: String,
#[arg(long)]
pub session: Option<String>,
}

#[derive(Debug, Args)]
pub struct TypeArgs {
#[arg(long, default_value = "cua")]
pub backend: String,
#[arg(long)]
pub target_id: String,
#[arg(long)]
pub tab_id: String,
#[arg(long)]
pub text: String,
/// Required by engine 0.17 browser_type.
#[arg(long = "ref")]
pub element_ref: String,
#[arg(long)]
pub session: Option<String>,
}

#[derive(Debug, Args)]
pub struct NavigateArgs {
#[arg(long, default_value = "cua")]
pub backend: String,
#[arg(long)]
pub target_id: String,
#[arg(long)]
pub tab_id: String,
#[arg(long)]
pub url: String,
#[arg(long)]
pub session: Option<String>,
}

/// Helpful static note for agents (not a runtime command).
#[allow(dead_code)]
pub fn product_note() -> Value {
json!({
"product": "Browser Use",
"no_mcp": true,
"desktop_use": "separate — OS windows / keys / AX",
"backends": ["cua", "embedded"],
"embedded": "stub until APP-053 / PR #203",
})
}
Loading
Loading