@mindfoldhq/runtime-manager 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,7 +16,7 @@ VINE_REMOTE_SANDBOX_PROVIDER='e2b' \
16
16
  VINE_RUNNER_LINK_HOST='0.0.0.0' \
17
17
  VINE_RUNNER_LINK_PORT='8788' \
18
18
  VINE_RUNNER_LINK_PUBLIC_URL='<public-runner-link-wss-url>' \
19
- npx @mindfoldhq/runtime-manager serve
19
+ npx -y @mindfoldhq/runtime-manager serve
20
20
  ```
21
21
 
22
22
  `VINE_MANAGER_TOKEN` is created in Vine Web Settings -> Runtime managers. The
@@ -3026,6 +3026,16 @@ var AgentSessionStatePayload = z20.object({
3026
3026
  last_error: z20.string().nullable(),
3027
3027
  metadata: z20.record(z20.string(), z20.unknown()).optional()
3028
3028
  });
3029
+ var ManagerTurnStartedPayload = z20.object({
3030
+ agent_turn_id: z20.string().min(1),
3031
+ organization_id: z20.string().min(1),
3032
+ session_id: z20.string().min(1),
3033
+ runner_id: z20.string().min(1),
3034
+ agent_session_id: z20.string().min(1),
3035
+ agent_profile_id: z20.string().min(1),
3036
+ project_agent_profile_id: z20.string().nullable(),
3037
+ backend_kind: ManagerBackendKind
3038
+ });
3029
3039
  var ManagerTurnEventPayload = z20.object({
3030
3040
  agent_turn_id: z20.string().min(1),
3031
3041
  kind: ManagerTurnEventKind,
@@ -3395,6 +3405,10 @@ var ManagerToServerMessage = z20.discriminatedUnion("type", [
3395
3405
  type: z20.literal("agent_session.state"),
3396
3406
  payload: AgentSessionStatePayload
3397
3407
  }),
3408
+ z20.object({
3409
+ type: z20.literal("turn.started"),
3410
+ payload: ManagerTurnStartedPayload
3411
+ }),
3398
3412
  z20.object({ type: z20.literal("turn.event"), payload: ManagerTurnEventPayload }),
3399
3413
  z20.object({
3400
3414
  type: z20.literal("turn.finished"),
@@ -11573,10 +11587,23 @@ class TaskProjectionBridge {
11573
11587
  const agentKey = session.turnToAgentKey.get(turnStart.turn_id);
11574
11588
  const agentSession = agentKey ? session.agentSessions.get(agentKey) : undefined;
11575
11589
  if (agentSession) {
11590
+ this.emitTurnStarted(session, turnStart, agentSession);
11576
11591
  this.m.emitAgentSessionState(session, agentSession, "active");
11577
11592
  }
11578
11593
  }
11579
11594
  }
11595
+ emitTurnStarted(session, turnStart, agentSession) {
11596
+ this.m.serverClient.emitTurnStarted({
11597
+ agent_turn_id: turnStart.turn_id,
11598
+ organization_id: session.organizationId,
11599
+ session_id: session.sessionId,
11600
+ runner_id: session.runnerId,
11601
+ agent_session_id: agentSession.agentSessionId,
11602
+ agent_profile_id: agentSession.agentProfileId,
11603
+ project_agent_profile_id: agentSession.projectAgentProfileId,
11604
+ backend_kind: agentSession.backendKind
11605
+ });
11606
+ }
11580
11607
  }
11581
11608
 
11582
11609
  // src/runtime-manager-terminal-relay.ts
@@ -12256,6 +12283,16 @@ class TurnRouter {
12256
12283
  this.m.maybeRespawnDisconnectedSession(session, "turn_dispatch");
12257
12284
  return;
12258
12285
  }
12286
+ this.m.serverClient.emitTurnStarted({
12287
+ agent_turn_id: dispatch.agent_turn_id,
12288
+ organization_id: session.organizationId,
12289
+ session_id: session.sessionId,
12290
+ runner_id: session.runnerId,
12291
+ agent_session_id: agentSession.agentSessionId,
12292
+ agent_profile_id: agentSession.agentProfileId,
12293
+ project_agent_profile_id: agentSession.projectAgentProfileId,
12294
+ backend_kind: agentSession.backendKind
12295
+ });
12259
12296
  this.m.emitAgentSessionState(session, agentSession, "active");
12260
12297
  log15.info({
12261
12298
  agent_turn_id: dispatch.agent_turn_id,
@@ -13025,6 +13062,9 @@ class ServerClient {
13025
13062
  emitAgentSessionState(payload) {
13026
13063
  return this.send({ type: "agent_session.state", payload });
13027
13064
  }
13065
+ emitTurnStarted(payload) {
13066
+ return this.send({ type: "turn.started", payload });
13067
+ }
13028
13068
  }
13029
13069
  function unrefTimer(timer) {
13030
13070
  const maybeTimer = timer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindfoldhq/runtime-manager",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Vine runtime manager CLI",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",