@koed-labs/server 0.11.1 → 1.0.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 (45) hide show
  1. package/README.md +3 -3
  2. package/bin/koed.js +1 -1
  3. package/package.json +2 -2
  4. package/vendor/{chunk-VGIYSDNU.js → chunk-273NMYXE.js} +115 -32
  5. package/vendor/{chunk-4OO6VAU3.js → chunk-4DHYSJJT.js} +1 -1
  6. package/vendor/{chunk-WDFERJG3.js → chunk-54UL4U2E.js} +42 -23
  7. package/vendor/{chunk-W2OJZZ6X.js → chunk-64AST7WZ.js} +2 -2
  8. package/vendor/{chunk-ZIOKV2X6.js → chunk-7HLNJ2BI.js} +113 -33
  9. package/vendor/{chunk-2XKSVKQA.js → chunk-AOZ3LMTF.js} +2 -2
  10. package/vendor/{chunk-C5SNDPAP.js → chunk-BYN6KXNP.js} +4 -4
  11. package/vendor/{chunk-Z5WCAUA6.js → chunk-DWWMBGHX.js} +16 -16
  12. package/vendor/{chunk-ZOHNXUDY.js → chunk-E6YVGIEW.js} +25 -8
  13. package/vendor/{chunk-NVTMIAAF.js → chunk-EEBIYWTE.js} +16 -16
  14. package/vendor/{chunk-GFASBPV2.js → chunk-F77ZTTNS.js} +3 -3
  15. package/vendor/{chunk-TG26CZGQ.js → chunk-F7AMEDDU.js} +4 -4
  16. package/vendor/{chunk-EA4QDDQA.js → chunk-GY5GATZL.js} +1 -1
  17. package/vendor/{chunk-HC76426R.js → chunk-ILQVLZ2I.js} +7 -5
  18. package/vendor/{chunk-6KS67EQE.js → chunk-KG3RANR4.js} +1 -1
  19. package/vendor/{chunk-OCILJ737.js → chunk-KRBZZ6GS.js} +8 -8
  20. package/vendor/{chunk-SHLRINKO.js → chunk-L4RD3TAZ.js} +1 -1
  21. package/vendor/{chunk-SRKIBFOE.js → chunk-LHUMBHG7.js} +1 -1
  22. package/vendor/{chunk-CHMH4LH5.js → chunk-NGV45YWB.js} +3 -3
  23. package/vendor/{chunk-V67IQB7H.js → chunk-OG7G6DIR.js} +1 -1
  24. package/vendor/{chunk-NOU7RHYZ.js → chunk-OZU6JFB4.js} +4 -4
  25. package/vendor/chunk-QV3WPU7A.js +8 -0
  26. package/vendor/{chunk-BUIM2M4R.js → chunk-S6HD3MDU.js} +2 -2
  27. package/vendor/{chunk-SNKWETM5.js → chunk-SQZ2OSP6.js} +2 -2
  28. package/vendor/{chunk-WPIEF4LY.js → chunk-T7OGE5E5.js} +3 -3
  29. package/vendor/{chunk-FYYRFX4U.js → chunk-TIBYKMRW.js} +74 -38
  30. package/vendor/{chunk-FN3HUUO2.js → chunk-UCOHFZ77.js} +73 -13
  31. package/vendor/{chunk-LRP66XEY.js → chunk-UIMUUIH7.js} +13 -13
  32. package/vendor/{chunk-EDPNYIX5.js → chunk-USHFSJT7.js} +141 -86
  33. package/vendor/{chunk-QRKHHWJJ.js → chunk-VGL5AZN5.js} +51 -3
  34. package/vendor/{chunk-PL3LWC5C.js → chunk-VLP72QWX.js} +1 -1
  35. package/vendor/{chunk-O7DW2VAV.js → chunk-W6632NOX.js} +3 -3
  36. package/vendor/{chunk-RCR4XPE3.js → chunk-WBMO7YCO.js} +1 -1
  37. package/vendor/chunk-XCO3RV3Z.js +11 -0
  38. package/vendor/{chunk-TVYEB2GN.js → chunk-XKXSC6YS.js} +34 -4
  39. package/vendor/{chunk-C4V72GXC.js → chunk-Y6GE52OP.js} +17 -17
  40. package/vendor/{chunk-BGENSONI.js → chunk-ZKKWLLPU.js} +1 -1
  41. package/vendor/cli.js +1 -1
  42. package/vendor/component-manifest-catalog.js +1 -1
  43. package/vendor/control-plane.js +4 -4
  44. package/vendor/chunk-7EGSY3E4.js +0 -8
  45. package/vendor/chunk-ZUDSZGVO.js +0 -11
@@ -1,10 +1,10 @@
1
1
  import { createRequire as createKoedRequire } from "node:module"; const require = createKoedRequire(import.meta.url);
2
2
  import {
3
3
  runApplicationSecretProvider
4
- } from "./chunk-EA4QDDQA.js";
4
+ } from "./chunk-GY5GATZL.js";
5
5
  import {
6
6
  ensureDeviceIdentity
7
- } from "./chunk-SRKIBFOE.js";
7
+ } from "./chunk-LHUMBHG7.js";
8
8
  import {
9
9
  loadRepoEnv,
10
10
  resolveApiUrl
@@ -27,7 +27,7 @@ import {
27
27
  signPdsRecord,
28
28
  validatePdsGroupStatement,
29
29
  validatePdsKeyBundle
30
- } from "./chunk-ZOHNXUDY.js";
30
+ } from "./chunk-E6YVGIEW.js";
31
31
 
32
32
  // packages/koed-server/dist/personal-sync.js
33
33
  import { createCipheriv as createCipheriv2, createDecipheriv as createDecipheriv2, createHash as createHash2, generateKeyPairSync, randomBytes as randomBytes2, randomUUID as randomUUID2, scryptSync, sign } from "node:crypto";
