/** * ClipboardService — cross-platform clipboard writes for caught codes/links. * Zero npm deps, mirroring NotifierService's native-tool approach. * * Secrets are ALWAYS piped via stdin — never argv (visible in `ps`), and * never through sanitizeForShell (it would corrupt link tokens). * * macOS primary path is a JXA script that marks the pasteboard item with * `org.nspasteboard.ConcealedType` — the convention password managers use so * clipboard-history apps (Maccy etc.) skip recording it. `pbcopy` cannot set * that type, so it is only the fallback. See https://nspasteboard.org/. */ export interface ClipboardWriteResult { ok: boolean; concealed: boolean; error?: string; } export interface ClipboardDiagnostics { platform: string; supported: boolean; writeTool: { name: string; available: boolean; }; readTool: { name: string; available: boolean; }; /** Whether writes can be hidden from clipboard managers on this platform. */ concealedSupported: boolean; issues: string[]; setupInstructions: string[]; } export default class ClipboardService { private readonly platform; private writeCount; private rateResetTimer; private clearTimer; private lastWritten; constructor(opts?: { platform?: NodeJS.Platform; }); /** * (Re)arm the rate-limit reset interval. Self-healing: stop() clears it * (e.g. when the verification catcher is disabled at runtime), and a later * re-enable must not leave writes permanently rate-limited. */ private ensureRateTimer; stop(): void; /** * Copy `text`, concealed from clipboard managers where the platform allows. * With `clearAfterSeconds > 0`, the clipboard is cleared after the delay — * but only if it still holds `text`, so a newer user copy is never stomped. */ copyConcealed(text: string, opts?: { clearAfterSeconds?: number; }): Promise; /** Current clipboard text, or undefined when unreadable. */ read(): Promise; /** Overwrite the clipboard with an empty string. */ clear(): Promise; private clearIfUnchanged; private write; /** Un-concealed write with the platform's plain tool (also used to clear). */ private plainWrite; static checkPlatformSupport(): Promise; } //# sourceMappingURL=clipboard.service.d.ts.map