UNPKG

organ-ai-zer

Version:

AI-powered file organizer CLI tool

81 lines 3.3 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.CategoryConversationSchema = exports.FinalSuggestionsSchema = exports.AISuggestionsResponseSchema = exports.AIAnalysisResponseSchema = exports.ClarificationPhase = void 0; const zod_1 = require("zod"); /** * Clarification phases where AI can ask questions */ var ClarificationPhase; (function (ClarificationPhase) { ClarificationPhase["INITIAL_ANALYSIS"] = "analysis"; ClarificationPhase["SUGGESTIONS"] = "suggestions"; ClarificationPhase["REFINEMENT"] = "refinement"; })(ClarificationPhase || (exports.ClarificationPhase = ClarificationPhase = {})); /** * Schemas */ const FileInfoSchema = zod_1.z.object({ path: zod_1.z.string(), name: zod_1.z.string(), extension: zod_1.z.string(), size: zod_1.z.number(), modified: zod_1.z.string(), type: zod_1.z.enum(['file', 'directory']) }); exports.AIAnalysisResponseSchema = zod_1.z.object({ discoveredCategories: zod_1.z.record(zod_1.z.string(), zod_1.z.array(FileInfoSchema)).nullable(), reasoning: zod_1.z.string(), clarificationNeeded: zod_1.z.object({ questions: zod_1.z.array(zod_1.z.string()), reason: zod_1.z.string() }).nullable() }); exports.AISuggestionsResponseSchema = zod_1.z.object({ suggestions: zod_1.z.array(zod_1.z.object({ file: zod_1.z.string().nullable(), suggestedPath: zod_1.z.string(), reason: zod_1.z.string(), confidence: zod_1.z.number().min(0).max(1), category: zod_1.z.string().nullable(), metadata: zod_1.z.object({}).nullable() })), discoveredCategories: zod_1.z.record(zod_1.z.string(), zod_1.z.array(FileInfoSchema)).nullable(), reasoning: zod_1.z.string(), clarificationNeeded: zod_1.z.object({ questions: zod_1.z.array(zod_1.z.string()), reason: zod_1.z.string() }).nullable() }); exports.FinalSuggestionsSchema = zod_1.z.object({ suggestions: zod_1.z.array(zod_1.z.object({ file: zod_1.z.string().nullable(), suggestedPath: zod_1.z.string(), reason: zod_1.z.string(), confidence: zod_1.z.number().min(0).max(1), category: zod_1.z.string().nullable(), metadata: zod_1.z.object({}).nullable() })), reasoning: zod_1.z.string(), }); exports.CategoryConversationSchema = zod_1.z.object({ question: zod_1.z.string(), inputType: zod_1.z.enum(['choice', 'freeform']), choices: zod_1.z.array(zod_1.z.string()).nullable(), reasoning: zod_1.z.string() }); __exportStar(require("./config"), exports); //# sourceMappingURL=index.js.map