trace-agent-sdk 0.2.0__tar.gz → 0.4.0__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.
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/PKG-INFO +1 -1
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/pyproject.toml +1 -1
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/src/trace_agent_sdk/client.py +2 -2
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/src/trace_agent_sdk/redaction.py +2 -1
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/src/trace_agent_sdk.egg-info/PKG-INFO +1 -1
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/tests/test_redaction.py +13 -0
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/README.md +0 -0
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/setup.cfg +0 -0
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/src/trace_agent_sdk/__init__.py +0 -0
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/src/trace_agent_sdk.egg-info/SOURCES.txt +0 -0
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/src/trace_agent_sdk.egg-info/dependency_links.txt +0 -0
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/src/trace_agent_sdk.egg-info/requires.txt +0 -0
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/src/trace_agent_sdk.egg-info/top_level.txt +0 -0
- {trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/tests/test_client.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trace-agent-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: TraceAgent SDK for instrumenting AI agents.
|
|
5
5
|
Author-email: Enrique Javier Villar Cea <villarcea.enriquejavier@gmail.com>, Javier Rodriguez Castellano <javirodriguezcastellano@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -521,7 +521,7 @@ class RunSession:
|
|
|
521
521
|
tool_message = {
|
|
522
522
|
"role": "tool",
|
|
523
523
|
"tool_call_id": call["id"],
|
|
524
|
-
"content": json.dumps(output, ensure_ascii=
|
|
524
|
+
"content": json.dumps(output, ensure_ascii=False, default=str),
|
|
525
525
|
}
|
|
526
526
|
return result_payload, tool_message
|
|
527
527
|
except Exception as exc:
|
|
@@ -542,7 +542,7 @@ class RunSession:
|
|
|
542
542
|
tool_message = {
|
|
543
543
|
"role": "tool",
|
|
544
544
|
"tool_call_id": call["id"],
|
|
545
|
-
"content": json.dumps({"error": str(exc)}, ensure_ascii=
|
|
545
|
+
"content": json.dumps({"error": str(exc)}, ensure_ascii=False),
|
|
546
546
|
}
|
|
547
547
|
return result_payload, tool_message
|
|
548
548
|
|
|
@@ -33,7 +33,8 @@ def summarize_value(value: Any, redact_fields: list[str] | None = None, max_leng
|
|
|
33
33
|
redacted = redact_payload(value, redact_fields)
|
|
34
34
|
if isinstance(redacted, str):
|
|
35
35
|
return redacted
|
|
36
|
-
|
|
36
|
+
# Keep accents and other non-ASCII text readable: the summary is shown to people as it is.
|
|
37
|
+
rendered = json.dumps(redacted, ensure_ascii=False, sort_keys=True, default=str)
|
|
37
38
|
if len(rendered) <= max_length:
|
|
38
39
|
return rendered
|
|
39
40
|
return f"{rendered[: max_length - 3]}..."
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trace-agent-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: TraceAgent SDK for instrumenting AI agents.
|
|
5
5
|
Author-email: Enrique Javier Villar Cea <villarcea.enriquejavier@gmail.com>, Javier Rodriguez Castellano <javirodriguezcastellano@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -52,3 +52,16 @@ class TestSummarizeValue:
|
|
|
52
52
|
|
|
53
53
|
def test_applies_redaction(self) -> None:
|
|
54
54
|
assert "secret" not in summarize_value({"password": "secret"}, ["password"])
|
|
55
|
+
|
|
56
|
+
def test_keeps_accents_and_other_non_ascii_text_readable(self) -> None:
|
|
57
|
+
summary = summarize_value({"mensaje": "El OEE bajó", "línea": "3", "nota": "日本語 ✓"})
|
|
58
|
+
|
|
59
|
+
assert summary == '{"línea": "3", "mensaje": "El OEE bajó", "nota": "日本語 ✓"}'
|
|
60
|
+
assert "\\u" not in summary
|
|
61
|
+
|
|
62
|
+
def test_a_cut_summary_never_ends_inside_an_escape_sequence(self) -> None:
|
|
63
|
+
summary = summarize_value({"texto": "ó" * 100}, max_length=40)
|
|
64
|
+
|
|
65
|
+
assert len(summary) == 40
|
|
66
|
+
assert summary.endswith("...")
|
|
67
|
+
assert "\\u" not in summary
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trace_agent_sdk-0.2.0 → trace_agent_sdk-0.4.0}/src/trace_agent_sdk.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|