Skip to content

feat: v2.0.0: MCP server, telemetry, issues CLI, metrics consolidation, Go SDK removal#231

Draft
leggetter wants to merge 46 commits intomainfrom
claude/hookdeck-gateway-mcp-Xe6WQ
Draft

feat: v2.0.0: MCP server, telemetry, issues CLI, metrics consolidation, Go SDK removal#231
leggetter wants to merge 46 commits intomainfrom
claude/hookdeck-gateway-mcp-Xe6WQ

Conversation

@leggetter
Copy link
Collaborator

@leggetter leggetter commented Mar 9, 2026

Summary

v2.0.0 release branch combining several feature branches into a single release with new functionality, internal improvements, and one breaking change.

Breaking Changes

  • Global --config flag renamed to --hookdeck-config — Avoids conflicts with --config flags on source/destination commands that accept JSON objects. Users must update scripts using hookdeck --config /path to hookdeck --hookdeck-config /path.

New Features

MCP Server (hookdeck gateway mcp) [BETA]

A stdio JSON-RPC Model Context Protocol server exposing Hookdeck's API as LLM-callable tools, compatible with Claude Desktop, Cursor, and other MCP clients.

11 tools:

Tool Description
hookdeck_help Get tool overview or detailed help for a specific tool
hookdeck_sources Inspect inbound HTTP endpoints (list, get)
hookdeck_destinations Inspect delivery targets — HTTP, CLI, MOCK (list, get)
hookdeck_connections Inspect and control routes (list, get, pause, unpause)
hookdeck_requests Query raw inbound HTTP requests (list, get, raw_body, events, ignored_events)
hookdeck_events Query processed events (list, get, raw_body)
hookdeck_attempts Query delivery attempts and retry history (list, get)
hookdeck_transformations Inspect JavaScript payload transformations (list, get)
hookdeck_issues Inspect aggregated failure signals (list, get)
hookdeck_metrics Query aggregate metrics with time ranges and dimensions
hookdeck_projects List available projects or switch active project (list, use)
hookdeck_login Browser-based device authentication (when unauthenticated)

Internal Changes

  • Deprecated Hookdeck Go SDK removedhookdeck-go-sdk v0.7.0 (API 2024-03-01) replaced by direct HTTP client using API 2025-07-01
  • Source/destination --config flag — New flag for passing JSON config objects directly
  • Acceptance test infrastructure — Parallel test runner, expanded test helpers, comprehensive coverage for issues, metrics, and MCP
  • 94+ MCP unit tests covering all tools, error handling, auth, and telemetry

Stats

  • 100 files changed
  • ~8,900 additions, ~610 deletions
  • 45 commits

Test Plan

  • MCP server unit tests pass (94+ tests)
  • Acceptance tests pass for issues CLI
  • Acceptance tests pass for metrics consolidation
  • Telemetry tests pass (CLI and MCP)
  • hookdeck listen works correctly with new direct API client
  • hookdeck gateway mcp starts and responds to tool calls
  • Telemetry opt-out works via command and environment variable
  • --hookdeck-config flag works correctly

claude and others added 30 commits March 5, 2026 13:34
Comprehensive implementation plan mapping all 11 MCP tools to existing
CLI codebase with exact file paths, API client methods, request/response
types, and MCP input schemas. Identifies gaps (issues API client missing)
and surfaces 9 questions covering functionality unknowns, plan
ambiguities, and implementation risks.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
…d OpenAPI spec

- Expand Section 1.2.9 (Issues) with full OpenAPI-derived schema, API client
  code, CLI commands, and MCP tool design
- Rewrite Section 1.2.10 (Metrics) with 7→4 subcommand consolidation and
  CLI-layer routing logic
- Update Section 1.3 (File Structure) with all new/modified/removed files
- Replace resolved Q1-Q3 in Section 2 with updated open questions
- Add OpenAPI spec (2025-07-01) to plans/ for reference

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
Adds a checklist at the top of the plan document breaking Phase 1 into
5 parts: Issues CLI backfill, Metrics consolidation, MCP server skeleton,
MCP tool implementations, and integration testing. Each part lists every
file/task as a checkbox so progress can be tracked across commits.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
Add full Issues API client and CLI commands:
- pkg/hookdeck/issues.go: Issue types, enums, and 5 API client methods
  (ListIssues, GetIssue, UpdateIssue, DismissIssue, CountIssues)
