Skip to content

feat: add webhook incoming queue endpoints (HookIncomings) - #92

Merged
JanKulhavy merged 18 commits into
mainfrom
worktree-hook-incomings
Sep 3, 2026
Merged

feat: add webhook incoming queue endpoints (HookIncomings)#92
JanKulhavy merged 18 commits into
mainfrom
worktree-hook-incomings

Conversation

@JanKulhavy

@JanKulhavy JanKulhavy commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

This PR adds first-class SDK coverage for a webhook’s incoming processing queue via a new HookIncomings nested resource exposed as make.hooks.incomings.*, along with matching MCP tool definitions, tests/mocks, and documentation updates.

Copilot AI lite review requested due to automatic review settings September 1, 2026 12:29
@JanKulhavy
JanKulhavy requested a review from a team as a code owner September 1, 2026 12:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds first-class SDK coverage for a webhook’s incoming processing queue via a new HookIncomings nested resource exposed as make.hooks.incomings.*, along with matching MCP tool definitions, tests/mocks, and documentation updates.

Changes:

  • Add HookIncomings endpoint class with list, stats, get, and delete operations for /hooks/{hookId}/incomings*.
  • Add MCP tool definitions for the new operations and register them in the tools aggregator.
  • Add Jest unit tests + mocks for both the endpoint and the MCP tools; update public exports and README category/endpoint lists.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/mocks/hook-incomings/stats.json Adds mock response for queue stats endpoint.
test/mocks/hook-incomings/list.json Adds mock response for listing queued incoming items.
test/mocks/hook-incomings/get.json Adds mock response for fetching incoming item detail (with payload).
test/mocks/hook-incomings/get-confidential.json Adds mock response for confidential hook item detail (payload omitted).
test/mocks/hook-incomings/delete.json Adds mock response for delete operation returning deleted IDs.
test/mocks/hook-incomings/delete-partial-error.json Adds mock response for partial delete failure (deleted IDs + error).
test/hook-incomings.spec.ts Adds endpoint-level unit tests for list/stats/get/delete behavior and query/body forwarding.
test/hook-incomings-tools.spec.ts Adds MCP tool execution tests for the four new tools.
src/tools.ts Registers the new hook-incomings tool set in MakeTools.
src/index.ts Exports new public types/classes for hook incoming queue support.
src/endpoints/hooks.ts Exposes incomings on the existing Hooks endpoint.
src/endpoints/hook-incomings.ts Implements the new endpoint class and associated public types.
src/endpoints/hook-incomings.tools.ts Adds MCP tool definitions for list/stats/get/delete operations.
README.md Adds documentation entries for the endpoint and tool category.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/endpoints/hook-incomings.ts
Comment thread src/endpoints/hook-incomings.tools.ts
JanKulhavy and others added 3 commits September 1, 2026 15:10
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- #discussion_r3904131817 validate SDK delete options before sending a request\n- #discussion_r3904131897 encode the two valid delete shapes in the tool schema

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.

Comment thread src/endpoints/hook-incomings.ts
Comment thread src/endpoints/hook-incomings.tools.ts Outdated
Comment thread src/endpoints/hook-incomings.ts Outdated
- self-review hook-incomings-get-unvalidated-path-id: validate and encode queue item path IDs\n- self-review hook-incomings-delete-empty-ids: reject empty selector arrays in the endpoint and tool schema

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.

Suppressed comments (2)

src/endpoints/hook-incomings.tools.ts:68

  • This description is incorrect for confidential hooks: the endpoint deliberately omits data, as the new confidential-hook test demonstrates. State that the payload is only returned for non-confidential hooks so tool consumers do not rely on it always being present.
        description: 'Get the full detail of a single queued item, including its payload.',

src/endpoints/hook-incomings.ts:138

  • No integration test accompanies this new endpoint resource. AGENTS.md:475-483 requires endpoint additions to have integration coverage, and the existing hooks resource is covered by test/hooks.integration.test.ts. Add live coverage for the queue operations (at minimum list/stats and any feasible enqueue/get/delete flow) to verify the response shapes and request contract against the API.
 * hand off to a running scenario.

Comment thread src/endpoints/hook-incomings.tools.ts
- #discussion_r3905273756 add safe live coverage for all queue operations and deletion contracts\n- #discussion_r3905273847 document confidential payload omission in the tool\n- #discussion_r3905273904 align get method documentation with confidential responses
- #discussion_r3905374186 add a structured pg schema and forward list pagination options
Constrain pagination to the web API's created-only sorting and 10,000-item limit, including runtime and tool-schema validation. Isolate the live bulk-delete test by preserving every queued item except its own target.
Match the web API's integer Unix-millisecond contract for from/to in both direct SDK calls and tool schemas.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 18 changed files in this pull request and generated no new comments.

@JanKulhavy
JanKulhavy merged commit 8badcde into main Sep 3, 2026
4 checks passed
@JanKulhavy
JanKulhavy deleted the worktree-hook-incomings branch September 3, 2026 08:08
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.

3 participants