tweek 0.2.1__py3-none-any.whl → 0.3.0__py3-none-any.whl

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.
@@ -0,0 +1,199 @@
1
+ Tweek
2
+ Copyright 2025 Tommy Mancino / Tweek, LLC
3
+
4
+ This product includes software developed at Tweek, LLC.
5
+
6
+ =========================================================================
7
+
8
+ Third-Party Components
9
+ =========================================================================
10
+
11
+ This project uses the following third-party components. Their licenses
12
+ and copyright notices are reproduced below, as required by their
13
+ respective licenses.
14
+
15
+ -------------------------------------------------------------------------
16
+ ProtectAI DeBERTa-v3-base Prompt Injection v2
17
+ -------------------------------------------------------------------------
18
+
19
+ Source: https://huggingface.co/protectai/deberta-v3-base-prompt-injection-v2
20
+ License: Apache License 2.0
21
+ Copyright (c) 2024 Protect AI, Inc.
22
+
23
+ A fine-tuned DeBERTa-v3-base model for binary prompt injection
24
+ classification. Used by Tweek as an on-device classifier for detecting
25
+ prompt injection attacks. The model is downloaded at user request via
26
+ `tweek model download` and stored locally at ~/.tweek/models/.
27
+
28
+ Tweek does not modify or redistribute the model weights. The model is
29
+ downloaded directly from HuggingFace by the end user.
30
+
31
+ Citation:
32
+ @misc{deberta-v3-base-prompt-injection-v2,
33
+ author = {ProtectAI.com},
34
+ title = {Fine-Tuned DeBERTa-v3-base for Prompt Injection Detection},
35
+ year = {2024},
36
+ publisher = {HuggingFace},
37
+ url = {https://huggingface.co/protectai/deberta-v3-base-prompt-injection-v2},
38
+ }
39
+
40
+ Licensed under the Apache License, Version 2.0 (the "License");
41
+ you may not use this file except in compliance with the License.
42
+ You may obtain a copy of the License at
43
+
44
+ http://www.apache.org/licenses/LICENSE-2.0
45
+
46
+ Unless required by applicable law or agreed to in writing, software
47
+ distributed under the License is distributed on an "AS IS" BASIS,
48
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
49
+ See the License for the specific language governing permissions and
50
+ limitations under the License.
51
+
52
+ -------------------------------------------------------------------------
53
+ Microsoft DeBERTa-v3-base (upstream base model)
54
+ -------------------------------------------------------------------------
55
+
56
+ Source: https://huggingface.co/microsoft/deberta-v3-base
57
+ License: MIT License
58
+ Copyright (c) Microsoft Corporation.
59
+
60
+ The ProtectAI prompt injection model above is fine-tuned from
61
+ Microsoft's DeBERTa-v3-base pre-trained language model.
62
+
63
+ Citation:
64
+ @misc{he2021debertav3,
65
+ title = {DeBERTaV3: Improving DeBERTa using ELECTRA-Style
66
+ Pre-Training with Gradient-Disentangled Embedding Sharing},
67
+ author = {Pengcheng He and Jianfeng Gao and Weizhu Chen},
68
+ year = {2021},
69
+ eprint = {2111.09543},
70
+ archivePrefix = {arXiv},
71
+ primaryClass = {cs.CL},
72
+ }
73
+
74
+ Permission is hereby granted, free of charge, to any person obtaining
75
+ a copy of this software and associated documentation files (the
76
+ "Software"), to deal in the Software without restriction, including
77
+ without limitation the rights to use, copy, modify, merge, publish,
78
+ distribute, sublicense, and/or sell copies of the Software, and to
79
+ permit persons to whom the Software is furnished to do so, subject to
80
+ the following conditions:
81
+
82
+ The above copyright notice and this permission notice shall be
83
+ included in all copies or substantial portions of the Software.
84
+
85
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
88
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
89
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
90
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
91
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
92
+
93
+ -------------------------------------------------------------------------
94
+ ONNX Runtime
95
+ -------------------------------------------------------------------------
96
+
97
+ Source: https://github.com/microsoft/onnxruntime
98
+ License: MIT License
99
+ Copyright (c) Microsoft Corporation.
100
+
101
+ Used as the inference engine for the local prompt injection classifier.
102
+ Installed as an optional dependency via `pip install tweek[local-models]`.
103
+
104
+ Permission is hereby granted, free of charge, to any person obtaining
105
+ a copy of this software and associated documentation files (the
106
+ "Software"), to deal in the Software without restriction, including
107
+ without limitation the rights to use, copy, modify, merge, publish,
108
+ distribute, sublicense, and/or sell copies of the Software, and to
109
+ permit persons to whom the Software is furnished to do so, subject to
110
+ the following conditions:
111
+
112
+ The above copyright notice and this permission notice shall be
113
+ included in all copies or substantial portions of the Software.
114
+
115
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
116
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
117
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
118
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
119
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
120
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
121
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
122
+
123
+ -------------------------------------------------------------------------
124
+ HuggingFace Tokenizers
125
+ -------------------------------------------------------------------------
126
+
127
+ Source: https://github.com/huggingface/tokenizers
128
+ License: Apache License 2.0
129
+ Copyright (c) 2019 HuggingFace Inc.
130
+
131
+ Used for tokenizing input text before feeding to the local ONNX model.
132
+ Installed as an optional dependency via `pip install tweek[local-models]`.
133
+
134
+ Licensed under the Apache License, Version 2.0.
135
+
136
+ -------------------------------------------------------------------------
137
+ NumPy
138
+ -------------------------------------------------------------------------
139
+
140
+ Source: https://github.com/numpy/numpy
141
+ License: BSD 3-Clause License
142
+ Copyright (c) 2005-2024, NumPy Developers.
143
+
144
+ Used for numerical operations in the local model inference pipeline
145
+ (softmax scoring, tensor manipulation). Installed as an optional
146
+ dependency via `pip install tweek[local-models]`.
147
+
148
+ Redistribution and use in source and binary forms, with or without
149
+ modification, are permitted provided that the following conditions are
150
+ met:
151
+
152
+ 1. Redistributions of source code must retain the above copyright
153
+ notice, this list of conditions and the following disclaimer.
154
+
155
+ 2. Redistributions in binary form must reproduce the above copyright
156
+ notice, this list of conditions and the following disclaimer in
157
+ the documentation and/or other materials provided with the
158
+ distribution.
159
+
160
+ 3. Neither the name of the copyright holder nor the names of its
161
+ contributors may be used to endorse or promote products derived
162
+ from this software without specific prior written permission.
163
+
164
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
165
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
166
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
167
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
168
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
169
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
170
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
171
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
172
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
173
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
174
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
175
+
176
+ =========================================================================
177
+
178
+ Runtime Dependencies
179
+ =========================================================================
180
+
181
+ The following packages are installed via pip as runtime dependencies.
182
+ They are NOT bundled or vendored — each carries its own license in its
183
+ distribution. Listed here for transparency.
184
+
185
+ click >=8.0 BSD-3-Clause Pallets Projects
186
+ pyyaml >=6.0 MIT Kirill Simonov / YAML community
187
+ rich >=13.0 MIT Will McGugan
188
+ keyring >=25.0 MIT Jason R. Coombs
189
+
190
+ Optional dependencies (installed only when the user requests them):
191
+
192
+ anthropic >=0.18.0 MIT Anthropic, PBC
193
+ openai >=1.0.0 MIT OpenAI
194
+ google-generativeai Apache-2.0 Google LLC
195
+ mcp >=1.0.0 MIT Anthropic, PBC
196
+ mitmproxy >=10.0 MIT mitmproxy contributors
197
+ secretstorage >=3.0 BSD-3-Clause Dmitry Shachnev
198
+
199
+ =========================================================================
File without changes