orkestrator 2.22.3 → 2.23.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.
package/README.md CHANGED
@@ -146,5 +146,10 @@ fixture project/environment lifecycle through the installed client, confirms
146
146
  only one backend ran, and stops it. It needs network access, which is why it is
147
147
  a publish gate rather than part of `mise run test`.
148
148
 
149
+ The npm dist-tag follows the version's update channel: `2.23.0` publishes as
150
+ `latest`, `2.23.0-beta` as `beta` and `2.23.0-alpha` as `alpha`, so
151
+ `bunx orkestrator` only ever gets a stable release. Try a prerelease with
152
+ `bunx orkestrator@beta` or `bunx orkestrator@alpha`.
153
+
149
154
  `dist/client.js` is the client bundle the launcher imports first; it must stay
150
155
  free of backend imports so client commands never initialize a service.
package/dist/client.js CHANGED
@@ -6560,6 +6560,14 @@ var PUBLIC_ACTIONS = {
6560
6560
  milestone: "D",
6561
6561
  summary: "Read the host's Orkestrator version, its updater, the last check and the update job."
6562
6562
  },
6563
+ "host.update.channel": {
6564
+ version: 1,
6565
+ mutation: true,
6566
+ effects: ["metadata"],
6567
+ observation: "receipt",
6568
+ milestone: "D",
6569
+ summary: "Choose the host update channel and request a fresh check."
6570
+ },
6563
6571
  "host.update.check": {
6564
6572
  version: 1,
6565
6573
  mutation: true,
@@ -9559,6 +9567,36 @@ var environmentCommands = [
9559
9567
  ...settingsCommands("environment")
9560
9568
  ];
9561
9569
 
9570
+ // ../protocol/src/host-maintenance.ts
9571
+ var HOST_UPDATE_IDLE_WAIT = Object.freeze({
9572
+ defaultSeconds: 3600,
9573
+ minSeconds: 60,
9574
+ maxSeconds: 86400
9575
+ });
9576
+ var HOST_UPDATE_CHANNELS = ["stable", "beta", "unstable"];
9577
+ var HOST_UPDATE_CHANNEL_TAGS = Object.freeze({ stable: "latest", beta: "beta", unstable: "alpha" });
9578
+ function isHostUpdateChannel(value) {
9579
+ return HOST_UPDATE_CHANNELS.includes(value);
9580
+ }
9581
+ var ACTIVE_HOST_UPDATE_JOB_STATES = new Set([
9582
+ "requested",
9583
+ "downloading",
9584
+ "waiting-for-idle",
9585
+ "awaiting-restart",
9586
+ "restarting"
9587
+ ]);
9588
+ var CANCELLABLE_HOST_UPDATE_JOB_STATES = new Set([
9589
+ "requested",
9590
+ "downloading",
9591
+ "waiting-for-idle",
9592
+ "awaiting-restart"
9593
+ ]);
9594
+ var HOST_MAINTENANCE_LIMITS = Object.freeze({
9595
+ idMaxChars: 100,
9596
+ versionMaxChars: 64,
9597
+ errorMaxChars: 500
9598
+ });
9599
+
9562
9600
  // src/client/commands/host.ts
9563
9601
  var WAIT_OPTION = {
9564
9602
  name: "wait",
@@ -9567,7 +9605,7 @@ var WAIT_OPTION = {
9567
9605
  };
9568
9606
  function hostLines(host) {
9569
9607
  const updater = host.updater;
9570
- const lines = [`Version: ${host.version}`];
9608
+ const lines = [`Version: ${host.version}`, `Update channel: ${host.updateChannel}`];
9571
9609
  lines.push(updater.available ? `Updater: ${updater.kind}` : `Updater: unavailable${updater.reason ? ` (${updater.reason})` : ""}`);
9572
9610
  if (updater.checkedAt) {
9573
9611
  const found = updater.latestVersion ?? "unknown";
@@ -9697,6 +9735,26 @@ var hostCommands = [
9697
9735
  };
9698
9736
  }
9699
9737
  },
9738
+ {
9739
+ path: ["host", "update", "channel"],
9740
+ summary: "Choose the host's update channel: stable, beta or unstable.",
9741
+ positionals: [{ name: "channel", required: true, description: "stable, beta or unstable" }],
9742
+ options: [REQUEST_ID_OPTION],
9743
+ async run(context, parsed) {
9744
+ const channel = parsed.positionals.channel;
9745
+ if (!isHostUpdateChannel(channel))
9746
+ throw new CliError("invalid-input", "channel must be stable, beta or unstable");
9747
+ const { session, result, receipt, warnings } = await submit(context, "host.update.channel", { channel }, parsed.options);
9748
+ return {
9749
+ action: "host.update.channel",
9750
+ result,
9751
+ receipt,
9752
+ warnings,
9753
+ connection: session.identity,
9754
+ human: hostLines(result.host)
9755
+ };
9756
+ }
9757
+ },
9700
9758
  {
9701
9759
  path: ["host", "update", "check"],
9702
9760
  summary: "Ask the backend's computer to check for an Orkestrator update.",
@@ -9860,7 +9918,7 @@ import path7 from "path";
9860
9918
  // ../../apps/backend/package.json
9861
9919
  var package_default = {
9862
9920
  name: "@orkestrator/backend",
9863
- version: "2.22.3",
9921
+ version: "2.23.0",
9864
9922
  private: true,
9865
9923
  type: "module",
9866
9924
  exports: {