@@ -15,14 +15,14 @@ class Log(TypedDict):
1515
1616
1717class AgentStepDispatch (TypedDict ):
18- """A ready step pushed to this agent (agent protocol v2).
18+ """A ready step pushed to this runner (runner protocol v2).
1919
2020 ``input`` arrives server-resolved: ``steps.*`` and ``input.*``
2121 references are already substituted with concrete values.
2222 """
2323
2424 stepId : str
25- agentId : str
25+ runnerId : str
2626 action : str
2727 stepName : Optional [str ]
2828 stepIndex : int
@@ -40,10 +40,10 @@ class AgentStepRequest(TypedDict):
4040
4141
4242class AgentStepCancel (TypedDict ):
43- """A stop signal for a step this agent is currently running."""
43+ """A stop signal for a step this runner is currently running."""
4444
4545 stepId : str
46- agentId : str
46+ runnerId : str
4747
4848
4949class AgentStepCancelRequest (TypedDict ):
@@ -52,7 +52,7 @@ class AgentStepCancelRequest(TypedDict):
5252
5353STEP_DISPATCH_FIELDS = """
5454 stepId
55- agentId
55+ runnerId
5656 action
5757 stepName
5858 stepIndex
@@ -71,11 +71,11 @@ def __init__(self, session: AsyncClientSession):
7171 self .session = session
7272
7373 def agent_steps (self ):
74- """Subscribe to ready steps dispatched to this agent ."""
74+ """Subscribe to ready steps dispatched to this runner ."""
7575 # fmt: off
7676 sub = gql ("""
7777 subscription {
78- step: agentSteps {
78+ step: runnerSteps {
7979 %s
8080 }
8181 }
@@ -84,17 +84,17 @@ def agent_steps(self):
8484 return cast (AsyncGenerator [AgentStepRequest , None ], self .session .subscribe (sub ))
8585
8686 def agent_step_cancels (self ):
87- """Subscribe to stop signals for steps this agent is running.
87+ """Subscribe to stop signals for steps this runner is running.
8888
8989 Best effort: the server has already moved the step terminal, so a
9090 missed signal only means the step runs to harmless completion.
9191 """
9292 # fmt: off
9393 sub = gql ("""
9494 subscription {
95- cancel: agentStepCancels {
95+ cancel: runnerStepCancels {
9696 stepId
97- agentId
97+ runnerId
9898 }
9999 }
100100 """ )
@@ -105,15 +105,15 @@ def agent_step_cancels(self):
105105 )
106106
107107 async def pending_steps (self ) -> List [AgentStepDispatch ]:
108- """Steps dispatched to this agent but not yet claimed.
108+ """Steps dispatched to this runner but not yet claimed.
109109
110110 Called on (re)connect: pushes missed while offline are recovered
111111 here.
112112 """
113113 # fmt: off
114114 query = """
115115 query PendingSteps {
116- steps: agentPendingSteps {
116+ steps: runnerPendingSteps {
117117 %s
118118 }
119119 }
@@ -163,7 +163,7 @@ async def complete_step(
163163 def initial_metrics (self , metrics ):
164164 # fmt: off
165165 mutate = """
166- mutation updateAgent (
166+ mutation updateRunner (
167167 $id: ID!
168168 $version: String
169169 $os: String
@@ -177,7 +177,7 @@ def initial_metrics(self, metrics):
177177 $cpuCoresPhysical: Int
178178 $cpuCoresLogical: Int
179179 ) {
180- updateAgent (id: $id, input: {
180+ updateRunner (id: $id, input: {
181181 version: $version
182182 os: $os
183183 osRelease: $osRelease
@@ -201,8 +201,8 @@ def initial_metrics(self, metrics):
201201 def metrics (self , metrics ):
202202 # fmt: off
203203 mutate = """
204- mutation updateAgent (
205- $agentId : ID!
204+ mutation createRunnerMetric (
205+ $runnerId : ID!
206206 $sampledAt: DateTime!
207207 $avgLoad1: Float
208208 $avgLoad5: Float
@@ -211,8 +211,8 @@ def metrics(self, metrics):
211211 $diskUsage: Float
212212 $memoryUsage: Float
213213 ) {
214- createAgentMetric (input: {
215- agentId : $agentId
214+ createRunnerMetric (input: {
215+ runnerId : $runnerId
216216 sampledAt: $sampledAt
217217 avgLoad1: $avgLoad1
218218 avgLoad5: $avgLoad5
@@ -226,7 +226,7 @@ def metrics(self, metrics):
226226 }
227227 """
228228 # fmt: on
229- params = {"agentId " : agent_directory .settings .agent_id , ** metrics }
229+ params = {"runnerId " : agent_directory .settings .agent_id , ** metrics }
230230 return self .execute (mutate , params = params )
231231
232232 def upload_step_logs (self , step_id : str , logs : List [Log ]):
0 commit comments