Skip to content

Commit fae9dc4

Browse files
yinghsienwucopybara-github
authored andcommitted
feat: add new fields
PiperOrigin-RevId: 913942680
1 parent 75684a6 commit fae9dc4

6 files changed

Lines changed: 216 additions & 114 deletions

File tree

agentplatform/_genai/types/__init__.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,9 +1213,6 @@
12131213
from .common import SandboxEnvironmentTemplateResourceRequirements
12141214
from .common import SandboxEnvironmentTemplateResourceRequirementsDict
12151215
from .common import SandboxEnvironmentTemplateResourceRequirementsOrDict
1216-
from .common import SandboxEnvironmentTemplateWarmPoolConfig
1217-
from .common import SandboxEnvironmentTemplateWarmPoolConfigDict
1218-
from .common import SandboxEnvironmentTemplateWarmPoolConfigOrDict
12191216
from .common import SandboxState
12201217
from .common import SavedQuery
12211218
from .common import SavedQueryDict
@@ -1244,6 +1241,9 @@
12441241
from .common import SchemaPromptSpecAppBuilderDataLinkedResourceDict
12451242
from .common import SchemaPromptSpecAppBuilderDataLinkedResourceOrDict
12461243
from .common import SchemaPromptSpecAppBuilderDataOrDict
1244+
from .common import SchemaPromptSpecInteractionData
1245+
from .common import SchemaPromptSpecInteractionDataDict
1246+
from .common import SchemaPromptSpecInteractionDataOrDict
12471247
from .common import SchemaPromptSpecMultimodalPrompt
12481248
from .common import SchemaPromptSpecMultimodalPromptDict
12491249
from .common import SchemaPromptSpecMultimodalPromptOrDict
@@ -1314,6 +1314,7 @@
13141314
from .common import SkillRevisionDict
13151315
from .common import SkillRevisionOrDict
13161316
from .common import SkillRevisionState
1317+
from .common import SkillSource
13171318
from .common import SkillState
13181319
from .common import State
13191320
from .common import Strategy
@@ -2316,9 +2317,6 @@
23162317
"CreateSandboxEnvironmentTemplateConfig",
23172318
"CreateSandboxEnvironmentTemplateConfigDict",
23182319
"CreateSandboxEnvironmentTemplateConfigOrDict",
2319-
"SandboxEnvironmentTemplateWarmPoolConfig",
2320-
"SandboxEnvironmentTemplateWarmPoolConfigDict",
2321-
"SandboxEnvironmentTemplateWarmPoolConfigOrDict",
23222320
"SandboxEnvironmentTemplate",
23232321
"SandboxEnvironmentTemplateDict",
23242322
"SandboxEnvironmentTemplateOrDict",
@@ -2490,6 +2488,9 @@
24902488
"SchemaPromptSpecPartList",
24912489
"SchemaPromptSpecPartListDict",
24922490
"SchemaPromptSpecPartListOrDict",
2491+
"SchemaPromptSpecInteractionData",
2492+
"SchemaPromptSpecInteractionDataDict",
2493+
"SchemaPromptSpecInteractionDataOrDict",
24932494
"SchemaPromptSpecStructuredPrompt",
24942495
"SchemaPromptSpecStructuredPromptDict",
24952496
"SchemaPromptSpecStructuredPromptOrDict",
@@ -2731,6 +2732,7 @@
27312732
"PostSnapshotAction",
27322733
"Framework",
27332734
"SkillState",
2735+
"SkillSource",
27342736
"EvaluationItemType",
27352737
"SamplingMethod",
27362738
"EvaluationRunState",

agentplatform/_genai/types/common.py

Lines changed: 70 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,17 @@ class SkillState(_common.CaseInSensitiveEnum):
398398
"""The Skill is being deleted."""
399399

400400

401+
class SkillSource(_common.CaseInSensitiveEnum):
402+
"""Output only. The source of the Skill."""
403+
404+
SKILL_SOURCE_UNSPECIFIED = "SKILL_SOURCE_UNSPECIFIED"
405+
"""The skill source is unspecified."""
406+
USER = "USER"
407+
"""The skill is created by a user."""
408+
SYSTEM = "SYSTEM"
409+
"""The skill is a system skill."""
410+
411+
401412
class EvaluationItemType(_common.CaseInSensitiveEnum):
402413
"""The type of the EvaluationItem."""
403414

@@ -7232,29 +7243,29 @@ class MemoryGenerationTriggerConfigGenerationTriggerRule(_common.BaseModel):
72327243

