Skip to content

Commit ce1a245

Browse files
TimBeyerclaude
andcommitted
style: auto-format with prettier
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b39e6ea commit ce1a245

3 files changed

Lines changed: 18 additions & 7 deletions

File tree

packages/host-core/src/update-apply.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,7 @@ export async function applyVmUpdates(configDir?: string): Promise<VmUpdateResult
6565
await deployClaw(driver, entry.vmName, clawPath);
6666

6767
// Run capability migrations only
68-
const migrateResult = await driver.exec(
69-
entry.vmName,
70-
`${CLAW_BIN_PATH} migrate --json`,
71-
);
68+
const migrateResult = await driver.exec(entry.vmName, `${CLAW_BIN_PATH} migrate --json`);
7269

7370
const detail =
7471
migrateResult.exitCode === 0

packages/vm-cli/src/commands/migrate.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ import { Command } from "commander";
22
import { setJsonMode, ok, fail, log } from "../output.js";
33
import { createCapabilityContext } from "../capabilities/context.js";
44
import { getEnabledCapabilities } from "../capabilities/registry.js";
5-
import { readCapabilityState, needsMigration, findMigrationPath, markInstalled } from "../capabilities/state.js";
5+
import {
6+
readCapabilityState,
7+
needsMigration,
8+
findMigrationPath,
9+
markInstalled,
10+
} from "../capabilities/state.js";
611
import { readProvisionConfig } from "../tools/provision-config.js";
712
import type { ProvisionResult } from "@clawctl/types";
813

@@ -49,7 +54,9 @@ async function runMigrate(): Promise<MigrateResult> {
4954
const result = await migration.run(ctx);
5055
results.push(result);
5156
const icon = result.status === "failed" ? "\u2717" : "\u2713";
52-
log(` ${icon} ${result.name}: ${result.status}${result.detail ? ` — ${result.detail}` : ""}${result.error ? ` — ${result.error}` : ""}`);
57+
log(
58+
` ${icon} ${result.name}: ${result.status}${result.detail ? ` — ${result.detail}` : ""}${result.error ? ` — ${result.error}` : ""}`,
59+
);
5360

5461
if (result.status === "failed") {
5562
anyFailed = true;
@@ -78,7 +85,10 @@ export function registerMigrateCommand(program: Command): void {
7885
const result = await runMigrate();
7986

8087
if (result.failed.length > 0) {
81-
fail(result.failed.map((name) => `${name}: migration failed`), result);
88+
fail(
89+
result.failed.map((name) => `${name}: migration failed`),
90+
result,
91+
);
8292
process.exit(1);
8393
}
8494

tasks/2026-03-18_2134_auto-update-system/TASK.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
## Scope
66

77
Add a complete auto-update system that:
8+
89
- Notifies users of new GitHub releases via pre-command check (4h TTL cache)
910
- Downloads and atomically replaces the clawctl binary
1011
- Re-execs as the new binary to push updated claw to running VMs
1112
- Marks stopped VMs as `pendingClawUpdate` for next start
1213
- Adds `claw migrate` for migration-only updates (no full re-provisioning)
1314

1415
Does NOT cover:
16+
1517
- Host-side schema migrations (registry already has `version: 1`)
1618
- Auto-update without user consent (always prompts)
1719

@@ -29,6 +31,7 @@ handled for free by `ensureDaemon()` detecting binary hash changes.
2931
## Plan
3032

3133
10-step implementation:
34+
3235
1. Add `semver` dependency
3336
2. Update state management (`update-state.ts`)
3437
3. GitHub release checker (`update-check.ts`)
@@ -41,6 +44,7 @@ handled for free by `ensureDaemon()` detecting binary hash changes.
4144
10. Pending update on start
4245

4346
Key design decisions:
47+
4448
- Per-version dismissal: saying "no" to v0.15.0 suppresses until v0.16.0+
4549
- `claw migrate` runs only explicit migrations, not full re-provisioning
4650
- Silent degradation on network failure (3s timeout)

0 commit comments

Comments
 (0)