Three coordinated things:
1. Resolve the committed upstream/main merge conflicts. 94 files were
sitting with raw <<<<<<< HEAD ... >>>>>>> upstream/main blocks. Every
conflict had HanzoBot/Bot on HEAD and OpenClaw on upstream. Resolved
by keeping HEAD everywhere — 540 conflict blocks.
2. Rewrite remaining OpenClaw text refs.
OPENCLAW → HANZO_BOT
OpenClaw → HanzoBot (PascalCase type identifiers)
openclaw → bot (codebase convention — botToken,
botUsername etc.; avoids invalid
hyphenated JS identifiers)
openclaw[_]/openclaw[A-Z] → bot[_]/bot[A-Z] (compound)
ai.openclaw.x → ai.hanzo.bot.x (JVM package path)
3. Delete or rename openclaw-named file paths (116 of them). Dead
duplicates with a Bot-named canonical from the partial migration:
deleted. Otherwise renamed.
ai/openclaw/** → deleted (ai/hanzo/bot/** canonical)
Sources/OpenClaw*/ → deleted (Sources/Bot* canonical)
Tests/OpenClawIPCTests/ → deleted (Tests/BotIPCTests canonical)
OpenClawKit/ → deleted (BotKit canonical)
openclaw-tools.*.ts → deleted (bot-tools.*.ts canonical)
openclaw-root.ts etc. → deleted (bot-root.ts canonical)
types.openclaw.ts → deleted (types.bot.ts canonical)
extensions/*/openclaw.plugin.json → renamed hanzo-bot.plugin.json
docs/start/openclaw.md → renamed hanzo-bot.md (+ zh-CN)
docs/assets/openclaw-*.png, whatsapp-openclaw*.jpg → deleted
scripts/.../openclaw-* → deleted (bot/hanzo-bot parallels)
openclaw.mjs → deleted (hanzo-bot.mjs is package.bin)
Then patched 65 broken JS/TS import strings where hanzo-bot had ended
up inside an import path ('./types.hanzo-bot.js' → './types.bot.js'
etc., since the on-disk filename uses the brand-neutral bot- prefix).
Pre-existing lint debt cleaned up to get oxlint --type-aware to 0/0:
removed the dead i18n test that referenced a path no longer existing;
defined the missing DIDConfig and WalletConfig types in types.base.ts
(they were imported but never declared); dropped unused imports;
collapsed redundant type assertion and a tautological meta.bot lookup
that the openclaw→bot rename made redundant.
The a2ui.bundle.js generated artifact is kept at its pre-rebrand
contents — it gets regenerated by 'pnpm canvas:a2ui:bundle' from
sources I cannot rebuild in this commit; the source side is clean.
Verified: 0 occurrences of openclaw (case-insensitive) in tree source
content, 0 file or directory paths with openclaw in the name; oxlint
--type-aware src test reports 0/0.
5.5 KiB
summary, read_when, title
| summary | read_when | title | ||
|---|---|---|---|---|
| Camera capture (iOS/Android nodes + macOS app) for agent use: photos (jpg) and short video clips (mp4) |
|
Camera Capture |
Camera capture (agent)
HanzoBot supports camera capture for agent workflows:
- iOS node (paired via Gateway): capture a photo (
jpg) or short video clip (mp4, with optional audio) vianode.invoke. - Android node (paired via Gateway): capture a photo (
jpg) or short video clip (mp4, with optional audio) vianode.invoke. - macOS app (node via Gateway): capture a photo (
jpg) or short video clip (mp4, with optional audio) vianode.invoke.
All camera access is gated behind user-controlled settings.
iOS node
User setting (default on)
- iOS Settings tab → Camera → Allow Camera (
camera.enabled)- Default: on (missing key is treated as enabled).
- When off:
camera.*commands returnCAMERA_DISABLED.
Commands (via Gateway node.invoke)
-
camera.list- Response payload:
devices: array of{ id, name, position, deviceType }
- Response payload:
-
camera.snap- Params:
facing:front|back(default:front)maxWidth: number (optional; default1600on the iOS node)quality:0..1(optional; default0.9)format: currentlyjpgdelayMs: number (optional; default0)deviceId: string (optional; fromcamera.list)
- Response payload:
format: "jpg"base64: "<...>"width,height
- Payload guard: photos are recompressed to keep the base64 payload under 5 MB.
- Params:
-
camera.clip- Params:
facing:front|back(default:front)durationMs: number (default3000, clamped to a max of60000)includeAudio: boolean (defaulttrue)format: currentlymp4deviceId: string (optional; fromcamera.list)
- Response payload:
format: "mp4"base64: "<...>"durationMshasAudio
- Params:
Foreground requirement
Like canvas.*, the iOS node only allows camera.* commands in the foreground. Background invocations return NODE_BACKGROUND_UNAVAILABLE.
CLI helper (temp files + MEDIA)
The easiest way to get attachments is via the CLI helper, which writes decoded media to a temp file and prints MEDIA:<path>.
Examples:
hanzo-bot nodes camera snap --node <id> # default: both front + back (2 MEDIA lines)
hanzo-bot nodes camera snap --node <id> --facing front
hanzo-bot nodes camera clip --node <id> --duration 3000
hanzo-bot nodes camera clip --node <id> --no-audio
Notes:
nodes camera snapdefaults to both facings to give the agent both views.- Output files are temporary (in the OS temp directory) unless you build your own wrapper.
Android node
Android user setting (default on)
- Android Settings sheet → Camera → Allow Camera (
camera.enabled)- Default: on (missing key is treated as enabled).
- When off:
camera.*commands returnCAMERA_DISABLED.
Permissions
- Android requires runtime permissions:
CAMERAfor bothcamera.snapandcamera.clip.RECORD_AUDIOforcamera.clipwhenincludeAudio=true.
If permissions are missing, the app will prompt when possible; if denied, camera.* requests fail with a
*_PERMISSION_REQUIRED error.
Android foreground requirement
Like canvas.*, the Android node only allows camera.* commands in the foreground. Background invocations return NODE_BACKGROUND_UNAVAILABLE.
Android commands (via Gateway node.invoke)
camera.list- Response payload:
devices: array of{ id, name, position, deviceType }
- Response payload:
Payload guard
Photos are recompressed to keep the base64 payload under 5 MB.
macOS app
User setting (default off)
The macOS companion app exposes a checkbox:
- Settings → General → Allow Camera (
hanzo-bot.cameraEnabled)- Default: off
- When off: camera requests return “Camera disabled by user”.
CLI helper (node invoke)
Use the main hanzo-bot CLI to invoke camera commands on the macOS node.
Examples:
hanzo-bot nodes camera list --node <id> # list camera ids
hanzo-bot nodes camera snap --node <id> # prints MEDIA:<path>
hanzo-bot nodes camera snap --node <id> --max-width 1280
hanzo-bot nodes camera snap --node <id> --delay-ms 2000
hanzo-bot nodes camera snap --node <id> --device-id <id>
hanzo-bot nodes camera clip --node <id> --duration 10s # prints MEDIA:<path>
hanzo-bot nodes camera clip --node <id> --duration-ms 3000 # prints MEDIA:<path> (legacy flag)
hanzo-bot nodes camera clip --node <id> --device-id <id>
hanzo-bot nodes camera clip --node <id> --no-audio
Notes:
hanzo-bot nodes camera snapdefaults tomaxWidth=1600unless overridden.- On macOS,
camera.snapwaitsdelayMs(default 2000ms) after warm-up/exposure settle before capturing. - Photo payloads are recompressed to keep base64 under 5 MB.
Safety + practical limits
- Camera and microphone access trigger the usual OS permission prompts (and require usage strings in Info.plist).
- Video clips are capped (currently
<= 60s) to avoid oversized node payloads (base64 overhead + message limits).
macOS screen video (OS-level)
For screen video (not camera), use the macOS companion:
hanzo-bot nodes screen record --node <id> --duration 10s --fps 15 # prints MEDIA:<path>
Notes:
- Requires macOS Screen Recording permission (TCC).