@@ -74,7 +74,7 @@ var packagedRuntime = (selection, requirements, exists) => {
74
74
  const mcpCli = resolve(root, "mcp-server/dist/cli.js");
75
75
  const localAiRuntime = resolve(root, "mcp-server/dist/local-runtime-cli.js");
76
76
  const captureHook = resolve(root, "mcp-server/dist/capture-hook.js");
77
- const dbPackageRoot = resolve(root, "node_modules/@koed/db");
77
+ const dbPackageRoot = resolve(root, "node_modules/@koed-labs/db");
78
78
  const required = [
79
79
  ...selection ? [] : ["authenticated base generation"],
80
80
  ...requirements.processes.includes("api") ? [apiEntry] : [],
@@ -6,14 +6,14 @@ import {
6
6
  personalSyncProviderEnvironment,
7
7
  redeemPairingLink,
8
8
  runPersonalSyncCommand
9
- } from "./chunk-CHMH4LH5.js";
10
- import "./chunk-EA4QDDQA.js";
11
- import "./chunk-SRKIBFOE.js";
9
+ } from "./chunk-NGV45YWB.js";
10
+ import "./chunk-GY5GATZL.js";
11
+ import "./chunk-LHUMBHG7.js";
12
12
  import "./chunk-TSAYTRX3.js";
13
13
  import "./chunk-YZLQZU5E.js";
14
14
  import "./chunk-W2HNI6AA.js";
15
15
  import "./chunk-7NXKPDF3.js";
16
- import "./chunk-ZOHNXUDY.js";
16
+ import "./chunk-E6YVGIEW.js";
17
17
  import "./chunk-FSNLU46W.js";
18
18
  import "./chunk-BTS4ZTF3.js";
19
19
  export {
@@ -0,0 +1,8 @@
1
+ import { createRequire as createKoedRequire } from "node:module"; const require = createKoedRequire(import.meta.url);
2
+
3
+ // packages/koed-server/dist/native-runtime-catalog-data.mjs
4
+ var productionNativeRuntimeCatalog = { "schemaVersion": 2, "linux": { "schemaVersion": 1, "minimumCoreVersion": "0.10.3", "core": { "recipeId": "f4ff165a91e23eae1278c93ee7a72376cc4e7418eea30c16ee6561cde66690e6", "runtimeVersion": "1.0.0", "url": "https://github.com/koed-labs/koed/releases/download/v1.0.0/koed-native-core-f4ff165a91e23eae1278c93ee7a72376cc4e7418eea30c16ee6561cde66690e6-linux-x64.tar.gz", "sha256": "1e46555a37e69f20838fc7a78340e8519146fa20e8eb269261e638291dcbd98e", "manifestSha256": "4a6d8968f6505e6338d66f9bc039635fcc5a42c0ac39494f07be17fc6f43bc7d", "target": { "platform": "linux", "architecture": "x64", "libc": { "family": "glibc", "minimumVersion": "2.35" } }, "archiveBytes": 23988967, "expandedBytes": 56990678, "contracts": { "layout": 1, "embedding": 1, "postgres": 1 }, "components": { "postgres": { "major": 17, "version": "17.6" }, "pgvector": { "version": "0.8.3" }, "llamaCpp": { "version": "b10514", "revision": "7221e24f579efbb5fd2a2ced1fffaef1aff2fe0d" } } }, "cuda": { "recipeId": "16722edc4647561a6615063cd1ad29bcf4da8ec9bc2666847069441f592a7f93", "runtimeVersion": "1.0.0", "url": "https://github.com/koed-labs/koed/releases/download/v1.0.0/koed-native-cuda-16722edc4647561a6615063cd1ad29bcf4da8ec9bc2666847069441f592a7f93-linux-x64.tar.gz", "sha256": "b63eca8bb05e1ef37e38bcd3d70edda3edb9b0fe984a35e9f18aa77fb4b07188", "manifestSha256": "47de6e6876ead9bf052477249f0a7ccaffba615de5daf9506a87ef9c4055eba6", "target": { "platform": "linux", "architecture": "x64", "libc": { "family": "glibc", "minimumVersion": "2.35" } }, "archiveBytes": 711354383, "expandedBytes": 1467990043, "contracts": { "layout": 1, "embedding": 1 }, "llamaCpp": { "version": "b10514", "revision": "7221e24f579efbb5fd2a2ced1fffaef1aff2fe0d" }, "cuda": { "toolkitVersion": "12.4", "minimumDriverLinux": "550.54.14", "architectures": [75, 80, 86, 89, 90] } } }, "macos": { "schemaVersion": 1, "minimumCoreVersion": "1.0.0", "core": { "recipeId": "ec948b5a248b7077990175488b0c0165998a0ebbd11f37339433f44b4d68c8ff", "runtimeVersion": "1.0.0", "url": "https://github.com/koed-labs/koed/releases/download/v1.0.0/koed-native-core-ec948b5a248b7077990175488b0c0165998a0ebbd11f37339433f44b4d68c8ff-macos-arm64.tar.gz", "sha256": "9e7ee080a41caeee6513b866bb1ef446de2cc4aedfd2d5ef010b1377f2673390", "manifestSha256": "71a86c5cb72abd432250bb28c7523e44865289c9d6de7f8ab1ad7bf416d8d415", "target": { "platform": "macos", "architecture": "arm64", "minimumVersion": "14.0" }, "archiveBytes": 35071036, "expandedBytes": 76669484, "contracts": { "layout": 1, "embedding": 1, "postgres": 1 }, "components": { "postgres": { "major": 17, "version": "17.6" }, "pgvector": { "version": "0.8.3" }, "llamaCpp": { "version": "b10514" } } }, "cuda": null } };
5
+
6
+ export {
7
+ productionNativeRuntimeCatalog
8
+ };
@@ -7,8 +7,8 @@ import {
7
7
  installPrivacyModel,
8
8
  materializePrivacyModelCacheEntry,
9
9
  resolvePrivacyModelPaths
10
- } from "./chunk-4OO6VAU3.js";
11
- import "./chunk-ZOHNXUDY.js";
10
+ } from "./chunk-4DHYSJJT.js";
11
+ import "./chunk-E6YVGIEW.js";
12
12
  import "./chunk-FSNLU46W.js";
13
13
  import "./chunk-BTS4ZTF3.js";
14
14
  export {
@@ -12,10 +12,10 @@ import {
12
12
  updateUpstreamBackendRoutePolicy,
13
13
  upstreamBackendAdvertisesCapability,
14
14
  upstreamBackendSupportsTeamMemoryAnswerTasks
15
- } from "./chunk-RCR4XPE3.js";
15
+ } from "./chunk-WBMO7YCO.js";
16
16
  import {
17
17
  isTeamMemoryAnswerTaskCapability
18
- } from "./chunk-ZOHNXUDY.js";
18
+ } from "./chunk-E6YVGIEW.js";
19
19
  import "./chunk-FSNLU46W.js";
20
20
  import "./chunk-BTS4ZTF3.js";
