Add submit_feedback tool with consent-gated session transcript capture (POC)#22
Draft
swarup-padhi-glean wants to merge 1 commit into
Draft
Add submit_feedback tool with consent-gated session transcript capture (POC)#22swarup-padhi-glean wants to merge 1 commit into
swarup-padhi-glean wants to merge 1 commit into
Conversation
…e (POC) Plugin-owned submit_feedback records a vote + optional comment, and — when the admin enables capture and the user consents — captures this session's transcript so Glean can debug multi-step skill orchestrations that run inside the host. Implements the four controls from the security review: - Admin opt-out: GLEAN_SESSION_CAPTURE env gate, default off. - User opt-out: per-event consent elicitation (fail-closed) + persistent feedback-capture-optout marker file. - Credential redaction: best-effort regex pass (PEM, JWT, OpenAI/AWS/GitHub/ Slack/Google keys, Bearer/Authorization, url creds, generic secret=value). PII intentionally preserved per the review. - Justification surfaced in the tool description + consent text. Transcript is located from the host session id (~/.claude/projects for Claude Code, ~/.codex/sessions rollout files for Codex; Cursor has no session-id env var and is skipped gracefully) and tail-truncated. Upload to Glean is STUBBED; the redacted artifact is written locally (0600) only. Adds GLEAN_SESSION_CAPTURE to both .mcp configs and bumps the three plugin manifests 0.2.29 -> 0.2.30. 29 new tests; 184/184 pass, typecheck + build clean.
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.
What
POC for capturing the Claude/Codex session transcript on a feedback event in the Glean plugin, per the
#actions-working-groupthread (EN-1845292) and the security review there.A plugin-owned
submit_feedbacktool records a vote (up/down) + optional comment. When the admin has enabled capture and the user consents, it also captures this session's transcript — the user's prompts and every other tool/MCP server's activity, not just Glean's — so Glean can debug multi-step skill orchestrations that run inside the host.Sunil's 4 requirements → controls
GLEAN_SESSION_CAPTUREenv gate, default off; capture skipped with a clear message when disabledfeedback-capture-optoutmarker fileredact.tsbest-effort scrub (PEM, JWT, OpenAI/AWS/GitHub/Slack/Google keys, Bearer/Authorization,user:pass@host, genericsecret=value); PII intentionally preservedHow it works
resolveSessionId()→GLEAN_SESSION_ID):~/.claude/projects/<encoded-cwd>/<session-id>.jsonl~/.codex/sessions/YYYY/MM/DD/rollout-<ts>-<session-id>.jsonllocateTranscriptreturnsnull, capture is skipped gracefully.GLEAN_FEEDBACK_MAX_BYTES).0600artifact. Upload is stubbed.Files
src/redact.ts— best-effort credential scrubber (PII left intact; Presidio extension point noted).src/session-transcript.ts—locateTranscript()+readTranscript()(tail-truncation).src/tools/submit-feedback.ts— the tool +handleSubmitFeedback().tests/*— 29 new tests for the three modules.src/index.ts,.mcp.json/.mcp.codex.json, three plugin manifests — registration +GLEAN_SESSION_CAPTURE+ version bump.Verification
tsc --noEmitclean ·npm run buildclean · 184/184 vitest tests pass (29 new).mcp__conductor,Bash,Workflow, …) → plantedsk-…/AKIA…/ghp_…scrubbed to«redacted:…».Deferred (as scoped)
Actual upload + backend
chat_transcriptwiring · Presidio-grade redaction · geo-based opt-out defaults + Legal sign-off · Cursor support · auto/bulk scraping (separate, higher-scrutiny effort).