@h-rig/pi-rig 0.0.6-alpha.72 → 0.0.6-alpha.74

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.
@@ -255,6 +255,36 @@ class RigBridgeClient {
255
255
  const payload = await this.request(`/api/workspace/tasks/${encodeURIComponent(taskId)}`);
256
256
  return payload && typeof payload === "object" && !Array.isArray(payload) ? payload : {};
257
257
  }
258
+ async piProxy(action, init, runId = this.context.runId) {
259
+ if (!runId)
260
+ throw new Error("runId is required");
261
+ return this.request(`/api/runs/${encodeURIComponent(runId)}/pi/${action}`, init);
262
+ }
263
+ async workerCommands(runId = this.context.runId) {
264
+ const payload = await this.piProxy("commands", undefined, runId);
265
+ const commands = Array.isArray(payload) ? payload : payload && typeof payload === "object" && !Array.isArray(payload) && Array.isArray(payload.commands) ? payload.commands : [];
266
+ return commands.filter((entry) => Boolean(entry && typeof entry === "object" && !Array.isArray(entry)));
267
+ }
268
+ async workerRunCommand(command, args, runId = this.context.runId) {
269
+ const payload = await this.piProxy("commands/run", {
270
+ method: "POST",
271
+ headers: { "content-type": "application/json" },
272
+ body: JSON.stringify({ command, args })
273
+ }, runId);
274
+ return payload && typeof payload === "object" && !Array.isArray(payload) ? payload : { ok: true };
275
+ }
276
+ async workerShell(command, runId = this.context.runId) {
277
+ const payload = await this.piProxy("shell", {
278
+ method: "POST",
279
+ headers: { "content-type": "application/json" },
280
+ body: JSON.stringify({ command })
281
+ }, runId);
282
+ return payload && typeof payload === "object" && !Array.isArray(payload) ? payload : { ok: true };
283
+ }
284
+ async workerAbort(runId = this.context.runId) {
285
+ const payload = await this.piProxy("abort", { method: "POST" }, runId);
286
+ return payload && typeof payload === "object" && !Array.isArray(payload) ? payload : { ok: true };
287
+ }
258
288
  }
259
289
  function buildRigWebSocketUrl(serverUrl, authToken) {
260
290
  const url = new URL(serverUrl);
@@ -425,9 +455,139 @@ class RigBridgeSocket {
425
455
  }
426
456
  }
427
457
  }
