wormclaude 1.0.34 → 1.0.36
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/cli.js +23 -4
- package/dist/theme.js +1 -1
- package/dist/tui.js +6 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -47,6 +47,29 @@ if (_arg === 'login' || _arg === 'logout' || _arg === 'whoami' || _arg === '--ve
|
|
|
47
47
|
console.log('wormclaude ' + VERSION);
|
|
48
48
|
process.exit(0);
|
|
49
49
|
}
|
|
50
|
+
// Açılışta güncelleme kontrolü — varsa HEMEN güncelle + yeni sürümle yeniden başlat.
|
|
51
|
+
// (WORMCLAUDE_SKIP_UPDATE re-exec'te set edilir → güncelleme başarısızsa sonsuz döngü olmaz.)
|
|
52
|
+
if (!process.env.WORMCLAUDE_SKIP_UPDATE && !process.env.WORMCLAUDE_BASE_URL) {
|
|
53
|
+
try {
|
|
54
|
+
const _au = await import('./auth.js');
|
|
55
|
+
const _latest = await _au.checkForUpdate(VERSION);
|
|
56
|
+
if (_latest) {
|
|
57
|
+
process.stdout.write(`\n ⟳ Güncelleme bulundu: v${VERSION} → v${_latest}. Güncelleniyor...\n`);
|
|
58
|
+
await _au.runUpdate();
|
|
59
|
+
const { spawn } = await import('node:child_process');
|
|
60
|
+
const _cmd = process.platform === 'win32' ? 'wormclaude.cmd' : 'wormclaude';
|
|
61
|
+
process.stdout.write(' ✓ Güncellendi, yeniden başlatılıyor...\n\n');
|
|
62
|
+
const _child = spawn(_cmd, process.argv.slice(2), {
|
|
63
|
+
stdio: 'inherit', shell: true,
|
|
64
|
+
env: { ...process.env, WORMCLAUDE_SKIP_UPDATE: '1' },
|
|
65
|
+
});
|
|
66
|
+
_child.on('exit', (code) => process.exit(code ?? 0));
|
|
67
|
+
_child.on('error', () => { process.stdout.write(' Güncellendi. Lütfen "wormclaude" komutunu tekrar çalıştır.\n'); process.exit(0); });
|
|
68
|
+
await new Promise(() => { }); // çocuk süreci devralana kadar bekle (ana akışa düşme)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
catch { /* güncelleme kontrolü best-effort — başarısızsa normal başla */ }
|
|
72
|
+
}
|
|
50
73
|
const config = loadConfig();
|
|
51
74
|
if (!config.apiKey) {
|
|
52
75
|
const _a = await import('./auth.js');
|
|
@@ -61,10 +84,6 @@ if (!config.apiKey) {
|
|
|
61
84
|
if (!config.apiKey)
|
|
62
85
|
process.exit(0);
|
|
63
86
|
}
|
|
64
|
-
let _updateLatest = null;
|
|
65
|
-
import('./auth.js').then((a) => a.checkForUpdate(VERSION)).then((v) => { _updateLatest = v; }).catch(() => { });
|
|
66
|
-
process.on('exit', () => { if (_updateLatest)
|
|
67
|
-
process.stdout.write('\n Yeni surum var: ' + VERSION + ' -> ' + _updateLatest + '. Guncelle: wormclaude update\n'); });
|
|
68
87
|
setToolConfig(config); // Agent/alt-agent araçları aynı config'i kullanır
|
|
69
88
|
const MAX_TURNS = Number(process.env.WORMCLAUDE_MAX_TURNS) || 50; // tur limiti
|
|
70
89
|
setLang(loadLang() ?? 'tr'); // kayıtlı dili yükle (yoksa tr)
|
package/dist/theme.js
CHANGED
package/dist/tui.js
CHANGED
|
@@ -78,9 +78,12 @@ export async function runTui() {
|
|
|
78
78
|
function redrawAll() {
|
|
79
79
|
setRegion();
|
|
80
80
|
process.stdout.write('\x1b[2J\x1b[3J\x1b[H');
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
const W = cols();
|
|
82
|
+
// Sıra: BANNER (+ alt yazı) → model/plan/mail/cwd başlığı → mesajlar.
|
|
83
|
+
process.stdout.write(itemAnsi(displayItems[0], W) + '\n'); // banner (displayItems[0])
|
|
84
|
+
process.stdout.write(headerLines(W).join('\n') + '\n'); // banner ALTINA: model/sürüm/plan/mail/cwd
|
|
85
|
+
for (let i = 1; i < displayItems.length; i++)
|
|
86
|
+
process.stdout.write(itemAnsi(displayItems[i], W) + '\n');
|
|
84
87
|
drawFooter();
|
|
85
88
|
}
|
|
86
89
|
// İçerik öğesini ekle + içerik alanına bas (taşarsa scrollback'e → kopyalanır). Footer sabit kalır.
|