import type { PIArtifactSnapshot, CanActivateResult, ChannelWriter, WriterInput, WriterResult, ApprovalEnqueueInput } from '../activation-types.js'; import type { RefinerRuleHostGateDeps } from '../../internalization/refiner-rulehost-gate.js'; import type { ToolSemanticRegistry } from '../../internalization/tool-semantic-registry.js'; export interface RuleHostWriterConfig { gateDeps: RefinerRuleHostGateDeps; /** * PRI-484 — feature flag probe used to gate v2 artifacts. * * Returns `true` if the named flag is enabled, `false` otherwise. When * omitted, all flags are treated as disabled (safe default for the * `quiet`-category `rulecode_context_v2` flag, which defaults to off per * PRI-239). The probe is injected (not imported) so this file stays pure * logic — no I/O, no YAML loader. */ featureFlagProbe?: (flagId: string) => boolean; /** * PRI-634-F — ToolSemanticRegistry supplied by the constructing host. * When present: (1) canActivate runs the deterministic Rule Reliability * Validation (affectedTools + golden-trace toolNames must resolve — * SPEC §9 Tool存在性, adapter/tool_alias_unknown on failure); (2) the * activation gate replays with production-identical tool semantics. * Absent → legacy behavior (no reliability check, baseline replay inputs). */ toolSemantics?: ToolSemanticRegistry; /** * PRI-634-F — replay path-normalization root (the workspace the gate * replays for). When present, golden-trace cases normalize exactly like * the production gate. Absent → legacy null normalizedPath replay. */ projectDir?: string; } /** * PRI-490 — extract and validate the `evidenceRefs` field from parsed artifact * contentJson. Returns the validated `string[]` when present and well-formed, * or `null` when absent / malformed. Callers treat `null` as "no evidenceRefs". * * PRI-491 — exported for reuse by CLI/Console display paths that need to show * evidenceRefs without reimplementing the validation logic (DRY). * * ERR-001/ERR-005 (rc-1/rc-2/rc-4): the parsed value is `unknown`; we never * `as`-cast. Each element is type-narrowed via `typeof` before acceptance. */ export declare function extractEvidenceRefs(parsed: Record): string[] | null; export declare class RuleHostWriter implements ChannelWriter { readonly channel: 'code_tool_hook'; private readonly gateDeps; private readonly featureFlagProbe?; private readonly toolSemantics?; private readonly projectDir?; constructor(config: RuleHostWriterConfig); canActivate(artifact: PIArtifactSnapshot): Promise; activate(input: WriterInput, artifact: PIArtifactSnapshot): Promise; buildApprovalContext(_input: WriterInput, artifact: PIArtifactSnapshot, confidence?: number): Pick; } //# sourceMappingURL=rule-host-writer.d.ts.map