- pkg/cmd/issue.go: Issue group command (issue/issues aliases)
- pkg/cmd/issue_list.go: List with filters (type, status, trigger, pagination)
- pkg/cmd/issue_get.go: Get single issue by ID
- pkg/cmd/issue_update.go: Update issue status (with validation)
- pkg/cmd/issue_dismiss.go: Dismiss issue (DELETE, with confirmation)
- pkg/cmd/issue_count.go: Count issues with filters
- Register via addIssueCmdTo() in gateway.go
- Mark Part 1 complete in plan progress tracker

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
Covers all 5 issue subcommands:
- Help: verifies all subcommands listed, plural alias works
- List: basic, type/status/limit/order-by filters, JSON output
- Count: basic, type filter, status filter
- Get/Update/Dismiss: argument validation (missing ID, missing status, invalid status)
- Workflow: list → get → update on a real issue (skips if none exist)

Follows the same patterns as metrics_test.go and event_test.go.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
- Single issue_test.go (was issue_0_test, issue_dismiss, issue_resolve)
- Skip 18 tests that use createConnectionWithFailingTransformationAndIssue
  (flaky due to backend timing); 7 stable tests run (help + validation)
- Helpers: createConnectionWithFailingTransformationAndIssue, dismissIssue, Issue type

Made-with: Cursor
Parts 1-3 now include acceptance test tasks, and Part 5 separates
CLI acceptance testing from MCP integration testing.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
Part 2 now explicitly covers verifying --measures/--dimensions on
requests, attempts, and transformations, plus comprehensive acceptance
test updates for the full consolidation from 7 to 4 subcommands.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
Fold queue-depth, pending, and events-by-issue into the events subcommand
with smart routing based on --measures and --dimensions flags:
- queue_depth/max_depth/max_age measures → QueryQueueDepth API
- pending measure with --granularity → QueryEventsPendingTimeseries API
- issue_id dimension or --issue-id → QueryEventsByIssue API
- All other combinations → QueryEventMetrics API (default)

Remove metrics_pending.go, metrics_queue_depth.go, metrics_events_by_issue.go.
Update acceptance tests to cover consolidated routing and verify
--measures/--dimensions on all 4 subcommands.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
…xpand acceptance tests

- Help: user-facing copy for metrics and events (no 'consolidate'); document
  --issue-id required for per-issue in Long and flag help
- Pending timeseries: send measures=count to API (routing keeps --measures pending)
- Events-by-issue: require --issue-id when routing; clear error and help text
- Tests: TestMetricsHelp asserts --start/--end; remove NotContains for old subcommands
- Tests: TestMetricsEventsPerIssueRequiresIssueID (client-side validation)
- Tests: requests/attempts/transformations — output JSON, granularity, one filter each;
  transformations missing start/end validation

Made-with: Cursor
…lation

- Add github.com/modelcontextprotocol/go-sdk v1.4.0 dependency
- Create pkg/gateway/mcp/ package: server.go (MCP server init + stdio
  transport), tools.go (11 tool definitions with placeholder handlers),
  errors.go (API error → MCP error translation), response.go (JSON/text/
  error result helpers)
- Create pkg/cmd/mcp.go: `hookdeck gateway mcp` Cobra command that
  validates auth, gets API client, and starts the MCP stdio server
- Register MCP subcommand in pkg/cmd/gateway.go
- Add acceptance tests: TestMCPHelp, TestGatewayHelpListsMCP

The skeleton compiles, registers all 11 tools (placeholder implementations),
and will respond to MCP initialize requests over stdio. Part 4 will fill in
the real tool handler implementations.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
The MCP go-sdk requires a non-nil input schema with type "object" for
every tool (AddTool panics otherwise). Use a shared emptyObjectSchema
so the server starts and responds to initialize/tools/list/tools/call.

Made-with: Cursor
Parts 1-3 are complete. Add status summary table, note the
InputSchema fix, and mark Part 4 (tool implementations) as next.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
Replace placeholder handlers with real implementations that call the
Hookdeck API. Each tool parses JSON arguments, maps parameters to API
query params, and returns structured JSON results.

Tools implemented:
- hookdeck_projects: list/use (session-scoped project switching)
- hookdeck_connections: list/get/pause/unpause
- hookdeck_sources: list/get
- hookdeck_destinations: list/get
- hookdeck_transformations: list/get
- hookdeck_requests: list/get/raw_body/events/ignored_events/retry
- hookdeck_events: list/get/raw_body/retry/cancel/mute
- hookdeck_attempts: list/get
- hookdeck_issues: list/get/update/dismiss
- hookdeck_metrics: events/requests/attempts/transformations
- hookdeck_help: overview and per-tool detailed help

