@runuai/host 0.9.62 → 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/scripts/agent/task-up.sh +6 -2
- package/src/index.ts +4 -2
- package/src/main.ts +2 -2
- package/src/protocol.ts +5 -2
package/package.json
CHANGED
package/scripts/agent/task-up.sh
CHANGED
|
@@ -83,6 +83,10 @@ project_env_json=$(printf '%s' "$project_env_json" | jq -c '.')
|
|
|
83
83
|
task_dir="$UAI_WORKSPACE_ROOT/tasks/$task_id"
|
|
84
84
|
task_workspace="$task_dir/workspace"
|
|
85
85
|
task_uai_dir="$task_dir/.uai"
|
|
86
|
+
# Agents are told to save browser screenshots and other artifacts under
|
|
87
|
+
# /workspace/.uai/attachments/, but nothing created the directory — every
|
|
88
|
+
# first browser_take_screenshot hit ENOENT (found by an agent in the first
|
|
89
|
+
# apple-container task, 2026-08-24). Created with the .uai dir below.
|
|
86
90
|
projects_root="$UAI_WORKSPACE_ROOT/projects"
|
|
87
91
|
compose_project=$(compose_project_for_task "$task_id")
|
|
88
92
|
app_container=$(app_container_for_task "$task_id")
|
|
@@ -1279,7 +1283,7 @@ done < <(jq -c '.[]' <<<"$projects_json")
|
|
|
1279
1283
|
# uid-501 macOS host. The sanitizer above repairs its rewritten control files
|
|
1280
1284
|
# on every later resume.
|
|
1281
1285
|
step "WORKTREE_FAILED" "share task files with container"
|
|
1282
|
-
mkdir -p "$task_uai_dir"
|
|
1286
|
+
mkdir -p "$task_uai_dir" "$task_uai_dir/attachments"
|
|
1283
1287
|
# The shared group may be a broad host group (for example macOS `staff`). Keep
|
|
1284
1288
|
# its writable leaves behind host-only parents; Docker bind-mounts the exact
|
|
1285
1289
|
# workspace/repository roots, so node does not need host-path traversal here.
|
|
@@ -1327,7 +1331,7 @@ fi
|
|
|
1327
1331
|
|
|
1328
1332
|
step "RENDER_FAILED" "generate compose"
|
|
1329
1333
|
|
|
1330
|
-
mkdir -p "$task_uai_dir"
|
|
1334
|
+
mkdir -p "$task_uai_dir" "$task_uai_dir/attachments"
|
|
1331
1335
|
|
|
1332
1336
|
STANDARD_CONTAINER_DIR="${UAI_STANDARD_CONTAINER_ASSETS_DIR:-$SCRIPT_DIR/../../images/standard/container}"
|
|
1333
1337
|
if ! STANDARD_CONTAINER_DIR=$(cd "$STANDARD_CONTAINER_DIR" && pwd -P); then
|
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,
|