@adhdev/daemon-core 0.8.50 → 0.8.52

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/index.mjs CHANGED
@@ -11482,6 +11482,16 @@ var AcpProviderInstance = class {
11482
11482
 
11483
11483
  // src/commands/cli-manager.ts
11484
11484
  init_logger();
11485
+
11486
+ // src/commands/hosted-runtime-restore.ts
11487
+ function shouldRestoreHostedRuntime(record, managerTag) {
11488
+ if (!managerTag) return true;
11489
+ const managedBy = typeof record.managedBy === "string" ? record.managedBy.trim() : "";
11490
+ if (!managedBy) return true;
11491
+ return managedBy === managerTag;
11492
+ }
11493
+
11494
+ // src/commands/cli-manager.ts
11485
11495
  var chalkModule = chalk;
11486
11496
  var chalkApi = typeof chalkModule.yellow === "function" ? chalkModule : chalkModule.default || null;
11487
11497
  function colorize(color, text) {
@@ -11977,8 +11987,16 @@ Run 'adhdev doctor' for detailed diagnostics.`
11977
11987
  const sessions = records || await this.deps.listHostedCliRuntimes?.() || [];
11978
11988
  let restored = 0;
11979
11989
  const restoredBindings = /* @__PURE__ */ new Set();
11990
+ const managerTag = this.deps.hostedRuntimeManagerTag;
11980
11991
  for (const record of sessions) {
11981
11992
  if (!record?.runtimeId || !record?.cliType || !record?.workspace) continue;
11993
+ if (!shouldRestoreHostedRuntime(record, managerTag)) {
11994
+ LOG.info(
11995
+ "CLI",
11996
+ `\u21B7 Skipping hosted runtime restore owned by ${record.managedBy}: ${record.runtimeKey || record.runtimeId}`
11997
+ );
11998
+ continue;
11999
+ }
11982
12000
  if (this.adapters.has(record.runtimeId) || instanceManager.getInstance(record.runtimeId)) continue;
11983
12001
  const normalizedType = this.providerLoader.resolveAlias(record.cliType);
11984
12002
  const providerMeta = this.providerLoader.getMeta(normalizedType);
@@ -21928,7 +21946,8 @@ async function listHostedCliRuntimes(endpoint) {
21928
21946
  cliType: record.providerType,
21929
21947
  workspace: record.workspace,
21930
21948
  cliArgs: Array.isArray(record.meta?.cliArgs) ? record.meta.cliArgs : [],
21931
- providerSessionId: typeof record.meta?.providerSessionId === "string" ? String(record.meta.providerSessionId) : void 0
21949
+ providerSessionId: typeof record.meta?.providerSessionId === "string" ? String(record.meta.providerSessionId) : void 0,
21950
+ managedBy: typeof record.meta?.managedBy === "string" ? String(record.meta.managedBy) : void 0
21932
21951
  }));
21933
21952
  } finally {
21934
21953
  await client.close().catch(() => {