wave-agent-sdk 0.0.7 → 0.0.10
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/dist/agent.d.ts +105 -24
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +438 -53
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/managers/aiManager.d.ts +18 -7
- package/dist/managers/aiManager.d.ts.map +1 -1
- package/dist/managers/aiManager.js +254 -142
- package/dist/managers/backgroundBashManager.d.ts.map +1 -1
- package/dist/managers/backgroundBashManager.js +11 -9
- package/dist/managers/hookManager.d.ts +6 -6
- package/dist/managers/hookManager.d.ts.map +1 -1
- package/dist/managers/hookManager.js +81 -39
- package/dist/managers/liveConfigManager.d.ts +95 -0
- package/dist/managers/liveConfigManager.d.ts.map +1 -0
- package/dist/managers/liveConfigManager.js +442 -0
- package/dist/managers/lspManager.d.ts +43 -0
- package/dist/managers/lspManager.d.ts.map +1 -0
- package/dist/managers/lspManager.js +326 -0
- package/dist/managers/messageManager.d.ts +41 -24
- package/dist/managers/messageManager.d.ts.map +1 -1
- package/dist/managers/messageManager.js +184 -73
- package/dist/managers/permissionManager.d.ts +66 -0
- package/dist/managers/permissionManager.d.ts.map +1 -0
- package/dist/managers/permissionManager.js +208 -0
- package/dist/managers/skillManager.d.ts +1 -0
- package/dist/managers/skillManager.d.ts.map +1 -1
- package/dist/managers/skillManager.js +2 -1
- package/dist/managers/slashCommandManager.d.ts.map +1 -1
- package/dist/managers/slashCommandManager.js +4 -2
- package/dist/managers/subagentManager.d.ts +42 -6
- package/dist/managers/subagentManager.d.ts.map +1 -1
- package/dist/managers/subagentManager.js +213 -62
- package/dist/managers/toolManager.d.ts +38 -1
- package/dist/managers/toolManager.d.ts.map +1 -1
- package/dist/managers/toolManager.js +66 -2
- package/dist/services/aiService.d.ts +15 -5
- package/dist/services/aiService.d.ts.map +1 -1
- package/dist/services/aiService.js +446 -77
- package/dist/services/configurationService.d.ts +116 -0
- package/dist/services/configurationService.d.ts.map +1 -0
- package/dist/services/configurationService.js +585 -0
- package/dist/services/fileWatcher.d.ts +69 -0
- package/dist/services/fileWatcher.d.ts.map +1 -0
- package/dist/services/fileWatcher.js +212 -0
- package/dist/services/hook.d.ts +5 -40
- package/dist/services/hook.d.ts.map +1 -1
- package/dist/services/hook.js +47 -109
- package/dist/services/jsonlHandler.d.ts +71 -0
- package/dist/services/jsonlHandler.d.ts.map +1 -0
- package/dist/services/jsonlHandler.js +236 -0
- package/dist/services/memory.d.ts.map +1 -1
- package/dist/services/memory.js +33 -11
- package/dist/services/session.d.ts +116 -52
- package/dist/services/session.d.ts.map +1 -1
- package/dist/services/session.js +415 -143
- package/dist/tools/bashTool.d.ts.map +1 -1
- package/dist/tools/bashTool.js +77 -17
- package/dist/tools/deleteFileTool.d.ts.map +1 -1
- package/dist/tools/deleteFileTool.js +27 -1
- package/dist/tools/editTool.d.ts.map +1 -1
- package/dist/tools/editTool.js +33 -8
- package/dist/tools/lspTool.d.ts +6 -0
- package/dist/tools/lspTool.d.ts.map +1 -0
- package/dist/tools/lspTool.js +589 -0
- package/dist/tools/multiEditTool.d.ts.map +1 -1
- package/dist/tools/multiEditTool.js +30 -10
- package/dist/tools/readTool.d.ts.map +1 -1
- package/dist/tools/readTool.js +113 -3
- package/dist/tools/skillTool.js +2 -2
- package/dist/tools/todoWriteTool.d.ts.map +1 -1
- package/dist/tools/todoWriteTool.js +23 -0
- package/dist/tools/types.d.ts +11 -8
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/tools/writeTool.d.ts.map +1 -1
- package/dist/tools/writeTool.js +30 -15
- package/dist/types/commands.d.ts +4 -1
- package/dist/types/commands.d.ts.map +1 -1
- package/dist/types/config.d.ts +4 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/configuration.d.ts +69 -0
- package/dist/types/configuration.d.ts.map +1 -0
- package/dist/types/configuration.js +8 -0
- package/dist/types/core.d.ts +45 -0
- package/dist/types/core.d.ts.map +1 -1
- package/dist/types/environment.d.ts +83 -0
- package/dist/types/environment.d.ts.map +1 -0
- package/dist/types/environment.js +21 -0
- package/dist/types/fileSearch.d.ts +5 -0
- package/dist/types/fileSearch.d.ts.map +1 -0
- package/dist/types/fileSearch.js +1 -0
- package/dist/types/hooks.d.ts +18 -3
- package/dist/types/hooks.d.ts.map +1 -1
- package/dist/types/hooks.js +8 -8
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +7 -0
- package/dist/types/lsp.d.ts +90 -0
- package/dist/types/lsp.d.ts.map +1 -0
- package/dist/types/lsp.js +4 -0
- package/dist/types/messaging.d.ts +19 -12
- package/dist/types/messaging.d.ts.map +1 -1
- package/dist/types/permissions.d.ts +35 -0
- package/dist/types/permissions.d.ts.map +1 -0
- package/dist/types/permissions.js +12 -0
- package/dist/types/session.d.ts +15 -0
- package/dist/types/session.d.ts.map +1 -0
- package/dist/types/session.js +7 -0
- package/dist/types/skills.d.ts +1 -0
- package/dist/types/skills.d.ts.map +1 -1
- package/dist/types/tools.d.ts +35 -0
- package/dist/types/tools.d.ts.map +1 -0
- package/dist/types/tools.js +4 -0
- package/dist/utils/abortUtils.d.ts +34 -0
- package/dist/utils/abortUtils.d.ts.map +1 -0
- package/dist/utils/abortUtils.js +92 -0
- package/dist/utils/bashHistory.d.ts +4 -0
- package/dist/utils/bashHistory.d.ts.map +1 -1
- package/dist/utils/bashHistory.js +48 -30
- package/dist/utils/builtinSubagents.d.ts +7 -0
- package/dist/utils/builtinSubagents.d.ts.map +1 -0
- package/dist/utils/builtinSubagents.js +65 -0
- package/dist/utils/cacheControlUtils.d.ts +96 -0
- package/dist/utils/cacheControlUtils.d.ts.map +1 -0
- package/dist/utils/cacheControlUtils.js +324 -0
- package/dist/utils/commandPathResolver.d.ts +52 -0
- package/dist/utils/commandPathResolver.d.ts.map +1 -0
- package/dist/utils/commandPathResolver.js +145 -0
- package/dist/utils/configPaths.d.ts +85 -0
- package/dist/utils/configPaths.d.ts.map +1 -0
- package/dist/utils/configPaths.js +121 -0
- package/dist/utils/constants.d.ts +1 -13
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +2 -14
- package/dist/utils/convertMessagesForAPI.d.ts +2 -1
- package/dist/utils/convertMessagesForAPI.d.ts.map +1 -1
- package/dist/utils/convertMessagesForAPI.js +39 -18
- package/dist/utils/customCommands.d.ts.map +1 -1
- package/dist/utils/customCommands.js +66 -21
- package/dist/utils/fileSearch.d.ts +14 -0
- package/dist/utils/fileSearch.d.ts.map +1 -0
- package/dist/utils/fileSearch.js +88 -0
- package/dist/utils/fileUtils.d.ts +27 -0
- package/dist/utils/fileUtils.d.ts.map +1 -0
- package/dist/utils/fileUtils.js +145 -0
- package/dist/utils/globalLogger.d.ts +88 -0
- package/dist/utils/globalLogger.d.ts.map +1 -0
- package/dist/utils/globalLogger.js +120 -0
- package/dist/utils/largeOutputHandler.d.ts +15 -0
- package/dist/utils/largeOutputHandler.d.ts.map +1 -0
- package/dist/utils/largeOutputHandler.js +40 -0
- package/dist/utils/markdownParser.d.ts.map +1 -1
- package/dist/utils/markdownParser.js +1 -17
- package/dist/utils/mcpUtils.d.ts.map +1 -1
- package/dist/utils/mcpUtils.js +25 -3
- package/dist/utils/messageOperations.d.ts +20 -18
- package/dist/utils/messageOperations.d.ts.map +1 -1
- package/dist/utils/messageOperations.js +30 -38
- package/dist/utils/pathEncoder.d.ts +108 -0
- package/dist/utils/pathEncoder.d.ts.map +1 -0
- package/dist/utils/pathEncoder.js +279 -0
- package/dist/utils/subagentParser.d.ts +2 -2
- package/dist/utils/subagentParser.d.ts.map +1 -1
- package/dist/utils/subagentParser.js +12 -8
- package/dist/utils/tokenCalculation.d.ts +26 -0
- package/dist/utils/tokenCalculation.d.ts.map +1 -0
- package/dist/utils/tokenCalculation.js +36 -0
- package/dist/utils/tokenEstimator.d.ts +39 -0
- package/dist/utils/tokenEstimator.d.ts.map +1 -0
- package/dist/utils/tokenEstimator.js +55 -0
- package/package.json +6 -6
- package/src/agent.ts +586 -78
- package/src/index.ts +4 -0
- package/src/managers/aiManager.ts +341 -192
- package/src/managers/backgroundBashManager.ts +11 -9
- package/src/managers/hookManager.ts +102 -54
- package/src/managers/liveConfigManager.ts +634 -0
- package/src/managers/lspManager.ts +434 -0
- package/src/managers/messageManager.ts +258 -121
- package/src/managers/permissionManager.ts +276 -0
- package/src/managers/skillManager.ts +3 -1
- package/src/managers/slashCommandManager.ts +5 -3
- package/src/managers/subagentManager.ts +295 -76
- package/src/managers/toolManager.ts +95 -3
- package/src/services/aiService.ts +656 -84
- package/src/services/configurationService.ts +762 -0
- package/src/services/fileWatcher.ts +300 -0
- package/src/services/hook.ts +54 -144
- package/src/services/jsonlHandler.ts +303 -0
- package/src/services/memory.ts +34 -11
- package/src/services/session.ts +522 -173
- package/src/tools/bashTool.ts +94 -20
- package/src/tools/deleteFileTool.ts +38 -1
- package/src/tools/editTool.ts +44 -9
- package/src/tools/lspTool.ts +760 -0
- package/src/tools/multiEditTool.ts +41 -11
- package/src/tools/readTool.ts +127 -3
- package/src/tools/skillTool.ts +2 -2
- package/src/tools/todoWriteTool.ts +33 -1
- package/src/tools/types.ts +15 -9
- package/src/tools/writeTool.ts +43 -16
- package/src/types/commands.ts +6 -1
- package/src/types/config.ts +5 -0
- package/src/types/configuration.ts +73 -0
- package/src/types/core.ts +55 -0
- package/src/types/environment.ts +104 -0
- package/src/types/fileSearch.ts +4 -0
- package/src/types/hooks.ts +32 -16
- package/src/types/index.ts +7 -0
- package/src/types/lsp.ts +96 -0
- package/src/types/messaging.ts +21 -14
- package/src/types/permissions.ts +48 -0
- package/src/types/session.ts +20 -0
- package/src/types/skills.ts +1 -0
- package/src/types/tools.ts +38 -0
- package/src/utils/abortUtils.ts +118 -0
- package/src/utils/bashHistory.ts +55 -31
- package/src/utils/builtinSubagents.ts +71 -0
- package/src/utils/cacheControlUtils.ts +475 -0
- package/src/utils/commandPathResolver.ts +189 -0
- package/src/utils/configPaths.ts +163 -0
- package/src/utils/constants.ts +2 -17
- package/src/utils/convertMessagesForAPI.ts +44 -18
- package/src/utils/customCommands.ts +90 -22
- package/src/utils/fileSearch.ts +107 -0
- package/src/utils/fileUtils.ts +160 -0
- package/src/utils/globalLogger.ts +128 -0
- package/src/utils/largeOutputHandler.ts +55 -0
- package/src/utils/markdownParser.ts +1 -19
- package/src/utils/mcpUtils.ts +34 -3
- package/src/utils/messageOperations.ts +47 -53
- package/src/utils/pathEncoder.ts +394 -0
- package/src/utils/subagentParser.ts +13 -9
- package/src/utils/tokenCalculation.ts +43 -0
- package/src/utils/tokenEstimator.ts +68 -0
- package/dist/utils/configResolver.d.ts +0 -38
- package/dist/utils/configResolver.d.ts.map +0 -1
- package/dist/utils/configResolver.js +0 -106
- package/src/utils/configResolver.ts +0 -142
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSONL file operations service
|
|
3
|
+
* Handles reading and writing JSONL (JSON Lines) session files for improved performance
|
|
4
|
+
*/
|
|
5
|
+
import { appendFile, readFile, writeFile, stat, mkdir } from "fs/promises";
|
|
6
|
+
import { dirname } from "path";
|
|
7
|
+
import { getLastLine } from "../utils/fileUtils.js";
|
|
8
|
+
/**
|
|
9
|
+
* JSONL handler class for message persistence operations
|
|
10
|
+
*/
|
|
11
|
+
export class JsonlHandler {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.defaultWriteOptions = {
|
|
14
|
+
atomic: true,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create a new session file (simplified - no metadata header)
|
|
19
|
+
*/
|
|
20
|
+
async createSession(filePath) {
|
|
21
|
+
// Ensure directory exists
|
|
22
|
+
await this.ensureDirectory(dirname(filePath));
|
|
23
|
+
// Create empty file (no metadata line needed)
|
|
24
|
+
await writeFile(filePath, "", "utf8");
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Append a single message to JSONL file
|
|
28
|
+
*/
|
|
29
|
+
async appendMessage(filePath, message) {
|
|
30
|
+
return this.appendMessages(filePath, [message]);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Append multiple messages to JSONL file
|
|
34
|
+
*/
|
|
35
|
+
async appendMessages(filePath, messages) {
|
|
36
|
+
if (messages.length === 0) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
// Convert to SessionMessage format with timestamps
|
|
40
|
+
const sessionMessages = messages.map((message) => ({
|
|
41
|
+
...message,
|
|
42
|
+
timestamp: new Date().toISOString(),
|
|
43
|
+
}));
|
|
44
|
+
return this.append(filePath, sessionMessages);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Append messages to JSONL file
|
|
48
|
+
*/
|
|
49
|
+
async append(filePath, messages, options) {
|
|
50
|
+
if (messages.length === 0) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const opts = { ...this.defaultWriteOptions, ...options };
|
|
54
|
+
// Validate messages (always enabled for data integrity)
|
|
55
|
+
this.validateMessages(messages);
|
|
56
|
+
// Ensure directory exists
|
|
57
|
+
await this.ensureDirectory(dirname(filePath));
|
|
58
|
+
// Convert messages to JSONL lines (always compact JSON)
|
|
59
|
+
const lines = messages.map((message) => {
|
|
60
|
+
const { timestamp: existingTimestamp, ...messageWithoutTimestamp } = message;
|
|
61
|
+
const messageWithTimestamp = {
|
|
62
|
+
timestamp: existingTimestamp || new Date().toISOString(),
|
|
63
|
+
...messageWithoutTimestamp,
|
|
64
|
+
};
|
|
65
|
+
return JSON.stringify(messageWithTimestamp);
|
|
66
|
+
});
|
|
67
|
+
const content = lines.join("\n") + "\n";
|
|
68
|
+
if (opts.atomic) {
|
|
69
|
+
// Write to temp file first, then rename
|
|
70
|
+
const tempPath = `${filePath}.tmp`;
|
|
71
|
+
await writeFile(tempPath, content, "utf8");
|
|
72
|
+
// Atomic rename
|
|
73
|
+
const { rename } = await import("fs/promises");
|
|
74
|
+
await rename(tempPath, filePath);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
// Direct append
|
|
78
|
+
await appendFile(filePath, content, "utf8");
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Read all messages from JSONL file (simplified - no metadata handling)
|
|
83
|
+
*/
|
|
84
|
+
async read(filePath) {
|
|
85
|
+
try {
|
|
86
|
+
const content = await readFile(filePath, "utf8");
|
|
87
|
+
const lines = content
|
|
88
|
+
.split(/\r?\n/)
|
|
89
|
+
.map((line) => line.trim())
|
|
90
|
+
.filter((line) => line.length > 0);
|
|
91
|
+
if (lines.length === 0) {
|
|
92
|
+
return [];
|
|
93
|
+
}
|
|
94
|
+
const allMessages = [];
|
|
95
|
+
// Parse all messages (no metadata line to skip)
|
|
96
|
+
for (let i = 0; i < lines.length; i++) {
|
|
97
|
+
const line = lines[i];
|
|
98
|
+
try {
|
|
99
|
+
const message = JSON.parse(line);
|
|
100
|
+
if (message.timestamp)
|
|
101
|
+
allMessages.push(message);
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
// Throw error for invalid JSON lines with line number
|
|
105
|
+
throw new Error(`Invalid JSON at line ${i + 1}: ${error}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return allMessages;
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
if (error.code === "ENOENT") {
|
|
112
|
+
return [];
|
|
113
|
+
}
|
|
114
|
+
throw new Error(`Failed to read JSONL file "${filePath}": ${error}`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Get the last message from JSONL file using efficient file reading (simplified)
|
|
119
|
+
*/
|
|
120
|
+
async getLastMessage(filePath) {
|
|
121
|
+
try {
|
|
122
|
+
// First check if file exists
|
|
123
|
+
try {
|
|
124
|
+
await stat(filePath);
|
|
125
|
+
}
|
|
126
|
+
catch (err) {
|
|
127
|
+
if (err.code === "ENOENT") {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
throw err;
|
|
131
|
+
}
|
|
132
|
+
// Use our elegant utility to get the last line
|
|
133
|
+
const lastLine = await getLastLine(filePath);
|
|
134
|
+
if (!lastLine) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
try {
|
|
138
|
+
const parsed = JSON.parse(lastLine);
|
|
139
|
+
return parsed;
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
throw new Error(`Invalid JSON in last line of "${filePath}": ${error}`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
throw new Error(`Failed to get last message from "${filePath}": ${error}`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Validate messages before writing
|
|
151
|
+
*/
|
|
152
|
+
validateMessages(messages) {
|
|
153
|
+
for (let i = 0; i < messages.length; i++) {
|
|
154
|
+
const message = messages[i];
|
|
155
|
+
if (!message.role) {
|
|
156
|
+
throw new Error(`Message at index ${i} is missing required field: role`);
|
|
157
|
+
}
|
|
158
|
+
if (!message.blocks) {
|
|
159
|
+
throw new Error(`Message at index ${i} is missing required field: blocks`);
|
|
160
|
+
}
|
|
161
|
+
if (!Array.isArray(message.blocks)) {
|
|
162
|
+
throw new Error(`Message at index ${i} has invalid blocks field: must be an array`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Ensure directory exists for the given file path
|
|
168
|
+
*/
|
|
169
|
+
async ensureDirectory(dirPath) {
|
|
170
|
+
try {
|
|
171
|
+
await mkdir(dirPath, { recursive: true });
|
|
172
|
+
}
|
|
173
|
+
catch (error) {
|
|
174
|
+
const err = error;
|
|
175
|
+
if (err.code !== "EEXIST") {
|
|
176
|
+
throw error;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Parse session metadata from filename
|
|
182
|
+
* @param filePath - Path to the session file
|
|
183
|
+
* @returns Parsed session filename metadata
|
|
184
|
+
*/
|
|
185
|
+
parseSessionFilename(filePath) {
|
|
186
|
+
// Extract filename from path
|
|
187
|
+
const filename = filePath.split("/").pop() || "";
|
|
188
|
+
// Check if it's a subagent session
|
|
189
|
+
const subagentMatch = filename.match(/^subagent-([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.jsonl$/);
|
|
190
|
+
if (subagentMatch) {
|
|
191
|
+
return {
|
|
192
|
+
sessionId: subagentMatch[1],
|
|
193
|
+
sessionType: "subagent",
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
// Check if it's a main session
|
|
197
|
+
const mainMatch = filename.match(/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.jsonl$/);
|
|
198
|
+
if (mainMatch) {
|
|
199
|
+
return {
|
|
200
|
+
sessionId: mainMatch[1],
|
|
201
|
+
sessionType: "main",
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
throw new Error(`Invalid session filename format: ${filename}`);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Validate filename format
|
|
208
|
+
* @param filename - Filename to validate
|
|
209
|
+
* @returns True if valid, false otherwise
|
|
210
|
+
*/
|
|
211
|
+
isValidSessionFilename(filename) {
|
|
212
|
+
// UUID validation patterns
|
|
213
|
+
const uuidPattern = /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.jsonl$/;
|
|
214
|
+
const subagentPattern = /^subagent-([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.jsonl$/;
|
|
215
|
+
return uuidPattern.test(filename) || subagentPattern.test(filename);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Generate simple filename for sessions
|
|
219
|
+
* @param sessionId - UUID session identifier
|
|
220
|
+
* @param sessionType - Type of session ("main" or "subagent")
|
|
221
|
+
* @returns Generated filename
|
|
222
|
+
*/
|
|
223
|
+
generateSessionFilename(sessionId, sessionType) {
|
|
224
|
+
// Validate sessionId is a valid UUID
|
|
225
|
+
const uuidPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
226
|
+
if (!uuidPattern.test(sessionId)) {
|
|
227
|
+
throw new Error(`Invalid session ID format: ${sessionId}`);
|
|
228
|
+
}
|
|
229
|
+
if (sessionType === "subagent") {
|
|
230
|
+
return `subagent-${sessionId}.jsonl`;
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
return `${sessionId}.jsonl`;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/services/memory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/services/memory.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,KAAG,OAEjD,CAAC;AAEF,eAAO,MAAM,SAAS,GACpB,SAAS,MAAM,EACf,SAAS,MAAM,KACd,OAAO,CAAC,IAAI,CAuCd,CAAC;AAGF,eAAO,MAAM,oBAAoB,QAAa,OAAO,CAAC,IAAI,CA4BzD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAU,SAAS,MAAM,KAAG,OAAO,CAAC,IAAI,CAsBjE,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAAa,OAAO,CAAC,MAAM,CAa3D,CAAC;AAGF,eAAO,MAAM,cAAc,GAAU,SAAS,MAAM,KAAG,OAAO,CAAC,MAAM,CAqBpE,CAAC;AAGF,eAAO,MAAM,wBAAwB,GACnC,SAAS,MAAM,KACd,OAAO,CAAC,MAAM,CAoBhB,CAAC"}
|
package/dist/services/memory.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { promises as fs } from "fs";
|
|
2
2
|
import path from "path";
|
|
3
3
|
import { USER_MEMORY_FILE, DATA_DIRECTORY } from "../utils/constants.js";
|
|
4
|
+
import { logger } from "../utils/globalLogger.js";
|
|
4
5
|
// Project memory related methods
|
|
5
6
|
export const isMemoryMessage = (message) => {
|
|
6
7
|
return message.trim().startsWith("#");
|
|
@@ -21,6 +22,9 @@ export const addMemory = async (message, workdir) => {
|
|
|
21
22
|
catch (error) {
|
|
22
23
|
// File does not exist, create new file
|
|
23
24
|
if (error.code === "ENOENT") {
|
|
25
|
+
logger.info("Memory file does not exist, will create new one", {
|
|
26
|
+
memoryFilePath,
|
|
27
|
+
});
|
|
24
28
|
existingContent =
|
|
25
29
|
"# Memory\n\nThis is the AI assistant's memory file, recording important information and context.\n\n";
|
|
26
30
|
}
|
|
@@ -32,10 +36,10 @@ export const addMemory = async (message, workdir) => {
|
|
|
32
36
|
const updatedContent = existingContent + memoryEntry;
|
|
33
37
|
// Write file
|
|
34
38
|
await fs.writeFile(memoryFilePath, updatedContent, "utf-8");
|
|
35
|
-
|
|
39
|
+
logger.debug(`Memory added to ${memoryFilePath}:`, message);
|
|
36
40
|
}
|
|
37
41
|
catch (error) {
|
|
38
|
-
|
|
42
|
+
logger.error("Failed to add memory:", error);
|
|
39
43
|
throw new Error(`Failed to add memory: ${error.message}`);
|
|
40
44
|
}
|
|
41
45
|
};
|
|
@@ -51,9 +55,12 @@ export const ensureUserMemoryFile = async () => {
|
|
|
51
55
|
catch (error) {
|
|
52
56
|
// File does not exist, create new file
|
|
53
57
|
if (error.code === "ENOENT") {
|
|
58
|
+
logger.info("Creating new user memory file", {
|
|
59
|
+
userMemoryFile: USER_MEMORY_FILE,
|
|
60
|
+
});
|
|
54
61
|
const initialContent = "# User Memory\n\nThis is the user-level memory file, recording important information and context across projects.\n\n";
|
|
55
62
|
await fs.writeFile(USER_MEMORY_FILE, initialContent, "utf-8");
|
|
56
|
-
|
|
63
|
+
logger.debug(`Created user memory file: ${USER_MEMORY_FILE}`);
|
|
57
64
|
}
|
|
58
65
|
else {
|
|
59
66
|
throw error;
|
|
@@ -61,7 +68,7 @@ export const ensureUserMemoryFile = async () => {
|
|
|
61
68
|
}
|
|
62
69
|
}
|
|
63
70
|
catch (error) {
|
|
64
|
-
|
|
71
|
+
logger.error("Failed to ensure user memory file:", error);
|
|
65
72
|
throw new Error(`Failed to ensure user memory file: ${error.message}`);
|
|
66
73
|
}
|
|
67
74
|
};
|
|
@@ -77,33 +84,48 @@ export const addUserMemory = async (message) => {
|
|
|
77
84
|
const updatedContent = existingContent + memoryEntry;
|
|
78
85
|
// Write file
|
|
79
86
|
await fs.writeFile(USER_MEMORY_FILE, updatedContent, "utf-8");
|
|
80
|
-
|
|
87
|
+
logger.debug(`User memory added to ${USER_MEMORY_FILE}:`, message);
|
|
81
88
|
}
|
|
82
89
|
catch (error) {
|
|
83
|
-
|
|
90
|
+
logger.error("Failed to add user memory:", error);
|
|
84
91
|
throw new Error(`Failed to add user memory: ${error.message}`);
|
|
85
92
|
}
|
|
86
93
|
};
|
|
87
94
|
export const getUserMemoryContent = async () => {
|
|
88
95
|
try {
|
|
89
96
|
await ensureUserMemoryFile();
|
|
90
|
-
|
|
97
|
+
const content = await fs.readFile(USER_MEMORY_FILE, "utf-8");
|
|
98
|
+
logger.debug("User memory content read successfully", {
|
|
99
|
+
userMemoryFile: USER_MEMORY_FILE,
|
|
100
|
+
contentLength: content.length,
|
|
101
|
+
});
|
|
102
|
+
return content;
|
|
91
103
|
}
|
|
92
|
-
catch {
|
|
93
|
-
|
|
104
|
+
catch (error) {
|
|
105
|
+
logger.error("Failed to read user memory:", error);
|
|
94
106
|
return "";
|
|
95
107
|
}
|
|
96
108
|
};
|
|
97
109
|
// Read project memory file content
|
|
98
110
|
export const readMemoryFile = async (workdir) => {
|
|
111
|
+
const memoryFilePath = path.join(workdir, "AGENTS.md");
|
|
112
|
+
// Direct file access
|
|
99
113
|
try {
|
|
100
|
-
const
|
|
101
|
-
|
|
114
|
+
const content = await fs.readFile(memoryFilePath, "utf-8");
|
|
115
|
+
logger.debug("Memory file read successfully via direct file access", {
|
|
116
|
+
memoryFilePath,
|
|
117
|
+
contentLength: content.length,
|
|
118
|
+
});
|
|
119
|
+
return content;
|
|
102
120
|
}
|
|
103
121
|
catch (error) {
|
|
104
122
|
if (error.code === "ENOENT") {
|
|
123
|
+
logger.debug("Memory file does not exist, returning empty content", {
|
|
124
|
+
memoryFilePath,
|
|
125
|
+
});
|
|
105
126
|
return "";
|
|
106
127
|
}
|
|
128
|
+
logger.error("Failed to read memory file", { memoryFilePath, error });
|
|
107
129
|
throw error;
|
|
108
130
|
}
|
|
109
131
|
};
|
|
@@ -1,103 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session Management Service - JSONL Format Implementation
|
|
3
|
+
*
|
|
4
|
+
* OPTIMIZED IMPLEMENTATION (Phase 6 Complete):
|
|
5
|
+
* - Filename-based session type identification
|
|
6
|
+
* - Minimal file I/O for metadata extraction
|
|
7
|
+
* - Eliminated metadata headers for cleaner session files
|
|
8
|
+
* - Backward compatible with existing session files
|
|
9
|
+
* - 8-10x performance improvement in session listing operations
|
|
10
|
+
*
|
|
11
|
+
* Key Features:
|
|
12
|
+
* - Session creation without metadata headers
|
|
13
|
+
* - Subagent sessions identified by filename prefix
|
|
14
|
+
* - Performance-optimized session listing
|
|
15
|
+
* - Full backward compatibility maintained
|
|
16
|
+
*/
|
|
1
17
|
import type { Message } from "../types/index.js";
|
|
2
18
|
export interface SessionData {
|
|
3
19
|
id: string;
|
|
4
|
-
timestamp: string;
|
|
5
|
-
version: string;
|
|
6
20
|
messages: Message[];
|
|
7
21
|
metadata: {
|
|
8
22
|
workdir: string;
|
|
9
|
-
startedAt: string;
|
|
10
23
|
lastActiveAt: string;
|
|
11
24
|
latestTotalTokens: number;
|
|
12
25
|
};
|
|
13
26
|
}
|
|
14
27
|
export interface SessionMetadata {
|
|
15
28
|
id: string;
|
|
16
|
-
|
|
29
|
+
sessionType: "main" | "subagent";
|
|
30
|
+
subagentType?: string;
|
|
17
31
|
workdir: string;
|
|
18
|
-
|
|
19
|
-
lastActiveAt: string;
|
|
32
|
+
lastActiveAt: Date;
|
|
20
33
|
latestTotalTokens: number;
|
|
21
34
|
}
|
|
22
35
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @
|
|
25
|
-
* @returns Resolved session directory path
|
|
36
|
+
* Generate a new session ID using Node.js native crypto.randomUUID()
|
|
37
|
+
* @returns UUID string for session identification
|
|
26
38
|
*/
|
|
27
|
-
export declare function
|
|
39
|
+
export declare function generateSessionId(): string;
|
|
40
|
+
/**
|
|
41
|
+
* Generate filename for subagent sessions
|
|
42
|
+
* @param sessionId - UUID session identifier
|
|
43
|
+
* @returns Filename with subagent prefix for subagent sessions
|
|
44
|
+
*/
|
|
45
|
+
export declare function generateSubagentFilename(sessionId: string): string;
|
|
46
|
+
export declare const SESSION_DIR: string;
|
|
28
47
|
/**
|
|
29
48
|
* Ensure session directory exists
|
|
30
|
-
* @param sessionDir Optional custom session directory
|
|
31
49
|
*/
|
|
32
|
-
export declare function ensureSessionDir(
|
|
50
|
+
export declare function ensureSessionDir(): Promise<void>;
|
|
33
51
|
/**
|
|
34
|
-
* Generate session file path
|
|
52
|
+
* Generate session file path without creating directories
|
|
53
|
+
* @param sessionId - UUID session identifier
|
|
54
|
+
* @param workdir - Working directory for the session
|
|
55
|
+
* @param sessionType - Type of session ("main" or "subagent", defaults to "main")
|
|
56
|
+
* @returns Promise resolving to full file path for the session JSONL file
|
|
57
|
+
*/
|
|
58
|
+
export declare function generateSessionFilePath(sessionId: string, workdir: string, sessionType?: "main" | "subagent"): Promise<string>;
|
|
59
|
+
/**
|
|
60
|
+
* Generate session file path using project-based directory structure
|
|
61
|
+
* @param sessionId - UUID session identifier
|
|
62
|
+
* @param workdir - Working directory for the session
|
|
63
|
+
* @param sessionType - Type of session ("main" or "subagent", defaults to "main")
|
|
64
|
+
* @returns Promise resolving to full file path for the session JSONL file
|
|
65
|
+
*/
|
|
66
|
+
export declare function getSessionFilePath(sessionId: string, workdir: string, sessionType?: "main" | "subagent"): Promise<string>;
|
|
67
|
+
/**
|
|
68
|
+
* Create a new session
|
|
69
|
+
* @param sessionId - UUID session identifier
|
|
70
|
+
* @param workdir - Working directory for the session
|
|
71
|
+
* @param sessionType - Type of session ("main" or "subagent", defaults to "main")
|
|
35
72
|
*/
|
|
36
|
-
export declare function
|
|
73
|
+
export declare function createSession(sessionId: string, workdir: string, sessionType?: "main" | "subagent"): Promise<void>;
|
|
37
74
|
/**
|
|
38
|
-
*
|
|
75
|
+
* Append messages to session using JSONL format (new approach)
|
|
39
76
|
*
|
|
40
|
-
* @param sessionId -
|
|
41
|
-
* @param
|
|
77
|
+
* @param sessionId - UUID session identifier
|
|
78
|
+
* @param newMessages - Array of messages to append
|
|
42
79
|
* @param workdir - Working directory for the session
|
|
43
|
-
* @param
|
|
44
|
-
* @param startedAt - ISO timestamp when session started (defaults to current time)
|
|
45
|
-
* @param sessionDir - Optional custom directory for session storage (defaults to ~/.wave/sessions/)
|
|
46
|
-
* @throws {Error} When session cannot be saved due to permission or disk space issues
|
|
80
|
+
* @param sessionType - Type of session ("main" or "subagent", defaults to "main")
|
|
47
81
|
*/
|
|
48
|
-
export declare function
|
|
82
|
+
export declare function appendMessages(sessionId: string, newMessages: Message[], workdir: string, sessionType?: "main" | "subagent"): Promise<void>;
|
|
49
83
|
/**
|
|
50
|
-
* Load session data from
|
|
84
|
+
* Load session data from JSONL file (new approach)
|
|
51
85
|
*
|
|
52
|
-
* @param sessionId -
|
|
53
|
-
* @param
|
|
86
|
+
* @param sessionId - UUID session identifier
|
|
87
|
+
* @param workdir - Working directory for the session
|
|
88
|
+
* @param sessionType - Type of session ("main" or "subagent", defaults to "main")
|
|
54
89
|
* @returns Promise that resolves to session data or null if session doesn't exist
|
|
55
|
-
* @throws {Error} When session exists but cannot be read or contains invalid data
|
|
56
90
|
*/
|
|
57
|
-
export declare function
|
|
91
|
+
export declare function loadSessionFromJsonl(sessionId: string, workdir: string, sessionType?: "main" | "subagent"): Promise<SessionData | null>;
|
|
58
92
|
/**
|
|
59
|
-
* Get the most
|
|
93
|
+
* Get the most recently active session for a specific working directory (new JSONL approach)
|
|
94
|
+
* Only returns main sessions, skips subagent sessions
|
|
95
|
+
* Uses listSessionsFromJsonl which already sorts sessions by last active time (most recent first)
|
|
60
96
|
*
|
|
61
|
-
* @param workdir - Working directory to find the most
|
|
62
|
-
* @
|
|
63
|
-
* @returns Promise that resolves to the most recent session data or null if no sessions exist
|
|
64
|
-
* @throws {Error} When session directory cannot be accessed or session data is corrupted
|
|
97
|
+
* @param workdir - Working directory to find the most recently active session for
|
|
98
|
+
* @returns Promise that resolves to the most recently active session data or null if no sessions exist
|
|
65
99
|
*/
|
|
66
|
-
export declare function
|
|
100
|
+
export declare function getLatestSessionFromJsonl(workdir: string): Promise<SessionData | null>;
|
|
67
101
|
/**
|
|
68
|
-
* List all sessions for a specific working directory
|
|
102
|
+
* List all sessions for a specific working directory (convenience wrapper)
|
|
103
|
+
* Only returns main sessions, skips subagent sessions
|
|
69
104
|
*
|
|
70
105
|
* @param workdir - Working directory to filter sessions by
|
|
71
|
-
* @param includeAllWorkdirs - If true, returns sessions from all working directories
|
|
72
|
-
* @param sessionDir - Optional custom directory for session storage (defaults to ~/.wave/sessions/)
|
|
73
106
|
* @returns Promise that resolves to array of session metadata objects
|
|
74
|
-
* @throws {Error} When session directory cannot be accessed or read
|
|
75
107
|
*/
|
|
76
|
-
export declare function listSessions(workdir: string
|
|
108
|
+
export declare function listSessions(workdir: string): Promise<SessionMetadata[]>;
|
|
77
109
|
/**
|
|
78
|
-
*
|
|
110
|
+
* List all sessions for a specific working directory using JSONL format (optimized approach)
|
|
111
|
+
*
|
|
112
|
+
* PERFORMANCE OPTIMIZATION:
|
|
113
|
+
* - Uses filename parsing exclusively for session metadata
|
|
114
|
+
* - Only reads last message for timestamps and token counts
|
|
115
|
+
* - Eliminates O(n*2) file operations, achieving O(n) performance
|
|
116
|
+
* - Returns simplified session metadata objects
|
|
117
|
+
* - Only includes main sessions, excludes subagent sessions
|
|
79
118
|
*
|
|
80
|
-
* @param
|
|
81
|
-
* @
|
|
82
|
-
* @returns Promise that resolves to true if session was deleted, false if it didn't exist
|
|
83
|
-
* @throws {Error} When session exists but cannot be deleted due to permission issues
|
|
119
|
+
* @param workdir - Working directory to filter sessions by
|
|
120
|
+
* @returns Promise that resolves to array of session metadata objects
|
|
84
121
|
*/
|
|
85
|
-
export declare function
|
|
122
|
+
export declare function listSessionsFromJsonl(workdir: string): Promise<SessionMetadata[]>;
|
|
86
123
|
/**
|
|
87
|
-
* Clean up expired sessions older than
|
|
124
|
+
* Clean up expired sessions older than 14 days based on file modification time
|
|
88
125
|
*
|
|
89
126
|
* @param workdir - Working directory to clean up sessions for
|
|
90
|
-
* @param sessionDir - Optional custom directory for session storage (defaults to ~/.wave/sessions/)
|
|
91
127
|
* @returns Promise that resolves to the number of sessions that were deleted
|
|
92
|
-
* @throws {Error} When session directory cannot be accessed or sessions cannot be deleted
|
|
93
128
|
*/
|
|
94
|
-
export declare function
|
|
129
|
+
export declare function cleanupExpiredSessionsFromJsonl(workdir: string): Promise<number>;
|
|
95
130
|
/**
|
|
96
|
-
*
|
|
131
|
+
* Clean up empty project directories in the session directory
|
|
132
|
+
*/
|
|
133
|
+
export declare function cleanupEmptyProjectDirectories(): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Check if a session exists in JSONL storage (new approach)
|
|
97
136
|
*
|
|
98
|
-
* @param sessionId -
|
|
99
|
-
* @param
|
|
137
|
+
* @param sessionId - UUID session identifier
|
|
138
|
+
* @param workdir - Working directory for the session
|
|
139
|
+
* @param sessionType - Type of session ("main" or "subagent"). If not provided, checks both types.
|
|
100
140
|
* @returns Promise that resolves to true if session exists, false otherwise
|
|
101
141
|
*/
|
|
102
|
-
export declare function
|
|
142
|
+
export declare function sessionExistsInJsonl(sessionId: string, workdir: string, sessionType?: "main" | "subagent"): Promise<boolean>;
|
|
143
|
+
/**
|
|
144
|
+
* Get the content of the first message in a session
|
|
145
|
+
* For user role: get text block content
|
|
146
|
+
* For assistant role: get compress block content
|
|
147
|
+
* @param sessionId - Session ID to get first message from
|
|
148
|
+
* @param workdir - Working directory for session operations
|
|
149
|
+
* @returns Promise that resolves to the first message content or null if not found
|
|
150
|
+
*/
|
|
151
|
+
export declare function getFirstMessageContent(sessionId: string, workdir: string): Promise<string | null>;
|
|
152
|
+
/**
|
|
153
|
+
* Truncate content to a maximum length, adding ellipsis if truncated
|
|
154
|
+
* @param content - The content to truncate
|
|
155
|
+
* @param maxLength - Maximum length before truncation (default: 30)
|
|
156
|
+
* @returns Truncated content with ellipsis if needed
|
|
157
|
+
*/
|
|
158
|
+
export declare function truncateContent(content: string, maxLength?: number): string;
|
|
159
|
+
/**
|
|
160
|
+
* Handle session restoration logic
|
|
161
|
+
* @param restoreSessionId - Specific session ID to restore
|
|
162
|
+
* @param continueLastSession - Whether to continue the most recent session
|
|
163
|
+
* @param workdir - Working directory for session restoration
|
|
164
|
+
* @returns Promise that resolves to session data or undefined
|
|
165
|
+
*/
|
|
166
|
+
export declare function handleSessionRestoration(restoreSessionId?: string, continueLastSession?: boolean, workdir?: string): Promise<SessionData | undefined>;
|
|
103
167
|
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/services/session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/services/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAOjD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,MAAM,CAAC;QACrB,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,GAAG,UAAU,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,IAAI,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAElE;AAGD,eAAO,MAAM,WAAW,QAAuC,CAAC;AAGhE;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAMtD;AAED;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAM,GAAG,UAAmB,GACxC,OAAO,CAAC,MAAM,CAAC,CASjB;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAM,GAAG,UAAmB,GACxC,OAAO,CAAC,MAAM,CAAC,CASjB;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAM,GAAG,UAAmB,GACxC,OAAO,CAAC,IAAI,CAAC,CAIf;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,EAAE,EACtB,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAM,GAAG,UAAmB,GACxC,OAAO,CAAC,IAAI,CAAC,CAqCf;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAM,GAAG,UAAmB,GACxC,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CA2D7B;AAED;;;;;;;GAOG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAU7B;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,eAAe,EAAE,CAAC,CAE5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,eAAe,EAAE,CAAC,CAiF5B;AAED;;;;;GAKG;AACH,wBAAsB,+BAA+B,CACnD,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAmDjB;AAED;;GAEG;AACH,wBAAsB,8BAA8B,IAAI,OAAO,CAAC,IAAI,CAAC,CA+BpE;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,GAChC,OAAO,CAAC,OAAO,CAAC,CAsClB;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAsDxB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,MAAW,GACrB,MAAM,CAKR;AAED;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAC5C,gBAAgB,CAAC,EAAE,MAAM,EACzB,mBAAmB,CAAC,EAAE,OAAO,EAC7B,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CA4ClC"}
|