openmeld 0.3.211 → 0.3.213

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 (78) hide show
  1. package/dist/{add-me-membership-CNgO595N.js → add-me-membership-GbaxKxz-.js} +2 -2
  2. package/dist/{add-me-membership-CNgO595N.js.map → add-me-membership-GbaxKxz-.js.map} +1 -1
  3. package/dist/agents-BNoz9DA5.js +4153 -0
  4. package/dist/agents-BNoz9DA5.js.map +1 -0
  5. package/dist/{api-client-foundation-CtQTtA4m.js → api-client-foundation-TEBOwWl1.js} +1 -1
  6. package/dist/{api-client-foundation-MJK8vWfn.js → api-client-foundation-km8Ol1P4.js} +3 -3
  7. package/dist/{api-client-foundation-MJK8vWfn.js.map → api-client-foundation-km8Ol1P4.js.map} +1 -1
  8. package/dist/auth-session-D6UDl3r3.js +4 -0
  9. package/dist/{auth-session-CB7m-csh.js → auth-session-DgHvRt5i.js} +99 -21
  10. package/dist/auth-session-DgHvRt5i.js.map +1 -0
  11. package/dist/{command-oQK6PG6b.js → command-Dsa8gaFe.js} +10 -9
  12. package/dist/{command-oQK6PG6b.js.map → command-Dsa8gaFe.js.map} +1 -1
  13. package/dist/computer-connection-D8tX14R_.js +120 -0
  14. package/dist/computer-connection-D8tX14R_.js.map +1 -0
  15. package/dist/{computer-connection-review-CiIyTeDw.js → computer-connection-review-CjOXBWiV.js} +6 -6
  16. package/dist/{computer-connection-review-CiIyTeDw.js.map → computer-connection-review-CjOXBWiV.js.map} +1 -1
  17. package/dist/computer-disconnect-k6UVCsVF.js +47 -0
  18. package/dist/computer-disconnect-k6UVCsVF.js.map +1 -0
  19. package/dist/{computer-setup-continuation-CeFPluYv.js → computer-setup-continuation-DhY_sJis.js} +4 -4
  20. package/dist/{computer-setup-continuation-CeFPluYv.js.map → computer-setup-continuation-DhY_sJis.js.map} +1 -1
  21. package/dist/{control-plane-D9jDcbMZ.js → control-plane-Bpu7g9Av.js} +3 -547
  22. package/dist/control-plane-Bpu7g9Av.js.map +1 -0
  23. package/dist/{daemon-service-runtime-D8KrOfSV.js → daemon-service-runtime-CY6wdBe1.js} +381 -54
  24. package/dist/daemon-service-runtime-CY6wdBe1.js.map +1 -0
  25. package/dist/{openmeld-tools-update-coordinator-qrZLtDMv.js → daemon-service-update-coordinator-BcbbIDzC.js} +25953 -25662
  26. package/dist/daemon-service-update-coordinator-BcbbIDzC.js.map +1 -0
  27. package/dist/{dist-DajKOXDk.js → dist-Bsz_wafH.js} +1 -1
  28. package/dist/{dist-DtykdMlN.js → dist-CAx_kxvt.js} +971 -929
  29. package/dist/dist-CAx_kxvt.js.map +1 -0
  30. package/dist/{elapsed-time-BE9NPM-x.js → elapsed-time-Do3uIV__.js} +47 -78
  31. package/dist/elapsed-time-Do3uIV__.js.map +1 -0
  32. package/dist/{installation-inventory-CLBwkIf6.js → installation-inventory-C92AkQkA.js} +3 -3
  33. package/dist/{installation-inventory-CLBwkIf6.js.map → installation-inventory-C92AkQkA.js.map} +1 -1
  34. package/dist/local-components-B6SCXZf9.js +575 -0
  35. package/dist/local-components-B6SCXZf9.js.map +1 -0
  36. package/dist/{openmeld-LADiOJ3_.js → openmeld-I4pLxQsY.js} +55 -154
  37. package/dist/openmeld-I4pLxQsY.js.map +1 -0
  38. package/dist/{openmeld-maintenance-worker-B-u1CItK.js → openmeld-maintenance-worker-D5VAO9GD.js} +5 -5
  39. package/dist/{openmeld-maintenance-worker-B-u1CItK.js.map → openmeld-maintenance-worker-D5VAO9GD.js.map} +1 -1
  40. package/dist/openmeld-tools-update-join-DsQdgYNw.js +56 -0
  41. package/dist/openmeld-tools-update-join-DsQdgYNw.js.map +1 -0
  42. package/dist/openmeld-tools-update-process-frame-0X-t0Kjv.js +93 -0
  43. package/dist/openmeld-tools-update-process-frame-0X-t0Kjv.js.map +1 -0
  44. package/dist/openmeld-tools-update-process-frame-DX1Dc8VI.js +4 -0
  45. package/dist/openmeld.js +7 -3
  46. package/dist/openmeld.js.map +1 -1
  47. package/dist/{prepare-session-executor-B5aD6Fx_.js → prepare-session-executor-BEzlM0hJ.js} +171 -16
  48. package/dist/prepare-session-executor-BEzlM0hJ.js.map +1 -0
  49. package/dist/{runtime-transport-VcPSvVY1.js → runtime-transport-DxISZdzf.js} +34 -4
  50. package/dist/runtime-transport-DxISZdzf.js.map +1 -0
  51. package/dist/{agents-CGBELT4J.js → service-Cev-7yAJ.js} +703 -4620
  52. package/dist/service-Cev-7yAJ.js.map +1 -0
  53. package/dist/{service-account-authorization-D1Wp-91j.js → service-account-authorization-AbowIr6n.js} +3 -3
  54. package/dist/{service-account-authorization-D1Wp-91j.js.map → service-account-authorization-AbowIr6n.js.map} +1 -1
  55. package/dist/service-account-control-BV_tBiio.js +145 -0
  56. package/dist/service-account-control-BV_tBiio.js.map +1 -0
  57. package/dist/{service-control-capabilities-CP1XCSVm.js → service-control-capabilities-BGXPenm1.js} +1 -1
  58. package/dist/{service-control-capabilities-COkZ1Ceh.js → service-control-capabilities-DUudAKoj.js} +2 -2
  59. package/dist/{service-control-capabilities-COkZ1Ceh.js.map → service-control-capabilities-DUudAKoj.js.map} +1 -1
  60. package/dist/{upgrade-DJLqTfBA.js → upgrade-9h70HCQP.js} +40 -18
  61. package/dist/upgrade-9h70HCQP.js.map +1 -0
  62. package/dist/upgrade-CXgHeEKK.js +4 -0
  63. package/package.json +2 -2
  64. package/dist/agents-CGBELT4J.js.map +0 -1
  65. package/dist/auth-session-CB7m-csh.js.map +0 -1
  66. package/dist/auth-session-DXJq5arz.js +0 -4
  67. package/dist/computer-connection-51dg6Tq0.js +0 -54
  68. package/dist/computer-connection-51dg6Tq0.js.map +0 -1
  69. package/dist/control-plane-D9jDcbMZ.js.map +0 -1
  70. package/dist/daemon-service-runtime-D8KrOfSV.js.map +0 -1
  71. package/dist/dist-DtykdMlN.js.map +0 -1
  72. package/dist/elapsed-time-BE9NPM-x.js.map +0 -1
  73. package/dist/openmeld-LADiOJ3_.js.map +0 -1
  74. package/dist/openmeld-tools-update-coordinator-qrZLtDMv.js.map +0 -1
  75. package/dist/prepare-session-executor-B5aD6Fx_.js.map +0 -1
  76. package/dist/runtime-transport-VcPSvVY1.js.map +0 -1
  77. package/dist/upgrade-BMh_CLJL.js +0 -4
  78. package/dist/upgrade-DJLqTfBA.js.map +0 -1
