Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
244 commits
Select commit Hold shift + click to select a range
6188b98
break circular dependencies
pirate Oct 15, 2025
e05bf24
cleaner variable names
pirate Oct 15, 2025
9bc7b4b
consistent naming of event_children
pirate Oct 15, 2025
aa73613
add tests for independent usage
pirate Oct 15, 2025
582aefc
add support for middlewares to hook into event bus handler lifecycle
pirate Oct 16, 2025
b65ff22
Merge pull request #2 from pirate/middlewares
pirate Oct 16, 2025
27e8c51
Merge branch 'main' into circular-cleanup
pirate Oct 16, 2025
518ee27
better variable naming
pirate Oct 16, 2025
3963aa7
implement event history backend
pirate Oct 16, 2025
ad36a77
Merge pull request #3 from pirate/event-history-backend
pirate Oct 16, 2025
8cd3335
add monitor dash mini app
pirate Oct 17, 2025
5747fcb
improve monitor ui dash
pirate Oct 17, 2025
615c34e
better middleware API and documentation
pirate Oct 18, 2025
719e934
add query method and debounce helpers
pirate Oct 18, 2025
89b6df8
rename folder to ui
pirate Oct 18, 2025
5a094dc
improve perf tests
pirate Oct 18, 2025
165169e
add event_history mirroring test
pirate Oct 18, 2025
be314d6
ignore sqlite temp files
pirate Oct 18, 2025
c925e17
add stricter type checking for tests
pirate Oct 18, 2025
d195dd6
proper type inference tests
pirate Oct 18, 2025
b4e4a34
bump version
pirate Oct 18, 2025
5e7bd12
Add EventEmitter2 link to inspiration section
pirate Nov 26, 2025
73a60f6
Revise README description for bubus library
pirate Nov 28, 2025
854773d
Merge pull request #4 from pirate/patch-1
pirate Nov 28, 2025
79e4063
Update README.md
pirate Dec 8, 2025
b5fac1c
Update README.md
pirate Dec 8, 2025
67f5b1e
remove old js lockfile
pirate Dec 8, 2025
807c3a6
fix queue-jumping behavior to be more intuitive to actually jump inst…
pirate Dec 8, 2025
7c21c3b
bump version
pirate Dec 8, 2025
2db5914
propagate dispatch-time user-provided ContextVars to handler execution
pirate Dec 8, 2025
0c5c1df
clear ContextVars after handler execution to lower memory use
pirate Dec 8, 2025
5899a3d
bump version
pirate Dec 8, 2025
1ca9709
document the new ContextVar propagation feature
pirate Dec 8, 2025
1c6e6cf
add claude perms
pirate Dec 9, 2025
bf82b95
implement new .find method to replace expect and get_or_dispatch
pirate Dec 9, 2025
fb3f4bb
fix bus name conflict checking and determinism around gc
pirate Dec 9, 2025
aa61357
add EventStatus enum and cleanup middlewares APIs for clarity
pirate Dec 9, 2025
9d6b782
massivly simplify middleware interface
pirate Dec 9, 2025
f6abe6d
fix middlewares type
pirate Dec 9, 2025
4e291cf
bump version
pirate Dec 9, 2025
140fb7a
Revise event handling examples in README
pirate Dec 9, 2025
fb68fcb
add bubus-ts implementation
pirate Feb 5, 2026
5230ba0
use monotonic timestamps and fix bus proxy
pirate Feb 5, 2026
b5cda39
add ts readme
pirate Feb 5, 2026
b04db57
remove unused configs
pirate Feb 5, 2026
500ed8e
fix eslint
pirate Feb 5, 2026
6b0cf8c
Fix log tree behavior and child completion
pirate Feb 5, 2026
d891ff2
add asynclocalstorage
pirate Feb 5, 2026
40a248e
fix tests and improve naming consistency
pirate Feb 6, 2026
b678e79
more queue jumping fixes
pirate Feb 6, 2026
2e0a9d2
add debug logging
pirate Feb 6, 2026
413d0cf
wip
pirate Feb 6, 2026
2acac40
all tests passing
pirate Feb 6, 2026
82a346e
completed lock system refactor
pirate Feb 6, 2026
1be5da2
readme updates
pirate Feb 6, 2026
4d038a6
LockManager consolidation
pirate Feb 6, 2026
a1f51f1
tests passing
pirate Feb 7, 2026
328af87
code cleanup and better naming
pirate Feb 7, 2026
a21dd46
all working except slower performance
pirate Feb 7, 2026
2d51a39
add type inference for return values
pirate Feb 7, 2026
e79782b
update readme
pirate Feb 7, 2026
03a2449
fix perf regression
pirate Feb 7, 2026
f20916c
more cleanup and naming improvements
pirate Feb 8, 2026
daa7dab
make awaiting event wait for processing on all busses, raise Exceptio…
pirate Feb 8, 2026
4d9d88c
bump version
pirate Feb 8, 2026
9b6d4bf
Update README.md
pirate Feb 9, 2026
fd7e6b5
Revise README to emphasize multi-language support
pirate Feb 9, 2026
dc29a76
Update README for brevity and clarity
pirate Feb 9, 2026
4228337
Update README description for bubus
pirate Feb 9, 2026
fd52a82
Update README with implementation badges
pirate Feb 9, 2026
da51cfd
Clean up README.md by removing duplicates
pirate Feb 9, 2026
b190994
add bubus-ts publish flow
pirate Feb 9, 2026
46b59ab
add perf tests
pirate Feb 9, 2026
875e331
unverified python perf fixes
pirate Feb 9, 2026
45b5c6a
Add retry() decorator with semaphore support and re-entrancy protection
claude Feb 9, 2026
8be7423
Use shared async_context.ts polyfill for retry re-entrancy tracking
claude Feb 9, 2026
57884c1
Support string error names and RegExp patterns in retry_on_errors
claude Feb 9, 2026
f9b2ce6
Update README retry_on_errors docs for string/RegExp matchers
claude Feb 9, 2026
792b725
Add semaphore_scope option: 'global', 'class', 'instance'
claude Feb 9, 2026
b577a5f
Add TC39 @retry() decorator syntax tests and scope fallback tests
claude Feb 9, 2026
fa5d90c
rename _refs to _event_buses
pirate Feb 9, 2026
182e98d
Add full usage pattern tests and README docs for @retry decorator
claude Feb 9, 2026
7a82629
Add test for retry wrapping emit→done cycle in parallel with other ev…
claude Feb 9, 2026
df34d9d
Document @retry as handler-level concept; discourage emit-level retry…
claude Feb 9, 2026
0ab4696
Add .first() method on BaseEvent for racing event handlers
claude Feb 9, 2026
6c816b6
Replace _first_result with first_result getter on BaseEvent
claude Feb 9, 2026
e742d64
fix status icon tests
pirate Feb 9, 2026
701bd71
Replace _first_mode with event_handler_completion field for replay vi…
claude Feb 9, 2026
305b6f8
Merge pull request #5 from pirate/claude/add-retry-decorator-L3GT1
pirate Feb 9, 2026
a7c67e9
Update README.md
pirate Feb 9, 2026
74b3ba3
move handler locks to live on event
pirate Feb 10, 2026
114aaab
Update README.md
pirate Feb 10, 2026
27c7614
wip
pirate Feb 10, 2026
6cb8c66
label event busses by uuid instead of just name, clenaup dispatch met…
pirate Feb 10, 2026
c685c50
add cross-runtime performance measurement
pirate Feb 10, 2026
df2bd38
better perf tests
pirate Feb 10, 2026
8cc59ee
better gc handling in perf tests
pirate Feb 10, 2026
323140a
update perf section to include versions tested
pirate Feb 10, 2026
4fd3db2
lazily allocate EventResult.event_children and ._lock to save memory …
pirate Feb 10, 2026
3bee4b1
more perf optimizations
pirate Feb 10, 2026
e273f14
change output stats formatting
pirate Feb 10, 2026
02c8106
more perf measuring
pirate Feb 11, 2026
6b7db03
more accurate perf
pirate Feb 11, 2026
e9a8cab
readme improvements
pirate Feb 11, 2026
7f02d49
rewrite ts readme
pirate Feb 11, 2026
b682ed4
more readme cleanup
pirate Feb 11, 2026
32a3edf
bump version
pirate Feb 11, 2026
3df0e31
tweak readme install instructions
pirate Feb 11, 2026
82116d4
tweak runtimes
pirate Feb 11, 2026
53842be
add new examples
pirate Feb 11, 2026
94e586b
add shebangs
pirate Feb 11, 2026
6078a39
fix dispatch vs emit consistency
pirate Feb 11, 2026
d5c87cf
prettier
pirate Feb 11, 2026
f9b97de
Revise event method names in README
pirate Feb 11, 2026
b56fd1d
more bubus docs
pirate Feb 11, 2026
e82034a
fix .find to search dispatched only events, not completed and add docs
pirate Feb 11, 2026
67fbdba
Update README.md
pirate Feb 11, 2026
8360939
Update performance metrics in README.md
pirate Feb 11, 2026
946e7f3
better cross-language consistency, using bus label for id checks
pirate Feb 11, 2026
f501bf7
add bridges and full rountrip ipc support and event_version
pirate Feb 11, 2026
de29a39
fix readme
pirate Feb 11, 2026
df0d1f2
shorten
pirate Feb 11, 2026
c162c7c
max_history_drop settings, new bridge tests and fixes
pirate Feb 11, 2026
23a079e
readme and lint fixes
pirate Feb 11, 2026
994d28b
test fixes
pirate Feb 11, 2026
4e12469
perf and test fixes
pirate Feb 11, 2026
40d9823
perf and test fixes
pirate Feb 11, 2026
5fba3ac
make sure max_history_size 0 is supported to insta-drop completed events
pirate Feb 11, 2026
0a92356
bridge perf optimizations
pirate Feb 11, 2026
ddaa7b7
bridges always dispatch reset fresh events
pirate Feb 11, 2026
aea2a9a
nats fixes
pirate Feb 11, 2026
55afe3f
nats fixes
pirate Feb 11, 2026
23ea40f
bus fix
pirate Feb 11, 2026
a377696
fix sqlite racing
pirate Feb 11, 2026
9633e9d
fix ts test suite
pirate Feb 11, 2026
5a377cd
fix github actions
pirate Feb 11, 2026
25ea367
skip bridge tests in CI
pirate Feb 11, 2026
28f3044
fix ci
pirate Feb 11, 2026
d59fc59
lint fixes
pirate Feb 11, 2026
1242230
raise thresholds for ci
pirate Feb 11, 2026
15740e5
fix root-relative paths in artifacts
pirate Feb 11, 2026
ce82d45
add artifact hotlinks
pirate Feb 11, 2026
7617551
ci fixes
pirate Feb 11, 2026
07041a8
tweak ci naming
pirate Feb 11, 2026
7d94efd
more matrix fixes
pirate Feb 11, 2026
ad50ee8
tweak perf thresholds and coverage merging
pirate Feb 11, 2026
ae5539d
fix lint
pirate Feb 11, 2026
47a8f86
minor gap fixes
pirate Feb 11, 2026
365411f
Update README.md
pirate Feb 11, 2026
fae0860
rename event_key to event_pattern in ts
pirate Feb 11, 2026
70c3fe5
fix more inconsistencies between two languages
pirate Feb 12, 2026
face79b
fix more inconsistencies between two languages
pirate Feb 12, 2026
a22c9ff
eliminate event_result_type string id field and just use event_result…
pirate Feb 12, 2026
b1c2f69
stricter lifecycle setup for bridges to eliminate races
pirate Feb 12, 2026
aa1032d
simplify synthetic event middleware to avoid storing copies of event …
pirate Feb 12, 2026
2165e66
fix model validator typing
pirate Feb 12, 2026
d578077
fix typing
pirate Feb 12, 2026
81ef090
readme tweaks
pirate Feb 12, 2026
d5ed5f9
readme tweaks
pirate Feb 12, 2026
9574f15
copy event_handler_concurrency to BaseEvent in python
pirate Feb 12, 2026
dceb6bc
make jsonschema serialization consistent across both languages
pirate Feb 12, 2026
d290c59
use StrEnum for config values instead of str literal union
pirate Feb 13, 2026
bc24c22
implement separate lockmanager in python
pirate Feb 13, 2026
0d70a74
bump version to 2.0.0
pirate Feb 13, 2026
0bdf513
fix sqlite bridge race
pirate Feb 13, 2026
c14f66c
fix sqlite connection race
pirate Feb 13, 2026
104eb9f
move event_handler out into separate file
pirate Feb 13, 2026
1427b8b
make find support matching on any event field
pirate Feb 13, 2026
9ec1863
ruff format
pirate Feb 13, 2026
5da8b1d
add mintlify docs
pirate Feb 13, 2026
b36dbd8
add events_suck helpers
pirate Feb 13, 2026
bd2c6ec
fix docs
pirate Feb 13, 2026
a3c079f
Update theme and color palette in docs.json
pirate Feb 13, 2026
5cbf9be
merge docs more
pirate Feb 13, 2026
901ccb2
add perf note
pirate Feb 13, 2026
9646066
docs fixes
pirate Feb 13, 2026
f198665
more docs improvements
pirate Feb 13, 2026
8649a90
some renames
pirate Feb 13, 2026
6fa92db
more docs improvements
pirate Feb 13, 2026
23562ab
reorg features in docs
pirate Feb 13, 2026
efa436b
rename page
pirate Feb 13, 2026
5927b43
more docs details
pirate Feb 13, 2026
10ceaab
more docs details
pirate Feb 13, 2026
6fd082d
implement python examples
pirate Feb 13, 2026
f0253c9
more docs links
pirate Feb 13, 2026
4f3b05d
fix flakyness of tests.sh
pirate Feb 13, 2026
8ff5118
remove legacy slow_timeout field
pirate Feb 13, 2026
06159d1
fix bridge columns explosion
pirate Feb 13, 2026
be983ff
bridge column fixes, ui fixes, first_handler_id perf optimization
pirate Feb 13, 2026
9474f80
python performance fixes
pirate Feb 13, 2026
5982dba
Add footer, navbar links, and SEO to docs config
pirate Feb 13, 2026
5ecac52
fix readme links
pirate Feb 13, 2026
4273946
fix field nullability contract and allow EventBus.toJSON to roundtrip
pirate Feb 13, 2026
e9a3c4f
readme fixes
pirate Feb 13, 2026
699b23f
fix path examples and test for null
pirate Feb 13, 2026
6309721
improve serialization docs
pirate Feb 13, 2026
4cc6e8b
more serialization docs
pirate Feb 13, 2026
08b41df
enforce timeouts for rountrip tests
pirate Feb 13, 2026
9f7aec7
fix 20k python deadlock
pirate Feb 14, 2026
400fe90
bump versions
pirate Feb 14, 2026
00f7eb9
add mds
pirate Feb 14, 2026
8215ab7
add middlewares to ts and context managers
pirate Feb 14, 2026
474964e
more consistent naming of lock vs semaphore
pirate Feb 16, 2026
289ed8d
cleanup closures in ts
pirate Feb 16, 2026
3611ea9
renaming cleanup
pirate Feb 16, 2026
59d61e5
more cross-language consistency
pirate Feb 16, 2026
3633736
tons of naming and test improvements
pirate Feb 16, 2026
1046466
microtask fixes
pirate Feb 16, 2026
8edae83
lint
pirate Feb 16, 2026
eddcfb1
fix tests
pirate Feb 16, 2026
e0493fe
smaller fixes
pirate Feb 16, 2026
e15e5a2
typing fixes for ts fields
pirate Feb 16, 2026
b5cf82e
Update README.md
pirate Feb 16, 2026
2467b58
fix retry
pirate Feb 16, 2026
672da18
noramlkze
pirate Feb 16, 2026
5ee4632
run js perf too
pirate Feb 16, 2026
78168a3
make event.event_bus consistent in both languages
pirate Feb 16, 2026
bfde9e8
simplify event result aggregation and remove helpers, update examples…
pirate Feb 16, 2026
9cfbb34
improve ts imports experience
pirate Feb 16, 2026
3ccd62d
remove unneeded tests
pirate Feb 16, 2026
36f1a0f
update docs
pirate Feb 16, 2026
5a611bf
fix perf regression
pirate Feb 16, 2026
50a9bfa
stricter perf
pirate Feb 16, 2026
0e1332d
fix perf ci jobs
pirate Feb 16, 2026
15f42fd
more naming consistency fixes
pirate Feb 16, 2026
fde2410
test fixes
pirate Feb 17, 2026
e38d022
fix type errors in tests
pirate Feb 17, 2026
f6e03f9
fix events suck
pirate Feb 17, 2026
7ec68f8
fix pre-commit hooks and ruff version pinning
pirate Feb 17, 2026
11bf230
switch from pre-commit to prek
pirate Feb 17, 2026
3ee53da
fix pre-commit hooks
pirate Feb 17, 2026
98fb213
Update tests/test_typing_contracts.py
pirate Feb 17, 2026
e3ad9b0
fix perf regression and add missing tests
pirate Feb 17, 2026
286f958
fix perf regression and add missing tests
pirate Feb 17, 2026
2fefaa4
fix lint
pirate Feb 17, 2026
49047da
fix handler typing strictness
pirate Feb 17, 2026
63dcdbb
Update bubus-ts/tests/performance.browser.spec.cjs
pirate Feb 17, 2026
ec75718
Update bubus-ts/tests/eventbus_serialization.test.ts
pirate Feb 17, 2026
0bf0ddc
fix cubic comments
pirate Feb 17, 2026
d3fb968
show perf stats
pirate Feb 17, 2026
77ddfbd
fix ForwardedFirstDefaultsEvent type
pirate Feb 17, 2026
091863d
run perf in parallel
pirate Feb 17, 2026
d016fb5
Merge pull request #6 from pirate/context-mgr
pirate Feb 17, 2026
10d07a8
remove _ts fields and make event result update consistent across langs
pirate Feb 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .claude/settings.local.json

