Skip to content
Open
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
4 changes: 4 additions & 0 deletions google/genai/_interactions/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@
from .tool_param import ToolParam as ToolParam
from .environment import Environment as Environment
from .error_event import ErrorEvent as ErrorEvent
from .fix_request import FixRequest as FixRequest
from .interaction import Interaction as Interaction
from .model_param import ModelParam as ModelParam
from .usage_param import UsageParam as UsageParam
from .find_request import FindRequest as FindRequest
from .image_config import ImageConfig as ImageConfig
from .text_content import TextContent as TextContent
from .thought_step import ThoughtStep as ThoughtStep
Expand All @@ -58,8 +60,10 @@
from .tool_choice_type import ToolChoiceType as ToolChoiceType
from .agent_list_params import AgentListParams as AgentListParams
from .environment_param import EnvironmentParam as EnvironmentParam
from .fix_request_param import FixRequestParam as FixRequestParam
from .generation_config import GenerationConfig as GenerationConfig
from .model_output_step import ModelOutputStep as ModelOutputStep
from .find_request_param import FindRequestParam as FindRequestParam
from .function_call_step import FunctionCallStep as FunctionCallStep
from .google_maps_result import GoogleMapsResult as GoogleMapsResult
from .image_config_param import ImageConfigParam as ImageConfigParam
Expand Down
92 changes: 92 additions & 0 deletions google/genai/_interactions/types/find_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing_extensions import Literal

from .._models import BaseModel

__all__ = ["FindRequest", "SessionConfig", "SourceFile"]


class SessionConfig(BaseModel):
"""
Optional session-specific configurations to override default agent
behavior.
"""

max_rounds: Optional[int] = None
"""
The maximum number of interaction rounds the agent is allowed to perform before
reaching a timeout.
"""

pipeline_mode: Optional[Literal["scan", "verify"]] = None
"""The pipeline mode of a CodeMender session.

It can only be used for a find session.
"""

topology: Optional[str] = None
"""The cognitive architecture or "thinking" topology used by the agent (e.g.

"default", "deep").
"""


class SourceFile(BaseModel):
"""Content of a single file in the codebase."""

content: Optional[str] = None
"""The UTF-8 encoded text content of the file."""

path: Optional[str] = None
"""The relative path of the file from the project root."""


class FindRequest(BaseModel):
"""
Request parameters specific to FIND sessions, used for discovering
vulnerabilities in a codebase.
"""

request: Literal["find_request"]

description: Optional[str] = None
"""
Additional context or custom instructions provided by the user to guide the
vulnerability analysis.
"""

finding_id: Optional[str] = None
"""The identifier of a specific finding to verify.

This is primarily used in VERIFY mode to focus the agent's execution-based
validation on a single vulnerability.
"""

session_config: Optional[SessionConfig] = None
"""Optional session-specific configurations to override default agent behavior."""

session_id: Optional[str] = None
"""
Parameter for grouping multiple interactions that belong to the same CodeMender
session.
"""

source_files: Optional[List[SourceFile]] = None
"""A list of source files to provide as context for the scan."""
92 changes: 92 additions & 0 deletions google/genai/_interactions/types/find_request_param.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Iterable
from typing_extensions import Literal, Required, TypedDict

__all__ = ["FindRequestParam", "SessionConfig", "SourceFile"]


class SessionConfig(TypedDict, total=False):
"""
Optional session-specific configurations to override default agent
behavior.
"""

max_rounds: int
"""
The maximum number of interaction rounds the agent is allowed to perform before
reaching a timeout.
"""

pipeline_mode: Literal["scan", "verify"]
"""The pipeline mode of a CodeMender session.

It can only be used for a find session.
"""

topology: str
"""The cognitive architecture or "thinking" topology used by the agent (e.g.

"default", "deep").
"""


class SourceFile(TypedDict, total=False):
"""Content of a single file in the codebase."""

content: str
"""The UTF-8 encoded text content of the file."""

path: str
"""The relative path of the file from the project root."""


