@wjarka/cezarion 0.17.0-dev.5638 → 0.17.0-dev.5648

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.
@@ -184,17 +184,6 @@ stores: () => readonly RunStore[]): import("hono/hono-base").HonoBase<import("ho
184
184
  } & {
185
185
  "/workspace/self-update/channel": {
186
186
  $put: {
187
- output: {
188
- error: string;
189
- };
190
- outputFormat: "json";
191
- status: 500;
192
- input: {
193
- json: {
194
- channel: "development" | "nightly" | "stable";
195
- };
196
- };
197
- } | {
198
187
  output: {
199
188
  version: string;
200
189
  installKind: "checkout" | "global-npm" | "managed" | "npx" | "unknown";
@@ -241,22 +230,22 @@ stores: () => readonly RunStore[]): import("hono/hono-base").HonoBase<import("ho
241
230
  channel: "development" | "nightly" | "stable";
242
231
  };
243
232
  };
244
- };
245
- };
246
- } & {
247
- "/workspace/self-update/apply": {
248
- $post: {
233
+ } | {
249
234
  output: {
250
235
  error: string;
251
236
  };
252
237
  outputFormat: "json";
253
- status: 409;
238
+ status: 500;
254
239
  input: {
255
240
  json: {
256
- version: string;
241
+ channel: "development" | "nightly" | "stable";
257
242
  };
258
243
  };
259
- } | {
244
+ };
245
+ };
246
+ } & {
247
+ "/workspace/self-update/apply": {
248
+ $post: {
260
249
  output: {
261
250
  version: string;
262
251
  installKind: "checkout" | "global-npm" | "managed" | "npx" | "unknown";
@@ -303,6 +292,17 @@ stores: () => readonly RunStore[]): import("hono/hono-base").HonoBase<import("ho
303
292
  version: string;
304
293
  };
305
294
  };
295
+ } | {
296
+ output: {
297
+ error: string;
298
+ };
299
+ outputFormat: "json";
300
+ status: 409;
301
+ input: {
302
+ json: {
303
+ version: string;
304
+ };
305
+ };
306
306
  };
307
307
  };
308
308
  }, "/", "/workspace/self-update/apply">;
@@ -5289,19 +5289,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
5289
5289
  } & {
5290
5290
  "/repo/commit/:sha": {
5291
5291
  $get: {
5292
- output: string;
5293
- outputFormat: "text";
5294
- status: import("hono/utils/http-status").ContentfulStatusCode;
5295
- input: {
5296
- query: {
5297
- structured?: string | undefined;
5298
- };
5299
- } & {
5300
- param: {
5301
- sha: string;
5302
- };
5303
- };
5304
- } | {
5305
5292
  output: {
5306
5293
  error: string;
5307
5294
  code?: "invalid_input" | undefined;
@@ -5365,6 +5352,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
5365
5352
  sha: string;
5366
5353
  };
5367
5354
  };
5355
+ } | {
5356
+ output: string;
5357
+ outputFormat: "text";
5358
+ status: import("hono/utils/http-status").ContentfulStatusCode;
5359
+ input: {
5360
+ query: {
5361
+ structured?: string | undefined;
5362
+ };
5363
+ } & {
5364
+ param: {
5365
+ sha: string;
5366
+ };
5367
+ };
5368
5368
  };
5369
5369
  };
