UNPKG

@vigilbase/cli

Version:

Vigilbase CLI — security scanners, agent tools, and Vigilbase One from the terminal.

29 lines (28 loc) • 1.44 kB
import type { CliConfig } from '../lib/config.js'; import { type OriginOption } from '../lib/network.js'; import type { DpopKey, KeyBinding } from './dpop-key.js'; export declare function dpopNow(): number; export declare function isDpopToken(tokenType?: string): boolean; /** token-binding.md §7: CLI keys are stored on the device, never in a security chip, so both read Key-protected. */ export declare function bindingDescription(_binding: KeyBinding): { label: string; detail: string; }; export declare function bindingUserAgent(userAgent: string, key?: DpopKey): string; /** RFC 9449 excludes query and fragment; retain the called host, path and percent encoding. */ export declare function dpopHtu(input: string): string; export declare function createDpopProof(key: DpopKey, method: string, url: string, accessToken?: string): Promise<string>; export declare function isDpopProofError(response: Response, text: string): boolean; export declare function correctDpopClock(response: Response, text: string): boolean; export type DpopAuthentication = { key?: DpopKey; accessToken?: string; tokenType?: string; }; /** Reproof once only after a definite DPoP rejection. A lost refresh response is never retried. */ export declare function requestWithDpop(config: CliConfig, url: string, init: RequestInit & { option?: OriginOption; }, auth: DpopAuthentication): Promise<{ response: Response; text: string; }>;