Skip to content

Commit

Permalink
Merge branch 'main' into update-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
colesmcintosh authored Feb 27, 2025
2 parents d53ce76 + 552facb commit 5321405
Show file tree
Hide file tree
Showing 151 changed files with 4,996 additions and 2,094 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ assignees: ''
---

**Describe the bug**

Note: Please check some common questiosn on https://block.github.io/goose/docs/troubleshooting before filing the report

A clear and concise description of what the bug is.

**To Reproduce**
Expand Down
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''

---

**Please explain the motivation behind the feature request.**
Does this feature solve a particular problem you have been experiencing? What opportunities or use cases would be unlocked with this feature?

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

- [x] I have verified this does not duplicate an existing feature request
2 changes: 1 addition & 1 deletion .github/workflows/bundle-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:

- name: Add MacOS certs for signing and notarization
if: ${{ inputs.signing }}
run: ./add-macos-cert.sh
run: ./scripts/add-macos-cert.sh
working-directory: ui/desktop
env:
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
Expand Down
7 changes: 5 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

cd ui/desktop && npx lint-staged
# Only auto-format desktop TS code if relevant files are modified
if git diff --cached --name-only | grep -q "^ui/desktop/"; then
. "$(dirname -- "$0")/_/husky.sh"
cd ui/desktop && npx lint-staged
fi
23 changes: 20 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Contributing
# Contribution Guide

Goose is Open Source!
Goose is open source!

We welcome Pull Requests for general contributions! If you have a larger new feature or any questions on how to develop a fix, we recommend you open an [issue][issues] before starting.
We welcome pull requests for general contributions! If you have a larger new feature or any questions on how to develop a fix, we recommend you open an issue before starting.

