agent-transport-system 0.7.15 → 0.7.16

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/ats.js CHANGED
@@ -27,7 +27,7 @@ import wrapAnsi from "wrap-ansi";
27
27
  import { Box, Container, Editor, Key, ProcessTerminal, TUI, Text, getEditorKeybindings, matchesKey } from "@mariozechner/pi-tui";
28
28
 
29
29
  //#region package.json
30
- var version = "0.7.15";
30
+ var version = "0.7.16";
31
31
  var package_default = {
32
32
  $schema: "https://www.schemastore.org/package.json",
33
33
  name: "agent-transport-system",
@@ -24480,8 +24480,7 @@ async function resolveCurrentReplyReadinessSnapshot(input = {}) {
24480
24480
  daemonStatus,
24481
24481
  runtimeStatus: displayRuntimeStatus ?? runtimeStatus
24482
24482
  }));
24483
- const shouldProbeGatewayChain = input.checkGatewayChain === true && !localDeviceReplyReadiness.reasonCodes.some((reasonCode) => reasonCode === "service.drifted" || reasonCode === "service.not_installed" || reasonCode === "service.not_running" || reasonCode === "workspace.invalid" || reasonCode === "workspace.missing");
24484
- const gatewayChainReadiness = shouldProbeGatewayChain ? await resolveGatewayChainReadiness({
24483
+ const gatewayChainReadiness = input.checkGatewayChain === true && !isWakeableLocalReplyReady(localDeviceReplyReadiness) && !localDeviceReplyReadiness.reasonCodes.some((reasonCode) => reasonCode === "service.drifted" || reasonCode === "service.not_installed" || reasonCode === "service.not_running" || reasonCode === "workspace.invalid" || reasonCode === "workspace.missing") ? await resolveGatewayChainReadiness({
24485
24484
  baseUrl: input.baseUrl,
24486
24485
  profile: input.gatewayChainProfile ?? (input.profile ? {
24487
24486
  atsProfileId: input.profile.atsProfileId,
@@ -24489,22 +24488,7 @@ async function resolveCurrentReplyReadinessSnapshot(input = {}) {
24489
24488
  } : null),
24490
24489
  timeoutMs: input.gatewayChainTimeoutMs
24491
24490
  }).catch(() => null) : null;
24492
- const deviceReplyReadiness = shouldProbeGatewayChain && gatewayChainReadiness ? await resolveDeviceReplyReadinessStatus({
24493
- baseUrl: input.baseUrl,
24494
- checkGatewayChain: true,
24495
- gatewayChainProfile: input.gatewayChainProfile,
24496
- gatewayChainReadiness,
24497
- gatewayChainTimeoutMs: input.gatewayChainTimeoutMs,
24498
- inventory,
24499
- localDemand,
24500
- ownerUserId: input.ownerUserId ?? input.profile?.ownerUserId ?? null,
24501
- profile: input.profile ?? null,
24502
- profileWorkspaceRuntimeResolution,
24503
- runtimeProjection,
24504
- runtimeStatus: displayRuntimeStatus ?? runtimeStatus,
24505
- runtimeWorkdir: input.runtimeWorkdir,
24506
- status: daemonStatus
24507
- }).catch(() => localDeviceReplyReadiness) : localDeviceReplyReadiness;
24491
+ const deviceReplyReadiness = localDeviceReplyReadiness;
24508
24492
  const openClawLocalDiagnostics = await resolveOpenClawLocalDiagnosticsForSnapshot({
24509
24493
  baseUrl: input.baseUrl,
24510
24494
  mode: input.openClawDiagnosticsMode ?? null,
@@ -24537,6 +24521,9 @@ async function resolveCurrentReplyReadinessSnapshot(input = {}) {
24537
24521
  profileWorkspaceRuntimeResolution
24538
24522
  };
24539
24523
  }
24524
+ function isWakeableLocalReplyReady(localDeviceReplyReadiness) {
24525
+ return localDeviceReplyReadiness.replyReadiness === "ready" && localDeviceReplyReadiness.wakeableRouteCount > 0;
24526
+ }
24540
24527
  function resolveRuntimeProjectionForSnapshot(input) {
24541
24528
  if (!input.daemonStatus.installed) return Promise.resolve(null);
24542
24529
  if (input.runtimeProjection !== void 0) return Promise.resolve(input.runtimeProjection);