@ictechgy/context-guard 0.4.14 → 0.4.16
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/CHANGELOG.md +15 -0
- package/README.ko.md +72 -1
- package/README.md +85 -2
- package/docs/benchmark-fixtures/image-context-pack-full-evidence.prompt.example.md +28 -0
- package/docs/benchmark-fixtures/image-context-pack-packed-evidence.prompt.example.md +31 -0
- package/docs/benchmark-fixtures/image-context-pack.evidence.example.jsonl +2 -0
- package/docs/benchmark-fixtures/image-context-pack.tasks.example.json +18 -0
- package/docs/benchmark-fixtures/image-context-pack.variants.example.json +10 -0
- package/docs/benchmark-workflow-examples.md +16 -0
- package/docs/experimental-benchmark-fixtures.md +52 -1
- package/package.json +2 -1
- package/plugins/context-guard/.claude-plugin/plugin.json +1 -1
- package/plugins/context-guard/README.ko.md +43 -0
- package/plugins/context-guard/README.md +43 -0
- package/plugins/context-guard/bin/context-guard-artifact +90 -9
- package/plugins/context-guard/bin/context-guard-audit +169 -66
- package/plugins/context-guard/bin/context-guard-bench +7038 -307
- package/plugins/context-guard/bin/context-guard-compress +90 -8
- package/plugins/context-guard/bin/context-guard-diet +1 -7
- package/plugins/context-guard/bin/context-guard-experiments +3085 -134
- package/plugins/context-guard/bin/context-guard-failed-nudge +705 -83
- package/plugins/context-guard/bin/context-guard-guard-read +490 -55
- package/plugins/context-guard/bin/context-guard-mcp +999 -0
- package/plugins/context-guard/bin/context-guard-pack +744 -20
- package/plugins/context-guard/bin/context-guard-read-symbol +7 -2
- package/plugins/context-guard/bin/context-guard-rewrite-bash +2204 -223
- package/plugins/context-guard/bin/context-guard-sanitize-output +560 -85
- package/plugins/context-guard/bin/context-guard-setup +1073 -147
- package/plugins/context-guard/bin/context-guard-statusline +131 -54
- package/plugins/context-guard/bin/context-guard-statusline-merged +7 -3
- package/plugins/context-guard/bin/context-guard-tool-prune +44 -11
- package/plugins/context-guard/bin/context-guard-trim-output +89 -13
- package/plugins/context-guard/brief/README.md +19 -0
- package/plugins/context-guard/brief/narration-mode.quiet.md +21 -0
- package/plugins/context-guard/lib/context_guard_commands.py +14 -2
- package/plugins/context-guard/lib/credential_policy.py +177 -0
- package/plugins/context-guard/lib/transcript_usage_reducer.py +378 -0
|
@@ -51,7 +51,12 @@ def _load_sanitize_output():
|
|
|
51
51
|
if spec is None:
|
|
52
52
|
continue
|
|
53
53
|
module = importlib.util.module_from_spec(spec)
|
|
54
|
-
loader.
|
|
54
|
+
sys.modules[loader.name] = module
|
|
55
|
+
try:
|
|
56
|
+
loader.exec_module(module)
|
|
57
|
+
except Exception:
|
|
58
|
+
sys.modules.pop(loader.name, None)
|
|
59
|
+
raise
|
|
55
60
|
return module
|
|
56
61
|
raise ImportError("sanitize_output helper not found in " + ", ".join(searched))
|
|
57
62
|
|
|
@@ -412,7 +417,7 @@ def strip_line_for_brace_count(line: str, in_block_comment: bool = False) -> tup
|
|
|
412
417
|
|
|
413
418
|
|
|
414
419
|
def redact_symbol_content(content: str) -> str:
|
|
415
|
-
sanitizer = LineSanitizer(show_paths=
|
|
420
|
+
sanitizer = LineSanitizer(show_paths=False, context="source_code")
|
|
416
421
|
return "".join(sanitizer.sanitize(line)[0] for line in content.splitlines(keepends=True))
|
|
417
422
|
|
|
418
423
|
|