72337244
event_count: Optional[int] = Field(
72347245
default=None,
7235-
description="""Specifies to trigger generation when the event count reaches this limit.""",
7246+
description="""Optional. Specifies to trigger generation when the event count reaches this limit.""",
72367247
)
72377248
fixed_interval: Optional[str] = Field(
72387249
default=None,
7239-
description="""Specifies to trigger generation at a fixed interval. The duration must have a minute-level granularity.""",
7250+
description="""Optional. Specifies to trigger generation at a fixed interval. The duration must have a minute-level granularity.""",
72407251
)
72417252
idle_duration: Optional[str] = Field(
72427253
default=None,
7243-
description="""Specifies to trigger generation if the stream is inactive for the specified duration after the most recent event. The duration must have a minute-level granularity.""",
7254+
description="""Optional. Specifies to trigger generation if the stream is inactive for the specified duration after the most recent event. The duration must have a minute-level granularity.""",
72447255
)
72457256

72467257

72477258
class MemoryGenerationTriggerConfigGenerationTriggerRuleDict(TypedDict, total=False):
72487259
"""Represents the active rule that determines when to flush the buffer."""
72497260

72507261
event_count: Optional[int]
7251-
"""Specifies to trigger generation when the event count reaches this limit."""
7262+
"""Optional. Specifies to trigger generation when the event count reaches this limit."""
72527263

72537264
fixed_interval: Optional[str]
7254-
"""Specifies to trigger generation at a fixed interval. The duration must have a minute-level granularity."""
7265+
"""Optional. Specifies to trigger generation at a fixed interval. The duration must have a minute-level granularity."""
72557266

72567267
idle_duration: Optional[str]
7257-
"""Specifies to trigger generation if the stream is inactive for the specified duration after the most recent event. The duration must have a minute-level granularity."""
7268+
"""Optional. Specifies to trigger generation if the stream is inactive for the specified duration after the most recent event. The duration must have a minute-level granularity."""
72587269

72597270

