@h-rig/pi-rig 0.0.6-alpha.83 → 0.0.6-alpha.84
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/dist/src/commands.js +11 -2
- package/dist/src/index.js +13 -4
- package/package.json +2 -2
package/dist/src/commands.js
CHANGED
|
@@ -53,8 +53,17 @@ function createRigSlashCommands(input) {
|
|
|
53
53
|
notify("Usage: /rig steer <message>", "error");
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
await input.client.steer(message);
|
|
57
|
-
|
|
56
|
+
const result = await input.client.steer(message);
|
|
57
|
+
const accepted = result.ok !== false && result.queued !== false;
|
|
58
|
+
if (!accepted) {
|
|
59
|
+
const reason = typeof result.error === "string" && result.error.trim() ? `: ${result.error.trim()}` : "";
|
|
60
|
+
notify(`Rig did not accept the steering message${reason}.`, "error");
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const entry = result.message && typeof result.message === "object" && !Array.isArray(result.message) ? result.message : null;
|
|
64
|
+
const runId = String(entry?.runId ?? second ?? input.context.runId ?? "run");
|
|
65
|
+
const preview = message.length > 80 ? `${message.slice(0, 79)}\u2026` : message;
|
|
66
|
+
notify(`Steering queued for ${runId} \u2192 "${preview}" \u2014 the worker applies it at its next checkpoint.`, "info");
|
|
58
67
|
return;
|
|
59
68
|
}
|
|
60
69
|
if (first === "stop") {
|
package/dist/src/index.js
CHANGED
|
@@ -699,8 +699,17 @@ function createRigSlashCommands(input) {
|
|
|
699
699
|
notify("Usage: /rig steer <message>", "error");
|
|
700
700
|
return;
|
|
701
701
|
}
|
|
702
|
-
await input.client.steer(message);
|
|
703
|
-
|
|
702
|
+
const result = await input.client.steer(message);
|
|
703
|
+
const accepted = result.ok !== false && result.queued !== false;
|
|
704
|
+
if (!accepted) {
|
|
705
|
+
const reason = typeof result.error === "string" && result.error.trim() ? `: ${result.error.trim()}` : "";
|
|
706
|
+
notify(`Rig did not accept the steering message${reason}.`, "error");
|
|
707
|
+
return;
|
|
708
|
+
}
|
|
709
|
+
const entry = result.message && typeof result.message === "object" && !Array.isArray(result.message) ? result.message : null;
|
|
710
|
+
const runId = String(entry?.runId ?? second ?? input.context.runId ?? "run");
|
|
711
|
+
const preview = message.length > 80 ? `${message.slice(0, 79)}\u2026` : message;
|
|
712
|
+
notify(`Steering queued for ${runId} \u2192 "${preview}" \u2014 the worker applies it at its next checkpoint.`, "info");
|
|
704
713
|
return;
|
|
705
714
|
}
|
|
706
715
|
if (first === "stop") {
|
|
@@ -1773,10 +1782,10 @@ function createPiRigExtension(pi, options = {}) {
|
|
|
1773
1782
|
return;
|
|
1774
1783
|
}
|
|
1775
1784
|
setStatus(ctx, "rig", `drone ${shortId} \xB7 connecting\u2026`);
|
|
1776
|
-
const live = gateResult.
|
|
1785
|
+
const live = gateResult.allowed ? startOperatorBridge(state, ctx) : undefined;
|
|
1777
1786
|
addDisposable(sessionDisposables, live?.dispose);
|
|
1778
1787
|
addDisposable(sessionDisposables, startOperatorRunStatusLine(state, ctx, live));
|
|
1779
|
-
if (state.operatorSession && gateResult.
|
|
1788
|
+
if (state.operatorSession && gateResult.allowed) {
|
|
1780
1789
|
addDisposable(sessionDisposables, startWorkerSessionMirror(pi, state, ctx));
|
|
1781
1790
|
addDisposable(sessionDisposables, startWorkerCommandRegistration(pi, state, ctx));
|
|
1782
1791
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h-rig/pi-rig",
|
|
3
|
-
"version": "0.0.6-alpha.
|
|
3
|
+
"version": "0.0.6-alpha.84",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Rig package",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.
|
|
41
|
+
"@rig/contracts": "npm:@h-rig/contracts@0.0.6-alpha.84"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@earendil-works/pi-coding-agent": ">=0.79.0",
|