Pbeslin/parse mcp history - #1244
Merged
Merged
Conversation
pbeslin-gg
force-pushed
the
pbeslin/parse-mcp-history
branch
4 times, most recently
from
May 20, 2026 14:57
12eee7f to
6f506ee
Compare
pbeslin-gg
requested review from
paulpetit-gg-ext and
xblanchot-gg
and removed request for
paulpetit-gg-ext
May 21, 2026 08:20
pbeslin-gg
force-pushed
the
pbeslin/parse-mcp-history
branch
3 times, most recently
from
May 26, 2026 11:58
aa9da72 to
6d2c6b1
Compare
paulpetit-gg-ext
force-pushed
the
pbeslin/parse-mcp-history
branch
from
May 27, 2026 09:18
6d2c6b1 to
fc79150
Compare
pbeslin-gg
force-pushed
the
pbeslin/parse-mcp-history
branch
from
May 27, 2026 12:38
fc79150 to
79bc9d8
Compare
pbeslin-gg
marked this pull request as ready for review
May 27, 2026 13:24
xblanchot-gg
approved these changes
May 27, 2026
xblanchot-gg
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the implem ! Handling all coding agents at once can be a pain ! :)
pbeslin-gg
force-pushed
the
pbeslin/parse-mcp-history
branch
from
May 29, 2026 07:56
8a33074 to
403283c
Compare
pbeslin-gg
force-pushed
the
pbeslin/parse-mcp-history
branch
from
May 29, 2026 08:26
403283c to
f6f7354
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1244 +/- ##
==========================================
- Coverage 93.63% 93.29% -0.34%
==========================================
Files 183 184 +1
Lines 9980 10373 +393
==========================================
+ Hits 9345 9678 +333
- Misses 635 695 +60
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pbeslin-gg
force-pushed
the
pbeslin/parse-mcp-history
branch
from
May 29, 2026 08:35
f6f7354 to
47b3e80
Compare
2 tasks
amascia-gg
added a commit
that referenced
this pull request
Jun 2, 2026
Extend the AI-agent history framework to ship per-event *usage metadata* (not just MCP PreToolUse calls) to GitGuardian, powering usage dashboards. - Per-agent sources (Claude, Codex, Cursor) walk transcripts/SQLite and, in a fail-closed `serialize()`, emit only an allow-list of safe structured fields (event type, tool name, model, timestamps, …). Free text — prompts, command strings, tool inputs/outputs, file contents — is never sent, so no secret or PII ever leaves the machine. - Home paths are anonymised (`/Users/x` -> `~`); per-record size cap + byte-batching bound payloads. - Base `ActivitySource.serialize` raises by default: a source can never accidentally ship raw content. - Renamed the package raw_history -> agent_activity (it is metadata, not raw). - Review fixes to the original framework: `GGClient` typing + `Detail` error handling in the orchestrator, and the home-path leak fix. - Bump pygitguardian to the commit adding `send_agent_activity()` (GitGuardian/py-gitguardian#175); re-pin once that merges. Builds on #1244 / #1257 (MCP history framework). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amascia-gg
added a commit
that referenced
this pull request
Jun 2, 2026
Extend the AI-agent history framework to ship per-event *usage metadata* (not just MCP PreToolUse calls) to GitGuardian, powering usage dashboards. - Per-agent sources (Claude, Codex, Cursor) walk transcripts/SQLite and, in a fail-closed `serialize()`, emit only an allow-list of safe structured fields (event type, tool name, model, timestamps, …). Free text — prompts, command strings, tool inputs/outputs, file contents — is never sent, so no secret or PII ever leaves the machine. - Home paths are anonymised (`/Users/x` -> `~`); per-record size cap + byte-batching bound payloads. - Base `ActivitySource.serialize` raises by default: a source can never accidentally ship raw content. - Renamed the package raw_history -> agent_activity (it is metadata, not raw). - Review fixes to the original framework: `GGClient` typing + `Detail` error handling in the orchestrator, and the home-path leak fix. - Bump pygitguardian to the commit adding `send_agent_activity()` (GitGuardian/py-gitguardian#175); re-pin once that merges. Builds on #1244 / #1257 (MCP history framework). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amascia-gg
added a commit
that referenced
this pull request
Jun 2, 2026
Extend the AI-agent history framework to ship per-event *usage metadata* (not just MCP PreToolUse calls) to GitGuardian, powering usage dashboards. - Per-agent sources (Claude, Codex, Cursor) walk transcripts/SQLite and, in a fail-closed `serialize()`, emit only an allow-list of safe structured fields (event type, tool name, model, timestamps, …). Free text — prompts, command strings, tool inputs/outputs, file contents — is never sent, so no secret or PII ever leaves the machine. - Home paths are anonymised (`/Users/x` -> `~`); per-record size cap + byte-batching bound payloads. - Base `ActivitySource.serialize` raises by default: a source can never accidentally ship raw content. - Renamed the package raw_history -> agent_activity (it is metadata, not raw). - Review fixes to the original framework: `GGClient` typing + `Detail` error handling in the orchestrator, and the home-path leak fix. - Bump pygitguardian to the commit adding `send_agent_activity()` (GitGuardian/py-gitguardian#175); re-pin once that merges. Builds on #1244 / #1257 (MCP history framework). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amascia-gg
added a commit
that referenced
this pull request
Jun 2, 2026
Extend the AI-agent history framework to ship per-event *usage metadata* (not just MCP PreToolUse calls) to GitGuardian, powering usage dashboards. - Per-agent sources (Claude, Codex, Cursor) walk transcripts/SQLite and, in a fail-closed `serialize()`, emit only an allow-list of safe structured fields (event type, tool name, model, timestamps, …). Free text — prompts, command strings, tool inputs/outputs, file contents — is never sent, so no secret or PII ever leaves the machine. - Home paths are anonymised (`/Users/x` -> `~`); per-record size cap + byte-batching bound payloads. - Base `ActivitySource.serialize` raises by default: a source can never accidentally ship raw content. - Renamed the package raw_history -> agent_activity (it is metadata, not raw). - Review fixes to the original framework: `GGClient` typing + `Detail` error handling in the orchestrator, and the home-path leak fix. - Bump pygitguardian to the commit adding `send_agent_activity()` (GitGuardian/py-gitguardian#175); re-pin once that merges. Builds on #1244 / #1257 (MCP history framework). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amascia-gg
added a commit
that referenced
this pull request
Jun 2, 2026
Extend the AI-agent history framework to ship per-event *usage metadata* (not just MCP PreToolUse calls) to GitGuardian, powering usage dashboards. - Per-agent sources (Claude, Codex, Cursor) walk transcripts/SQLite and, in a fail-closed `serialize()`, emit only an allow-list of safe structured fields (event type, tool name, model, timestamps, …). Free text — prompts, command strings, tool inputs/outputs, file contents — is never sent, so no secret or PII ever leaves the machine. - Home paths are anonymised (`/Users/x` -> `~`); per-record size cap + byte-batching bound payloads. - Base `ActivitySource.serialize` raises by default: a source can never accidentally ship raw content. - Renamed the package raw_history -> agent_activity (it is metadata, not raw). - Review fixes to the original framework: `GGClient` typing + `Detail` error handling in the orchestrator, and the home-path leak fix. - Bump pygitguardian to the commit adding `send_agent_activity()` (GitGuardian/py-gitguardian#175); re-pin once that merges. Builds on #1244 / #1257 (MCP history framework). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amascia-gg
added a commit
that referenced
this pull request
Jun 2, 2026
…i discover --history` Ship full AI-agent session activity (not just MCP calls) to a raw staging table, keeping the client "dumb" and storing no detected secrets: - ggshield ships the agent's RAW transcript lines / DB rows verbatim — the data shape never depends on the ggshield version (no per-agent field extraction). - Before sending, each batch is scanned via the GitGuardian secret-scan API (multi_content_scan); detected secret spans are redacted client-side and home paths anonymised. Fail-closed: a batch that can't be scanned is dropped, never shipped. - Per-record size cap + byte-batching; re-scan every run (offset-skip is a follow-up). - Review fixes to the framework: GGClient typing + Detail handling in the orchestrator; POSIX source paths. - Bumps pygitguardian to send_agent_activity (GitGuardian/py-gitguardian#175). Aligns with the design doc's staging → canonical structure; the canonical typed table + per-agent adapters are a follow-up MR. Builds on #1244 / #1257. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amascia-gg
added a commit
that referenced
this pull request
Jun 2, 2026
…i discover --history` Ship full AI-agent session activity (not just MCP calls) to a raw staging table, keeping the client "dumb" and storing no detected secrets: - ggshield ships the agent's RAW transcript lines / DB rows verbatim — the data shape never depends on the ggshield version (no per-agent field extraction). - Before sending, each batch is scanned via the GitGuardian secret-scan API (multi_content_scan); detected secret spans are redacted client-side and home paths anonymised. Fail-closed: a batch that can't be scanned is dropped, never shipped. - Per-record size cap + byte-batching; re-scan every run (offset-skip is a follow-up). - Review fixes to the framework: GGClient typing + Detail handling in the orchestrator; POSIX source paths. - Bumps pygitguardian to send_agent_activity (GitGuardian/py-gitguardian#175). Aligns with the design doc's staging → canonical structure; the canonical typed table + per-agent adapters are a follow-up MR. Builds on #1244 / #1257. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
New option in
⚠️ Requires py-gitguardian changes: GitGuardian/py-gitguardian#173
ggshield ai discover:--historyallows parsing and sending MCP calls found in agent transcripts, in order to obtain insight on calls made before installing the hook.What has been done
ggshield ai discovertakes a new optional flag option:--history. Not passing the flag results in the same behavior as before.Validation
ggshield ai discover --historyPR check list
skip-changeloglabel has been added to the PR.