458
+ function buildRunPiEventsWebSocketUrl(context) {
459
+ if (!context.serverUrl || !context.runId)
460
+ return null;
461
+ const url = new URL(`${context.serverUrl.replace(/\/+$/, "")}/api/runs/${encodeURIComponent(context.runId)}/pi/events`);
462
+ url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
463
+ if (context.authToken)
464
+ url.searchParams.set("token", context.authToken);
465
+ if (context.projectRoot)
466
+ url.searchParams.set("rigProjectRoot", context.projectRoot);
467
+ return url.toString();
468
+ }
469
+
470
+ class RigWorkerEventsSocket {
471
+ context;
472
+ handlers;
473
+ factory;
474
+ reconnectBaseMs;
475
+ reconnectMaxMs;
476
+ socket = null;
477
+ connectedFlag = false;
478
+ closed = false;
479
+ started = false;
480
+ attempt = 0;
481
+ reconnectTimer = null;
482
+ constructor(input) {
483
+ this.context = input.context;
484
+ this.handlers = input.handlers ?? {};
485
+ this.factory = input.webSocketFactory ?? defaultWebSocketFactory();
486
+ this.reconnectBaseMs = input.reconnectBaseMs ?? 1000;
487
+ this.reconnectMaxMs = input.reconnectMaxMs ?? 30000;
488
+ }
489
+ get connected() {
490
+ return this.connectedFlag;
491
+ }
492
+ start() {
493
+ if (this.closed)
494
+ return false;
495
+ if (this.started)
496
+ return true;
497
+ if (!buildRunPiEventsWebSocketUrl(this.context) || !this.factory)
498
+ return false;
499
+ this.started = true;
500
+ this.connect();
501
+ return true;
502
+ }
503
+ close() {
504
+ this.closed = true;
505
+ this.connectedFlag = false;
506
+ if (this.reconnectTimer) {
507
+ clearTimeout(this.reconnectTimer);
508
+ this.reconnectTimer = null;
509
+ }
510
+ try {
511
+ this.socket?.close();
512
+ } catch {}
513
+ this.socket = null;
514
+ }
515
+ connect() {
516
+ const target = buildRunPiEventsWebSocketUrl(this.context);
517
+ if (this.closed || !target || !this.factory)
518
+ return;
519
+ let socket;
520
+ try {
521
+ socket = this.factory(target);
522
+ } catch {
523
+ this.scheduleReconnect();
524
+ return;
525
+ }
526
+ this.socket = socket;
527
+ let gone = false;
528
+ socket.addEventListener("open", () => {
529
+ if (this.closed || gone)
530
+ return;
531
+ this.attempt = 0;
532
+ this.connectedFlag = true;
533
+ this.handlers.onConnect?.();
534
+ });
535
+ const onGone = () => {
536
+ if (gone)
537
+ return;
538
+ gone = true;
539
+ const wasConnected = this.connectedFlag;
540
+ this.connectedFlag = false;
541
+ try {
542
+ socket.close();
543
+ } catch {}
544
+ if (this.socket === socket)
545
+ this.socket = null;
546
+ if (this.closed)
547
+ return;
548
+ if (wasConnected)
549
+ this.handlers.onDisconnect?.();
550
+ this.scheduleReconnect();
551
+ };
552
+ socket.addEventListener("close", onGone);
553
+ socket.addEventListener("error", onGone);
554
+ socket.addEventListener("message", (event) => {
555
+ if (this.closed)
556
+ return;
557
+ const text = webSocketEventText(event.data);
558
+ if (!text)
559
+ return;
560
+ let parsed;
561
+ try {
562
+ parsed = JSON.parse(text);
563
+ } catch {
564
+ return;
565
+ }
566
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
567
+ this.handlers.onFrame?.(parsed);
568
+ }
569
+ });
570
+ }
571
+ scheduleReconnect() {
572
+ if (this.closed || this.reconnectTimer)
573
+ return;
574
+ const delay = Math.min(this.reconnectBaseMs * 2 ** this.attempt, this.reconnectMaxMs);
575
+ this.attempt += 1;
576
+ const timer = setTimeout(() => {
577
+ this.reconnectTimer = null;
578
+ this.connect();
579
+ }, delay);
580
+ this.reconnectTimer = timer;
581
+ if (typeof timer.unref === "function") {
582
+ timer.unref();
583
+ }
584
+ }
585
+ }
428
586
  export {
429
587
  createRigContextFromEnv,
588
+ buildRunPiEventsWebSocketUrl,
430
589
  buildRigWebSocketUrl,
590
+ RigWorkerEventsSocket,
431
591
  RigBridgeSocket,
432
592
  RigBridgeClient,
433
593
  RIG_PROTOCOL_VERSION,
@@ -62,7 +62,22 @@ function createRigSlashCommands(input) {
62
62
  notify("Rig stop requested.", "info");
63
63
  return;
64
64
  }
65
- notify("Usage: /rig status | /rig task list | /rig task run [id] | /rig attach [run-id] | /rig timeline [run-id] | /rig logs [run-id] | /rig steer <message> | /rig stop [run-id]", "error");
65
+ if (first === "abort") {
66
+ await input.client.workerAbort(second || input.context.runId);
67
+ notify("Worker turn abort requested.", "info");
68
+ return;
69
+ }
70
+ if (first === "sh") {
71
+ const command = args.trim().slice("sh".length).trim();
72
+ if (!command) {
73
+ notify("Usage: /rig sh <command> \u2014 runs in the WORKER workspace", "error");
74
+ return;
75
+ }
76
+ await input.client.workerShell(command, input.context.runId);
77
+ notify("Shell command sent to the worker workspace.", "info");
78
+ return;
79
+ }
80
+ notify("Usage: /rig status | /rig task list | /rig task run [id] | /rig attach [run-id] | /rig timeline [run-id] | /rig logs [run-id] | /rig steer <message> | /rig stop [run-id] | /rig abort [run-id] | /rig sh <command>", "error");
66
81
  } catch (error) {
67
82
  notify(error instanceof Error ? error.message : String(error), "error");
68
83
  }
package/dist/src/index.js CHANGED
@@ -255,6 +255,36 @@ class RigBridgeClient {
255
255
  const payload = await this.request(`/api/workspace/tasks/${encodeURIComponent(taskId)}`);
256
256
  return payload && typeof payload === "object" && !Array.isArray(payload) ? payload : {};
257
257
  }
