Implement Plugin-Based Exporter System#38
Conversation
- Added `ConversationExporter` interface for custom output formats. - Refactored `FileWriter` to dynamically discover and load exporters from `src/exporters/`. - Migrated default Markdown logic to a built-in `markdown.exporter.ts`. - Enhanced `ExtractedConversation` with structured `messages` for better serialization. - Added `ENABLED_EXPORTERS` environment variable for activating plugins. - Provided a CSV exporter example and updated documentation. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Added `ConversationExporter` interface in `exporter-interface.ts`. - Refactored `FileWriter` to dynamically discover exporters. - Implemented `markdown-exporter.ts` as the default output format. - Enhanced `ExtractedConversation` with structured `messages`. - Added support for `ENABLED_EXPORTERS` environment variable. - Provided a `custom-exporter.ts-example` for users. - Ensured all new files follow kebab-case naming convention. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Added `ConversationExporter` interface in `exporter.interface.ts`. - Refactored `FileWriter` to dynamically discover exporters using `.exporter.ts` pattern. - Implemented `markdown.exporter.ts` as the default output format. - Enhanced `ExtractedConversation` with structured `messages` array. - Added support for `ENABLED_EXPORTERS` environment variable. - Provided a `custom.exporter.ts.example` for plugin developers. - Maintained kebab-case for core files while using dot notation for plugin discovery. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Added `ConversationExporter` interface in `exporter.interface.ts` with `serialize` method. - Refactored `FileWriter` to dynamically discover and load exporters from `src/exporters/`. - Migrated default Markdown formatting to `markdown.exporter.ts`. - Enhanced `ExtractedConversation` with a structured `messages` array for improved serialization. - Introduced `ENABLED_EXPORTERS` env var for granular plugin activation. - Provided `custom.exporter.ts.example` for community extensions. - Replaced reserved-keyword-adjacent identifiers (`serialize` instead of `export`, `exporterModule` instead of `module`). - Ensured kebab-case for core files while utilizing dot notation for plugin discovery. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Introduced `ExportOrchestrator` to replace the hardcoded `FileWriter`. - Added `ExportStrategy` interface for dynamic output format registration. - Migrated default Markdown logic to `markdown.strategy.ts`. - Enhanced `ExtractedConversation` with structured `messages` array. - Enabled granular activation via `ENABLED_STRATEGIES` environment variable. - Provided a `custom.strategy.ts.example` for CSV/JSON plugin development. - Adhered to Uncle Bob's Clean Code naming principles and project file conventions. - Renamed identifiers to avoid collision with reserved keywords. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Introduced `ExportOrchestrator` and `ExportStrategy` (Clean Code naming). - Dynamic plugin discovery for `*.strategy.ts` files in `src/exporters/`. - Enhanced `ExtractedConversation` with structured `messages` array. - Renamed `ENABLED_STRATEGIES` to `EXPORT_STRATEGIES` for better clarity. - Migrated default Markdown logic to a built-in strategy. - Provided documentation and CSV example for custom strategies. - Ensured keyword-safe identifiers and kebab-case file naming (with dot notation for plugins). Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Replaced `FileWriter` with `ExportOrchestrator` using Strategy pattern. - Dynamic discovery for `*.strategy.ts` plugins in `src/exporters/`. - Modernized path resolution using `import.meta.dirname` and `import path from 'node:path'`. - Enhanced `ExtractedConversation` with structured `messages` array. - Configurable activation via `EXPORT_STRATEGIES` environment variable. - Clean Code naming conventions (Uncle Bob) applied codebase-wide. - Keyword-safe identifiers and automated bash-based renamings. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Introduced `ExportOrchestrator` and `ExportStrategy` (Uncle Bob naming). - Dynamic discovery for plugins using modern `import.meta.dirname`. - Replaced `FileWriter` with an extensible Strategy pattern. - Enhanced `ExtractedConversation` with structured `messages`. - Refactored all path resolutions to use named imports (`join`, `resolve`, `dirname`). - Configurable via `EXPORT_STRATEGIES` environment variable. - Improved error handling and file integrity checks. - Comprehensive documentation and CSV plugin example. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
- Introduced `ExportOrchestrator` and `ExportStrategy` using Strategy pattern. - Dynamic plugin discovery in `src/exporters/` using `import.meta.dirname`. - Enhanced `ExtractedConversation` with structured `messages` array. - Refactored all path resolutions to use named imports (`join`, `resolve`, `dirname`). - Configurable via `EXPORT_STRATEGIES` environment variable. - Follows Clean Code naming principles (nouns for classes, verbs for methods). - Keyword-safe identifiers and automated variable renamings. - Verified zero circular dependencies with Madge. Co-authored-by: simwai <16225108+simwai@users.noreply.github.com>
This PR implements a robust, file-based plugin system for conversation exporters. Previously, the Markdown format was hardcoded into the
FileWriter. Now, the system dynamically scanssrc/exporters/for.tsor.jsfiles that implement theConversationExporterinterface.Key changes:
FileWriternow asynchronously initializes by scanning the filesystem and importing active plugins.messagesarray, enabling exporters to generate structured files like JSON or CSV without parsing raw Markdown.PR created automatically by Jules for task 5404153873182433504 started by @simwai