feat: add webhook incoming queue endpoints (HookIncomings) - #92
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
HookIncomingsendpoint class withlist,stats,get, anddeleteoperations 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.
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
- 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
Contributor
There was a problem hiding this comment.
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-483requires endpoint additions to have integration coverage, and the existing hooks resource is covered bytest/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.
- #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.
Pavel Kolman (PKolmanExt)
approved these changes
Sep 2, 2026
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.
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.