wormclaude 1.0.225 → 1.0.226
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 +23 -1
- package/package.json +1 -1
package/dist/theme.js
CHANGED
package/dist/tools.js
CHANGED
|
@@ -806,6 +806,24 @@ export function isInspectLock() { return inspectLock; }
|
|
|
806
806
|
export function setInspectLock(on) { inspectLock = !!on; _inspectReads.clear(); }
|
|
807
807
|
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
808
|
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
|
+
// Minified/bundle/hash'li/generated ASSET mı? İnceleme modunda bunları okumak projeyi
|
|
810
|
+
// anlatmaz, sadece context yakar → deterministik atla. .py/.md/.json/.txt/.html ASLA atlanmaz.
|
|
811
|
+
export function _isMinifiedAsset(p) {
|
|
812
|
+
const b = (p.split(/[\\/]/).pop() || '');
|
|
813
|
+
if (/\.map$/i.test(b))
|
|
814
|
+
return true;
|
|
815
|
+
if (/[\\/](node_modules|dist|build|\.next|\.nuxt|\.output)[\\/]/i.test(p))
|
|
816
|
+
return true;
|
|
817
|
+
if (/\.(js|mjs|cjs|css)$/i.test(b)) {
|
|
818
|
+
if (/\.min\.(js|css)$/i.test(b))
|
|
819
|
+
return true;
|
|
820
|
+
if (/-[A-Za-z0-9_]{6,}\.(js|mjs|cjs|css)$/.test(b))
|
|
821
|
+
return true; // hash'li chunk: Name-AbC123.js
|
|
822
|
+
if (/^(bundle|vendor|chunk|runtime|polyfills?|main|index)([._-].*)?\.(js|css)$/i.test(b))
|
|
823
|
+
return true;
|
|
824
|
+
}
|
|
825
|
+
return false;
|
|
826
|
+
}
|
|
809
827
|
// incele-fiili VAR ama yap/yaz/tara/audit gibi eylem-fiili YOK → salt-oku kilidi aç.
|
|
810
828
|
// KRİTİK: dosya YOLLARINI önce çıkar — "poc_clone", "build/", "create_x.py" gibi alt-diziler
|
|
811
829
|
// eylem-fiili ("clone/build/create") sanılıp kilidi yanlışlıkla KAPATMASIN (false-negative).
|
|
@@ -890,9 +908,13 @@ async function execOne(call, hooks) {
|
|
|
890
908
|
if (_mut.has(call.name) || (_isShell && !_roCmd)) {
|
|
891
909
|
return { ok: false, output: 'This is an INSPECT/UNDERSTAND task (the user asked to review/explain — they did NOT ask to write, fix, scan, or audit). Do NOT create or modify any file, and do NOT run CodeAudit, SecurityScan, or shell commands. Read only the MEANINGFUL files (docs, entry point, config) with Read/Glob/Grep — SKIP minified/vendor/bundled files and data dumps — then explain the project in clear, concise TEXT. Do this SILENTLY: do NOT mention this restriction or narrate switching tools; just read and explain.', args };
|
|
892
910
|
}
|
|
893
|
-
// Döngü kırıcı: aynı dosyayı bu turda tekrar okuma (compaction sonrası re-read loop'u).
|
|
894
911
|
if (call.name === 'Read') {
|
|
895
912
|
const _p = String(args?.file_path || '');
|
|
913
|
+
// Minified/vendor/bundle/generated asset → deterministik atla (prompt tek başına tutmuyordu).
|
|
914
|
+
if (_p && _isMinifiedAsset(_p)) {
|
|
915
|
+
return { ok: false, output: `[SKIP-ASSET] "${_p.split(/[\\/]/).pop()}" is a minified/bundled/generated asset — reading it tells you nothing about what the project DOES. Do NOT read it. Read source/docs/config/entry files instead, or finish and explain.`, args };
|
|
916
|
+
}
|
|
917
|
+
// Döngü kırıcı: aynı dosyayı bu turda tekrar okuma (compaction sonrası re-read loop'u).
|
|
896
918
|
if (_p && _inspectReads.has(_p)) {
|
|
897
919
|
return { ok: false, output: `[ALREADY-READ] "${_p}" was already read this turn (its content is above). Do NOT read it again — continue explaining with what you already have, or finish.`, args };
|
|
898
920
|
}
|