@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.
- package/CHANGELOG.md +14 -0
- package/README.md +8 -11
- package/dist/cli/complete.d.ts +7 -0
- package/dist/cli/complete.js +304 -0
- package/dist/cli/complete.js.map +1 -0
- package/dist/cli/index.js +0 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/logs.js +51 -61
- package/dist/cli/logs.js.map +1 -1
- package/dist/cli/monitor.js +74 -46
- package/dist/cli/monitor.js.map +1 -1
- package/dist/cli/resume.js +2 -2
- package/dist/cli/resume.js.map +1 -1
- package/dist/cli/signal.js +33 -29
- package/dist/cli/signal.js.map +1 -1
- package/dist/core/auto-recovery.d.ts +2 -117
- package/dist/core/auto-recovery.js +4 -487
- package/dist/core/auto-recovery.js.map +1 -1
- package/dist/core/failure-policy.d.ts +0 -52
- package/dist/core/failure-policy.js +7 -174
- package/dist/core/failure-policy.js.map +1 -1
- package/dist/core/git-lifecycle-manager.js +2 -2
- package/dist/core/git-lifecycle-manager.js.map +1 -1
- package/dist/core/git-pipeline-coordinator.js +25 -25
- package/dist/core/git-pipeline-coordinator.js.map +1 -1
- package/dist/core/intervention.d.ts +0 -6
- package/dist/core/intervention.js +1 -17
- package/dist/core/intervention.js.map +1 -1
- package/dist/core/orchestrator.js +18 -10
- package/dist/core/orchestrator.js.map +1 -1
- package/dist/core/runner/agent.js +18 -15
- package/dist/core/runner/agent.js.map +1 -1
- package/dist/core/runner/pipeline.js +3 -3
- package/dist/core/runner/pipeline.js.map +1 -1
- package/dist/core/stall-detection.js +9 -7
- package/dist/core/stall-detection.js.map +1 -1
- package/dist/hooks/data-accessor.js +2 -2
- package/dist/hooks/data-accessor.js.map +1 -1
- package/dist/services/logging/buffer.d.ts +1 -2
- package/dist/services/logging/buffer.js +22 -63
- package/dist/services/logging/buffer.js.map +1 -1
- package/dist/services/logging/formatter.d.ts +4 -0
- package/dist/services/logging/formatter.js +201 -33
- package/dist/services/logging/formatter.js.map +1 -1
- package/dist/services/logging/paths.d.ts +0 -3
- package/dist/services/logging/paths.js +0 -3
- package/dist/services/logging/paths.js.map +1 -1
- package/dist/types/config.d.ts +1 -9
- package/dist/types/logging.d.ts +1 -1
- package/dist/utils/config.js +2 -6
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/enhanced-logger.d.ts +17 -37
- package/dist/utils/enhanced-logger.js +237 -267
- package/dist/utils/enhanced-logger.js.map +1 -1
- package/dist/utils/logger.js +17 -4
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/repro-thinking-logs.js +4 -4
- package/dist/utils/repro-thinking-logs.js.map +1 -1
- package/package.json +3 -14
- package/scripts/monitor-lanes.sh +5 -5
- package/scripts/stream-logs.sh +1 -1
- package/scripts/test-log-parser.ts +8 -42
- package/src/cli/complete.ts +305 -0
- package/src/cli/index.ts +0 -6
- package/src/cli/logs.ts +46 -60
- package/src/cli/monitor.ts +82 -48
- package/src/cli/resume.ts +1 -1
- package/src/cli/signal.ts +38 -34
- package/src/core/auto-recovery.ts +13 -595
- package/src/core/failure-policy.ts +7 -228
- package/src/core/git-lifecycle-manager.ts +2 -2
- package/src/core/git-pipeline-coordinator.ts +25 -25
- package/src/core/intervention.ts +0 -18
- package/src/core/orchestrator.ts +20 -10
- package/src/core/runner/agent.ts +21 -16
- package/src/core/runner/pipeline.ts +3 -3
- package/src/core/stall-detection.ts +11 -9
- package/src/hooks/data-accessor.ts +2 -2
- package/src/services/logging/buffer.ts +20 -68
- package/src/services/logging/formatter.ts +199 -32
- package/src/services/logging/paths.ts +0 -3
- package/src/types/config.ts +1 -13
- package/src/types/logging.ts +2 -0
- package/src/utils/config.ts +2 -6
- package/src/utils/enhanced-logger.ts +239 -290
- package/src/utils/logger.ts +18 -3
- package/src/utils/repro-thinking-logs.ts +4 -4
- package/dist/cli/prepare.d.ts +0 -7
- package/dist/cli/prepare.js +0 -690
- package/dist/cli/prepare.js.map +0 -1
- package/dist/utils/log-formatter.d.ts +0 -26
- package/dist/utils/log-formatter.js +0 -274
- package/dist/utils/log-formatter.js.map +0 -1
- package/src/cli/prepare.ts +0 -777
- 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
|
-
*
|
|
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
|
|
37
|
-
private
|
|
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
|
|
41
|
+
* Write session start to JSON log
|
|
57
42
|
*/
|
|
58
|
-
private
|
|
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
|
|
69
|
-
*/
|
|
70
|
-
private writeToRawLog;
|
|
71
|
-
/**
|
|
72
|
-
* Write to readable log
|
|
53
|
+
* Write to JSONL log
|
|
73
54
|
*/
|
|
74
|
-
private
|
|
55
|
+
private writeToJsonLog;
|
|
75
56
|
/**
|
|
76
|
-
* Write a parsed message to the
|
|
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
|
|
124
|
+
* Read and parse JSON log file
|
|
145
125
|
*/
|
|
146
|
-
export declare function readJsonLog(logPath: string):
|
|
126
|
+
export declare function readJsonLog(logPath: string): any[];
|
|
147
127
|
/**
|
|
148
|
-
* Export logs
|
|
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 {
|