21
21
  export {
@@ -1,7 +1,7 @@
1
1
  import { createRequire as createKoedRequire } from "node:module"; const require = createKoedRequire(import.meta.url);
2
2
  import {
3
3
  ensureDeviceIdentity
4
- } from "./chunk-SRKIBFOE.js";
4
+ } from "./chunk-LHUMBHG7.js";
5
5
  import {
6
6
  require_proper_lockfile
7
7
  } from "./chunk-7NXKPDF3.js";
@@ -19,7 +19,7 @@ import {
19
19
  upstreamBackendAdvertisesCapability,
20
20
  upstreamBackendSupportsTeamMemoryAnswerTasks,
21
21
  upstreamDisconnectCleanupPending
22
- } from "./chunk-RCR4XPE3.js";
22
+ } from "./chunk-WBMO7YCO.js";
23
23
  import {
24
24
  assertSecureHttpTransport,
25
25
  deleteLocalEdgeClientCredential,
@@ -30,7 +30,7 @@ import {
30
30
  storeLocalEdgeClientCredential,
31
31
  storeUpstreamCredentialSecret,
32
32
  upstreamCredentialReferenceFor
33
- } from "./chunk-ZOHNXUDY.js";
33
+ } from "./chunk-E6YVGIEW.js";
34
34
  import {
35
35
  __toESM
36
36
  } from "./chunk-BTS4ZTF3.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-TSAYTRX3.js";
5
5
  import {
6
6
  resolveKoedControlPlaneVersion
7
- } from "./chunk-V67IQB7H.js";
7
+ } from "./chunk-OG7G6DIR.js";
8
8
 
9
9
  // packages/koed-server/dist/cli.js
10
10
  import { realpathSync } from "node:fs";
@@ -3543,16 +3543,16 @@ var recoveryCommands = [
3543
3543
  options: ["kit", "passwordFd", "passwordStdin"]
3544
3544
  }
3545
3545
  ];