258
+ async piProxy(action, init, runId = this.context.runId) {
259
+ if (!runId)
260
+ throw new Error("runId is required");
261
+ return this.request(`/api/runs/${encodeURIComponent(runId)}/pi/${action}`, init);
262
+ }
263
+ async workerCommands(runId = this.context.runId) {
264
+ const payload = await this.piProxy("commands", undefined, runId);
265
+ const commands = Array.isArray(payload) ? payload : payload && typeof payload === "object" && !Array.isArray(payload) && Array.isArray(payload.commands) ? payload.commands : [];
266
+ return commands.filter((entry) => Boolean(entry && typeof entry === "object" && !Array.isArray(entry)));
267
+ }
268
+ async workerRunCommand(command, args, runId = this.context.runId) {
269
+ const payload = await this.piProxy("commands/run", {
270
+ method: "POST",
271
+ headers: { "content-type": "application/json" },
272
+ body: JSON.stringify({ command, args })
273
+ }, runId);
274
+ return payload && typeof payload === "object" && !Array.isArray(payload) ? payload : { ok: true };
275
+ }
276
+ async workerShell(command, runId = this.context.runId) {
277
+ const payload = await this.piProxy("shell", {
278
+ method: "POST",
279
+ headers: { "content-type": "application/json" },
280
+ body: JSON.stringify({ command })
281
+ }, runId);
282
+ return payload && typeof payload === "object" && !Array.isArray(payload) ? payload : { ok: true };
283
+ }
284
+ async workerAbort(runId = this.context.runId) {
285
+ const payload = await this.piProxy("abort", { method: "POST" }, runId);
286
+ return payload && typeof payload === "object" && !Array.isArray(payload) ? payload : { ok: true };
287
+ }
258
288
  }
259
289
  function buildRigWebSocketUrl(serverUrl, authToken) {
260
290
  const url = new URL(serverUrl);
@@ -425,6 +455,134 @@ class RigBridgeSocket {
425
455
  }
426
456
  }
427
457
  }
