wormclaude 1.0.205 → 1.0.206
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/commands.js +1 -0
- package/dist/theme.js +1 -1
- package/dist/tui.js +45 -0
- package/package.json +1 -1
package/dist/commands.js
CHANGED
|
@@ -66,6 +66,7 @@ export const COMMANDS = [
|
|
|
66
66
|
{ name: '/audit', desc: 'kaynak kod güvenlik denetimi (SAST — sır/açık/CVE, yerel): /audit [klasör]' },
|
|
67
67
|
{ name: '/jwt', desc: 'JWT token güvenlik analizi (alg=none/zayıf-secret/expiry/claim, yerel): /jwt <token>' },
|
|
68
68
|
{ name: '/computer', desc: 'ekran kontrolünü aç/kapa (screenshot + tıkla/yaz, trust3+): See/Click/Type' },
|
|
69
|
+
{ name: '/loop', desc: 'görevi belirli aralıkla tekrarla: /loop 5dk <görev> · durdur: /loop off' },
|
|
69
70
|
{ name: '/spray', desc: 'login formuna parola-spray (yetkili test, trust 3+): /spray <login-url> [kullanıcı]' },
|
|
70
71
|
{ name: '/defaultcreds', desc: 'login\'e varsayılan kimlik denemesi (admin/admin vb, trust 3+): /defaultcreds <login-url>' },
|
|
71
72
|
{ name: '/exploit', desc: 'yetkili testte doğrulanmış PoC üret: /exploit <cve|açıklama>' },
|
package/dist/theme.js
CHANGED
package/dist/tui.js
CHANGED
|
@@ -164,6 +164,10 @@ export async function runTui() {
|
|
|
164
164
|
let inputBuf = '', inputCur = 0, busy = false, streamChars = 0, spin = 0;
|
|
165
165
|
let turnAbort = null; // ESC ile çalışan turu durdurma
|
|
166
166
|
let taskStart = 0; // görev başlangıç zamanı (spinner'da geçen süre için)
|
|
167
|
+
// /loop — oturum-içi zamanlanmış görev tekrarı (CLI açıkken belirli aralıkla çalışır)
|
|
168
|
+
let loopPrompt = '', loopIntervalMs = 0, loopTimer = null, loopCount = 0;
|
|
169
|
+
function stopLoop() { if (loopTimer)
|
|
170
|
+
clearTimeout(loopTimer); loopTimer = null; loopPrompt = ''; }
|
|
167
171
|
// Canlı akış artık FOOTER'da DEĞİL — içerik akışına (mesajın altından aşağı) satır-satır basılır.
|
|
168
172
|
const SPIN = ['·', '✢', '✳', '✶', '✻', '✽', '✶', '✳', '✢'];
|
|
169
173
|
// Canlı bağlam ölçer: son isteğin prompt_tokens'ı = o anki kullanılan bağlam (footer'da gösterilir).
|
|
@@ -620,6 +624,15 @@ export async function runTui() {
|
|
|
620
624
|
lastFbQ = userText;
|
|
621
625
|
lastFbA = lastAnswer;
|
|
622
626
|
}
|
|
627
|
+
// /loop — aktifse ve bu tur loop görevinin kendisiyse, aralık sonra tekrar çalıştır
|
|
628
|
+
if (loopPrompt && displayText === '__loop__') {
|
|
629
|
+
const _m = Math.round(loopIntervalMs / 1000);
|
|
630
|
+
printItem({ kind: 'note', text: `🔁 Sonraki tekrar ${_m >= 60 ? Math.round(_m / 60) + ' dk' : _m + ' sn'} sonra (#${loopCount}). Durdurmak: /loop off` });
|
|
631
|
+
loopTimer = setTimeout(() => { if (loopPrompt) {
|
|
632
|
+
loopCount++;
|
|
633
|
+
runTurn(loopPrompt, '__loop__');
|
|
634
|
+
} }, loopIntervalMs);
|
|
635
|
+
}
|
|
623
636
|
// Oto-hafıza: eşik geçildiyse arka planda hafızayı güncelle
|
|
624
637
|
if (shouldExtract(history))
|
|
625
638
|
triggerMemory(history, config);
|
|
@@ -932,6 +945,34 @@ export async function runTui() {
|
|
|
932
945
|
runTurn(`CodeAudit aracıyla şu yolu kaynak kod güvenliği için tara (SAST): ${a}. Bulguları severity-sıralı özetle + öncelikli düzeltmeler.`, v);
|
|
933
946
|
return;
|
|
934
947
|
}
|
|
948
|
+
// /loop — oturum-içi zamanlanmış görev tekrarı: /loop <aralık> <görev> · /loop off
|
|
949
|
+
if (tok === '/loop') {
|
|
950
|
+
const rest = v.slice(tok.length).trim();
|
|
951
|
+
if (/^(off|stop|dur|kapat)$/i.test(rest)) {
|
|
952
|
+
stopLoop();
|
|
953
|
+
printItem({ kind: 'note', text: '🔁 Loop durduruldu.' });
|
|
954
|
+
return;
|
|
955
|
+
}
|
|
956
|
+
const im = rest.match(/^(\d+)\s*(sn|s|saniye|dk|m|dakika|sa|h|saat)\b/i);
|
|
957
|
+
if (!im) {
|
|
958
|
+
printItem({ kind: 'note', text: 'Kullanım: /loop <aralık> <görev> (örn: /loop 5dk git status) · durdur: /loop off' });
|
|
959
|
+
return;
|
|
960
|
+
}
|
|
961
|
+
const n = parseInt(im[1]);
|
|
962
|
+
const unit = im[2].toLowerCase();
|
|
963
|
+
const mult = /^(sa|h|saat)/.test(unit) ? 3600 : /^(dk|m|dakika)/.test(unit) ? 60 : 1;
|
|
964
|
+
loopIntervalMs = Math.max(10, n * mult) * 1000;
|
|
965
|
+
loopPrompt = rest.slice(im[0].length).trim();
|
|
966
|
+
if (!loopPrompt) {
|
|
967
|
+
loopPrompt = '';
|
|
968
|
+
printItem({ kind: 'note', text: 'Görev belirt: /loop 5dk <yapılacak iş>' });
|
|
969
|
+
return;
|
|
970
|
+
}
|
|
971
|
+
loopCount = 1;
|
|
972
|
+
printItem({ kind: 'note', text: `🔁 Loop başladı: her ${n} ${unit} → "${loopPrompt.slice(0, 50)}". Durdurmak: /loop off (ya da Esc).` });
|
|
973
|
+
runTurn(loopPrompt, '__loop__');
|
|
974
|
+
return;
|
|
975
|
+
}
|
|
935
976
|
// /computer — ekran kontrolü (See/Click/Type) aç-kapa
|
|
936
977
|
if (tok === '/computer') {
|
|
937
978
|
setComputerUse(!isComputerUse());
|
|
@@ -1102,6 +1143,10 @@ export async function runTui() {
|
|
|
1102
1143
|
return;
|
|
1103
1144
|
}
|
|
1104
1145
|
if (key && key.name === 'escape') {
|
|
1146
|
+
if (loopPrompt) {
|
|
1147
|
+
stopLoop();
|
|
1148
|
+
printItem({ kind: 'note', text: '🔁 Loop durduruldu (Esc).' });
|
|
1149
|
+
}
|
|
1105
1150
|
// Tur çalışıyorsa ESC = modeli DURDUR (akış/araç döngüsünü kes). Boştaysa input'u temizle.
|
|
1106
1151
|
if (busy && turnAbort) {
|
|
1107
1152
|
turnAbort.abort();
|