/**
 * Shared structural types + tiny helpers used across the apply pipeline
 * (desired-state IR, wire client, diff, apply-cmd).
 *
 * Only shapes that are genuinely IDENTICAL on both sides of the wire belong
 * here — anything that encodes a server-specific response shape stays a
 * `Remote*` type in client.ts.
 */
export function isRecord(value) {
    return typeof value === "object" && value !== null && !Array.isArray(value);
}
/**
 * Keys of locally-declared connector definitions whose key is already known.
 * A `null` key (an auto-discovered `*.connector.ts` the server compiles) can't
 * be in the set — the key is only resolved at install time.
 */
export function declaredConnectorKeys(definitions) {
    return new Set(definitions.map((d) => d.key).filter((k) => !!k));
}
/** Connector keys referenced by desired auth profiles and connections. */
export function referencedConnectorKeys(connectors) {
    return new Set([
        ...connectors.authProfiles.map((p) => p.connector),
        ...connectors.connections.map((c) => c.connector),
    ]);
}
//# sourceMappingURL=shared.js.map