MCPcopy Index your code
hub / github.com/callstack/agent-device / isCompatibleConnection

Function isCompatibleConnection

src/cli/commands/connection.ts:478–495  ·  view source on GitHub ↗
(
  state: RemoteConnectionState,
  options: {
    flags: CliFlags;
    session: string;
    remoteConfigPath: string;
    remoteConfigHash: string;
    desiredLeaseBackend?: LeaseBackend;
    connection?: RemoteConnectionRequestMetadata;
    daemon: RemoteConnectionState['daemon'];
  },
)

Source from the content-addressed store, hash-verified

476}
477
478function isCompatibleConnection(
479 state: RemoteConnectionState,
480 options: {
481 flags: CliFlags;
482 session: string;
483 remoteConfigPath: string;
484 remoteConfigHash: string;
485 desiredLeaseBackend?: LeaseBackend;
486 connection?: RemoteConnectionRequestMetadata;
487 daemon: RemoteConnectionState['daemon'];
488 },
489): boolean {
490 return (
491 requiredConnectionFieldsMatch(state, options) &&
492 optionalConnectionFieldsMatch(state, options) &&
493 isSameDaemonState(state.daemon, options.daemon)
494 );
495}
496
497function requiredConnectionFieldsMatch(
498 state: RemoteConnectionState,

Callers 1

Calls 3

isSameDaemonStateFunction · 0.85

Tested by

no test coverage detected