Also adds proper JSON Schema input definitions for all tools and a
shared input parsing helper (input.go) for typed argument extraction.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
Document the hookdeck_login tool for in-band browser-based authentication
when the CLI is not yet logged in. The MCP server always starts (never
crashes on missing auth), registers all resource tools upfront, and adds
a hookdeck_login tool when unauthenticated. Resource tools return isError
until login completes. After login, hookdeck_login is removed via
tools/list_changed notification.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
When the CLI is not authenticated, the MCP server now starts
successfully (never crashes) and registers a hookdeck_login tool
alongside all resource tools. Resource tools return isError until
login completes. The login tool initiates browser-based device auth,
polls for completion, saves credentials, and removes itself via
tools/list_changed once authenticated.

Changes:
- New auth.go: requireAuth() helper for auth-gating
- New tool_login.go: hookdeck_login handler using StartLogin/WaitForAPIKey
- server.go: accepts *config.Config, conditionally registers login tool
- mcp.go: removed ValidateAPIKey gate, passes config to NewServer
- All 10 resource tool handlers: added requireAuth() check

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
- Mark 'measures' as required in hookdeck_metrics JSON schema so LLM
  clients know to include it (was causing confusing 422 errors)
- Add server-side validation for measures in buildMetricsParams
- Improve hookdeck_help error when topic doesn't match a tool name:
  now lists all available tools instead of a bare "unknown tool" message

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
The hookdeck_login tool deliberately only supports browser-based device
auth. For CI/headless environments, pass --api-key in the MCP server
config. Both paths tested and verified against live API.

Also updates Part 4 status to COMPLETE with accurate action lists.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
20 tests covering server initialization, tool listing, help tool,
auth guard, error translation, mock API tool calls, error scenarios
(404, 422, 429), and input validation. Uses MCP SDK InMemoryTransport
for end-to-end client-server testing.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
94 tests (up from 20) covering all 12 tools and all 36 actions:

- sources: list, get (success + missing ID + API errors 404/422/429)
- destinations: list, get (success + missing ID + unknown action)
- connections: list, get, pause, unpause (success + missing ID + disabled filter)
- transformations: list, get (success + missing ID)
- attempts: list, get (success + missing ID)
- events: list, get, raw_body, retry, cancel, mute (success + missing ID +
  truncation + connection_id→webhook_id mapping)
- requests: list, get, raw_body, events, ignored_events, retry (success +
  missing ID + truncation + connection_ids + verified filter)
- issues: list, get, update, dismiss (success + missing ID + missing status)
- projects: list, use (success + missing project_id + not found)
- metrics: events (4 routing paths: default, queue_depth, pending_timeseries,
  by_issue), requests, attempts, transformations (missing start/end/measures)
- login: already-authenticated early return
- help: overview, specific topic, short name, unknown topic
- auth guard: all 10 resource tools reject unauthenticated
- input parsing: accessors, empty args, invalid JSON
- error translation: 401, 404, 422, 429, 500, non-API

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
…inciple

Per RFC #228, the MCP server should be read-focused for investigation
workflows. Remove write actions that were added beyond the RFC scope:
- events: remove retry, cancel, mute actions
- requests: remove retry action
- issues: remove update, dismiss actions

Connection pause/unpause are retained as they are explicitly scoped in
the RFC as "lightweight flow-control actions".

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
…nd README

Update all MCP tool descriptions to accurately reflect read-only
investigation capabilities per MCP best practices:
- Replace generic "Manage" with specific verbs (inspect, query, list)
- Add contextual detail about what each tool returns and when to use it
- Describe the webhook data model (requests → events → attempts)

Expand README MCP section with:
- Available tools table showing all 11 tools
- Claude Desktop configuration alongside Cursor
- Seven example prompts demonstrating investigation workflows

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
…guage

Hookdeck is HTTP in, HTTP out — webhook events are one type of event
trigger. Update tool descriptions and README to reflect this:
- "webhook sources" → "inbound sources"
- "webhook delivery destinations" → "delivery destinations"
- "webhook payloads" → "event payloads"
- "webhook connections" → "connections"
- "webhook traffic" → "event traffic"
- Use "webhook events" only where specifically about webhooks

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
claude and others added 15 commits March 10, 2026 10:33
… plan

