feat: gateway trace-sink adapter (MCP call traces) - #5
Merged
Conversation
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
armory-memory becomes the first live gateway trace sink (SPEC-1b-3 D2): when
@getpipher/armory-gatewayis installed in the same pi, the extension registers aregisterTraceSinkvia guarded dynamic import and persists every executed MCP call as one metadata-only JSONL line at~/.pi/agent/memory/<cwd-slug>/mcp-traces.jsonl.{ts, server, tool, ok, durationMs, resultSummary, agent?, task?}— args are never serialized (structural exclusion, byte-level test pin);resultSummaryis content-free at the tap.*.mdinjection surface (listMemory/renderMemoryBlocknever see it); cap 500 entries, compact >1000, torn lines dropped at compact.session_starthandler (guarded import; absent gateway → silent skip, standalone memory unchanged).ARMORY_GATEWAY_PATH+ runtime symlink helper (no package.json coupling — publicclone && npm install && npm teststays green; tests skip-with-notice when unset).SIBLINGS_PAT) and installs gateway's deps beforenpm test.Commits
266d089pure sink ·c1f8f57adapter+contract tests+wiring+README ·3949d1dCI gate ·094074fdocs relocation ·e21fcfdCI fix (below)V3 dry-run evidence (found + fixed a real gap)
node_modules; the contract import threw at module load.e21fcfd: install gateway deps inside the cloned sibling beforenpm test.Local evidence
RED→GREEN per task;
npm testfour stages green; final whole-branch review (session model): Yes — 0 Critical/Important; deferred minors triaged (recorded in.superpowers/sdd/progress.md).Docs
docs/SPEC-1b-3-gateway-trace-sink.md— relocated spec sections + as-built notes.