Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "agentcat"
version = "2.0.0"
version = "2.0.1"
description = "Analytics tool for MCP (Model Context Protocol) servers, Claude Connectors, and ChatGPT Plugins - tracks tool usage patterns and provides insights"
authors = [
{ name = "AgentCat, Inc.", email = "support@agentcat.com" },
Expand Down
301 changes: 220 additions & 81 deletions src/agentcat/modules/adapters/community.py

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/agentcat/modules/callpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ async def publish_tool_call_event(
duration_ms: int | None,
mrtr: str | None,
extra_params: dict[str, Any] | None,
nested: bool = False,
) -> None:
"""Publish the one event a v2 tool call produces. Never raises.

Expand Down Expand Up @@ -312,7 +313,7 @@ async def publish_tool_call_event(
# from the customer cap.
event.tags = {
**(event.tags or {}),
**build_handle_tags(rc.resolution, rc.protocol_version, mrtr),
**build_handle_tags(rc.resolution, rc.protocol_version, mrtr, nested),
}
event_queue.publish_event(server_key, event)
except Exception as e:
Expand Down
4 changes: 4 additions & 0 deletions src/agentcat/modules/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
AGENTCAT_TAG_AGENT_SOURCE = "agentcat_agent_id_source"
AGENTCAT_TAG_PROTOCOL_VERSION = "agentcat_protocol_version"
AGENTCAT_TAG_MRTR = "agentcat_mrtr"
# Presence-gated: rides only on tools/call events the customer's own server
# made from inside another tracked call (a code-mode sandbox, a tool calling
# a sibling tool). Value is always "true"; absent on agent-facing calls.
AGENTCAT_TAG_NESTED = "agentcat_nested"
AGENTCAT_CUSTOM_EVENT_TYPE = "agentcat:custom"

# ── Explicit handles: agent-facing copy (byte-identical to TS constants.ts) ──
Expand Down
4 changes: 4 additions & 0 deletions src/agentcat/modules/handles.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
AGENTCAT_TAG_AGENT_ID,
AGENTCAT_TAG_AGENT_SOURCE,
AGENTCAT_TAG_MRTR,
AGENTCAT_TAG_NESTED,
AGENTCAT_TAG_PROTOCOL_VERSION,
AGENTCAT_TAG_SESSION_SOURCE,
MCP_INSTRUCTIONS_KEY,
Expand Down Expand Up @@ -304,6 +305,7 @@ def build_handle_tags(
res: HandleResolution,
protocol_version: str | None = None,
mrtr: str | None = None,
nested: bool = False,
) -> dict[str, str]:
tags: dict[str, str] = {AGENTCAT_TAG_SESSION_SOURCE: res.session_source}
if res.agent_id and res.agent_source:
Expand All @@ -313,4 +315,6 @@ def build_handle_tags(
tags[AGENTCAT_TAG_PROTOCOL_VERSION] = _clamp_tag_value(protocol_version)
if mrtr:
tags[AGENTCAT_TAG_MRTR] = mrtr
if nested:
tags[AGENTCAT_TAG_NESTED] = "true"
return tags
Loading
Loading