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.
Release files for exoclaw-nanobot-compat 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| exoclaw_nanobot_compat-0.1.0.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| exoclaw_nanobot_compat-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.2 kB
Release files / exoclaw_nanobot_compat-0.1.0.tar.gz
| Download URL | exoclaw_nanobot_compat-0.1.0.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d370f55443fd080f3f0a5cfcf0cca375b52218849b03fb8da8be731396082b5f
|
|
BLAKE2b-256 checksum How to use checksums |
822b024eff140ba559b6485273589218769b48cb5b11b02b67aa5dde35cf3e75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / exoclaw_nanobot_compat-0.1.0-py3-none-any.whl
| Download URL | exoclaw_nanobot_compat-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce1cc84d494312fd2a2b5dd2b624ebe628413fa18d96c8330792ff91ff5c6f2a
|
|
BLAKE2b-256 checksum How to use checksums |
4f6ea49717715283d296beabaf68b89e3c20d68400b605b9a164c8bd57c55acd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|