@dmsdc-ai/aigentry-devkit 0.1.2 → 0.1.3
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.
|
@@ -1115,13 +1115,21 @@ function resolveSessionId(sessionId) {
|
|
|
1115
1115
|
|
|
1116
1116
|
function syncMarkdown(state) {
|
|
1117
1117
|
const filename = `deliberation-${state.id}.md`;
|
|
1118
|
-
|
|
1118
|
+
// Write to state dir instead of CWD to avoid polluting project root
|
|
1119
|
+
const mdPath = path.join(getProjectStateDir(), filename);
|
|
1119
1120
|
try {
|
|
1120
1121
|
writeTextAtomic(mdPath, stateToMarkdown(state));
|
|
1121
|
-
} catch {
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1122
|
+
} catch { /* ignore sync failures */ }
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
function cleanupSyncMarkdown(state) {
|
|
1126
|
+
const filename = `deliberation-${state.id}.md`;
|
|
1127
|
+
// Remove from state dir
|
|
1128
|
+
const statePath = path.join(getProjectStateDir(), filename);
|
|
1129
|
+
try { fs.unlinkSync(statePath); } catch { /* ignore */ }
|
|
1130
|
+
// Also clean up legacy files in CWD (from older versions)
|
|
1131
|
+
const cwdPath = path.join(process.cwd(), filename);
|
|
1132
|
+
try { fs.unlinkSync(cwdPath); } catch { /* ignore */ }
|
|
1125
1133
|
}
|
|
1126
1134
|
|
|
1127
1135
|
function stateToMarkdown(s) {
|
|
@@ -1295,6 +1303,8 @@ function openPhysicalTerminal(sessionId) {
|
|
|
1295
1303
|
"-e",
|
|
1296
1304
|
'tell application "Terminal"',
|
|
1297
1305
|
"-e",
|
|
1306
|
+
"activate",
|
|
1307
|
+
"-e",
|
|
1298
1308
|
`do script ${appleScriptQuote(attachCmd)}`,
|
|
1299
1309
|
"-e",
|
|
1300
1310
|
"delay 0.15",
|
|
@@ -2296,6 +2306,7 @@ server.tool(
|
|
|
2296
2306
|
loaded.current_speaker = "none";
|
|
2297
2307
|
saveSession(loaded);
|
|
2298
2308
|
archivePath = archiveState(loaded);
|
|
2309
|
+
cleanupSyncMarkdown(loaded);
|
|
2299
2310
|
state = loaded;
|
|
2300
2311
|
return null;
|
|
2301
2312
|
});
|
|
@@ -2361,6 +2372,7 @@ server.tool(
|
|
|
2361
2372
|
if (state && state.log.length > 0) {
|
|
2362
2373
|
archiveState(state);
|
|
2363
2374
|
}
|
|
2375
|
+
if (state) cleanupSyncMarkdown(state);
|
|
2364
2376
|
toCloseIds = getSessionWindowIds(state);
|
|
2365
2377
|
fs.unlinkSync(file);
|
|
2366
2378
|
return { content: [{ type: "text", text: `✅ 세션 "${session_id}" 초기화 완료. 🖥️ 모니터 터미널 닫힘.` }] };
|
|
@@ -2392,6 +2404,7 @@ server.tool(
|
|
|
2392
2404
|
archiveState(state);
|
|
2393
2405
|
archived++;
|
|
2394
2406
|
}
|
|
2407
|
+
cleanupSyncMarkdown(state);
|
|
2395
2408
|
fs.unlinkSync(filePath);
|
|
2396
2409
|
} catch {
|
|
2397
2410
|
try {
|