Skip to content

Commit 5b8da2e

Browse files
feat: move agent mode from Spec to Status, add AgentModeChange signals
1 parent 3802c01 commit 5b8da2e

3 files changed

Lines changed: 11 additions & 6 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 160
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-46e0124fe8e07933a6ea784e81b4d02086696c246f519aaa34b087f46410c818.yml
3-
openapi_spec_hash: fe98c15ea1e320c05593cd57457e4af5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-cad9422301ea573f7fdbcf5047e421a0a6e963468a9d8f464e47ed1800a8fc75.yml
3+
openapi_spec_hash: b2e5072d4659a5c4fb5d2e8916388af9
44
config_hash: d3267594264bfb76d2ee7e881d5f8a5a

src/gitpod/types/agent_execution.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,6 @@ class Spec(BaseModel):
259259

260260
limits: Optional[SpecLimits] = None
261261

262-
mode: Optional[AgentMode] = None
263-
"""mode is the operational mode for this agent execution"""
264-
265262
session: Optional[str] = None
266263

267264
spec_version: Optional[str] = FieldInfo(alias="specVersion", default=None)
@@ -355,6 +352,12 @@ class Status(BaseModel):
355352
judgement: Optional[str] = None
356353
"""judgement is the judgement of the agent run produced by the judgement prompt."""
357354

355+
mode: Optional[AgentMode] = None
356+
"""
357+
mode is the current operational mode of the agent execution. This is set by the
358+
agent when entering different modes (e.g., Ralph mode via /ona:ralph command).
359+
"""
360+
358361
outputs: Optional[Dict[str, StatusOutputs]] = None
359362
"""
360363
outputs is a map of key-value pairs that can be set by the agent during

src/gitpod/types/agent_mode.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44

55
__all__ = ["AgentMode"]
66

7-
AgentMode: TypeAlias = Literal["AGENT_MODE_UNSPECIFIED", "AGENT_MODE_EXECUTION", "AGENT_MODE_PLANNING"]
7+
AgentMode: TypeAlias = Literal[
8+
"AGENT_MODE_UNSPECIFIED", "AGENT_MODE_EXECUTION", "AGENT_MODE_PLANNING", "AGENT_MODE_RALPH"
9+
]

0 commit comments

Comments
 (0)