@codemieai/code 0.0.36 → 0.0.38
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 +33 -0
- package/dist/agents/codemie-code/tools/assistant-invocation.d.ts.map +1 -1
- package/dist/agents/codemie-code/tools/assistant-invocation.js +2 -2
- package/dist/agents/codemie-code/tools/assistant-invocation.js.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
- package/dist/agents/core/BaseAgentAdapter.js +23 -9
- package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
- package/dist/agents/core/extension/BaseExtensionInstaller.d.ts.map +1 -1
- package/dist/agents/core/extension/BaseExtensionInstaller.js +11 -4
- package/dist/agents/core/extension/BaseExtensionInstaller.js.map +1 -1
- package/dist/agents/core/session/BaseProcessor.d.ts +22 -1
- package/dist/agents/core/session/BaseProcessor.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude-acp.plugin.d.ts +5 -0
- package/dist/agents/plugins/claude/claude-acp.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude-acp.plugin.js +12 -2
- package/dist/agents/plugins/claude/claude-acp.plugin.js.map +1 -1
- package/dist/agents/plugins/claude/claude.plugin.d.ts +11 -0
- package/dist/agents/plugins/claude/claude.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.plugin.js +59 -2
- package/dist/agents/plugins/claude/claude.plugin.js.map +1 -1
- package/dist/agents/plugins/claude/claude.session.d.ts +5 -0
- package/dist/agents/plugins/claude/claude.session.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.session.js +101 -2
- package/dist/agents/plugins/claude/claude.session.js.map +1 -1
- package/dist/agents/plugins/claude/plugin/.claude-plugin/plugin.json +1 -1
- package/dist/agents/plugins/claude/plugin/commands/README.md +103 -22
- package/dist/agents/plugins/claude/plugin/commands/memory-refresh.md +329 -18
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.d.ts +0 -1
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.d.ts.map +1 -1
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js +13 -19
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js.map +1 -1
- package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.d.ts.map +1 -1
- package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.js +29 -4
- package/dist/agents/plugins/claude/session/processors/claude.metrics-processor.js.map +1 -1
- package/dist/cli/commands/assistants/chat.js +9 -6
- package/dist/cli/commands/assistants/chat.js.map +1 -1
- package/dist/cli/commands/assistants/constants.d.ts +2 -6
- package/dist/cli/commands/assistants/constants.d.ts.map +1 -1
- package/dist/cli/commands/assistants/constants.js +2 -5
- package/dist/cli/commands/assistants/constants.js.map +1 -1
- package/dist/cli/commands/assistants/index.d.ts.map +1 -1
- package/dist/cli/commands/assistants/index.js +1 -11
- package/dist/cli/commands/assistants/index.js.map +1 -1
- package/dist/cli/commands/assistants/setup/configuration/actions.d.ts +30 -0
- package/dist/cli/commands/assistants/setup/configuration/actions.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/configuration/actions.js +63 -0
- package/dist/cli/commands/assistants/setup/configuration/actions.js.map +1 -0
- package/dist/cli/commands/assistants/setup/configuration/constants.d.ts +49 -0
- package/dist/cli/commands/assistants/setup/configuration/constants.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/configuration/constants.js +56 -0
- package/dist/cli/commands/assistants/setup/configuration/constants.js.map +1 -0
- package/dist/cli/commands/assistants/setup/configuration/index.d.ts +9 -0
- package/dist/cli/commands/assistants/setup/configuration/index.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/configuration/index.js +8 -0
- package/dist/cli/commands/assistants/setup/configuration/index.js.map +1 -0
- package/dist/cli/commands/assistants/setup/configuration/selection.d.ts +12 -0
- package/dist/cli/commands/assistants/setup/configuration/selection.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/configuration/selection.js +94 -0
- package/dist/cli/commands/assistants/setup/configuration/selection.js.map +1 -0
- package/dist/cli/commands/assistants/setup/configuration/types.d.ts +22 -0
- package/dist/cli/commands/assistants/setup/configuration/types.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/configuration/types.js +2 -0
- package/dist/cli/commands/assistants/setup/configuration/types.js.map +1 -0
- package/dist/cli/commands/assistants/setup/configuration/ui.d.ts +9 -0
- package/dist/cli/commands/assistants/setup/configuration/ui.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/configuration/ui.js +86 -0
- package/dist/cli/commands/assistants/setup/configuration/ui.js.map +1 -0
- package/dist/cli/commands/assistants/setup/constants.d.ts +26 -0
- package/dist/cli/commands/assistants/setup/constants.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/constants.js +21 -0
- package/dist/cli/commands/assistants/setup/constants.js.map +1 -0
- package/dist/cli/commands/assistants/setup/data.d.ts +30 -0
- package/dist/cli/commands/assistants/setup/data.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/data.js +125 -0
- package/dist/cli/commands/assistants/setup/data.js.map +1 -0
- package/dist/cli/commands/assistants/setup/generators/claude-agent-generator.d.ts.map +1 -0
- package/dist/cli/commands/assistants/{generators → setup/generators}/claude-agent-generator.js +6 -2
- package/dist/cli/commands/assistants/setup/generators/claude-agent-generator.js.map +1 -0
- package/dist/cli/commands/assistants/setup/generators/claude-skill-generator.d.ts +12 -0
- package/dist/cli/commands/assistants/setup/generators/claude-skill-generator.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/generators/claude-skill-generator.js +94 -0
- package/dist/cli/commands/assistants/setup/generators/claude-skill-generator.js.map +1 -0
- package/dist/cli/commands/assistants/setup/helpers.d.ts +27 -0
- package/dist/cli/commands/assistants/setup/helpers.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/helpers.js +94 -0
- package/dist/cli/commands/assistants/setup/helpers.js.map +1 -0
- package/dist/cli/commands/assistants/setup/index.d.ts +17 -0
- package/dist/cli/commands/assistants/setup/index.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/index.js +193 -0
- package/dist/cli/commands/assistants/setup/index.js.map +1 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/actions.d.ts +47 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/actions.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/actions.js +140 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/actions.js.map +1 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/constants.d.ts +56 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/constants.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/constants.js +61 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/constants.js.map +1 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/index.d.ts +12 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/index.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/index.js +48 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/index.js.map +1 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/interactive-prompt.d.ts +6 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/interactive-prompt.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/interactive-prompt.js +90 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/interactive-prompt.js.map +1 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/types.d.ts +37 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/types.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/types.js +2 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/types.js.map +1 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/ui.d.ts +6 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/ui.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/ui.js +103 -0
- package/dist/cli/commands/assistants/setup/manualConfiguration/ui.js.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/actions.d.ts +31 -0
- package/dist/cli/commands/assistants/setup/selection/actions.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/actions.js +321 -0
- package/dist/cli/commands/assistants/setup/selection/actions.js.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/constants.d.ts +79 -0
- package/dist/cli/commands/assistants/setup/selection/constants.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/constants.js +90 -0
- package/dist/cli/commands/assistants/setup/selection/constants.js.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/index.d.ts +25 -0
- package/dist/cli/commands/assistants/setup/selection/index.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/index.js +127 -0
- package/dist/cli/commands/assistants/setup/selection/index.js.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/interactive-prompt.d.ts +20 -0
- package/dist/cli/commands/assistants/setup/selection/interactive-prompt.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/interactive-prompt.js +328 -0
- package/dist/cli/commands/assistants/setup/selection/interactive-prompt.js.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/types.d.ts +27 -0
- package/dist/cli/commands/assistants/setup/selection/types.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/types.js +2 -0
- package/dist/cli/commands/assistants/setup/selection/types.js.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/ui.d.ts +11 -0
- package/dist/cli/commands/assistants/setup/selection/ui.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/ui.js +189 -0
- package/dist/cli/commands/assistants/setup/selection/ui.js.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/utils.d.ts +36 -0
- package/dist/cli/commands/assistants/setup/selection/utils.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/selection/utils.js +55 -0
- package/dist/cli/commands/assistants/setup/selection/utils.js.map +1 -0
- package/dist/cli/commands/assistants/setup/summary/index.d.ts +16 -0
- package/dist/cli/commands/assistants/setup/summary/index.d.ts.map +1 -0
- package/dist/cli/commands/assistants/setup/summary/index.js +48 -0
- package/dist/cli/commands/assistants/setup/summary/index.js.map +1 -0
- package/dist/cli/commands/hook.d.ts +72 -0
- package/dist/cli/commands/hook.d.ts.map +1 -1
- package/dist/cli/commands/hook.js +290 -110
- package/dist/cli/commands/hook.js.map +1 -1
- package/dist/cli/commands/log/cleaner.d.ts +37 -0
- package/dist/cli/commands/log/cleaner.d.ts.map +1 -0
- package/dist/cli/commands/log/cleaner.js +218 -0
- package/dist/cli/commands/log/cleaner.js.map +1 -0
- package/dist/cli/commands/log/filter.d.ts +55 -0
- package/dist/cli/commands/log/filter.d.ts.map +1 -0
- package/dist/cli/commands/log/filter.js +128 -0
- package/dist/cli/commands/log/filter.js.map +1 -0
- package/dist/cli/commands/log/follower.d.ts +36 -0
- package/dist/cli/commands/log/follower.d.ts.map +1 -0
- package/dist/cli/commands/log/follower.js +151 -0
- package/dist/cli/commands/log/follower.js.map +1 -0
- package/dist/cli/commands/log/formatter.d.ts +76 -0
- package/dist/cli/commands/log/formatter.d.ts.map +1 -0
- package/dist/cli/commands/log/formatter.js +261 -0
- package/dist/cli/commands/log/formatter.js.map +1 -0
- package/dist/cli/commands/log/index.d.ts +6 -0
- package/dist/cli/commands/log/index.d.ts.map +1 -0
- package/dist/cli/commands/log/index.js +400 -0
- package/dist/cli/commands/log/index.js.map +1 -0
- package/dist/cli/commands/log/parser.d.ts +20 -0
- package/dist/cli/commands/log/parser.d.ts.map +1 -0
- package/dist/cli/commands/log/parser.js +111 -0
- package/dist/cli/commands/log/parser.js.map +1 -0
- package/dist/cli/commands/log/reader.d.ts +66 -0
- package/dist/cli/commands/log/reader.d.ts.map +1 -0
- package/dist/cli/commands/log/reader.js +364 -0
- package/dist/cli/commands/log/reader.js.map +1 -0
- package/dist/cli/commands/log/types.d.ts +100 -0
- package/dist/cli/commands/log/types.d.ts.map +1 -0
- package/dist/cli/commands/log/types.js +5 -0
- package/dist/cli/commands/log/types.js.map +1 -0
- package/dist/cli/commands/profile/display.d.ts +1 -0
- package/dist/cli/commands/profile/display.d.ts.map +1 -1
- package/dist/cli/commands/profile/display.js +10 -2
- package/dist/cli/commands/profile/display.js.map +1 -1
- package/dist/cli/commands/profile/index.js +58 -22
- package/dist/cli/commands/profile/index.js.map +1 -1
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +143 -24
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/env/types.d.ts +10 -1
- package/dist/env/types.d.ts.map +1 -1
- package/dist/env/types.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/providers/plugins/sso/session/SessionSyncer.d.ts +5 -0
- package/dist/providers/plugins/sso/session/SessionSyncer.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/SessionSyncer.js +102 -3
- package/dist/providers/plugins/sso/session/SessionSyncer.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.d.ts +0 -1
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.js +25 -48
- package/dist/providers/plugins/sso/session/processors/conversations/conversation-sync-processor.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js +8 -34
- package/dist/providers/plugins/sso/session/processors/metrics/metrics-sync-processor.js.map +1 -1
- package/dist/utils/config.d.ts +35 -8
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +243 -33
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/logger.d.ts +8 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +42 -0
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/native-installer.d.ts +1 -0
- package/dist/utils/native-installer.d.ts.map +1 -1
- package/dist/utils/native-installer.js +21 -7
- package/dist/utils/native-installer.js.map +1 -1
- package/package.json +2 -2
- package/dist/agents/plugins/claude/plugin/commands/memory-add.md +0 -325
- package/dist/agents/plugins/claude/plugin/commands/memory-init.md +0 -18
- package/dist/cli/commands/assistants/generators/claude-agent-generator.d.ts.map +0 -1
- package/dist/cli/commands/assistants/generators/claude-agent-generator.js.map +0 -1
- package/dist/cli/commands/assistants/list.d.ts +0 -11
- package/dist/cli/commands/assistants/list.d.ts.map +0 -1
- package/dist/cli/commands/assistants/list.js +0 -323
- package/dist/cli/commands/assistants/list.js.map +0 -1
- /package/dist/cli/commands/assistants/{generators → setup/generators}/claude-agent-generator.d.ts +0 -0
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Log reader - Read debug logs and session files
|
|
3
|
+
*/
|
|
4
|
+
import { readFileSync, readdirSync, existsSync, statSync } from 'fs';
|
|
5
|
+
import { join } from 'path';
|
|
6
|
+
import { createInterface } from 'readline';
|
|
7
|
+
import { createReadStream } from 'fs';
|
|
8
|
+
import { getCodemiePath } from '../../../utils/paths.js';
|
|
9
|
+
import { parseLogLine, parseSessionMetadata } from './parser.js';
|
|
10
|
+
/**
|
|
11
|
+
* Read debug log entries with optional filtering
|
|
12
|
+
*/
|
|
13
|
+
export class LogReader {
|
|
14
|
+
logsDir;
|
|
15
|
+
constructor(logsDir) {
|
|
16
|
+
this.logsDir = logsDir || getCodemiePath('logs');
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Read log entries from specified date range
|
|
20
|
+
* Returns entries in chronological order (oldest first)
|
|
21
|
+
*/
|
|
22
|
+
async readLogs(filter, maxLines) {
|
|
23
|
+
const entries = [];
|
|
24
|
+
try {
|
|
25
|
+
if (!existsSync(this.logsDir)) {
|
|
26
|
+
return entries;
|
|
27
|
+
}
|
|
28
|
+
// Get list of log files to read
|
|
29
|
+
const logFiles = this.getLogFilesInRange(filter?.fromDate, filter?.toDate);
|
|
30
|
+
// When limiting lines, we need to read from newest files first to ensure we get
|
|
31
|
+
// the most recent entries. We'll read extra files to account for entries being
|
|
32
|
+
// filtered out or spread across files, then sort and take the last N.
|
|
33
|
+
if (maxLines) {
|
|
34
|
+
// Read from newest files first, collecting 3x maxLines to ensure we have enough
|
|
35
|
+
// after filtering and to account for entries spread across multiple files
|
|
36
|
+
const targetEntries = maxLines * 3;
|
|
37
|
+
const reversedFiles = [...logFiles].reverse();
|
|
38
|
+
for (const logFile of reversedFiles) {
|
|
39
|
+
const filePath = join(this.logsDir, logFile);
|
|
40
|
+
const fileEntries = await this.readLogFile(filePath, filter);
|
|
41
|
+
entries.push(...fileEntries);
|
|
42
|
+
// Stop if we have enough entries
|
|
43
|
+
if (entries.length >= targetEntries) {
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
// No limit, read all files in order
|
|
50
|
+
for (const logFile of logFiles) {
|
|
51
|
+
const filePath = join(this.logsDir, logFile);
|
|
52
|
+
const fileEntries = await this.readLogFile(filePath, filter);
|
|
53
|
+
entries.push(...fileEntries);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Sort all entries by timestamp to maintain chronological order
|
|
57
|
+
entries.sort((a, b) => a.timestamp.getTime() - b.timestamp.getTime());
|
|
58
|
+
// Apply maxLines limit (take last N entries after sorting)
|
|
59
|
+
if (maxLines && entries.length > maxLines) {
|
|
60
|
+
return entries.slice(-maxLines);
|
|
61
|
+
}
|
|
62
|
+
return entries;
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return entries;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Read a single log file and parse entries
|
|
70
|
+
*/
|
|
71
|
+
async readLogFile(filePath, filter) {
|
|
72
|
+
const entries = [];
|
|
73
|
+
try {
|
|
74
|
+
const fileStream = createReadStream(filePath);
|
|
75
|
+
const rl = createInterface({
|
|
76
|
+
input: fileStream,
|
|
77
|
+
crlfDelay: Infinity
|
|
78
|
+
});
|
|
79
|
+
for await (const line of rl) {
|
|
80
|
+
const entry = parseLogLine(line);
|
|
81
|
+
if (!entry)
|
|
82
|
+
continue;
|
|
83
|
+
// Apply filters
|
|
84
|
+
if (this.matchesFilter(entry, filter)) {
|
|
85
|
+
entries.push(entry);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
// Skip files that can't be read
|
|
91
|
+
}
|
|
92
|
+
return entries;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Get list of log files that fall within date range
|
|
96
|
+
* Returns files sorted by date (oldest first)
|
|
97
|
+
*
|
|
98
|
+
* Note: Expands date range by ±1 day to catch overnight sessions.
|
|
99
|
+
* Long-running sessions that span midnight may write entries from day N+1
|
|
100
|
+
* into the log file for day N. Entry-level timestamp filtering (in matchesFilter)
|
|
101
|
+
* ensures exact results despite this wider file search.
|
|
102
|
+
*/
|
|
103
|
+
getLogFilesInRange(fromDate, toDate) {
|
|
104
|
+
try {
|
|
105
|
+
const files = readdirSync(this.logsDir);
|
|
106
|
+
// Filter debug log files
|
|
107
|
+
const logFiles = files.filter(f => f.match(/^debug-\d{4}-\d{2}-\d{2}\.log$/));
|
|
108
|
+
// If no date filter, return all files
|
|
109
|
+
if (!fromDate && !toDate) {
|
|
110
|
+
return logFiles.sort();
|
|
111
|
+
}
|
|
112
|
+
// Expand date range by ±1 day to catch overnight sessions
|
|
113
|
+
// Entry-level timestamp filtering ensures exact results
|
|
114
|
+
const expandedFromDate = fromDate
|
|
115
|
+
? new Date(fromDate.getTime() - 24 * 60 * 60 * 1000)
|
|
116
|
+
: undefined;
|
|
117
|
+
const expandedToDate = toDate
|
|
118
|
+
? new Date(toDate.getTime() + 24 * 60 * 60 * 1000)
|
|
119
|
+
: undefined;
|
|
120
|
+
// Filter by date range
|
|
121
|
+
const filtered = logFiles.filter(file => {
|
|
122
|
+
const dateMatch = file.match(/debug-(\d{4}-\d{2}-\d{2})\.log/);
|
|
123
|
+
if (!dateMatch)
|
|
124
|
+
return false;
|
|
125
|
+
const fileDate = new Date(dateMatch[1]);
|
|
126
|
+
if (isNaN(fileDate.getTime()))
|
|
127
|
+
return false;
|
|
128
|
+
// Use expanded range for file filtering
|
|
129
|
+
if (expandedFromDate && fileDate < new Date(expandedFromDate.toISOString().split('T')[0])) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
if (expandedToDate && fileDate > new Date(expandedToDate.toISOString().split('T')[0])) {
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
return true;
|
|
136
|
+
});
|
|
137
|
+
// Sort by date (oldest first)
|
|
138
|
+
return filtered.sort();
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
return [];
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Check if log entry matches filter criteria
|
|
146
|
+
*/
|
|
147
|
+
matchesFilter(entry, filter) {
|
|
148
|
+
if (!filter)
|
|
149
|
+
return true;
|
|
150
|
+
// Filter by session ID
|
|
151
|
+
if (filter.sessionId && entry.sessionId !== filter.sessionId) {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
// Filter by agent
|
|
155
|
+
if (filter.agent && entry.agent !== filter.agent) {
|
|
156
|
+
return false;
|
|
157
|
+
}
|
|
158
|
+
// Filter by profile
|
|
159
|
+
if (filter.profile && entry.profile !== filter.profile) {
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
// Filter by log level (show level and above)
|
|
163
|
+
if (filter.level) {
|
|
164
|
+
const levels = { debug: 0, info: 1, warn: 2, error: 3 };
|
|
165
|
+
const entryLevel = levels[entry.level] || 0;
|
|
166
|
+
const filterLevel = levels[filter.level] || 0;
|
|
167
|
+
if (entryLevel < filterLevel) {
|
|
168
|
+
return false;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
// Filter by date range
|
|
172
|
+
if (filter.fromDate && entry.timestamp < filter.fromDate) {
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
if (filter.toDate && entry.timestamp > filter.toDate) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
// Filter by pattern
|
|
179
|
+
if (filter.pattern) {
|
|
180
|
+
const searchText = `${entry.agent} ${entry.message}`.toLowerCase();
|
|
181
|
+
if (filter.isRegex) {
|
|
182
|
+
try {
|
|
183
|
+
const regex = new RegExp(filter.pattern, 'i');
|
|
184
|
+
if (!regex.test(searchText)) {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
catch {
|
|
189
|
+
// Invalid regex, fallback to string search
|
|
190
|
+
if (!searchText.includes(filter.pattern.toLowerCase())) {
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
if (!searchText.includes(filter.pattern.toLowerCase())) {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Get the most recent log file path
|
|
205
|
+
*/
|
|
206
|
+
getMostRecentLogFile() {
|
|
207
|
+
try {
|
|
208
|
+
const today = new Date().toISOString().split('T')[0];
|
|
209
|
+
const logFile = join(this.logsDir, `debug-${today}.log`);
|
|
210
|
+
return existsSync(logFile) ? logFile : null;
|
|
211
|
+
}
|
|
212
|
+
catch {
|
|
213
|
+
return null;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Read session metadata and related files
|
|
219
|
+
*/
|
|
220
|
+
export class SessionReader {
|
|
221
|
+
sessionsDir;
|
|
222
|
+
constructor(sessionsDir) {
|
|
223
|
+
this.sessionsDir = sessionsDir || getCodemiePath('sessions');
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Read a single session's metadata
|
|
227
|
+
*/
|
|
228
|
+
readSession(sessionId) {
|
|
229
|
+
try {
|
|
230
|
+
// Try regular session file first
|
|
231
|
+
let sessionFile = join(this.sessionsDir, `${sessionId}.json`);
|
|
232
|
+
// If not found, try completed session file
|
|
233
|
+
if (!existsSync(sessionFile)) {
|
|
234
|
+
sessionFile = join(this.sessionsDir, `completed_${sessionId}.json`);
|
|
235
|
+
if (!existsSync(sessionFile)) {
|
|
236
|
+
return null;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
const content = readFileSync(sessionFile, 'utf-8');
|
|
240
|
+
return parseSessionMetadata(content);
|
|
241
|
+
}
|
|
242
|
+
catch {
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* List all sessions with optional filtering
|
|
248
|
+
*/
|
|
249
|
+
listSessions(filter) {
|
|
250
|
+
const sessions = [];
|
|
251
|
+
try {
|
|
252
|
+
if (!existsSync(this.sessionsDir)) {
|
|
253
|
+
return sessions;
|
|
254
|
+
}
|
|
255
|
+
const files = readdirSync(this.sessionsDir);
|
|
256
|
+
// UUID pattern: 8-4-4-4-12 hexadecimal characters
|
|
257
|
+
const uuidPattern = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\.json$/;
|
|
258
|
+
const completedPattern = /^completed_[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}\.json$/;
|
|
259
|
+
// Filter to only include actual session files (UUID or completed_UUID)
|
|
260
|
+
// Exclude _metrics.jsonl and _conversation.jsonl files
|
|
261
|
+
const sessionFiles = files.filter(f => {
|
|
262
|
+
// Skip non-JSON files
|
|
263
|
+
if (!f.endsWith('.json'))
|
|
264
|
+
return false;
|
|
265
|
+
// Skip metric and conversation files
|
|
266
|
+
if (f.includes('_metrics') || f.includes('_conversation'))
|
|
267
|
+
return false;
|
|
268
|
+
// Only include UUID pattern or completed_UUID pattern
|
|
269
|
+
return uuidPattern.test(f) || completedPattern.test(f);
|
|
270
|
+
});
|
|
271
|
+
for (const file of sessionFiles) {
|
|
272
|
+
const sessionId = file.replace('.json', '').replace('completed_', '');
|
|
273
|
+
const session = this.readSession(sessionId);
|
|
274
|
+
if (!session)
|
|
275
|
+
continue;
|
|
276
|
+
// Apply filters
|
|
277
|
+
if (this.matchesSessionFilter(session, filter)) {
|
|
278
|
+
sessions.push(session);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
// Sort by start time (newest first)
|
|
282
|
+
sessions.sort((a, b) => b.startTime - a.startTime);
|
|
283
|
+
}
|
|
284
|
+
catch {
|
|
285
|
+
// Directory doesn't exist or can't be read
|
|
286
|
+
}
|
|
287
|
+
return sessions;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Check if session matches filter criteria
|
|
291
|
+
*/
|
|
292
|
+
matchesSessionFilter(session, filter) {
|
|
293
|
+
if (!filter)
|
|
294
|
+
return true;
|
|
295
|
+
if (filter.sessionId && session.sessionId !== filter.sessionId) {
|
|
296
|
+
return false;
|
|
297
|
+
}
|
|
298
|
+
if (filter.agent && session.agentName !== filter.agent) {
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
301
|
+
if (filter.fromDate && session.startTime < filter.fromDate.getTime()) {
|
|
302
|
+
return false;
|
|
303
|
+
}
|
|
304
|
+
if (filter.toDate && session.startTime > filter.toDate.getTime()) {
|
|
305
|
+
return false;
|
|
306
|
+
}
|
|
307
|
+
return true;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Get session conversation (JSONL file)
|
|
311
|
+
*/
|
|
312
|
+
readSessionConversation(sessionId) {
|
|
313
|
+
try {
|
|
314
|
+
const conversationFile = join(this.sessionsDir, `${sessionId}_conversation.jsonl`);
|
|
315
|
+
if (!existsSync(conversationFile)) {
|
|
316
|
+
return [];
|
|
317
|
+
}
|
|
318
|
+
const content = readFileSync(conversationFile, 'utf-8');
|
|
319
|
+
const lines = content.trim().split('\n');
|
|
320
|
+
const turns = [];
|
|
321
|
+
for (const line of lines) {
|
|
322
|
+
if (!line.trim())
|
|
323
|
+
continue;
|
|
324
|
+
try {
|
|
325
|
+
turns.push(JSON.parse(line));
|
|
326
|
+
}
|
|
327
|
+
catch {
|
|
328
|
+
// Skip malformed lines
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return turns;
|
|
332
|
+
}
|
|
333
|
+
catch {
|
|
334
|
+
return [];
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Get total size of all session files
|
|
339
|
+
*/
|
|
340
|
+
getTotalSessionsSize() {
|
|
341
|
+
let totalBytes = 0;
|
|
342
|
+
try {
|
|
343
|
+
if (!existsSync(this.sessionsDir)) {
|
|
344
|
+
return 0;
|
|
345
|
+
}
|
|
346
|
+
const files = readdirSync(this.sessionsDir);
|
|
347
|
+
for (const file of files) {
|
|
348
|
+
const filePath = join(this.sessionsDir, file);
|
|
349
|
+
try {
|
|
350
|
+
const stats = statSync(filePath);
|
|
351
|
+
totalBytes += stats.size;
|
|
352
|
+
}
|
|
353
|
+
catch {
|
|
354
|
+
// Skip files we can't stat
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
catch {
|
|
359
|
+
// Directory doesn't exist
|
|
360
|
+
}
|
|
361
|
+
return totalBytes;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
//# sourceMappingURL=reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reader.js","sourceRoot":"","sources":["../../../../src/cli/commands/log/reader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;A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B,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;gBAC9C,IAAI,CAAC;oBACH,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;oBACjC,UAAU,IAAI,KAAK,CAAC,IAAI,CAAC;gBAC3B,CAAC;gBAAC,MAAM,CAAC;oBACP,2BAA2B;gBAC7B,CAAC;YACH,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,0BAA0B;QAC5B,CAAC;QAED,OAAO,UAAU,CAAC;IACpB,CAAC;CACF"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Log command types and interfaces
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Log levels
|
|
6
|
+
*/
|
|
7
|
+
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
8
|
+
/**
|
|
9
|
+
* Parsed log entry from debug log file
|
|
10
|
+
*/
|
|
11
|
+
export interface LogEntry {
|
|
12
|
+
timestamp: Date;
|
|
13
|
+
level: LogLevel;
|
|
14
|
+
agent: string;
|
|
15
|
+
sessionId: string;
|
|
16
|
+
profile: string | null;
|
|
17
|
+
message: string;
|
|
18
|
+
rawLine: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Session metadata from session JSON file
|
|
22
|
+
*/
|
|
23
|
+
export interface SessionMetadata {
|
|
24
|
+
sessionId: string;
|
|
25
|
+
agentName: string;
|
|
26
|
+
provider: string;
|
|
27
|
+
startTime: number;
|
|
28
|
+
endTime?: number;
|
|
29
|
+
status: 'active' | 'completed' | 'failed';
|
|
30
|
+
workingDirectory: string;
|
|
31
|
+
gitBranch?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Filter options for log queries
|
|
35
|
+
*/
|
|
36
|
+
export interface LogFilter {
|
|
37
|
+
sessionId?: string;
|
|
38
|
+
agent?: string;
|
|
39
|
+
profile?: string;
|
|
40
|
+
level?: LogLevel;
|
|
41
|
+
fromDate?: Date;
|
|
42
|
+
toDate?: Date;
|
|
43
|
+
pattern?: string;
|
|
44
|
+
isRegex?: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Log command options (from commander)
|
|
48
|
+
*/
|
|
49
|
+
export interface LogOptions {
|
|
50
|
+
session?: string;
|
|
51
|
+
agent?: string;
|
|
52
|
+
profile?: string;
|
|
53
|
+
level?: string;
|
|
54
|
+
from?: string;
|
|
55
|
+
to?: string;
|
|
56
|
+
last?: string;
|
|
57
|
+
grep?: string;
|
|
58
|
+
lines?: number;
|
|
59
|
+
verbose?: boolean;
|
|
60
|
+
format?: 'text' | 'json' | 'jsonl';
|
|
61
|
+
noColor?: boolean;
|
|
62
|
+
output?: string;
|
|
63
|
+
days?: number;
|
|
64
|
+
sessions?: boolean;
|
|
65
|
+
dryRun?: boolean;
|
|
66
|
+
yes?: boolean;
|
|
67
|
+
sort?: 'time' | 'duration' | 'agent';
|
|
68
|
+
reverse?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Output format options
|
|
72
|
+
*/
|
|
73
|
+
export interface OutputFormat {
|
|
74
|
+
format: 'text' | 'json' | 'jsonl';
|
|
75
|
+
colorize: boolean;
|
|
76
|
+
verbose: boolean;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Cleanup statistics
|
|
80
|
+
*/
|
|
81
|
+
export interface CleanupStats {
|
|
82
|
+
debugLogsDeleted: number;
|
|
83
|
+
sessionsDeleted: number;
|
|
84
|
+
bytesFreed: number;
|
|
85
|
+
oldestFileDate?: Date;
|
|
86
|
+
newestFileDate?: Date;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Session list entry (for list-sessions command)
|
|
90
|
+
*/
|
|
91
|
+
export interface SessionListEntry {
|
|
92
|
+
sessionId: string;
|
|
93
|
+
agentName: string;
|
|
94
|
+
startTime: Date;
|
|
95
|
+
duration?: number;
|
|
96
|
+
status: string;
|
|
97
|
+
workingDirectory: string;
|
|
98
|
+
gitBranch?: string;
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/log/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,EAAE,QAAQ,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC1C,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,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EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/cli/commands/log/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/profile/display.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAGnE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/profile/display.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAGnE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC7B;AAGD;;GAEG;AACH,qBAAa,cAAc;IACzB;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM;IAsBxC;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,IAAI;IA6BhD;;;;;OAKG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI;CAgCtE"}
|
|
@@ -16,14 +16,22 @@ export class ProfileDisplay {
|
|
|
16
16
|
* @returns Formatted string
|
|
17
17
|
*/
|
|
18
18
|
static format(info) {
|
|
19
|
-
const { name, active, profile } = info;
|
|
20
|
-
|
|
19
|
+
const { name, active, profile, source } = info;
|
|
20
|
+
const baseInfo = renderProfileInfo({
|
|
21
21
|
profile: name,
|
|
22
22
|
provider: profile.provider || 'N/A',
|
|
23
23
|
model: profile.model || 'N/A',
|
|
24
24
|
codeMieUrl: profile.codeMieUrl,
|
|
25
25
|
isActive: active
|
|
26
26
|
});
|
|
27
|
+
// Add source indicator if available
|
|
28
|
+
if (source) {
|
|
29
|
+
const sourceIndicator = source === 'local'
|
|
30
|
+
? chalk.yellow(' [Local]')
|
|
31
|
+
: chalk.cyan(' [Global]');
|
|
32
|
+
return baseInfo + sourceIndicator;
|
|
33
|
+
}
|
|
34
|
+
return baseInfo;
|
|
27
35
|
}
|
|
28
36
|
/**
|
|
29
37
|
* Display list of profiles
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/cli/commands/profile/display.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAA0B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/cli/commands/profile/display.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAA0B,MAAM,2BAA2B,CAAC;AAatF;;GAEG;AACH,MAAM,OAAO,cAAc;IACzB;;;;;OAKG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