458
+ function buildRunPiEventsWebSocketUrl(context) {
459
+ if (!context.serverUrl || !context.runId)
460
+ return null;
461
+ const url = new URL(`${context.serverUrl.replace(/\/+$/, "")}/api/runs/${encodeURIComponent(context.runId)}/pi/events`);
462
+ url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
463
+ if (context.authToken)
464
+ url.searchParams.set("token", context.authToken);
465
+ if (context.projectRoot)
466
+ url.searchParams.set("rigProjectRoot", context.projectRoot);
467
+ return url.toString();
468
+ }
469
+
470
+ class RigWorkerEventsSocket {
471
+ context;
472
+ handlers;
473
+ factory;
474
+ reconnectBaseMs;
475
+ reconnectMaxMs;
476
+ socket = null;
477
+ connectedFlag = false;
478
+ closed = false;
479
+ started = false;
480
+ attempt = 0;
481
+ reconnectTimer = null;
482
+ constructor(input) {
483
+ this.context = input.context;
484
+ this.handlers = input.handlers ?? {};
485
+ this.factory = input.webSocketFactory ?? defaultWebSocketFactory();
486
+ this.reconnectBaseMs = input.reconnectBaseMs ?? 1000;
487
+ this.reconnectMaxMs = input.reconnectMaxMs ?? 30000;
488
+ }
489
+ get connected() {
490
+ return this.connectedFlag;
491
+ }
492
+ start() {
493
+ if (this.closed)
494
+ return false;
495
+ if (this.started)
496
+ return true;
497
+ if (!buildRunPiEventsWebSocketUrl(this.context) || !this.factory)
498
+ return false;
499
+ this.started = true;
500
+ this.connect();
501
+ return true;
502
+ }
503
+ close() {
504
+ this.closed = true;
505
+ this.connectedFlag = false;
506
+ if (this.reconnectTimer) {
507
+ clearTimeout(this.reconnectTimer);
508
+ this.reconnectTimer = null;
509
+ }
510
+ try {
511
+ this.socket?.close();
512
+ } catch {}
513
+ this.socket = null;
514
+ }
515
+ connect() {
516
+ const target = buildRunPiEventsWebSocketUrl(this.context);
517
+ if (this.closed || !target || !this.factory)
518
+ return;
519
+ let socket;
520
+ try {
521
+ socket = this.factory(target);
522
+ } catch {
523
+ this.scheduleReconnect();
524
+ return;
525
+ }
526
+ this.socket = socket;
527
+ let gone = false;
528
+ socket.addEventListener("open", () => {
529
+ if (this.closed || gone)
530
+ return;
531
+ this.attempt = 0;
532
+ this.connectedFlag = true;
533
+ this.handlers.onConnect?.();
534
+ });
535
+ const onGone = () => {
536
+ if (gone)
537
+ return;
538
+ gone = true;
539
+ const wasConnected = this.connectedFlag;
540
+ this.connectedFlag = false;
541
+ try {
542
+ socket.close();
543
+ } catch {}
544
+ if (this.socket === socket)
545
+ this.socket = null;
546
+ if (this.closed)
547
+ return;
548
+ if (wasConnected)
549
+ this.handlers.onDisconnect?.();
550
+ this.scheduleReconnect();
551
+ };
552
+ socket.addEventListener("close", onGone);
553
+ socket.addEventListener("error", onGone);
554
+ socket.addEventListener("message", (event) => {
555
+ if (this.closed)
556
+ return;
557
+ const text = webSocketEventText(event.data);
558
+ if (!text)
559
+ return;
560
+ let parsed;
561
+ try {
562
+ parsed = JSON.parse(text);
563
+ } catch {
564
+ return;
565
+ }
566
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
567
+ this.handlers.onFrame?.(parsed);
568
+ }
569
+ });
570
+ }
571
+ scheduleReconnect() {
572
+ if (this.closed || this.reconnectTimer)
573
+ return;
574
+ const delay = Math.min(this.reconnectBaseMs * 2 ** this.attempt, this.reconnectMaxMs);
575
+ this.attempt += 1;
576
+ const timer = setTimeout(() => {
577
+ this.reconnectTimer = null;
578
+ this.connect();
579
+ }, delay);
580
+ this.reconnectTimer = timer;
581
+ if (typeof timer.unref === "function") {
582
+ timer.unref();
583
+ }
584
+ }
585
+ }
428
586
 
429
587
  // packages/pi-rig/src/commands.ts
430
588
  function runRecordFromPayload(payload) {
@@ -489,7 +647,22 @@ function createRigSlashCommands(input) {
489
647
  notify("Rig stop requested.", "info");
490
648
  return;
491
649
  }
492
- notify("Usage: /rig status | /rig task list | /rig task run [id] | /rig attach [run-id] | /rig timeline [run-id] | /rig logs [run-id] | /rig steer <message> | /rig stop [run-id]", "error");
650
+ if (first === "abort") {
651
+ await input.client.workerAbort(second || input.context.runId);
652
+ notify("Worker turn abort requested.", "info");
653
+ return;
654
+ }
655
+ if (first === "sh") {
656
+ const command = args.trim().slice("sh".length).trim();
657
+ if (!command) {
658
+ notify("Usage: /rig sh <command> \u2014 runs in the WORKER workspace", "error");
659
+ return;
660
+ }
661
+ await input.client.workerShell(command, input.context.runId);
662
+ notify("Shell command sent to the worker workspace.", "info");
663
+ return;
664
+ }
665
+ notify("Usage: /rig status | /rig task list | /rig task run [id] | /rig attach [run-id] | /rig timeline [run-id] | /rig logs [run-id] | /rig steer <message> | /rig stop [run-id] | /rig abort [run-id] | /rig sh <command>", "error");
493
666
  } catch (error) {
494
667
  notify(error instanceof Error ? error.message : String(error), "error");
495
668
  }
@@ -700,6 +873,18 @@ async function handleOperatorInput(event, state, ctx, gate) {
700
873
  return;
701
874
  if (!(await gate(ctx)).allowed)
702
875
  return;
876
+ if (text.startsWith("!")) {
877
+ const command = text.slice(1).trim();
878
+ if (!command)
879
+ return;
880
+ try {
881
+ await state.client.workerShell(command, state.runId);
882
+ notify(ctx, "Shell command sent to the worker workspace.");
883
+ } catch (error) {
884
+ notify(ctx, `Worker shell failed: ${error instanceof Error ? error.message : String(error)}`, "error");
885
+ }
886
+ return { action: "handled" };
887
+ }
703
888
  try {
704
889
  await state.client.steer(text, state.runId);
705
890
  notify(ctx, "Rig steering message queued.");
@@ -827,6 +1012,146 @@ function startOperatorBridge(state, ctx) {
827
1012
  }
828
1013
  };
829
1014
  }
