UNPKG

@code-yeongyu/senpi

Version:

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

29 lines • 1.91 kB
/** * `credentialProxy.credentials` (senpi#6820): which engine environment variables are credentials that agent-spawned * processes never receive, and the one upstream each may be used against through the loopback proxy. Read from the * user's global settings only: a project's settings could otherwise point a credential at a host of its choosing. */ export interface CredentialDeclaration { /** The engine environment variable holding the value; agent children get a placeholder instead. */ readonly env: string; /** The only upstream the value is sent to: `https://host[:port][/base/path]` (plain `http` only for loopback). */ readonly origin: string; /** The request header the proxy sets. Default `authorization`. */ readonly header: string; /** Prefix written before the value, separated by one space (`Bearer`). Default: none for custom headers, `Bearer` for `authorization`. */ readonly scheme: string | undefined; /** A child environment variable set to the proxy route, for clients that read a base URL (`OPENAI_BASE_URL`). */ readonly baseUrlEnv: string | undefined; /** When given, only request paths (below `origin`'s path) starting with one of these are forwarded. */ readonly pathPrefixes: readonly string[] | undefined; } export interface ParsedCredentialDeclarations { readonly credentials: readonly CredentialDeclaration[]; /** Every `env` name found, valid entry or not: these are withheld from children even when an entry is rejected. */ readonly withheldNames: readonly string[]; readonly problems: readonly string[]; } /** A path the proxy refuses: dot segments, encoded separators or dots, backslashes. */ export declare function hasUnsafePathSegment(path: string): boolean; export declare function parseCredentialDeclarations(raw: unknown): ParsedCredentialDeclarations; //# sourceMappingURL=declarations.d.ts.map