Skip to content

Tags: hookdeck/hookdeck-cli

Tags

v2.3.0-beta.1

Toggle v2.3.0-beta.1's commit message

Verified

This commit was signed with the committer’s verified signature.
leggetter Phil Leggetter
feat(mcp): add full list filter parity for events and requests

Expose payload search (body, headers, parsed_query, path), date range
after/before params, and remaining CLI list filters on hookdeck_events
and hookdeck_requests. Document ISO 8601 date windows and gte/lte mapping
for agents; add unit and MCP acceptance smoke tests.

Co-authored-by: Cursor <cursoragent@cursor.com>

v2.2.0

Toggle v2.2.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: prep for homebrew-core submission (#296)

* chore(release): disable CGO for darwin builds in mac.yml

The codebase has no CGO usage (no `import "C"`, no `//#cgo` directives),
so the CGO_ENABLED=1 flag on the darwin amd64 build produced a libc-linked
binary for no benefit. The arm64 darwin build, all linux builds, and the
npm package builds (since commit fd2338b) already use CGO_ENABLED=0.

This change makes the GoReleaser-built tap binaries statically linked
and consistent with every other build path.

Refs #295

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs: regenerate REFERENCE.md for connection pause/unpause command

The `gateway connection pause` and `gateway connection unpause` commands
accept an ID or name (added in #276), but REFERENCE.md still documented
the older ID-only argument. Regenerated from cobra command metadata to
sync.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(completion): output completion script to stdout

Previously, `hookdeck completion --shell bash` wrote the completion script
to a file in the current working directory and printed multi-step shell
setup instructions. This was non-standard — every other major Cobra-based
CLI (gh, goreleaser, kubectl, helm, terraform) outputs the script to
stdout so it can be piped, redirected, or sourced directly.

Outputting to stdout enables the canonical pattern:

  source <(hookdeck completion --shell bash)

The Long help text now documents the redirection patterns; OS-specific
instruction blobs have been removed from the command output.

Also unblocks the idiomatic `generate_completions_from_executable` helper
in Homebrew formulae, which assumes stdout output.

BREAKING CHANGE: `hookdeck completion --shell <shell>` no longer creates
a file in the current directory or prints setup instructions. Use shell
redirection to write to a file. Release notes will call this out.

scripts/completions.sh updated to use redirection. README.md "Completion"
section rewritten to show the new pattern. REFERENCE.md regenerated.

Refs #295

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

v2.1.2-beta.1

Toggle v2.1.2-beta.1's commit message

Verified

This commit was signed with the committer’s verified signature.
leggetter Phil Leggetter
refactor(config): sync cached API client from Profile instead of rese…

…tting

Replace exported ResetAPIClient with RefreshCachedAPIClient that updates the singleton in place (matches how MCP already mutates credentials on the shared *hookdeck.Client). Keep resetAPIClient unexported for tests only.

MCP login continues to assign client.APIKey/ProjectID explicitly: tests use a dedicated client pointer, not the global singleton.

Made-with: Cursor

v2.1.1

Toggle v2.1.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix(mcp): auth-aware gateway MCP, stdio stderr, login reauth (#280)

* fix(mcp): auth-aware gateway MCP, stderr for Execute, login reauth

- Skip requireGatewayProject for gateway mcp when no API key; enforce when key present
- Route gateway mcp errors and login-required messages to stderr; no interactive login
- argvContainsGatewayMCP skips global flags (e.g. --profile, -p)
- Always register hookdeck_login with optional reauth; clear credentials then device login
- Hedged list-projects failure hint suggesting reauth for 401/403-style errors
- ClearMCPProfileCredentials for memory-only or persisted config
- Acceptance: subprocess gateway mcp with stdin pipe; stdout JSON-RPC hygiene

Made-with: Cursor

* refactor(config): centralize silent credential clear for logout and MCP

- Rename ClearMCPProfileCredentials to ClearActiveProfileCredentials; document disk vs memory paths
- Logout uses the same helper as MCP reauth; zeroProfileCredentialFields helper
- RemoveAllProfiles clears in-memory credential fields after wiping the file (parity with logout -a)
- Rename config test to match new API

Made-with: Cursor

* Tighten error matching, improve login context handling, and tests (#281)

* fix(review): tighten error matching, add safety comments, revert noise

- tool_projects_errors.go: match "status code: 4xx" instead of bare
  "401"/"403" to avoid false positives on IDs or timestamps
- tool_login.go: remove `_ = ctx` suppression, add TODO for context
  propagation to polling goroutine, document happens-before on
  loginState.err via channel close
- root.go: add maintenance comment linking flagNeedsNextArg to init()
- helpers.go: revert unrelated Attempt struct alignment change

https://claude.ai/code/session_01EpXZqTmgybtjgmSALukH8d

* fix(review): ListProjects returns *APIError, add reauth + argv tests

- projects.go: use checkAndPrintError instead of manual status check so
  ListProjects errors are structured *APIError — the errors.As path in
  shouldSuggestReauthAfterListProjectsFailure now matches directly
- tool_projects_errors_test.go: unit tests for reauth hint logic covering
  APIError 401/403, plain error fallback, and false-positive resistance
- root_argv_test.go: document boolean-flag-between-subcommands limitation

https://claude.ai/code/session_01EpXZqTmgybtjgmSALukH8d

* fix(mcp): cancel login polling goroutine on MCP session close

Thread the request context into the login polling goroutine so it
stops promptly when the MCP transport closes, instead of running for
up to ~4 minutes after the client disconnects.

WaitForAPIKey blocks with time.Sleep and doesn't accept a context, so
we run it in an inner goroutine and select on both its result channel
and ctx.Done(). The inner goroutine is bounded by loginMaxAttempts.

https://claude.ai/code/session_01EpXZqTmgybtjgmSALukH8d

---------

Co-authored-by: Claude <noreply@anthropic.com>

* fix(mcp): review fixes for auth-aware gateway MCP (#282)

* fix(review): tighten error matching, add safety comments, revert noise

- tool_projects_errors.go: match "status code: 4xx" instead of bare
  "401"/"403" to avoid false positives on IDs or timestamps
- tool_login.go: remove `_ = ctx` suppression, add TODO for context
  propagation to polling goroutine, document happens-before on
  loginState.err via channel close
- root.go: add maintenance comment linking flagNeedsNextArg to init()
- helpers.go: revert unrelated Attempt struct alignment change

https://claude.ai/code/session_01EpXZqTmgybtjgmSALukH8d

* fix(mcp): cancel login polling goroutine on MCP session close

Thread the request context into the login polling goroutine so it
stops promptly when the MCP transport closes, instead of running for
up to ~4 minutes after the client disconnects.

WaitForAPIKey blocks with time.Sleep and doesn't accept a context, so
we run it in an inner goroutine and select on both its result channel
and ctx.Done(). The inner goroutine is bounded by loginMaxAttempts.

https://claude.ai/code/session_01EpXZqTmgybtjgmSALukH8d

* fix(mcp): use session-level context for login polling, not per-request

The per-request ctx passed to MCP tool handlers is cancelled when the
handler returns. The previous commit selected on that ctx in the login
polling goroutine, which killed the poll immediately after returning
the browser URL — breaking in-MCP authentication.

Fix: add a sessionCtx field to Server, set it in Run() (called by
RunStdio and tests), and select on that instead. The session context
is only cancelled when the MCP transport closes (stdin EOF), which is
the correct signal to abandon login polling.

Also adds TestLoginTool_PollSurvivesAcrossToolCalls: a regression test
that starts a login flow, lets the mock auth complete between tool
calls, and verifies the client is authenticated on the second call.
This would have caught the per-request ctx bug.

https://claude.ai/code/session_01EpXZqTmgybtjgmSALukH8d

---------

Co-authored-by: Claude <noreply@anthropic.com>

* fix(test): MCP login poll timing, profile save guard, retry API 500

- Wait loginPollInterval before second hookdeck_login in PollSurvives test
- SaveActiveProfileAfterLogin: skip disk persist when viper nil (tests)
- CLIRunner: retry transient HTTP 500 like 502 for acceptance flakes

Made-with: Cursor

* fix(cli): validate without stale project headers; sync profile from API

Omit X-Team-ID/X-Project-ID on GET /cli-auth/validate via clientForCLIAuthValidate
so a valid CLI key is not rejected when config.toml has a stale project_id.

After successful validate on the existing-key login path, persist project_id,
project_mode, and project_type from the response.

Add Profile Apply* helpers for validate, poll, and CI responses; use them from
login, interactive login, and MCP hookdeck_login. requireGatewayProject now
applies the full validate response (including project_id) without clearing
guest_url.

Tests: auth validate headers, profile apply helpers, LoadConfigFromFile,
gateway resolve-from-validate integration.

Made-with: Cursor

* docs(agents): go test in Cursor, module cache, out-of-sandbox runs

Document GOMODCACHE for agent shells, prompt-first elevated execution, and
point CLAUDE.md at AGENTS.md as the single source for agent instructions.

Made-with: Cursor

* chore: send command flag names in CLI telemetry

Include changed flag names (not values) as command_flags in
X-Hookdeck-CLI-Telemetry JSON. Wire CollectChangedFlagNames from root
initTelemetry. Add unit tests and acceptance test for login --api-key
and --cli-key over the recording proxy.

Made-with: Cursor

---------

Co-authored-by: Claude <noreply@anthropic.com>

v2.1.0

Toggle v2.1.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: accept connection name or ID in pause/unpause commands (#277)

* feat: accept connection name or ID in pause/unpause commands

* test(cli,mcp): finish connection name/ID resolution for issue #276

Completes the pause/unpause name-or-ID work from the parent commit and
aligns MCP, tests, and user-facing copy.

CLI
- Document pause/unpause with examples (ID and name) in command Long text.
- Add httptest coverage for resolveConnectionID: direct web_* ID, lookup
  by name via ListConnections, and web_* GET 404 falling back to name.

Gateway MCP (hookdeck_connections)
- Resolve connection ID or name for get, pause, and unpause using the same
  rules as the CLI (prefix probe, then list-by-name).
- Surface API errors during resolution through TranslateAPIError so
  responses match other tools (e.g. authentication failures).
- Validation errors: id or name is required for get/pause/unpause.
- Refresh tool description, static help, and JSON schema text for get by
  name.

Tests
- MCP server tests: stub GET /connections/{id} before pause/unpause;
  include pagination limit in list mocks so name resolution succeeds;
  add get/pause/unpause-by-name cases; update missing-parameter assertions.
- Acceptance: TestConnectionPauseUnpauseByName exercises pause/unpause by
  name against the real API and checks paused_at via connection get.

Refs: #276
Made-with: Cursor

---------

Co-authored-by: leggetter <leggetter@users.noreply.github.com>

v2.0.2

Toggle v2.0.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore: add agent skills for CLI releases (#272)

- Add skills/hookdeck-cli-release with checklist, SemVer checks, CI gates,
  gh release create flow (temp notes file), and contributor policy
- Symlink .cursor/skills and .claude/skills to repo-root skills/
- Add CLAUDE.md (stop ignoring); point agents to AGENTS.md and skills/
- Document agent skills layout in AGENTS.md; link from README Releasing
- Remove CLAUDE.md from .gitignore so it ships with the repo

Made-with: Cursor

v2.0.1

Toggle v2.0.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore(deps): bump golang.org/x/term from 0.40.0 to 0.41.0 (#269)

Bumps [golang.org/x/term](https://github.com/golang/term) from 0.40.0 to 0.41.0.
- [Commits](golang/term@v0.40.0...v0.41.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-version: 0.41.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

v2.0.0

Toggle v2.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
chore(deps): bump golang.org/x/crypto from 0.43.0 to 0.45.0 (#266)

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.43.0 to 0.45.0.
- [Commits](golang/crypto@v0.43.0...v0.45.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.45.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

v2.0.0-beta.3

Toggle v2.0.0-beta.3's commit message
Beta: v2.0.0-beta.3

v2.0.0-beta.2

Toggle v2.0.0-beta.2's commit message
Beta: project type (Gateway/Outpost/Console), gateway gating, whoami …

…updates