Repository navigation
feat(traffic): add analytics contracts and authenticated CLI/MCP queries - #10
Conversation
mrgoonie
left a comment
There was a problem hiding this comment.
Summary: Adds Analytics blocks, CLI traffic queries and the authenticated MCP traffic tool, with CI-gated production Worker deployment.
Risk level: Medium. The authorization and deployment paths changed; scope and credential boundaries are explicitly covered.
Findings: No unresolved Critical or Important issues in the reviewed diff. Private traffic requires OAuth mcp:read or authenticated legacy Worker context; delegated requests use the existing allowlist/redirect controls and request-bound assertion without forwarding shared API keys or OAuth tokens. Public reads retain existing behavior.
Verdict: Approve.
Evidence: Full local suite 113/113; package builds and type checks clean; all nine CI matrix jobs green at ac70bdb (run 34683891566). npm publication remains blocked by registry authentication and is not claimed complete. Independent child review dispatch was unavailable because of the runtime agent limit.
Posted as COMMENT because the authenticated account owns this PR; this is not an independent GitHub approval.
Posted by the installed review-pr skill at 2026-09-12T08:43:00Z
End-to-end work summary
Adds Analytics document blocks and organization-authorized product traffic to the contracts, CLI and MCP. Integrates the new MCP tool with the current OAuth delegation path and adds production MCP deployment after main CI passes.
Subagent delegation
Toolkit delivery is delegated from the traffic analytics controller. A separate reviewer dispatch was attempted but unavailable because the runtime agent limit was reached; local source review and verification completed.
Technical decisions
get_product_trafficrequires OAuthmcp:reador legacy Worker authentication. OAuth requests sign a request-bound assertion and never forward shared API keys or the access token. Existing anonymous public reads remain available.--json.Deviations from plan
The local checkout predated current OAuth support. Integrated origin/main before adapting traffic delegation and authentication. Package versions remain 0.2.0 for the first publication; no published versions were found.
Completion evidence
npm test: 113 tests passed across 16 files.npm run build --prefix packages/contracts,packages/cli,packages/mcp: passed.npm run type-check --prefix packages/contracts,packages/cli,packages/mcp: passed.git diff --check: passed.Checklist
Human actions required
Registry login must be renewed or a valid repository
NPM_TOKENsupplied before first package publication: localnpm whoamireturns E401 and the repository has no npm publishing secret. Production Cloudflare deployment credentials are being provisioned by the traffic delivery controller.Linked Issues
Closes #9
Ship Mode
Official; target
main. English prose uses the installed writing-language resolver default.