Compatibility shim for HKUDS/nanobot channels vendored under exoclaw via codemod
Project description
exoclaw-nanobot-compat
Compatibility shim that lets HKUDS/nanobot channels run under exoclaw via a codemod-based vendoring pipeline. Sister channels:
- exoclaw-channel-slack
- exoclaw-channel-telegram
- exoclaw-channel-discord
- exoclaw-channel-email
- exoclaw-channel-matrix
- exoclaw-channel-whatsapp
Each vendored channel imports its BaseChannel, bus types, and helpers from this package instead of from upstream nanobot.*. The codemod that produces the vendored channel files is the sibling exoclaw-channel-codemod package.
What this package re-exports
BaseChannel— drop-in replacement fornanobot.channels.base.BaseChannel. Conforms to exoclaw'sChannelProtocol (name,start(bus),stop(),send(msg)). Inherited by every vendored channel.InboundMessage,OutboundMessage,MessageBus— re-exports fromexoclaw.bus.{events,queue}. The codemod rewritesfrom nanobot.bus.events import …tofrom exoclaw_nanobot_compat import …, so vendored channels see exoclaw's bus types under the names they expect.Base— pydantic base mirroring nanobot's (alias_generator=to_camel,extra="ignore").split_message,safe_filename,validate_url_target,build_help_text,redirect_lib_logging— small standalone helpers ported fromnanobot.utils.*.get_data_dir(name=None),get_media_dir(name=None)— workspace path resolvers (see "Workspace layout" below).set_data_dir(path),set_media_dir(path)— programmatic overrides for hosts that don't use the default~/.exoclaw/{data,media}layout.
Workspace layout
Channels store load-bearing state (matrix E2E keys, slack topic state, email seen-uid tracking, whatsapp bridge token) and downloaded media. Exoclaw deliberately doesn't dictate workspace layout — that's a host concern. Resolution order, highest precedence first:
set_data_dir()/set_media_dir()programmatic overrideEXOCLAW_DATA_DIR/EXOCLAW_MEDIA_DIRenv vars- Default
~/.exoclaw/{data,media}
Hosts (Luna, picoclaw, anything else) configure once at startup, then channels remain ignorant of where their state lives.
Why this exists
Exoclaw's Channel Protocol is 32 lines (name, start, stop, send). HKUDS/nanobot's BaseChannel ABC is 200 LOC and bundles allow_from gating, transcription, login, default-config, streaming, etc. — all real functionality, but tightly coupled to nanobot's host shape.
The compat shim is the bridge: it provides a BaseChannel superset shaped like nanobot's so vendored channel files inherit unchanged, while routing _handle_message through exoclaw's bus and conforming to exoclaw's Channel Protocol on the outside.
That lets a channel-codemod vendor channel files from HKUDS upstream with mostly-mechanical transforms, ship them as exoclaw-channel-<name> packages, and absorb upstream bug fixes via re-running the codemod against newer commits.
Maintaining
This compat module is consumed by the codemod's import-rewrite step. When upstream HKUDS adds a new module the channels depend on, add a shim here and add the module name to COMPAT_MODULES in packages/exoclaw-channel-codemod/exoclaw_channel_codemod/codemod.py, then re-run packages/exoclaw-channel-codemod/sync.sh <channel> --apply for each affected channel.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file exoclaw_nanobot_compat-0.1.0.tar.gz.
File metadata
- Download URL: exoclaw_nanobot_compat-0.1.0.tar.gz
- Upload date:
- Size: 8.1 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d370f55443fd080f3f0a5cfcf0cca375b52218849b03fb8da8be731396082b5f
|
|
| MD5 |
983a91b163470add8a521223c7e5c202
|
|
| BLAKE2b-256 |
822b024eff140ba559b6485273589218769b48cb5b11b02b67aa5dde35cf3e75
|
File details
Details for the file exoclaw_nanobot_compat-0.1.0-py3-none-any.whl.
File metadata
- Download URL: exoclaw_nanobot_compat-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce1cc84d494312fd2a2b5dd2b624ebe628413fa18d96c8330792ff91ff5c6f2a
|
|
| MD5 |
be01a8429bb444a448fa9f0d158b3591
|
|
| BLAKE2b-256 |
4f6ea49717715283d296beabaf68b89e3c20d68400b605b9a164c8bd57c55acd
|