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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package com.google.adk.agents;

import io.reactivex.rxjava3.disposables.Disposable;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** Manages streaming tool related resources during invocation. */
public class ActiveStreamingTool {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import java.util.Optional;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** The context for an agent invocation. */
public class InvocationContext {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/agents/LiveRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import com.google.genai.types.Blob;
import com.google.genai.types.Content;
import java.util.Optional;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** Represents a request to be sent to a live connection to the LLM model. */
@AutoValue
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/agents/LlmAgent.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
import java.util.Optional;
import java.util.concurrent.Executor;
import java.util.function.Function;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/agents/RunConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.google.genai.types.AudioTranscriptionConfig;
import com.google.genai.types.Modality;
import com.google.genai.types.SpeechConfig;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/agents/ToolResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.lang.reflect.Modifier;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/apps/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import java.util.List;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/**
* Represents an LLM-backed agentic application.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/events/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import java.util.Optional;
import java.util.Set;
import java.util.UUID;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

// TODO - b/413761119 update Agent.java when resolved.
/** Represents an event in a session. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import com.google.adk.JsonBaseModel;
import com.google.auto.value.AutoValue;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** Represents a tool confirmation configuration. */
@AutoValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** {@link RequestProcessor} that populates content in request for LLM flows. */
public final class Contents implements RequestProcessor {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/memory/MemoryEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.google.auto.value.AutoValue;
import com.google.genai.types.Content;
import java.time.Instant;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** Represents one memory entry. */
@AutoValue
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/models/LlmResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import com.google.genai.types.GroundingMetadata;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** Represents a response received from the LLM. */
@AutoValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.google.auth.oauth2.GoogleCredentials;
import com.google.auto.value.AutoValue;
import java.util.Optional;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** Credentials for accessing Gemini models through Vertex. */
@AutoValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.Map;
import java.util.Optional;
import java.util.function.BiFunction;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** Configuration for the BigQueryAgentAnalyticsPlugin. */
@AutoValue
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/runner/Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** The main class for the GenAI Agents runner. */
public class Runner {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/**
* Defines the contract for managing {@link Session}s and their associated {@link Event}s. Provides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/sessions/State.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** A {@link State} object that also keeps track of the changes to the state. */
@SuppressWarnings("ShouldNotSubclass")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeoutException;
import javax.annotation.Nullable;
import okhttp3.ResponseBody;
import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import com.google.auto.value.AutoBuilder;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/**
* Configuration for event compaction.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/tools/BaseToolset.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.google.adk.agents.ReadonlyContext;
import io.reactivex.rxjava3.core.Flowable;
import java.util.List;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** Base interface for toolsets. */
public interface BaseToolset extends AutoCloseable {
Expand Down
5 changes: 2 additions & 3 deletions core/src/main/java/com/google/adk/tools/FunctionTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -222,8 +222,7 @@ public Method func() {
}

/** Returns the underlying function's {@link Object} instance if present. */
@Nullable
Object instance() {
@Nullable Object instance() {
return instance;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.fasterxml.jackson.core.type.TypeReference;
import com.google.adk.utils.ComponentRegistry;
import java.lang.reflect.Method;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** A function tool that returns the result asynchronously. */
public class LongRunningFunctionTool extends FunctionTool {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/tools/ToolContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import io.reactivex.rxjava3.core.Single;
import java.util.Optional;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** ToolContext object provides a structured context for executing tools or functions. */
public class ToolContext extends CallbackContext {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/com/google/adk/tools/ToolPredicate.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import com.google.adk.agents.ReadonlyContext;
import java.util.Optional;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/**
* Functional interface to decide whether a tool should be exposed to the LLM based on the current
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.net.http.HttpRequest;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/**
* This interface provides a method to convert a service account JSON string to a Google Credentials
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

public final class GoogleCredentialsHelper implements CredentialsHelper {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import reactor.core.publisher.Mono;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import com.google.common.collect.ImmutableMap;
import java.time.Duration;
import java.util.Map;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** Parameters for establishing a MCP Server-Sent Events (SSE) connection. */
@AutoValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import io.modelcontextprotocol.client.transport.ServerParameters;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** Parameters for establishing a MCP stdio connection. */
@AutoValue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.time.Duration;
import java.util.Collections;
import java.util.Map;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;

/** Server parameters for Streamable HTTP client transport. */
public class StreamableHttpServerParameters {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import java.util.List;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.jspecify.annotations.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Loading