forcefield 0.7.1__tar.gz → 0.7.2__tar.gz

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.
Files changed (68) hide show
  1. {forcefield-0.7.1 → forcefield-0.7.2}/PKG-INFO +1 -1
  2. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/__init__.py +1 -1
  3. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/cli.py +1 -0
  4. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/guard.py +1 -1
  5. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/telemetry.py +8 -7
  6. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield.egg-info/PKG-INFO +1 -1
  7. {forcefield-0.7.1 → forcefield-0.7.2}/pyproject.toml +1 -1
  8. {forcefield-0.7.1 → forcefield-0.7.2}/LICENSE +0 -0
  9. {forcefield-0.7.1 → forcefield-0.7.2}/README.md +0 -0
  10. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/__main__.py +0 -0
  11. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/abuse.py +0 -0
  12. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/attacks.py +0 -0
  13. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/audit.py +0 -0
  14. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/cloud.py +0 -0
  15. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/commands.py +0 -0
  16. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/config.py +0 -0
  17. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/constitution.py +0 -0
  18. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/constitutions/__init__.py +0 -0
  19. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/constitutions/default.yaml +0 -0
  20. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/constitutions/permissive.yaml +0 -0
  21. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/constitutions/strict.yaml +0 -0
  22. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/endpoint_scanner.py +0 -0
  23. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/evals/__init__.py +0 -0
  24. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/evals/governance.yaml +0 -0
  25. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/evals/safety.yaml +0 -0
  26. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/evals/security.yaml +0 -0
  27. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/exfiltration.py +0 -0
  28. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/files.py +0 -0
  29. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/integrations/__init__.py +0 -0
  30. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/integrations/fastapi.py +0 -0
  31. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/integrations/langchain.py +0 -0
  32. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/integrations/openai.py +0 -0
  33. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/integrity.py +0 -0
  34. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/ml.py +0 -0
  35. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/models/__init__.py +0 -0
  36. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/models/tfidf_model.joblib +0 -0
  37. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/models/tfidf_model.onnx +0 -0
  38. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/moderation.py +0 -0
  39. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/obfuscation.py +0 -0
  40. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/pii.py +0 -0
  41. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/py.typed +0 -0
  42. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/ratelimit.py +0 -0
  43. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/scanner.py +0 -0
  44. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/session.py +0 -0
  45. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/templates.py +0 -0
  46. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/tools.py +0 -0
  47. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield/types.py +0 -0
  48. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield.egg-info/SOURCES.txt +0 -0
  49. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield.egg-info/dependency_links.txt +0 -0
  50. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield.egg-info/entry_points.txt +0 -0
  51. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield.egg-info/requires.txt +0 -0
  52. {forcefield-0.7.1 → forcefield-0.7.2}/forcefield.egg-info/top_level.txt +0 -0
  53. {forcefield-0.7.1 → forcefield-0.7.2}/setup.cfg +0 -0
  54. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_attacks.py +0 -0
  55. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_commands.py +0 -0
  56. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_constitution.py +0 -0
  57. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_endpoint_scanner.py +0 -0
  58. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_evals.py +0 -0
  59. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_files.py +0 -0
  60. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_guard.py +0 -0
  61. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_integrity.py +0 -0
  62. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_ml.py +0 -0
  63. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_moderation.py +0 -0
  64. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_pii.py +0 -0
  65. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_scanner.py +0 -0
  66. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_session.py +0 -0
  67. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_telemetry.py +0 -0
  68. {forcefield-0.7.1 → forcefield-0.7.2}/tests/test_templates.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forcefield
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: Zero-dependency AI security library -- prompt-injection detection, PII redaction, content safety, rate limiting, abuse detection, tool governance, and security evals for LLMs in 3 lines of Python.
5
5
  Author-email: Data Science Tech <security@datasciencetech.ca>
6
6
  License: Apache-2.0
@@ -11,7 +11,7 @@ Detect prompt injection, PII leaks, and LLM attacks in 3 lines::
11
11
 
