@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
package/src/utils/logger.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import * as fs from 'fs';
|
|
12
12
|
import * as path from 'path';
|
|
13
13
|
import { COLORS, LogLevel } from './log-constants';
|
|
14
|
-
import { formatMessageForConsole } from '
|
|
14
|
+
import { formatMessageForConsole } from '../services/logging/formatter';
|
|
15
15
|
|
|
16
16
|
export { COLORS, LogLevel };
|
|
17
17
|
|
|
@@ -92,14 +92,29 @@ function logInternal(
|
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
// If context is 'git', use the specialized 'git' message type for better coloring
|
|
96
|
+
const effectiveType = options.context === 'git' ? 'git' : type;
|
|
97
|
+
|
|
98
|
+
// If running in a lane, output JSON for the orchestrator to capture and format
|
|
99
|
+
if (process.env.CURSORFLOW_LANE === 'true') {
|
|
100
|
+
const jsonMsg = {
|
|
101
|
+
type: effectiveType,
|
|
102
|
+
content: message,
|
|
103
|
+
timestamp_ms: Date.now(),
|
|
104
|
+
context: options.context ?? defaultContext ?? undefined,
|
|
105
|
+
};
|
|
106
|
+
console.log(JSON.stringify(jsonMsg));
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
95
110
|
const formatted = formatMessageForConsole({
|
|
96
|
-
type:
|
|
111
|
+
type: effectiveType as any,
|
|
97
112
|
role: 'system',
|
|
98
113
|
content: message,
|
|
99
114
|
timestamp: Date.now(),
|
|
100
115
|
}, {
|
|
101
116
|
includeTimestamp: !options.noTimestamp,
|
|
102
|
-
|
|
117
|
+
laneLabel: options.context ?? defaultContext ?? undefined,
|
|
103
118
|
compact: !options.box
|
|
104
119
|
});
|
|
105
120
|
|
|
@@ -11,7 +11,7 @@ async function testThinkingLogs() {
|
|
|
11
11
|
|
|
12
12
|
console.log('--- Initializing Log Manager ---');
|
|
13
13
|
const manager = createLogManager(testDir, 'test-lane-thinking', {
|
|
14
|
-
|
|
14
|
+
writeJsonLog: true
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
manager.setTask('repro-thinking-task', 'sonnet-4.5-thinking');
|
|
@@ -31,9 +31,9 @@ async function testThinkingLogs() {
|
|
|
31
31
|
|
|
32
32
|
manager.close();
|
|
33
33
|
|
|
34
|
-
console.log('\n--- Verifying terminal
|
|
35
|
-
const
|
|
36
|
-
console.log(
|
|
34
|
+
console.log('\n--- Verifying terminal.jsonl ---');
|
|
35
|
+
const jsonlLog = fs.readFileSync(path.join(testDir, 'terminal.jsonl'), 'utf8');
|
|
36
|
+
console.log(jsonlLog);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
testThinkingLogs().catch(console.error);
|