3546
- var registerPersonalSyncCommands = (program2, dependencies, complete, advanced) => {
3547
- const pair = program2.command("pair").description("Connect this device through Koed Desktop").option("--device-label <name>", "Device display name").option("--detach", "Return after creating the request").option("--json", "Emit JSON progress records");
3546
+ var registerPersonalSyncCommands = (program2, dependencies, complete, advanced, hidden = false) => {
3547
+ const pair = program2.command("pair", { hidden }).description("Connect this device through Koed Desktop").option("--device-label <name>", "Device display name").option("--detach", "Return after creating the request").option("--json", "Emit JSON progress records");
3548
3548
  const pairAction = async (operation, options) => {
3549
3549
  const input = { ...pair.opts(), ...options };
3550
- complete(await withCliService(() => import("./chunk-NVTMIAAF.js"), (service) => service.runPairCommand(operation, input, dependencies), dependencies, input.json));
3550
+ complete(await withCliService(() => import("./chunk-EEBIYWTE.js"), (service) => service.runPairCommand(operation, input, dependencies), dependencies, input.json));
3551
3551
  };
3552
3552
  pair.action(async (options) => pairAction(void 0, options));
3553
3553
  for (const operation of ["status", "cancel"])
3554
3554
  pair.command(operation).description(`${operation} the pending pairing request`).option("--json", "Emit JSON output").action(async (options) => pairAction(operation, options));
3555
- const sync = program2.command("personal-sync").description("Inspect Personal Sync and recovery guidance").option("--advanced", "Show advanced compatibility and recovery commands");
3555
+ const sync = program2.command("personal-sync", { hidden }).description("Inspect Personal Sync and recovery guidance").option("--advanced", "Show advanced compatibility and recovery commands");
3556
3556
  sync.action(() => sync.outputHelp());
3557
3557
  sync.addHelpText("after", "\nConnect this device with koed pair. Create your first group and manage devices in Electron \u2192 Devices.\n\nExamples:\n koed personal-sync status --json\n koed personal-sync --help --advanced");
3558
3558
  const execute = (command, path2, flags) => {
@@ -3569,7 +3569,7 @@ var registerPersonalSyncCommands = (program2, dependencies, complete, advanced)
3569
3569
  const stdout = dependencies.stdout ?? process.stdout;
3570
3570
  const stderr = dependencies.stderr ?? process.stderr;
3571
3571
  try {
3572
- const operation = dependencies.runPersonalSync ?? (await import("./chunk-NOU7RHYZ.js")).runPersonalSyncCommand;
3572
+ const operation = dependencies.runPersonalSync ?? (await import("./chunk-OZU6JFB4.js")).runPersonalSyncCommand;
3573
3573
  const result = await operation(args, (dependencies.resolvePaths ?? resolveKoedServerPaths)(), process.env);
3574
3574
  stdout.write(options.json ? `${JSON.stringify(result, null, 2)}
3575
3575
  ` : `${result.message}
@@ -3650,7 +3650,7 @@ var registerRemoteCommands = (program2, dependencies, complete) => {
3650
3650
  }));
3651
3651
  return;
3652
3652
  }
3653
- complete(await withCliService(() => import("./chunk-LRP66XEY.js"), (service) => service.runRemoteMcpOperation(operation, input, {
3653
+ complete(await withCliService(() => import("./chunk-UIMUUIH7.js"), (service) => service.runRemoteMcpOperation(operation, input, {
3654
3654
  environment: dependencies.remoteEnvironment,
3655
3655
  stdout: dependencies.stdout ?? process.stdout,
3656
3656
  stderr: dependencies.stderr ?? process.stderr
@@ -3686,12 +3686,12 @@ var registerInternalCommands = (program2, dependencies, complete) => {
3686
3686
  complete(1);
3687
3687
  return;
3688
3688
  }
3689
- complete(await withCliService(() => import("./chunk-2XKSVKQA.js"), (service) => service.runSecretProviderCommand(operation, reference, dependencies), dependencies, false));
3689
+ complete(await withCliService(() => import("./chunk-AOZ3LMTF.js"), (service) => service.runSecretProviderCommand(operation, reference, dependencies), dependencies, false));
3690
3690
  });
3691
3691
  const desktop = program2.command("desktop", { hidden: true }).description("Internal Desktop commands");
3692
3692
  desktop.action(() => desktop.outputHelp());
3693
3693
  desktop.command("collaboration-broker").action(async () => {
3694
- complete(await withCliService(() => import("./chunk-C5SNDPAP.js"), async (service) => {
3694
+ complete(await withCliService(() => import("./chunk-BYN6KXNP.js"), async (service) => {
3695
3695
  try {
3696
3696
  await service.runDesktopCollaborationBrokerProcess();
3697
3697
  return 0;
@@ -3743,7 +3743,7 @@ var registerComponentCommands = (program2, dependencies, complete) => {
3743
3743
  command.action(async (options) => {
3744
3744
  let service;
3745
3745
  try {
3746
- service = await import("./chunk-OCILJ737.js");
3746
+ service = await import("./chunk-KRBZZ6GS.js");
3747
3747
  } catch {
3748
3748
  complete(reportMissingCliService(dependencies, options.json));
3749
3749
  return;
@@ -3774,7 +3774,7 @@ var registerIntegrationCommands = (program2, dependencies, complete) => {
3774
3774
  if (operation === "check")
3775
3775
  command.option("--capabilities-refreshed-since <value>", "Minimum capability refresh timestamp").option("--include-status", "Include complete service status in the result");
3776
3776
  command.action(async (options) => {
3777
- complete(await withCliService(() => import("./chunk-C4V72GXC.js"), (service) => service.runIntegrationCommand(operation, { ...options, client }, dependencies), dependencies, options.json));
3777
+ complete(await withCliService(() => import("./chunk-Y6GE52OP.js"), (service) => service.runIntegrationCommand(operation, { ...options, client }, dependencies), dependencies, options.json));
3778
3778
  });
3779
3779
  }
3780
3780
  }
@@ -3791,7 +3791,7 @@ var registerLifecycleCommands = (program2, dependencies, complete) => {
3791
3791
  };
3792
3792
  const bind = (command, operation, identityAction) => {
3793
3793
  command.option("--json", "Emit JSON output").action(async (options) => {
3794
- complete(await withCliService(() => import("./chunk-Z5WCAUA6.js"), (service) => service.runLifecycleCommand(operation, { ...options, identityAction }, dependencies), dependencies, options.json));
3794
+ complete(await withCliService(() => import("./chunk-DWWMBGHX.js"), (service) => service.runLifecycleCommand(operation, { ...options, identityAction }, dependencies), dependencies, options.json));
3795
3795
  });
3796
3796
  };
3797
3797
  for (const operation of Object.keys(descriptions)) {
@@ -3871,10 +3871,10 @@ var registerUpstreamCommands = (program2, dependencies, complete) => {
3871
3871
  const paths = (dependencies.resolvePaths ?? resolveKoedServerPaths)();
3872
3872
  let result;
3873
3873
  if (command === list) {
3874
- const execute = dependencies.listUpstreams ?? (await import("./chunk-SNKWETM5.js")).listUpstreamBackends;
3874
+ const execute = dependencies.listUpstreams ?? (await import("./chunk-SQZ2OSP6.js")).listUpstreamBackends;
3875
3875
  result = execute(paths);
3876
3876
  } else if (command === register) {
3877
- const execute = dependencies.registerUpstream ?? (await import("./chunk-SNKWETM5.js")).registerUpstreamBackend;
3877
+ const execute = dependencies.registerUpstream ?? (await import("./chunk-SQZ2OSP6.js")).registerUpstreamBackend;
3878
3878
  result = execute(paths, {
3879
3879
  url: required(options.url, "--url"),
3880
3880
  id: options.id,
@@ -3884,7 +3884,7 @@ var registerUpstreamCommands = (program2, dependencies, complete) => {
3884
3884
  } else {
3885
3885
  const id = required(options.id, "--id");
3886
3886
  if (command === refresh) {
3887
- const execute = dependencies.refreshUpstream ?? (await import("./chunk-SNKWETM5.js")).refreshUpstreamBackendCapabilities;
3887
+ const execute = dependencies.refreshUpstream ?? (await import("./chunk-SQZ2OSP6.js")).refreshUpstreamBackendCapabilities;
3888
3888
  result = await execute(paths, id);
3889
3889
  } else if (command === policy) {
3890
3890
  const update = {};
@@ -3896,28 +3896,28 @@ var registerUpstreamCommands = (program2, dependencies, complete) => {
3896
3896
  throw new Error(`--${flag} must be enabled or disabled.`);
3897
3897
  update[key] = value;
3898
3898
  }
3899
- const execute = dependencies.updateUpstreamPolicy ?? (await import("./chunk-SNKWETM5.js")).updateUpstreamBackendRoutePolicy;
3899
+ const execute = dependencies.updateUpstreamPolicy ?? (await import("./chunk-SQZ2OSP6.js")).updateUpstreamBackendRoutePolicy;
3900
3900
  result = execute(paths, id, update);
3901
3901
  } else if (command === activate) {
3902
- const execute = dependencies.activateUpstream ?? (await import("./chunk-SNKWETM5.js")).setActiveUpstreamBackend;
3902
+ const execute = dependencies.activateUpstream ?? (await import("./chunk-SQZ2OSP6.js")).setActiveUpstreamBackend;
3903
3903
  result = execute(paths, id);
3904
3904
  } else if (command === remove) {
3905
- const execute = dependencies.removeUpstream ?? (await import("./chunk-SNKWETM5.js")).removeUpstreamBackend;
3905
+ const execute = dependencies.removeUpstream ?? (await import("./chunk-SQZ2OSP6.js")).removeUpstreamBackend;
3906
3906
  result = execute(paths, id);
3907
3907
  } else if (command === disconnect) {
3908
- const execute = dependencies.disconnectUpstream ?? (await import("./chunk-TG26CZGQ.js")).disconnectUpstreamBackendEnrollment;
3908
+ const execute = dependencies.disconnectUpstream ?? (await import("./chunk-F7AMEDDU.js")).disconnectUpstreamBackendEnrollment;
3909
3909
  result = await execute(paths, id);
3910
3910
  } else if (command === start) {
3911
- const execute = dependencies.startUpstreamEnroll ?? (await import("./chunk-TG26CZGQ.js")).startUpstreamEnrollment;
3911
+ const execute = dependencies.startUpstreamEnroll ?? (await import("./chunk-F7AMEDDU.js")).startUpstreamEnrollment;
3912
3912
  result = await execute(paths, id, {
3913
3913
  memoryAnswers: Boolean(options.memoryAnswers || options.enableMemoryAnswers),
3914
3914
  sourceOwnerPrincipalId: required(options.sourceOwnerPrincipalId, "--source-owner-principal-id")
3915
3915
  });
3916
3916
  } else if (command === status) {
3917
- const execute = dependencies.getUpstreamEnrollStatus ?? (await import("./chunk-TG26CZGQ.js")).getUpstreamEnrollmentStatus;
3917
+ const execute = dependencies.getUpstreamEnrollStatus ?? (await import("./chunk-F7AMEDDU.js")).getUpstreamEnrollmentStatus;
3918
3918
  result = await execute(paths, id);
3919
3919
  } else {
3920
- const execute = dependencies.cancelUpstreamEnroll ?? (await import("./chunk-TG26CZGQ.js")).cancelUpstreamEnrollment;
3920
+ const execute = dependencies.cancelUpstreamEnroll ?? (await import("./chunk-F7AMEDDU.js")).cancelUpstreamEnrollment;
3921
3921
  result = await execute(paths, id);
3922
3922
  }
3923
3923
  }
@@ -3978,22 +3978,22 @@ var registerProjectCommands = (program2, dependencies, complete) => {
3978
3978
  const paths = (dependencies.resolvePaths ?? resolveKoedServerPaths)();
3979
3979
  let result;
3980
3980
  if (command === discover) {
3981
- const execute = dependencies.discoverProjectMetadata ?? (await import("./chunk-PL3LWC5C.js")).discoverProjectMetadata;
3981
+ const execute = dependencies.discoverProjectMetadata ?? (await import("./chunk-VLP72QWX.js")).discoverProjectMetadata;
3982
3982
  result = await execute(paths, {
3983
3983
  cwd: options.cwd ?? process.cwd(),
3984
3984
  aiClientSource: options.codex ? "codex" : void 0
3985
3985
  });
3986
3986
  } else if (command === list) {
3987
- const execute = dependencies.listProjectMetadata ?? (await import("./chunk-PL3LWC5C.js")).listProjectMetadata;
3987
+ const execute = dependencies.listProjectMetadata ?? (await import("./chunk-VLP72QWX.js")).listProjectMetadata;
3988
3988
  result = execute(paths);
3989
3989
  } else if (command === show) {
3990
- const execute = dependencies.getProjectMetadataForCwd ?? (await import("./chunk-PL3LWC5C.js")).getProjectMetadataForCwd;
3990
+ const execute = dependencies.getProjectMetadataForCwd ?? (await import("./chunk-VLP72QWX.js")).getProjectMetadataForCwd;
3991
3991
  result = execute(paths, options.cwd ?? process.cwd());
3992
3992
  } else if (command === forget) {
3993
- const execute = dependencies.forgetProjectMetadata ?? (await import("./chunk-PL3LWC5C.js")).forgetProjectMetadata;
3993
+ const execute = dependencies.forgetProjectMetadata ?? (await import("./chunk-VLP72QWX.js")).forgetProjectMetadata;
3994
3994
  result = execute(paths, required2(options.localProjectId, "--local-project-id"));
3995
3995
  } else if (command === anchor) {
3996
- const { setProjectRepositoryAnchor } = await import("./chunk-PL3LWC5C.js");
3996
+ const { setProjectRepositoryAnchor } = await import("./chunk-VLP72QWX.js");
3997
3997
  result = await setProjectRepositoryAnchor(paths, {
3998
3998
  localProjectId: required2(options.localProjectId, "--local-project-id"),
3999
3999
  expectedCheckoutId: required2(options.checkoutId, "--checkout-id"),
@@ -4057,7 +4057,7 @@ var registerPackageCommands = (program2, dependencies, complete) => {
4057
4057
  let result;
4058
4058
  switch (command.name()) {
4059
4059
  case "status": {
4060
- const execute = dependencies.collectPackageStatus ?? (await import("./chunk-GFASBPV2.js")).collectServerPackageStatus;
4060
+ const execute = dependencies.collectPackageStatus ?? (await import("./chunk-F77ZTTNS.js")).collectServerPackageStatus;
4061
4061
  result = execute(paths);
4062
4062
  break;
4063
4063
  }
@@ -4084,20 +4084,20 @@ var registerPackageCommands = (program2, dependencies, complete) => {
4084
4084
  input.trustPolicy = policy;
4085
4085
  if (options.allowDowngrade)
4086
4086
  input.allowDowngrade = true;
4087
- const execute = dependencies.installPackage ?? (await import("./chunk-GFASBPV2.js")).installServerPackage;
4087
+ const execute = dependencies.installPackage ?? (await import("./chunk-F77ZTTNS.js")).installServerPackage;
4088
4088
  result = await execute(paths, input);
4089
4089
  break;
4090
4090
  }
4091
4091
  case "activate": {
4092
4092
  const version = required3(options.version, "--version");
4093
- const execute = dependencies.activatePackage ?? (await import("./chunk-GFASBPV2.js")).activateServerPackage;
4093
+ const execute = dependencies.activatePackage ?? (await import("./chunk-F77ZTTNS.js")).activateServerPackage;
4094
4094
  result = execute(paths, version, {
4095
4095
  allowDowngrade: Boolean(options.allowDowngrade)
4096
4096
  });
4097
4097
  break;
4098
4098
  }
4099
4099
  default: {
4100
- const execute = dependencies.cleanupPackages ?? (await import("./chunk-GFASBPV2.js")).cleanupServerPackages;
4100
+ const execute = dependencies.cleanupPackages ?? (await import("./chunk-F77ZTTNS.js")).cleanupServerPackages;
4101
4101
  result = execute(paths, Number.parseInt(options.keep ?? "1", 10));
4102
4102
  }
4103
4103
  }
@@ -4147,10 +4147,10 @@ var runModelCommand = async (operation, options, dependencies) => {
4147
4147
  let result;
4148
4148
  if (options.kind === "privacy") {
4149
4149
  if (operation === "status") {
4150
- const execute = dependencies.collectPrivacyModelStatus ?? (await import("./chunk-BUIM2M4R.js")).collectPrivacyModelStatus;
4150
+ const execute = dependencies.collectPrivacyModelStatus ?? (await import("./chunk-S6HD3MDU.js")).collectPrivacyModelStatus;
4151
4151
  result = await execute(paths);
4152
4152
  } else {
4153
- const execute = dependencies.installPrivacyModel ?? (await import("./chunk-BUIM2M4R.js")).installPrivacyModel;
4153
+ const execute = dependencies.installPrivacyModel ?? (await import("./chunk-S6HD3MDU.js")).installPrivacyModel;
4154
4154
  const files = /* @__PURE__ */ new Map();
4155
4155
  result = options.progressJson ? await execute(paths, environment, void 0, {
4156
4156
  progress: (event) => {
@@ -4235,15 +4235,17 @@ var runRuntimeCommand = async (operation, options, dependencies) => {
4235
4235
  if (options.provider === "release") {
4236
4236
  if (dependencies.desktopRuntimeCapability)
4237
4237
  throw new Error("Use Koed Desktop to manage its runtime.");
4238
- const release = await import("./chunk-VGIYSDNU.js");
4238
+ const release = await import("./chunk-273NMYXE.js");
4239
4239
  if (operation === "validate") {
4240
4240
  if (!options.runtimeRoot?.trim())
4241
4241
  throw new Error("Provide a trusted staged runtime directory.");
4242
4242
  const root = options.runtimeRoot;
4243
4243
  release.assertReleaseHost();
4244
- const { withStoppedRuntime } = await import("./chunk-HC76426R.js");
4245
- const { resolveKoedRuntimeOwner } = await import("./chunk-BGENSONI.js");
4246
- const { validateStagedCuda } = await import("./chunk-O7DW2VAV.js");
4244
+ if (process.platform === "darwin")
4245
+ throw new Error("CUDA runtime validation is not supported on macOS.");
4246
+ const { withStoppedRuntime } = await import("./chunk-ILQVLZ2I.js");
4247
+ const { resolveKoedRuntimeOwner } = await import("./chunk-ZKKWLLPU.js");
4248
+ const { validateStagedCuda } = await import("./chunk-W6632NOX.js");
4247
4249
  result = await withRuntimeCancellation((signal) => withStoppedRuntime(paths, resolveKoedRuntimeOwner(), () => validateStagedCuda(paths, root, environment, {
4248
4250
  signal,
4249
4251
  requireModel: options.requireModel === true
@@ -4304,10 +4306,44 @@ var registerRuntimeCommands = (program2, dependencies, complete) => {
4304
4306
  }
4305
4307
  };
4306
4308
 
4309
+ // packages/koed-server/dist/personal-device-sync-feature.js
4310
+ var personalDeviceSyncFeatureEnvironmentName = "KOED_PERSONAL_DEVICE_SYNC_ENABLED";
4311
+ var personalDeviceSyncCommandNames = [
4312
+ "pair",
4313
+ "personal-sync"
4314
+ ];
4315
+ var resolvePersonalDeviceSyncEnabled = (environment = process.env) => {
4316
+ const configured = environment[personalDeviceSyncFeatureEnvironmentName];
4317
+ if (configured === void 0 || configured === "")
4318
+ return false;
4319
+ if (configured === "true")
4320
+ return true;
4321
+ if (configured === "false")
4322
+ return false;
4323
+ throw new Error(`${personalDeviceSyncFeatureEnvironmentName} must be exactly "true" or "false"`);
4324
+ };
4325
+
4307
4326
  // packages/koed-server/dist/cli-command-tree.js
4308
4327
  var runCommandTree = async (args, dependencies = {}) => {
4309
4328
  const stdout = dependencies.stdout ?? process.stdout;
4310
4329
  const stderr = dependencies.stderr ?? process.stderr;
4330
+ let personalDeviceSyncEnabled = false;
4331
+ let personalDeviceSyncDisabledMessage = `Personal Device Sync is disabled in this release. Set ${personalDeviceSyncFeatureEnvironmentName}=true to use it.`;
4332
+ try {
4333
+ personalDeviceSyncEnabled = resolvePersonalDeviceSyncEnabled();
4334
+ } catch (error) {
4335
+ personalDeviceSyncDisabledMessage = error instanceof Error ? error.message : String(error);
4336
+ }
4337
+ const requested = args[0] === "help" ? args[1] : args[0];
4338
+ if (!personalDeviceSyncEnabled && personalDeviceSyncCommandNames.includes(requested ?? "")) {
4339
+ if (args.includes("--json"))
4340
+ stdout.write(`${JSON.stringify({ ok: false, error: personalDeviceSyncDisabledMessage }, null, 2)}
4341
+ `);
4342
+ else
4343
+ stderr.write(`${personalDeviceSyncDisabledMessage}
4344
+ `);
4345
+ return 1;
4346
+ }
4311
4347
  let exitCode = 0;
4312
4348
  const program2 = new Command().name("koed").enablePositionalOptions().description("Manage Koed services and AI Client integrations").version(resolveKoedControlPlaneVersion(), "-V, --version", "Print the Koed version").exitOverride().showSuggestionAfterError(false).configureOutput({
4313
4349
  writeOut: (text) => {
@@ -4351,7 +4387,7 @@ var runCommandTree = async (args, dependencies = {}) => {
4351
4387
  });
4352
4388
  registerPersonalSyncCommands(program2, dependencies, (code) => {
4353
4389
  exitCode = code;
4354
- }, args.includes("--advanced"));
4390
+ }, args.includes("--advanced"), !personalDeviceSyncEnabled);
4355
4391
  program2.addHelpText("after", "\nEnvironment:\n KOED_HOME Local configuration, logs, and runtime state\n KOED_REPO_ROOT Checkout path for development builds\n\nRun koed <command> --help for command help.");
4356
4392
  const configureCommand = (command) => {
4357
4393
  if (command.commands.length)
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-T6UB5PNX.js";
5
5
  import {
6
6
  productionComponentManifestCatalog
7
- } from "./chunk-ZUDSZGVO.js";
7
+ } from "./chunk-XCO3RV3Z.js";
8
8
  import {
9
9
  canonicalArtifactJson,
10
10
  extractVerifiedPackageArchive,
@@ -13,7 +13,7 @@ import {
13
13
  verifyComponent,
14
14
  verifyComponentManifestPin,
15
15
  verifyExtractedComponent
16
- } from "./chunk-ZIOKV2X6.js";
16
+ } from "./chunk-7HLNJ2BI.js";
17
17
  import {
18
18
  lookupManifestPin,
19
19
  validateManifestCatalog
@@ -28,6 +28,7 @@ import { dirname as dirname2, isAbsolute as isAbsolute3, parse as parse2, relati
28
28
  import { createHash } from "node:crypto";
29
29
  import { closeSync, constants, lstatSync, openSync, readFileSync, readlinkSync, readdirSync, realpathSync } from "node:fs";
30
30
  import { isAbsolute, relative, resolve, sep } from "node:path";
31
+ import process2 from "node:process";
31
32
  var issuedCapabilities = /* @__PURE__ */ new WeakSet();
32
33
  var hash = (bytes) => createHash("sha256").update(bytes).digest("hex");
33
34
  function validateDesktopRuntimeManifest(value) {
@@ -57,7 +58,41 @@ var regularFile = (path) => {
57
58
  closeSync(fd);
58
59
  }
59
60
  };
60
- function verifyDesktopRuntimeBundle(resourcesPath) {
61
+ var isWithin = (root, path) => {
62
+ const rel = relative(root, path);
63
+ return rel === "" || !!rel && !rel.startsWith(`..${sep}`) && rel !== ".." && !isAbsolute(rel);
64
+ };
65
+ function resolveDesktopInstallationPath(actualResources, environment = process2.env) {
66
+ const image = environment.APPIMAGE?.trim();
67
+ const mount = environment.APPDIR?.trim();
68
+ if (!image || !mount || !isAbsolute(image) || !isAbsolute(mount))
69
+ return actualResources;
70
+ let actualMount;
71
+ let actualImage;
72
+ try {
73
+ actualMount = realpathSync.native(mount);
74
+ actualImage = realpathSync.native(image);
75
+ } catch {
76
+ return actualResources;
77
+ }
78
+ if (!isWithin(actualMount, actualResources) || !lstatSync(actualImage).isFile())
79
+ return actualResources;
80
+ return actualImage;
81
+ }
82
+ function resolveDesktopInstallationResources(installationPath, environment = process2.env) {
83
+ if (!isAbsolute(installationPath))
84
+ throw new Error("Desktop installation path is invalid");
85
+ if (lstatSync(installationPath, { throwIfNoEntry: false })?.isDirectory())
86
+ return installationPath;
87
+ const mount = environment.APPDIR?.trim();
88
+ if (!mount || !isAbsolute(mount))
89
+ throw new Error("Desktop installation is not the running AppImage");
90
+ const resources = resolve(realpathSync.native(mount), "resources");
91
+ if (resolveDesktopInstallationPath(realpathSync.native(resources), environment) !== installationPath)
92
+ throw new Error("Desktop installation is not the running AppImage");
93
+ return resources;
94
+ }
95
+ function verifyDesktopRuntimeBundle(resourcesPath, environment = process2.env) {
61
96
  const actualResources = realpathSync.native(resolve(resourcesPath));
62
97
  const runtimeRoot = resolve(actualResources, "koed-runtime");
63
98
  const manifestPath = resolve(runtimeRoot, "desktop-bundle-manifest.json");
@@ -110,6 +145,7 @@ function verifyDesktopRuntimeBundle(resourcesPath) {
110
145
  });
111
146
  const capability = Object.freeze({
112
147
  resourcesPath: actualResources,
148
+ installationPath: resolveDesktopInstallationPath(actualResources, environment),
113
149
  productVersion: record.productVersion,
114
150
  bundleDigest: hash(canonicalArtifactJson(record)),
115
151
  manifest: verifiedManifest,
@@ -132,7 +168,7 @@ function resolveDesktopRuntimeOwner(capability, koedHome) {
132
168
  if (!validateDesktopRuntimeCapability(capability)) {
133
169
  throw new Error("validated private Desktop runtime capability is required");
134
170
  }
135
- return deriveDesktopRuntimeOwner(koedHome, capability.resourcesPath);
171
+ return deriveDesktopRuntimeOwner(koedHome, capability.installationPath);
136
172
  }
137
173
 
138
174
  // packages/koed-server/dist/component-store.js
@@ -292,7 +328,7 @@ var acquireDirectoryLock = (path) => {
292
328
  };
293
329
 
294
330
  // packages/koed-server/dist/component-runtime-identity.js
295
- import process2 from "node:process";
331
+ import process3 from "node:process";
296
332
  var isVersion = (value) => typeof value === "string" && /^(?:0|[1-9]\d*)(?:\.(?:0|[1-9]\d*)){1,2}$/.test(value) && value.split(".").every((part) => Number.isSafeInteger(Number(part)));
297
333
  function discoverRuntimeIdentityFromProcess(source) {
298
334
  const platform = source.platform === "darwin" ? "macos" : source.platform === "linux" ? "linux" : void 0;
@@ -323,7 +359,7 @@ function discoverRuntimeIdentityFromProcess(source) {
323
359
  };
324
360
  }
325
361
  function discoverActualRuntimeIdentity() {
326
- return discoverRuntimeIdentityFromProcess(process2);
362
+ return discoverRuntimeIdentityFromProcess(process3);
327
363
  }
328
364
 
329
365
  // packages/koed-server/dist/component-store.js
@@ -869,8 +905,8 @@ var readDesktopPrivacyGeneration = async (paths, id, record) => {
869
905
  ]) || record.schemaVersion !== 1 || record.kind !== "desktop-bundle-with-privacy" || record.id !== id || typeof record.productVersion !== "string" || typeof record.resourcesPath !== "string" || typeof record.bundleDigest !== "string" || !/^[a-f0-9]{64}$/.test(record.bundleDigest) || !isPlainRecord(record.privacy) || !exactKeys(record.privacy, ["root", "manifestDigest"]) || typeof record.privacy.root !== "string" || typeof record.privacy.manifestDigest !== "string")
870
906
  throw new Error("stored Desktop privacy generation record is invalid");
871
907
  validateOwner(record.owner);
872
- const bundle = verifyDesktopRuntimeBundle(record.resourcesPath);
873
- if (bundle.productVersion !== record.productVersion || bundle.bundleDigest !== record.bundleDigest)
908
+ const bundle = verifyDesktopRuntimeBundle(resolveDesktopInstallationResources(record.resourcesPath));
909
+ if (bundle.installationPath !== record.resourcesPath || bundle.productVersion !== record.productVersion || bundle.bundleDigest !== record.bundleDigest)
874
910
  throw new Error("Desktop runtime bundle changed after generation staging");
875
911
  const runtime = discoverActualRuntimeIdentity();
876
912
  const privacyRoot = resolve2(paths.koedHome, record.privacy.root);
@@ -888,7 +924,7 @@ var readDesktopPrivacyGeneration = async (paths, id, record) => {
888
924
  kind: "desktop-bundle-with-privacy",
889
925
  productVersion: bundle.productVersion,
890
926
  owner: record.owner,
891
- resourcesPath: bundle.resourcesPath,
927
+ resourcesPath: bundle.installationPath,
892
928
  bundleDigest: bundle.bundleDigest,
893
929
  privacy: {
894
930
  root: relative2(paths.koedHome, privacy.root),
@@ -1071,6 +1107,7 @@ import { closeSync as closeSync3, mkdirSync as mkdirSync3, openSync as openSync3
1071
1107
  import { spawnSync } from "node:child_process";
1072
1108
  import { hostname } from "node:os";
1073
1109
  import { resolve as resolve3 } from "node:path";
1110
+ var isSourceOwner = (value) => typeof value === "object" && value !== null && Object.keys(value).length === 2 && "kind" in value && value.kind === "standalone" && "installationId" in value && typeof value.installationId === "string" && /^[a-f0-9]{32}$/.test(value.installationId);
1074
1111
  var processIsRunning = (pid) => {
1075
1112
  if (!Number.isInteger(pid) || pid <= 0)
1076
1113
  return false;
@@ -1132,9 +1169,12 @@ var readSupervisorLock = (lockPath2) => {
1132
1169
  var parseSupervisorLock = (text) => {
1133
1170
  try {
1134
1171
  const value = JSON.parse(text);
1172
+ if (value.sourceOwner !== void 0 && !isSourceOwner(value.sourceOwner))
1173
+ return null;
1135
1174
  return Number.isInteger(value.pid) && Number(value.pid) > 0 ? {
1136
1175
  pid: Number(value.pid),
1137
1176
  acquiredAt: String(value.acquiredAt ?? "unknown"),
1177
+ ...value.sourceOwner ? { sourceOwner: { ...value.sourceOwner } } : {},
1138
1178
  ...typeof value.processIdentity === "string" && value.processIdentity.length > 0 ? { processIdentity: value.processIdentity } : {}
1139
1179
  } : null;
1140
1180
  } catch {
@@ -1143,6 +1183,8 @@ var parseSupervisorLock = (text) => {
1143
1183
  };
1144
1184
  var acquireKoedServerSupervisorLock = (paths, options = {}) => {
1145
1185
  const pid = options.pid ?? process.pid;
1186
+ if (options.sourceOwner !== void 0 && !isSourceOwner(options.sourceOwner))
1187
+ throw new Error("Source runtime owner must identify a standalone control plane.");
1146
1188
  const exclusive = options.exclusive ?? ((action) => action());
1147
1189
  const isRunning = options.isProcessRunning ?? processIsRunning;
1148
1190
  const identify = options.resolveProcessIdentity ?? resolveProcessIdentity;
@@ -1159,7 +1201,8 @@ var acquireKoedServerSupervisorLock = (paths, options = {}) => {
1159
1201
  writeFileSync2(descriptor, `${JSON.stringify({
1160
1202
  pid,
1161
1203
  acquiredAt: (options.now ?? (() => /* @__PURE__ */ new Date()))().toISOString(),
1162
- processIdentity
1204
+ processIdentity,
1205
+ ...options.sourceOwner ? { sourceOwner: options.sourceOwner } : {}
1163
1206
  }, null, 2)}
1164
1207
  `);
1165
1208
  } finally {
@@ -1497,6 +1540,21 @@ var readPinState = (paths) => {
1497
1540
  throw new Error("runtime generation state is invalid");
1498
1541
  return parsed;
1499
1542
  };
1543
+ var removeStaleGenerationPin = (paths) => {
1544
+ let pin;
1545
+ try {
1546
+ pin = readPinState(paths);
1547
+ } catch {
1548
+ return false;
1549
+ }
1550
+ if (!pin)
1551
+ return false;
1552
+ const identity = resolveProcessIdentity(pin.pid);
1553
+ if (identity === pin.processIdentity || !identity && processIsRunning2(pin.pid))
1554
+ return false;
1555
+ rmSync6(generationStatePath(paths), { force: true });
1556
+ return true;
1557
+ };
1500
1558
  var assertOwner = (generation, requester) => {
1501
1559
  if (!sameOwner(generation.owner, requester))
1502
1560
  throw new Error("runtime owner mismatch");
@@ -1546,7 +1604,8 @@ var persistDesktopBundleRecord = (paths, generation, capability) => {
1546
1604
  productVersion: generation.productVersion,
1547
1605
  owner: generation.owner,
1548
1606
  bundleDigest: capability.bundleDigest,
1549
- resourcesPath: capability.resourcesPath
1607
+ // Stable installation identity; see DesktopRuntimeCapability.
1608
+ resourcesPath: capability.installationPath
1550
1609
  };
1551
1610
  try {
1552
1611
  writeFileSync3(path, `${JSON.stringify(record)}
@@ -1569,7 +1628,7 @@ var readDesktopBundleGenerationById = async (paths, id, capability) => {
1569
1628
  if (generation.id !== id)
1570
1629
  throw new Error("runtime owner mismatch");
1571
1630
  const record = JSON.parse(readRegularFile(desktopBundleRecordPath(paths, id)));
1572
- if (!isRecord2(record) || record.schemaVersion !== 1 || record.kind !== "desktop-bundle" || record.id !== generation.id || record.productVersion !== generation.productVersion || record.bundleDigest !== capability.bundleDigest || record.resourcesPath !== capability.resourcesPath || !isRecord2(record.owner) || record.owner.kind !== generation.owner.kind || record.owner.installationId !== generation.owner.installationId)
1631
+ if (!isRecord2(record) || record.schemaVersion !== 1 || record.kind !== "desktop-bundle" || record.id !== generation.id || record.productVersion !== generation.productVersion || record.bundleDigest !== capability.bundleDigest || record.resourcesPath !== capability.installationPath || !isRecord2(record.owner) || record.owner.kind !== generation.owner.kind || record.owner.installationId !== generation.owner.installationId)
1573
1632
  throw new Error("private Desktop bundle generation record is invalid");
1574
1633
  return generation;
1575
1634
  };
@@ -1678,7 +1737,7 @@ function readCurrentDesktopGenerationOrderingEvidence(paths, capability) {
1678
1737
  if (!id)
1679
1738
  throw new Error("no active runtime generation");
1680
1739
  const evidence = readDesktopOrderingJournal(paths, id) ?? readGenerationOrderingEvidence(paths, id);
1681
- if (evidence.kind === "desktop-generation-ordering-evidence" && evidence.resourcesPath !== capability.resourcesPath)
1740
+ if (evidence.kind === "desktop-generation-ordering-evidence" && evidence.resourcesPath !== capability.installationPath)
1682
1741
  throw new Error("runtime owner mismatch");
1683
1742
  assertOwner(evidence, resolveDesktopRuntimeOwner(capability, paths.koedHome));
1684
1743
  return evidence;
@@ -1956,6 +2015,7 @@ export {
1956
2015
  removeStaleRuntimeRecords,
1957
2016
  assertDirectoryChain2 as assertDirectoryChain,
1958
2017
  withLifecycleLock,
2018
+ removeStaleGenerationPin,
1959
2019
  readCurrentGenerationOrderingEvidence,
1960
2020
  readCurrentGeneration,
1961
2021
  readDesktopGenerationForCapability,