@runuai/host 0.9.63 → 0.9.64
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/package.json +1 -1
- package/src/index.ts +4 -2
- package/src/main.ts +2 -2
- package/src/protocol.ts +5 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -177,7 +177,9 @@ export function setManagedHostRestartHook(hook: () => void): void {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
export const hostCommands: HostCommands = {
|
|
180
|
-
|
|
180
|
+
// The hostId argument is cloud-side routing (host-scoped commands carry
|
|
181
|
+
// their target in args, like filesOp); this process IS the target.
|
|
182
|
+
async hostUpdate(ctx, _hostId) {
|
|
181
183
|
logCommand(ctx, "hostUpdate");
|
|
182
184
|
try {
|
|
183
185
|
const { updateManagedRuntime } = await import("../lib/managed-runtime");
|
|
@@ -215,7 +217,7 @@ export const hostCommands: HostCommands = {
|
|
|
215
217
|
};
|
|
216
218
|
}
|
|
217
219
|
},
|
|
218
|
-
async hostRestart(ctx) {
|
|
220
|
+
async hostRestart(ctx, _hostId) {
|
|
219
221
|
logCommand(ctx, "hostRestart");
|
|
220
222
|
if (!managedHostRestartHook) {
|
|
221
223
|
return {
|
package/src/main.ts
CHANGED
|
@@ -2287,9 +2287,9 @@ async function dispatchCommand(
|
|
|
2287
2287
|
expectNumberArg(args, 2),
|
|
2288
2288
|
);
|
|
2289
2289
|
case "hostUpdate":
|
|
2290
|
-
return hostCommands.hostUpdate(ctx);
|
|
2290
|
+
return hostCommands.hostUpdate(ctx, typeof args[0] === "string" ? args[0] : "");
|
|
2291
2291
|
case "hostRestart":
|
|
2292
|
-
return hostCommands.hostRestart(ctx);
|
|
2292
|
+
return hostCommands.hostRestart(ctx, typeof args[0] === "string" ? args[0] : "");
|
|
2293
2293
|
case "engineAccountRemove": {
|
|
2294
2294
|
// ADR-116: mirror the local API's post-mutation behavior — the cloud's
|
|
2295
2295
|
// account list self-heals through the capability re-advertisement.
|
package/src/protocol.ts
CHANGED
|
@@ -1270,9 +1270,12 @@ export interface HostCommands {
|
|
|
1270
1270
|
* remote trigger adds no trust surface. The reconnect on the new version
|
|
1271
1271
|
* is the real confirmation.
|
|
1272
1272
|
*/
|
|
1273
|
-
hostUpdate(
|
|
1273
|
+
hostUpdate(
|
|
1274
|
+
ctx: CommandContext,
|
|
1275
|
+
hostId: string,
|
|
1276
|
+
): Promise<HostCommandResult<HostUpdateOutcome>>;
|
|
1274
1277
|
/** Drain in-flight work, then let the service supervisor respawn the host. */
|
|
1275
|
-
hostRestart(ctx: CommandContext): Promise<HostCommandResult<void>>;
|
|
1278
|
+
hostRestart(ctx: CommandContext, hostId: string): Promise<HostCommandResult<void>>;
|
|
1276
1279
|
taskUp(
|
|
1277
1280
|
ctx: CommandContext,
|
|
1278
1281
|
input: TaskLaunchInput,
|