@litmers/cursorflow-orchestrator 0.2.2 → 0.2.5

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