72607271
MemoryGenerationTriggerConfigGenerationTriggerRuleOrDict = Union[
@@ -7716,7 +7727,7 @@ class KeepAliveProbeHttpGet(_common.BaseModel):
77167727

77177728
path: Optional[str] = Field(
77187729
default=None,
7719-
description="""Required. Specifies the path of the HTTP GET request (e.g., "/is_busy").""",
7730+
description="""Required. Specifies the path of the HTTP GET request (e.g., `"/is_busy"`).""",
77207731
)
77217732
port: Optional[int] = Field(
77227733
default=None,
@@ -7728,7 +7739,7 @@ class KeepAliveProbeHttpGetDict(TypedDict, total=False):
77287739
"""Specifies the HTTP GET configuration for the probe."""
77297740

77307741
path: Optional[str]
7731-
"""Required. Specifies the path of the HTTP GET request (e.g., "/is_busy")."""
7742+
"""Required. Specifies the path of the HTTP GET request (e.g., `"/is_busy"`)."""
77327743

77337744
port: Optional[int]
77347745
"""Optional. Specifies the port number on the container to which the request is sent."""
@@ -7862,7 +7873,7 @@ class ReasoningEngineSpecPackageSpec(_common.BaseModel):
78627873
)
78637874
python_version: Optional[str] = Field(
78647875
default=None,
7865-
description="""Optional. The Python version. Supported values are 3.9, 3.10, 3.11, 3.12, 3.13, 3.14. If not specified, the default value is 3.10.""",
7876+
description="""Optional. The Python version. Supported values are 3.10, 3.11, 3.12, 3.13, 3.14. If not specified, the default value is 3.10.""",
78667877
)
78677878
requirements_gcs_uri: Optional[str] = Field(
78687879
default=None,
@@ -7880,7 +7891,7 @@ class ReasoningEngineSpecPackageSpecDict(TypedDict, total=False):
78807891
"""Optional. The Cloud Storage URI of the pickled python object."""
78817892

78827893
python_version: Optional[str]
7883-
"""Optional. The Python version. Supported values are 3.9, 3.10, 3.11, 3.12, 3.13, 3.14. If not specified, the default value is 3.10."""
7894+
"""Optional. The Python version. Supported values are 3.10, 3.11, 3.12, 3.13, 3.14. If not specified, the default value is 3.10."""
78847895

78857896
requirements_gcs_uri: Optional[str]
78867897
"""Optional. The Cloud Storage URI of the `requirements.txt` file"""
@@ -8074,7 +8085,7 @@ class ReasoningEngineSpecSourceCodeSpecPythonSpec(_common.BaseModel):
80748085
)
80758086
version: Optional[str] = Field(
80768087
default=None,
8077-
description="""Optional. The version of Python to use. Support version includes 3.9, 3.10, 3.11, 3.12, 3.13, 3.14. If not specified, default value is 3.10.""",
8088+
description="""Optional. The version of Python to use. Supported versions include 3.10, 3.11, 3.12, 3.13, 3.14. If not specified, default value is 3.10.""",
80788089
)
80798090

80808091

@@ -8091,7 +8102,7 @@ class ReasoningEngineSpecSourceCodeSpecPythonSpecDict(TypedDict, total=False):
80918102
"""Optional. The path to the requirements file, relative to the source root. If not specified, defaults to "requirements.txt"."""
80928103

80938104
version: Optional[str]
8094-
"""Optional. The version of Python to use. Support version includes 3.9, 3.10, 3.11, 3.12, 3.13, 3.14. If not specified, default value is 3.10."""
8105+
"""Optional. The version of Python to use. Supported versions include 3.10, 3.11, 3.12, 3.13, 3.14. If not specified, default value is 3.10."""
80958106

80968107

80978108
ReasoningEngineSpecSourceCodeSpecPythonSpecOrDict = Union[
@@ -12489,10 +12500,6 @@ class SandboxEnvironmentConnectionInfo(_common.BaseModel):
1248912500
default=None,
1249012501
description="""Output only. The internal IP address of the SandboxEnvironment.""",
1249112502
)
12492-
sandbox_hostname: Optional[str] = Field(
12493-
default=None,
12494-
description="""Output only. The hostname of the SandboxEnvironment.""",
12495-
)
1249612503
routing_token: Optional[str] = Field(
1249712504
default=None,
1249812505
description="""Output only. The routing token for the SandboxEnvironment.""",
@@ -12511,9 +12518,6 @@ class SandboxEnvironmentConnectionInfoDict(TypedDict, total=False):
1251112518
sandbox_internal_ip: Optional[str]
1251212519
"""Output only. The internal IP address of the SandboxEnvironment."""
1251312520

12514-
sandbox_hostname: Optional[str]
12515-
"""Output only. The hostname of the SandboxEnvironment."""
12516-
1251712521
routing_token: Optional[str]
1251812522
"""Output only. The routing token for the SandboxEnvironment."""
1251912523

@@ -13306,28 +13310,6 @@ class _CreateSandboxEnvironmentTemplateRequestParametersDict(TypedDict, total=Fa
1330613310
]
1330713311

1330813312

13309-
class SandboxEnvironmentTemplateWarmPoolConfig(_common.BaseModel):
13310-
"""Configuration for a warm pool of sandbox instances."""
13311-
13312-
target_instance_count: Optional[int] = Field(
13313-
default=None,
13314-
description="""Optional. The target number of pre-warmed instances to maintain.""",
13315-
)
13316-
13317-
13318-
class SandboxEnvironmentTemplateWarmPoolConfigDict(TypedDict, total=False):
13319-
"""Configuration for a warm pool of sandbox instances."""
13320-
13321-
target_instance_count: Optional[int]
13322-
"""Optional. The target number of pre-warmed instances to maintain."""
13323-
13324-
13325-
SandboxEnvironmentTemplateWarmPoolConfigOrDict = Union[
13326-
SandboxEnvironmentTemplateWarmPoolConfig,
13327-
SandboxEnvironmentTemplateWarmPoolConfigDict,
13328-
]
13329-
13330-
1333113313
class SandboxEnvironmentTemplate(_common.BaseModel):
1333213314
"""A sandbox environment template."""
1333313315

@@ -13378,10 +13360,6 @@ class SandboxEnvironmentTemplate(_common.BaseModel):
1337813360
default=None,
1337913361
description="""Output only. The timestamp when this SandboxEnvironmentTemplate was most recently updated.""",
1338013362
)
13381-
warm_pool_config: Optional[SandboxEnvironmentTemplateWarmPoolConfig] = Field(
13382-
default=None,
13383-
description="""Optional. The configuration for the warm pool of this template.""",
13384-
)
1338513363

1338613364

1338713365
class SandboxEnvironmentTemplateDict(TypedDict, total=False):
@@ -13424,9 +13402,6 @@ class SandboxEnvironmentTemplateDict(TypedDict, total=False):
1342413402
update_time: Optional[datetime.datetime]
1342513403
"""Output only. The timestamp when this SandboxEnvironmentTemplate was most recently updated."""
1342613404

13427-
warm_pool_config: Optional[SandboxEnvironmentTemplateWarmPoolConfigDict]
13428-
"""Optional. The configuration for the warm pool of this template."""
13429-
1343013405

1343113406
SandboxEnvironmentTemplateOrDict = Union[
1343213407
SandboxEnvironmentTemplate, SandboxEnvironmentTemplateDict
@@ -16468,6 +16443,27 @@ class SchemaPromptSpecPartListDict(TypedDict, total=False):
1646816443
]
1646916444

1647016445

16446+
class SchemaPromptSpecInteractionData(_common.BaseModel):
16447+
"""Defines data for an interaction prompt."""
16448+
16449+
interaction_ids: Optional[list[str]] = Field(
16450+
default=None,
16451+
description="""Optional. Lists interaction IDs associated with the prompt. This maps 1:1 to PromptMessage.contents. If InteractionData is present, every prompt message has an interaction ID.""",
16452+
)
16453+
16454+
16455+
class SchemaPromptSpecInteractionDataDict(TypedDict, total=False):
16456+
"""Defines data for an interaction prompt."""
16457+
16458+
interaction_ids: Optional[list[str]]
16459+
"""Optional. Lists interaction IDs associated with the prompt. This maps 1:1 to PromptMessage.contents. If InteractionData is present, every prompt message has an interaction ID."""
16460+
16461+
16462+
SchemaPromptSpecInteractionDataOrDict = Union[
16463+
SchemaPromptSpecInteractionData, SchemaPromptSpecInteractionDataDict
16464+
]
16465+
16466+
1647116467
class SchemaPromptSpecStructuredPrompt(_common.BaseModel):
1647216468
"""Represents a structured prompt."""
1647316469

@@ -16504,6 +16500,9 @@ class SchemaPromptSpecStructuredPrompt(_common.BaseModel):
1650416500
prompt_message: Optional[SchemaPromptSpecPromptMessage] = Field(
1650516501
default=None, description="""The prompt message."""
1650616502
)
16503+
interaction_data: Optional[SchemaPromptSpecInteractionData] = Field(
16504+
default=None, description="""Data for interaction use case."""
16505+
)
1650716506

1650816507

1650916508
class SchemaPromptSpecStructuredPromptDict(TypedDict, total=False):
@@ -16536,6 +16535,9 @@ class SchemaPromptSpecStructuredPromptDict(TypedDict, total=False):
1653616535
prompt_message: Optional[SchemaPromptSpecPromptMessageDict]
1653716536
"""The prompt message."""
1653816537

16538+
interaction_data: Optional[SchemaPromptSpecInteractionDataDict]
16539+
"""Data for interaction use case."""
16540+
1653916541

1654016542
SchemaPromptSpecStructuredPromptOrDict = Union[
1654116543
SchemaPromptSpecStructuredPrompt, SchemaPromptSpecStructuredPromptDict
@@ -18122,6 +18124,17 @@ class Skill(_common.BaseModel):
1812218124
state: Optional[SkillState] = Field(
1812318125
default=None, description="""Output only. The state of the Skill."""
1812418126
)
18127+
labels: Optional[dict[str, str]] = Field(
18128+
default=None,
18129+
description="""The labels with user-defined metadata to organize Skills.""",
18130+
)
18131+
sha256: Optional[str] = Field(
18132+
default=None,
18133+
description="""Output only. The SHA256 checksum of the zipped filesystem.""",
18134+
)
18135+
skill_source: Optional[SkillSource] = Field(
18136+
default=None, description="""Output only. The source of the Skill."""
18137+
)
1812518138

1812618139

1812718140
class SkillDict(TypedDict, total=False):
@@ -18157,6 +18170,15 @@ class SkillDict(TypedDict, total=False):
1815718170
state: Optional[SkillState]
1815818171
"""Output only. The state of the Skill."""
1815918172

18173+
labels: Optional[dict[str, str]]
18174+
"""The labels with user-defined metadata to organize Skills."""
18175+
18176+
sha256: Optional[str]
18177+
"""Output only. The SHA256 checksum of the zipped filesystem."""
18178+
18179+
skill_source: Optional[SkillSource]
18180+
"""Output only. The source of the Skill."""
18181+
1816018182

1816118183
SkillOrDict = Union[Skill, SkillDict]
1816218184

0 commit comments

Comments
 (0)