wormclaude 1.0.233 → 1.0.235
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/theme.js +1 -1
- package/dist/tools.js +18 -2
- package/package.json +1 -1
package/dist/theme.js
CHANGED
package/dist/tools.js
CHANGED
|
@@ -802,8 +802,10 @@ export function setPlanMode(on) { planMode = !!on; }
|
|
|
802
802
|
// Turn başında kullanıcının mesajından hesaplanır → compaction'dan ETKİLENMEZ (turn boyu sabit).
|
|
803
803
|
let inspectLock = false;
|
|
804
804
|
const _inspectReads = new Set();
|
|
805
|
+
// Re-read bütçesi (her mod, turn-başı sıfırlanır): aynı dosyayı Edit yapmadan defalarca okuma israfı.
|
|
806
|
+
const _turnReadCount = new Map();
|
|
805
807
|
export function isInspectLock() { return inspectLock; }
|
|
806
|
-
export function setInspectLock(on) { inspectLock = !!on; _inspectReads.clear(); }
|
|
808
|
+
export function setInspectLock(on) { inspectLock = !!on; _inspectReads.clear(); _turnReadCount.clear(); }
|
|
807
809
|
const _INSPECT_VERBS = /(incele|inceler|ne i[şs]e? yar|a[çc][ıi]kla|analiz|g[öo]zden ge[çc]ir|i[çc]inde ne|ne var|[öo]zetle|anlat|what'?s in|what does|what is in|explain|analy[sz]e|review|inspect|understand|describe|summari[sz]e)/i;
|
|
808
810
|
const _ACTION_VERBS = /(yap\b|yaz\b|olu[şs]tur|kur\b|d[üu]zelt|ekle\b|\bsil\b|de[ğg]i[şs]tir|g[üu]ncelle|refactor|implement|\bbuild\b|create|\bmake\b|\bwrite\b|\bfix\b|\badd\b|remove|\bedit\b|setup|install|generate|klonla|clone|indir|[çc]al[ıi][şs]t[ıi]r|\brun\b|tara\b|scan|recon|\baudit\b|denetle|pentest|exploit|payload|dropper)/i;
|
|
809
811
|
// Minified/bundle/hash'li/generated ASSET mı? İnceleme modunda bunları okumak projeyi
|
|
@@ -943,6 +945,19 @@ async function execOne(call, hooks) {
|
|
|
943
945
|
_inspectReads.add(_p);
|
|
944
946
|
}
|
|
945
947
|
}
|
|
948
|
+
// 3.3) RE-READ BÜTÇESİ (her mod): büyük dosyayı (ör. 748 satır) chunk chunk defalarca okuyup
|
|
949
|
+
// yakınsamama israfını kes. Bir dosyayı Edit'leyince sayaç sıfırlanır (doğrulama re-read'i meşru).
|
|
950
|
+
if ((call.name === 'Edit' || call.name === 'Write') && args?.file_path) {
|
|
951
|
+
_turnReadCount.delete(String(args.file_path));
|
|
952
|
+
}
|
|
953
|
+
if (call.name === 'Read' && args?.file_path && !inspectLock) {
|
|
954
|
+
const _rp = String(args.file_path);
|
|
955
|
+
const _n = (_turnReadCount.get(_rp) || 0) + 1;
|
|
956
|
+
_turnReadCount.set(_rp, _n);
|
|
957
|
+
if (_n > 3) {
|
|
958
|
+
return { ok: false, output: `[RE-READ LIMIT] You have already read "${_rp.split(/[\\/]/).pop()}" ${_n - 1}× this turn — its content is in the context above. STOP re-reading it and make the change you planned NOW with Edit. If you need one specific line, use Grep for that line instead of re-reading the whole file. This limit resets once you Edit the file.`, args };
|
|
959
|
+
}
|
|
960
|
+
}
|
|
946
961
|
// 3.4) Güvenlik taraması — kullanıcı "tara/scan/xss/sqli/recon" deyince model bu aracı çağırır;
|
|
947
962
|
// elle PowerShell payload yazmak YERİNE sunucu motorunu (runPentest) çalıştırır.
|
|
948
963
|
if (call.name === 'SecurityScan') {
|
|
@@ -2047,7 +2062,8 @@ export async function executeTool(name, args) {
|
|
|
2047
2062
|
const fmt = (r, mode) => {
|
|
2048
2063
|
const lines = [
|
|
2049
2064
|
`✓ Klon tamam (${mode}): ${r.pages} sayfa + ${r.assets} asset → ${r.outDir}`,
|
|
2050
|
-
|
|
2065
|
+
`Çalıştır (önerilen, SPA/Next.js için güvenilir): cd "${r.outDir}" && python -m http.server 8000 → tarayıcıda http://localhost:8000`,
|
|
2066
|
+
`(Basit statik sitede index.html'i çift-tıklamak da yeterli; ama SPA/Next.js klonunda file:// altında alt-sayfa/asset yolları kırılabilir, o yüzden statik sunucu daha sağlam.)`,
|
|
2051
2067
|
];
|
|
2052
2068
|
if (r.pageFiles.length)
|
|
2053
2069
|
lines.push('Sayfalar: ' + r.pageFiles.slice(0, 12).map((f) => path.relative(r.outDir, f)).join(', ') + (r.pageFiles.length > 12 ? ` (+${r.pageFiles.length - 12})` : ''));
|