hyntx 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
7
  [![Node.js](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg)](https://nodejs.org/)
8
8
 
9
- > **🚧 NOT READY FOR USE**: Hyntx is currently **under active development** and **not yet ready for production use**. The tool is not functional at this time. This README describes the planned features and functionality. For the current development status, implementation progress, and what's actually working, please see the [ROADMAP.md](ROADMAP.md).
9
+ > 🚧 **NOT READY FOR USE**: This project is under active development. The published npm package does not produce output yet. Check back for updates.
10
10
 
11
11
  ## What is Hyntx?
12
12
 
@@ -34,8 +34,6 @@ Think of it as a **retrospective code review for your prompts**.
34
34
 
35
35
  ## Installation
36
36
 
37
- > **Note**: Hyntx is not yet ready for use. The installation instructions below are for reference only. See [ROADMAP.md](ROADMAP.md) for development status.
38
-
39
37
  ### NPM (Global)
40
38
 
41
39
  ```bash
@@ -349,7 +347,7 @@ Make sure you've used Claude Code at least once. Logs are stored in:
349
347
 
350
348
  ```bash
351
349
  # Clone the repository
352
- git clone https://github.com/yourusername/hyntx.git
350
+ git clone https://github.com/jmlweb/hyntx.git
353
351
  cd hyntx
354
352
 
355
353
  # Install dependencies
@@ -409,7 +407,7 @@ Contributions are welcome! Please:
409
407
 
410
408
  ## Roadmap
411
409
 
412
- For detailed development roadmap, planned features, and implementation status, see [ROADMAP.md](ROADMAP.md).
410
+ For detailed development roadmap, planned features, and implementation status, see [docs/ROADMAP.md](docs/ROADMAP.md).
413
411
 
414
412
  ## License
415
413
 
@@ -423,9 +421,8 @@ MIT License - see [LICENSE](LICENSE) file for details.
423
421
 
424
422
  ## Support
425
423
 
426
- - **Issues**: [GitHub Issues](https://github.com/yourusername/hyntx/issues)
427
- - **Discussions**: [GitHub Discussions](https://github.com/yourusername/hyntx/discussions)
428
- - **Email**: your-email@example.com
424
+ - **Issues**: [GitHub Issues](https://github.com/jmlweb/hyntx/issues)
425
+ - **Discussions**: [GitHub Discussions](https://github.com/jmlweb/hyntx/discussions)
429
426
 
430
427
  ---
431
428
 
package/dist/index.d.ts CHANGED
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Data extracted from Claude Code messages.
3
+ * Contains the sanitized prompt and metadata.
4
+ */
5
+ type ExtractedPrompt = {
6
+ readonly content: string;
7
+ readonly timestamp: string;
8
+ readonly sessionId: string;
9
+ readonly project: string;
10
+ readonly date: string;
11
+ };
12
+ /**
13
+ * Result of reading logs from the filesystem.
14
+ */
15
+ type LogReadResult = {
16
+ readonly prompts: readonly ExtractedPrompt[];
17
+ readonly warnings: readonly string[];
18
+ };
1
19
  /**
2
20
  * Before/after rewrite example for a pattern.
3
21
  * Shows concrete improvement for a detected issue.
@@ -74,12 +92,24 @@ type AnalysisProvider = {
74
92
  */
75
93
  type ParsedArgs = {
76
94
  readonly date: string;
95
+ readonly from?: string;
96
+ readonly to?: string;
97
+ readonly project?: string;
98
+ readonly output?: string;
99
+ readonly dryRun: boolean;
100
+ readonly checkReminder: boolean;
77
101
  readonly help: boolean;
78
102
  readonly version: boolean;
79
103
  readonly verbose: boolean;
80
104
  readonly checkConfig: boolean;
81
- readonly format?: 'terminal' | 'json';
82
- readonly compact?: boolean;
105
+ readonly format: 'terminal' | 'json';
106
+ readonly compact: boolean;
107
+ readonly compareWith?: string;
108
+ readonly compareWeek: boolean;
109
+ readonly compareMonth: boolean;
110
+ readonly history: boolean;
111
+ readonly historySummary: boolean;
112
+ readonly noHistory: boolean;
83
113
  };
84
114
  /**
85
115
  * Parses command-line arguments.
@@ -88,6 +118,52 @@ type ParsedArgs = {
88
118
  * @throws Error if arguments are invalid
89
119
  */
90
120
  declare function parseArguments(): ParsedArgs;
121
+ /**
122
+ * Validates parsed arguments for logical conflicts and requirements.
123
+ *
124
+ * @param args - Parsed arguments to validate
125
+ * @throws Error if arguments are invalid or conflicting
126
+ */
127
+ declare function validateArguments(args: ParsedArgs): void;
128
+ /**
129
+ * Gets the output file path for a given date.
130
+ * For multi-day scenarios, appends the date to the filename.
131
+ *
132
+ * @param basePath - Base output path from args
133
+ * @param date - Date string (YYYY-MM-DD) or undefined for single-day
134
+ * @returns Adjusted output file path
135
+ */
136
+ declare function getOutputFilePath(basePath: string, date?: string): string;
137
+ /**
138
+ * Writes a single analysis result to a file.
139
+ *
140
+ * @param filePath - File path to write to
141
+ * @param result - Analysis result
142
+ * @param format - Output format ('md' or 'json')
143
+ * @param compact - Whether to use compact JSON (only for json format)
144
+ * @throws Error if write fails
145
+ */
146
+ declare function writeOutputFile(filePath: string, result: AnalysisResult, format: 'md' | 'json', compact: boolean): Promise<void>;
147
+ /**
148
+ * Writes multi-day results to a JSON array file.
149
+ *
150
+ * @param filePath - File path to write to
151
+ * @param results - Array of analysis results
152
+ * @param compact - Whether to use compact JSON
153
+ * @throws Error if write fails
154
+ */
155
+ declare function writeMultiDayJsonOutput(filePath: string, results: readonly AnalysisResult[], compact: boolean): Promise<void>;
156
+ /**
157
+ * Displays a dry-run summary without performing analysis.
158
+ *
159
+ * @param prompts - Array of extracted prompts
160
+ * @param args - Parsed arguments
161
+ */
162
+ declare function displayDryRunSummary(prompts: readonly ExtractedPrompt[], args: ParsedArgs): void;
163
+ /**
164
+ * Displays reminder status and exits.
165
+ */
166
+ declare function showReminderStatus(): void;
91
167
  /**
92
168
  * Displays help message and exits.
93
169
  */
@@ -110,13 +186,13 @@ declare function runConfigCheck(): Promise<void>;
110
186
  */
111
187
  declare function checkAndRunSetup(isJsonMode: boolean): Promise<void>;
112
188
  /**
113
- * Reads logs for the specified date with a spinner.
189
+ * Reads logs with filters from parsed arguments.
114
190
  *
115
- * @param date - Date to read logs for
191
+ * @param args - Parsed command-line arguments
116
192
  * @param isJsonMode - Whether JSON output mode is active
117
- * @returns Array of prompt strings
193
+ * @returns Log read result with prompts and warnings
118
194
  */
119
- declare function readLogsWithSpinner(date: string, isJsonMode: boolean): Promise<readonly string[]>;
195
+ declare function readLogsWithSpinner(args: ParsedArgs, isJsonMode: boolean): Promise<LogReadResult>;
120
196
  /**
121
197
  * Connects to an available provider with automatic fallback.
122
198
  *
@@ -158,4 +234,4 @@ declare function handleError(error: Error, isJsonMode: boolean): void;
158
234
  */
159
235
  declare function main(): Promise<void>;
160
236
 
161
- export { analyzeWithProgress, checkAndRunSetup, connectProviderWithSpinner, displayResults, handleError, main, parseArguments, readLogsWithSpinner, runConfigCheck, showHelp, showVersion };
237
+ export { analyzeWithProgress, checkAndRunSetup, connectProviderWithSpinner, displayDryRunSummary, displayResults, getOutputFilePath, handleError, main, parseArguments, readLogsWithSpinner, runConfigCheck, showHelp, showReminderStatus, showVersion, validateArguments, writeMultiDayJsonOutput, writeOutputFile };