>[!TIP] Beyond code, check out [other ways to contribute](#other-ways-to-contribute)
## Prerequisites

Expand Down Expand Up @@ -146,3 +148,18 @@ This project follows the [Conventional Commits](https://www.conventionalcommits.
[rustup]: https://doc.rust-lang.org/cargo/getting-started/installation.html
[nvm]: https://github.com/nvm-sh/nvm
[just]: https://github.com/casey/just?tab=readme-ov-file#installation
## Other Ways to Contribute
There are numerous ways to be an open source contributor and contribute to Goose. We're here to help you on your way! Here are some suggestions to get started. If you have any questions or need help, feel free to reach out to us on [Discord](https://discord.gg/block-opensource).

- **Stars on GitHub:** If you resonate with our project and find it valuable, consider starring our Goose on GitHub! 🌟
- **Ask Questions:** Your questions not only help us improve but also benefit the community. If you have a question, don't hesitate to ask it on [Discord](https://discord.gg/block-opensource).
- **Give Feedback:** Have a feature you want to see or encounter an issue with Goose, [click here to open an issue](https://github.com/block/goose/issues/new/choose), [start a discussion](https://github.com/block/goose/discussions) or tell us on Discord.
- **Participate in Community Events:** We host a variety of community events and livestreams on Discord every month, ranging from workshops to brainstorming sessions. You can subscribe to our [events calendar](https://calget.com/c/t7jszrie) or follow us on [social media](https://linktr.ee/blockopensource) to stay in touch.
- **Improve Documentation:** Good documentation is key to the success of any project. You can help improve the quality of our existing docs or add new pages.
- **Help Other Members:** See another community member stuck? Or a contributor blocked by a question you know the answer to? Reply to community threads or do a code review for others to help.
- **Showcase Your Work:** Working on a project or written a blog post recently? Share it with the community in our [#share-your-work](https://discord.com/channels/1287729918100246654/1287729920797179958) channel.
- **Give Shoutouts:** Is there a project you love or a community/staff who's been especially helpful? Feel free to give them a shoutout in our [#general](https://discord.com/channels/1287729918100246654/1287729920797179957) channel.
- **Spread the Word:** Help us reach more people by sharing Goose's project, website, YouTube, and/or Twitter/X.
8 changes: 4 additions & 4 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resolver = "2"

[workspace.package]
edition = "2021"
version = "1.0.7"
version = "1.0.10"
authors = ["Block <[email protected]>"]
license = "Apache-2.0"
repository = "https://github.com/block/goose"
Expand Down
6 changes: 6 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ run-ui:
@echo "Running UI..."
cd ui/desktop && npm install && npm run start-gui

# Run UI with alpha changes
run-ui-alpha:
@just release-binary
@echo "Running UI..."
cd ui/desktop && npm install && ALPHA=true npm run start-alpha-gui

# Run UI with latest (Windows version)
run-ui-windows:
@just release-windows
Expand Down
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
<p align="center">
<div align="center">
<img src="documentation/docs/assets/goose-logo.png" alt="Goose Logo" width="200">
</p>

<h1 align="center">
codename goose
</h1>
# codename goose

<p align="center">
An open-source, extensible AI agent that goes beyond code suggestions</strong>
</p>
_a local, extensible, open source AI agent that automates engineering tasks_

<p align="center">
<a href="https://opensource.org/licenses/Apache-2.0">
Expand All @@ -21,6 +16,20 @@ codename goose
<img src="https://img.shields.io/github/actions/workflow/status/block/goose/ci.yml?branch=main" alt="CI">
</a>
</p>
</div>

goose is your on-machine AI agent, capable of automating complex development tasks from start to finish. More than just code suggestions, goose can build entire projects from scratch, write and execute code, debug failures, orchestrate workflows, and interact with external APIs - _autonomously_.

Whether you're prototyping an idea, refining existing code, or managing intricate engineering pipelines, goose adapts to your workflow and executes tasks with precision.

Designed for maximum flexibility, goose works with any LLM and seamlessly integrates with MCP-enabled APIs, making it the ultimate AI-powered assistant for developers who want to move faster and focus on innovation.


# Quick Links
- [Quickstart](https://block.github.io/goose/docs/quickstart)
- [Installation](https://block.github.io/goose/docs/getting-started/installation)
- [Tutorials](https://block.github.io/goose/docs/category/tutorials)
- [Documentation](https://block.github.io/goose/docs/category/getting-started)

## Key Features

Expand All @@ -37,4 +46,9 @@ Check out our [documentation](https://block.github.io/goose), or to try it out h

Join our growing community:
- [GitHub](https://github.com/block/goose/blob/main/CONTRIBUTING.md) - Contribute to the project

- [Discord](https://discord.gg/block-opensource)
- [YouTube](https://www.youtube.com/@blockopensource)
- [LinkedIn](https://www.linkedin.com/company/block-opensource)
- [Twitter/X](https://x.com/blockopensource)
- [Bluesky](https://bsky.app/profile/opensource.block.xyz)
- [Nostr](https://njump.me/[email protected])
136 changes: 130 additions & 6 deletions crates/goose-cli/src/commands/configure.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use cliclack::spinner;
use console::style;
use goose::agents::{extension::Envs, ExtensionConfig};
use goose::config::{Config, ConfigError, ExtensionEntry, ExtensionManager};
use goose::config::{Config, ConfigError, ExperimentManager, ExtensionEntry, ExtensionManager};
use goose::message::Message;
use goose::providers::{create, providers};
use mcp_core::Tool;
Expand Down Expand Up @@ -151,17 +151,17 @@ pub async fn handle_configure() -> Result<(), Box<dyn Error>> {
)
.item("remove", "Remove Extension", "Remove an extension")
.item(
"tool_output",
"Adjust Tool Output",
"Show more or less tool output",
"settings",
"Goose Settings",
"Set the Goose Mode, Tool Output, Experiment and more",
)
.interact()?;

match action {
"toggle" => toggle_extensions_dialog(),
"add" => configure_extensions_dialog(),
"remove" => remove_extension_dialog(),
"tool_output" => configure_tool_output_dialog(),
"settings" => configure_settings_dialog(),
"providers" => configure_provider_dialog().await.and(Ok(())),
_ => unreachable!(),
}
Expand Down Expand Up @@ -621,12 +621,96 @@ pub fn remove_extension_dialog() -> Result<(), Box<dyn Error>> {
Ok(())
}

pub fn configure_settings_dialog() -> Result<(), Box<dyn Error>> {
let mut setting_select_builder = cliclack::select("What setting would you like to configure?")
.item("goose_mode", "Goose Mode", "Configure Goose mode")
.item(
"tool_output",
"Tool Output",
"Show more or less tool output",
);

// Conditionally add the "Toggle Experiment" option
if ExperimentManager::is_enabled("EXPERIMENT_CONFIG")? {
setting_select_builder = setting_select_builder.item(
"experiment",
"Toggle Experiment",
"Enable or disable an experiment feature",
);
}

let setting_type = setting_select_builder.interact()?;

match setting_type {
"goose_mode" => {
configure_goose_mode_dialog()?;
}
"tool_output" => {
configure_tool_output_dialog()?;
}
"experiment" => {
toggle_experiments_dialog()?;
}
_ => unreachable!(),
};

Ok(())
}

pub fn configure_goose_mode_dialog() -> Result<(), Box<dyn Error>> {
let config = Config::global();

// Check if GOOSE_MODE is set as an environment variable
if std::env::var("GOOSE_MODE").is_ok() {
let _ = cliclack::log::info("Notice: GOOSE_MODE environment variable is set and will override the configuration here.");
}

let mode = cliclack::select("Which Goose mode would you like to configure?")
.item(
"auto",
"Auto Mode",
"Full file modification, extension usage, edit, create and delete files freely"
)
.item(
"approve",
"Approve Mode",
"Editing, creating, deleting files and using extensions will require human approval"
)
.item(
"chat",
"Chat Mode",
"Engage with the selected provider without using tools, extensions, or file modification"
)
.interact()?;

match mode {
"auto" => {
config.set("GOOSE_MODE", Value::String("auto".to_string()))?;
cliclack::outro("Set to Auto Mode - full file modification enabled")?;
}
"approve" => {
config.set("GOOSE_MODE", Value::String("approve".to_string()))?;
cliclack::outro("Set to Approve Mode - modifications require approval")?;
}
"chat" => {
config.set("GOOSE_MODE", Value::String("chat".to_string()))?;
cliclack::outro("Set to Chat Mode - no tools or modifications enabled")?;
}
_ => unreachable!(),
};
Ok(())
}

pub fn configure_tool_output_dialog() -> Result<(), Box<dyn Error>> {
let config = Config::global();
// Check if GOOSE_CLI_MIN_PRIORITY is set as an environment variable
if std::env::var("GOOSE_CLI_MIN_PRIORITY").is_ok() {
let _ = cliclack::log::info("Notice: GOOSE_CLI_MIN_PRIORITY environment variable is set and will override the configuration here.");
}
let tool_log_level = cliclack::select("Which tool output would you like to show?")
.item("high", "High Importance", "")
.item("medium", "Medium Importance", "Ex. results of file-writes")
.item("all", "All", "Ex. shell command output")
.item("all", "All (default)", "Ex. shell command output")
.interact()?;

match tool_log_level {
Expand All @@ -647,3 +731,43 @@ pub fn configure_tool_output_dialog() -> Result<(), Box<dyn Error>> {

Ok(())
}

/// Configure experiment features that can be used with goose
/// Dialog for toggling which experiments are enabled/disabled
pub fn toggle_experiments_dialog() -> Result<(), Box<dyn Error>> {
let experiments = ExperimentManager::get_all()?;

if experiments.is_empty() {
cliclack::outro("No experiments supported yet.")?;
return Ok(());
}

// Get currently enabled experiments for the selection
let enabled_experiments: Vec<&String> = experiments
.iter()
.filter(|(_, enabled)| *enabled)
.map(|(name, _)| name)
.collect();

// Let user toggle experiments
let selected = cliclack::multiselect(
"enable experiments: (use \"space\" to toggle and \"enter\" to submit)",
)
.required(false)
.items(
&experiments
.iter()
.map(|(name, _)| (name, name.as_str(), ""))
.collect::<Vec<_>>(),
)
.initial_values(enabled_experiments)
.interact()?;

// Update enabled status for each experiments
for name in experiments.iter().map(|(name, _)| name) {
ExperimentManager::set_enabled(name, selected.iter().any(|&s| s.as_str() == name))?;
}

cliclack::outro("Experiments settings updated successfully")?;
Ok(())
}
4 changes: 3 additions & 1 deletion crates/goose-cli/src/commands/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ fn print_aligned(label: &str, value: &str, width: usize) {

pub fn handle_info(verbose: bool) -> Result<()> {
let data_dir = choose_app_strategy(crate::APP_STRATEGY.clone())?;
let logs_dir = data_dir.in_data_dir("logs");
let logs_dir = data_dir
.in_state_dir("logs")
.unwrap_or_else(|| data_dir.in_data_dir("logs"));
let sessions_dir = data_dir.in_data_dir("sessions");

// Get paths using a stored reference to the global config
Expand Down
1 change: 1 addition & 0 deletions crates/goose-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ pub mod agent_version;
pub mod configure;
pub mod info;
pub mod mcp;
pub mod update;
Loading

0 comments on commit 5321405

Please sign in to comment.