@@ -2,7 +2,8 @@
2
2
 
3
3
  import { $ as openMeldBinDir, N as OPENMELD_HOME_ENV_KEY, a as isOpenMeldOrphanedLockError, d as runWithHeldLock, dt as resolveOpenMeldEnvPreset, et as openMeldManagedBinaryPath, ft as resolveOpenMeldRootDir, i as isOpenMeldLockError, it as openMeldVersionsDir, mt as resolveOpenMeldServiceScope, nt as openMeldManagedVersionDir, rt as openMeldRootDir, t as acquireLock, tt as openMeldManagedVersionBinaryPath, v as resolveCliContextId } from "./lock-Dxp6o_t_.js";
4
4
  import { n as cliBinaryManifestSchema, r as cliBinaryServiceReleaseSchema, t as cliBinaryDeltaPatchSchema } from "./cli-binary-manifest-DiUulkp0.js";
5
- import { R as openMeldToolsUpdateOperationPhaseSchema, V as openMeldToolsUpdateRequestSourceSchema, a as openMeldDaemonControlPlaneResponseSchema } from "./control-plane-D9jDcbMZ.js";
5
+ import { a as openMeldDaemonControlPlaneResponseSchema } from "./control-plane-Bpu7g9Av.js";
6
+ import { b as openMeldToolsUpdateOperationPhaseSchema, w as openMeldToolsUpdateRequestSourceSchema } from "./local-components-B6SCXZf9.js";
6
7
  import { t as daemonServiceContractSchema } from "./service-contract-CRyDcIIf.js";
7
8
  import { n as resolveOpenMeldDistribution, t as isBinaryDistribution } from "./distribution-DY2fBeSW.js";
8
9
  import { r as readDaemonRuntimeLease } from "./daemon-runtime-lease-Dd4hdHNo.js";
@@ -19,7 +20,7 @@ import * as z$1 from "zod/v4";
19
20
  import { constants } from "node:fs";
20
21
  import process$1 from "node:process";
21
22
  import { execFile, spawn } from "node:child_process";
22
- import { setTimeout } from "node:timers/promises";
23
+ import { setTimeout as setTimeout$1 } from "node:timers/promises";
23
24
  import { fileURLToPath } from "node:url";
24
25
  import { promisify } from "node:util";
25
26
  import { createConnection } from "node:net";
