@sealant/mend 0.24.1 → 0.25.0

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.
Files changed (58) hide show
  1. package/README.md +5 -6
  2. package/dist/{dashboard-YEU7SDYB.js → dashboard-JIWYW3EM.js} +24 -7
  3. package/dist/main.js +225 -457
  4. package/man/mend-accounts.1 +1 -1
  5. package/man/mend-adopt.1 +1 -1
  6. package/man/mend-attach.1 +1 -1
  7. package/man/mend-codex.1 +1 -1
  8. package/man/mend-completions.1 +1 -1
  9. package/man/mend-connect.1 +1 -1
  10. package/man/mend-continue.1 +1 -1
  11. package/man/mend-doctor.1 +1 -1
  12. package/man/mend-dotfiles-sync.1 +1 -1
  13. package/man/mend-dotfiles.1 +1 -1
  14. package/man/mend-env-cluster.1 +1 -1
  15. package/man/mend-env-load.1 +1 -1
  16. package/man/mend-env-show.1 +1 -1
  17. package/man/mend-help.1 +1 -1
  18. package/man/mend-keys-init.1 +1 -1
  19. package/man/mend-keys-mode.1 +1 -1
  20. package/man/mend-keys-share.1 +1 -1
  21. package/man/mend-keys-show.1 +1 -1
  22. package/man/mend-login.1 +1 -1
  23. package/man/mend-logout.1 +1 -1
  24. package/man/mend-man.1 +1 -1
  25. package/man/mend-pair.1 +1 -1
  26. package/man/mend-projects.1 +1 -1
  27. package/man/mend-refresh.1 +1 -1
  28. package/man/mend-rejoin.1 +1 -1
  29. package/man/mend-resume.1 +1 -1
  30. package/man/mend-run.1 +1 -1
  31. package/man/mend-server-logs.1 +1 -1
  32. package/man/mend-server-restart.1 +3 -3
  33. package/man/mend-server-setup.1 +6 -9
  34. package/man/mend-server-start.1 +3 -3
  35. package/man/mend-server-status.1 +1 -1
  36. package/man/mend-server-stop.1 +1 -1
  37. package/man/mend-server-upgrade.1 +3 -3
  38. package/man/mend-server.1 +1 -1
  39. package/man/mend-service-add.1 +1 -1
  40. package/man/mend-service-connect.1 +1 -1
  41. package/man/mend-service-init.1 +1 -1
  42. package/man/mend-service-list.1 +1 -1
  43. package/man/mend-service-logs.1 +1 -1
  44. package/man/mend-service-restart.1 +1 -1
  45. package/man/mend-service-run.1 +1 -1
  46. package/man/mend-service-stop.1 +1 -1
  47. package/man/mend-sessions.1 +1 -1
  48. package/man/mend-shell.1 +1 -1
  49. package/man/mend-skills-push.1 +1 -1
  50. package/man/mend-skills.1 +1 -1
  51. package/man/mend-ssh-setup.1 +1 -1
  52. package/man/mend-ssh.1 +1 -1
  53. package/man/mend-stop.1 +1 -1
  54. package/man/mend-ui.1 +1 -1
  55. package/man/mend-version.1 +1 -1
  56. package/man/mend-worktrees.1 +1 -1
  57. package/man/mend.1 +1 -1
  58. package/package.json +3 -3
package/README.md CHANGED
@@ -41,18 +41,17 @@ pin rather than automatically downgrading or restoring the database.
41
41
  For local release assets and preloaded images:
42
42
 
43
43
  ```sh
44
- mend server setup --version 0.23.0 --assets-dir ./release-0.23.0 --offline --registry-port 5501
44
+ mend server setup --version 0.23.0 --assets-dir ./release-0.23.0 --offline
45
45
  mend server upgrade --version 0.24.0 --assets-dir ./release-0.24.0 --offline
46
46
  ```
47
47
 
48
- Each asset directory must contain `compose.v1.yaml` and `postgres-init.sh`. Mend copies them into an
48
+ Each asset directory must contain `compose.v2.yaml` and `postgres-init.sh`. Mend copies them into an
49
49
  immutable private generation; the source directory is not needed afterward. Preload official
50
50
  `postgres:17-alpine` and canonical `ghcr.io/sealant-sh/mend:VERSION`. Image labels and health must
