Skip to content

Commit

Permalink
chore: Rename non dev to computer controller (#788)
Browse files Browse the repository at this point in the history
Co-authored-by: Angie Jones <jones.angie@gmail.com>
  • Loading branch information
baxen and angiejones authored Jan 26, 2025
1 parent 4548710 commit 03f87e2
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 31 deletions.
6 changes: 3 additions & 3 deletions crates/goose-cli/src/commands/configure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ pub fn configure_extensions_dialog() -> Result<(), Box<dyn Error>> {
"Code editing and shell access",
)
.item(
"nondeveloper",
"Non Developer",
"AI driven scripting for non developers",
"computercontroller",
"Computer Controller",
"controls for webscraping, file caching, and automations",
)
.item(
"google_drive",
Expand Down
4 changes: 2 additions & 2 deletions crates/goose-cli/src/commands/mcp.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;
use goose_mcp::{
DeveloperRouter, GoogleDriveRouter, JetBrainsRouter, MemoryRouter, NonDeveloperRouter,
ComputerControllerRouter, DeveloperRouter, GoogleDriveRouter, JetBrainsRouter, MemoryRouter,
};
use mcp_server::router::RouterService;
use mcp_server::{BoundedService, ByteTransport, Server};
Expand All @@ -14,7 +14,7 @@ pub async fn run_server(name: &str) -> Result<()> {

let router: Option<Box<dyn BoundedService>> = match name {
"developer" => Some(Box::new(RouterService(DeveloperRouter::new()))),
"nondeveloper" => Some(Box::new(RouterService(NonDeveloperRouter::new()))),
"computercontroller" => Some(Box::new(RouterService(ComputerControllerRouter::new()))),
"jetbrains" => Some(Box::new(RouterService(JetBrainsRouter::new()))),
"google_drive" => {
let router = GoogleDriveRouter::new().await;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ use mcp_server::Router;
/// An extension designed for non-developers to help them with common tasks like
/// web scraping, data processing, and automation.
#[derive(Clone)]
pub struct NonDeveloperRouter {
pub struct ComputerControllerRouter {
tools: Vec<Tool>,
cache_dir: PathBuf,
active_resources: Arc<Mutex<HashMap<String, Resource>>>,
http_client: Client,
instructions: String,
}

impl Default for NonDeveloperRouter {
impl Default for ComputerControllerRouter {
fn default() -> Self {
Self::new()
}
}

impl NonDeveloperRouter {
impl ComputerControllerRouter {
pub fn new() -> Self {
// Create tools for the system
let web_search_tool = Tool::new(
Expand Down Expand Up @@ -188,7 +188,7 @@ impl NonDeveloperRouter {
let cache_dir = dirs::cache_dir()
.unwrap_or_else(|| PathBuf::from("/tmp"))
.join("goose")
.join("non_developer");
.join("computer_controller");
fs::create_dir_all(&cache_dir).unwrap_or_else(|_| {
println!(
"Warning: Failed to create cache directory at {:?}",
Expand All @@ -199,7 +199,7 @@ impl NonDeveloperRouter {
let instructions = formatdoc! {r#"
You are a helpful assistant to a power user who is not a professional developer, but you may use devleopment tools to help assist them.
The user may not know how to break down tasks, so you will need to ensure that you do, and run things in batches as needed.
The NonDeveloperExtension helps you with common tasks like web scraping,
The ComputerControllerExtension helps you with common tasks like web scraping,
data processing, and automation and computer control without requiring programming expertise,
supplementing the Developer Extension.
Expand Down Expand Up @@ -639,9 +639,9 @@ impl NonDeveloperRouter {
}
}

impl Router for NonDeveloperRouter {
impl Router for ComputerControllerRouter {
fn name(&self) -> String {
"NonDeveloperExtension".to_string()
"ComputerControllerExtension".to_string()
}

fn instructions(&self) -> String {
Expand Down
4 changes: 2 additions & 2 deletions crates/goose-mcp/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
mod computercontroller;
mod developer;
mod google_drive;
mod jetbrains;
mod memory;
mod nondeveloper;

pub use computercontroller::ComputerControllerRouter;
pub use developer::DeveloperRouter;
pub use google_drive::GoogleDriveRouter;
pub use jetbrains::JetBrainsRouter;
pub use memory::MemoryRouter;
pub use nondeveloper::NonDeveloperRouter;
4 changes: 2 additions & 2 deletions crates/goose-server/src/commands/mcp.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;
use goose_mcp::{
DeveloperRouter, GoogleDriveRouter, JetBrainsRouter, MemoryRouter, NonDeveloperRouter,
ComputerControllerRouter, DeveloperRouter, GoogleDriveRouter, JetBrainsRouter, MemoryRouter,
};
use mcp_server::router::RouterService;
use mcp_server::{BoundedService, ByteTransport, Server};
Expand All @@ -13,7 +13,7 @@ pub async fn run(name: &str) -> Result<()> {
tracing::info!("Starting MCP server");
let router: Option<Box<dyn BoundedService>> = match name {
"developer" => Some(Box::new(RouterService(DeveloperRouter::new()))),
"nondeveloper" => Some(Box::new(RouterService(NonDeveloperRouter::new()))),
"computercontroller" => Some(Box::new(RouterService(ComputerControllerRouter::new()))),
"jetbrains" => Some(Box::new(RouterService(JetBrainsRouter::new()))),
"google_drive" => {
let router = GoogleDriveRouter::new().await;
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/getting-started/using-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,4 +269,4 @@ goose session --with-extension "VAR=value command arg1 arg2"
Goose extensions are implemented with MCP, a standard protocol that allows AI models and agents to securely connect with local or remote resources. Learn how to build your own [extension as an MCP server](https://modelcontextprotocol.io/quickstart/server).


[extensions-directory]: https://block.github.io/goose/v1/extensions
[extensions-directory]: https://block.github.io/goose/v1/extensions
6 changes: 3 additions & 3 deletions extensions-site/public/servers.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"environmentVariables": []
},
{
"id": "nondeveloper",
"id": "computercontroller",
"name": "Computer Controller",
"description": "Built-in computer controlls for webscraping, file caching, and automations",
"description": "Built-in computer controls for webscraping, file caching, and automations",
"command": "",
"link": "https://github.com/block/goose/tree/v1.0/crates/goose-mcp/src/nondeveloper",
"link": "https://github.com/block/goose/tree/v1.0/crates/goose-mcp/src/computercontroller",
"installation_notes": "This is a built-in extension that comes with goose and can be enabled in the Settings page under 'Extensions'.",
"is_builtin": true,
"endorsed": true,
Expand Down
6 changes: 3 additions & 3 deletions ui/desktop/src/extensions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ export const BUILT_IN_EXTENSIONS = [
env_keys: [],
},
{
id: 'nondeveloper',
name: 'Non-Developer',
id: 'computercontroller',
name: 'Computer Controller',
description:
"General computer control tools that don't require you to be a developer or engineer.",
"General computer control tools that doesn't require you to be a developer or engineer.",
enabled: false,
type: 'builtin',
env_keys: [],
Expand Down
16 changes: 8 additions & 8 deletions ui/desktop/src/utils/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from 'path';
// Types
export interface EnvToggles {
GOOSE_SERVER__MEMORY: boolean;
GOOSE_SERVER__NON_DEVELOPER: boolean;
GOOSE_SERVER__COMPUTER_CONTROLLER: boolean;
}

export interface Settings {
Expand All @@ -18,7 +18,7 @@ const SETTINGS_FILE = path.join(app.getPath('userData'), 'settings.json');
const defaultSettings: Settings = {
envToggles: {
GOOSE_SERVER__MEMORY: false,
GOOSE_SERVER__NON_DEVELOPER: false,
GOOSE_SERVER__COMPUTER_CONTROLLER: false,
},
};

Expand Down Expand Up @@ -51,10 +51,10 @@ export function updateEnvironmentVariables(envToggles: EnvToggles): void {
delete process.env.GOOSE_SERVER__MEMORY;
}

if (envToggles.GOOSE_SERVER__NON_DEVELOPER) {
process.env.GOOSE_SERVER__NON_DEVELOPER = 'true';
if (envToggles.GOOSE_SERVER__COMPUTER_CONTROLLER) {
process.env.GOOSE_SERVER__COMPUTER_CONTROLLER = 'true';
} else {
delete process.env.GOOSE_SERVER__NON_DEVELOPER;
delete process.env.GOOSE_SERVER__COMPUTER_CONTROLLER;
}
}

Expand All @@ -77,13 +77,13 @@ export function createEnvironmentMenu(
},
},
{
label: 'Enable Non-Developer Mode',
label: 'Enable Computer Controller Mode',
type: 'checkbox',
checked: envToggles.GOOSE_SERVER__NON_DEVELOPER,
checked: envToggles.GOOSE_SERVER__COMPUTER_CONTROLLER,
click: (menuItem: { checked: boolean }) => {
const newToggles = {
...envToggles,
GOOSE_SERVER__NON_DEVELOPER: menuItem.checked,
GOOSE_SERVER__COMPUTER_CONTROLLER: menuItem.checked,
};
onToggle(newToggles);
},
Expand Down

0 comments on commit 03f87e2

Please sign in to comment.