import type { Agent } from '@deepseek-ai/dsh-agent'; import type { BlockLike, GuardAction, Logger, PolicyEngine, RedactionHit, Redactor } from '../contracts.js'; import type { GuardConfig } from '../config.js'; import type { AuditLog } from '../audit.js'; import type { EgressController } from '../egress/index.js'; import type { GuardLocale } from '../locale.js'; /** Shared, immutable services used by every hook. */ export interface GuardRuntime { config: GuardConfig; redactor: Redactor; policy: PolicyEngine; audit: AuditLog; logger: Logger; /** Active DSH language; resolved per prompt so a settings change is live. */ locale: () => GuardLocale; /** Present only when `egress.enabled`; mounted asynchronously at startup. */ egress?: EgressController; } /** Session id for audit correlation; never the session content. */ export declare function sessionIdOf(agent?: Agent | undefined): string | undefined; /** The host presents subagents as separate sessions; map to the rule vocabulary. */ export declare function agentKindOf(agent?: Agent | undefined): 'main' | 'subagent'; /** Content blocks are structurally compatible with the guard's narrow view. */ export declare function asBlocks(content: readonly unknown[]): readonly BlockLike[]; /** Convert rewritten structural blocks back to the host's content type. */ export declare function asContent(blocks: BlockLike[]): T; /** Emit one redact audit record per category. */ export declare function recordRedactions(runtime: GuardRuntime, phase: 'pre-step' | 'post-execute' | 'ptc-log' | 'system-prompt', hits: readonly RedactionHit[], context: { session?: string | undefined; tool?: string | undefined; spillBypassed?: boolean; truncated?: boolean; }): void; /** Human-readable action label for the audit record. */ export declare function auditAction(action: GuardAction): 'allowed' | 'blocked' | 'asked'; //# sourceMappingURL=runtime.d.ts.map