chore: rename project to clawdbot
This commit is contained in:
@@ -41,11 +41,11 @@ Add A2UI HTML/JS to the Gateway Canvas host (standalone HTTP server on
|
||||
`canvasHost.port`), e.g.:
|
||||
|
||||
```
|
||||
/__clawdis__/a2ui/ -> index.html
|
||||
/__clawdis__/a2ui/a2ui.bundle.js -> bundled A2UI runtime
|
||||
/__clawdbot__/a2ui/ -> index.html
|
||||
/__clawdbot__/a2ui/a2ui.bundle.js -> bundled A2UI runtime
|
||||
```
|
||||
|
||||
Serve Canvas files at `/__clawdis__/canvas/` and A2UI at `/__clawdis__/a2ui/`.
|
||||
Serve Canvas files at `/__clawdbot__/canvas/` and A2UI at `/__clawdbot__/a2ui/`.
|
||||
Use the shared Canvas host handler (`src/canvas-host/server.ts`) to serve these
|
||||
assets and inject the action bridge + live reload if desired.
|
||||
|
||||
@@ -57,11 +57,11 @@ so nodes don’t need to guess.
|
||||
|
||||
### Navigation path
|
||||
Before applying A2UI:
|
||||
- Navigate to `${canvasHostUrl}/__clawdis__/a2ui/`.
|
||||
- Navigate to `${canvasHostUrl}/__clawdbot__/a2ui/`.
|
||||
|
||||
### Remove bundled shells
|
||||
Remove all fallback logic that serves A2UI from local bundles:
|
||||
- macOS: remove custom-scheme fallback for `/__clawdis__/a2ui/`
|
||||
- macOS: remove custom-scheme fallback for `/__clawdbot__/a2ui/`
|
||||
- iOS/Android: remove packaged A2UI assets and "default scaffold" assumptions
|
||||
|
||||
### Error behavior
|
||||
@@ -76,14 +76,14 @@ If `canvasHostUrl` is missing or unreachable:
|
||||
## Implementation plan
|
||||
1) Gateway
|
||||
- Add A2UI assets under `src/canvas-host/`.
|
||||
- Serve them at `/__clawdis__/a2ui/` (align with existing naming).
|
||||
- Serve Canvas files at `/__clawdis__/canvas/` on `canvasHost.port`.
|
||||
- Serve them at `/__clawdbot__/a2ui/` (align with existing naming).
|
||||
- Serve Canvas files at `/__clawdbot__/canvas/` on `canvasHost.port`.
|
||||
- Expose `canvasHostUrl` in handshake + bridge hello payloads.
|
||||
2) Node runtimes
|
||||
- Update `canvas.a2ui.*` to navigate to `canvasHostUrl`.
|
||||
- Remove custom-scheme A2UI fallback and bundled assets.
|
||||
3) Tests
|
||||
- TS: verify `/__clawdis__/a2ui/` responds with HTML + JS.
|
||||
- TS: verify `/__clawdbot__/a2ui/` responds with HTML + JS.
|
||||
- Node: verify A2UI fails when host is unreachable and succeeds when reachable.
|
||||
4) Docs
|
||||
- Update `docs/mac/canvas.md`, `docs/ios/spec.md`, `docs/android/connect.md`
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
---
|
||||
summary: "Refactor: unify on the clawdis CLI + gateway-first control; retire clawdis-mac"
|
||||
summary: "Refactor: unify on the clawdbot CLI + gateway-first control; retire clawdbot-mac"
|
||||
read_when:
|
||||
- Removing or replacing the macOS CLI helper
|
||||
- Adding node capabilities or permissions metadata
|
||||
- Updating macOS app packaging/install flows
|
||||
---
|
||||
|
||||
# CLI unification (clawdis-only)
|
||||
# CLI unification (clawdbot-only)
|
||||
|
||||
Status: active refactor · Date: 2025-12-20
|
||||
|
||||
## Goals
|
||||
- **Single CLI**: use `clawdis` for all automation (local + remote). Retire `clawdis-mac`.
|
||||
- **Single CLI**: use `clawdbot` for all automation (local + remote). Retire `clawdbot-mac`.
|
||||
- **Gateway-first**: all agent actions flow through the Gateway WebSocket + node.invoke.
|
||||
- **Permission awareness**: nodes advertise permission state so the agent can decide what to run.
|
||||
- **No duplicate paths**: remove macOS control socket + Swift CLI surface.
|
||||
|
||||
## Non-goals
|
||||
- Keep legacy `clawdis-mac` compatibility.
|
||||
- Keep legacy `clawdbot-mac` compatibility.
|
||||
- Support agent control when no Gateway is running.
|
||||
|
||||
## Key decisions
|
||||
@@ -29,19 +29,19 @@ Status: active refactor · Date: 2025-12-20
|
||||
- Permissions are **advertised by the node** (e.g., screen recording granted/denied).
|
||||
- Commands will still fail with explicit errors when permissions are missing.
|
||||
|
||||
3) **Mac app installs/symlinks `clawdis`**
|
||||
- Bundle a standalone `clawdis` binary in the app (bun-compiled).
|
||||
- Install/symlink that binary to `/usr/local/bin/clawdis` and `/opt/homebrew/bin/clawdis`.
|
||||
- No `clawdis-mac` helper remains.
|
||||
3) **Mac app installs/symlinks `clawdbot`**
|
||||
- Bundle a standalone `clawdbot` binary in the app (bun-compiled).
|
||||
- Install/symlink that binary to `/usr/local/bin/clawdbot` and `/opt/homebrew/bin/clawdbot`.
|
||||
- No `clawdbot-mac` helper remains.
|
||||
|
||||
4) **Canvas parity across node types**
|
||||
- Use `node.invoke` commands consistently (`canvas.present|navigate|eval|snapshot|a2ui.*`).
|
||||
- The TS CLI provides convenient wrappers so agents never have to craft raw `node.invoke` calls.
|
||||
|
||||
## Command surface (new/normalized)
|
||||
- `clawdis nodes invoke --command canvas.*` remains valid.
|
||||
- `clawdbot nodes invoke --command canvas.*` remains valid.
|
||||
- New CLI wrappers for convenience:
|
||||
- `clawdis canvas present|navigate|eval|snapshot|a2ui push|a2ui reset`
|
||||
- `clawdbot canvas present|navigate|eval|snapshot|a2ui push|a2ui reset`
|
||||
- New node commands (mac-only initially):
|
||||
- `system.run` (shell execution)
|
||||
- `system.notify` (local notifications)
|
||||
@@ -54,11 +54,11 @@ Status: active refactor · Date: 2025-12-20
|
||||
|
||||
## Gateway mode + config
|
||||
- Gateways should only auto-start when explicitly configured for **local** mode.
|
||||
- When config is missing or explicitly remote, `clawdis gateway` should refuse to auto-start unless forced.
|
||||
- When config is missing or explicitly remote, `clawdbot gateway` should refuse to auto-start unless forced.
|
||||
|
||||
## Implementation checklist
|
||||
- Add bun-compiled `clawdis` binary to macOS app bundle; update codesign + install flows.
|
||||
- Remove `ClawdisCLI` target and control socket server.
|
||||
- Add bun-compiled `clawdbot` binary to macOS app bundle; update codesign + install flows.
|
||||
- Remove `ClawdbotCLI` target and control socket server.
|
||||
- Add node command(s) for `system.run` and `system.notify` on macOS.
|
||||
- Add permission map to node hello/pairing + gateway responses.
|
||||
- Update TS CLI + docs to use `clawdis` only.
|
||||
- Update TS CLI + docs to use `clawdbot` only.
|
||||
|
||||
@@ -12,12 +12,12 @@ Goal: replace legacy gateway/stdin/TCP control with a single WebSocket Gateway,
|
||||
---
|
||||
|
||||
## Phase 0 — Foundations
|
||||
- **Naming**: CLI subcommand `clawdis gateway`; internal namespace `Gateway`.
|
||||
- **Naming**: CLI subcommand `clawdbot gateway`; internal namespace `Gateway`.
|
||||
- **Protocol folder**: create `protocol/` for schemas and build artifacts. ✅ `src/gateway/protocol`.
|
||||
- **Schema tooling**:
|
||||
- Prefer **TypeBox** (or ArkType) as source-of-truth types. ✅ TypeBox in `schema.ts`.
|
||||
- `pnpm protocol:gen`: emits JSON Schema (`dist/protocol.schema.json`). ✅
|
||||
- `pnpm protocol:gen:swift`: generates Swift `Codable` models (`apps/macos/Sources/ClawdisProtocol/GatewayModels.swift`). ✅
|
||||
- `pnpm protocol:gen:swift`: generates Swift `Codable` models (`apps/macos/Sources/ClawdbotProtocol/GatewayModels.swift`). ✅
|
||||
- AJV compile step for server validators. ✅
|
||||
- **CI**: add a job that fails if schema or generated Swift is stale. ✅ `pnpm protocol:check` (runs gen + git diff).
|
||||
|
||||
@@ -32,7 +32,7 @@ Goal: replace legacy gateway/stdin/TCP control with a single WebSocket Gateway,
|
||||
- `close` (standard WS close codes; policy uses 1008 for slow consumer/unauthorized, 1012/1001 for restart)
|
||||
- Payload types:
|
||||
- `PresenceEntry {host, ip, version, platform?, deviceFamily?, modelIdentifier?, mode, lastInputSeconds?, ts, reason?, tags?[], instanceId?}`
|
||||
- `HealthSnapshot` (match existing `clawdis health --json` fields)
|
||||
- `HealthSnapshot` (match existing `clawdbot health --json` fields)
|
||||
- `AgentEvent` (streamed tool/output; `{runId, seq, stream, data, ts}`)
|
||||
- `TickEvent {ts}`
|
||||
- `ShutdownEvent {reason, restartExpectedMs?}`
|
||||
@@ -77,7 +77,7 @@ Goal: replace legacy gateway/stdin/TCP control with a single WebSocket Gateway,
|
||||
- Dedupe cache: bound TTL (~5m) and max size (~1000 entries); evict oldest first (LRU) to prevent memory growth.
|
||||
|
||||
## Phase 3 — Gateway CLI entrypoint
|
||||
- Add `clawdis gateway` command in CLI program:
|
||||
- Add `clawdbot gateway` command in CLI program:
|
||||
- Reads config (port, WS options).
|
||||
- Foreground process; exit non-zero on fatal errors.
|
||||
- Flags: `--port`, `--no-tick` (optional), `--log-json` (optional).
|
||||
@@ -124,7 +124,7 @@ Goal: replace legacy gateway/stdin/TCP control with a single WebSocket Gateway,
|
||||
- Include `policy` in `hello-ok` so clients know the tick interval and buffer limits to tune their expectations.
|
||||
|
||||
## Phase 8 — Cleanup and deprecation
|
||||
- Retire `clawdis rpc` as default path; keep only if explicitly requested (documented as legacy).
|
||||
- Retire `clawdbot rpc` as default path; keep only if explicitly requested (documented as legacy).
|
||||
- Remove reliance on `src/infra/control-channel.ts` for new clients; mark as legacy or delete after migration. ✅ file removed; mac app now uses Gateway WS.
|
||||
- Update README, docs (`architecture.md`, `gateway.md`, `webchat.md`) to final shapes; remove `control-api.md` references if obsolete.
|
||||
- Presence hygiene:
|
||||
@@ -152,7 +152,7 @@ Goal: replace legacy gateway/stdin/TCP control with a single WebSocket Gateway,
|
||||
|
||||
## Phase 10 — Rollout
|
||||
- Version bump; release notes: breaking change to control plane (WS only).
|
||||
- Ship launchd/systemd templates for `clawdis gateway`.
|
||||
- Ship launchd/systemd templates for `clawdbot gateway`.
|
||||
- Recommend Tailscale/SSH tunnel for remote access; no additional auth layer assumed in this model.
|
||||
|
||||
---
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
summary: "Refactor plan: Gateway TUI parity with pi-mono interactive UI"
|
||||
read_when:
|
||||
- Building or refactoring the Gateway TUI
|
||||
- Syncing TUI slash commands with Clawdis behavior
|
||||
- Syncing TUI slash commands with Clawdbot behavior
|
||||
---
|
||||
# Gateway TUI refactor plan
|
||||
|
||||
@@ -10,7 +10,7 @@ Updated: 2026-01-03
|
||||
|
||||
## Goals
|
||||
- Match pi-mono interactive TUI feel (editor, streaming, tool cards, selectors).
|
||||
- Keep Clawdis semantics: Gateway WS only, session store owns state, no branching/export.
|
||||
- Keep Clawdbot semantics: Gateway WS only, session store owns state, no branching/export.
|
||||
- Work locally or remotely via Gateway URL/token.
|
||||
|
||||
## Non-goals
|
||||
@@ -21,6 +21,6 @@ Updated: 2026-01-03
|
||||
- [x] Protocol + server: sessions.patch supports model overrides; agent events include tool results (text-only payloads).
|
||||
- [x] Gateway TUI client: add session/model helpers + stricter typing.
|
||||
- [x] TUI UI kit: theme + components (editor, message feed, tool cards, selectors).
|
||||
- [x] TUI controller: keybindings + Clawdis slash commands + history/stream wiring.
|
||||
- [x] TUI controller: keybindings + Clawdbot slash commands + history/stream wiring.
|
||||
- [x] Docs + changelog updated for the new TUI behavior.
|
||||
- [x] Gate: lint, build, tests, docs list.
|
||||
|
||||
@@ -6,18 +6,18 @@ read_when:
|
||||
# Web Gateway Troubleshooting (Nov 26, 2025)
|
||||
|
||||
## Symptoms & quick fixes
|
||||
- **Stream Errored / Conflict / status 409–515:** WhatsApp closed the socket because another session is active or creds went stale. Run `clawdis logout`, then `clawdis login`, then restart the Gateway.
|
||||
- **Logged out:** Console prints “session logged out”; re-link with `clawdis login`.
|
||||
- **Stream Errored / Conflict / status 409–515:** WhatsApp closed the socket because another session is active or creds went stale. Run `clawdbot logout`, then `clawdbot login`, then restart the Gateway.
|
||||
- **Logged out:** Console prints “session logged out”; re-link with `clawdbot login`.
|
||||
- **Repeated retries then exit:** Tune reconnect behavior via config `web.reconnect` and restart the Gateway.
|
||||
- **No inbound messages:** Ensure the QR-linked account is online in WhatsApp, and check logs for `web-heartbeat` to confirm auth age/connection.
|
||||
- **Status 515 right after pairing:** The QR login flow now auto-restarts once; you should not need a manual gateway restart after scanning.
|
||||
- **Fast nuke:** From an allowed WhatsApp sender you can send `/restart` to request a supervised restart (launchd/mac app setups); wait a few seconds for it to come back.
|
||||
|
||||
## Helpful commands
|
||||
- Start the Gateway: `clawdis gateway --verbose`
|
||||
- Logout (clear creds): `clawdis logout`
|
||||
- Relink (show QR): `clawdis login --verbose`
|
||||
- Tail logs (default): `tail -f /tmp/clawdis/clawdis-*.log`
|
||||
- Start the Gateway: `clawdbot gateway --verbose`
|
||||
- Logout (clear creds): `clawdbot logout`
|
||||
- Relink (show QR): `clawdbot login --verbose`
|
||||
- Tail logs (default): `tail -f /tmp/clawdbot/clawdbot-*.log`
|
||||
|
||||
## Reading the logs
|
||||
- `web-reconnect`: close reasons, retry/backoff, max-attempt exit.
|
||||
@@ -30,7 +30,7 @@ read_when:
|
||||
- Chatty monitors: increase `web.heartbeatSeconds` if log volume is high.
|
||||
|
||||
## If it keeps failing
|
||||
1) `clawdis logout` → `clawdis login` (fresh QR link).
|
||||
1) `clawdbot logout` → `clawdbot login` (fresh QR link).
|
||||
2) Ensure no other device/browser is using the same WA Web session.
|
||||
3) Check WhatsApp mobile app is online and not in low-power mode.
|
||||
4) If status is 515, let the client restart once after pairing (already handled automatically).
|
||||
|
||||
@@ -31,7 +31,7 @@ Context: web chat currently lives in a WKWebView that loads the pi-web bundle. S
|
||||
- Remove reliance on session file snapshots and `/rpc`.
|
||||
|
||||
## Persistence
|
||||
- Keep passing `--session <.../.clawdis/sessions/{{SessionId}}.jsonl>` to Pi so it continues writing JSONL. The WS history reader uses the same file; no new store introduced.
|
||||
- Keep passing `--session <.../.clawdbot/sessions/{{SessionId}}.jsonl>` to Pi so it continues writing JSONL. The WS history reader uses the same file; no new store introduced.
|
||||
|
||||
## Docs to update when shipping
|
||||
- `docs/webchat.md` (WS-only flow, methods/events, health gate, tunnel WS port).
|
||||
|
||||
Reference in New Issue
Block a user