Skip to content

feat(webhooks): events + logs subcommands, agent scope, expanded even… - #4

Merged
shivamfloe merged 2 commits into
mainfrom
feat/webhooks-events-logs
Aug 11, 2026
Merged

feat(webhooks): events + logs subcommands, agent scope, expanded even…#4
shivamfloe merged 2 commits into
mainfrom
feat/webhooks-events-logs

Conversation

@rajbhensdadiya

@rajbhensdadiya rajbhensdadiya commented Aug 11, 2026

Copy link
Copy Markdown
Member

…t catalog (0.3.0)

Summary by CodeRabbit

  • New Features
    • Added support for more webhook event types, agent-scoped subscriptions, and wildcard event subscriptions.
    • Added event catalog retrieval with table and JSON output.
    • Added account-wide webhook delivery logs with filtering, pagination, and retry guidance.
  • Bug Fixes
    • Improved webhook validation and handling for invalid filters, dates, wallets, endpoints, statuses, and events.
    • Improved webhook statistics by excluding aggregate and zero-count entries.
    • Added clearer handling for unavailable legacy endpoints and empty results.
  • Chores
    • Updated the package version to 0.3.0.

@rajbhensdadiya rajbhensdadiya self-assigned this Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 699492f9-a9e8-4ce6-9abc-afeb3106859d

📥 Commits

Reviewing files that changed from the base of the PR and between b75d008 and 763f482.

📒 Files selected for processing (2)
  • src/commands/webhooks.ts
  • test/webhooks.test.ts

📝 Walkthrough

Walkthrough

Webhook commands now support expanded event catalogs, agent-scoped subscriptions, wildcard events, live catalog retrieval, account-wide delivery logs, pagination, filtering, and revised delivery statistics.

Changes

Webhook command expansion

Layer / File(s) Summary
Event contracts and validation
src/commands/webhooks.ts, test/webhooks.test.ts
The event catalog includes additional event types. Validation supports agent scope, shared Ethereum-address checks, exact events, *, and catalog-backed prefix wildcards. Delivery statistics omit aggregate and zero-count entries.
Live event catalog command
src/commands/webhooks.ts, test/webhooks.test.ts, package.json
The events command retrieves and formats the live catalog, supports JSON output, handles unsupported API versions, and updates command help and dispatch.
Delivery logs and statistics
src/commands/webhooks.ts, test/webhooks.test.ts
The logs command validates filters, retrieves account-wide delivery records, formats pagination and retry hints, supports JSON output, and covers empty results and pagination behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant webhooksEventsCommand
  participant WebhookAPI
  participant CLIOutput
  CLI->>webhooksEventsCommand: Run events command
  webhooksEventsCommand->>WebhookAPI: Fetch live event catalog
  WebhookAPI-->>webhooksEventsCommand: Return catalog response
  webhooksEventsCommand->>CLIOutput: Render sorted table or JSON
Loading
sequenceDiagram
  participant CLI
  participant webhooksLogsCommand
  participant WebhookAPI
  participant CLIOutput
  CLI->>webhooksLogsCommand: Run logs with filters and cursor
  webhooksLogsCommand->>webhooksLogsCommand: Validate filters before I/O
  webhooksLogsCommand->>WebhookAPI: Query account-wide delivery logs
  WebhookAPI-->>webhooksLogsCommand: Return deliveries and pagination state
  webhooksLogsCommand->>CLIOutput: Render results and next-page hints
Loading

Suggested reviewers: achris7, shivamfloe

Poem

I hop through events in a catalog bright,
Wildcards bloom in the moonlit night.
Logs line up with cursors in tow,
Agent wallets help the filters flow.
Zero counts vanish—what a sight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main webhook changes, including events and logs subcommands, agent scope, and expanded events.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/webhooks-events-logs

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/commands/webhooks.ts`:
- Around line 648-658: Update the webhook CLI help text near the events
description to generate its event-name list from the existing ALLOWED_EVENTS
symbol instead of maintaining a hardcoded duplicate. Preserve the documented
wildcard syntax and formatting while ensuring future additions to ALLOWED_EVENTS
are reflected automatically.
- Line 537: Validate flags.status in the webhook command before constructing or
sending the API request, accepting only retrying, success, and failed. Throw
UsageError for any other value, and add a regression test verifying invalid
status input makes no API request.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3b6950d6-c2b3-46ff-8a89-651573c00768

📥 Commits

Reviewing files that changed from the base of the PR and between ad3a5b0 and b75d008.

📒 Files selected for processing (3)
  • package.json
  • src/commands/webhooks.ts
  • test/webhooks.test.ts

Comment thread src/commands/webhooks.ts Outdated
Comment thread src/commands/webhooks.ts Outdated
- validate --status before any network call (pending/retrying/success/failed)
- derive the webhooks help event list from ALLOWED_EVENTS to prevent drift
@shivamfloe
shivamfloe merged commit e77b5a5 into main Aug 11, 2026
4 checks passed
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