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
2 changes: 2 additions & 0 deletions agentplatform/_genai/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,7 @@
from .common import SkillRevision
from .common import SkillRevisionDict
from .common import SkillRevisionOrDict
from .common import SkillRevisionState
from .common import SkillState
from .common import State
from .common import Strategy
Expand Down Expand Up @@ -2736,6 +2737,7 @@
"MemoryMetadataMergeStrategy",
"GenerateMemoriesResponseGeneratedMemoryAction",
"SkillState",
"SkillRevisionState",
"PromptOptimizerMethod",
"OptimizationMethod",
"PromptData",
Expand Down
19 changes: 17 additions & 2 deletions agentplatform/_genai/types/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,21 @@ class SkillState(_common.CaseInSensitiveEnum):
"""The Skill is being deleted."""


class SkillRevisionState(_common.CaseInSensitiveEnum):
"""State of the Skill Revision."""

STATE_UNSPECIFIED = "STATE_UNSPECIFIED"
"""The state of the Skill Revision is unspecified."""
ACTIVE = "ACTIVE"
"""The Skill Revision is active."""
CREATING = "CREATING"
"""The Skill Revision is being created."""
FAILED = "FAILED"
"""The Skill Revision was created, but failed to process."""
DELETING = "DELETING"
"""The Skill Revision is being deleted."""


class PromptOptimizerMethod(_common.CaseInSensitiveEnum):
"""The method for data driven prompt optimization."""

Expand Down Expand Up @@ -18722,7 +18737,7 @@ class SkillRevision(_common.BaseModel):
default=None,
description="""Output only. The state of the Skill at this revision. TODO(b/503772996) Use a different proto for skill data included in skill revision""",
)
state: Optional[SkillState] = Field(
state: Optional[SkillRevisionState] = Field(
default=None, description="""Output only. The state of the Skill Revision."""
)

Expand All @@ -18738,7 +18753,7 @@ class SkillRevisionDict(TypedDict, total=False):
skill: Optional[SkillDict]
"""Output only. The state of the Skill at this revision. TODO(b/503772996) Use a different proto for skill data included in skill revision"""

state: Optional[SkillState]
state: Optional[SkillRevisionState]
"""Output only. The state of the Skill Revision."""


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_get_skill_revision(client, tmp_path):

assert isinstance(revision, types.SkillRevision)
assert revision.name == first_revision.name
assert revision.state == types.SkillState.ACTIVE
assert revision.state == types.SkillRevisionState.ACTIVE

finally:
# 4. Clean up the temporary skill
Expand Down
Loading