import { z } from "zod"; import type { McpTool } from "../tool.js"; declare const inputSchema: z.ZodObject<{ content: z.ZodString; /** * Project slug from config/projects.yaml. When omitted, falls back to * the literal "default" project — useful for ad-hoc ingest paths * (file/url/repo from a renderer that doesn't surface a project * picker) that just want the content in the KB without per-project * routing. Phase 1D of the knowledge-engine repositioning will * collapse the project model entirely; this is the first step. * * When a non-default value is provided, it must exist in * config/projects.yaml — a typo there silently strands the memory * outside any project-filtered retrieval, so the validator below * fails loud. */ project: z.ZodDefault; /** * One of the known content types. Picks the pipeline automatically: * - doc: chunks by heading, one memory per section (default) * - code: language-aware chunking for source files * - meeting / conversation: transcript-shaped, multi-pass extraction * - note / decision / brief / digest / action_item / event / * reference: ingested as-is without chunking (pass-through) * * For `action_item`, include `tags: ["owner:", "due:", * "status:open"]` so the priorities widget can pick it up — those * three tags are what the dashboard reads. */ type: z.ZodDefault>; /** * Stable id used as the dedupe key in Engram. Re-ingesting the same * sourceId updates the existing memory rather than creating a * duplicate. For local files, the absolute path is a good choice. */ sourceId: z.ZodString; title: z.ZodDefault; sourceUrl: z.ZodDefault; /** * Where this came from. Constrained to the canonical SourceType * enum so retrieval filters (`source:manual` etc.) stay consistent. * Default "manual" covers the Claude-reads-a-file flow; use * "obsidian" when piping in vault content, "email" for messages, etc. */ source: z.ZodDefault>; /** Person slugs from config/people.yaml. Unknowns are kept as-is. */ authors: z.ZodDefault>; /** Arbitrary tags. `language:X` is meaningful for code type. */ tags: z.ZodDefault>; }, "strip", z.ZodTypeAny, { project: string; type: "brief" | "code" | "meeting" | "decision" | "action_item" | "doc" | "note" | "digest" | "conversation" | "event" | "reference"; source: "manual" | "loom" | "google_meet" | "confluence" | "notion" | "google_drive" | "jira" | "linear" | "bitbucket" | "github" | "calendar" | "slack" | "teams" | "email" | "obsidian"; title: string; tags: string[]; content: string; sourceId: string; sourceUrl: string; authors: string[]; }, { content: string; sourceId: string; project?: string | undefined; type?: "brief" | "code" | "meeting" | "decision" | "action_item" | "doc" | "note" | "digest" | "conversation" | "event" | "reference" | undefined; source?: "manual" | "loom" | "google_meet" | "confluence" | "notion" | "google_drive" | "jira" | "linear" | "bitbucket" | "github" | "calendar" | "slack" | "teams" | "email" | "obsidian" | undefined; title?: string | undefined; tags?: string[] | undefined; sourceUrl?: string | undefined; authors?: string[] | undefined; }>; interface Output { ingested: number; sourceId: string; project: string; type: string; memories: Array<{ content_preview: string; source_id: string; title?: string; }>; /** * Per-memory failures from this batch. Empty on full success. A * partial failure returns `ingested` < `memories.length` and the * failing rows here — the caller can retry just those. */ errors: Array<{ source_id: string; error: string; }>; /** * Counts of items the auto-enrichment pipeline produced from this * ingest. Each action_item / decision becomes its own memory with * the right type — searchable via kb_search type:action_item or * surfaced in the Cortex dashboard's by-type breakdown. Entities * are counted but not yet persisted (they would flood the KB * with low-signal rows; routing them into add_person / add_project * is a follow-up). * * Zero across all three when the LLM router isn't wired, when the * type isn't enrichable (code / brief / digest / etc.), or when * any of the raw chunk writes failed. */ enriched?: { actionItems: number; decisions: number; entities: number; }; } /** * Ingest arbitrary content into Cortex's memory under a specific * project. Designed for the "Claude reads a local file and hands it * to Cortex over MCP" flow — Claude does the filesystem I/O, Cortex * does the classification + pipeline + storage. * * Pipeline is selected by `type`: doc (default) chunks by heading, * code chunks by language structure, meeting/conversation runs the * transcript extractor. Unknown/pass-through types are stored as a * single memory. */ export declare const ingestContent: McpTool; export {}; //# sourceMappingURL=ingest-content.d.ts.map