This file was deleted.

29 changes: 0 additions & 29 deletions .cursor/launch.json

This file was deleted.

5 changes: 0 additions & 5 deletions .cursor/rules/bubus.mdc

This file was deleted.

12 changes: 0 additions & 12 deletions .cursor/settings.json

This file was deleted.

77 changes: 0 additions & 77 deletions .github/workflows/claude-code-review.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

Expand All @@ -15,8 +13,7 @@ jobs:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude'))
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: pre-commit-hooks

on:
push:
branches:
- main
- stable
- 'releases/**'
tags:
- '*'
pull_request:
workflow_dispatch:

jobs:
pre-commit-hooks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
activate-environment: true
- run: uv sync --dev --all-extras

- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: bubus-ts/pnpm-lock.yaml
- run: pnpm --dir bubus-ts install --frozen-lockfile

- uses: j178/prek-action@v1
- run: prek run --all-files
81 changes: 81 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: publish-npm

on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: npm dist-tag to publish under
required: false
default: latest

permissions:
contents: read
id-token: write

jobs:
publish_to_npm:
runs-on: ubuntu-latest
defaults:
run:
working-directory: bubus-ts
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: bubus-ts/pnpm-lock.yaml
registry-url: https://registry.npmjs.org

- name: Install bridge service binaries
run: |
sudo apt-get update
sudo apt-get install -y redis-server nats-server postgresql sqlite3

