Skip to main content

Codemod that vendors HKUDS/nanobot channels into exoclaw-channel-* packages

Project description

exoclaw-channel-codemod

The codemod that vendors HKUDS/nanobot channels into exoclaw — used as a build-time and test-time dependency by every exoclaw-channel-{slack,telegram,discord,email,matrix,whatsapp} package.

What it does

Given a HKUDS/nanobot channel source file (vendor/upstream.py) and optional ports (vendor/upstream_test.py) snapshotted at a pinned commit (vendor/SHA), plus optional channel-specific patches (patches/00NN-*.patch), it produces:

  • exoclaw_channel_<name>/channel.py — the channel module ready to ship
  • tests/test_channel.py — the upstream test suite re-targeted at the local module

Transforms are mechanical (import rewrites, signature tweaks, bus capture, monkeypatch string-target rewrites). Patches are applied after the codemod for channel-specific tweaks that can't be generalized.

Public API

from exoclaw_channel_codemod import regenerate

regenerate(pkg_dir)  # one package

Pure-Python and idempotent (only writes when content changed).

Maintainer scripts

  • sync.sh <name> [--apply] — fetch latest upstream, diff, optionally regenerate
  • scaffold-channel.sh <name> — bootstrap a new channel package by snapshotting upstream

Why this is its own package

  • Build isolation: hatchling builds each exoclaw-channel-* wheel in an isolated env. The hatch hook in those packages declares exoclaw-channel-codemod as a build dependency so it's importable inside the sandbox.
  • Audit boundary: the codemod is the trusted transform. Versioning it as a real package makes "what was used to derive this generated file" explicit.

Audit boundary

Vendored channel packages commit only vendor/upstream*.py + vendor/SHA + patches/. The generated channel.py and test_channel.py are gitignored — they're derivatives. Anyone reviewing a channel package can verify "this wheel = upstream@SHA + this codemod version + listed patches" by checking out the source and running the test suite (which materializes the codemod output via conftest.py).

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

exoclaw_channel_codemod-0.1.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

exoclaw_channel_codemod-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file exoclaw_channel_codemod-0.1.0.tar.gz.

File metadata

  • Download URL: exoclaw_channel_codemod-0.1.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for exoclaw_channel_codemod-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c782347d7fd5a6984bde41e1eb18c3318e4451c1c69408b68c1a1898a15cc3b9
MD5 5a2d742fad3b4eba7873d46fd6d4448b
BLAKE2b-256 28f32ea8859eb35a3f3777c6150181f9b239def988efaf5763b1ed68b79e1ca3

See more details on using hashes here.

File details

Details for the file exoclaw_channel_codemod-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: exoclaw_channel_codemod-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for exoclaw_channel_codemod-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74a1796f897677aa8fb720af0d6ef2965f4dec8807526315967ce0dd4309bbde
MD5 2a86af532ed2b31762e59582e753de1d
BLAKE2b-256 6b510e133693d94ea339a528cd8421cb39a672d6fe3cabea3210e3613ea6c20a

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