Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions Cargo.lock

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

37 changes: 32 additions & 5 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,33 @@ run-server:
@echo "Running server..."
cargo run -p goose-server

# Run tests across all crates with keyring disabled
test:
@echo "Running tests with keyring disabled..."
GOOSE_DISABLE_KEYRING=1 cargo test --workspace

# Run linting checks across all crates
lint:
@echo "Running linting checks..."
cargo clippy --workspace --all-features -- -D warnings

# Run comprehensive linting checks (includes tests, examples, benchmarks)
lint-all:
@echo "Running comprehensive linting checks..."
cargo clippy --workspace --all-targets --all-features -- -D warnings
Copy link
Contributor

Choose a reason for hiding this comment

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

is there a reason that lint doesn't do all-targets too? I feel like having distinct lint commands means we won't use one of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah - currently lint-all fails; we should fix them up in another PR. I left it there for future use. Currently just lint is equivalent of what's run in CI


# Format code across all crates
format:
@echo "Formatting code..."
cargo fmt --all

# Quality assurance: format, lint, and test everything
qa:
@echo "Running quality assurance: format, lint, and test..."
@just format
@just lint
@just test

# make GUI with latest binary
lint-ui:
cd ui/desktop && npm run lint:check
Expand Down Expand Up @@ -355,16 +382,16 @@ set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
### Build the core code
### profile = --release or "" for debug
### allparam = OR/AND/ANY/NONE --workspace --all-features --all-targets
win-bld profile allparam:
win-bld profile allparam:
cargo run {{profile}} -p goose-server --bin generate_schema
cargo build {{profile}} {{allparam}}

### Build just debug
win-bld-dbg:
win-bld-dbg:
just win-bld " " " "

### Build debug and test, examples,...
win-bld-dbg-all:
win-bld-dbg-all:
just win-bld " " "--workspace --all-targets --all-features"

### Build just release
Expand Down Expand Up @@ -427,8 +454,8 @@ win-total-rls *allparam:
just win-bld-rls{{allparam}}
just win-run-rls

### Build and run the Kotlin example with
### auto-generated bindings for goose-llm
### Build and run the Kotlin example with
### auto-generated bindings for goose-llm
kotlin-example:
# Build Rust dylib and generate Kotlin bindings
cargo build -p goose-llm
Expand Down
1 change: 1 addition & 0 deletions crates/goose-mcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ workspace = true
[dependencies]
mcp-core = { path = "../mcp-core" }
mcp-server = { path = "../mcp-server" }
goose = { path = "../goose" }
anyhow = "1.0.94"
tokio = { version = "1", features = ["full"] }
tracing = "0.1"
Expand Down
4 changes: 4 additions & 0 deletions crates/goose-mcp/src/google_drive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,16 @@ impl GoogleDriveRouter {
Err(_) => false,
};

// Use factory to create keyring backend consistently
let keyring = goose::keyring::create_default_keyring();

// Create a credentials manager for storing tokens securely
let credentials_manager = Arc::new(CredentialsManager::new(
credentials_path.clone(),
fallback_to_disk,
KEYCHAIN_SERVICE.to_string(),
KEYCHAIN_USERNAME.to_string(),
keyring,
));

// Read the OAuth credentials from the keyfile
Expand Down
16 changes: 8 additions & 8 deletions crates/goose-mcp/src/google_drive/oauth_pkce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ impl PkceOAuth2Client {
};

// Store updated token data
self.credentials_manager
.write_credentials(&token_data)
.map(|_| debug!("Successfully stored token data"))
.unwrap_or_else(|e| error!("Failed to store token data: {}", e));
match self.credentials_manager.write_credentials(&token_data) {
Ok(_) => debug!("Successfully stored token data"),
Err(e) => error!("Failed to store token data: {}", e),
}
} else {
debug!("No refresh token provided in OAuth flow response");
}
Expand Down Expand Up @@ -248,10 +248,10 @@ impl PkceOAuth2Client {
};

// Store updated token data
self.credentials_manager
.write_credentials(&token_data)
.map(|_| debug!("Successfully stored token data"))
.unwrap_or_else(|e| error!("Failed to store token data: {}", e));
match self.credentials_manager.write_credentials(&token_data) {
Ok(_) => debug!("Successfully stored token data"),
Err(e) => error!("Failed to store token data: {}", e),
}

Ok(access_token)
}
Expand Down
Loading
Loading