import { type VoiceFormat, type VoiceScope } from "../lib/voice-corpus.js"; /** One enumerated `n.format` value from the discovery walk, with its node count. */ export interface FormatDropRow { value: string; count: number; } /** Discovery-walk formats split into in-enum `kept` and out-of-enum `rejected`. */ export interface FormatPartition { kept: VoiceFormat[]; rejected: FormatDropRow[]; } /** * Partition the enumerated `{ value, count }` rows from the format-discovery * walk into `kept` (values in `FORMAT_VALUES`, which feed distillation) and * `rejected` (values outside the enum). Pure: no I/O. * * Task 1798: rejected values used to be dropped by a bare `.filter()` with no * trace. Surfacing them here lets the caller emit an audible drop line. */ export declare function partitionEnumeratedFormats(rows: FormatDropRow[]): FormatPartition; /** * Build the single stderr diagnostic naming each rejected format and its node * count, or `null` when nothing was rejected (the caller emits nothing). One * line per discovery walk, not per node: the count is the diagnostic, so an * operator greps the value on the graph rather than the log carrying ids. */ export declare function formatDropLine(scope: VoiceScope, userId: string, rejected: FormatDropRow[]): string | null; export interface VoiceDistilProfileParams { accountId: string; userId: string; /** * Profile scope (Task 676). `'personal'` (default) distils the operator's * own author-filtered corpus onto `:AdminUser`; `'org'` distils the whole * account onto `:LocalBusiness` under the reserved sentinel userId. */ scope?: VoiceScope; force?: boolean; /** * Writing format to distil. When omitted on `sample`, enumerates distinct * format values in the corpus and distils each that fires the cadence * guard. Required on `amend` and `write`. */ format?: VoiceFormat; /** * Operation mode: * - `'sample'` (default, Task 424) — walk the full per-format corpus and * return exemplars + feedback intents. No write. The calling agent * composes the style-card YAML in-turn. * - `'write'` (Task 424) — persist the style card the agent produced. * Requires `styleCardYaml`. Optional `amendedFromNodeIds` adds * `LEARNED_FROM` edges to the named nodes (additive — MERGE preserves * prior edges). * - `'amend'` (Task 472) — operator-initiated incremental update from * one or more named documents. Reads only those nodes plus the * existing `:VoiceProfile.styleCard` so the agent can decide whether * the document moves the profile. Format predicate is dropped on the * read (the operator picked the docs); `authorshipMode` + trashed + * label predicates still apply per-document. Cadence guard does not * apply. */ mode?: "sample" | "write" | "amend"; /** Required when `mode='write'`. The style-card YAML produced by the agent. */ styleCardYaml?: string; /** * Required when `mode='amend'`. ElementIds of the documents to fold into * the profile. Each id is eligibility-checked; ineligible ones are * reported in the return payload (the agent surfaces them to the operator). */ nodeIds?: string[]; /** * Optional on `mode='write'` after an `amend` sample. ElementIds the * agent decided moved the profile. Each becomes a `LEARNED_FROM` edge * from the persisted `:VoiceProfile`. Additive — pre-existing edges * remain via `MERGE`. */ amendedFromNodeIds?: string[]; } export interface VoiceCorpusExemplar { id: string; label: string; body: string; } export interface VoiceDistilProfileResult { profileId: string | null; corpusSize: number; generatedAt: string | null; feedbackEntries: number; skipped: boolean; /** Present only on the multi-format path: the format this result was distilled for. */ format?: VoiceFormat; skipReason?: "below-threshold" | "recent" | "empty-corpus" | "missing-style-card" | "no-format-tagged-content" | "amend-no-eligible-documents"; errorReason?: string; /** Present when `mode='sample'` or `mode='amend'`: corpus exemplars for the agent to read. */ exemplars?: VoiceCorpusExemplar[]; /** Present when `mode='sample'` or `mode='amend'`: operator-edit intents to fold into the style card. */ feedbackIntents?: string[]; /** * Present when `mode='amend'`: the current `:VoiceProfile.styleCard` (or * null if no profile exists yet) so the agent can compare the named * documents against the prior card and decide update-or-skip. */ existingStyleCard?: string | null; /** Present when `mode='amend'`: count of input nodeIds that passed eligibility. */ eligible?: number; /** * Present when `mode='amend'`: per-input-id ineligibility records. Each * entry names the nodeId and the first failing predicate so the agent * can tell the operator which documents were rejected and why. */ ineligible?: { nodeId: string; reason: string; }[]; } export declare function voiceDistilProfile(params: VoiceDistilProfileParams): Promise; //# sourceMappingURL=voice-distil-profile.d.ts.map