- AGENTS.md: add pointer to test/acceptance/README.md for API key setup
- Plan: mark all Part 5 checklist items complete with test references

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
Introduced a new document detailing the Hookdeck MCP build-out plan v2, focusing on the investigation and operations layer. The plan outlines the goals, scope, and phases of implementation, including success criteria and an end-to-end example of a production investigation workflow. This document serves as a guide for implementers and PMs, ensuring clarity on the MCP's capabilities and limitations.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
… section

Updates the plan to match the actual implementation:
- Add hookdeck_login tool (in-band browser auth, conditional registration, self-removing)
- Add raw_body action to events and requests tools
- Add events and ignored_events actions to requests tool
- Update tool count from 11 to 12
- Update auth section to describe both pre-auth and in-band login paths
- Resolve events enrichment decision (chose simpler path)
- Fix server description mentioning retry (out of scope for Phase 1)
- Update error handling table to match actual TranslateAPIError implementation

Adds Section 7 "Missing features for consideration" covering 7 gaps:
- Help tool skills+CLI redirect, server description, slog logging,
  project selection validation, projects name resolution, richer errors,
  and Retry-After header surfacing.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
Keep Claude Code project notes local-only so branch configuration
doesn't get committed to the repository.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
… errors

Covers gaps identified in test review:
- Server name/version via InitializeResult
- Help topics for all 11 tools (full and short name forms)
- Help overview lists all tools and handles empty ProjectID
- Unknown topic error includes available tools list
- Error translation for 401, 409, 429, 500, 502, 503 across different tools
- Cross-tool error scenarios (destinations 500, connections 401,
  issues 422, attempts 429)

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
…mediately

Previously, handleLogin blocked for up to 4 minutes while polling for
the user to complete browser auth. The browser URL was only returned
in the tool result after polling finished, meaning the user never saw
it — they just saw a spinner with no way to authenticate.

Now the handler returns the browser URL immediately and polls in a
background goroutine. Subsequent calls to hookdeck_login report
"in progress" (with the URL) or the final result. Once auth completes,
the background goroutine updates the shared client and removes the
login tool.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
Outlines the design for making Hookdeck-CLI-Telemetry header useful:
adding source (cli/mcp), invocation_id for grouping multi-call commands,
and mcp_client identification. Covers both the internal client and SDK
client paths, with a WithTelemetry() clone approach for MCP concurrency.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
Adds plan for persistent telemetry disable in config.toml (top-level setting,
not per-profile) with precedence: env var > config > default enabled. Includes
CI/CD detection strategy that tags CI traffic as source="ci" rather than
auto-disabling, preserving analytics visibility while enabling server-side
filtering.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
source (cli/mcp) describes the interface; environment (interactive/ci)
describes the runtime context. These are independent axes that enable
cross-tabulation (e.g. "MCP tool calls from CI"). Previously CI was
overloading the source field which would have lost that information.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
Renamed PLAN.md to plans/cli_mcp_telemetry_instrumentation_plan.md.
Consolidated duplicate file change entries, added key source files
reference table for implementer orientation.

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
- Moved PLAN.md to plans/cli_mcp_telemetry_instrumentation_plan.md
- Reordered so all phases (1-6) are contiguous under Implementation
- Promoted CI detection to Phase 6 (was nested under Phase 5)
- Moved File Change Summary, Risks, Key Source Files, Testing after phases
- Added CI-specific test cases to Testing Strategy

https://claude.ai/code/session_01Y2eJZgKG78nDyN6Uw2tWQx
* feat: implement CLI and MCP telemetry instrumentation

Extend the telemetry header with source, environment, command_path,
invocation_id, and mcp_client fields so the API server can distinguish
CLI from MCP requests and correlate multiple API calls to a single
command invocation.

Phase 1 - Telemetry struct & CLI wiring:
- Add Source, Environment, InvocationID, MCPClient fields to CLITelemetry
- Add NewInvocationID() generator (8 random bytes, hex-encoded)
- Add initTelemetry() helper called from root PersistentPreRun
- Fix Cobra PersistentPreRun chaining for connection command

Phase 2 - MCP per-request telemetry:
- Add Telemetry field + WithTelemetry() clone method on Client
- Update PerformRequest to use per-request telemetry when set
- Wrap MCP tool handlers to set per-invocation telemetry context
- Extract MCP client info from ServerSession.InitializeParams()

Phase 3 - SDK client:
- Works automatically: PersistentPreRun populates singleton before
  GetClient() bakes headers at construction time