1015
+ var MIRROR_TEXT_LIMIT = 2000;
1016
+ function clipMirrorText(text) {
1017
+ const trimmed = text.trim();
1018
+ return trimmed.length > MIRROR_TEXT_LIMIT ? `${trimmed.slice(0, MIRROR_TEXT_LIMIT)}
1019
+ \u2026 [clipped; full output in the worker session]` : trimmed;
1020
+ }
1021
+ function workerMirrorText(message) {
1022
+ const role = typeof message.role === "string" ? message.role : "assistant";
1023
+ const content = message.content;
1024
+ const parts = [];
1025
+ if (typeof content === "string") {
1026
+ parts.push(content);
1027
+ } else if (Array.isArray(content)) {
1028
+ for (const block of content) {
1029
+ if (!block || typeof block !== "object" || Array.isArray(block))
1030
+ continue;
1031
+ const record = block;
1032
+ if (record.type === "text" && typeof record.text === "string" && record.text.trim()) {
1033
+ parts.push(record.text);
1034
+ continue;
1035
+ }
1036
+ if (record.type === "toolCall") {
1037
+ const name = typeof record.name === "string" ? record.name : "tool";
1038
+ let args = "";
1039
+ try {
1040
+ args = record.arguments === undefined ? "" : JSON.stringify(record.arguments);
1041
+ } catch {
1042
+ args = "";
1043
+ }
1044
+ parts.push(`\u2699 ${name}(${args.length > 160 ? `${args.slice(0, 160)}\u2026` : args})`);
1045
+ }
1046
+ }
1047
+ }
1048
+ const body = parts.join(`
1049
+ `).trim();
1050
+ if (!body)
1051
+ return null;
1052
+ const label = role === "assistant" ? "worker" : role === "user" ? "worker \u21D0 input" : role === "toolResult" ? `worker \u2937 ${typeof message.toolName === "string" ? message.toolName : "tool"} result` : `worker (${role})`;
1053
+ return `[${label}]
1054
+ ${clipMirrorText(body)}`;
1055
+ }
1056
+ function workerStatusLine(status) {
1057
+ const model = status.model && typeof status.model === "object" && !Array.isArray(status.model) ? status.model : null;
1058
+ const modelId = model && typeof model.id === "string" ? model.id : null;
1059
+ const usage = status.contextUsage && typeof status.contextUsage === "object" && !Array.isArray(status.contextUsage) ? status.contextUsage : null;
1060
+ const percent = usage && typeof usage.percent === "number" ? `${Math.round(usage.percent)}% ctx` : null;
1061
+ const streaming = status.isStreaming === true ? "streaming" : null;
1062
+ const parts = [modelId, percent, streaming].filter((value) => Boolean(value));
1063
+ return parts.length > 0 ? `worker ${parts.join(" \xB7 ")}` : "worker session connected";
1064
+ }
1065
+ function startWorkerSessionMirror(pi, state, ctx) {
1066
+ if (!state.operatorSession || !state.active || !state.runId)
1067
+ return;
1068
+ if (typeof pi.sendMessage !== "function")
1069
+ return;
1070
+ const mirrored = new Set;
1071
+ const rememberMirrored = (key) => {
1072
+ if (mirrored.has(key))
1073
+ return false;
1074
+ mirrored.add(key);
1075
+ if (mirrored.size > 1000) {
1076
+ const oldest = mirrored.values().next().value;
1077
+ if (typeof oldest === "string")
1078
+ mirrored.delete(oldest);
1079
+ }
1080
+ return true;
1081
+ };
1082
+ const socket = new RigWorkerEventsSocket({
1083
+ context: state,
1084
+ webSocketFactory: state.webSocketFactory,
1085
+ handlers: {
1086
+ onFrame: (frame) => {
1087
+ if (frame.type === "status.update") {
1088
+ const status = frame.status && typeof frame.status === "object" && !Array.isArray(frame.status) ? frame.status : null;
1089
+ if (status)
1090
+ setStatus(ctx, "rig-worker", workerStatusLine(status));
1091
+ return;
1092
+ }
1093
+ if (frame.type !== "pi.event")
1094
+ return;
1095
+ const event = frame.event && typeof frame.event === "object" && !Array.isArray(frame.event) ? frame.event : null;
1096
+ if (!event || event.type !== "message_end")
1097
+ return;
1098
+ const message = event.message && typeof event.message === "object" && !Array.isArray(event.message) ? event.message : null;
1099
+ if (!message)
1100
+ return;
1101
+ const key = typeof message.id === "string" && message.id.trim() ? message.id : `${String(message.role ?? "message")}:${String(message.timestamp ?? "")}`;
1102
+ if (!rememberMirrored(key))
1103
+ return;
1104
+ const text = workerMirrorText(message);
1105
+ if (!text)
1106
+ return;
1107
+ pi.sendMessage?.({ customType: "rig-worker-mirror", content: text, display: true }, { triggerTurn: false });
1108
+ },
1109
+ onConnect: () => {
1110
+ setStatus(ctx, "rig-worker", "worker session connected");
1111
+ },
1112
+ onDisconnect: () => {
1113
+ setStatus(ctx, "rig-worker", "worker session disconnected (reconnecting\u2026)");
1114
+ }
1115
+ }
1116
+ });
1117
+ socket.start();
1118
+ }
1119
+ async function registerWorkerCommands(pi, state, ctx) {
1120
+ if (!state.operatorSession || !state.active || !state.runId)
1121
+ return;
1122
+ if (typeof pi.registerCommand !== "function")
1123
+ return;
1124
+ let commands = [];
1125
+ try {
1126
+ commands = await state.client.workerCommands(state.runId);
1127
+ } catch {
1128
+ return;
1129
+ }
1130
+ let registered = 0;
1131
+ for (const command of commands) {
1132
+ const name = typeof command.name === "string" && command.name.trim() ? command.name.trim() : null;
1133
+ if (!name || name === "rig")
1134
+ continue;
1135
+ const description = typeof command.description === "string" && command.description.trim() ? `[worker] ${command.description.trim()}` : "[worker] remote session command";
1136
+ try {
1137
+ pi.registerCommand(name, {
1138
+ description,
1139
+ handler: async (args, commandCtx) => {
1140
+ try {
1141
+ await state.client.workerRunCommand(name, args, state.runId);
1142
+ notify(commandCtx, `Sent /${name} to the worker session.`);
1143
+ } catch (error) {
1144
+ notify(commandCtx, `Worker /${name} failed: ${error instanceof Error ? error.message : String(error)}`, "error");
1145
+ }
1146
+ }
1147
+ });
1148
+ registered += 1;
1149
+ } catch {}
1150
+ }
1151
+ if (registered > 0) {
1152
+ notify(ctx, `Worker session commands available: ${registered} registered from the run's Pi session.`);
1153
+ }
1154
+ }
830
1155
  function startSteeringBridge(pi, state, ctx, gate, deliveredIds) {
831
1156
  if (state.operatorSession || !state.active || !state.runId || typeof pi.sendUserMessage !== "function")
832
1157
  return;
@@ -954,6 +1279,10 @@ function createPiRigExtension(pi, options = {}) {
954
1279
  setStatus(ctx, "rig", `Rig ${state.runId}`);
955
1280
  const live = gateResult.status === "compatible" ? startOperatorBridge(state, ctx) : undefined;
956
1281
  startOperatorRunWidget(state, ctx, live);
1282
+ if (state.operatorSession && gateResult.status === "compatible") {
1283
+ startWorkerSessionMirror(pi, state, ctx);
1284
+ registerWorkerCommands(pi, state, ctx);
1285
+ }
957
1286
  await consumeQueuedSteering(pi, state, ctx, gate, deliveredSteeringIds);
958
1287
  });
959
1288
  pi.on?.("turn_end", async (_event, ctx) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h-rig/pi-rig",
3
- "version": "0.0.6-alpha.72",
3
+ "version": "0.0.6-alpha.74",
4
4
  "type": "module",
5
5
  "description": "Rig package",
6
6
  "license": "UNLICENSED",
@@ -33,7 +33,7 @@
33
33
  ]
34
34
  },
35
35
  "dependencies": {
36
- "@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.72"
36
+ "@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.74"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@earendil-works/pi-coding-agent": ">=0.79.0",