PG_INITDB_PATH="$(find /usr/lib/postgresql -type f -name initdb | head -n 1)"
PG_BINDIR="$(dirname "${PG_INITDB_PATH}")"
if [[ -z "${PG_BINDIR}" || ! -x "${PG_BINDIR}/initdb" || ! -x "${PG_BINDIR}/postgres" ]]; then
echo "Failed to locate PostgreSQL binaries (initdb/postgres)" > /dev/stderr
exit 1
fi
echo "${PG_BINDIR}" >> "${GITHUB_PATH}"
export PATH="${PG_BINDIR}:${PATH}"

redis-server --version
nats-server --version
initdb --version
postgres --version
sqlite3 --version

- run: pnpm install --frozen-lockfile
- name: Verify bridge optional Node deps
run: |
node - <<'NODE'
const required = ['ioredis', 'nats', 'pg']
for (const pkg of required) {
require.resolve(pkg)
}
console.log('optional bridge deps resolve OK')
NODE
- run: pnpm run typecheck
- run: pnpm test
- run: pnpm run build

- name: Publish release tag
if: github.event_name == 'release'
run: pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish manual tag
if: github.event_name == 'workflow_dispatch'
run: pnpm publish --access public --tag "${{ inputs.tag }}" --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,35 @@ jobs:
with:
enable-cache: true
activate-environment: true
- name: Install bridge service binaries
run: |
sudo apt-get update
sudo apt-get install -y redis-server nats-server postgresql sqlite3

PG_INITDB_PATH="$(find /usr/lib/postgresql -type f -name initdb | head -n 1)"
PG_BINDIR="$(dirname "${PG_INITDB_PATH}")"
if [[ -z "${PG_BINDIR}" || ! -x "${PG_BINDIR}/initdb" || ! -x "${PG_BINDIR}/postgres" ]]; then
echo "Failed to locate PostgreSQL binaries (initdb/postgres)" > /dev/stderr
exit 1
fi
echo "${PG_BINDIR}" >> "${GITHUB_PATH}"
export PATH="${PG_BINDIR}:${PATH}"

redis-server --version
nats-server --version
initdb --version
postgres --version
sqlite3 --version
- run: uv sync
- name: Verify bridge optional Python deps
run: |
uv run python - <<'PY'
import importlib
modules = ['asyncpg', 'redis', 'nats']
for module in modules:
importlib.import_module(module)
print('optional bridge deps import OK')
PY
- run: uv run ruff check --no-fix --select PLE # quick check for syntax errors to avoid waiting time doing the rest of the build
- run: uv build
- run: uv run pytest tests # dont push the package to PyPI if the tests fail
Expand Down
Loading