Skip to content

Add event bus and webhook delivery#387

Merged
xlabtg merged 7 commits intoxlabtg:mainfrom
konard:issue-386-bbb7e9c7c2db
Apr 24, 2026
Merged

Add event bus and webhook delivery#387
xlabtg merged 7 commits intoxlabtg:mainfrom
konard:issue-386-bbb7e9c7c2db

Conversation

@konard
Copy link
Copy Markdown

@konard konard commented Apr 24, 2026

Summary

Fixes #386.

  • Adds an in-process typed event bus with SQLite event log, async subscribers, replay, filtering, retention, and SSE streaming.
  • Instruments runtime, lifecycle, config, scheduler, and anomaly flows with system events.
  • Adds outgoing webhook registration, HMAC-SHA256 signing, retry/backoff, failed-delivery review/retry storage, SSRF-safe URL validation, and AES-256-GCM encrypted webhook secrets.
  • Adds incoming webhook receiver with signature verification and payload-to-event mapping.
  • Adds /api/events, /api/webhooks, /v1/events, and /v1/webhooks routes plus an Events WebUI page for event log, stream, replay, webhook management, and delivery retry.

UI

Events UI

Verification

  • npm run build:sdk before fresh-install checks so @teleton-agent/sdk resolves locally
  • npm run typecheck
  • npm run lint
  • npm test -- --run (187 files, 3376 tests)
  • npm run build
  • Playwright render check for the Events UI with mocked API data

Merge Update

  • Merged latest upstream/main into issue-386-bbb7e9c7c2db at 94b9cd5.
  • Resolved the conflict by accepting upstream deletion of obsolete generated .gitkeep.

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: xlabtg#386
konard added 2 commits April 24, 2026 04:03
# Conflicts:
#	.gitkeep
#	src/api/server.ts
#	src/cli/commands/onboard.ts
#	src/config/schema.ts
@konard konard changed the title [WIP] v2-16-webhooks-event-bus Add event bus and webhook delivery Apr 24, 2026
@konard konard marked this pull request as ready for review April 24, 2026 04:11
@konard
Copy link
Copy Markdown
Author

konard commented Apr 24, 2026

Solution summary

Implemented and pushed PR 387: #387

What changed:

  • Added typed async event bus with SQLite event log, replay, retention, filtering, and SSE stream.
  • Added webhook registration, signed delivery, retries/backoff, failed delivery retry, incoming webhook verification, and encrypted webhook secret storage.
  • Instrumented runtime/lifecycle/config/scheduler/anomaly flows with events.
  • Added /api and /v1 event/webhook routes plus the Events UI page and screenshot in the PR body.
  • Merged current upstream/main, resolved conflicts, and cleared GitHub’s merge conflict state.

Verification:

  • Local: npm run typecheck, npm run lint, npm test -- --run (181 files, 3348 tests), npm run build
  • CI: latest PR runs for head 336572a are green.
  • PR is ready for review, mergeable, and mergeStateStatus is CLEAN.

This summary was automatically extracted from the AI working session output.

@konard
Copy link
Copy Markdown
Author

konard commented Apr 24, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $29.027924

📊 Context and tokens usage:

  • 46.6M / 1.1M (4435%) input tokens, 85.0K / 130K (65%) output tokens

Total: (709.4K + 45.9M cached) input tokens, 85.0K output tokens, $29.027924 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Repository (2 chunks) (132378KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Author

konard commented Apr 24, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard konard marked this pull request as draft April 24, 2026 04:38
@konard
Copy link
Copy Markdown
Author

konard commented Apr 24, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-04-24T04:38:50.963Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

@konard konard marked this pull request as ready for review April 24, 2026 04:44
@konard
Copy link
Copy Markdown
Author

konard commented Apr 24, 2026

Solution summary

PR 387 is updated and ready: #387

What I did:

  • Merged latest upstream/main into issue-386-bbb7e9c7c2db.
  • Resolved the conflict by accepting upstream’s deletion of the obsolete generated .gitkeep.
  • Committed and pushed merge commit 94b9cd5.
  • Updated the PR description with current verification and merge notes.
  • Marked the PR ready for review.

Verification:

  • Local npm run typecheck passed.
  • Local npm run lint passed.
  • Local npm test -- --run passed: 187 files, 3376 tests.
  • Local npm run build passed.
  • GitHub CI passed for head 94b9cd50ad04ac4ebf3047e3305a35380b7bb3ed.
  • PR status is CLEAN, MERGEABLE, and no longer draft.

This summary was automatically extracted from the AI working session output.

@konard
Copy link
Copy Markdown
Author

konard commented Apr 24, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $1.808544

📊 Context and tokens usage:

  • 2.2M / 1.1M (205%) input tokens, 7.7K / 130K (6%) output tokens

Total: (111.4K + 2.0M cached) input tokens, 7.7K output tokens, $1.808544 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Gist (8753KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@xlabtg xlabtg merged commit 428d044 into xlabtg:main Apr 24, 2026
18 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.

v2-16-webhooks-event-bus

2 participants