import { type Command } from 'commander'; import { SSH_TARGET_RE, assertValidSshTarget, type SshExecResult } from '../lib/transports/ssh.js'; import { quoteWin32ExecArg } from '../lib/platform/index.js'; import { bundleEnvToDotenv } from '../lib/secrets/push.js'; export { bundleEnvToDotenv }; import { type SecretsBackend, type SecretsBundle, type SecretsPolicy } from '../lib/secrets/bundles.js'; import { type SecretsListFilterOpts } from '../lib/secrets/list-filter.js'; import { type SecretLease } from '../lib/secrets/lease.js'; import { agentHoldStatus } from '../lib/secrets/agent.js'; import { type BundleUsageSummary, type SecretUsageHistoryEntry } from '../lib/secrets/usage.js'; export declare function readImportDotenv(from: string): string; export type ImportSource = { kind: 'dotenv'; path: string; } | { kind: '1password'; vault?: string; } | { kind: 'icloud'; }; export declare function parseImportSource(opts: { from?: string; from1password?: boolean; vault?: string; }): ImportSource; export declare function resolveUnlockTtlMs(ttl: string | undefined, until: string | undefined, now?: number): number; export declare function parseHoldWindow(value: string): number | null; export declare function scopeHeldEnv(input: { bundle: string; env: Record; keys: string | null; ttlMs: number; harness: string; sleepPersist: boolean; }): { heldEnv: Record; lease?: SecretLease; }; export declare function buildRemoteUnlockArgs(names: string[], opts: { all?: boolean; ttl?: string; until?: string; durable?: boolean; }): string[]; export declare function buildRemoteListArgs(opts: SecretsListFilterOpts & { json?: boolean; sort?: string; limit?: string; }, query?: string): string[]; export { SSH_TARGET_RE, assertValidSshTarget }; export declare function buildSecretsExecEnv(parentEnv: NodeJS.ProcessEnv, secretEnv: Record): NodeJS.ProcessEnv; export declare function exportBundleToFile(env: Record, filePath: string, passphrase: string): void; export declare function importBundleFromFile(filePath: string, passphrase: string): Record; interface HostResult { host: string; res: SshExecResult; } export type HostJsonEntry = { host: string; ok: true; result: unknown; } | { host: string; ok: false; error: string; }; export declare function hostResultsJson(results: HostResult[]): { hosts: HostJsonEntry[]; }; export declare function compactDurationMs(ms: number): string; export declare function renderPromptActivity(e: SecretUsageHistoryEntry, bundle?: string): string; export declare function renderPolicyCol(b: SecretsBundle, holdMs: number, held?: Map): string; export declare function renderHoldSummary(holdStr: string, configured: boolean): string; export declare const NO_BUNDLES_HELD_LINE = "No bundles held. The next read of each hold-policy bundle will prompt once, then hold."; export interface StatusHeldBundle { name: string; keys: number; expiresAt: string; durable: boolean; survives: 'sleep+reboot' | 'restart' | null; } export declare function statusHeldBundles(hold: Awaited>, keysOf: (name: string) => number | null, now?: number): StatusHeldBundle[]; export declare function formatHoldWindow(ms: number): string; export declare function liveHold(expiresAt: number | undefined, now?: number): number | null; export declare function formatUsageLine(summary: BundleUsageSummary | undefined): string; export declare function renderViewStatusLine(b: SecretsBundle, heldExpiresAt: number | null): string; export declare function renderExpiringCol(b: SecretsBundle, now?: number): string; export declare function resolveImportBundle(name: string, backendOpt: string | undefined, synced?: boolean, force?: boolean): SecretsBundle; export declare function registerSecretsCommands(program: Command): void; export declare function parsePolicyOpt(raw: string | undefined): SecretsPolicy; export declare function assertNeverPolicyAcknowledged(policy: SecretsPolicy | undefined, opts: { iUnderstand?: boolean; interactive: boolean; }): 'ok' | 'prompt'; export declare function secretsDefaultBackend(): SecretsBackend; export { quoteWin32ExecArg };