12
12
  from __future__ import annotations
13
13
 
14
- __version__ = "0.7.1"
14
+ __version__ = "0.7.2"
15
15
 
16
16
  from .guard import Guard
17
17
  from .types import (
@@ -525,6 +525,7 @@ def main(argv: list | None = None) -> int:
525
525
  parser = argparse.ArgumentParser(
526
526
  prog="forcefield",
527
527
  description="ForceField AI Security Scanner",
528
+ epilog="Telemetry: ForceField collects anonymous usage statistics (feature counts, SDK version, OS) to improve the product. No prompts, filenames, or PII are ever sent. Disable with FORCEFIELD_NO_TELEMETRY=1 or Guard(telemetry=False). Details: https://datasciencetech.ca/en/python-sdk#telemetry",
528
529
  )
529
530
  from . import __version__
530
531
  parser.add_argument("--version", action="version", version=f"forcefield {__version__}")
@@ -57,7 +57,7 @@ class Guard:
57
57
  custom_blocked_patterns: Optional[List[str]] = None,
58
58
  redaction_strategy: str = "mask",
59
59
  config: Optional[GuardConfig] = None,
60
- telemetry: bool = False,
60
+ telemetry: bool = True,
61
61
  api_key: Optional[str] = None,
62
62
  ):
63
63
  if config is not None:
@@ -1,8 +1,9 @@
1
- """Opt-in, privacy-safe usage telemetry for ForceField SDK.
1
+ """Privacy-safe usage telemetry for ForceField SDK.
2
2
 
3
- Disabled by default. Enable via:
4
- - ``Guard(telemetry=True)``
5
- - ``FORCEFIELD_TELEMETRY=1`` environment variable
3
+ Enabled by default. Disable via:
4
+ - ``Guard(telemetry=False)``
5
+ - ``FORCEFIELD_NO_TELEMETRY=1`` environment variable
6
+ - ``FORCEFIELD_TELEMETRY=0`` environment variable
6
7
 
7
8
  What is sent (aggregate counts, never raw prompts/filenames):
8
9
  - SDK version, Python version, OS
@@ -59,7 +60,7 @@ def _is_env_enabled() -> Optional[bool]:
59
60
  class TelemetryCollector:
60
61
  """Collects and batches SDK usage events."""
61
62
 
62
- def __init__(self, enabled: bool = False, api_key: Optional[str] = None):
63
+ def __init__(self, enabled: bool = True, api_key: Optional[str] = None):
63
64
  env = _is_env_enabled()
64
65
  self._enabled = env if env is not None else enabled
65
66
  self._api_key = api_key
@@ -195,12 +196,12 @@ class TelemetryCollector:
195
196
  self.flush()
196
197
 
197
198
 
198
- # Module-level singleton (disabled by default)
199
+ # Module-level singleton (enabled by default, opt-out via env)
199
200
  _collector: Optional[TelemetryCollector] = None
200
201
  _collector_lock = threading.Lock()
201
202
 
202
203
 
203
- def get_collector(enabled: bool = False, api_key: Optional[str] = None) -> TelemetryCollector:
204
+ def get_collector(enabled: bool = True, api_key: Optional[str] = None) -> TelemetryCollector:
204
205
  """Get or create the global telemetry collector."""
205
206
  global _collector
206
207
  with _collector_lock:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: forcefield
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: Zero-dependency AI security library -- prompt-injection detection, PII redaction, content safety, rate limiting, abuse detection, tool governance, and security evals for LLMs in 3 lines of Python.
5
5
  Author-email: Data Science Tech <security@datasciencetech.ca>
6
6
  License: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "forcefield"
7
- version = "0.7.1"
7
+ version = "0.7.2"
8
8
  description = "Zero-dependency AI security library -- prompt-injection detection, PII redaction, content safety, rate limiting, abuse detection, tool governance, and security evals for LLMs in 3 lines of Python."
9
9
  readme = "README.md"
10
10
  license = {text = "Apache-2.0"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes