aiexecode 1.0.111 → 1.0.113
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.
Potentially problematic release.
This version of aiexecode might be problematic. Click here for more details.
- package/index.js +135 -59
- package/mcp-agent-lib/src/mcp_message_logger.js +17 -16
- package/package.json +1 -1
- package/payload_viewer/out/404/index.html +1 -1
- package/payload_viewer/out/404.html +1 -1
- package/payload_viewer/out/index.html +1 -1
- package/payload_viewer/out/index.txt +1 -1
- package/prompts/orchestrator.txt +131 -3
- package/src/ai_based/orchestrator.js +27 -2
- package/src/config/feature_flags.js +6 -7
- package/src/system/code_executer.js +30 -2
- package/src/system/conversation_trimmer.js +132 -0
- package/src/system/file_integrity.js +57 -0
- package/src/system/session.js +82 -14
- package/src/system/session_memory.js +30 -2
- package/src/system/system_info.js +254 -40
- package/src/tools/file_reader.js +17 -0
- package/src/util/prompt_loader.js +23 -0
- /package/payload_viewer/out/_next/static/{BqLAmXZiz76q8SE-Oia_y → CRVqYR5xcqEY3rgzrCh4K}/_buildManifest.js +0 -0
- /package/payload_viewer/out/_next/static/{BqLAmXZiz76q8SE-Oia_y → CRVqYR5xcqEY3rgzrCh4K}/_clientMiddlewareManifest.json +0 -0
- /package/payload_viewer/out/_next/static/{BqLAmXZiz76q8SE-Oia_y → CRVqYR5xcqEY3rgzrCh4K}/_ssgManifest.js +0 -0
package/src/tools/file_reader.js
CHANGED
|
@@ -2,6 +2,7 @@ import { safeReadFile, safeStat } from '../util/safe_fs.js';
|
|
|
2
2
|
import { resolve } from 'path';
|
|
3
3
|
import { createHash } from 'crypto';
|
|
4
4
|
import { trackFileRead, saveFileSnapshot } from '../system/file_integrity.js';
|
|
5
|
+
import { markFileAsReRead } from '../system/conversation_trimmer.js';
|
|
5
6
|
import { createDebugLogger } from '../util/debug_log.js';
|
|
6
7
|
import { toDisplayPath } from '../util/path_helper.js';
|
|
7
8
|
import { theme } from '../frontend/design/themeColors.js';
|
|
@@ -56,6 +57,8 @@ export async function read_file({ filePath }) {
|
|
|
56
57
|
if (fileSizeBytes > MAX_FILE_SIZE_BYTES) {
|
|
57
58
|
debugLog(`ERROR: File exceeds ${MAX_FILE_SIZE_BYTES / 1024 / 1024}MB size limit`);
|
|
58
59
|
debugLog('========== read_file ERROR END ==========');
|
|
60
|
+
// trim된 파일 목록에서 제거 (재읽기 시도했으므로 알림 불필요)
|
|
61
|
+
markFileAsReRead(absolutePath);
|
|
59
62
|
return {
|
|
60
63
|
operation_successful: false,
|
|
61
64
|
error_message: `File exceeds 10MB size limit (actual: ${(fileSizeBytes / 1024 / 1024).toFixed(2)}MB). Large files cannot be read for security reasons.`,
|
|
@@ -83,6 +86,8 @@ export async function read_file({ filePath }) {
|
|
|
83
86
|
if (totalLines > MAX_LINES) {
|
|
84
87
|
debugLog(`ERROR: File exceeds ${MAX_LINES} lines limit`);
|
|
85
88
|
debugLog('========== read_file ERROR END ==========');
|
|
89
|
+
// trim된 파일 목록에서 제거 (재읽기 시도했으므로 알림 불필요)
|
|
90
|
+
markFileAsReRead(absolutePath);
|
|
86
91
|
return {
|
|
87
92
|
operation_successful: false,
|
|
88
93
|
error_message: `File exceeds ${MAX_LINES} lines (actual: ${totalLines} lines). Use read_file_range to read specific sections of this large file.`,
|
|
@@ -98,6 +103,9 @@ export async function read_file({ filePath }) {
|
|
|
98
103
|
await trackFileRead(absolutePath, content);
|
|
99
104
|
debugLog(`File read tracked`);
|
|
100
105
|
|
|
106
|
+
// trim된 파일 목록에서 제거 (다시 읽었으므로 알림 불필요)
|
|
107
|
+
markFileAsReRead(absolutePath);
|
|
108
|
+
|
|
101
109
|
// 스냅샷 저장 (UI 미리보기용)
|
|
102
110
|
debugLog(`Saving file snapshot...`);
|
|
103
111
|
saveFileSnapshot(absolutePath, content);
|
|
@@ -125,6 +133,8 @@ export async function read_file({ filePath }) {
|
|
|
125
133
|
|
|
126
134
|
// 에러 시에도 절대경로로 반환
|
|
127
135
|
const absolutePath = resolve(filePath);
|
|
136
|
+
// trim된 파일 목록에서 제거 (재읽기 시도했으므로 알림 불필요)
|
|
137
|
+
markFileAsReRead(absolutePath);
|
|
128
138
|
return {
|
|
129
139
|
operation_successful: false,
|
|
130
140
|
error_message: error.message,
|
|
@@ -214,6 +224,8 @@ export async function read_file_range({ filePath, startLine, endLine }) {
|
|
|
214
224
|
if (fileSizeBytes > MAX_FILE_SIZE_BYTES) {
|
|
215
225
|
debugLog(`ERROR: File exceeds ${MAX_FILE_SIZE_BYTES / 1024 / 1024}MB size limit`);
|
|
216
226
|
debugLog('========== read_file_range ERROR END ==========');
|
|
227
|
+
// trim된 파일 목록에서 제거 (재읽기 시도했으므로 알림 불필요)
|
|
228
|
+
markFileAsReRead(absolutePath);
|
|
217
229
|
return {
|
|
218
230
|
operation_successful: false,
|
|
219
231
|
error_message: `File exceeds 10MB size limit (actual: ${(fileSizeBytes / 1024 / 1024).toFixed(2)}MB). Large files cannot be read for security reasons.`,
|
|
@@ -246,6 +258,9 @@ export async function read_file_range({ filePath, startLine, endLine }) {
|
|
|
246
258
|
await trackFileRead(absolutePath, content);
|
|
247
259
|
debugLog(`File read tracked`);
|
|
248
260
|
|
|
261
|
+
// trim된 파일 목록에서 제거 (다시 읽었으므로 알림 불필요)
|
|
262
|
+
markFileAsReRead(absolutePath);
|
|
263
|
+
|
|
249
264
|
// 스냅샷 저장 (UI 미리보기용)
|
|
250
265
|
debugLog(`Saving file snapshot...`);
|
|
251
266
|
saveFileSnapshot(absolutePath, content);
|
|
@@ -303,6 +318,8 @@ export async function read_file_range({ filePath, startLine, endLine }) {
|
|
|
303
318
|
|
|
304
319
|
// 에러 시에도 절대경로로 반환
|
|
305
320
|
const absolutePath = resolve(filePath);
|
|
321
|
+
// trim된 파일 목록에서 제거 (재읽기 시도했으므로 알림 불필요)
|
|
322
|
+
markFileAsReRead(absolutePath);
|
|
306
323
|
return {
|
|
307
324
|
operation_successful: false,
|
|
308
325
|
error_message: error.message,
|
|
@@ -158,4 +158,27 @@ export function createTodoReminder(todos) {
|
|
|
158
158
|
`현재 할 일 목록:\n${todoList}\n\n완료된 작업은 즉시 완료 처리하세요. 한 번에 하나의 작업만 in_progress로 유지하세요.`,
|
|
159
159
|
{ hideFromUser: false }
|
|
160
160
|
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Trim된 파일 읽기 알림을 생성합니다.
|
|
165
|
+
* Claude Code 스타일: 대화가 trim되어 파일 내용이 삭제되었지만 경로는 기억하도록 안내합니다.
|
|
166
|
+
*
|
|
167
|
+
* @param {Array<string>} filePaths - trim된 파일 경로 배열
|
|
168
|
+
* @returns {string|null} system-reminder 형식의 알림 또는 null
|
|
169
|
+
*/
|
|
170
|
+
export function createTrimmedFileReminder(filePaths) {
|
|
171
|
+
if (!filePaths || filePaths.length === 0) {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const fileList = filePaths.map(path => ` - ${path}`).join('\n');
|
|
176
|
+
|
|
177
|
+
const reminderText = `The following files were read before the conversation was trimmed, but their contents are too large to include in context. Use read_file or read_file_range if you need to access them again:
|
|
178
|
+
|
|
179
|
+
${fileList}
|
|
180
|
+
|
|
181
|
+
Note: These files were previously read in this session. The file integrity system still tracks them, so you can edit them after re-reading.`;
|
|
182
|
+
|
|
183
|
+
return createSystemReminder(reminderText, { hideFromUser: true });
|
|
161
184
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|