Repository navigation
Conversation
One log record per HTTP call between AAuth roles. A pure builder (tokens as type + payload, the signer from Signature-Key, the three AAuth headers parsed, the 30 KB cap), a Hono-shaped middleware for the callee side, and logged fetch wrappers for the caller side (@aauth/agent's onSigned, or @hellocoop/httpsig's returnSent). `parent` rides in AsyncLocalStorage from the middleware to any logged fetch in its continuation. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdTYzN8NvzehCVCSqhadH5
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdTYzN8NvzehCVCSqhadH5
The monitor learns which agent holds a key from any record that names both, and fills in the rows where only the key is known. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SdTYzN8NvzehCVCSqhadH5
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.
The shared logging code for the AAuth call log (
aauth-dev/monitorplan/CALL_LOG_PLAN.md, step 6): oneaauth.callrecord per HTTP call between AAuth roles, at each end, perplan/CALL_RECORD.md. Wallet already writes these from its own Fastify hooks (#4334); this is the same builder for the fleet's Hono workers.record.ts— pure:call_id= SHA-256 of theSignatureheader; tokens as{type, payload}anywhere in a body; the signer and caller fromSignature-Key(no verification);AAuth-Requirement/Signature-Error/AAuth-Budget/Locationparsed; levels; the 30 KB cap that cuts the larger body to text.callee.ts— a Hono-shaped middleware, typed againstc.req.raw/c.res/c.executionCtxonly. Names the call before the handler, reads the cloned bodies inwaitUntil, skips OPTIONS/HEAD/.well-known/health.caller.ts—loggedFetchfor@aauth/agent'screateSignedFetch(one signed fetch per call viaonSigned, so concurrent calls never swap reports),loggedHttpsigFetchfor@hellocoop/httpsig(returnSent),failedFetchfor a fetch that can't be wrapped. The response is cloned before the caller gets it, and read later.context.ts—parentin AsyncLocalStorage (decided 2026-09-25): the middleware runs the handler inside it; a logged fetch reads it;parentcan be passed explicitly where the chain is broken on purpose.nameAgentlets a verifier tell the record which agent a person-token call is for.node:async_hooksundernodejs_compat.17 tests. Added to the workspace, the vitest aliases and the release build/publish list. No other package changes.
🤖 Generated with Claude Code
https://claude.ai/code/session_01SdTYzN8NvzehCVCSqhadH5