@litmers/cursorflow-orchestrator 0.2.5 → 0.2.6

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.
Files changed (73) hide show
  1. package/CHANGELOG.md +29 -20
  2. package/README.md +13 -8
  3. package/dist/cli/index.js +2 -0
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/cli/logs.js +61 -51
  6. package/dist/cli/logs.js.map +1 -1
  7. package/dist/cli/monitor.js +45 -56
  8. package/dist/cli/monitor.js.map +1 -1
  9. package/dist/cli/resume.js +2 -2
  10. package/dist/cli/resume.js.map +1 -1
  11. package/dist/core/git-lifecycle-manager.js +2 -2
  12. package/dist/core/git-lifecycle-manager.js.map +1 -1
  13. package/dist/core/git-pipeline-coordinator.js +25 -25
  14. package/dist/core/git-pipeline-coordinator.js.map +1 -1
  15. package/dist/core/orchestrator.d.ts +17 -0
  16. package/dist/core/orchestrator.js +169 -8
  17. package/dist/core/orchestrator.js.map +1 -1
  18. package/dist/core/runner/pipeline.js +3 -3
  19. package/dist/core/runner/pipeline.js.map +1 -1
  20. package/dist/hooks/data-accessor.js +2 -2
  21. package/dist/hooks/data-accessor.js.map +1 -1
  22. package/dist/services/logging/buffer.d.ts +2 -1
  23. package/dist/services/logging/buffer.js +63 -22
  24. package/dist/services/logging/buffer.js.map +1 -1
  25. package/dist/services/logging/formatter.d.ts +0 -4
  26. package/dist/services/logging/formatter.js +33 -201
  27. package/dist/services/logging/formatter.js.map +1 -1
  28. package/dist/services/logging/paths.d.ts +3 -0
  29. package/dist/services/logging/paths.js +3 -0
  30. package/dist/services/logging/paths.js.map +1 -1
  31. package/dist/types/config.d.ts +9 -1
  32. package/dist/types/flow.d.ts +6 -0
  33. package/dist/types/logging.d.ts +1 -1
  34. package/dist/utils/config.js +6 -2
  35. package/dist/utils/config.js.map +1 -1
  36. package/dist/utils/enhanced-logger.d.ts +37 -17
  37. package/dist/utils/enhanced-logger.js +267 -237
  38. package/dist/utils/enhanced-logger.js.map +1 -1
  39. package/dist/utils/events.d.ts +18 -15
  40. package/dist/utils/events.js +8 -5
  41. package/dist/utils/events.js.map +1 -1
  42. package/dist/utils/log-formatter.d.ts +26 -0
  43. package/dist/utils/log-formatter.js +274 -0
  44. package/dist/utils/log-formatter.js.map +1 -0
  45. package/dist/utils/logger.js +4 -17
  46. package/dist/utils/logger.js.map +1 -1
  47. package/dist/utils/repro-thinking-logs.js +4 -4
  48. package/dist/utils/repro-thinking-logs.js.map +1 -1
  49. package/package.json +2 -2
  50. package/scripts/monitor-lanes.sh +5 -5
  51. package/scripts/stream-logs.sh +1 -1
  52. package/scripts/test-log-parser.ts +42 -8
  53. package/src/cli/index.ts +2 -0
  54. package/src/cli/logs.ts +60 -46
  55. package/src/cli/monitor.ts +47 -64
  56. package/src/cli/resume.ts +1 -1
  57. package/src/core/git-lifecycle-manager.ts +2 -2
  58. package/src/core/git-pipeline-coordinator.ts +25 -25
  59. package/src/core/orchestrator.ts +199 -7
  60. package/src/core/runner/pipeline.ts +3 -3
  61. package/src/hooks/data-accessor.ts +2 -2
  62. package/src/services/logging/buffer.ts +68 -20
  63. package/src/services/logging/formatter.ts +32 -199
  64. package/src/services/logging/paths.ts +3 -0
  65. package/src/types/config.ts +13 -1
  66. package/src/types/flow.ts +6 -0
  67. package/src/types/logging.ts +0 -2
  68. package/src/utils/config.ts +6 -2
  69. package/src/utils/enhanced-logger.ts +290 -239
  70. package/src/utils/events.ts +21 -18
  71. package/src/utils/log-formatter.ts +287 -0
  72. package/src/utils/logger.ts +3 -18
  73. package/src/utils/repro-thinking-logs.ts +4 -4