5370
5370
  } & {
@@ -9068,11 +9068,22 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
9068
9068
  "/runs/:id/worker-destroy": {
9069
9069
  $post: {
9070
9070
  output: {
9071
- error: string;
9072
- code?: "invalid_input" | undefined;
9071
+ readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
9072
+ readonly error: string;
9073
+ readonly modelChoices?: {
9074
+ runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
9075
+ requestedModel: string;
9076
+ availableModels: {
9077
+ id: string;
9078
+ label: string;
9079
+ description: string;
9080
+ effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
9081
+ }[];
9082
+ otherRunners: ("claude" | "codex" | "cursor" | "omp" | "opencode" | "pi")[];
9083
+ } | undefined;
9073
9084
  };
9074
9085
  outputFormat: "json";
9075
- status: 400;
9086
+ status: 400 | 401 | 403 | 409 | 503;
9076
9087
  input: {
9077
9088
  query: {
9078
9089
  [x: string]: string | string[];
@@ -9086,22 +9097,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
9086
9097
  };
9087
9098
  } | {
9088
9099
  output: {
9089
- readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
9090
- readonly error: string;
9091
- readonly modelChoices?: {
9092
- runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
9093
- requestedModel: string;
9094
- availableModels: {
9095
- id: string;
9096
- label: string;
9097
- description: string;
9098
- effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
9099
- }[];
9100
- otherRunners: ("claude" | "codex" | "cursor" | "omp" | "opencode" | "pi")[];
9101
- } | undefined;
9100
+ error: string;
9101
+ code?: "invalid_input" | undefined;
9102
9102
  };
9103
9103
  outputFormat: "json";
9104
- status: 400 | 401 | 403 | 409 | 503;
9104
+ status: 400;
9105
9105
  input: {
9106
9106
  query: {
9107
9107
  [x: string]: string | string[];
@@ -18687,20 +18687,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
18687
18687
  } & {
18688
18688
  "/runs/:id/handoff": {
18689
18689
  $get: {
18690
- output: string;
18691
- outputFormat: "text";
18692
- status: 200;
18690
+ output: {
18691
+ error: string;
18692
+ };
18693
+ outputFormat: "json";
18694
+ status: 404;
18693
18695
  input: {
18694
18696
  param: {
18695
18697
  id: string;
18696
18698
  };
18697
18699
  };
18698
18700
  } | {
18699
- output: {
18700
- error: string;
18701
- };
18702
- outputFormat: "json";
18703
- status: 404;
18701
+ output: string;
18702
+ outputFormat: "text";
18703
+ status: 200;
18704
18704
  input: {
18705
18705
  param: {
18706
18706
  id: string;
@@ -18738,20 +18738,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
18738
18738
  } & {
18739
18739
  "/runs/:id/diff": {
18740
18740
  $get: {
18741
- output: string;
18742
- outputFormat: "text";
18743
- status: import("hono/utils/http-status").ContentfulStatusCode;
18741
+ output: {
18742
+ error: string;
18743
+ };
18744
+ outputFormat: "json";
18745
+ status: 404 | 409;
18744
18746
  input: {
18745
18747
  param: {
18746
18748
  id: string;
18747
18749
  };
18748
18750
  };
18749
18751
  } | {
18750
- output: {
18751
- error: string;
18752
- };
18753
- outputFormat: "json";
18754
- status: 404 | 409;
18752
+ output: string;
18753
+ outputFormat: "text";
18754
+ status: import("hono/utils/http-status").ContentfulStatusCode;
18755
18755
  input: {
18756
18756
  param: {
18757
18757
  id: string;
@@ -21151,19 +21151,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
21151
21151
  } & {
21152
21152
  "/repo/commit/:sha": {
21153
21153
  $get: {
21154
- output: string;
21155
- outputFormat: "text";
21156
- status: import("hono/utils/http-status").ContentfulStatusCode;
21157
- input: {
21158
- query: {
21159
- structured?: string | undefined;
21160
- };
21161
- } & {
21162
- param: {
21163
- sha: string;
21164
- };
21165
- };
21166
- } | {
21167
21154
  output: {
21168
21155
  error: string;
21169
21156
  code?: "invalid_input" | undefined;
@@ -21227,6 +21214,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
21227
21214
  sha: string;
21228
21215
  };
21229
21216
  };
21217
+ } | {
21218
+ output: string;
21219
+ outputFormat: "text";
21220
+ status: import("hono/utils/http-status").ContentfulStatusCode;
21221
+ input: {
21222
+ query: {
21223
+ structured?: string | undefined;
21224
+ };
21225
+ } & {
21226
+ param: {
21227
+ sha: string;
21228
+ };
21229
+ };
21230
21230
  };
21231
21231
  };
21232
21232
  } & {
@@ -24930,11 +24930,22 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
24930
24930
  "/runs/:id/worker-destroy": {
24931
24931
  $post: {
24932
24932
  output: {
24933
- error: string;
24934
- code?: "invalid_input" | undefined;
24933
+ readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
24934
+ readonly error: string;
24935
+ readonly modelChoices?: {
24936
+ runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
24937
+ requestedModel: string;
24938
+ availableModels: {
24939
+ id: string;
24940
+ label: string;
24941
+ description: string;
24942
+ effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
24943
+ }[];
24944
+ otherRunners: ("claude" | "codex" | "cursor" | "omp" | "opencode" | "pi")[];
24945
+ } | undefined;
24935
24946
  };
24936
24947
  outputFormat: "json";
24937
- status: 400;
24948
+ status: 400 | 401 | 403 | 409 | 503;
24938
24949
  input: {
24939
24950
  query: {
24940
24951
  [x: string]: string | string[];
@@ -24948,22 +24959,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
24948
24959
  };
24949
24960
  } | {
24950
24961
  output: {
24951
- readonly code: "capacity_limit" | "denied_scope" | "incompatible_state" | "incomplete_cleanup" | "invalid_baseline" | "invalid_input" | "unauthenticated" | "unavailable_diff" | "unavailable_transport";
24952
- readonly error: string;
24953
- readonly modelChoices?: {
24954
- runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
24955
- requestedModel: string;
24956
- availableModels: {
24957
- id: string;
24958
- label: string;
24959
- description: string;
24960
- effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
24961
- }[];
24962
- otherRunners: ("claude" | "codex" | "cursor" | "omp" | "opencode" | "pi")[];
24963
- } | undefined;
24962
+ error: string;
24963
+ code?: "invalid_input" | undefined;
24964
24964
  };
24965
24965
  outputFormat: "json";
24966
- status: 400 | 401 | 403 | 409 | 503;
24966
+ status: 400;
24967
24967
  input: {
24968
24968
  query: {
24969
24969
  [x: string]: string | string[];
@@ -34549,20 +34549,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
34549
34549
  } & {
34550
34550
  "/runs/:id/handoff": {
34551
34551
  $get: {
34552
- output: string;
34553
- outputFormat: "text";
34554
- status: 200;
34552
+ output: {
34553
+ error: string;
34554
+ };
34555
+ outputFormat: "json";
34556
+ status: 404;
34555
34557
  input: {
34556
34558
  param: {
34557
34559
  id: string;
34558
34560
  };
34559
34561
  };
34560
34562
  } | {
34561
- output: {
34562
- error: string;
34563
- };
34564
- outputFormat: "json";
34565
- status: 404;
34563
+ output: string;
34564
+ outputFormat: "text";
34565
+ status: 200;
34566
34566
  input: {
34567
34567
  param: {
34568
34568
  id: string;
@@ -34600,20 +34600,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
34600
34600
  } & {
34601
34601
  "/runs/:id/diff": {
34602
34602
  $get: {
34603
- output: string;
34604
- outputFormat: "text";
34605
- status: import("hono/utils/http-status").ContentfulStatusCode;
34603
+ output: {
34604
+ error: string;
34605
+ };
34606
+ outputFormat: "json";
34607
+ status: 404 | 409;
34606
34608
  input: {
34607
34609
  param: {
34608
34610
  id: string;
34609
34611
  };
34610
34612
  };
34611
34613
  } | {
34612
- output: {
34613
- error: string;
34614
- };
34615
- outputFormat: "json";
34616
- status: 404 | 409;
34614
+ output: string;
34615
+ outputFormat: "text";
34616
+ status: import("hono/utils/http-status").ContentfulStatusCode;
34617
34617
  input: {
34618
34618
  param: {
34619
34619
  id: string;
@@ -3,11 +3,12 @@ import { parseArgs } from 'node:util';
3
3
  import { prepareHome } from '../home/entry.js';
4
4
  import { runServerMigrate } from './group-migrate.js';
5
5
  const USAGE = commandText(`Usage: cez server-migrate [--dry-run] [--yes]
6
- Move every server install recorded in the legacy home to the new unit, site and home names, as one group.
7
- It stops every instance that shares the home, copies the home, moves each unit and site, then starts
8
- each instance and checks its health. The new home stays pending (read-only) until every instance
9
- passes; any failure restores every old unit and site and leaves the legacy home in use.
10
- --dry-run print that plan: every unit, site, file and environment line it would change and each
6
+ Move every server install recorded in the legacy home to the new unit, launchd agent, site and home
7
+ names, as one group. It stops every instance that shares the home, copies the home, moves each unit,
8
+ launchd agent and site, then starts each instance and checks its health. The new home stays pending
9
+ (read-only) until every instance passes; any failure restores every old unit, agent and site and
10
+ leaves the legacy home in use.
11
+ --dry-run print that plan: every unit, agent, site, file and environment line it would change and each
11
12
  health check; change nothing, not even the legacy home
12
13
  --yes accept safe defaults (privileged commands still need passwordless sudo or your paste)`);
13
14
  /** `cez server-migrate`, registered only while the release switch is on. Exit 0 means no change is pending. */
@@ -1 +1 @@
1
- {"version":3,"file":"migrate-cli.js","sourceRoot":"","sources":["../../src/server-install/migrate-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAA6B,MAAM,oBAAoB,CAAC;AAGjF,MAAM,KAAK,GAAG,WAAW,CAAC;;;;;;;oGAO0E,CAAC,CAAC;AAUtG,+GAA+G;AAC/G,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,IAAc,EAAE,GAAsB,EAAE,KAAyB;IAC7G,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE;gBAClD,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;aAChG,EAAE,CAAC,CAAC;QACL,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YAAC,OAAO,CAAC,CAAC;QAAC,CAAC;QAClD,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;QAC1C,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,KAAK,IAAI,CAAC;QACtC,yFAAyF;QACzF,+EAA+E;QAC/E,IAAI,CAAC,MAAM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CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC1H,OAAO,CAAC,CAAC;IACX,CAAC;AACH,CAAC"}
@@ -1,5 +1,17 @@
1
- import type { InstallContext, PlatformMigrationReport } from '../types.ts';
1
+ import type { InstallContext, PlatformMigrationReport, StepArtifact } from '../types.ts';
2
2
  export declare function unloadLaunchd(ctx: InstallContext, name: string): Promise<void>;
3
3
  /** Migrate only provably owned legacy agents. State and persistence belong to the caller. */
4
4
  export declare function migrateLaunchd(ctx: InstallContext, dir: string, rebrand: boolean): Promise<PlatformMigrationReport>;
5
5
  export declare function rollbackLaunchdMigration(ctx: InstallContext, migrated: PlatformMigrationReport, rebrand: boolean): Promise<PlatformMigrationReport>;
6
+ /** An agent whose plist the ledger records or whose launcher proves it ours. */
7
+ export type LaunchdService = StepArtifact & {
8
+ name: string;
9
+ path: string;
10
+ role: 'cockpit' | 'ngrok';
11
+ };
12
+ /** One line per service for the dry-run plan; names are the post-migration labels. */
13
+ export declare function launchdHealthDetails(services: LaunchdService[], port: number): string[];
14
+ /** `server-migrate` stop: boot out every owned agent. Foreign agents are never in the list. */
15
+ export declare function stopLaunchdServices(ctx: InstallContext, services: LaunchdService[]): Promise<void>;
16
+ /** `server-migrate` start: load each agent that is not loaded, then check the cockpit port and the tunnel. */
17
+ export declare function startLaunchdServices(ctx: InstallContext, services: LaunchdService[], port: number): Promise<void>;
@@ -1,6 +1,7 @@
1
1
  import { existsSync, lstatSync, rmSync, writeFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import { guardLaunchdWrite, ownsLaunchdPlist, readLaunchdPlist } from './macosx-launchd-files.js';
4
+ import { StepAborted } from '../steps.js';
4
5
  const emptyReport = () => ({ moved: [], leftAloneForeign: [], errors: [] });
5
6
  function label(xml) {
6
7
  return xml.match(/<key>Label<\/key>\s*<string>([^<]+)<\/string>/)?.[1];
@@ -60,12 +61,11 @@ async function movePlist(ctx, move, xml) {
60
61
  }
61
62
  catch (error) {
62
63
  // Do not touch a destination we did not create, or whose bytes have changed.
64
+ // The old job stays unloaded: the group starts it after the home rolls back, so it reads the legacy home.
63
65
  if (published) {
64
66
  guardLaunchdWrite(ctx, to, { selected: to, expectedXml: nextXml });
65
67
  await unloadLaunchd(ctx, to.name);
66
68
  rmSync(to.path);
67
- if (!(await isLoaded(ctx, from)))
68
- await bootstrap(ctx, from);
69
69
  }
70
70
  removeBackup(move, xml);
71
71
  throw error;
@@ -76,6 +76,7 @@ export async function migrateLaunchd(ctx, dir, rebrand) {
76
76
  const report = emptyReport();
77
77
  if (!rebrand)
78
78
  return report;
79
+ const details = [];
79
80
  for (const [stepId, agent] of [['autostart', 'cockpit'], ['ngrok', 'ngrok']]) {
80
81
  const from = { kind: 'owned', type: 'launchd', name: `ai.cezar.${agent}`, path: join(dir, `ai.cezar.${agent}.plist`) };
81
82
  if (!existsSync(from.path))
@@ -84,6 +85,7 @@ export async function migrateLaunchd(ctx, dir, rebrand) {
84
85
  const xml = readLaunchdPlist(from.path);
85
86
  if (!ownsLaunchdPlist(ctx, from, xml)) {
86
87
  report.leftAloneForeign.push({ ...from, kind: 'shared' });
88
+ details.push(`launchd ${from.name} left alone: ${from.path} is not ours`);
87
89
  continue;
88
90
  }
89
91
  if (!ctx.state.steps[stepId])
@@ -98,11 +100,14 @@ export async function migrateLaunchd(ctx, dir, rebrand) {
98
100
  if (!ctx.dryRun)
99
101
  await movePlist(ctx, move, xml);
100
102
  report.moved.push(move);
103
+ details.push(`launchd ${from.name} → ${to.name} (${to.path}; old plist kept as ${backup.path})`);
101
104
  }
102
105
  catch (error) {
103
106
  report.errors.push({ artifact: from, message: error instanceof Error ? error.message : String(error) });
104
107
  }
105
108
  }
109
+ if (details.length)
110
+ report.details = details;
106
111
  return report;
107
112
  }
108
113
  function inspectRollback(ctx, move) {
@@ -143,19 +148,15 @@ async function restorePlist(ctx, move) {
143
148
  }
144
149
  if (ctx.dryRun)
145
150
  return true;
146
- const oldLoaded = await isLoaded(ctx, from);
147
151
  if (restoreFile)
148
152
  writeFileSync(from.path, xml, { encoding: 'utf8', mode: 0o600, flag: 'wx', flush: true });
149
153
  try {
154
+ // Restore only the file. The group starts the old job after the home rolls back: loaded now,
155
+ // it would resolve the still-pending target home and keep serving it.
150
156
  await unloadLaunchd(ctx, to.name);
151
- // A prior attempt can have restored and loaded the old job already.
152
- if (!oldLoaded)
153
- await bootstrap(ctx, from);
154
157
  rmSync(to.path);
155
158
  }
156
159
  catch (error) {
157
- if (!oldLoaded)
158
- await unloadLaunchd(ctx, from.name);
159
160
  if (restoreFile)
160
161
  rmSync(from.path);
161
162
  if (!(await isLoaded(ctx, to)))
@@ -180,4 +181,59 @@ export async function rollbackLaunchdMigration(ctx, migrated, rebrand) {
180
181
  }
181
182
  return report;
182
183
  }
184
+ const NGROK_API = 'http://localhost:4040/api/tunnels';
185
+ /** Each probe is bounded: a socket that accepts and never answers must not block the group before rollback. */
186
+ const PROBE_SECONDS = '2';
187
+ /** Polls one second apart. The tunnel connects after the cockpit is up, so it gets about 30 s. */
188
+ const COCKPIT_POLLS = 15;
189
+ const TUNNEL_POLLS = 30;
190
+ /** One line per service for the dry-run plan; names are the post-migration labels. */
191
+ export function launchdHealthDetails(services, port) {
192
+ return services.map((s) => `health check: ${s.name} is loaded and ${s.role === 'cockpit'
193
+ ? `http://127.0.0.1:${port}/ answers` : `the ngrok API at ${NGROK_API} lists a tunnel`}`);
194
+ }
195
+ /** `server-migrate` stop: boot out every owned agent. Foreign agents are never in the list. */
196
+ export async function stopLaunchdServices(ctx, services) {
197
+ for (const service of services) {
198
+ if (ctx.dryRun)
199
+ ctx.ui.info(`DRY RUN — would launchctl bootout ${service.name}.`);
200
+ else
201
+ await unloadLaunchd(ctx, service.name);
202
+ }
203
+ }
204
+ /** `sleep 1` through the runner keeps the poll testable without real timers. */
205
+ async function poll(ctx, attempts, probe) {
206
+ for (let i = 0; i < attempts; i++) {
207
+ if (await probe())
208
+ return true;
209
+ if (i < attempts - 1)
210
+ await ctx.runner.capture('sh', ['-c', 'sleep 1']);
211
+ }
212
+ return false;
213
+ }
214
+ /** `server-migrate` start: load each agent that is not loaded, then check the cockpit port and the tunnel. */
215
+ export async function startLaunchdServices(ctx, services, port) {
216
+ if (ctx.dryRun) {
217
+ for (const line of launchdHealthDetails(services, port))
218
+ ctx.ui.info(`DRY RUN — would load and check: ${line}`);
219
+ return;
220
+ }
221
+ for (const service of services) {
222
+ if (!existsSync(service.path))
223
+ throw new StepAborted(`Recorded launchd plist missing: ${service.path}`);
224
+ // Always a fresh process: a job loaded earlier may have resolved a home that has since changed state.
225
+ await unloadLaunchd(ctx, service.name);
226
+ await bootstrap(ctx, service);
227
+ }
228
+ for (const service of services) {
229
+ const up = service.role === 'cockpit'
230
+ ? await poll(ctx, COCKPIT_POLLS, async () => {
231
+ const code = (await ctx.runner.capture('curl', ['-s', '--max-time', PROBE_SECONDS, '-o', '/dev/null', '-w', '%{http_code}', `http://127.0.0.1:${port}/`])).stdout.trim();
232
+ return code !== '' && code !== '000';
233
+ })
234
+ : await poll(ctx, TUNNEL_POLLS, async () => (await ctx.runner.capture('curl', ['-s', '--max-time', PROBE_SECONDS, NGROK_API])).stdout.includes('public_url'));
235
+ if (!up)
236
+ throw new StepAborted(service.role === 'cockpit' ? `${service.name} did not answer on port ${port}` : `${service.name}: the ngrok API lists no tunnel`);
237
+ }
238
+ }
183
239
  //# sourceMappingURL=macosx-migration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"macosx-migration.js","sourceRoot":"","sources":["../../../src/server-install/platforms/macosx-migration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,C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,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,aAAa,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,oBAAoB,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBACzK,OAAO,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,KAAK,CAAC;YACvC,CAAC,CAAC;YACF,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC;QAChK,IAAI,CAAC,EAAE;YAAE,MAAM,IAAI,WAAW,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,2BAA2B,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,iCAAiC,CAAC,CAAC;IACnK,CAAC;AACH,CAAC"}
@@ -11,7 +11,8 @@ import { fileURLToPath } from 'node:url';
11
11
  import { CANCEL, PreflightError } from '../types.js';
12
12
  import { brewInstallTool, brewRemoveHint, depCheckStep, HOSTNAME_RE, owned, shared, StepAborted, StepCancelled, verifyCommand } from '../steps.js';
13
13
  import { REBRAND_SWITCH } from '../../home/switch.js';
14
- import { migrateLaunchd, rollbackLaunchdMigration, unloadLaunchd } from './macosx-migration.js';
14
+ import { launchdHealthDetails, migrateLaunchd, rollbackLaunchdMigration, startLaunchdServices, stopLaunchdServices, unloadLaunchd } from './macosx-migration.js';
15
+ import { applyMigrationReport } from '../migration-report.js';
15
16
  import { guardLaunchdWrite, ownsLaunchdPlist, readLaunchdPlist } from './macosx-launchd-files.js';
16
17
  import { refreshNpxCacheForRedeploy } from '../npx-cache.js';
17
18
  /**
@@ -25,6 +26,31 @@ import { refreshNpxCacheForRedeploy } from '../npx-cache.js';
25
26
  function launchAgentsDir(ctx) {
26
27
  return ctx.launchAgentsDir?.() ?? join(homedir(), 'Library', 'LaunchAgents');
27
28
  }
29
+ /** Agents that `server-migrate` stops and starts: recorded in the ledger, or a launcher that proves it ours. */
30
+ function launchdServices(ctx, rebrand) {
31
+ const services = [];
32
+ for (const [step, role] of [['autostart', 'cockpit'], ['ngrok', 'ngrok']]) {
33
+ const agent = agentArtifact(ctx, step, rebrand);
34
+ const recorded = ctx.state.steps[step]?.created?.artifacts.some((a) => a.kind === 'owned' && a.type === 'launchd');
35
+ if (recorded || (existsSync(agent.path) && ownsLaunchdPlist(ctx, agent, readLaunchdPlist(agent.path))))
36
+ services.push({ ...agent, role });
37
+ }
38
+ return services;
39
+ }
40
+ /** Move the agents; a dry run also names each health check under the label the agent has after its move. */
41
+ async function migrateAgents(ctx, rebrand) {
42
+ const report = await migrateLaunchd(ctx, launchAgentsDir(ctx), rebrand);
43
+ if (!rebrand || !ctx.dryRun || report.errors.length)
44
+ return report;
45
+ try {
46
+ const after = { ...ctx, state: applyMigrationReport(ctx.state, report) };
47
+ report.details = [...report.details ?? [], ...launchdHealthDetails(launchdServices(after, rebrand), ctx.state.primaryPort)];
48
+ }
49
+ catch (error) {
50
+ report.errors.push({ artifact: { kind: 'owned', type: 'launchd', path: launchAgentsDir(ctx) }, message: error instanceof Error ? error.message : String(error) });
51
+ }
52
+ return report;
53
+ }
28
54
  function labelFor(agent, rebrand) {
29
55
  return `${rebrand ? 'tools.hearsay.squawk' : 'ai.cezar'}.${agent}`;
30
56
  }
@@ -454,8 +480,10 @@ export function createMacosxNgrok({ rebrand = REBRAND_SWITCH } = {}) {
454
480
  ctx.ui.warn(`launchctl kickstart returned non-zero — check \`launchctl print gui/${uid}/${ngrok.name}\`.`);
455
481
  await identityStep.run(ctx);
456
482
  },
457
- migrate: (ctx) => migrateLaunchd(ctx, launchAgentsDir(ctx), rebrand),
483
+ migrate: (ctx) => migrateAgents(ctx, rebrand),
458
484
  rollbackMigration: (ctx, report) => rollbackLaunchdMigration(ctx, report, rebrand),
485
+ stopService: (ctx) => stopLaunchdServices(ctx, launchdServices(ctx, rebrand)),
486
+ startService: (ctx) => startLaunchdServices(ctx, launchdServices(ctx, rebrand), ctx.state.primaryPort),
459
487
  };
460
488
  }
461
489
  export const macosxNgrok = createMacosxNgrok();