mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-18 06:34:26 +01:00
chore: Rename non dev to computer controller (#788)
Co-authored-by: Angie Jones <jones.angie@gmail.com>
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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};
|
||||
@@ -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;
|
||||
|
||||
@@ -21,7 +21,7 @@ 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>>>,
|
||||
@@ -29,13 +29,13 @@ pub struct NonDeveloperRouter {
|
||||
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(
|
||||
@@ -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 {:?}",
|
||||
@@ -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.
|
||||
|
||||
@@ -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 {
|
||||
@@ -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;
|
||||
|
||||
@@ -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};
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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: [],
|
||||
|
||||
@@ -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 {
|
||||
@@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user