51
51
  report that exact version. `--offline` forbids GitHub requests and release-image pulls.
52
- Start/restart always reuse local release images and retained assets. Startup still verifies the
53
- loopback registry by importing, pushing, removing and pulling its own tiny probe image. The registry
54
- defaults to port 5000; choose a free `--registry-port` when another registry, such as Sealant's,
55
- already uses it.
52
+ Start/restart always reuse local release images and retained assets. The bundle publishes only the
53
+ web port (`--port`, default `3105`) and the SSH gateway port (`--ssh-port`, default `2222`); the two
54
+ must differ.
56
55
 
57
56
  Stop/restart/upgrade interrupt connections. Workspace containers and data remain, but active work
58
57
  may lose connectivity and need reconnection. No volumes are deleted. Status/logs never start an
@@ -227,6 +227,13 @@ var foldGroupStatus = (group) => {
227
227
  };
228
228
  var liveShellOf = (processes) => processes.findLast((process2) => process2.kind === "shell" && process2.exitedAt === null) ?? null;
229
229
  var liveProtocolOf = (processes) => processes.find((process2) => process2.kind === "agent-protocol" && process2.exitedAt === null) ?? null;
230
+ var enterTargetOf = (sessions) => {
231
+ const live = sessions.filter((session) => LIVE_STATUSES.has(session.status));
232
+ const attachable = live.find((session) => session.status !== "starting");
233
+ if (attachable !== void 0) return { kind: "attach", session: attachable };
234
+ const starting = live[0];
235
+ return starting === void 0 ? { kind: "none" } : { kind: "wait", session: starting };
236
+ };
230
237
  var markSessionStopped = (data, sessionId) => {
231
238
  const processesBySession = new Map(data.processesBySession);
232
239
  processesBySession.delete(sessionId);
@@ -2349,6 +2356,11 @@ attached \xB7 ${session.harness} \xB7 ${short} \xB7 detach: Ctrl+]
2349
2356
  const row = rows[next];
2350
2357
  if (row !== void 0) setSessionKey(rowKeyOf(row));
2351
2358
  };
2359
+ const sayStillStarting = (session) => {
2360
+ say(
2361
+ busy !== null ? `still starting \xB7 ${worktreeDisplayName(session)} \u2014 attaches when the workspace answers` : `still starting \xB7 ${worktreeDisplayName(session)} \u2014 enter attaches once the row reads running`
2362
+ );
2363
+ };
2352
2364
  const activate = () => {
2353
2365
  if (picker !== null) {
2354
2366
  const choice = pickerItems[pickerIndex];
@@ -2375,11 +2387,11 @@ attached \xB7 ${session.harness} \xB7 ${short} \xB7 detach: Ctrl+]
2375
2387
  return;
2376
2388
  }
2377
2389
  if (selectedRow?.kind === "worktree") {
2378
- const live = selectedRow.group.sessions.find(
2379
- (item2) => LIVE_STATUSES.has(item2.session.status)
2380
- );
2381
- if (live !== void 0) {
2382
- void attachFlow(live.session);
2390
+ const target2 = enterTargetOf(selectedRow.group.sessions.map((item2) => item2.session));
2391
+ if (target2.kind === "attach") {
2392
+ void attachFlow(target2.session);
2393
+ } else if (target2.kind === "wait") {
2394
+ sayStillStarting(target2.session);
2383
2395
  } else if (selectedRow.group.id !== null) {
2384
2396
  openPicker(null, selectedRow.group);
2385
2397
  }
@@ -2389,8 +2401,13 @@ attached \xB7 ${session.harness} \xB7 ${short} \xB7 detach: Ctrl+]
2389
2401
  if (item === null) return;
2390
2402
  if (isPendingId(item.session.id)) {
2391
2403
  say("still provisioning \u2014 the row fills in when the workspace answers");
2392
- } else if (LIVE_STATUSES.has(item.session.status)) {
2393
- void attachFlow(item.session);
2404
+ return;
2405
+ }
2406
+ const target = enterTargetOf([item.session]);
2407
+ if (target.kind === "attach") {
2408
+ void attachFlow(target.session);
2409
+ } else if (target.kind === "wait") {
2410
+ sayStillStarting(target.session);
2394
2411
  } else {
2395
2412
  openPicker(item.session);
2396
2413
  }