Phase 5 - Config-based opt-out:
- Add TelemetryDisabled to Config, read from config.toml
- Update telemetryOptedOut() to accept config flag
- Thread TelemetryDisabled through API and SDK client construction

Phase 6 - CI detection:
- Add DetectEnvironment() checking CI, GITHUB_ACTIONS, GITLAB_CI,
  JENKINS_URL, CODEBUILD_BUILD_ID, BUILDKITE, TF_BUILD env vars
- Tag requests with environment: "ci" or "interactive"

https://claude.ai/code/session_01TQFynqFrXsP38LuYmdERYL

* test: add end-to-end MCP telemetry integration tests

Add 6 integration tests that exercise the full pipeline:
MCP tool call → wrapWithTelemetry → HTTP request → mock API server,
verifying the Hookdeck-CLI-Telemetry header arrives with correct content.

Tests cover:
- Header sent with correct source/command_path/invocation_id/mcp_client
- Each tool call gets a unique invocation ID
- Command path reflects the action (hookdeck_sources/list vs /get)
- Telemetry disabled by config (TelemetryDisabled=true)
- Telemetry disabled by env var (HOOKDECK_CLI_TELEMETRY_OPTOUT=true)
- Multiple API calls within one tool invocation share the same ID

https://claude.ai/code/session_01TQFynqFrXsP38LuYmdERYL

* feat: add `hookdeck telemetry enable/disable` CLI command

Adds a telemetry subcommand with enable/disable actions so users can
toggle anonymous telemetry without manually editing config.toml.

https://claude.ai/code/session_01TQFynqFrXsP38LuYmdERYL

* refactor: make enable/disable positional args of telemetry command

Instead of separate subcommands, `hookdeck telemetry enable` and
`hookdeck telemetry disable` now use a single command with a required
positional argument. Also adds telemetry section to the README.

https://claude.ai/code/session_01TQFynqFrXsP38LuYmdERYL

* test: add singleton reset functions and CLI telemetry tests

Add ResetTelemetryInstanceForTesting() and ResetAPIClientForTesting()
to enable isolated testing of the CLI telemetry path. Add tests that
verify the singleton reset → populate → HTTP request → header cycle,
singleton isolation between sequential commands, and initTelemetry
correctness including generated resource detection.

https://claude.ai/code/session_01TQFynqFrXsP38LuYmdERYL

* Extract telemetry header name to constant with RFC 6648 comment

Add TelemetryHeaderName constant to avoid hardcoded header strings
across the codebase. Include a comment explaining why we omit the
"X-" prefix (deprecated by RFC 6648).

https://claude.ai/code/session_01TQFynqFrXsP38LuYmdERYL

* Remove deprecated hookdeck-go-sdk, migrate listen to direct API client

The listen command was the only consumer of the hookdeck-go-sdk (pinned
to API version 2024-03-01). This migrates it to use the direct
hookdeck.Client which hits the current API version (2025-07-01) and
reads telemetry from the singleton on every request — fixing the gap
where the SDK client baked headers at creation time and never updated.

- Replace all hookdecksdk types with hookdeck types (Source, Connection,
  Destination) across listen/, proxy/, and tui/ packages
- Replace SDK client calls (Source.List, Connection.Create, etc.) with
  direct Client methods (ListSources, CreateConnection, etc.)
- Use Destination.GetCLIPath()/SetCLIPath() instead of direct CliPath field
- Delete pkg/hookdeck/sdkclient.go and pkg/config/sdkclient.go
- Remove github.com/hookdeck/hookdeck-go-sdk from go.mod

https://claude.ai/code/session_01TQFynqFrXsP38LuYmdERYL

* Rename telemetry header to X-Hookdeck-CLI-Telemetry

Add X- prefix for consistency with X-Hookdeck-Client-User-Agent.

https://claude.ai/code/session_01TQFynqFrXsP38LuYmdERYL

