import { type AuthorDraft } from "../bot/skill-manager.js"; export interface TrajectorySuggestion { /** Stable id derived from (sequence + workflow template) hash + first-seen ts. */ suggestion_id: string; /** Ordered list of "team/agent" references. */ agent_sequence: string[]; /** Workflow template label (e.g. "pmf", "feature", "rapid-prototype"). */ workflow_template: string; /** How many times this trajectory was observed in the window. */ observation_count: number; /** ISO of the earliest observation in the window. */ first_seen: string; /** ISO of the latest observation in the window. */ last_seen: string; /** Frequency keywords harvested from the spawn_decision rationales. */ keywords: string[]; /** Confidence — fixed at 0.7 per §3.2 narrative. */ confidence: number; /** Source tag for the SKILL frontmatter `source:` field. */ source: string; } export interface ExtractOpts { workspace: string; orgSlug: string; /** Override "now" for deterministic tests. */ now?: string; /** Override window — defaults to 30. */ windowDays?: number; /** Override min observation count — defaults to 3. */ minCount?: number; } export interface SuggestionRejection { suggestion_id: string; /** ISO of the rejection. */ ts: string; reason?: string; } export declare function extractTrajectories(opts: ExtractOpts): Promise; export interface ApplySuggestionInput { workspace: string; orgSlug: string; suggestion: TrajectorySuggestion; /** Override destination — passed through to applyDraft. */ destination?: string; } /** * Apply a confirmed trajectory suggestion. Delegates straight to v0.5 * `applyDraft()` — no separate file writer lives in this module (P0 #3 * audit: grep `applyDraft\|new.*Applier` returns the import below as the * only ingress point). */ export declare function applySuggestion(input: ApplySuggestionInput): Promise; /** * Record a user rejection so the same trajectory is not re-proposed within * the cooldown window (§3.1.1). */ export declare function recordRejection(args: { workspace: string; orgSlug: string; suggestion_id: string; reason?: string; now?: string; }): void; /** * Pure converter. Output is a valid `AuthorDraft` ready for `applyDraft()`. * The slug is derived from the agent sequence + workflow template so two * runs over the same observation produce the same SKILL location. */ export declare function suggestionToDraft(suggestion: TrajectorySuggestion, orgSlug: string): AuthorDraft;