gateforge-sdk 0.2.8__tar.gz → 0.2.10__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.
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/PKG-INFO +1 -1
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/context.py +10 -8
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/pyproject.toml +1 -1
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/.env.example +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/.gitignore +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/.pypirc.example +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/INSTALL.md +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/LICENSE +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/MANIFEST.in +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/PUBLISHING.md +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/PUBLISH_NOW.md +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/README.md +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/__init__.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/ab/__init__.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/ab/engine.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/client.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/config.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/features/__init__.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/guardrails/__init__.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/guardrails/engine.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/metrics.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/options.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/pii.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/pricing.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/prompt.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/providers/__init__.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/providers/anthropic.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/providers/gemini.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/providers/openai.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/response.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/session_manager.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/tracing.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/wrappers/__init__.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/wrappers/anthropic.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/wrappers/gemini.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/gateforge/wrappers/openai.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/tests/__init__.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/tests/test_metrics.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/tests/test_phase1.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/tests/test_phase2.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/tests/test_phase3.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/tests/test_pii.py +0 -0
- {gateforge_sdk-0.2.8 → gateforge_sdk-0.2.10}/tests/test_providers.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gateforge-sdk
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10
|
|
4
4
|
Summary: Privacy-first LLMOps SDK — Auto-init, decorators, session management, prompt system with cache
|
|
5
5
|
Project-URL: Homepage, https://gateforge.dev
|
|
6
6
|
Project-URL: Documentation, https://gateforge.dev/docs
|
|
@@ -218,38 +218,40 @@ def agent(
|
|
|
218
218
|
# Emit agent start event — use next_step() when nested so sequential
|
|
219
219
|
# agents get unique, increasing step numbers (fixes DB ordering)
|
|
220
220
|
start_step = active_trace.next_step() if active_trace else 0
|
|
221
|
+
# Capture first string arg as the user input preview (e.g. run_agent("hello"))
|
|
222
|
+
user_input = next((a for a in args if isinstance(a, str) and a.strip()), None)
|
|
221
223
|
emit_trace_event(
|
|
222
224
|
api_key=_get_api_key(),
|
|
223
225
|
base_url=_get_base_url(),
|
|
224
226
|
conversation_id=cid,
|
|
225
227
|
event_type="agent_start",
|
|
226
228
|
step=start_step,
|
|
227
|
-
|
|
229
|
+
content_preview=user_input[:500] if user_input else None,
|
|
230
|
+
metadata={"agent_name": name or fn.__name__},
|
|
228
231
|
)
|
|
229
|
-
|
|
232
|
+
|
|
230
233
|
# Enter trace context (only if not already in one)
|
|
231
234
|
if not is_nested:
|
|
232
235
|
ctx = trace(conversation_id=cid)
|
|
233
236
|
ctx.__enter__()
|
|
234
237
|
else:
|
|
235
238
|
ctx = None # Already in a trace context
|
|
236
|
-
|
|
239
|
+
|
|
237
240
|
try:
|
|
238
241
|
result = fn(*args, **kwargs)
|
|
239
|
-
|
|
240
|
-
|
|
242
|
+
|
|
243
|
+
result_preview = _safe_str(result)[:500] if result is not None else None
|
|
241
244
|
emit_trace_event(
|
|
242
245
|
api_key=_get_api_key(),
|
|
243
246
|
base_url=_get_base_url(),
|
|
244
247
|
conversation_id=cid,
|
|
245
248
|
event_type="agent_end",
|
|
246
249
|
step=active_trace.step if active_trace else ctx.ctx.step,
|
|
247
|
-
|
|
250
|
+
content_preview=result_preview,
|
|
248
251
|
)
|
|
249
|
-
|
|
252
|
+
|
|
250
253
|
return result
|
|
251
254
|
except Exception as e:
|
|
252
|
-
# Emit agent error event
|
|
253
255
|
emit_trace_event(
|
|
254
256
|
api_key=_get_api_key(),
|
|
255
257
|
base_url=_get_base_url(),
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "gateforge-sdk"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.10"
|
|
8
8
|
description = "Privacy-first LLMOps SDK — Auto-init, decorators, session management, prompt system with cache"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
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
|