Skip to main content

Thumper's semantic harness — a structured, event-emitting layer over the Bun runtime (NDJSON events, native-runner promotion)

Project description

thump (Thumper Bun harness)

Semantic harness for Bun — a clean, observable, agent-native layer over the Bun JavaScript runtime.

Part of the Thumper project (thump binary). The Rust side now provides the preferred native execution path.

This Python package provides a structured, event-driven interface for running Bun commands (bun run, bun add, bun install, bun remove, etc.) while emitting a stable NDJSON event stream.

It is designed to be used from:

  • Command line
  • TUI / IDE integrations
  • AI agents (via ACP / stdio)

Features

  • Stable event envelope — every operation emits structured events (*.started, process.stdout, process.exited, etc.) with op_id / session_id correlation.
  • Raw output preservation — stdout/stderr from Bun is never lost.
  • Operation abstraction — clean success/error paths with normalized error model.
  • Live process streaming — subprocess execution with real-time event emission.
  • First-class commands:
    • script run
    • package add / install / remove
  • Works great from Rust, Python, or directly on the CLI.

Installation (development)

git clone https://github.com/New1Direction/thumper.git
cd thumper/thump   # or pip install -e . from the thump/ directory
pip install -e .

Or run directly:

python -m thump --help

Usage

From Python

from thump import script_run, package_add

result = script_run("dev", cwd="my-project")
result = package_add(["hono", "zod"], cwd="my-project", dev=True)

From CLI

python -m thump script run dev
python -m thump package add hono --dev
python -m thump package install

Streaming events

All commands emit NDJSON to stdout. Each line is either:

  • A structured event (with event, op_id, data, etc.)
  • A final result object ({"ok": true, "operation": "..."})

This makes it trivial to consume from Rust, Go, another Python process, or an agent.

Architecture

Bun CLI
   ↓
thump (Python semantic layer)
   ↓
Stable NDJSON event stream + final results
   ↓
Consumers: CLI • TUI Jobs • ACP agents • Rust adapter

Related Projects

  • thumper — The Rust TUI/CLI (Thumper) — primary binary with native Bun execution.

Status

This is the Python-first implementation (Phase 1) as described in the design document.
A native Rust implementation of the same protocol is planned for later.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thump-0.2.0.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thump-0.2.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file thump-0.2.0.tar.gz.

File metadata

  • Download URL: thump-0.2.0.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for thump-0.2.0.tar.gz
Algorithm Hash digest
SHA256 63d91fb0fad7df10bb79f5a614cece103113abd4909a9e6fdcdc7f06ad77d05c
MD5 9b7ea640ac1110a008fd4a779fb2d92c
BLAKE2b-256 13804e82921d2aa56e21e73f1d8bcc4f2c5cdc71c5fe4f70a669be53020f6a99

See more details on using hashes here.

File details

Details for the file thump-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: thump-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for thump-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3ece309c6edc60568877ea001c6502a5e74ab8e0c8f5717c88ea73c32662bef
MD5 4bba1ede258ca1bebcdb5f5b0118398e
BLAKE2b-256 2f8fd9d7a1496d3dfcbd2bbffbe38be0f683351f48dff6837af0dc3d650336bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page