class FindRequestParam(TypedDict, total=False):
"""
Request parameters specific to FIND sessions, used for discovering
vulnerabilities in a codebase.
"""

request: Required[Literal["find_request"]]

description: str
"""
Additional context or custom instructions provided by the user to guide the
vulnerability analysis.
"""

finding_id: str
"""The identifier of a specific finding to verify.

This is primarily used in VERIFY mode to focus the agent's execution-based
validation on a single vulnerability.
"""

session_config: SessionConfig
"""Optional session-specific configurations to override default agent behavior."""

session_id: str
"""
Parameter for grouping multiple interactions that belong to the same CodeMender
session.
"""

source_files: Iterable[SourceFile]
"""A list of source files to provide as context for the scan."""
94 changes: 94 additions & 0 deletions google/genai/_interactions/types/fix_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing_extensions import Literal

from .._models import BaseModel

__all__ = ["FixRequest", "SessionConfig", "SourceFile"]


class SessionConfig(BaseModel):
"""
Optional session-specific configurations to override default agent
behavior.
"""

max_rounds: Optional[int] = None
"""
The maximum number of interaction rounds the agent is allowed to perform before
reaching a timeout.
"""

pipeline_mode: Optional[Literal["scan", "verify"]] = None
"""The pipeline mode of a CodeMender session.

It can only be used for a find session.
"""

topology: Optional[str] = None
"""The cognitive architecture or "thinking" topology used by the agent (e.g.

"default", "deep").
"""


class SourceFile(BaseModel):
"""Content of a single file in the codebase."""

content: Optional[str] = None
"""The UTF-8 encoded text content of the file."""

path: Optional[str] = None
"""The relative path of the file from the project root."""


class FixRequest(BaseModel):
"""
Request parameters specific to FIX sessions, used for generating and
validating security patches.
"""

request: Literal["fix_request"]

description: Optional[str] = None
"""
Additional context or custom instructions provided by the user to guide the
patch generation process.
"""

finding_id: Optional[str] = None
"""The identifier of the specific security finding to be remediated.

This ID maps to a previously discovered vulnerability.
"""

session_config: Optional[SessionConfig] = None
"""Optional session-specific configurations to override default agent behavior."""

session_id: Optional[str] = None
"""
Parameter for grouping multiple interactions that belong to the same CodeMender
session.
"""

source_files: Optional[List[SourceFile]] = None
"""A list of source files providing context for the remediation.

These files are typically the ones containing the identified vulnerability.
"""
94 changes: 94 additions & 0 deletions google/genai/_interactions/types/fix_request_param.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Iterable
from typing_extensions import Literal, Required, TypedDict

__all__ = ["FixRequestParam", "SessionConfig", "SourceFile"]


class SessionConfig(TypedDict, total=False):
"""
Optional session-specific configurations to override default agent
behavior.
"""

max_rounds: int
"""
The maximum number of interaction rounds the agent is allowed to perform before
reaching a timeout.
"""

pipeline_mode: Literal["scan", "verify"]
"""The pipeline mode of a CodeMender session.

It can only be used for a find session.
"""

topology: str
"""The cognitive architecture or "thinking" topology used by the agent (e.g.

"default", "deep").
"""


class SourceFile(TypedDict, total=False):
"""Content of a single file in the codebase."""

content: str
"""The UTF-8 encoded text content of the file."""

path: str
"""The relative path of the file from the project root."""


class FixRequestParam(TypedDict, total=False):
"""
Request parameters specific to FIX sessions, used for generating and
validating security patches.
"""

request: Required[Literal["fix_request"]]

description: str
"""
Additional context or custom instructions provided by the user to guide the
patch generation process.
"""

finding_id: str
"""The identifier of the specific security finding to be remediated.

This ID maps to a previously discovered vulnerability.
"""

session_config: SessionConfig
"""Optional session-specific configurations to override default agent behavior."""

session_id: str
"""
Parameter for grouping multiple interactions that belong to the same CodeMender
session.
"""

source_files: Iterable[SourceFile]
"""A list of source files providing context for the remediation.

These files are typically the ones containing the identified vulnerability.
"""
Loading
Loading