/** * Signed open-links of Crewly Apps (specs/2026-10-04-crewly-apps-p3.md ยง1). * * Cloud mints `https://apps.crewlyai.com/?k=`: whoever holds * it opens the app as the owner until it expires or is revoked. So the * token goes to exactly one place, the owner-only card, and nowhere else: * not into an agent's output, not into a log, not into the Slack context an * agent is shown later. These helpers recognise and redact it. * * @module services/apps/app-open-link */ /** A freshly minted link as Cloud returns it (`POST /apps/:id/open-links`). */ export interface MintedOpenLink { linkId: string; url: string; expiresAt: string; } /** One link as Cloud lists it (`GET /apps/:id/open-links`); never carries a token. */ export interface OpenLinkInfo { linkId: string; createdAt: string | null; expiresAt: string | null; revokedAt: string | null; lastUsedAt: string | null; uses: number; active: boolean; createdBy: string | null; } /** * Replace every open-link token in text with `[redacted]`. * * @param text - Any text (a log line, a context line, a JSON string) * @returns The text with tokens removed; other text unchanged */ export declare function redactOpenLinkTokens(text: string): string; /** * Whether text still carries an open-link token (tests, assertions). * * @param text - Text * @returns True when a token is present */ export declare function hasOpenLinkToken(text: string): boolean; /** * Check a link Cloud minted before it is posted: it must open exactly this * app on the apps origin, with a token. Anything else (an old Cloud, a * changed origin) is treated as a failed mint, and the plain card goes out. * * @param appId - The app the link is for * @param minted - Cloud's answer * @returns The link, or null when it is not usable */ export declare function usableMintedLink(appId: string, minted: unknown): MintedOpenLink | null; /** * Cloud's link list reduced to the documented fields: whatever else Cloud * might add (a URL, a token) never reaches the caller. * * @param list - Cloud's answer * @returns Links */ export declare function toOpenLinkInfos(list: unknown): OpenLinkInfo[]; //# sourceMappingURL=app-open-link.d.ts.map