aixtools 0.1.2__tar.gz → 0.1.3__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.
Potentially problematic release.
This version of aixtools might be problematic. Click here for more details.
- {aixtools-0.1.2 → aixtools-0.1.3}/PKG-INFO +1 -1
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/_version.py +3 -3
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/mcp/faulty_mcp.py +15 -16
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools.egg-info/PKG-INFO +1 -1
- {aixtools-0.1.2 → aixtools-0.1.3}/.env_template +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/.github/workflows/build_and_publish_docker.yml +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/.github/workflows/lint.yml +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/.github/workflows/release.yml +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/.gitignore +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/.python-version +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/.roo/rules/rules-mcp.md +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/.roo/rules/rules.md +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/.vscode/settings.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/README.md +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/config.toml +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/bn.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/en-US.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/gu.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/he-IL.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/hi.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/ja.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/kn.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/ml.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/mr.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/nl.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/ta.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/te.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/.chainlit/translations/zh-CN.json +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/__init__.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/a2a/__init__.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/a2a/app.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/a2a/utils.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/agents/__init__.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/agents/agent.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/agents/agent_batch.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/app.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/chainlit.md +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/context.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/db/__init__.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/db/database.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/db/vector_db.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/log_view/__init__.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/log_view/app.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/log_view/display.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/log_view/export.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/log_view/filters.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/log_view/log_utils.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/log_view/node_summary.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/logfilters/__init__.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/logfilters/context_filter.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/logging/__init__.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/logging/log_objects.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/logging/logging_config.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/logging/mcp_log_models.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/logging/mcp_logger.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/logging/model_patch_logging.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/logging/open_telemetry.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/mcp/__init__.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/mcp/example_client.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/mcp/example_server.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/mcp/fast_mcp_log.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/model_patch/model_patch.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/server/__init__.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/server/app_mounter.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/server/path.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/server/utils.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/testing/__init__.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/testing/aix_test_model.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/testing/mock_tool.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/testing/model_patch_cache.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/tools/doctor/__init__.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/tools/doctor/tool_doctor.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/tools/doctor/tool_recommendation.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/utils/__init__.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/utils/chainlit/cl_agent_show.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/utils/chainlit/cl_utils.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/utils/config.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/utils/config_util.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/utils/enum_with_description.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/utils/persisted_dict.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools/utils/utils.py +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools.egg-info/SOURCES.txt +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools.egg-info/dependency_links.txt +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools.egg-info/entry_points.txt +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools.egg-info/requires.txt +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/aixtools.egg-info/top_level.txt +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/docker/mcp-base/Dockerfile +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/notebooks/example_faulty_mcp_server.ipynb +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/notebooks/example_mcp_server_stdio.ipynb +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/notebooks/example_raw_mcp_client.ipynb +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/notebooks/example_tool_doctor.ipynb +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/pyproject.toml +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/scripts/config.sh +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/scripts/lint.sh +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/scripts/log_view.sh +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/scripts/run_example_mcp_server.sh +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/scripts/run_faulty_mcp_server.sh +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/scripts/run_server.sh +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/setup.cfg +0 -0
- {aixtools-0.1.2 → aixtools-0.1.3}/uv.lock +0 -0
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.1.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
31
|
+
__version__ = version = '0.1.3'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 1, 3)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'gc117551ae'
|
|
@@ -49,7 +49,7 @@ class Config:
|
|
|
49
49
|
|
|
50
50
|
port: int = 9999
|
|
51
51
|
prob_on_post_404: float = 0.5 # Probability of injecting a 404 error for POST requests
|
|
52
|
-
|
|
52
|
+
prob_on_get_crash: float = 0.3 # Probability of terminating the process on GET request
|
|
53
53
|
prob_on_delete_404: float = 0.5 # Probability of injecting a 404 error for DELETE requests
|
|
54
54
|
prob_in_list_tools_throw: float = 0.5 # Probability of throwing an exception in list tools handling
|
|
55
55
|
prob_in_list_tools_crash: float = 0.3 # Probability of terminating the process in list tools handling
|
|
@@ -102,9 +102,9 @@ class StarletteErrorMiddleware: # pylint: disable=too-few-public-methods
|
|
|
102
102
|
self.app = app
|
|
103
103
|
logger.info("[StarletteErrorMiddleware] Middleware initialized!")
|
|
104
104
|
logger.info("Current configuration:")
|
|
105
|
-
logger.info("
|
|
106
|
-
logger.info("
|
|
107
|
-
logger.info("
|
|
105
|
+
logger.info("HTTP 404 on POST request probability: %f", config.prob_on_post_404)
|
|
106
|
+
logger.info("Terminate on GET request probability: %f", config.prob_on_get_crash)
|
|
107
|
+
logger.info("HTTP 404 on DELETE request probability: %f", config.prob_on_delete_404)
|
|
108
108
|
logger.info("Exception in list tools handling probability: %f", config.prob_in_list_tools_throw)
|
|
109
109
|
logger.info("Terminate in list handle probability: %f", config.prob_in_list_tools_crash)
|
|
110
110
|
|
|
@@ -125,22 +125,21 @@ class StarletteErrorMiddleware: # pylint: disable=too-few-public-methods
|
|
|
125
125
|
random_number = random()
|
|
126
126
|
logger.info("[StarletteErrorMiddleware] random number: %f", random_number)
|
|
127
127
|
if random_number < config.prob_on_delete_404:
|
|
128
|
-
logger.info("[StarletteErrorMiddleware] Simulating 404 error
|
|
128
|
+
logger.info("[StarletteErrorMiddleware] Simulating 404 error on DELETE request")
|
|
129
129
|
should_inject_404 = True
|
|
130
130
|
|
|
131
|
+
if http_method == "GET":
|
|
132
|
+
random_number = random()
|
|
133
|
+
logger.info("[StarletteErrorMiddleware] random number: %f", random_number)
|
|
134
|
+
if random_number < config.prob_on_get_crash:
|
|
135
|
+
logger.warning("[StarletteErrorMiddleware] Simulating server crash on GET request!")
|
|
136
|
+
os.kill(os.getpid(), 9)
|
|
137
|
+
|
|
131
138
|
async def logging_receive():
|
|
132
139
|
nonlocal should_inject_404
|
|
133
140
|
message = await receive()
|
|
134
141
|
logger.info("[StarletteErrorMiddleware] Received message: %s", str(message))
|
|
135
142
|
|
|
136
|
-
# Check for empty request and possibly terminate the process
|
|
137
|
-
if message["type"] == "http.request" and message["body"] == b"" and not message.get("more_body", False):
|
|
138
|
-
random_number = random()
|
|
139
|
-
logger.info("[StarletteErrorMiddleware] Empty request received, random number: %f", random_number)
|
|
140
|
-
if random_number < config.prob_on_post_empty_crash:
|
|
141
|
-
logger.warning("[StarletteErrorMiddleware] Simulating server crash on empty request!")
|
|
142
|
-
os.kill(os.getpid(), 9)
|
|
143
|
-
|
|
144
143
|
if message["type"] == "http.request": # pylint: disable=too-many-nested-blocks
|
|
145
144
|
body = message.get("body", b"")
|
|
146
145
|
if body:
|
|
@@ -280,9 +279,9 @@ if __name__ == "__main__":
|
|
|
280
279
|
help=f"Probability of injecting a 404 error for POST requests (default: {config.prob_on_post_404})",
|
|
281
280
|
)
|
|
282
281
|
parser.add_argument(
|
|
283
|
-
"--prob-on-
|
|
282
|
+
"--prob-on-get-crash",
|
|
284
283
|
type=float,
|
|
285
|
-
help=f"Probability of terminating on
|
|
284
|
+
help=f"Probability of terminating on GET request (default: {config.prob_on_get_crash})",
|
|
286
285
|
)
|
|
287
286
|
parser.add_argument(
|
|
288
287
|
"--prob-on-delete-404",
|
|
@@ -311,7 +310,7 @@ if __name__ == "__main__":
|
|
|
311
310
|
# Update the global configuration with command line arguments
|
|
312
311
|
config.port = args.port or config.port
|
|
313
312
|
_update_config_value("prob_on_post_404")
|
|
314
|
-
_update_config_value("
|
|
313
|
+
_update_config_value("prob_on_get_crash")
|
|
315
314
|
_update_config_value("prob_on_delete_404")
|
|
316
315
|
_update_config_value("prob_in_list_tools_throw")
|
|
317
316
|
_update_config_value("prob_in_list_tools_crash")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|