UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

23 lines • 1.54 kB
/** * Generic secret detection for `/share` (#3524): values that match no known * provider shape but look machine-generated. Lowercase hex (commit ids, * digests), UUIDs and ULIDs never qualify, identifiers and slash lists that read * as words are spared, and SRI integrity hashes stay. A token broken across a * line, an escaped newline, a backslash continuation or a string-literal seam is * judged as one value. */ export declare function shannonBitsPerChar(text: string): number; /** * Identifiers are made of words: most of the run is long pronounceable lowercase * pieces (random base62 almost never has runs of 3+ lowercase letters) and the * letters carry English vowel density (random letters run at about 19%). */ export declare function readsAsWords(run: string, coverage?: number): boolean; /** Mixed case, high per-character entropy for its length, and not words or a path. */ export declare function looksGenerated(run: string): boolean; /** Whether `head + tail`, joined across a gap, is one generated value. Shared by text and structured redaction. */ export declare function joinedLooksGenerated(head: string, tail: string): boolean; export declare function redactGeneratedValues(text: string, onRedact: () => void): string; /** Two adjacent strings (text blocks, array items) whose touching ends form one generated value lose both ends. */ export declare function redactAcrossBoundary(left: string, right: string, onRedact: () => void): readonly [string, string]; //# sourceMappingURL=share-entropy.d.ts.map