// projectInquiries.ts
// Scope: shared Verbatim Inquiry request names and concise project map schema.
// A project map is concise: FilePath plus optional description for each mapped file/folder/resource.

export type InquiryRequest =
  | "getprojectinfo"
  | "getfiletree"
  | "getfileinfo"
  | "trace.term"
  | "search.term"
  | "recording-contract";
export const INQUIRY_REQUESTS: InquiryRequest[] = [
  "getprojectinfo",
  "getfiletree",
  "getfileinfo",
  "trace.term",
  "search.term",
  "recording-contract"
];

export type MapSchema = {
  FilePath: string;
  desc?: string;
};

export type TraceHit = {
  FilePath: string;
  line: number;
  quote: string;
};

export function isInquiryRequest(value: unknown): value is InquiryRequest {
  return INQUIRY_REQUESTS.includes(String(value || "") as InquiryRequest);
}

export function normalizeInquiryName(value: unknown): string {
  return String(value || "getprojectinfo").trim().toLowerCase();
}
