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",
|
"Code editing and shell access",
|
||||||
)
|
)
|
||||||
.item(
|
.item(
|
||||||
"nondeveloper",
|
"computercontroller",
|
||||||
"Non Developer",
|
"Computer Controller",
|
||||||
"AI driven scripting for non developers",
|
"controls for webscraping, file caching, and automations",
|
||||||
)
|
)
|
||||||
.item(
|
.item(
|
||||||
"google_drive",
|
"google_drive",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use goose_mcp::{
|
use goose_mcp::{
|
||||||
DeveloperRouter, GoogleDriveRouter, JetBrainsRouter, MemoryRouter, NonDeveloperRouter,
|
ComputerControllerRouter, DeveloperRouter, GoogleDriveRouter, JetBrainsRouter, MemoryRouter,
|
||||||
};
|
};
|
||||||
use mcp_server::router::RouterService;
|
use mcp_server::router::RouterService;
|
||||||
use mcp_server::{BoundedService, ByteTransport, Server};
|
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 {
|
let router: Option<Box<dyn BoundedService>> = match name {
|
||||||
"developer" => Some(Box::new(RouterService(DeveloperRouter::new()))),
|
"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()))),
|
"jetbrains" => Some(Box::new(RouterService(JetBrainsRouter::new()))),
|
||||||
"google_drive" => {
|
"google_drive" => {
|
||||||
let router = GoogleDriveRouter::new().await;
|
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
|
/// An extension designed for non-developers to help them with common tasks like
|
||||||
/// web scraping, data processing, and automation.
|
/// web scraping, data processing, and automation.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct NonDeveloperRouter {
|
pub struct ComputerControllerRouter {
|
||||||
tools: Vec<Tool>,
|
tools: Vec<Tool>,
|
||||||
cache_dir: PathBuf,
|
cache_dir: PathBuf,
|
||||||
active_resources: Arc<Mutex<HashMap<String, Resource>>>,
|
active_resources: Arc<Mutex<HashMap<String, Resource>>>,
|
||||||
@@ -29,13 +29,13 @@ pub struct NonDeveloperRouter {
|
|||||||
instructions: String,
|
instructions: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for NonDeveloperRouter {
|
impl Default for ComputerControllerRouter {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::new()
|
Self::new()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl NonDeveloperRouter {
|
impl ComputerControllerRouter {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
// Create tools for the system
|
// Create tools for the system
|
||||||
let web_search_tool = Tool::new(
|
let web_search_tool = Tool::new(
|
||||||
@@ -188,7 +188,7 @@ impl NonDeveloperRouter {
|
|||||||
let cache_dir = dirs::cache_dir()
|
let cache_dir = dirs::cache_dir()
|
||||||
.unwrap_or_else(|| PathBuf::from("/tmp"))
|
.unwrap_or_else(|| PathBuf::from("/tmp"))
|
||||||
.join("goose")
|
.join("goose")
|
||||||
.join("non_developer");
|
.join("computer_controller");
|
||||||
fs::create_dir_all(&cache_dir).unwrap_or_else(|_| {
|
fs::create_dir_all(&cache_dir).unwrap_or_else(|_| {
|
||||||
println!(
|
println!(
|
||||||
"Warning: Failed to create cache directory at {:?}",
|
"Warning: Failed to create cache directory at {:?}",
|
||||||
@@ -199,7 +199,7 @@ impl NonDeveloperRouter {
|
|||||||
let instructions = formatdoc! {r#"
|
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.
|
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 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,
|
data processing, and automation and computer control without requiring programming expertise,
|
||||||
supplementing the Developer Extension.
|
supplementing the Developer Extension.
|
||||||
|
|
||||||
@@ -639,9 +639,9 @@ impl NonDeveloperRouter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Router for NonDeveloperRouter {
|
impl Router for ComputerControllerRouter {
|
||||||
fn name(&self) -> String {
|
fn name(&self) -> String {
|
||||||
"NonDeveloperExtension".to_string()
|
"ComputerControllerExtension".to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn instructions(&self) -> String {
|
fn instructions(&self) -> String {
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
|
mod computercontroller;
|
||||||
mod developer;
|
mod developer;
|
||||||
mod google_drive;
|
mod google_drive;
|
||||||
mod jetbrains;
|
mod jetbrains;
|
||||||
mod memory;
|
mod memory;
|
||||||
mod nondeveloper;
|
|
||||||
|
|
||||||
|
pub use computercontroller::ComputerControllerRouter;
|
||||||
pub use developer::DeveloperRouter;
|
pub use developer::DeveloperRouter;
|
||||||
pub use google_drive::GoogleDriveRouter;
|
pub use google_drive::GoogleDriveRouter;
|
||||||
pub use jetbrains::JetBrainsRouter;
|
pub use jetbrains::JetBrainsRouter;
|
||||||
pub use memory::MemoryRouter;
|
pub use memory::MemoryRouter;
|
||||||
pub use nondeveloper::NonDeveloperRouter;
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use goose_mcp::{
|
use goose_mcp::{
|
||||||
DeveloperRouter, GoogleDriveRouter, JetBrainsRouter, MemoryRouter, NonDeveloperRouter,
|
ComputerControllerRouter, DeveloperRouter, GoogleDriveRouter, JetBrainsRouter, MemoryRouter,
|
||||||
};
|
};
|
||||||
use mcp_server::router::RouterService;
|
use mcp_server::router::RouterService;
|
||||||
use mcp_server::{BoundedService, ByteTransport, Server};
|
use mcp_server::{BoundedService, ByteTransport, Server};
|
||||||
@@ -13,7 +13,7 @@ pub async fn run(name: &str) -> Result<()> {
|
|||||||
tracing::info!("Starting MCP server");
|
tracing::info!("Starting MCP server");
|
||||||
let router: Option<Box<dyn BoundedService>> = match name {
|
let router: Option<Box<dyn BoundedService>> = match name {
|
||||||
"developer" => Some(Box::new(RouterService(DeveloperRouter::new()))),
|
"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()))),
|
"jetbrains" => Some(Box::new(RouterService(JetBrainsRouter::new()))),
|
||||||
"google_drive" => {
|
"google_drive" => {
|
||||||
let router = GoogleDriveRouter::new().await;
|
let router = GoogleDriveRouter::new().await;
|
||||||
|
|||||||
@@ -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).
|
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
|
||||||
|
|||||||
@@ -12,11 +12,11 @@
|
|||||||
"environmentVariables": []
|
"environmentVariables": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "nondeveloper",
|
"id": "computercontroller",
|
||||||
"name": "Computer Controller",
|
"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": "",
|
"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'.",
|
"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,
|
"is_builtin": true,
|
||||||
"endorsed": true,
|
"endorsed": true,
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const BUILT_IN_EXTENSIONS = [
|
|||||||
env_keys: [],
|
env_keys: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'nondeveloper',
|
id: 'computercontroller',
|
||||||
name: 'Non-Developer',
|
name: 'Computer Controller',
|
||||||
description:
|
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,
|
enabled: false,
|
||||||
type: 'builtin',
|
type: 'builtin',
|
||||||
env_keys: [],
|
env_keys: [],
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import path from 'path';
|
|||||||
// Types
|
// Types
|
||||||
export interface EnvToggles {
|
export interface EnvToggles {
|
||||||
GOOSE_SERVER__MEMORY: boolean;
|
GOOSE_SERVER__MEMORY: boolean;
|
||||||
GOOSE_SERVER__NON_DEVELOPER: boolean;
|
GOOSE_SERVER__COMPUTER_CONTROLLER: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Settings {
|
export interface Settings {
|
||||||
@@ -18,7 +18,7 @@ const SETTINGS_FILE = path.join(app.getPath('userData'), 'settings.json');
|
|||||||
const defaultSettings: Settings = {
|
const defaultSettings: Settings = {
|
||||||
envToggles: {
|
envToggles: {
|
||||||
GOOSE_SERVER__MEMORY: false,
|
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;
|
delete process.env.GOOSE_SERVER__MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (envToggles.GOOSE_SERVER__NON_DEVELOPER) {
|
if (envToggles.GOOSE_SERVER__COMPUTER_CONTROLLER) {
|
||||||
process.env.GOOSE_SERVER__NON_DEVELOPER = 'true';
|
process.env.GOOSE_SERVER__COMPUTER_CONTROLLER = 'true';
|
||||||
} else {
|
} 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',
|
type: 'checkbox',
|
||||||
checked: envToggles.GOOSE_SERVER__NON_DEVELOPER,
|
checked: envToggles.GOOSE_SERVER__COMPUTER_CONTROLLER,
|
||||||
click: (menuItem: { checked: boolean }) => {
|
click: (menuItem: { checked: boolean }) => {
|
||||||
const newToggles = {
|
const newToggles = {
|
||||||
...envToggles,
|
...envToggles,
|
||||||
GOOSE_SERVER__NON_DEVELOPER: menuItem.checked,
|
GOOSE_SERVER__COMPUTER_CONTROLLER: menuItem.checked,
|
||||||
};
|
};
|
||||||
onToggle(newToggles);
|
onToggle(newToggles);
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user