@haakco/hostingctl 1.0.701 → 1.0.706

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/dist/main.js CHANGED
@@ -34005,6 +34005,22 @@ function hostingEnvironmentStorageDestroy(options) {
34005
34005
  }));
34006
34006
  }
34007
34007
  /**
34008
+ * {@link /c/:company/hosting/environments/:environmentUuid/storage/journal}
34009
+ */
34010
+ function hostingEnvironmentsStorageJournal(options) {
34011
+ const { client: request = client, ...config } = options;
34012
+ return withUnwrap(request({
34013
+ method: "GET",
34014
+ url: "/c/{company}/hosting/environments/{environmentUuid}/storage/journal",
34015
+ security: [{
34016
+ type: "http",
34017
+ scheme: "bearer"
34018
+ }],
34019
+ ...config,
34020
+ throwOnError: config.throwOnError ?? true
34021
+ }));
34022
+ }
34023
+ /**
34008
34024
  * {@link /c/:company/hosting/environments/:environmentUuid/secret-connections}
34009
34025
  */
34010
34026
  function hostingExternalSecretIndex(options) {
@@ -51449,6 +51465,7 @@ function stated(flags, flag, usage) {
51449
51465
  var USAGE$24 = [
51450
51466
  "Usage: hostingctl environment create --company <slug> --name <name> [--slug <slug>] [--package <key>]",
51451
51467
  " hostingctl environment create --client <slug> --name <name> [--slug <slug>] [--package <key>]",
51468
+ " [--storage-classes <volume-type>=<class-uuid>[,<volume-type>=<class-uuid>...]]",
51452
51469
  " [--cpu-request <millicores> --cpu-limit <millicores> --memory-request <MiB> --memory-limit <MiB>",
51453
51470
  " --storage-limit <MiB>]",
51454
51471
  "",
@@ -51465,8 +51482,15 @@ var USAGE$24 = [
51465
51482
  "answer rather than a size this command picked.",
51466
51483
  "",
51467
51484
  "The package is one of the keys this environment's catalog offers; the platform chooses the placement,",
51468
- "so no cluster is sent or accepted."
51485
+ "so no cluster is sent or accepted.",
51486
+ "Initial storage classes are optional; each is reviewed and recorded before the environment's first reconcile."
51469
51487
  ].join("\n");
51488
+ var STORAGE_VOLUME_TYPES = [
51489
+ "application-files",
51490
+ "database-data",
51491
+ "redis-data"
51492
+ ];
51493
+ var UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
51470
51494
  /**
51471
51495
  * The flags this command reads, declared once and published by the group's metadata.
51472
51496
  *
@@ -51489,6 +51513,11 @@ var CREATE_FLAG_SPECS = [
51489
51513
  takesValue: true,
51490
51514
  description: "The platform package the environment is created from."
51491
51515
  },
51516
+ {
51517
+ name: "--storage-classes",
51518
+ takesValue: true,
51519
+ description: "Initial per-claim-type class choices, each written as `<volume-type>=<class-uuid>` and separated by commas."
51520
+ },
51492
51521
  {
51493
51522
  name: "--client",
51494
51523
  takesValue: true,
@@ -51506,15 +51535,40 @@ async function create$2(context, rest) {
51506
51535
  if (name === "") throw new UsageError(`create needs --name.\n\n${USAGE$24}`);
51507
51536
  const slug = slugFor(context.flags.get("--slug"), name, USAGE$24);
51508
51537
  const slice = sliceFor(context.flags, USAGE$24);
51538
+ const storageSelections = storageSelectionsFor(context.flags, USAGE$24);
51509
51539
  const scope = await scopeFor(context.flags);
51510
51540
  const chosen = chosenPackage(await catalogFor(scope), context.flags.get("--package")?.trim() ?? "");
51511
51541
  const body = {
51512
51542
  name,
51513
51543
  slug,
51514
51544
  resourceProfile: chosen.key,
51515
- ...slice === null ? {} : { budget: slice }
51516
- };
51517
- return await confirmableWrite(context, describeCreate$1(name, slug, chosen.key, scope, slice), async () => await sendCreate(scope, body));
51545
+ ...slice === null ? {} : { budget: slice },
51546
+ ...storageSelections === null ? {} : { storageSelections }
51547
+ };
51548
+ return await confirmableWrite(context, describeCreate$1(name, slug, chosen.key, scope, slice, storageSelections), async () => await sendCreate(scope, body));
51549
+ }
51550
+ /** Parse the optional initial per-role class choices before the command reads a catalog or sends a write. */
51551
+ function storageSelectionsFor(flags, usage) {
51552
+ if (!flags.has("--storage-classes")) return null;
51553
+ const value = flags.get("--storage-classes")?.trim() ?? "";
51554
+ if (value === "") throw new UsageError(`--storage-classes needs at least one type=uuid choice.\n\n${usage}`);
51555
+ const seen = /* @__PURE__ */ new Set();
51556
+ const selections = [];
51557
+ for (const entry of value.split(",")) {
51558
+ const separator = entry.indexOf("=");
51559
+ const volumeType = entry.slice(0, separator).trim();
51560
+ const storageClassUuid = entry.slice(separator + 1).trim();
51561
+ if (separator < 1 || entry.indexOf("=", separator + 1) !== -1) throw new UsageError(`Each --storage-classes choice must be <volume-type>=<class-uuid>.\n\n${usage}`);
51562
+ if (!STORAGE_VOLUME_TYPES.includes(volumeType)) throw new UsageError(`--storage-classes volume types are ${STORAGE_VOLUME_TYPES.join(", ")} (got ${volumeType}).\n\n${usage}`);
51563
+ if (seen.has(volumeType)) throw new UsageError(`--storage-classes names ${volumeType} more than once.\n\n${usage}`);
51564
+ if (!UUID_PATTERN.test(storageClassUuid)) throw new UsageError(`--storage-classes needs a UUID for ${volumeType}.\n\n${usage}`);
51565
+ seen.add(volumeType);
51566
+ selections.push({
51567
+ volumeType,
51568
+ storageClassUuid
51569
+ });
51570
+ }
51571
+ return selections;
51518
51572
  }
51519
51573
  /** Which company or client the create is for, from exactly one of `--company` and `--client`. */
51520
51574
  async function scopeFor(flags) {
@@ -51560,10 +51614,11 @@ async function sendCreate(scope, body) {
51560
51614
  * The addressee is named in every mode, so an operator who acted for a client sees that in the description and in
51561
51615
  * `--json`, rather than reading a receipt that could be their own company's.
51562
51616
  */
51563
- function describeCreate$1(name, slug, packageKey, scope, slice) {
51617
+ function describeCreate$1(name, slug, packageKey, scope, slice, storageSelections) {
51564
51618
  return [
51565
51619
  `Create environment "${name}" (${slug}) ${scope.mode === "client" ? `for client ${scope.client} through the platform route (this account holds no membership in it)` : `in company ${scope.company} through the company's own route`}, with the ${packageKey} package.`,
51566
51620
  ...slice === null ? [] : [describeSlice(slice)],
51621
+ ...storageSelections === null ? [] : [" Initial storage classes (recorded before the first reconcile):", ...storageSelections.map((one) => ` ${one.volumeType}: ${one.storageClassUuid}`)],
51567
51622
  " The platform chooses the placement from its own configuration: no cluster is sent or accepted, and",
51568
51623
  " the package supplies the purchase and the composition, not the cluster or the namespace."
51569
51624
  ].join("\n");
@@ -52358,6 +52413,7 @@ var ENVIRONMENT_SUBCOMMANDS = [
52358
52413
  "component-version",
52359
52414
  "references",
52360
52415
  "storage-usage",
52416
+ "storage-journal",
52361
52417
  "runtime-versions",
52362
52418
  "runtime-version-grants",
52363
52419
  "retention",
@@ -52410,6 +52466,7 @@ var ENVIRONMENT_SUBCOMMANDS = [
52410
52466
  var ENVIRONMENT_USAGE = [
52411
52467
  "Usage: hostingctl environment create --company <slug> --name <name> [--slug <slug>] [--package <key>]",
52412
52468
  " hostingctl environment create --client <slug> --name <name> [--slug <slug>] [--package <key>]",
52469
+ " [--storage-classes <volume-type>=<class-uuid>[,<volume-type>=<class-uuid>...]]",
52413
52470
  " [--cpu-request <millicores> --cpu-limit <millicores> --memory-request <MiB> --memory-limit <MiB>",
52414
52471
  " --storage-limit <MiB>]",
52415
52472
  " hostingctl environment show|profile <uuid> --company <slug>",
@@ -52426,6 +52483,7 @@ var ENVIRONMENT_USAGE = [
52426
52483
  " hostingctl environment component-version <uuid> <workload-uuid> <version> --company <slug>",
52427
52484
  " hostingctl environment references <uuid> --company <slug>",
52428
52485
  " hostingctl environment storage-usage <uuid> --company <slug>",
52486
+ " hostingctl environment storage-journal <uuid> --company <slug>",
52429
52487
  " hostingctl environment runtime-versions --company <slug>",
52430
52488
  " hostingctl environment setup --company <slug> --file <hosting.yaml> --confirm",
52431
52489
  " [--environment <uuid> | --name <name> [--slug <slug>] [--package <key>]]",
@@ -52462,6 +52520,9 @@ var ENVIRONMENT_USAGE = [
52462
52520
  " in `field`, and a credential field is marked rather than valued.",
52463
52521
  " storage-usage What each volume was allocated, what it has written and what room is left, from the",
52464
52522
  " platform's own reading; a volume it could not read says so instead of reporting zero.",
52523
+ " storage-journal The disposal rows this environment recorded: which claim was captured, how far its",
52524
+ " reclaim got, and the reason a pass refused to continue. Recorded rows only, never a",
52525
+ " live reading, and nothing in it makes a volume disposable.",
52465
52526
  " runtime-versions The version lines each application type offers, which of them may be chosen now, and why",
52466
52527
  " the others may not.",
52467
52528
  "",
@@ -54105,7 +54166,7 @@ var SETUP_USAGE = [
54105
54166
  "Usage: hostingctl environment setup --company <slug> --file <hosting.yaml> --confirm",
54106
54167
  " [--environment <uuid> | --name <name> [--slug <slug>] [--package <key>]",
54107
54168
  " [--cpu-request <millicores> --cpu-limit <millicores> --memory-request <MiB> --memory-limit <MiB>",
54108
- " --storage-limit <MiB>]]",
54169
+ " --storage-limit <MiB>] [--storage-classes <volume-type>=<class-uuid>[,...]]]",
54109
54170
  " [--source-dir <repository-root> | --source-archive <project.zip>] [--switch-mode]",
54110
54171
  " [--timeout <seconds>] [--dry-run]",
54111
54172
  "",
@@ -54118,6 +54179,8 @@ var SETUP_USAGE = [
54118
54179
  " --environment An existing environment to configure and serve. Otherwise --name creates one.",
54119
54180
  " --name The environment to create when it does not exist yet.",
54120
54181
  " --package The package a created environment is sized from; omitted, the API sizes it from the pool.",
54182
+ " --storage-classes Initial per-claim-type class choices, recorded before first reconcile when a new environment is",
54183
+ " created. The command refuses this option for an existing or adopted environment.",
54121
54184
  " --cpu-request/--cpu-limit The slice's CPU request and limit, in millicores, for an environment setup",
54122
54185
  " creates. They do not resize an environment it adopted.",
54123
54186
  " --memory-request/--memory-limit The slice's memory request and limit, in MiB.",
@@ -54153,10 +54216,16 @@ async function resolveEnvironment(context, company, existing, name) {
54153
54216
  created: false
54154
54217
  };
54155
54218
  const found = await findBySlug(company, slugFor(context.flags.get("--slug"), name ?? "", SETUP_USAGE));
54156
- if (found !== null) return {
54157
- environment: found,
54158
- created: false
54159
- };
54219
+ if (found !== null) {
54220
+ if (context.flags.has("--storage-classes")) throw new UsageError("--storage-classes applies only when setup creates a new environment; this slug already exists.");
54221
+ return {
54222
+ environment: (await hostingEnvironmentShow({ path: {
54223
+ company,
54224
+ environmentUuid: found.uuid
54225
+ } })).data,
54226
+ created: false
54227
+ };
54228
+ }
54160
54229
  const written = await create$2(context, []);
54161
54230
  if (!written.sent) throw new UsageError("The environment was not created; nothing else was sent.");
54162
54231
  return {
@@ -54180,10 +54249,7 @@ async function findBySlug(company, slug) {
54180
54249
  };
54181
54250
  }, "environments").then((paged) => paged.items.find((one) => one.slug === slug));
54182
54251
  if (listed === void 0) return null;
54183
- return (await hostingEnvironmentShow({ path: {
54184
- company,
54185
- environmentUuid: listed.uuid
54186
- } })).data;
54252
+ return listed;
54187
54253
  }
54188
54254
  /**
54189
54255
  * The document, applied — and only submitted, not waited for.
@@ -54368,6 +54434,59 @@ function environmentDomainText(report) {
54368
54434
  return redirects.length === 0 ? "This environment answers no redirects." : redirects.map((one) => ` ${one.sourceHostname.padEnd(36)} ${one.modeName.padEnd(10)} → ${one.destinationUrl ?? one.applicationLabel ?? "its application"} ${one.active ? "active" : one.pendingReason ?? "pending"}`).join("\n");
54369
54435
  }
54370
54436
  //#endregion
54437
+ //#region src/commands/environment-storage-journal.ts
54438
+ var STORAGE_JOURNAL_USAGE = [
54439
+ "Usage: hostingctl environment storage-journal <environment-uuid> --company <slug>",
54440
+ "",
54441
+ " storage-journal The disposal rows this environment recorded for its volumes: which claim was",
54442
+ " captured, how far its reclaim got, and the reason a pass refused to continue.",
54443
+ "",
54444
+ "Every field is a row the platform wrote down before it tried to destroy a volume, so this answers why storage is",
54445
+ "still held. It is not a live reading: the cluster's own retained-volume listing is `hosting:cluster-state`, and",
54446
+ "nothing here says a volume is disposable. A row whose pass recorded no refusal says so rather than guessing one."
54447
+ ].join("\n");
54448
+ /**
54449
+ * `environment storage-journal <uuid>`: why this environment's storage is still held, from its recorded rows.
54450
+ *
54451
+ * One read of the API's own projection of the disposal protocol's capture, so this command and the operator's
54452
+ * `diagnostics:status` cannot disagree about a blocked reclaim.
54453
+ */
54454
+ async function environmentStorageJournal(context, rest) {
54455
+ const [uuid, ...extra] = rest;
54456
+ if (uuid === void 0 || extra.length > 0) throw new UsageError(STORAGE_JOURNAL_USAGE);
54457
+ return {
54458
+ kind: "storage-journal",
54459
+ journal: (await hostingEnvironmentsStorageJournal({ path: {
54460
+ company: await requireCompany(context.flags),
54461
+ environmentUuid: uuid
54462
+ } })).data
54463
+ };
54464
+ }
54465
+ /** What the recorded rows add up to, in the terms a refusal is investigated in. */
54466
+ function recordedCounts(journal) {
54467
+ return `${String(journal.open)} open, ${String(journal.verifiedDeleted)} verified deleted`;
54468
+ }
54469
+ /** One recorded row: the claim, the stage it reached, the refusal it recorded and when it last changed. */
54470
+ function recordedRowText(row) {
54471
+ const refusal = row.blockedReason === null ? "no reason recorded" : `blocked: ${row.blockedReason}`;
54472
+ return ` ${row.claim} ${row.stage}, ${refusal}; recorded state changed ${row.stateChangedAt}`;
54473
+ }
54474
+ /**
54475
+ * The journal as a person reads it: the counts first, then one line per still-held claim.
54476
+ *
54477
+ * The closing line carries the boundary the payload's `evidence` states, so an operator cannot read these rows as
54478
+ * the cluster's current phase. A truncated list says so rather than looking like the whole backlog.
54479
+ */
54480
+ function storageJournalText(journal) {
54481
+ if (journal.claims.length === 0) return `${recordedCounts(journal)}: this environment records no captured backend still waiting to be reclaimed.`;
54482
+ return [
54483
+ `Storage journal for this environment (${recordedCounts(journal)}):`,
54484
+ ...journal.claims.map(recordedRowText),
54485
+ ...journal.truncated ? [" … more open rows than this list shows; the counts above are the recorded totals."] : [],
54486
+ "Recorded rows only: what the disposal protocol wrote down, never a live reading of any volume."
54487
+ ].join("\n");
54488
+ }
54489
+ //#endregion
54371
54490
  //#region src/commands/environment-tagged-text.ts
54372
54491
  /**
54373
54492
  * The renderer for a group-tagged answer.
@@ -54382,6 +54501,7 @@ function environmentTaggedText(report) {
54382
54501
  if (report.kind === "shared-runtime" || report.kind === "shared-app" || report.kind === "shared-write") return environmentSharedText(report);
54383
54502
  if (report.kind === "exports" || report.kind === "download" || report.kind === "bundle" || report.kind === "export-write") return environmentExportText(report);
54384
54503
  if (report.kind === "service-addition" || report.kind === "service-retirement" || report.kind === "service-write") return environmentServicesText(report);
54504
+ if (report.kind === "storage-journal") return storageJournalText(report.journal);
54385
54505
  return environmentAdminText(report);
54386
54506
  }
54387
54507
  //#endregion
@@ -54628,7 +54748,9 @@ async function setup(context, rest) {
54628
54748
  if (existing === null === (name === null)) throw new UsageError(`Name the environment to configure (--environment) or the one to create (--name).\n\n${SETUP_USAGE}`);
54629
54749
  if (context.flags.has("--wait")) throw new UsageError(`setup always waits for what it starts; --wait belongs to \`configuration apply\`.\n\n${SETUP_USAGE}`);
54630
54750
  const slice = sliceFor(context.flags, SETUP_USAGE);
54631
- const plan = setupPlan(name, existing, file, flag$1(context, "--source-dir"), flag$1(context, "--source-archive"), existing === null ? slice : null);
54751
+ const storageSelections = storageSelectionsFor(context.flags, SETUP_USAGE);
54752
+ if (existing !== null && storageSelections !== null) throw new UsageError(`--storage-classes applies only when setup creates a new environment.\n\n${SETUP_USAGE}`);
54753
+ const plan = setupPlan(name, existing, file, flag$1(context, "--source-dir"), flag$1(context, "--source-archive"), existing === null ? slice : null, storageSelections);
54632
54754
  if (context.flags.has("--dry-run")) return {
54633
54755
  kind: "environment-setup",
54634
54756
  outcome: "planned",
@@ -54676,12 +54798,17 @@ async function setup(context, rest) {
54676
54798
  }
54677
54799
  }
54678
54800
  /** The ordered statement of what this command will do, used by both `--dry-run` and the confirmation refusal. */
54679
- function setupPlan(name, existing, file, sourceDir, sourceArchive, slice) {
54801
+ function setupPlan(name, existing, file, sourceDir, sourceArchive, slice, storageSelections) {
54680
54802
  const environment = existing === null ? `create environment "${name ?? ""}" if it does not exist` : `use environment ${existing}`;
54681
54803
  return [
54682
54804
  `Set up the environment from ${file}:`,
54683
54805
  ` ${environment}`,
54684
54806
  ...slice === null ? [] : [describeSlice(slice)],
54807
+ ...storageSelections === null ? [] : [
54808
+ " Initial storage classes (used only if a new environment is created):",
54809
+ ...storageSelections.map((one) => ` ${one.volumeType}: ${one.storageClassUuid}`),
54810
+ " If this slug already exists, setup refuses before applying the document."
54811
+ ],
54685
54812
  " apply the document and wait for the platform to accept it",
54686
54813
  ` send source from ${sourceDir ?? sourceArchive ?? "no source named"}`,
54687
54814
  " build each application that builds from source, deploy its release and see it running",
@@ -61723,10 +61850,19 @@ var hostingCertificateIssuerEnumSchema = _enum([
61723
61850
  "letsencrypt-staging",
61724
61851
  "zerossl"
61725
61852
  ]);
61853
+ var hostingVolumeEnumSchema = _enum([
61854
+ "application-files",
61855
+ "database-data",
61856
+ "redis-data"
61857
+ ]);
61726
61858
  var hostingWorkloadServerModeEnumSchema = _enum(["shared", "dedicated"]).describe("Whether a workload's database server is shared with the rest of its engine, or bought for it alone. An environment runs ONE server per engine, and every database of that engine binds to it. That is the purchase's shape: one server's memory and CPU serve every application on the engine. A second same-engine server splits that purchase between two Pods that each must still clear the engine's own floor — measured on Home 2026-10-19, where such a split left an engine 512Mi and it was OOM-killed on every boot. A second server is therefore a **client capability request** and never a side effect of declaring a workload. `DEDICATED` is that request: the workload pays its own floor out of the environment's budget, and the reconciler binds the databases to it by name rather than by engine. `SHARED` is every workload that did not ask. This is a named mode rather than a boolean because the same field may grow a third value (for example a replica-bearing server) without reinterpreting two call sites.\n| |\n|---|\n| `shared` <br/> The environment's existing server for this engine serves this workload's databases. |\n| `dedicated` <br/> The client asked for a server of this engine for this workload alone. |");
61727
61859
  var createHostingEnvironmentRequestSchema = object({
61728
61860
  certificateIssuer: hostingCertificateIssuerEnumSchema.optional(),
61729
61861
  applicationLayout: _enum(["dedicated"]).optional().describe("How an environment's web applications are served. `DEDICATED` preserves existing environments and initial Node workload sets: one Pod per application, each with its own CPU and memory limits. Existing layouts never change merely because a new creation default is released. `SHARED_WORDPRESS` is plan 40's layout: one Apache/mod_php container serves every WordPress application in the environment, and each member keeps its own tree, Service, Ingress, certificate and database identity. The container carries the SUM of its members' limits. `SHARED_APPLICATIONS` is plan 48's layout and a superset of the WordPress case: one Pod holds the WordPress container AND one container per Moodle application, with the aggregate CPU/memory ceiling on the POD and no per-container limit, so WordPress may borrow capacity Moodle is not using and the reverse. It is a separate value rather than a reinterpretation of `SHARED_WORDPRESS`, because an environment that adopted WordPress sharing never consented to moving its Moodle applications into that Pod. `SHARED_ENVIRONMENT` is the new PHP environment default: web, cron, Redis and tools share one parent cap with requests-only containers. MariaDB remains separate. Component settings are persisted at creation or explicit adoption and read from PostgreSQL thereafter. `SHARED_PHP` is the shared environment with **one** PHP container instead of one container per PHP application: the same web, cron, Redis and tools Pod, but the Apache/PHP container serves every WordPress AND Moodle member as vhosts. N PHP applications then cost about one runtime's memory instead of N runtimes'. It is a value of its own rather than a change to `SHARED_APPLICATIONS` or `SHARED_ENVIRONMENT`, because an environment already composing those layouts keeps composing them exactly as before; a member joins the one container only in an environment that selected this. The stored value is this case's name, so a layout is a value the platform declares and validates rather than a branch keyed by a string somewhere.\n"),
61862
+ storageSelections: array(object({
61863
+ volumeType: hostingVolumeEnumSchema,
61864
+ storageClassUuid: uuid()
61865
+ })).max(3).refine((items) => new Set(items).size === items.length, { message: "Array entries must be unique" }).optional(),
61730
61866
  resourceProfile: _enum([
61731
61867
  "small_sites",
61732
61868
  "small_sites_2x",
@@ -61857,6 +61993,23 @@ var diagnosticsCheckDataSchema = object({
61857
61993
  status: string(),
61858
61994
  detail: string()
61859
61995
  });
61996
+ var diagnosticsClaimDisposalDataSchema = object({
61997
+ disposal: string().describe("The disposal row's own uuid, so a reason can be matched to its operational log line."),
61998
+ claim: string().describe("The claim whose backend this row captured, so several volumes in one environment stay distinguishable."),
61999
+ stage: string().describe("The furthest recorded stage: `captured`, `reclaim-requested` or `guard-observed`."),
62000
+ blockedReason: string().nullable().describe("The recorded `blocked_reason`: why the last pass would not progress, or null when it recorded none."),
62001
+ stateChangedAt: string().describe("When this row last changed. A repeated reason writes nothing, so a newer attempt changes no timestamp."),
62002
+ capturedAt: string(),
62003
+ reclaimRequestedAt: string().nullable(),
62004
+ reclaimGuardObservedAt: string().nullable()
62005
+ });
62006
+ object({
62007
+ open: int(),
62008
+ verifiedDeleted: int(),
62009
+ truncated: boolean(),
62010
+ evidence: string(),
62011
+ claims: array(diagnosticsClaimDisposalDataSchema)
62012
+ });
61860
62013
  var diagnosticsDoctorDataSchema = object({
61861
62014
  ok: boolean(),
61862
62015
  environment: string(),
@@ -65946,10 +66099,15 @@ object({
65946
66099
  pause: hostingUpdatePauseDataSchema,
65947
66100
  capabilities: hostingUpdateSurfaceCapabilitiesDataSchema
65948
66101
  });
65949
- var hostingVolumeEnumSchema = _enum([
65950
- "application-files",
65951
- "database-data",
65952
- "redis-data"
66102
+ var hostingVolumeMigrationPhaseEnumSchema = _enum([
66103
+ "review",
66104
+ "writers-hold",
66105
+ "destination",
66106
+ "copy",
66107
+ "quiesce",
66108
+ "promote",
66109
+ "verify",
66110
+ "done"
65953
66111
  ]);
65954
66112
  var impersonationSessionDataSchema = object({
65955
66113
  uuid: string(),
@@ -66877,6 +67035,38 @@ var stateManagerCallbackRefusalDataSchema = object({
66877
67035
  reason: string(),
66878
67036
  version: int()
66879
67037
  });
67038
+ var stateManagerHoldDataSchema = object({
67039
+ kind: _enum(["volume-migration", "application-recovery"]).describe("Closed transport vocabulary for the authoritative hold snapshot.\n").describe("Closed transport vocabulary for the authoritative hold snapshot.\n"),
67040
+ operationUuid: string(),
67041
+ phase: union([hostingRecoveryPhaseEnumSchema, hostingVolumeMigrationPhaseEnumSchema]),
67042
+ environmentUuid: string(),
67043
+ companySlug: string(),
67044
+ namespace: string(),
67045
+ claimNames: array(string()),
67046
+ heldSince: string().nullable()
67047
+ });
67048
+ var stateManagerHoldSnapshotReasonEnumSchema = _enum([
67049
+ "truncated",
67050
+ "read_failed",
67051
+ "claim_membership_unknown"
67052
+ ]).describe("Closed transport vocabulary for the authoritative hold snapshot.\n");
67053
+ object({
67054
+ version: int(),
67055
+ deployment: string(),
67056
+ cluster: string(),
67057
+ scope: string(),
67058
+ observedAt: string(),
67059
+ complete: boolean(),
67060
+ reason: union([stateManagerHoldSnapshotReasonEnumSchema, _null()]),
67061
+ limit: int(),
67062
+ holds: array(stateManagerHoldDataSchema)
67063
+ });
67064
+ var stateManagerHoldSnapshotRequestSchema = object({
67065
+ version: literal(1),
67066
+ deployment: string().max(64),
67067
+ cluster: string().max(64),
67068
+ scope: string().max(64)
67069
+ }).describe("The manager's hold-snapshot request.\n\nIt carries one target and nothing else: the deployment decides what that target\nauthorizes, so a caller cannot name a cluster, a company or an operation. The\nroute's machine-client middleware owns authorization; the resolver compares the\npresented target with the configured one before it reads anything.");
66880
67070
  object({
66881
67071
  ref: object({
66882
67072
  deployment: string(),
@@ -67191,6 +67381,10 @@ var storePlatformCompanyRequestSchema = object({
67191
67381
  var storePlatformHostingEnvironmentRequestSchema = object({
67192
67382
  certificateIssuer: hostingCertificateIssuerEnumSchema.optional(),
67193
67383
  applicationLayout: _enum(["dedicated"]).optional().describe("How an environment's web applications are served. `DEDICATED` preserves existing environments and initial Node workload sets: one Pod per application, each with its own CPU and memory limits. Existing layouts never change merely because a new creation default is released. `SHARED_WORDPRESS` is plan 40's layout: one Apache/mod_php container serves every WordPress application in the environment, and each member keeps its own tree, Service, Ingress, certificate and database identity. The container carries the SUM of its members' limits. `SHARED_APPLICATIONS` is plan 48's layout and a superset of the WordPress case: one Pod holds the WordPress container AND one container per Moodle application, with the aggregate CPU/memory ceiling on the POD and no per-container limit, so WordPress may borrow capacity Moodle is not using and the reverse. It is a separate value rather than a reinterpretation of `SHARED_WORDPRESS`, because an environment that adopted WordPress sharing never consented to moving its Moodle applications into that Pod. `SHARED_ENVIRONMENT` is the new PHP environment default: web, cron, Redis and tools share one parent cap with requests-only containers. MariaDB remains separate. Component settings are persisted at creation or explicit adoption and read from PostgreSQL thereafter. `SHARED_PHP` is the shared environment with **one** PHP container instead of one container per PHP application: the same web, cron, Redis and tools Pod, but the Apache/PHP container serves every WordPress AND Moodle member as vhosts. N PHP applications then cost about one runtime's memory instead of N runtimes'. It is a value of its own rather than a change to `SHARED_APPLICATIONS` or `SHARED_ENVIRONMENT`, because an environment already composing those layouts keeps composing them exactly as before; a member joins the one container only in an environment that selected this. The stored value is this case's name, so a layout is a value the platform declares and validates rather than a branch keyed by a string somewhere.\n"),
67384
+ storageSelections: array(object({
67385
+ volumeType: hostingVolumeEnumSchema,
67386
+ storageClassUuid: uuid()
67387
+ })).max(3).refine((items) => new Set(items).size === items.length, { message: "Array entries must be unique" }).optional(),
67194
67388
  resourceProfile: _enum([
67195
67389
  "small_sites",
67196
67390
  "small_sites_2x",
@@ -69372,6 +69566,11 @@ union([
69372
69566
  object({ message: string().describe("Error overview.") }),
69373
69567
  messageDataSchema
69374
69568
  ]);
69569
+ union([
69570
+ object({ message: string().describe("Error overview.") }),
69571
+ object({ message: string().describe("Error overview.") }),
69572
+ messageDataSchema
69573
+ ]);
69375
69574
  var hostingExternalSecretStoreStatus200Schema = hostingExternalSecretConnectionDataSchema;
69376
69575
  var hostingExternalSecretStoreStatus201Schema = hostingExternalSecretConnectionDataSchema;
69377
69576
  var hostingExternalSecretStoreStatus401Schema = object({ message: string().describe("Error overview.") });
@@ -69761,6 +69960,11 @@ union([
69761
69960
  })
69762
69961
  ]);
69763
69962
  storeHostingSeedPlacementRequestSchema.describe("Record one seed version's desired state on one cluster.\n\nA caller supplies the cluster, the per-placement execution mode and the smallest claim the storage\nclass can provision. Resource names and observed readiness are deliberately not accepted: those are\nwritten by construction and by a real observation, and never fabricated from a request.");
69963
+ union([
69964
+ unknown(),
69965
+ object({ message: string().describe("Error overview.").meta({ examples: [""] }) }),
69966
+ object({ message: string().describe("Error overview.").meta({ examples: [""] }) })
69967
+ ]);
69764
69968
  union([
69765
69969
  object({ message: string().describe("Error overview.") }),
69766
69970
  object({ message: string().describe("Error overview.") }),
@@ -71356,6 +71560,13 @@ union([
71356
71560
  ]);
71357
71561
  registrarSupersedeTransferRequestSchema.describe("Explicit consent to close the prior unknown transfer after fresh provider checks.");
71358
71562
  union([object({ message: string().describe("Error overview.") }), messageDataSchema]);
71563
+ union([
71564
+ stateManagerCallbackRefusalDataSchema,
71565
+ stateManagerCallbackRefusalDataSchema,
71566
+ stateManagerCallbackRefusalDataSchema,
71567
+ stateManagerCallbackRefusalDataSchema
71568
+ ]);
71569
+ stateManagerHoldSnapshotRequestSchema.describe("The manager's hold-snapshot request.\n\nIt carries one target and nothing else: the deployment decides what that target\nauthorizes, so a caller cannot name a cluster, a company or an operation. The\nroute's machine-client middleware owns authorization; the resolver compares the\npresented target with the configured one before it reads anything.");
71359
71570
  union([
71360
71571
  stateManagerCallbackRefusalDataSchema,
71361
71572
  stateManagerCallbackRefusalDataSchema,
@@ -71634,7 +71845,8 @@ var SIMPLE_SUBCOMMANDS = {
71634
71845
  database,
71635
71846
  "runtime-versions": environmentRuntimeVersions,
71636
71847
  "runtime-version-grants": environmentRuntimeVersionGrants,
71637
- storage: environmentStorage
71848
+ storage: environmentStorage,
71849
+ "storage-journal": environmentStorageJournal
71638
71850
  };
71639
71851
  /** Which feature group answers this subcommand and arguments, or null when the command itself does. */
71640
71852
  function dispatched(context, subcommand, rest) {
@@ -79960,7 +80172,7 @@ function writeUpdateState(state, env = process.env) {
79960
80172
  }
79961
80173
  //#endregion
79962
80174
  //#region src/version.ts
79963
- var VERSION = "1.0.701";
80175
+ var VERSION = "1.0.706";
79964
80176
  //#endregion
79965
80177
  //#region src/commands/update.ts
79966
80178
  /**
@@ -80035,7 +80247,7 @@ var update = {
80035
80247
  }, process.env);
80036
80248
  return {
80037
80249
  ...known,
80038
- current: after ?? "1.0.701",
80250
+ current: after ?? "1.0.706",
80039
80251
  latest: after ?? latest,
80040
80252
  upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
80041
80253
  action: "run",
@@ -80317,7 +80529,7 @@ async function printUpdateNotice(options) {
80317
80529
  }, env, { waitMs: NOTICE_LOCK_WAIT_MS });
80318
80530
  } catch {}
80319
80531
  if (latest === null) return;
80320
- if (!isNewerVersion(latest, "1.0.701")) return;
80532
+ if (!isNewerVersion(latest, "1.0.706")) return;
80321
80533
  process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
80322
80534
  }
80323
80535
  /** Whether an environment variable is set to something, which is how CI and the opt-out are read. */