* test: parallelize acceptance tests into three slices (#234)

* docs: generate REFERENCE.md in-place, remove REFERENCE.template.md

- Default input is REFERENCE.md; run with no args for in-place update
- Update README generator instructions and --check example
- Remove REFERENCE.template.md

Made-with: Cursor

* feat!: introduce Hookdeck config file and root --hookdeck-config flag

- Rename root-level --config to --hookdeck-config to avoid conflict with
  source/destination --config (JSON body) and --config-file (JSON path).
- Add HOOKDECK_CONFIG_FILE env var for config path; precedence is flag,
  then env, then .hookdeck/config.toml, then default location.
- Document env var and flag in README (precedence list and Global Flags).
- Update REFERENCE.md global options and acceptance tests.

Made-with: Cursor

* test: parallelize acceptance tests into three slices

- Add feature build tags to all automated acceptance test files so tests
  can be split across parallel runs (CI and local).
- CI: run three matrix jobs with tags split by estimated runtime; each job
  uses its own API key (HOOKDECK_CLI_TESTING_API_KEY, _2, _3).
- Local: run_parallel.sh runs three slices in parallel, writing to
  test/acceptance/logs/slice0.log, slice1.log, slice2.log; add logs/ to
  .gitignore.
- Helpers: support ACCEPTANCE_SLICE=2 and HOOKDECK_CLI_TESTING_API_KEY_3;
  per-slice config path and API key selection for isolated projects.
- Rebalance slices for ~5–5.5 min wall time (slice 0: connection/source/
  destination/gateway/etc.; slice 1: request, event; slice 2: attempt,
  metrics, issue, transformation).
- Document three-slice setup, tags, and run commands in test/acceptance/README.md.

Made-with: Cursor

* Consolidate API client usage and fix telemetry opt-out for all clients

Several places constructed hookdeck.Client directly, bypassing
GetAPIClient(). These clients didn't carry TelemetryDisabled from
config, so they'd send telemetry even when the user had opted out.

Two-layer fix:

1. Safety net: Add Disabled flag to the telemetry singleton. PerformRequest
   now checks both the per-client TelemetryDisabled and the singleton's
   Disabled flag, so even stray clients respect the config-level opt-out.

2. Consistency: Route as many callers as possible through GetAPIClient():
   - project.go: use config.GetAPIClient() instead of raw construction
   - whoami.go: use Config.GetAPIClient().ValidateAPIKey()
   - Login() validate path: use config.GetAPIClient().ValidateAPIKey()
   - proxy.go createSession: receive APIClient via proxy.Config
   - tui/model.go: receive APIClient via tui.Config
   - Remove login/validate.go (no longer called)

   For unauthenticated login clients (Login, GuestLogin, CILogin,
   InteractiveLogin, MCP tool_login), pass TelemetryDisabled from config.

https://claude.ai/code/session_01TQFynqFrXsP38LuYmdERYL

---------

Co-authored-by: Claude <noreply@anthropic.com>
@leggetter leggetter changed the title feat(gateway): add MCP server with 11 tools, issues CLI, and metrics consolidation feat: v2.0.0: MCP server, telemetry, issues CLI, metrics consolidation, Go SDK removal</code> Mar 11, 2026
@leggetter leggetter changed the title feat: v2.0.0: MCP server, telemetry, issues CLI, metrics consolidation, Go SDK removal</code> feat: v2.0.0: MCP server, telemetry, issues CLI, metrics consolidation, Go SDK removal Mar 11, 2026
* chore: bump version to 2.0.0-beta.0 and add comprehensive PR description

Update package.json version from 1.10.0-beta.4 to 2.0.0-beta.0 to reflect
the breaking changes in this release branch.

Add PR_DESCRIPTION.md capturing the full scope of changes for the v2.0.0
release, including:
- MCP server with 11 LLM-callable tools
- Issues CLI (list, get, count, update, dismiss)
- Telemetry instrumentation with opt-out support
- Metrics consolidation (7 subcommands → 4)
- Deprecated Hookdeck Go SDK removal (API 2024-03-01 → 2025-07-01)
- Breaking change: --config flag renamed to --hookdeck-config

https://claude.ai/code/session_012a587AhAbbWdqYx76cexPG

* feat(mcp): add beta wrapping to MCP command and remove PR_DESCRIPTION.md

Add ShortBeta/LongBeta wrapping to the MCP command for consistency
with all other gateway subcommands. Remove PR_DESCRIPTION.md as it
doesn't belong in the codebase.

https://claude.ai/code/session_012a587AhAbbWdqYx76cexPG

* refactor(telemetry): rename env var to HOOKDECK_CLI_TELEMETRY_DISABLED and use enabled/disabled args

- Rename HOOKDECK_CLI_TELEMETRY_OPTOUT to HOOKDECK_CLI_TELEMETRY_DISABLED
  to match Next.js convention and align with the config key name
- Change `hookdeck telemetry enable|disable` to `hookdeck telemetry enabled|disabled`
- Update all tests and README accordingly

https://claude.ai/code/session_012a587AhAbbWdqYx76cexPG

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants