wormclaude 1.0.196 → 1.0.198
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 +2 -0
- package/dist/learn.js +20 -0
- package/dist/theme.js +1 -1
- package/dist/tools.js +1 -1
- package/dist/tui.js +21 -1
- package/package.json +1 -1
package/dist/commands.js
CHANGED
|
@@ -48,6 +48,8 @@ export const COMMANDS = [
|
|
|
48
48
|
{ name: '/kill', desc: 'bir arka plan görevini durdur: /kill <id>' },
|
|
49
49
|
{ name: '/dream', desc: 'arka planda hafızayı konsolide et (.wormclaude/memory.md)' },
|
|
50
50
|
{ name: '/learn', desc: 'web-öğrenme datasını göster / aç-kapa (eğitim için)' },
|
|
51
|
+
{ name: '/iyi', desc: '👍 son cevabı beğen → fine-tune kalite verisi (iyi örnek)' },
|
|
52
|
+
{ name: '/kötü', desc: '👎 son cevabı kötü işaretle → fine-tune\'dan elenir' },
|
|
51
53
|
{ name: '/copy', desc: 'son yaniti panoya kopyala (/copy all = tum sohbet)' },
|
|
52
54
|
{ name: '/izinler', desc: 'onayli shell komutlarini yonet (list/add/remove/clear)' },
|
|
53
55
|
{ name: '/program', desc: 'Doğrulanmış Araştırmacı Programı — güven seviyeni göster' },
|
package/dist/learn.js
CHANGED
|
@@ -45,3 +45,23 @@ export function recordLearned(instruction, response, sources = [], config) {
|
|
|
45
45
|
}
|
|
46
46
|
return true;
|
|
47
47
|
}
|
|
48
|
+
// Beğeni sinyali (👍/👎): kullanıcı son cevabı işaretler → merkezi feedback.jsonl (fine-tune kalite filtresi).
|
|
49
|
+
export async function recordFeedback(instruction, response, rating, config) {
|
|
50
|
+
const instr = (instruction || '').trim();
|
|
51
|
+
const resp = (response || '').trim();
|
|
52
|
+
if (instr.length < 3 || resp.length < 20)
|
|
53
|
+
return false;
|
|
54
|
+
try {
|
|
55
|
+
const r = await fetch(`${config.baseUrl}/feedback`, {
|
|
56
|
+
method: 'POST',
|
|
57
|
+
headers: { 'Content-Type': 'application/json', ...(config.apiKey ? { Authorization: `Bearer ${config.apiKey}` } : {}) },
|
|
58
|
+
body: JSON.stringify({ instruction: instr, response: resp, rating, kat: 'chat' }),
|
|
59
|
+
signal: AbortSignal.timeout(8000),
|
|
60
|
+
});
|
|
61
|
+
const j = await r.json().catch(() => ({}));
|
|
62
|
+
return !!j?.ok;
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
}
|
package/dist/theme.js
CHANGED
package/dist/tools.js
CHANGED
|
@@ -230,7 +230,7 @@ export const toolSchemas = [
|
|
|
230
230
|
parameters: {
|
|
231
231
|
type: 'object',
|
|
232
232
|
properties: {
|
|
233
|
-
tool: { type: 'string', enum: ['auto', 'full', 'recon', 'scan', 'xss', 'sqli', 'dirscan', 'idor', 'portscan', 'osint', 'cloudscan', 'spray', 'defaultcreds'], description: 'auto → OTONOM çoklu-yüzey pentest (web full + network portscan + OSINT + cloud bucket, hepsi tek raporda
|
|
233
|
+
tool: { type: 'string', enum: ['auto', 'full', 'recon', 'scan', 'xss', 'sqli', 'dirscan', 'idor', 'portscan', 'osint', 'cloudscan', 'spray', 'defaultcreds'], description: 'auto → OTONOM çoklu-yüzey pentest (web full + network portscan + OSINT + cloud bucket, hepsi tek raporda). KULLANICI "profesyonel/kapsamlı/eksiksiz/detaylı/tam tara", "pentest yap", "tam denetle", "her şeyi tara", "sızma testi" DEDİĞİNDE BUNU KULLAN (sadece full DEĞİL) — domain/host. full → SADECE web taraması (kullanıcı özellikle "sadece web" derse); recon/scan/dirscan/portscan/osint/cloudscan → domain/host/şirket; xss/sqli/idor → parameterized URL. portscan = TCP port/servis. osint = DNS + e-posta güvenliği (SPF/DMARC). cloudscan = açık bulut bucket keşfi (S3/GCP/Azure). spray = login formuna parola-spray (target = login URL, username param ile; "parola dene"/"spray"/"brute" denince, trust 3+). defaultcreds = login\'e varsayılan kimlikler (admin/admin vb.) dene (target = login URL, trust 3+)' },
|
|
234
234
|
target: { type: 'string', description: 'Domain for recon/scan/dirscan (example.com) OR parameterized URL for xss/sqli (https://example.com/p?id=1)' },
|
|
235
235
|
cookie: { type: 'string', description: 'Optional. Session cookie for AUTHENTICATED / behind-login scanning, e.g. "sessionid=abc123; csrftoken=xyz". The user copies it from their logged-in browser (DevTools → Application → Cookies, or the Cookie request header). Sent only to the target from the user IP — never stored on the server. Provide it whenever the user wants to scan pages behind a login.' },
|
|
236
236
|
auth_header: { type: 'string', description: 'Optional. Authorization header value for token-based authenticated scanning, e.g. "Bearer eyJhbGci..." or "Basic dXNlcjpwYXNz". Use instead of / together with cookie when the site authenticates via a token header.' },
|
package/dist/tui.js
CHANGED
|
@@ -22,7 +22,7 @@ import { getExtCommand, getExtCommands, buildExtCommandPrompt } from './extensio
|
|
|
22
22
|
import { resolveAtMentions } from './atmention.js';
|
|
23
23
|
import { loadMemoryContext, shouldExtract, triggerMemory } from './memory.js';
|
|
24
24
|
import { shouldAutoCompact, runCompact, isContextError } from './compact.js';
|
|
25
|
-
import { recordLearned } from './learn.js';
|
|
25
|
+
import { recordLearned, recordFeedback } from './learn.js';
|
|
26
26
|
import { connectMcpServers } from './mcp.js';
|
|
27
27
|
// Komut çıktılarını context'e eklerken KIS: curl/scan gürültüsü (handshake, tüm header'lar)
|
|
28
28
|
// 32k pencereyi hızla doldurur → baş+son tut, ortayı at. Az token = uzun tarama. Read geniş kalır.
|
|
@@ -110,6 +110,7 @@ export async function runTui() {
|
|
|
110
110
|
...(_memCtx ? [{ role: 'system', content: _memCtx }] : []),
|
|
111
111
|
];
|
|
112
112
|
const displayItems = [{ kind: 'banner' }];
|
|
113
|
+
let lastFbQ = '', lastFbA = ''; // son soru+cevap (👍/👎 beğeni sinyali için — /iyi /kötü)
|
|
113
114
|
let inputBuf = '', inputCur = 0, busy = false, streamChars = 0, spin = 0;
|
|
114
115
|
let turnAbort = null; // ESC ile çalışan turu durdurma
|
|
115
116
|
let taskStart = 0; // görev başlangıç zamanı (spinner'da geçen süre için)
|
|
@@ -564,6 +565,11 @@ export async function runTui() {
|
|
|
564
565
|
if (recordLearned(userText, lastAnswer, sources, config))
|
|
565
566
|
printItem({ kind: 'note', text: t('tui.learned') });
|
|
566
567
|
}
|
|
568
|
+
// Son Q&A'yı sakla — /iyi /kötü beğeni sinyali bunları gönderir (fine-tune kalite filtresi)
|
|
569
|
+
if (userText && lastAnswer) {
|
|
570
|
+
lastFbQ = userText;
|
|
571
|
+
lastFbA = lastAnswer;
|
|
572
|
+
}
|
|
567
573
|
// Oto-hafıza: eşik geçildiyse arka planda hafızayı güncelle
|
|
568
574
|
if (shouldExtract(history))
|
|
569
575
|
triggerMemory(history, config);
|
|
@@ -846,6 +852,20 @@ export async function runTui() {
|
|
|
846
852
|
quit();
|
|
847
853
|
return;
|
|
848
854
|
}
|
|
855
|
+
// /iyi · /kötü — son cevaba beğeni sinyali (👍/👎) → fine-tune kalite filtresi
|
|
856
|
+
if (tok === '/iyi' || tok === '/kötü' || tok === '/kotu' || tok === '/good' || tok === '/bad') {
|
|
857
|
+
const _up = (tok === '/iyi' || tok === '/good');
|
|
858
|
+
if (!lastFbQ || !lastFbA) {
|
|
859
|
+
printItem({ kind: 'note', text: getLang() === 'en' ? 'No recent answer to rate yet.' : 'Henüz işaretlenecek bir cevap yok.' });
|
|
860
|
+
return;
|
|
861
|
+
}
|
|
862
|
+
const _q = lastFbQ, _a = lastFbA;
|
|
863
|
+
lastFbQ = '';
|
|
864
|
+
lastFbA = ''; // çift-oyu önle
|
|
865
|
+
printItem({ kind: 'note', text: _up ? (getLang() === 'en' ? '👍 Thanks — saved as a good example (helps fine-tuning).' : '👍 Teşekkürler — iyi örnek olarak kaydedildi (fine-tune\'u besler).') : (getLang() === 'en' ? '👎 Noted — flagged as a poor answer.' : '👎 Not edildi — kötü cevap olarak işaretlendi.') });
|
|
866
|
+
recordFeedback(_q, _a, _up ? 1 : -1, config).catch(() => { });
|
|
867
|
+
return;
|
|
868
|
+
}
|
|
849
869
|
// /pentest — OTONOM çoklu-yüzey pentest (web+network+OSINT+cloud); SecurityScan tool=auto
|
|
850
870
|
if (tok === '/pentest') {
|
|
851
871
|
const a = v.slice(tok.length).trim();
|