@@ -1,5 +1,9 @@
1
1
  /**
2
- * Enhanced Logger - Simplified JSONL terminal output capture
2
+ * Enhanced Logger - Simplified terminal output capture
3
+ *
4
+ * Features:
5
+ * - Raw log: Original output as-is
6
+ * - Readable log: Formatted with formatMessageForConsole style
3
7
  */
4
8
  import { EnhancedLogConfig, ParsedMessage, LogSession } from '../types';
5
9
  export { EnhancedLogConfig, ParsedMessage, LogSession };
@@ -15,14 +19,25 @@ export interface JsonLogEntry {
15
19
  }
16
20
  export declare const DEFAULT_LOG_CONFIG: EnhancedLogConfig;
17
21
  /**
18
- * Enhanced Log Manager - JSONL format only
22
+ * Strip ANSI escape sequences from text
23
+ */
24
+ export declare function stripAnsi(text: string): string;
25
+ /**
26
+ * Format timestamp
27
+ */
28
+ export declare function formatTimestamp(format: 'iso' | 'relative' | 'short', startTime?: number): string;
29
+ /**
30
+ * Simplified Log Manager - Only raw and readable logs
19
31
  */
20
32
  export declare class EnhancedLogManager {
21
33
  private config;
22
34
  private session;
23
35
  private logDir;
24
- private jsonlLogPath;
25
- private jsonlLogFd;
36
+ private rawLogPath;
37
+ private readableLogPath;
38
+ private rawLogFd;
39
+ private readableLogFd;
40
+ private rawLogSize;
26
41
  private onParsedMessage?;
27
42
  constructor(logDir: string, session: LogSession, config?: Partial<EnhancedLogConfig>, onParsedMessage?: (msg: ParsedMessage) => void);
28
43
  /**
@@ -38,9 +53,9 @@ export declare class EnhancedLogManager {
38
53
  */
39
54
  private initLogFiles;
40
55
  /**
41
- * Write session start to JSON log
56
+ * Write session header to logs
42
57
  */
43
- private writeSessionStart;
58
+ private writeSessionHeader;
44
59
  /**
45
60
  * Rotate log file if it exceeds max size
46
61
  */
@@ -50,11 +65,15 @@ export declare class EnhancedLogManager {
50
65
  */
51
66
  private rotateLog;
52
67
  /**
53
- * Write to JSONL log
68
+ * Write to raw log with size tracking
69
+ */
70
+ private writeToRawLog;
71
+ /**
72
+ * Write to readable log
54
73
  */
55
- private writeToJsonLog;
74
+ private writeToReadableLog;
56
75
  /**
57
- * Write a parsed message to the JSON log and console
76
+ * Write a parsed message to the readable log using formatMessageForConsole style
58
77
  */
59
78
  writeReadableMessage(msg: ParsedMessage): void;
60
79
  /**
@@ -69,10 +88,6 @@ export declare class EnhancedLogManager {
69
88
  * Write stderr data
70
89
  */
71
90
  writeStderr(data: Buffer | string): void;
72
- /**
73
- * Check if a line is likely Git output
74
- */
75
- private isGitOutput;
76
91
  /**
77
92
  * Check if a line is actually an error message
78
93
  */
@@ -97,8 +112,9 @@ export declare class EnhancedLogManager {
97
112
  * Get paths to all log files
98
113
  */
99
114
  getLogPaths(): {
100
- jsonl: string;
101
115
  clean: string;
116
+ raw: string;
117
+ readable: string;
102
118
  };
103
119
  /**
104
120
  * Create file descriptors for process stdio redirection
@@ -115,17 +131,21 @@ export declare class EnhancedLogManager {
115
131
  * Extract the last error message from the log
116
132
  */
117
133
  getLastError(): string | null;
134
+ /**
135
+ * Format duration for display
136
+ */
137
+ private formatDuration;
118
138
  }
119
139
  /**
120
140
  * Create a log manager for a lane
121
141
  */
122
142
  export declare function createLogManager(laneRunDir: string, laneName: string, config?: Partial<EnhancedLogConfig>, onParsedMessage?: (msg: ParsedMessage) => void, laneIndex?: number): EnhancedLogManager;
123
143
  /**
124
- * Read and parse JSON log file
144
+ * Read and parse JSON log file (legacy compatibility - returns empty array)
125
145
  */
126
- export declare function readJsonLog(logPath: string): any[];
146
+ export declare function readJsonLog(logPath: string): JsonLogEntry[];
127
147
  /**
128
- * Export logs
148
+ * Export logs (legacy compatibility)
129
149
  */
130
150
  export declare function exportLogs(laneRunDir: string, format: 'text' | 'json' | 'markdown' | 'html', outputPath?: string): string;
131
151
  export declare class StreamingMessageParser {