Jarvis-Brain 0.1.11.4__tar.gz → 0.1.11.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Jarvis_Brain
3
- Version: 0.1.11.4
3
+ Version: 0.1.11.5
4
4
  Summary: Jarvis brain mcp
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: beautifulsoup4
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "Jarvis_Brain" # 别人下载时用的名字,必须在 PyPI 上唯一
3
- version = "0.1.11.4"
3
+ version = "0.1.11.5"
4
4
  description = "Jarvis brain mcp"
5
5
  dependencies = [
6
6
  "fastmcp",
@@ -171,47 +171,6 @@ def check_data_packet(packet: DataPacket, client: DPProxyClient):
171
171
  client.packet_queue.append(temp_dict)
172
172
 
173
173
 
174
- def check_data_packet(packet: DataPacket, client: DPProxyClient):
175
- """
176
- 封装监听到的数据包,并将其存放在client的packet_queue中
177
- :param packet:
178
- :param client:
179
- :return:
180
- """
181
- url = packet.url
182
- method = packet.request.method
183
- data = None
184
- if packet.request.hasPostData:
185
- data = packet.request.postData
186
- domain = urlparse(url).netloc
187
- body = packet.response.body
188
- body_str = json.dumps(body, ensure_ascii=False, separators=(',', ':'))
189
- body_str_list = [body_str[i:i + one_turn_max_token] for i in range(0, len(body_str), one_turn_max_token)]
190
- body_completed = True
191
- packet_filter = client.packet_filter
192
- domain_filter = packet_filter.get("domain_filter", None)
193
- method_filter = packet_filter.get("method_filter", ["GET", "POST"])
194
- for index, body_str in enumerate(body_str_list):
195
- # 如果给了domain_filter并且domain没有在domain_filter中时跳过该数据包
196
- if domain_filter and domain not in domain_filter:
197
- continue
198
- # 如果method没有在method_filter中,则跳过该数据包
199
- if method not in method_filter:
200
- continue
201
- if (index + 1) != len(body_str_list):
202
- body_completed = False
203
- temp_dict = {
204
- "url": url,
205
- "body_completed": body_completed,
206
- "method": method,
207
- "request_data": data,
208
- "request_headers": dict(packet.request.headers),
209
- "response_headers": dict(packet.response.headers),
210
- "response_body_segment": body_str.replace("\\", ""),
211
- }
212
- client.packet_queue.append(temp_dict)
213
-
214
-
215
174
  client_manager = DPProxyClientManager()
216
175
 
217
176
  # if __name__ == '__main__':
File without changes