@@ -57,6 +58,8 @@ const daemonServiceUpdateJobBodySchema = z$1.strictObject({
57
58
  jobId: z$1.string().min(1),
58
59
  preparedBundle: daemonServiceUpdatePreparedBundleSchema,
59
60
  requestedAt: z$1.iso.datetime({ offset: true }),
61
+ targetCliVersion: z$1.string().min(1).optional(),
62
+ targetServiceVersion: z$1.string().min(1).optional(),
60
63
  targetVersion: z$1.string().min(1),
61
64
  updatedAt: z$1.iso.datetime({ offset: true }),
62
65
  urgency: z$1.enum(["available", "required"])
@@ -306,6 +309,7 @@ async function writeControlPlaneRequest(input) {
306
309
  socket.write(`${JSON.stringify(input.request)}\n`);
307
310
  };
308
311
  const handleData = (chunk) => {
312
+ if (!responseBuffer && chunk.trim().length === 0) return;
309
313
  responseBuffer += chunk;
310
314
  };
311
315
  const handleEnd = () => {
@@ -422,7 +426,30 @@ function verifyBytes(input) {
422
426
  //#endregion
423
427
  //#region ../../runtime/local-service/src/cli-binary-update-artifact.ts
424
428
  const HARDENED_RUNTIME_FLAG_RE = /flags=.*runtime/iu;
429
+ const RETRY_AFTER_SECONDS_RE = /^\d+$/u;
425
430
  const SIGNING_TIMESTAMP_RE = /^Timestamp=/mu;
431
+ const DEFAULT_CLI_BINARY_DOWNLOAD_POLICY = {
432
+ maxAttempts: 3,
433
+ retryDelaysMs: [500, 1500],
434
+ stallTimeoutMs: 6e4,
435
+ totalBudgetMs: 5 * 6e4
436
+ };
437
+ var CliBinaryUpdateError = class extends Error {
438
+ allowFullFallback;
439
+ code;
440
+ kind;
441
+ retryAfterMs;
442
+ retryable;
443
+ constructor(input) {
444
+ super(input.message, input.cause === void 0 ? void 0 : { cause: input.cause });
445
+ this.name = "CliBinaryUpdateError";
446
+ this.allowFullFallback = input.allowFullFallback;
447
+ this.code = `openmeld.tools.update.${input.kind}`;
448
+ this.kind = input.kind;
449
+ this.retryAfterMs = input.retryAfterMs;
450
+ this.retryable = input.retryable;
451
+ }
452
+ };
426
453
  async function resolveCliBinaryUpdatePlan(input) {
427
454
  const fullDownloadPlan = resolveFullCliBinaryUpdatePlan(input.release);
428
455
  const versionDeltas = input.release.deltas?.filter((candidate) => candidate.fromVersion === input.currentVersion);
@@ -445,62 +472,80 @@ async function resolveCliBinaryUpdatePlan(input) {
445
472
  };
446
473
  }
447
474
  async function downloadCliBinaryUpdateArtifact(input) {
475
+ const recovery = createDownloadRecoveryContext(input.downloadPolicy);
476
+ if (input.plan.transport === "delta" && input.downloadPolicy.maxAttempts < 2) return downloadFullCliBinaryArtifact({
477
+ ...input,
478
+ plan: resolveFullCliBinaryUpdatePlan(input.release),
479
+ recovery
480
+ });
448
481
  if (input.plan.transport === "delta") {
449
482
  try {
450
483
  return await downloadCliBinaryDelta({
451
484
  ...input,
485
+ attemptCeiling: Math.max(1, input.downloadPolicy.maxAttempts - 1),
452
486
  baseBytes: input.plan.baseBytes,
453
- delta: input.plan.delta
487
+ delta: input.plan.delta,
488
+ recovery
454
489
  });
455
490
  } catch (error) {
456
- input.onDeltaFallback(toError(error));
491
+ const resolvedError = toError(error);
492
+ if (resolvedError instanceof CliBinaryUpdateError && !resolvedError.allowFullFallback) throw resolvedError;
493
+ if (recovery.attemptsStarted >= input.downloadPolicy.maxAttempts) throw resolvedError;
494
+ input.onDeltaFallback(resolvedError);
495
+ await waitForRetryDelay({
496
+ cause: resolvedError,
497
+ deadlineAtMs: recovery.deadlineAtMs,
498
+ delayMs: resolvedError instanceof CliBinaryUpdateError ? resolvedError.retryAfterMs ?? 0 : 0
499
+ });
457
500
  }
458
501
  return downloadFullCliBinaryArtifact({
459
502
  ...input,
460
- plan: resolveFullCliBinaryUpdatePlan(input.release)
503
+ plan: resolveFullCliBinaryUpdatePlan(input.release),
504
+ recovery
461
505
  });
462
506
  }
463
507
  return downloadFullCliBinaryArtifact({
464
508
  ...input,
465
- plan: input.plan
509
+ plan: input.plan,
510
+ recovery
466
511
  });
467
512
  }
468
513
  async function verifyCliBinaryCodeSignature(input) {
469
514
  const { codeIdentifier, teamIdentifier } = input.release;
470
515
  if (!(codeIdentifier && teamIdentifier)) return;
471
- if (process.platform !== "darwin") throw new Error("signed OpenMeld CLI verification requires macOS");
516
+ if (process.platform !== "darwin") throw integrityError("signed OpenMeld CLI verification requires macOS");
472
517
  const verification = await input.runCommand("/usr/bin/codesign", [
473
518
  "--verify",
474
519
  "--strict",
475
520
  "--verbose=2",
476
521
  input.artifactPath
477
522
  ]);
478
- if (verification.code !== 0) throw new Error(`binary code signature verification failed: ${commandFailureDetails(verification)}`);
523
+ if (verification.code !== 0) throw integrityError(`binary code signature verification failed: ${commandFailureDetails(verification)}`);
479
524
  const inspection = await input.runCommand("/usr/bin/codesign", [
480
525
  "--display",
481
526
  "--verbose=4",
482
527
  input.artifactPath
483
528
  ]);
484
- if (inspection.code !== 0) throw new Error(`binary code signature inspection failed: ${commandFailureDetails(inspection)}`);
529
+ if (inspection.code !== 0) throw integrityError(`binary code signature inspection failed: ${commandFailureDetails(inspection)}`);
485
530
  const details = `${inspection.stdout}\n${inspection.stderr}`;
486
531
  for (const expected of [
487
532
  `Identifier=${codeIdentifier}`,
488
533
  `TeamIdentifier=${teamIdentifier}`,
489
534
  "Authority=Developer ID Application:"
490
- ]) if (!details.includes(expected)) throw new Error(`binary code signature is missing expected identity: ${expected}`);
491
- if (!HARDENED_RUNTIME_FLAG_RE.test(details)) throw new Error("binary code signature is missing the hardened runtime");
492
- if (!SIGNING_TIMESTAMP_RE.test(details)) throw new Error("binary code signature is missing a trusted timestamp");
535
+ ]) if (!details.includes(expected)) throw integrityError(`binary code signature is missing expected identity: ${expected}`);
536
+ if (!HARDENED_RUNTIME_FLAG_RE.test(details)) throw integrityError("binary code signature is missing the hardened runtime");
537
+ if (!SIGNING_TIMESTAMP_RE.test(details)) throw integrityError("binary code signature is missing a trusted timestamp");
493
538
  }
494
539
  async function downloadCliBinaryDelta(input) {
495
- const response = await input.fetchImpl(input.delta.patchUrl, {
496
- method: "GET",
497
- signal: AbortSignal.timeout(input.downloadTimeoutMs)
540
+ const patchBytes = await downloadBinaryBytesWithRecovery({
541
+ attemptCeiling: input.attemptCeiling,
542
+ expectedSizeBytes: input.delta.patchSizeBytes,
543
+ fetchImpl: input.fetchImpl,
544
+ label: "binary delta archive",
545
+ onProgress: input.onProgress,
546
+ recovery: input.recovery,
547
+ url: input.delta.patchUrl
498
548
  });
499
- if (!response.ok) {
500
- const body = await response.text().catch(() => "");
501
- throw new Error(`binary delta download failed: HTTP ${response.status}${body ? `: ${body}` : ""}`);
502
- }
503
- const patchBytes = Buffer.from(await response.arrayBuffer());
504
549
  verifyBinaryBytes({
505
550
  bytes: patchBytes,
506
551
  expectedSha256: input.delta.patchSha256,
@@ -511,16 +556,20 @@ async function downloadCliBinaryDelta(input) {
511
556
  try {
512
557
  patchPayloadBytes = gunzipSync(patchBytes, { maxOutputLength: input.delta.patchPayloadSizeBytes });
513
558
  } catch (error) {
514
- throw new Error(`binary delta could not be decompressed: ${toError(error).message}`);
559
+ throw integrityError(`binary delta could not be decompressed: ${toError(error).message}`, error);
560
+ }
561
+ if (patchPayloadBytes.byteLength !== input.delta.patchPayloadSizeBytes) throw integrityError(`binary delta payload size mismatch: expected ${input.delta.patchPayloadSizeBytes} bytes, received ${patchPayloadBytes.byteLength} bytes`);
562
+ try {
563
+ return reconstructCliBinaryDelta({
564
+ baseBytes: input.baseBytes,
565
+ delta: input.delta,
566
+ patchPayloadBytes,
567
+ targetSha256: input.release.sha256,
568
+ targetSizeBytes: input.release.sizeBytes
569
+ });
570
+ } catch (error) {
571
+ throw integrityError(`binary delta reconstruction failed: ${toError(error).message}`, error);
515
572
  }
516
- if (patchPayloadBytes.byteLength !== input.delta.patchPayloadSizeBytes) throw new Error(`binary delta payload size mismatch: expected ${input.delta.patchPayloadSizeBytes} bytes, received ${patchPayloadBytes.byteLength} bytes`);
517
- return reconstructCliBinaryDelta({
518
- baseBytes: input.baseBytes,
519
- delta: input.delta,
520
- patchPayloadBytes,
521
- targetSha256: input.release.sha256,
522
- targetSizeBytes: input.release.sizeBytes
523
- });
524
573
  }
525
574
  function resolveFullCliBinaryUpdatePlan(release) {
526
575
  if (hasCompressedCliBinaryTransport(release)) return {
@@ -537,15 +586,14 @@ function resolveFullCliBinaryUpdatePlan(release) {
537
586
  };
538
587
  }
539
588
  async function downloadFullCliBinaryArtifact(input) {
540
- const response = await input.fetchImpl(input.plan.downloadUrl, {
541
- method: "GET",
542
- signal: AbortSignal.timeout(input.downloadTimeoutMs)
589
+ const downloadBytes = await downloadBinaryBytesWithRecovery({
590
+ expectedSizeBytes: input.plan.downloadSizeBytes,
591
+ fetchImpl: input.fetchImpl,
592
+ label: input.plan.transport === "archive" ? "binary archive" : "binary download",
593
+ onProgress: input.onProgress,
594
+ recovery: input.recovery,
595
+ url: input.plan.downloadUrl
543
596
  });
544
- if (!response.ok) {
545
- const body = await response.text().catch(() => "");
546
- throw new Error(`binary download failed: HTTP ${response.status}${body ? `: ${body}` : ""}`);
547
- }
548
- const downloadBytes = Buffer.from(await response.arrayBuffer());
549
597
  verifyBinaryBytes({
550
598
  bytes: downloadBytes,
551
599
  expectedSha256: input.plan.downloadSha256,
@@ -556,7 +604,7 @@ async function downloadFullCliBinaryArtifact(input) {
556
604
  if (input.plan.transport === "archive") try {
557
605
  artifactBytes = gunzipSync(downloadBytes, { maxOutputLength: input.release.sizeBytes });
558
606
  } catch (error) {
559
- throw new Error(`binary archive could not be decompressed: ${toError(error).message}`);
607
+ throw integrityError(`binary archive could not be decompressed: ${toError(error).message}`, error);
560
608
  }
561
609
  verifyBinaryBytes({
562
610
  bytes: artifactBytes,
@@ -570,9 +618,222 @@ function hasCompressedCliBinaryTransport(release) {
570
618
  return release.archiveFormat === "gzip" && typeof release.archiveUrl === "string" && typeof release.archiveSha256 === "string" && typeof release.archiveSizeBytes === "number";
571
619
  }
572
620
  function verifyBinaryBytes(input) {
573
- if (input.bytes.byteLength !== input.expectedSizeBytes) throw new Error(`${input.label} size mismatch: expected ${input.expectedSizeBytes} bytes, received ${input.bytes.byteLength} bytes`);
621
+ if (input.bytes.byteLength !== input.expectedSizeBytes) throw integrityError(`${input.label} size mismatch: expected ${input.expectedSizeBytes} bytes, received ${input.bytes.byteLength} bytes`);
574
622
  const actualSha256 = createHash("sha256").update(input.bytes).digest("hex");
575
- if (actualSha256 !== input.expectedSha256.toLowerCase()) throw new Error(`${input.label} sha256 mismatch: expected ${input.expectedSha256.toLowerCase()}, received ${actualSha256}`);
623
+ if (actualSha256 !== input.expectedSha256.toLowerCase()) throw integrityError(`${input.label} sha256 mismatch: expected ${input.expectedSha256.toLowerCase()}, received ${actualSha256}`);
624
+ }
625
+ function createDownloadRecoveryContext(policy) {
626
+ if (!Number.isInteger(policy.maxAttempts) || policy.maxAttempts < 1 || !Number.isFinite(policy.stallTimeoutMs) || policy.stallTimeoutMs <= 0 || !Number.isFinite(policy.totalBudgetMs) || policy.totalBudgetMs <= 0 || policy.retryDelaysMs.some((delayMs) => !Number.isFinite(delayMs) || delayMs < 0)) throw new Error("CLI binary download policy is invalid.");
627
+ return {
628
+ attemptsStarted: 0,
629
+ deadlineAtMs: performance.now() + policy.totalBudgetMs,
630
+ policy
631
+ };
632
+ }
633
+ async function downloadBinaryBytesWithRecovery(input) {
634
+ let lastError = null;
635
+ const attemptCeiling = Math.min(input.attemptCeiling ?? input.recovery.policy.maxAttempts, input.recovery.policy.maxAttempts);
636
+ while (input.recovery.attemptsStarted < attemptCeiling) {
637
+ if (performance.now() >= input.recovery.deadlineAtMs) throw totalBudgetError(lastError ?? void 0);
638
+ const attemptIndex = input.recovery.attemptsStarted;
639
+ input.recovery.attemptsStarted += 1;
640
+ try {
641
+ return await downloadBinaryBytesAttempt(input);
642
+ } catch (error) {
643
+ const resolved = normalizeDownloadError(error, input.label);
644
+ lastError = resolved;
645
+ if (!resolved.retryable) throw resolved;
646
+ if (input.recovery.attemptsStarted >= attemptCeiling) throw resolved;
647
+ const delayMs = input.recovery.policy.retryDelaysMs[attemptIndex] ?? input.recovery.policy.retryDelaysMs.at(-1) ?? 0;
648
+ await waitForRetryDelay({
649
+ cause: resolved,
650
+ deadlineAtMs: input.recovery.deadlineAtMs,
651
+ delayMs: Math.max(delayMs, resolved.retryAfterMs ?? 0)
652
+ });
653
+ }
654
+ }
655
+ throw lastError ?? totalBudgetError();
656
+ }
657
+ async function downloadBinaryBytesAttempt(input) {
658
+ const controller = new AbortController();
659
+ let reader = null;
660
+ let lastProgressAtMs = performance.now();
661
+ try {
662
+ const response = await waitForDownloadProgress(input.fetchImpl(input.url, {
663
+ method: "GET",
664
+ signal: controller.signal
665
+ }), {
666
+ controller,
667
+ lastProgressAtMs,
668
+ recovery: input.recovery
669
+ });
670
+ if (!response.ok) {
671
+ cancelReadableStream(response.body);
672
+ throw httpDownloadError({
673
+ label: input.label,
674
+ retryAfter: response.headers.get("retry-after"),
675
+ status: response.status,
676
+ statusText: response.statusText
677
+ });
678
+ }
679
+ if (!response.body) return Buffer.alloc(0);
680
+ reader = response.body.getReader();
681
+ const chunks = [];
682
+ let receivedBytes = 0;
683
+ input.onProgress?.({
684
+ receivedBytes,
685
+ totalBytes: input.expectedSizeBytes,
686
+ transferAttempt: input.recovery.attemptsStarted
687
+ });
688
+ while (true) {
689
+ const next = await waitForDownloadProgress(reader.read(), {
690
+ controller,
691
+ lastProgressAtMs,
692
+ recovery: input.recovery
693
+ });
694
+ if (next.done) return Buffer.concat(chunks, receivedBytes);
695
+ if (!next.value || next.value.byteLength === 0) continue;
696
+ lastProgressAtMs = performance.now();
697
+ receivedBytes += next.value.byteLength;
698
+ if (receivedBytes > input.expectedSizeBytes) throw integrityError(`${input.label} size exceeded the declared ${input.expectedSizeBytes} bytes while downloading`);
699
+ input.onProgress?.({
700
+ receivedBytes,
701
+ totalBytes: input.expectedSizeBytes,
702
+ transferAttempt: input.recovery.attemptsStarted
703
+ });
704
+ chunks.push(Buffer.from(next.value));
705
+ }
706
+ } catch (error) {
707
+ controller.abort(error);
708
+ if (reader) cancelReadableStreamReader(reader);
709
+ throw error;
710
+ } finally {
711
+ reader?.releaseLock();
712
+ }
713
+ }
714
+ async function waitForDownloadProgress(pending, input) {
715
+ const stallDeadlineAtMs = input.lastProgressAtMs + input.recovery.policy.stallTimeoutMs;
716
+ const totalDeadlineWins = input.recovery.deadlineAtMs <= stallDeadlineAtMs;
717
+ const deadlineAtMs = Math.min(stallDeadlineAtMs, input.recovery.deadlineAtMs);
718
+ const timeoutMs = Math.max(0, deadlineAtMs - performance.now());
719
+ let timer = null;
720
+ const timeout = new Promise((_resolve, reject) => {
721
+ timer = setTimeout(() => {
722
+ const error = totalDeadlineWins ? totalBudgetError() : stalledError();
723
+ reject(error);
724
+ input.controller.abort(error);
725
+ }, timeoutMs);
726
+ });
727
+ try {
728
+ return await Promise.race([pending, timeout]);
729
+ } finally {
730
+ if (timer) clearTimeout(timer);
731
+ }
732
+ }
733
+ async function waitForRetryDelay(input) {
734
+ if (input.delayMs === 0) return;
735
+ if (input.deadlineAtMs - performance.now() <= input.delayMs) throw totalBudgetError(input.cause);
736
+ await new Promise((resolve) => setTimeout(resolve, input.delayMs));
737
+ }
738
+ function normalizeDownloadError(error, label) {
739
+ if (error instanceof CliBinaryUpdateError) return error;
740
+ const resolved = toError(error);
741
+ const terminalTlsFailure = findErrorCode(error, isTerminalTlsErrorCode);
742
+ if (terminalTlsFailure || isTerminalTlsErrorMessage(resolved.message)) return new CliBinaryUpdateError({
743
+ allowFullFallback: false,
744
+ cause: error,
745
+ kind: "download_failed",
746
+ message: `${label} download failed TLS certificate verification${terminalTlsFailure ? ` (${terminalTlsFailure})` : ""}`,
747
+ retryable: false
748
+ });
749
+ const retryable = Boolean(findErrorCode(error, isRetryableNetworkErrorCode));
750
+ return new CliBinaryUpdateError({
751
+ allowFullFallback: true,
752
+ cause: error,
753
+ kind: "download_failed",
754
+ message: `${label} download failed: ${resolved.message}`,
755
+ retryable
756
+ });
757
+ }
758
+ function httpDownloadError(input) {
759
+ const retryable = input.status === 408 || input.status === 429 || input.status === 500 || input.status === 502 || input.status === 503 || input.status === 504;
760
+ const missingDelta = input.status === 404 || input.status === 410;
761
+ const retryAfterMs = input.retryAfter ? parseRetryAfterMs(input.retryAfter) : void 0;
762
+ return new CliBinaryUpdateError({
763
+ allowFullFallback: retryable || missingDelta,
764
+ kind: "download_failed",
765
+ message: `${input.label} download failed: HTTP ${input.status}${input.statusText ? ` ${input.statusText}` : ""}`,
766
+ ...retryAfterMs === void 0 ? {} : { retryAfterMs },
767
+ retryable
768
+ });
769
+ }
770
+ function parseRetryAfterMs(value) {
771
+ const trimmed = value.trim();
772
+ if (RETRY_AFTER_SECONDS_RE.test(trimmed)) {
773
+ const milliseconds = Number(trimmed) * 1e3;
774
+ return Number.isSafeInteger(milliseconds) ? milliseconds : void 0;
775
+ }
776
+ const retryAtMs = Date.parse(trimmed);
777
+ if (!Number.isFinite(retryAtMs)) return;
778
+ return Math.max(0, retryAtMs - Date.now());
779
+ }
780
+ function stalledError() {
781
+ return new CliBinaryUpdateError({
782
+ allowFullFallback: true,
783
+ kind: "download_stalled",
784
+ message: "binary download stopped making progress",
785
+ retryable: true
786
+ });
787
+ }
788
+ function totalBudgetError(cause) {
789
+ return new CliBinaryUpdateError({
790
+ allowFullFallback: false,
791
+ ...cause === void 0 ? {} : { cause },
792
+ kind: "download_timed_out",
793
+ message: "binary download exceeded the total recovery time budget",
794
+ retryable: false
795
+ });
796
+ }
797
+ function integrityError(message, cause) {
798
+ return new CliBinaryUpdateError({
799
+ allowFullFallback: true,
800
+ ...cause === void 0 ? {} : { cause },
801
+ kind: "integrity_check_failed",
802
+ message,
803
+ retryable: false
804
+ });
805
+ }
806
+ function findErrorCode(error, predicate) {
807
+ const seen = /* @__PURE__ */ new Set();
808
+ let current = error;
809
+ while (current && typeof current === "object" && !seen.has(current)) {
810
+ seen.add(current);
811
+ const code = current.code;
812
+ if (typeof code === "string" && predicate(code.toUpperCase())) return code;
813
+ current = current.cause;
814
+ }
815
+ return null;
816
+ }
817
+ function cancelReadableStream(stream) {
818
+ if (!stream) return;
819
+ try {
820
+ stream.cancel().catch(() => void 0);
821
+ } catch {}
822
+ }
823
+ function cancelReadableStreamReader(reader) {
824
+ try {
825
+ reader.cancel().catch(() => void 0);
826
+ } catch {}
827
+ }
828
+ function isTerminalTlsErrorCode(code) {
829
+ return code.startsWith("CERT_") || code.includes("_CERT_") || code.startsWith("ERR_OSSL_") || code.startsWith("ERR_SSL_") || code.startsWith("ERR_TLS_") || code === "DEPTH_ZERO_SELF_SIGNED_CERT" || code === "SELF_SIGNED_CERT_IN_CHAIN" || code.startsWith("UNABLE_TO_GET_ISSUER_CERT") || code === "UNABLE_TO_VERIFY_LEAF_SIGNATURE";
830
+ }
831
+ function isTerminalTlsErrorMessage(message) {
832
+ const normalized = message.toLowerCase();
833
+ return normalized.includes("certificate") || normalized.includes("self signed") || normalized.includes("tls handshake") || normalized.includes("unable to verify");
834
+ }
835
+ function isRetryableNetworkErrorCode(code) {
836
+ return code === "EAI_AGAIN" || code === "ECONNABORTED" || code === "ECONNREFUSED" || code === "ECONNRESET" || code === "EHOSTUNREACH" || code === "ENETDOWN" || code === "ENETUNREACH" || code === "ENOTFOUND" || code === "EPIPE" || code === "ETIMEDOUT" || code === "UND_ERR_BODY_TIMEOUT" || code === "UND_ERR_CONNECT_TIMEOUT" || code === "UND_ERR_HEADERS_TIMEOUT" || code === "UND_ERR_RES_CONTENT_LENGTH_MISMATCH" || code === "UND_ERR_SOCKET";
576
837
  }
577
838
  function commandFailureDetails(result) {
578
839
  return result.stderr.trim() || result.stdout.trim() || `exit ${result.code}`;
@@ -701,8 +962,8 @@ function getErrorCode$2(error) {
701
962
  var package_default = {
702
963
  $schema: "https://www.schemastore.org/package.json",
703
964
  name: "openmeld",
704
- version: "0.3.211",
705
- openMeldReleaseDate: "2026-09-16",
965
+ version: "0.3.213",
966
+ openMeldReleaseDate: "2026-09-18",
706
967
  description: "OpenMeld CLI - https://openmeld.ai",
707
968
  license: "MIT",
708
969
  type: "module",
@@ -1059,6 +1320,7 @@ function toErrorMessage(error) {
1059
1320
  }
1060
1321
  //#endregion
1061
1322
  //#region src/local-service/lifecycle/daemon-service-update-state.ts
1323
+ const UPDATE_TARGETS_FILE = "service-update-targets.json";
1062
1324
  const DAEMON_SERVICE_UPDATE_JOB_SCHEMA = OPENMELD_DAEMON_SERVICE_UPDATE_JOB_SCHEMA;
1063
1325
  function daemonServicePendingUpdatePath(pathInput = {}) {
1064
1326
  return join(daemonRuntimeStateRootPath(pathInput), "service-update.json");
@@ -1097,14 +1359,23 @@ async function readDaemonServiceUpdateJob(path) {
1097
1359
  if (raw === null) return null;
1098
1360
  const parsed = storedDaemonServiceUpdateJobSchema.safeParse(JSON.parse(raw));
1099
1361
  if (!parsed.success) throw new Error("OpenMeld Service update state is invalid.");
1100
- if (parsed.data.v === 2) return parsed.data;
1101
- const { status, ...legacyJob } = parsed.data;
1362
+ let job;
1363
+ if (parsed.data.v === 2) job = parsed.data;
1364
+ else {
1365
+ const { status, ...legacyJob } = parsed.data;
1366
+ job = daemonServiceUpdateJobSchema.parse({
1367
+ ...legacyJob,
1368
+ v: 2,
1369
+ schema: DAEMON_SERVICE_UPDATE_JOB_SCHEMA,
1370
+ phase: migrateLegacyPhase(status),
1371
+ requestSource: "cli"
1372
+ });
1373
+ }
1374
+ const targets = await readDaemonServiceUpdateTargets(dirname(path));
1375
+ if (targets?.jobId !== job.jobId) return job;
1102
1376
  return daemonServiceUpdateJobSchema.parse({
1103
- ...legacyJob,
1104
- v: 2,
1105
- schema: DAEMON_SERVICE_UPDATE_JOB_SCHEMA,
1106
- phase: migrateLegacyPhase(status),
1107
- requestSource: "cli"
1377
+ ...job,
1378
+ ...targets
1108
1379
  });
1109
1380
  }
1110
1381
  function migrateLegacyPhase(status) {
@@ -1117,14 +1388,50 @@ function migrateLegacyPhase(status) {
1117
1388
  }
1118
1389
  }
1119
1390
  async function writeUpdateJobAtomically(input) {
1391
+ const { targetCliVersion, targetServiceVersion, ...compatibleJob } = input.job;
1392
+ await writeDaemonServiceUpdateTargets(dirname(input.path), {
1393
+ jobId: input.job.jobId,
1394
+ ...targetCliVersion ? { targetCliVersion } : {},
1395
+ ...targetServiceVersion ? { targetServiceVersion } : {}
1396
+ });
1120
1397
  const temporaryPath = `${input.path}.${String(process.pid)}.tmp`;
1121
1398
  await mkdir(dirname(input.path), { recursive: true });
1122
- await writeFile(temporaryPath, `${JSON.stringify(input.job, null, 2)}\n`, {
1399
+ await writeFile(temporaryPath, `${JSON.stringify(compatibleJob, null, 2)}\n`, {
1123
1400
  encoding: "utf8",
1124
1401
  mode: 384
1125
1402
  });
1126
1403
  await rename(temporaryPath, input.path);
1127
1404
  }
1405
+ async function readDaemonServiceUpdateTargets(stateRoot) {
1406
+ const raw = await readFile(join(stateRoot, UPDATE_TARGETS_FILE), "utf8").catch((error) => {
1407
+ if (error.code === "ENOENT") return null;
1408
+ throw error;
1409
+ });
1410
+ if (raw === null) return null;
1411
+ const value = JSON.parse(raw);
1412
+ const jobId = normalizeTarget(value.jobId);
1413
+ const targetCliVersion = normalizeTarget(value.targetCliVersion);
1414
+ const targetServiceVersion = normalizeTarget(value.targetServiceVersion);
1415
+ if (!jobId) return null;
1416
+ return {
1417
+ jobId,
1418
+ ...targetCliVersion ? { targetCliVersion } : {},
1419
+ ...targetServiceVersion ? { targetServiceVersion } : {}
1420
+ };
1421
+ }
1422
+ async function writeDaemonServiceUpdateTargets(stateRoot, targets) {
1423
+ const path = join(stateRoot, UPDATE_TARGETS_FILE);
1424
+ const temporaryPath = `${path}.${String(process.pid)}.tmp`;
1425
+ await mkdir(stateRoot, { recursive: true });
1426
+ await writeFile(temporaryPath, `${JSON.stringify(targets, null, 2)}\n`, {
1427
+ encoding: "utf8",
1428
+ mode: 384
1429
+ });
1430
+ await rename(temporaryPath, path);
1431
+ }
1432
+ function normalizeTarget(value) {
1433
+ return typeof value === "string" && value.trim() ? value.trim() : null;
1434
+ }
1128
1435
  //#endregion
1129
1436
  //#region src/runtime/version.ts
1130
1437
  /**
@@ -1242,7 +1549,7 @@ async function withManagedInstallTransaction(run, pathInput = {}) {
1242
1549
  });
1243
1550
  } catch (error) {
1244
1551
  if (!isOpenMeldLockError(error) || isOpenMeldOrphanedLockError(error) || Date.now() - startedAtMs >= MANAGED_INSTALL_LOCK_TIMEOUT_MS) throw error;
1245
- await setTimeout(MANAGED_INSTALL_LOCK_RETRY_DELAY_MS);
1552
+ await setTimeout$1(MANAGED_INSTALL_LOCK_RETRY_DELAY_MS);
1246
1553
  }
1247
1554
  }
1248
1555
  /**
@@ -1875,6 +2182,10 @@ async function prepareNodeDaemonServiceBundle(input) {
1875
2182
  const sourceProvenance = await resolveDaemonBundleSourceProvenance(input.cliScriptPath);
1876
2183
  if (!isDaemonBundleSourceAllowedForLane({ sourceKind: sourceProvenance.sourceKind })) throw new Error("OpenMeld Service cannot use repo-local workspace service files in this lane. Repo-local service files are only allowed through `openmeld-dev`.");
1877
2184
  const { sourceEntryScriptPath, sourceDistRootPath, sourcePackageRootPath } = sourceProvenance;
2185
+ if (sourceProvenance.sourceKind !== DAEMON_BUNDLE_SOURCE_KIND_WORKSPACE) {
2186
+ const sourcePackageVersion = await readDaemonSourcePackageVersion(sourcePackageRootPath);
2187
+ if (sourcePackageVersion !== input.daemonVersion) throw new Error(`Cannot prepare OpenMeld Service ${input.daemonVersion} from CLI source ${sourcePackageVersion} at ${sourcePackageRootPath}. Install openmeld@${input.daemonVersion} and rerun \`openmeld setup\`, or use a verified Service artifact for that version.`);
2188
+ }
1878
2189
  const sourceDistFingerprint = await computeDaemonSourceDistFingerprint(sourceDistRootPath);
1879
2190
  const entryScriptRelativePath = basename(sourceEntryScriptPath);
1880
2191
  const now = (/* @__PURE__ */ new Date()).toISOString();
@@ -1983,7 +2294,7 @@ async function prepareSelectedBinaryDaemonServiceBundle(input) {
1983
2294
  release: input.release
1984
2295
  });
1985
2296
  const bytes = await downloadCliBinaryUpdateArtifact({
1986
- downloadTimeoutMs: 6e4,
2297
+ downloadPolicy: DEFAULT_CLI_BINARY_DOWNLOAD_POLICY,
1987
2298
  fetchImpl: fetch,
1988
2299
  onDeltaFallback,
1989
2300
  plan,
@@ -2303,6 +2614,22 @@ async function resolveDaemonBundleSourceProvenance(explicitPath) {
2303
2614
  sourceKind: inferDaemonBundleSourceKind(sourcePackageRootPath)
2304
2615
  };
2305
2616
  }
2617
+ async function readDaemonSourcePackageVersion(sourcePackageRootPath) {
2618
+ const packageManifestPath = join(sourcePackageRootPath, "package.json");
2619
+ const packageManifestRaw = await readFile(packageManifestPath, "utf8").catch((error) => {
2620
+ if (getErrorCode(error) === "ENOENT") throw new Error(`OpenMeld could not verify the CLI source version because ${packageManifestPath} is missing.`);
2621
+ throw error;
2622
+ });
2623
+ let packageManifest;
2624
+ try {
2625
+ packageManifest = JSON.parse(packageManifestRaw);
2626
+ } catch {
2627
+ throw new Error(`OpenMeld could not verify the CLI source version because ${packageManifestPath} is not valid JSON.`);
2628
+ }
2629
+ const version = packageManifest.name === "openmeld" && typeof packageManifest.version === "string" ? packageManifest.version.trim() : "";
2630
+ if (!version) throw new Error(`OpenMeld could not verify the CLI source version from ${packageManifestPath}.`);
2631
+ return version;
2632
+ }
2306
2633
  async function resolveCliScriptPath(explicitPath) {
2307
2634
  const rawPath = explicitPath ?? process$1.argv[1];
2308
2635
  if (!rawPath) throw new Error("Cannot determine CLI script path for OpenMeld background service bundle.");
@@ -3637,6 +3964,6 @@ async function readObservedRuntimeState() {
3637
3964
  });
3638
3965
  }
3639
3966
  //#endregion
3640
- export { readManagedCliInstallation as $, prepareDaemonServiceBundle as A, verifyCliBinaryCodeSignature as At, resolveDaemonServiceArtifact as B, readDaemonServiceContract as Bt, daemonServiceExecutableWrapperPath as C, resolveDaemonServiceUpdateWorkerLaunchdPlistPath as Ct, ensureDaemonServiceStableBinaryExecutable as D, resolveDaemonServiceUpdateWorkerWindowsScriptPath as Dt, discardPreparedDaemonServiceBundle as E, resolveDaemonServiceUpdateWorkerSystemdUnitPath as Et, restoreDaemonActiveBundleStateSnapshot as F, requestLocalSyncRouteCatalog as Ft, readRecentDaemonLifecycleEvents as G, formatDaemonLifecycleOriginSummary as H, runAuditedServiceManagerCarrierMutation as I, sendLocalDaemonControlPlaneRequest as It, runWithDaemonLifecycleCommandJournal as J, resolveRecentDaemonSignalStopCause as K, verifyDaemonActiveBundleIntegrity as L, clearDaemonServiceContract as Lt, resolveAlignedDaemonActiveBundleEntryPath as M, requestLocalAgentActivitySync as Mt, resolveDaemonBundleEntryPathFromState as N, requestLocalDaemonServiceUpdateReadiness as Nt, ensureDaemonServiceUpdateWorkerBinaryExecutable as O, downloadCliBinaryUpdateArtifact as Ot, resolveInstalledDaemonBundleFingerprint as P, requestLocalDaemonShutdown as Pt, pruneManagedInstallVersions as Q, writeDaemonServiceExecutableWrapper as R, isDaemonServiceContractIdentityReusable as Rt, daemonServiceBinaryExecutablePath as S, resolveDaemonServiceUpdateWorkerIdentity as St, daemonServiceUpdateWorkerBinaryPath as T, resolveDaemonServiceUpdateWorkerSystemdTimerUnitPath as Tt, readLatestDaemonLifecycleConnectionStateEvent as U, emitDaemonLifecycleEvent as V, upsertDaemonServiceContract as Vt, readLatestDaemonLifecycleOriginEvent as W, buildInstallSelfJsonPayload as X, collectLocalOperationFailure as Y, performManagedInstall as Z, matchesExpectedDaemonServiceManagerDefinition as _, package_default as _t, resolveDaemonRuntimeState as a, persistPendingDaemonServiceUpdate as at, cleanupInactiveDaemonServiceBundles as b, daemonServiceUpdateWorkerNpmEntryPath as bt, resolveObservedDaemonRuntimeStatus as c, buildNextVersionState as ct, inspectLegacySharedDaemonService as d, fetchLatestCliBinaryRelease as dt, resolveCliSelfVersion as et, listDaemonOwnedProcesses as f, fetchLatestPackageInfo as ft, assertDaemonMaintenanceInstallationOwnership as g, resolveBundledServiceRelease as gt, resolveDaemonBundleIdFromEntryPath as h, writeVersionState as ht, readCurrentObservedDaemonRuntimeStatus as i, completePendingDaemonServiceUpdate as it, readDaemonActiveBundleState as j, LocalDaemonControlPlaneClientError as jt, isDaemonBundleSourceAllowedForLane as k, resolveCliBinaryUpdatePlan as kt, resolveObservedRuntimeCommandEntryPath as l, compareSemver as lt, normalizeDaemonCommandPath as m, readVersionState as mt, getEffectiveDaemonRuntimeStatus as n, OPENMELD_VERSION as nt, resolveDaemonServiceManagerForRuntimeState as o, readLastDaemonServiceUpdate as ot, extractDaemonCommandEntryPath as p, isPlainReleaseVersion as pt, runDaemonServiceManagerAction as q, readCurrentDaemonRuntimeContext as r, DAEMON_SERVICE_UPDATE_JOB_SCHEMA as rt, waitForDaemonSystemServiceToStop as s, readPendingDaemonServiceUpdate as st, clearDaemonRuntimeStateIfDefinitelyStopped as t, withManagedInstallTransaction as tt, cleanupLegacySharedDaemonServiceState as u, ensureVersionStateReady as ut, isOpenMeldManagedBinaryPath as v, INDEPENDENT_MAINTENANCE_REGISTRATION as vt, daemonServiceLauncherPath as w, resolveDaemonServiceUpdateWorkerSystemdPathUnitPath as wt, clearDaemonServiceUpdateWorkerBinaryExecutable as x, hasIndependentMaintenanceRegistration as xt, activateDaemonServiceBundle as y, configureDaemonMaintenanceEnvironment as yt, writeDaemonServiceLauncher as z, isUnsafeProductionDeviceId as zt };
3967
+ export { readManagedCliInstallation as $, prepareDaemonServiceBundle as A, resolveCliBinaryUpdatePlan as At, resolveDaemonServiceArtifact as B, isUnsafeProductionDeviceId as Bt, daemonServiceExecutableWrapperPath as C, resolveDaemonServiceUpdateWorkerLaunchdPlistPath as Ct, ensureDaemonServiceStableBinaryExecutable as D, resolveDaemonServiceUpdateWorkerWindowsScriptPath as Dt, discardPreparedDaemonServiceBundle as E, resolveDaemonServiceUpdateWorkerSystemdUnitPath as Et, restoreDaemonActiveBundleStateSnapshot as F, requestLocalDaemonShutdown as Ft, readRecentDaemonLifecycleEvents as G, formatDaemonLifecycleOriginSummary as H, upsertDaemonServiceContract as Ht, runAuditedServiceManagerCarrierMutation as I, requestLocalSyncRouteCatalog as It, runWithDaemonLifecycleCommandJournal as J, resolveRecentDaemonSignalStopCause as K, verifyDaemonActiveBundleIntegrity as L, sendLocalDaemonControlPlaneRequest as Lt, resolveAlignedDaemonActiveBundleEntryPath as M, LocalDaemonControlPlaneClientError as Mt, resolveDaemonBundleEntryPathFromState as N, requestLocalAgentActivitySync as Nt, ensureDaemonServiceUpdateWorkerBinaryExecutable as O, DEFAULT_CLI_BINARY_DOWNLOAD_POLICY as Ot, resolveInstalledDaemonBundleFingerprint as P, requestLocalDaemonServiceUpdateReadiness as Pt, pruneManagedInstallVersions as Q, writeDaemonServiceExecutableWrapper as R, clearDaemonServiceContract as Rt, daemonServiceBinaryExecutablePath as S, resolveDaemonServiceUpdateWorkerIdentity as St, daemonServiceUpdateWorkerBinaryPath as T, resolveDaemonServiceUpdateWorkerSystemdTimerUnitPath as Tt, readLatestDaemonLifecycleConnectionStateEvent as U, emitDaemonLifecycleEvent as V, readDaemonServiceContract as Vt, readLatestDaemonLifecycleOriginEvent as W, buildInstallSelfJsonPayload as X, collectLocalOperationFailure as Y, performManagedInstall as Z, matchesExpectedDaemonServiceManagerDefinition as _, package_default as _t, resolveDaemonRuntimeState as a, persistPendingDaemonServiceUpdate as at, cleanupInactiveDaemonServiceBundles as b, daemonServiceUpdateWorkerNpmEntryPath as bt, resolveObservedDaemonRuntimeStatus as c, buildNextVersionState as ct, inspectLegacySharedDaemonService as d, fetchLatestCliBinaryRelease as dt, resolveCliSelfVersion as et, listDaemonOwnedProcesses as f, fetchLatestPackageInfo as ft, assertDaemonMaintenanceInstallationOwnership as g, resolveBundledServiceRelease as gt, resolveDaemonBundleIdFromEntryPath as h, writeVersionState as ht, readCurrentObservedDaemonRuntimeStatus as i, completePendingDaemonServiceUpdate as it, readDaemonActiveBundleState as j, verifyCliBinaryCodeSignature as jt, isDaemonBundleSourceAllowedForLane as k, downloadCliBinaryUpdateArtifact as kt, resolveObservedRuntimeCommandEntryPath as l, compareSemver as lt, normalizeDaemonCommandPath as m, readVersionState as mt, getEffectiveDaemonRuntimeStatus as n, OPENMELD_VERSION as nt, resolveDaemonServiceManagerForRuntimeState as o, readLastDaemonServiceUpdate as ot, extractDaemonCommandEntryPath as p, isPlainReleaseVersion as pt, runDaemonServiceManagerAction as q, readCurrentDaemonRuntimeContext as r, DAEMON_SERVICE_UPDATE_JOB_SCHEMA as rt, waitForDaemonSystemServiceToStop as s, readPendingDaemonServiceUpdate as st, clearDaemonRuntimeStateIfDefinitelyStopped as t, withManagedInstallTransaction as tt, cleanupLegacySharedDaemonServiceState as u, ensureVersionStateReady as ut, isOpenMeldManagedBinaryPath as v, INDEPENDENT_MAINTENANCE_REGISTRATION as vt, daemonServiceLauncherPath as w, resolveDaemonServiceUpdateWorkerSystemdPathUnitPath as wt, clearDaemonServiceUpdateWorkerBinaryExecutable as x, hasIndependentMaintenanceRegistration as xt, activateDaemonServiceBundle as y, configureDaemonMaintenanceEnvironment as yt, writeDaemonServiceLauncher as z, isDaemonServiceContractIdentityReusable as zt };
3641
3968
 
3642
- //# sourceMappingURL=daemon-service-runtime-D8KrOfSV.js.map
3969
+ //# sourceMappingURL=daemon-service-runtime-CY6wdBe1.js.map