import { joinRequests } from "@rudderhq/db";
import type { Request } from "express";
export declare function hashToken(token: string): string;
export declare const INVITE_TOKEN_PREFIX = "pcp_invite_";
export declare const INVITE_TOKEN_ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789";
export declare const INVITE_TOKEN_SUFFIX_LENGTH = 8;
export declare const INVITE_TOKEN_MAX_RETRIES = 5;
export declare const COMPANY_INVITE_TTL_MS: number;
export declare function createInviteToken(): string;
export declare function createClaimSecret(): string;
export declare function companyInviteExpiresAt(nowMs?: number): Date;
export declare function tokenHashesMatch(left: string, right: string): boolean;
export declare function requestBaseUrl(req: Request): string;
export declare function buildCliAuthApprovalPath(challengeId: string, token: string): string;
export declare function readSkillMarkdown(skillName: string): string | null;
/** Resolve the Rudder repo skill directory (built-in / managed skills). */
export declare function resolveRudderSkillsDir(): string | null;
/** Parse YAML frontmatter from a SKILL.md file to extract the description. */
export declare function parseSkillFrontmatter(markdown: string): {
    description: string;
};
export interface AvailableSkill {
    name: string;
    description: string;
    isRudderManaged: boolean;
}
/** Discover user-installed Claude Code skills from ~/.claude/skills/. */
export declare function listAvailableSkills(): AvailableSkill[];
export declare function toJoinRequestResponse(row: typeof joinRequests.$inferSelect): {
    id: string;
    orgId: string;
    status: string;
    createdAt: Date;
    updatedAt: Date;
    agentRuntimeType: string | null;
    capabilities: string | null;
    requestType: string;
    agentName: string | null;
    agentDefaultsPayload: Record<string, unknown> | null;
    approvedByUserId: string | null;
    approvedAt: Date | null;
    inviteId: string;
    requestIp: string;
    requestingUserId: string | null;
    requestEmailSnapshot: string | null;
    claimSecretExpiresAt: Date | null;
    claimSecretConsumedAt: Date | null;
    createdAgentId: string | null;
    rejectedByUserId: string | null;
    rejectedAt: Date | null;
};
export type JoinDiagnostic = {
    code: string;
    level: "info" | "warn";
    message: string;
    hint?: string;
};
export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
export declare function isLoopbackHost(hostname: string): boolean;
export declare function normalizeHostname(value: string | null | undefined): string | null;
export declare function normalizeHeaderValue(value: unknown, depth?: number): string | null;
export declare function extractHeaderEntries(input: unknown): Array<[string, unknown]>;
export declare function normalizeHeaderMap(input: unknown): Record<string, string> | undefined;
export declare function nonEmptyTrimmedString(value: unknown): string | null;
export declare function headerMapHasKeyIgnoreCase(headers: Record<string, string>, targetKey: string): boolean;
export declare function headerMapGetIgnoreCase(headers: Record<string, string>, targetKey: string): string | null;
export declare function tokenFromAuthorizationHeader(rawHeader: string | null): string | null;
export declare function parseBooleanLike(value: unknown): boolean | null;
export declare function generateEd25519PrivateKeyPem(): string;
export declare function buildJoinDefaultsPayloadForAccept(input: {
    agentRuntimeType: string | null;
    defaultsPayload: unknown;
    rudderApiUrl?: unknown;
    paperclipApiUrl?: unknown;
    inboundOpenClawAuthHeader?: string | null;
    inboundOpenClawTokenHeader?: string | null;
}): unknown;
export declare function mergeJoinDefaultsPayloadForReplay(existingDefaultsPayload: unknown, nextDefaultsPayload: unknown): unknown;
export declare function canReplayOpenClawGatewayInviteAccept(input: {
    requestType: "human" | "agent";
    agentRuntimeType: string | null;
    existingJoinRequest: Pick<typeof joinRequests.$inferSelect, "requestType" | "agentRuntimeType" | "status"> | null;
}): boolean;
export declare function summarizeSecretForLog(value: unknown): {
    present: true;
    length: number;
    sha256Prefix: string;
} | null;
export declare function summarizeOpenClawGatewayDefaultsForLog(defaultsPayload: unknown): {
    present: boolean;
    keys: string[];
    url: string | null;
    rudderApiUrl: string | null;
    headerKeys: string[];
    sessionKeyStrategy: string | null;
    disableDeviceAuth: boolean | null;
    waitTimeoutMs: number | null;
    devicePrivateKeyPem: {
        present: true;
        length: number;
        sha256Prefix: string;
    } | null;
    gatewayToken: {
        present: true;
        length: number;
        sha256Prefix: string;
    } | null;
};
//# sourceMappingURL=access.helpers.d.ts.map