Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
383bdcd778 | ||
|
|
18cb665b66 | ||
|
|
22060137e0 |
No files matched your search
+2
-38
@@ -2,16 +2,11 @@
|
|||||||
|
|
||||||
Docs: https://docs.clawd.bot
|
Docs: https://docs.clawd.bot
|
||||||
|
|
||||||
## 2026.1.20
|
## 2026.1.20-1
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
- Deps: update workspace + memory-lancedb dependencies.
|
- Deps: update workspace + memory-lancedb dependencies.
|
||||||
- Dev: use tsgo for dev/watch builds by default; set `CLAWDBOT_TS_COMPILER=tsc` to opt out.
|
|
||||||
- Repo: remove the Peekaboo git submodule now that the SPM release is used.
|
- Repo: remove the Peekaboo git submodule now that the SPM release is used.
|
||||||
- Update: sync plugin sources on channel switches and update npm-installed plugins during `clawdbot update`.
|
|
||||||
- Plugins: share npm plugin update logic between `clawdbot update` and `clawdbot plugins update`.
|
|
||||||
- Browser: allow config defaults for efficient snapshots in the tool/CLI. (#1336) — thanks @sebslight.
|
|
||||||
- Channels: add the Nostr plugin channel with profile management + onboarding install defaults. (#1323) — thanks @joelklabo.
|
|
||||||
- Plugins: require manifest-embedded config schemas, validate configs without loading plugin code, and surface plugin config warnings. (#1272) — thanks @thewilloftheshadow.
|
- Plugins: require manifest-embedded config schemas, validate configs without loading plugin code, and surface plugin config warnings. (#1272) — thanks @thewilloftheshadow.
|
||||||
- Plugins: move channel catalog metadata into plugin manifests; align Nextcloud Talk policy helpers with core patterns. (#1290) — thanks @NicholaiVogel.
|
- Plugins: move channel catalog metadata into plugin manifests; align Nextcloud Talk policy helpers with core patterns. (#1290) — thanks @NicholaiVogel.
|
||||||
- Discord: fall back to /skill when native command limits are exceeded; expose /skill globally. (#1287) — thanks @thewilloftheshadow.
|
- Discord: fall back to /skill when native command limits are exceeded; expose /skill globally. (#1287) — thanks @thewilloftheshadow.
|
||||||
@@ -19,44 +14,15 @@ Docs: https://docs.clawd.bot
|
|||||||
- Matrix: migrate to matrix-bot-sdk with E2EE support, location handling, and group allowlist upgrades. (#1298) — thanks @sibbl.
|
- Matrix: migrate to matrix-bot-sdk with E2EE support, location handling, and group allowlist upgrades. (#1298) — thanks @sibbl.
|
||||||
- Plugins/UI: let channel plugin metadata drive UI labels/icons and cron channel options. (#1306) — thanks @steipete.
|
- Plugins/UI: let channel plugin metadata drive UI labels/icons and cron channel options. (#1306) — thanks @steipete.
|
||||||
- Zalouser: add channel dock metadata, config schema, setup wiring, probe, and status issues. (#1219) — thanks @suminhthanh.
|
- Zalouser: add channel dock metadata, config schema, setup wiring, probe, and status issues. (#1219) — thanks @suminhthanh.
|
||||||
- Security: warn when <=300B models run without sandboxing and with web tools enabled.
|
|
||||||
- Skills: add download installs with OS-filtered install options; add local sherpa-onnx-tts skill.
|
|
||||||
- Docs: clarify WhatsApp voice notes and Windows WSL portproxy LAN access notes.
|
|
||||||
- UI: add copy-as-markdown with error feedback and drop legacy list view. (#1345) — thanks @bradleypriest.
|
|
||||||
- TUI: add input history (up/down) for submitted messages. (#1348) — thanks @vignesh07.
|
|
||||||
### Fixes
|
### Fixes
|
||||||
- Discovery: shorten Bonjour DNS-SD service type to `_clawdbot-gw._tcp` and update discovery clients/docs.
|
|
||||||
- Agents: preserve subagent announce thread/topic routing + queued replies across channels. (#1241) — thanks @gnarco.
|
|
||||||
- Agents: avoid treating timeout errors with "aborted" messages as user aborts, so model fallback still runs.
|
|
||||||
- Diagnostics: export OTLP logs, correct queue depth tracking, and document message-flow telemetry.
|
|
||||||
- Diagnostics: emit message-flow diagnostics across channels via shared dispatch; gate heartbeat/webhook logging. (#1244) — thanks @oscargavin.
|
|
||||||
- CLI: preserve cron delivery settings when editing message payloads. (#1322) — thanks @KrauseFx.
|
|
||||||
- CLI: keep `clawdbot logs` output resilient to broken pipes while preserving progress output.
|
|
||||||
- Nodes: enforce node.invoke timeouts for node handlers. (#1357) — thanks @vignesh07.
|
|
||||||
- Model catalog: avoid caching import failures, log transient discovery errors, and keep partial results. (#1332) — thanks @dougvk.
|
|
||||||
- Doctor: clarify plugin auto-enable hint text in the startup banner.
|
|
||||||
- Gateway: clarify unauthorized handshake responses with token/password mismatch guidance.
|
|
||||||
- Gateway: clarify connect/validation errors for gateway params. (#1347) — thanks @vignesh07.
|
|
||||||
- Gateway: preserve restart wake routing + thread replies across restarts. (#1337) — thanks @John-Rood.
|
|
||||||
- Gateway: reschedule per-agent heartbeats on config hot reload without restarting the runner.
|
|
||||||
- Config: log invalid config issues once per run and keep invalid-config errors stackless.
|
|
||||||
- Exec: default gateway/node exec security to allowlist when unset (sandbox stays deny).
|
|
||||||
- UI: keep config form enums typed, preserve empty strings, protect sensitive defaults, and deepen config search. (#1315) — thanks @MaudeBot.
|
|
||||||
- UI: preserve ordered list numbering in chat markdown. (#1341) — thanks @bradleypriest.
|
|
||||||
- UI: allow Control UI to read gatewayUrl from URL params for remote WebSocket targets. (#1342) — thanks @ameno-.
|
|
||||||
- Web search: infer Perplexity base URL from API key source (direct vs OpenRouter).
|
- Web search: infer Perplexity base URL from API key source (direct vs OpenRouter).
|
||||||
- Web fetch: harden SSRF protection with shared hostname checks and redirect limits. (#1346) — thanks @fogboots.
|
- Session: preserve command argument casing while matching reset triggers. (#1308) — thanks @dougvk.
|
||||||
- TUI: keep thinking blocks ordered before content during streaming and isolate per-run assembly. (#1202) — thanks @aaronveklabs.
|
- TUI: keep thinking blocks ordered before content during streaming and isolate per-run assembly. (#1202) — thanks @aaronveklabs.
|
||||||
- TUI: align custom editor initialization with the latest pi-tui API. (#1298) — thanks @sibbl.
|
- TUI: align custom editor initialization with the latest pi-tui API. (#1298) — thanks @sibbl.
|
||||||
- CLI: avoid duplicating --profile/--dev flags when formatting commands.
|
- CLI: avoid duplicating --profile/--dev flags when formatting commands.
|
||||||
- Status: route native `/status` to the active agent so model selection reflects the correct profile. (#1301)
|
|
||||||
- Exec: prefer bash when fish is default shell, falling back to sh if bash is missing. (#1297) — thanks @ysqander.
|
- Exec: prefer bash when fish is default shell, falling back to sh if bash is missing. (#1297) — thanks @ysqander.
|
||||||
- Exec: merge login-shell PATH for host=gateway exec while keeping daemon PATH minimal. (#1304)
|
- Exec: merge login-shell PATH for host=gateway exec while keeping daemon PATH minimal. (#1304)
|
||||||
- Plugins: add Nextcloud Talk manifest for plugin config validation. (#1297) — thanks @ysqander.
|
- Plugins: add Nextcloud Talk manifest for plugin config validation. (#1297) — thanks @ysqander.
|
||||||
- Anthropic: default API prompt caching to 1h with configurable TTL override; ignore TTL for OAuth.
|
|
||||||
- Discord: make resolve warnings avoid raw JSON payloads on rate limits.
|
|
||||||
- Discord: process message handlers in parallel across sessions to avoid event queue blocking. (#1295)
|
|
||||||
- Cron: auto-deliver isolated agent output to explicit targets without tool calls. (#1285)
|
|
||||||
|
|
||||||
## 2026.1.19-3
|
## 2026.1.19-3
|
||||||
|
|
||||||
@@ -93,7 +59,6 @@ Docs: https://docs.clawd.bot
|
|||||||
- Usage: add `/usage cost` summaries and macOS menu cost submenu with daily charting.
|
- Usage: add `/usage cost` summaries and macOS menu cost submenu with daily charting.
|
||||||
- Agents: clarify node_modules read-only guidance in agent instructions.
|
- Agents: clarify node_modules read-only guidance in agent instructions.
|
||||||
- TUI: add syntax highlighting for code blocks. (#1200) — thanks @vignesh07.
|
- TUI: add syntax highlighting for code blocks. (#1200) — thanks @vignesh07.
|
||||||
- TUI: session picker shows derived titles, fuzzy search, relative times, and last message preview. (#1271) — thanks @Whoaa512.
|
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
- UI: enable shell mode for sync Windows spawns to avoid `pnpm ui:build` EINVAL. (#1212) — thanks @longmaba.
|
- UI: enable shell mode for sync Windows spawns to avoid `pnpm ui:build` EINVAL. (#1212) — thanks @longmaba.
|
||||||
@@ -106,7 +71,6 @@ Docs: https://docs.clawd.bot
|
|||||||
- TUI: show generic empty-state text for searchable pickers. (#1201) — thanks @vignesh07.
|
- TUI: show generic empty-state text for searchable pickers. (#1201) — thanks @vignesh07.
|
||||||
- Doctor: canonicalize legacy session keys in session stores to prevent stale metadata. (#1169)
|
- Doctor: canonicalize legacy session keys in session stores to prevent stale metadata. (#1169)
|
||||||
- CLI: centralize CLI command registration to keep fast-path routing and program wiring in sync. (#1207) — thanks @gumadeiras.
|
- CLI: centralize CLI command registration to keep fast-path routing and program wiring in sync. (#1207) — thanks @gumadeiras.
|
||||||
- Config: allow custom fields under `skills.entries.<name>.config` for skill credentials/config. (#1226) — thanks @VACInc. (fixes #1225)
|
|
||||||
|
|
||||||
## 2026.1.18-5
|
## 2026.1.18-5
|
||||||
|
|
||||||
|
|||||||
@@ -479,27 +479,27 @@ Core contributors:
|
|||||||
Thanks to all clawtributors:
|
Thanks to all clawtributors:
|
||||||
|
|
||||||
<p align="left">
|
<p align="left">
|
||||||
<a href="https://github.com/steipete"><img src="https://avatars.githubusercontent.com/u/58493?v=4&s=48" width="48" height="48" alt="steipete" title="steipete"/></a> <a href="https://github.com/bohdanpodvirnyi"><img src="https://avatars.githubusercontent.com/u/31819391?v=4&s=48" width="48" height="48" alt="bohdanpodvirnyi" title="bohdanpodvirnyi"/></a> <a href="https://github.com/joaohlisboa"><img src="https://avatars.githubusercontent.com/u/8200873?v=4&s=48" width="48" height="48" alt="joaohlisboa" title="joaohlisboa"/></a> <a href="https://github.com/mneves75"><img src="https://avatars.githubusercontent.com/u/2423436?v=4&s=48" width="48" height="48" alt="mneves75" title="mneves75"/></a> <a href="https://github.com/MatthieuBizien"><img src="https://avatars.githubusercontent.com/u/173090?v=4&s=48" width="48" height="48" alt="MatthieuBizien" title="MatthieuBizien"/></a> <a href="https://github.com/MaudeBot"><img src="https://avatars.githubusercontent.com/u/255777700?v=4&s=48" width="48" height="48" alt="MaudeBot" title="MaudeBot"/></a> <a href="https://github.com/rahthakor"><img src="https://avatars.githubusercontent.com/u/8470553?v=4&s=48" width="48" height="48" alt="rahthakor" title="rahthakor"/></a> <a href="https://github.com/vrknetha"><img src="https://avatars.githubusercontent.com/u/20596261?v=4&s=48" width="48" height="48" alt="vrknetha" title="vrknetha"/></a> <a href="https://github.com/radek-paclt"><img src="https://avatars.githubusercontent.com/u/50451445?v=4&s=48" width="48" height="48" alt="radek-paclt" title="radek-paclt"/></a> <a href="https://github.com/joshp123"><img src="https://avatars.githubusercontent.com/u/1497361?v=4&s=48" width="48" height="48" alt="joshp123" title="joshp123"/></a>
|
<a href="https://github.com/steipete"><img src="https://avatars.githubusercontent.com/u/58493?v=4&s=48" width="48" height="48" alt="steipete" title="steipete"/></a> <a href="https://github.com/bohdanpodvirnyi"><img src="https://avatars.githubusercontent.com/u/31819391?v=4&s=48" width="48" height="48" alt="bohdanpodvirnyi" title="bohdanpodvirnyi"/></a> <a href="https://github.com/joaohlisboa"><img src="https://avatars.githubusercontent.com/u/8200873?v=4&s=48" width="48" height="48" alt="joaohlisboa" title="joaohlisboa"/></a> <a href="https://github.com/mneves75"><img src="https://avatars.githubusercontent.com/u/2423436?v=4&s=48" width="48" height="48" alt="mneves75" title="mneves75"/></a> <a href="https://github.com/MatthieuBizien"><img src="https://avatars.githubusercontent.com/u/173090?v=4&s=48" width="48" height="48" alt="MatthieuBizien" title="MatthieuBizien"/></a> <a href="https://github.com/rahthakor"><img src="https://avatars.githubusercontent.com/u/8470553?v=4&s=48" width="48" height="48" alt="rahthakor" title="rahthakor"/></a> <a href="https://github.com/vrknetha"><img src="https://avatars.githubusercontent.com/u/20596261?v=4&s=48" width="48" height="48" alt="vrknetha" title="vrknetha"/></a> <a href="https://github.com/radek-paclt"><img src="https://avatars.githubusercontent.com/u/50451445?v=4&s=48" width="48" height="48" alt="radek-paclt" title="radek-paclt"/></a> <a href="https://github.com/joshp123"><img src="https://avatars.githubusercontent.com/u/1497361?v=4&s=48" width="48" height="48" alt="joshp123" title="joshp123"/></a> <a href="https://github.com/mukhtharcm"><img src="https://avatars.githubusercontent.com/u/56378562?v=4&s=48" width="48" height="48" alt="mukhtharcm" title="mukhtharcm"/></a>
|
||||||
<a href="https://github.com/mukhtharcm"><img src="https://avatars.githubusercontent.com/u/56378562?v=4&s=48" width="48" height="48" alt="mukhtharcm" title="mukhtharcm"/></a> <a href="https://github.com/maxsumrall"><img src="https://avatars.githubusercontent.com/u/628843?v=4&s=48" width="48" height="48" alt="maxsumrall" title="maxsumrall"/></a> <a href="https://github.com/xadenryan"><img src="https://avatars.githubusercontent.com/u/165437834?v=4&s=48" width="48" height="48" alt="xadenryan" title="xadenryan"/></a> <a href="https://github.com/tobiasbischoff"><img src="https://avatars.githubusercontent.com/u/711564?v=4&s=48" width="48" height="48" alt="Tobias Bischoff" title="Tobias Bischoff"/></a> <a href="https://github.com/juanpablodlc"><img src="https://avatars.githubusercontent.com/u/92012363?v=4&s=48" width="48" height="48" alt="juanpablodlc" title="juanpablodlc"/></a> <a href="https://github.com/hsrvc"><img src="https://avatars.githubusercontent.com/u/129702169?v=4&s=48" width="48" height="48" alt="hsrvc" title="hsrvc"/></a> <a href="https://github.com/magimetal"><img src="https://avatars.githubusercontent.com/u/36491250?v=4&s=48" width="48" height="48" alt="magimetal" title="magimetal"/></a> <a href="https://github.com/meaningfool"><img src="https://avatars.githubusercontent.com/u/2862331?v=4&s=48" width="48" height="48" alt="meaningfool" title="meaningfool"/></a> <a href="https://github.com/NicholasSpisak"><img src="https://avatars.githubusercontent.com/u/129075147?v=4&s=48" width="48" height="48" alt="NicholasSpisak" title="NicholasSpisak"/></a> <a href="https://github.com/AbhisekBasu1"><img src="https://avatars.githubusercontent.com/u/40645221?v=4&s=48" width="48" height="48" alt="abhisekbasu1" title="abhisekbasu1"/></a>
|
<a href="https://github.com/maxsumrall"><img src="https://avatars.githubusercontent.com/u/628843?v=4&s=48" width="48" height="48" alt="maxsumrall" title="maxsumrall"/></a> <a href="https://github.com/xadenryan"><img src="https://avatars.githubusercontent.com/u/165437834?v=4&s=48" width="48" height="48" alt="xadenryan" title="xadenryan"/></a> <a href="https://github.com/tobiasbischoff"><img src="https://avatars.githubusercontent.com/u/711564?v=4&s=48" width="48" height="48" alt="Tobias Bischoff" title="Tobias Bischoff"/></a> <a href="https://github.com/juanpablodlc"><img src="https://avatars.githubusercontent.com/u/92012363?v=4&s=48" width="48" height="48" alt="juanpablodlc" title="juanpablodlc"/></a> <a href="https://github.com/hsrvc"><img src="https://avatars.githubusercontent.com/u/129702169?v=4&s=48" width="48" height="48" alt="hsrvc" title="hsrvc"/></a> <a href="https://github.com/magimetal"><img src="https://avatars.githubusercontent.com/u/36491250?v=4&s=48" width="48" height="48" alt="magimetal" title="magimetal"/></a> <a href="https://github.com/meaningfool"><img src="https://avatars.githubusercontent.com/u/2862331?v=4&s=48" width="48" height="48" alt="meaningfool" title="meaningfool"/></a> <a href="https://github.com/NicholasSpisak"><img src="https://avatars.githubusercontent.com/u/129075147?v=4&s=48" width="48" height="48" alt="NicholasSpisak" title="NicholasSpisak"/></a> <a href="https://github.com/AbhisekBasu1"><img src="https://avatars.githubusercontent.com/u/40645221?v=4&s=48" width="48" height="48" alt="abhisekbasu1" title="abhisekbasu1"/></a> <a href="https://github.com/sebslight"><img src="https://avatars.githubusercontent.com/u/19554889?v=4&s=48" width="48" height="48" alt="sebslight" title="sebslight"/></a>
|
||||||
<a href="https://github.com/sebslight"><img src="https://avatars.githubusercontent.com/u/19554889?v=4&s=48" width="48" height="48" alt="sebslight" title="sebslight"/></a> <a href="https://github.com/claude"><img src="https://avatars.githubusercontent.com/u/81847?v=4&s=48" width="48" height="48" alt="claude" title="claude"/></a> <a href="https://github.com/jamesgroat"><img src="https://avatars.githubusercontent.com/u/2634024?v=4&s=48" width="48" height="48" alt="jamesgroat" title="jamesgroat"/></a> <a href="https://github.com/Hyaxia"><img src="https://avatars.githubusercontent.com/u/36747317?v=4&s=48" width="48" height="48" alt="Hyaxia" title="Hyaxia"/></a> <a href="https://github.com/dantelex"><img src="https://avatars.githubusercontent.com/u/631543?v=4&s=48" width="48" height="48" alt="dantelex" title="dantelex"/></a> <a href="https://github.com/daveonkels"><img src="https://avatars.githubusercontent.com/u/533642?v=4&s=48" width="48" height="48" alt="daveonkels" title="daveonkels"/></a> <a href="https://github.com/mteam88"><img src="https://avatars.githubusercontent.com/u/84196639?v=4&s=48" width="48" height="48" alt="mteam88" title="mteam88"/></a> <a href="https://github.com/omniwired"><img src="https://avatars.githubusercontent.com/u/322761?v=4&s=48" width="48" height="48" alt="Eng. Juan Combetto" title="Eng. Juan Combetto"/></a> <a href="https://github.com/dbhurley"><img src="https://avatars.githubusercontent.com/u/5251425?v=4&s=48" width="48" height="48" alt="dbhurley" title="dbhurley"/></a> <a href="https://github.com/mbelinky"><img src="https://avatars.githubusercontent.com/u/132747814?v=4&s=48" width="48" height="48" alt="Mariano Belinky" title="Mariano Belinky"/></a>
|
<a href="https://github.com/claude"><img src="https://avatars.githubusercontent.com/u/81847?v=4&s=48" width="48" height="48" alt="claude" title="claude"/></a> <a href="https://github.com/jamesgroat"><img src="https://avatars.githubusercontent.com/u/2634024?v=4&s=48" width="48" height="48" alt="jamesgroat" title="jamesgroat"/></a> <a href="https://github.com/Hyaxia"><img src="https://avatars.githubusercontent.com/u/36747317?v=4&s=48" width="48" height="48" alt="Hyaxia" title="Hyaxia"/></a> <a href="https://github.com/dantelex"><img src="https://avatars.githubusercontent.com/u/631543?v=4&s=48" width="48" height="48" alt="dantelex" title="dantelex"/></a> <a href="https://github.com/daveonkels"><img src="https://avatars.githubusercontent.com/u/533642?v=4&s=48" width="48" height="48" alt="daveonkels" title="daveonkels"/></a> <a href="https://github.com/mteam88"><img src="https://avatars.githubusercontent.com/u/84196639?v=4&s=48" width="48" height="48" alt="mteam88" title="mteam88"/></a> <a href="https://github.com/omniwired"><img src="https://avatars.githubusercontent.com/u/322761?v=4&s=48" width="48" height="48" alt="Eng. Juan Combetto" title="Eng. Juan Combetto"/></a> <a href="https://github.com/dbhurley"><img src="https://avatars.githubusercontent.com/u/5251425?v=4&s=48" width="48" height="48" alt="dbhurley" title="dbhurley"/></a> <a href="https://github.com/mbelinky"><img src="https://avatars.githubusercontent.com/u/132747814?v=4&s=48" width="48" height="48" alt="Mariano Belinky" title="Mariano Belinky"/></a> <a href="https://github.com/TSavo"><img src="https://avatars.githubusercontent.com/u/877990?v=4&s=48" width="48" height="48" alt="TSavo" title="TSavo"/></a>
|
||||||
<a href="https://github.com/TSavo"><img src="https://avatars.githubusercontent.com/u/877990?v=4&s=48" width="48" height="48" alt="TSavo" title="TSavo"/></a> <a href="https://github.com/julianengel"><img src="https://avatars.githubusercontent.com/u/10634231?v=4&s=48" width="48" height="48" alt="julianengel" title="julianengel"/></a> <a href="https://github.com/benithors"><img src="https://avatars.githubusercontent.com/u/20652882?v=4&s=48" width="48" height="48" alt="benithors" title="benithors"/></a> <a href="https://github.com/bradleypriest"><img src="https://avatars.githubusercontent.com/u/167215?v=4&s=48" width="48" height="48" alt="bradleypriest" title="bradleypriest"/></a> <a href="https://github.com/timolins"><img src="https://avatars.githubusercontent.com/u/1440854?v=4&s=48" width="48" height="48" alt="timolins" title="timolins"/></a> <a href="https://github.com/Nachx639"><img src="https://avatars.githubusercontent.com/u/71144023?v=4&s=48" width="48" height="48" alt="nachx639" title="nachx639"/></a> <a href="https://github.com/sreekaransrinath"><img src="https://avatars.githubusercontent.com/u/50989977?v=4&s=48" width="48" height="48" alt="sreekaransrinath" title="sreekaransrinath"/></a> <a href="https://github.com/gupsammy"><img src="https://avatars.githubusercontent.com/u/20296019?v=4&s=48" width="48" height="48" alt="gupsammy" title="gupsammy"/></a> <a href="https://github.com/cristip73"><img src="https://avatars.githubusercontent.com/u/24499421?v=4&s=48" width="48" height="48" alt="cristip73" title="cristip73"/></a> <a href="https://github.com/nachoiacovino"><img src="https://avatars.githubusercontent.com/u/50103937?v=4&s=48" width="48" height="48" alt="nachoiacovino" title="nachoiacovino"/></a>
|
<a href="https://github.com/julianengel"><img src="https://avatars.githubusercontent.com/u/10634231?v=4&s=48" width="48" height="48" alt="julianengel" title="julianengel"/></a> <a href="https://github.com/benithors"><img src="https://avatars.githubusercontent.com/u/20652882?v=4&s=48" width="48" height="48" alt="benithors" title="benithors"/></a> <a href="https://github.com/timolins"><img src="https://avatars.githubusercontent.com/u/1440854?v=4&s=48" width="48" height="48" alt="timolins" title="timolins"/></a> <a href="https://github.com/Nachx639"><img src="https://avatars.githubusercontent.com/u/71144023?v=4&s=48" width="48" height="48" alt="nachx639" title="nachx639"/></a> <a href="https://github.com/sreekaransrinath"><img src="https://avatars.githubusercontent.com/u/50989977?v=4&s=48" width="48" height="48" alt="sreekaransrinath" title="sreekaransrinath"/></a> <a href="https://github.com/gupsammy"><img src="https://avatars.githubusercontent.com/u/20296019?v=4&s=48" width="48" height="48" alt="gupsammy" title="gupsammy"/></a> <a href="https://github.com/cristip73"><img src="https://avatars.githubusercontent.com/u/24499421?v=4&s=48" width="48" height="48" alt="cristip73" title="cristip73"/></a> <a href="https://github.com/nachoiacovino"><img src="https://avatars.githubusercontent.com/u/50103937?v=4&s=48" width="48" height="48" alt="nachoiacovino" title="nachoiacovino"/></a> <a href="https://github.com/vsabavat"><img src="https://avatars.githubusercontent.com/u/50385532?v=4&s=48" width="48" height="48" alt="Vasanth Rao Naik Sabavat" title="Vasanth Rao Naik Sabavat"/></a> <a href="https://github.com/cpojer"><img src="https://avatars.githubusercontent.com/u/13352?v=4&s=48" width="48" height="48" alt="cpojer" title="cpojer"/></a>
|
||||||
<a href="https://github.com/vsabavat"><img src="https://avatars.githubusercontent.com/u/50385532?v=4&s=48" width="48" height="48" alt="Vasanth Rao Naik Sabavat" title="Vasanth Rao Naik Sabavat"/></a> <a href="https://github.com/cpojer"><img src="https://avatars.githubusercontent.com/u/13352?v=4&s=48" width="48" height="48" alt="cpojer" title="cpojer"/></a> <a href="https://github.com/lc0rp"><img src="https://avatars.githubusercontent.com/u/2609441?v=4&s=48" width="48" height="48" alt="lc0rp" title="lc0rp"/></a> <a href="https://github.com/scald"><img src="https://avatars.githubusercontent.com/u/1215913?v=4&s=48" width="48" height="48" alt="scald" title="scald"/></a> <a href="https://github.com/gumadeiras"><img src="https://avatars.githubusercontent.com/u/5599352?v=4&s=48" width="48" height="48" alt="gumadeiras" title="gumadeiras"/></a> <a href="https://github.com/andranik-sahakyan"><img src="https://avatars.githubusercontent.com/u/8908029?v=4&s=48" width="48" height="48" alt="andranik-sahakyan" title="andranik-sahakyan"/></a> <a href="https://github.com/davidguttman"><img src="https://avatars.githubusercontent.com/u/431696?v=4&s=48" width="48" height="48" alt="davidguttman" title="davidguttman"/></a> <a href="https://github.com/sleontenko"><img src="https://avatars.githubusercontent.com/u/7135949?v=4&s=48" width="48" height="48" alt="sleontenko" title="sleontenko"/></a> <a href="https://github.com/sircrumpet"><img src="https://avatars.githubusercontent.com/u/4436535?v=4&s=48" width="48" height="48" alt="sircrumpet" title="sircrumpet"/></a> <a href="https://github.com/peschee"><img src="https://avatars.githubusercontent.com/u/63866?v=4&s=48" width="48" height="48" alt="peschee" title="peschee"/></a>
|
<a href="https://github.com/lc0rp"><img src="https://avatars.githubusercontent.com/u/2609441?v=4&s=48" width="48" height="48" alt="lc0rp" title="lc0rp"/></a> <a href="https://github.com/scald"><img src="https://avatars.githubusercontent.com/u/1215913?v=4&s=48" width="48" height="48" alt="scald" title="scald"/></a> <a href="https://github.com/gumadeiras"><img src="https://avatars.githubusercontent.com/u/5599352?v=4&s=48" width="48" height="48" alt="gumadeiras" title="gumadeiras"/></a> <a href="https://github.com/andranik-sahakyan"><img src="https://avatars.githubusercontent.com/u/8908029?v=4&s=48" width="48" height="48" alt="andranik-sahakyan" title="andranik-sahakyan"/></a> <a href="https://github.com/davidguttman"><img src="https://avatars.githubusercontent.com/u/431696?v=4&s=48" width="48" height="48" alt="davidguttman" title="davidguttman"/></a> <a href="https://github.com/sleontenko"><img src="https://avatars.githubusercontent.com/u/7135949?v=4&s=48" width="48" height="48" alt="sleontenko" title="sleontenko"/></a> <a href="https://github.com/sircrumpet"><img src="https://avatars.githubusercontent.com/u/4436535?v=4&s=48" width="48" height="48" alt="sircrumpet" title="sircrumpet"/></a> <a href="https://github.com/peschee"><img src="https://avatars.githubusercontent.com/u/63866?v=4&s=48" width="48" height="48" alt="peschee" title="peschee"/></a> <a href="https://github.com/rafaelreis-r"><img src="https://avatars.githubusercontent.com/u/57492577?v=4&s=48" width="48" height="48" alt="rafaelreis-r" title="rafaelreis-r"/></a> <a href="https://github.com/thewilloftheshadow"><img src="https://avatars.githubusercontent.com/u/35580099?v=4&s=48" width="48" height="48" alt="thewilloftheshadow" title="thewilloftheshadow"/></a>
|
||||||
<a href="https://github.com/rafaelreis-r"><img src="https://avatars.githubusercontent.com/u/57492577?v=4&s=48" width="48" height="48" alt="rafaelreis-r" title="rafaelreis-r"/></a> <a href="https://github.com/thewilloftheshadow"><img src="https://avatars.githubusercontent.com/u/35580099?v=4&s=48" width="48" height="48" alt="thewilloftheshadow" title="thewilloftheshadow"/></a> <a href="https://github.com/ratulsarna"><img src="https://avatars.githubusercontent.com/u/105903728?v=4&s=48" width="48" height="48" alt="ratulsarna" title="ratulsarna"/></a> <a href="https://github.com/lutr0"><img src="https://avatars.githubusercontent.com/u/76906369?v=4&s=48" width="48" height="48" alt="lutr0" title="lutr0"/></a> <a href="https://github.com/danielz1z"><img src="https://avatars.githubusercontent.com/u/235270390?v=4&s=48" width="48" height="48" alt="danielz1z" title="danielz1z"/></a> <a href="https://github.com/emanuelst"><img src="https://avatars.githubusercontent.com/u/9994339?v=4&s=48" width="48" height="48" alt="emanuelst" title="emanuelst"/></a> <a href="https://github.com/KristijanJovanovski"><img src="https://avatars.githubusercontent.com/u/8942284?v=4&s=48" width="48" height="48" alt="KristijanJovanovski" title="KristijanJovanovski"/></a> <a href="https://github.com/CashWilliams"><img src="https://avatars.githubusercontent.com/u/613573?v=4&s=48" width="48" height="48" alt="CashWilliams" title="CashWilliams"/></a> <a href="https://github.com/rdev"><img src="https://avatars.githubusercontent.com/u/8418866?v=4&s=48" width="48" height="48" alt="rdev" title="rdev"/></a> <a href="https://github.com/osolmaz"><img src="https://avatars.githubusercontent.com/u/2453968?v=4&s=48" width="48" height="48" alt="osolmaz" title="osolmaz"/></a>
|
<a href="https://github.com/ratulsarna"><img src="https://avatars.githubusercontent.com/u/105903728?v=4&s=48" width="48" height="48" alt="ratulsarna" title="ratulsarna"/></a> <a href="https://github.com/lutr0"><img src="https://avatars.githubusercontent.com/u/76906369?v=4&s=48" width="48" height="48" alt="lutr0" title="lutr0"/></a> <a href="https://github.com/bradleypriest"><img src="https://avatars.githubusercontent.com/u/167215?v=4&s=48" width="48" height="48" alt="bradleypriest" title="bradleypriest"/></a> <a href="https://github.com/danielz1z"><img src="https://avatars.githubusercontent.com/u/235270390?v=4&s=48" width="48" height="48" alt="danielz1z" title="danielz1z"/></a> <a href="https://github.com/emanuelst"><img src="https://avatars.githubusercontent.com/u/9994339?v=4&s=48" width="48" height="48" alt="emanuelst" title="emanuelst"/></a> <a href="https://github.com/KristijanJovanovski"><img src="https://avatars.githubusercontent.com/u/8942284?v=4&s=48" width="48" height="48" alt="KristijanJovanovski" title="KristijanJovanovski"/></a> <a href="https://github.com/CashWilliams"><img src="https://avatars.githubusercontent.com/u/613573?v=4&s=48" width="48" height="48" alt="CashWilliams" title="CashWilliams"/></a> <a href="https://github.com/rdev"><img src="https://avatars.githubusercontent.com/u/8418866?v=4&s=48" width="48" height="48" alt="rdev" title="rdev"/></a> <a href="https://github.com/osolmaz"><img src="https://avatars.githubusercontent.com/u/2453968?v=4&s=48" width="48" height="48" alt="osolmaz" title="osolmaz"/></a> <a href="https://github.com/joshrad-dev"><img src="https://avatars.githubusercontent.com/u/62785552?v=4&s=48" width="48" height="48" alt="joshrad-dev" title="joshrad-dev"/></a>
|
||||||
<a href="https://github.com/joshrad-dev"><img src="https://avatars.githubusercontent.com/u/62785552?v=4&s=48" width="48" height="48" alt="joshrad-dev" title="joshrad-dev"/></a> <a href="https://github.com/kiranjd"><img src="https://avatars.githubusercontent.com/u/25822851?v=4&s=48" width="48" height="48" alt="kiranjd" title="kiranjd"/></a> <a href="https://github.com/adityashaw2"><img src="https://avatars.githubusercontent.com/u/41204444?v=4&s=48" width="48" height="48" alt="adityashaw2" title="adityashaw2"/></a> <a href="https://github.com/search?q=sheeek"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="sheeek" title="sheeek"/></a> <a href="https://github.com/artuskg"><img src="https://avatars.githubusercontent.com/u/11966157?v=4&s=48" width="48" height="48" alt="artuskg" title="artuskg"/></a> <a href="https://github.com/onutc"><img src="https://avatars.githubusercontent.com/u/152018508?v=4&s=48" width="48" height="48" alt="onutc" title="onutc"/></a> <a href="https://github.com/tyler6204"><img src="https://avatars.githubusercontent.com/u/64381258?v=4&s=48" width="48" height="48" alt="tyler6204" title="tyler6204"/></a> <a href="https://github.com/ManuelHettich"><img src="https://avatars.githubusercontent.com/u/17690367?v=4&s=48" width="48" height="48" alt="manuelhettich" title="manuelhettich"/></a> <a href="https://github.com/minghinmatthewlam"><img src="https://avatars.githubusercontent.com/u/14224566?v=4&s=48" width="48" height="48" alt="minghinmatthewlam" title="minghinmatthewlam"/></a> <a href="https://github.com/myfunc"><img src="https://avatars.githubusercontent.com/u/19294627?v=4&s=48" width="48" height="48" alt="myfunc" title="myfunc"/></a>
|
<a href="https://github.com/kiranjd"><img src="https://avatars.githubusercontent.com/u/25822851?v=4&s=48" width="48" height="48" alt="kiranjd" title="kiranjd"/></a> <a href="https://github.com/adityashaw2"><img src="https://avatars.githubusercontent.com/u/41204444?v=4&s=48" width="48" height="48" alt="adityashaw2" title="adityashaw2"/></a> <a href="https://github.com/search?q=sheeek"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="sheeek" title="sheeek"/></a> <a href="https://github.com/artuskg"><img src="https://avatars.githubusercontent.com/u/11966157?v=4&s=48" width="48" height="48" alt="artuskg" title="artuskg"/></a> <a href="https://github.com/onutc"><img src="https://avatars.githubusercontent.com/u/152018508?v=4&s=48" width="48" height="48" alt="onutc" title="onutc"/></a> <a href="https://github.com/ManuelHettich"><img src="https://avatars.githubusercontent.com/u/17690367?v=4&s=48" width="48" height="48" alt="manuelhettich" title="manuelhettich"/></a> <a href="https://github.com/minghinmatthewlam"><img src="https://avatars.githubusercontent.com/u/14224566?v=4&s=48" width="48" height="48" alt="minghinmatthewlam" title="minghinmatthewlam"/></a> <a href="https://github.com/myfunc"><img src="https://avatars.githubusercontent.com/u/19294627?v=4&s=48" width="48" height="48" alt="myfunc" title="myfunc"/></a> <a href="https://github.com/buddyh"><img src="https://avatars.githubusercontent.com/u/31752869?v=4&s=48" width="48" height="48" alt="buddyh" title="buddyh"/></a> <a href="https://github.com/connorshea"><img src="https://avatars.githubusercontent.com/u/2977353?v=4&s=48" width="48" height="48" alt="connorshea" title="connorshea"/></a>
|
||||||
<a href="https://github.com/buddyh"><img src="https://avatars.githubusercontent.com/u/31752869?v=4&s=48" width="48" height="48" alt="buddyh" title="buddyh"/></a> <a href="https://github.com/connorshea"><img src="https://avatars.githubusercontent.com/u/2977353?v=4&s=48" width="48" height="48" alt="connorshea" title="connorshea"/></a> <a href="https://github.com/mcinteerj"><img src="https://avatars.githubusercontent.com/u/3613653?v=4&s=48" width="48" height="48" alt="mcinteerj" title="mcinteerj"/></a> <a href="https://github.com/John-Rood"><img src="https://avatars.githubusercontent.com/u/62669593?v=4&s=48" width="48" height="48" alt="John-Rood" title="John-Rood"/></a> <a href="https://github.com/timkrase"><img src="https://avatars.githubusercontent.com/u/38947626?v=4&s=48" width="48" height="48" alt="timkrase" title="timkrase"/></a> <a href="https://github.com/zerone0x"><img src="https://avatars.githubusercontent.com/u/39543393?v=4&s=48" width="48" height="48" alt="zerone0x" title="zerone0x"/></a> <a href="https://github.com/gerardward2007"><img src="https://avatars.githubusercontent.com/u/3002155?v=4&s=48" width="48" height="48" alt="gerardward2007" title="gerardward2007"/></a> <a href="https://github.com/obviyus"><img src="https://avatars.githubusercontent.com/u/22031114?v=4&s=48" width="48" height="48" alt="obviyus" title="obviyus"/></a> <a href="https://github.com/tosh-hamburg"><img src="https://avatars.githubusercontent.com/u/58424326?v=4&s=48" width="48" height="48" alt="tosh-hamburg" title="tosh-hamburg"/></a> <a href="https://github.com/azade-c"><img src="https://avatars.githubusercontent.com/u/252790079?v=4&s=48" width="48" height="48" alt="azade-c" title="azade-c"/></a>
|
<a href="https://github.com/mcinteerj"><img src="https://avatars.githubusercontent.com/u/3613653?v=4&s=48" width="48" height="48" alt="mcinteerj" title="mcinteerj"/></a> <a href="https://github.com/timkrase"><img src="https://avatars.githubusercontent.com/u/38947626?v=4&s=48" width="48" height="48" alt="timkrase" title="timkrase"/></a> <a href="https://github.com/zerone0x"><img src="https://avatars.githubusercontent.com/u/39543393?v=4&s=48" width="48" height="48" alt="zerone0x" title="zerone0x"/></a> <a href="https://github.com/gerardward2007"><img src="https://avatars.githubusercontent.com/u/3002155?v=4&s=48" width="48" height="48" alt="gerardward2007" title="gerardward2007"/></a> <a href="https://github.com/obviyus"><img src="https://avatars.githubusercontent.com/u/22031114?v=4&s=48" width="48" height="48" alt="obviyus" title="obviyus"/></a> <a href="https://github.com/tosh-hamburg"><img src="https://avatars.githubusercontent.com/u/58424326?v=4&s=48" width="48" height="48" alt="tosh-hamburg" title="tosh-hamburg"/></a> <a href="https://github.com/azade-c"><img src="https://avatars.githubusercontent.com/u/252790079?v=4&s=48" width="48" height="48" alt="azade-c" title="azade-c"/></a> <a href="https://github.com/roshanasingh4"><img src="https://avatars.githubusercontent.com/u/88576930?v=4&s=48" width="48" height="48" alt="roshanasingh4" title="roshanasingh4"/></a> <a href="https://github.com/bjesuiter"><img src="https://avatars.githubusercontent.com/u/2365676?v=4&s=48" width="48" height="48" alt="bjesuiter" title="bjesuiter"/></a> <a href="https://github.com/cheeeee"><img src="https://avatars.githubusercontent.com/u/21245729?v=4&s=48" width="48" height="48" alt="cheeeee" title="cheeeee"/></a>
|
||||||
<a href="https://github.com/roshanasingh4"><img src="https://avatars.githubusercontent.com/u/88576930?v=4&s=48" width="48" height="48" alt="roshanasingh4" title="roshanasingh4"/></a> <a href="https://github.com/bjesuiter"><img src="https://avatars.githubusercontent.com/u/2365676?v=4&s=48" width="48" height="48" alt="bjesuiter" title="bjesuiter"/></a> <a href="https://github.com/cheeeee"><img src="https://avatars.githubusercontent.com/u/21245729?v=4&s=48" width="48" height="48" alt="cheeeee" title="cheeeee"/></a> <a href="https://github.com/j1philli"><img src="https://avatars.githubusercontent.com/u/3744255?v=4&s=48" width="48" height="48" alt="Josh Phillips" title="Josh Phillips"/></a> <a href="https://github.com/Whoaa512"><img src="https://avatars.githubusercontent.com/u/1581943?v=4&s=48" width="48" height="48" alt="Whoaa512" title="Whoaa512"/></a> <a href="https://github.com/YuriNachos"><img src="https://avatars.githubusercontent.com/u/19365375?v=4&s=48" width="48" height="48" alt="YuriNachos" title="YuriNachos"/></a> <a href="https://github.com/chriseidhof"><img src="https://avatars.githubusercontent.com/u/5382?v=4&s=48" width="48" height="48" alt="chriseidhof" title="chriseidhof"/></a> <a href="https://github.com/vignesh07"><img src="https://avatars.githubusercontent.com/u/1436853?v=4&s=48" width="48" height="48" alt="vignesh07" title="vignesh07"/></a> <a href="https://github.com/ysqander"><img src="https://avatars.githubusercontent.com/u/80843820?v=4&s=48" width="48" height="48" alt="ysqander" title="ysqander"/></a> <a href="https://github.com/superman32432432"><img src="https://avatars.githubusercontent.com/u/7228420?v=4&s=48" width="48" height="48" alt="superman32432432" title="superman32432432"/></a>
|
<a href="https://github.com/j1philli"><img src="https://avatars.githubusercontent.com/u/3744255?v=4&s=48" width="48" height="48" alt="Josh Phillips" title="Josh Phillips"/></a> <a href="https://github.com/YuriNachos"><img src="https://avatars.githubusercontent.com/u/19365375?v=4&s=48" width="48" height="48" alt="YuriNachos" title="YuriNachos"/></a> <a href="https://github.com/chriseidhof"><img src="https://avatars.githubusercontent.com/u/5382?v=4&s=48" width="48" height="48" alt="chriseidhof" title="chriseidhof"/></a> <a href="https://github.com/tyler6204"><img src="https://avatars.githubusercontent.com/u/64381258?v=4&s=48" width="48" height="48" alt="tyler6204" title="tyler6204"/></a> <a href="https://github.com/ysqander"><img src="https://avatars.githubusercontent.com/u/80843820?v=4&s=48" width="48" height="48" alt="ysqander" title="ysqander"/></a> <a href="https://github.com/superman32432432"><img src="https://avatars.githubusercontent.com/u/7228420?v=4&s=48" width="48" height="48" alt="superman32432432" title="superman32432432"/></a> <a href="https://github.com/vignesh07"><img src="https://avatars.githubusercontent.com/u/1436853?v=4&s=48" width="48" height="48" alt="vignesh07" title="vignesh07"/></a> <a href="https://github.com/search?q=Yurii%20Chukhlib"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Yurii Chukhlib" title="Yurii Chukhlib"/></a> <a href="https://github.com/grp06"><img src="https://avatars.githubusercontent.com/u/1573959?v=4&s=48" width="48" height="48" alt="grp06" title="grp06"/></a> <a href="https://github.com/antons"><img src="https://avatars.githubusercontent.com/u/129705?v=4&s=48" width="48" height="48" alt="antons" title="antons"/></a>
|
||||||
<a href="https://github.com/search?q=Yurii%20Chukhlib"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Yurii Chukhlib" title="Yurii Chukhlib"/></a> <a href="https://github.com/grp06"><img src="https://avatars.githubusercontent.com/u/1573959?v=4&s=48" width="48" height="48" alt="grp06" title="grp06"/></a> <a href="https://github.com/antons"><img src="https://avatars.githubusercontent.com/u/129705?v=4&s=48" width="48" height="48" alt="antons" title="antons"/></a> <a href="https://github.com/austinm911"><img src="https://avatars.githubusercontent.com/u/31991302?v=4&s=48" width="48" height="48" alt="austinm911" title="austinm911"/></a> <a href="https://github.com/apps/blacksmith-sh"><img src="https://avatars.githubusercontent.com/in/807020?v=4&s=48" width="48" height="48" alt="blacksmith-sh[bot]" title="blacksmith-sh[bot]"/></a> <a href="https://github.com/dan-dr"><img src="https://avatars.githubusercontent.com/u/6669808?v=4&s=48" width="48" height="48" alt="dan-dr" title="dan-dr"/></a> <a href="https://github.com/HeimdallStrategy"><img src="https://avatars.githubusercontent.com/u/223014405?v=4&s=48" width="48" height="48" alt="HeimdallStrategy" title="HeimdallStrategy"/></a> <a href="https://github.com/imfing"><img src="https://avatars.githubusercontent.com/u/5097752?v=4&s=48" width="48" height="48" alt="imfing" title="imfing"/></a> <a href="https://github.com/jalehman"><img src="https://avatars.githubusercontent.com/u/550978?v=4&s=48" width="48" height="48" alt="jalehman" title="jalehman"/></a> <a href="https://github.com/jarvis-medmatic"><img src="https://avatars.githubusercontent.com/u/252428873?v=4&s=48" width="48" height="48" alt="jarvis-medmatic" title="jarvis-medmatic"/></a>
|
<a href="https://github.com/austinm911"><img src="https://avatars.githubusercontent.com/u/31991302?v=4&s=48" width="48" height="48" alt="austinm911" title="austinm911"/></a> <a href="https://github.com/apps/blacksmith-sh"><img src="https://avatars.githubusercontent.com/in/807020?v=4&s=48" width="48" height="48" alt="blacksmith-sh[bot]" title="blacksmith-sh[bot]"/></a> <a href="https://github.com/dan-dr"><img src="https://avatars.githubusercontent.com/u/6669808?v=4&s=48" width="48" height="48" alt="dan-dr" title="dan-dr"/></a> <a href="https://github.com/HeimdallStrategy"><img src="https://avatars.githubusercontent.com/u/223014405?v=4&s=48" width="48" height="48" alt="HeimdallStrategy" title="HeimdallStrategy"/></a> <a href="https://github.com/imfing"><img src="https://avatars.githubusercontent.com/u/5097752?v=4&s=48" width="48" height="48" alt="imfing" title="imfing"/></a> <a href="https://github.com/jalehman"><img src="https://avatars.githubusercontent.com/u/550978?v=4&s=48" width="48" height="48" alt="jalehman" title="jalehman"/></a> <a href="https://github.com/jarvis-medmatic"><img src="https://avatars.githubusercontent.com/u/252428873?v=4&s=48" width="48" height="48" alt="jarvis-medmatic" title="jarvis-medmatic"/></a> <a href="https://github.com/kkarimi"><img src="https://avatars.githubusercontent.com/u/875218?v=4&s=48" width="48" height="48" alt="kkarimi" title="kkarimi"/></a> <a href="https://github.com/mahmoudashraf93"><img src="https://avatars.githubusercontent.com/u/9130129?v=4&s=48" width="48" height="48" alt="mahmoudashraf93" title="mahmoudashraf93"/></a> <a href="https://github.com/petter-b"><img src="https://avatars.githubusercontent.com/u/62076402?v=4&s=48" width="48" height="48" alt="petter-b" title="petter-b"/></a>
|
||||||
<a href="https://github.com/kkarimi"><img src="https://avatars.githubusercontent.com/u/875218?v=4&s=48" width="48" height="48" alt="kkarimi" title="kkarimi"/></a> <a href="https://github.com/mahmoudashraf93"><img src="https://avatars.githubusercontent.com/u/9130129?v=4&s=48" width="48" height="48" alt="mahmoudashraf93" title="mahmoudashraf93"/></a> <a href="https://github.com/petter-b"><img src="https://avatars.githubusercontent.com/u/62076402?v=4&s=48" width="48" height="48" alt="petter-b" title="petter-b"/></a> <a href="https://github.com/pkrmf"><img src="https://avatars.githubusercontent.com/u/1714267?v=4&s=48" width="48" height="48" alt="pkrmf" title="pkrmf"/></a> <a href="https://github.com/RandyVentures"><img src="https://avatars.githubusercontent.com/u/149904821?v=4&s=48" width="48" height="48" alt="RandyVentures" title="RandyVentures"/></a> <a href="https://github.com/search?q=Ryan%20Lisse"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Ryan Lisse" title="Ryan Lisse"/></a> <a href="https://github.com/dougvk"><img src="https://avatars.githubusercontent.com/u/401660?v=4&s=48" width="48" height="48" alt="dougvk" title="dougvk"/></a> <a href="https://github.com/erikpr1994"><img src="https://avatars.githubusercontent.com/u/6299331?v=4&s=48" width="48" height="48" alt="erikpr1994" title="erikpr1994"/></a> <a href="https://github.com/search?q=Ghost"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Ghost" title="Ghost"/></a> <a href="https://github.com/jonasjancarik"><img src="https://avatars.githubusercontent.com/u/2459191?v=4&s=48" width="48" height="48" alt="jonasjancarik" title="jonasjancarik"/></a>
|
<a href="https://github.com/pkrmf"><img src="https://avatars.githubusercontent.com/u/1714267?v=4&s=48" width="48" height="48" alt="pkrmf" title="pkrmf"/></a> <a href="https://github.com/RandyVentures"><img src="https://avatars.githubusercontent.com/u/149904821?v=4&s=48" width="48" height="48" alt="RandyVentures" title="RandyVentures"/></a> <a href="https://github.com/search?q=Ryan%20Lisse"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Ryan Lisse" title="Ryan Lisse"/></a> <a href="https://github.com/erikpr1994"><img src="https://avatars.githubusercontent.com/u/6299331?v=4&s=48" width="48" height="48" alt="erikpr1994" title="erikpr1994"/></a> <a href="https://github.com/search?q=Ghost"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Ghost" title="Ghost"/></a> <a href="https://github.com/jonasjancarik"><img src="https://avatars.githubusercontent.com/u/2459191?v=4&s=48" width="48" height="48" alt="jonasjancarik" title="jonasjancarik"/></a> <a href="https://github.com/search?q=Keith%20the%20Silly%20Goose"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Keith the Silly Goose" title="Keith the Silly Goose"/></a> <a href="https://github.com/search?q=L36%20Server"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="L36 Server" title="L36 Server"/></a> <a href="https://github.com/search?q=Marc"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Marc" title="Marc"/></a> <a href="https://github.com/mitschabaude-bot"><img src="https://avatars.githubusercontent.com/u/247582884?v=4&s=48" width="48" height="48" alt="mitschabaude-bot" title="mitschabaude-bot"/></a>
|
||||||
<a href="https://github.com/search?q=Keith%20the%20Silly%20Goose"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Keith the Silly Goose" title="Keith the Silly Goose"/></a> <a href="https://github.com/search?q=L36%20Server"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="L36 Server" title="L36 Server"/></a> <a href="https://github.com/search?q=Marc"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Marc" title="Marc"/></a> <a href="https://github.com/mitschabaude-bot"><img src="https://avatars.githubusercontent.com/u/247582884?v=4&s=48" width="48" height="48" alt="mitschabaude-bot" title="mitschabaude-bot"/></a> <a href="https://github.com/neist"><img src="https://avatars.githubusercontent.com/u/1029724?v=4&s=48" width="48" height="48" alt="neist" title="neist"/></a> <a href="https://github.com/ngutman"><img src="https://avatars.githubusercontent.com/u/1540134?v=4&s=48" width="48" height="48" alt="ngutman" title="ngutman"/></a> <a href="https://github.com/chrisrodz"><img src="https://avatars.githubusercontent.com/u/2967620?v=4&s=48" width="48" height="48" alt="chrisrodz" title="chrisrodz"/></a> <a href="https://github.com/search?q=Friederike%20Seiler"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Friederike Seiler" title="Friederike Seiler"/></a> <a href="https://github.com/gabriel-trigo"><img src="https://avatars.githubusercontent.com/u/38991125?v=4&s=48" width="48" height="48" alt="gabriel-trigo" title="gabriel-trigo"/></a> <a href="https://github.com/Iamadig"><img src="https://avatars.githubusercontent.com/u/102129234?v=4&s=48" width="48" height="48" alt="iamadig" title="iamadig"/></a>
|
<a href="https://github.com/neist"><img src="https://avatars.githubusercontent.com/u/1029724?v=4&s=48" width="48" height="48" alt="neist" title="neist"/></a> <a href="https://github.com/ngutman"><img src="https://avatars.githubusercontent.com/u/1540134?v=4&s=48" width="48" height="48" alt="ngutman" title="ngutman"/></a> <a href="https://github.com/chrisrodz"><img src="https://avatars.githubusercontent.com/u/2967620?v=4&s=48" width="48" height="48" alt="chrisrodz" title="chrisrodz"/></a> <a href="https://github.com/search?q=Friederike%20Seiler"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Friederike Seiler" title="Friederike Seiler"/></a> <a href="https://github.com/gabriel-trigo"><img src="https://avatars.githubusercontent.com/u/38991125?v=4&s=48" width="48" height="48" alt="gabriel-trigo" title="gabriel-trigo"/></a> <a href="https://github.com/Iamadig"><img src="https://avatars.githubusercontent.com/u/102129234?v=4&s=48" width="48" height="48" alt="iamadig" title="iamadig"/></a> <a href="https://github.com/search?q=Kit"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Kit" title="Kit"/></a> <a href="https://github.com/koala73"><img src="https://avatars.githubusercontent.com/u/996596?v=4&s=48" width="48" height="48" alt="koala73" title="koala73"/></a> <a href="https://github.com/manmal"><img src="https://avatars.githubusercontent.com/u/142797?v=4&s=48" width="48" height="48" alt="manmal" title="manmal"/></a> <a href="https://github.com/ogulcancelik"><img src="https://avatars.githubusercontent.com/u/7064011?v=4&s=48" width="48" height="48" alt="ogulcancelik" title="ogulcancelik"/></a>
|
||||||
<a href="https://github.com/search?q=Kit"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Kit" title="Kit"/></a> <a href="https://github.com/koala73"><img src="https://avatars.githubusercontent.com/u/996596?v=4&s=48" width="48" height="48" alt="koala73" title="koala73"/></a> <a href="https://github.com/manmal"><img src="https://avatars.githubusercontent.com/u/142797?v=4&s=48" width="48" height="48" alt="manmal" title="manmal"/></a> <a href="https://github.com/ogulcancelik"><img src="https://avatars.githubusercontent.com/u/7064011?v=4&s=48" width="48" height="48" alt="ogulcancelik" title="ogulcancelik"/></a> <a href="https://github.com/pasogott"><img src="https://avatars.githubusercontent.com/u/23458152?v=4&s=48" width="48" height="48" alt="pasogott" title="pasogott"/></a> <a href="https://github.com/petradonka"><img src="https://avatars.githubusercontent.com/u/7353770?v=4&s=48" width="48" height="48" alt="petradonka" title="petradonka"/></a> <a href="https://github.com/rubyrunsstuff"><img src="https://avatars.githubusercontent.com/u/246602379?v=4&s=48" width="48" height="48" alt="rubyrunsstuff" title="rubyrunsstuff"/></a> <a href="https://github.com/sibbl"><img src="https://avatars.githubusercontent.com/u/866535?v=4&s=48" width="48" height="48" alt="sibbl" title="sibbl"/></a> <a href="https://github.com/suminhthanh"><img src="https://avatars.githubusercontent.com/u/2907636?v=4&s=48" width="48" height="48" alt="suminhthanh" title="suminhthanh"/></a> <a href="https://github.com/VACInc"><img src="https://avatars.githubusercontent.com/u/3279061?v=4&s=48" width="48" height="48" alt="VACInc" title="VACInc"/></a>
|
<a href="https://github.com/pasogott"><img src="https://avatars.githubusercontent.com/u/23458152?v=4&s=48" width="48" height="48" alt="pasogott" title="pasogott"/></a> <a href="https://github.com/petradonka"><img src="https://avatars.githubusercontent.com/u/7353770?v=4&s=48" width="48" height="48" alt="petradonka" title="petradonka"/></a> <a href="https://github.com/rubyrunsstuff"><img src="https://avatars.githubusercontent.com/u/246602379?v=4&s=48" width="48" height="48" alt="rubyrunsstuff" title="rubyrunsstuff"/></a> <a href="https://github.com/VACInc"><img src="https://avatars.githubusercontent.com/u/3279061?v=4&s=48" width="48" height="48" alt="VACInc" title="VACInc"/></a> <a href="https://github.com/wes-davis"><img src="https://avatars.githubusercontent.com/u/16506720?v=4&s=48" width="48" height="48" alt="wes-davis" title="wes-davis"/></a> <a href="https://github.com/zats"><img src="https://avatars.githubusercontent.com/u/2688806?v=4&s=48" width="48" height="48" alt="zats" title="zats"/></a> <a href="https://github.com/24601"><img src="https://avatars.githubusercontent.com/u/1157207?v=4&s=48" width="48" height="48" alt="24601" title="24601"/></a> <a href="https://github.com/search?q=Chris%20Taylor"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Chris Taylor" title="Chris Taylor"/></a> <a href="https://github.com/djangonavarro220"><img src="https://avatars.githubusercontent.com/u/251162586?v=4&s=48" width="48" height="48" alt="Django Navarro" title="Django Navarro"/></a> <a href="https://github.com/evalexpr"><img src="https://avatars.githubusercontent.com/u/23485511?v=4&s=48" width="48" height="48" alt="evalexpr" title="evalexpr"/></a>
|
||||||
<a href="https://github.com/wes-davis"><img src="https://avatars.githubusercontent.com/u/16506720?v=4&s=48" width="48" height="48" alt="wes-davis" title="wes-davis"/></a> <a href="https://github.com/zats"><img src="https://avatars.githubusercontent.com/u/2688806?v=4&s=48" width="48" height="48" alt="zats" title="zats"/></a> <a href="https://github.com/24601"><img src="https://avatars.githubusercontent.com/u/1157207?v=4&s=48" width="48" height="48" alt="24601" title="24601"/></a> <a href="https://github.com/search?q=Chris%20Taylor"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Chris Taylor" title="Chris Taylor"/></a> <a href="https://github.com/djangonavarro220"><img src="https://avatars.githubusercontent.com/u/251162586?v=4&s=48" width="48" height="48" alt="Django Navarro" title="Django Navarro"/></a> <a href="https://github.com/evalexpr"><img src="https://avatars.githubusercontent.com/u/23485511?v=4&s=48" width="48" height="48" alt="evalexpr" title="evalexpr"/></a> <a href="https://github.com/henrino3"><img src="https://avatars.githubusercontent.com/u/4260288?v=4&s=48" width="48" height="48" alt="henrino3" title="henrino3"/></a> <a href="https://github.com/humanwritten"><img src="https://avatars.githubusercontent.com/u/206531610?v=4&s=48" width="48" height="48" alt="humanwritten" title="humanwritten"/></a> <a href="https://github.com/larlyssa"><img src="https://avatars.githubusercontent.com/u/13128869?v=4&s=48" width="48" height="48" alt="larlyssa" title="larlyssa"/></a> <a href="https://github.com/mkbehr"><img src="https://avatars.githubusercontent.com/u/1285?v=4&s=48" width="48" height="48" alt="mkbehr" title="mkbehr"/></a>
|
<a href="https://github.com/henrino3"><img src="https://avatars.githubusercontent.com/u/4260288?v=4&s=48" width="48" height="48" alt="henrino3" title="henrino3"/></a> <a href="https://github.com/humanwritten"><img src="https://avatars.githubusercontent.com/u/206531610?v=4&s=48" width="48" height="48" alt="humanwritten" title="humanwritten"/></a> <a href="https://github.com/larlyssa"><img src="https://avatars.githubusercontent.com/u/13128869?v=4&s=48" width="48" height="48" alt="larlyssa" title="larlyssa"/></a> <a href="https://github.com/mkbehr"><img src="https://avatars.githubusercontent.com/u/1285?v=4&s=48" width="48" height="48" alt="mkbehr" title="mkbehr"/></a> <a href="https://github.com/oswalpalash"><img src="https://avatars.githubusercontent.com/u/6431196?v=4&s=48" width="48" height="48" alt="oswalpalash" title="oswalpalash"/></a> <a href="https://github.com/pcty-nextgen-service-account"><img src="https://avatars.githubusercontent.com/u/112553441?v=4&s=48" width="48" height="48" alt="pcty-nextgen-service-account" title="pcty-nextgen-service-account"/></a> <a href="https://github.com/sibbl"><img src="https://avatars.githubusercontent.com/u/866535?v=4&s=48" width="48" height="48" alt="sibbl" title="sibbl"/></a> <a href="https://github.com/Syhids"><img src="https://avatars.githubusercontent.com/u/671202?v=4&s=48" width="48" height="48" alt="Syhids" title="Syhids"/></a> <a href="https://github.com/search?q=Aaron%20Konyer"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Aaron Konyer" title="Aaron Konyer"/></a> <a href="https://github.com/aaronveklabs"><img src="https://avatars.githubusercontent.com/u/225997828?v=4&s=48" width="48" height="48" alt="aaronveklabs" title="aaronveklabs"/></a>
|
||||||
<a href="https://github.com/oswalpalash"><img src="https://avatars.githubusercontent.com/u/6431196?v=4&s=48" width="48" height="48" alt="oswalpalash" title="oswalpalash"/></a> <a href="https://github.com/pcty-nextgen-service-account"><img src="https://avatars.githubusercontent.com/u/112553441?v=4&s=48" width="48" height="48" alt="pcty-nextgen-service-account" title="pcty-nextgen-service-account"/></a> <a href="https://github.com/Syhids"><img src="https://avatars.githubusercontent.com/u/671202?v=4&s=48" width="48" height="48" alt="Syhids" title="Syhids"/></a> <a href="https://github.com/search?q=Aaron%20Konyer"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Aaron Konyer" title="Aaron Konyer"/></a> <a href="https://github.com/aaronveklabs"><img src="https://avatars.githubusercontent.com/u/225997828?v=4&s=48" width="48" height="48" alt="aaronveklabs" title="aaronveklabs"/></a> <a href="https://github.com/adam91holt"><img src="https://avatars.githubusercontent.com/u/9592417?v=4&s=48" width="48" height="48" alt="adam91holt" title="adam91holt"/></a> <a href="https://github.com/search?q=ClawdFx"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="ClawdFx" title="ClawdFx"/></a> <a href="https://github.com/erik-agens"><img src="https://avatars.githubusercontent.com/u/80908960?v=4&s=48" width="48" height="48" alt="erik-agens" title="erik-agens"/></a> <a href="https://github.com/fcatuhe"><img src="https://avatars.githubusercontent.com/u/17382215?v=4&s=48" width="48" height="48" alt="fcatuhe" title="fcatuhe"/></a> <a href="https://github.com/ivanrvpereira"><img src="https://avatars.githubusercontent.com/u/183991?v=4&s=48" width="48" height="48" alt="ivanrvpereira" title="ivanrvpereira"/></a>
|
<a href="https://github.com/adam91holt"><img src="https://avatars.githubusercontent.com/u/9592417?v=4&s=48" width="48" height="48" alt="adam91holt" title="adam91holt"/></a> <a href="https://github.com/dougvk"><img src="https://avatars.githubusercontent.com/u/401660?v=4&s=48" width="48" height="48" alt="dougvk" title="dougvk"/></a> <a href="https://github.com/erik-agens"><img src="https://avatars.githubusercontent.com/u/80908960?v=4&s=48" width="48" height="48" alt="erik-agens" title="erik-agens"/></a> <a href="https://github.com/fcatuhe"><img src="https://avatars.githubusercontent.com/u/17382215?v=4&s=48" width="48" height="48" alt="fcatuhe" title="fcatuhe"/></a> <a href="https://github.com/ivanrvpereira"><img src="https://avatars.githubusercontent.com/u/183991?v=4&s=48" width="48" height="48" alt="ivanrvpereira" title="ivanrvpereira"/></a> <a href="https://github.com/jayhickey"><img src="https://avatars.githubusercontent.com/u/1676460?v=4&s=48" width="48" height="48" alt="jayhickey" title="jayhickey"/></a> <a href="https://github.com/jeffersonwarrior"><img src="https://avatars.githubusercontent.com/u/89030989?v=4&s=48" width="48" height="48" alt="jeffersonwarrior" title="jeffersonwarrior"/></a> <a href="https://github.com/search?q=jeffersonwarrior"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="jeffersonwarrior" title="jeffersonwarrior"/></a> <a href="https://github.com/jdrhyne"><img src="https://avatars.githubusercontent.com/u/7828464?v=4&s=48" width="48" height="48" alt="Jonathan D. Rhyne (DJ-D)" title="Jonathan D. Rhyne (DJ-D)"/></a> <a href="https://github.com/jverdi"><img src="https://avatars.githubusercontent.com/u/345050?v=4&s=48" width="48" height="48" alt="jverdi" title="jverdi"/></a>
|
||||||
<a href="https://github.com/jayhickey"><img src="https://avatars.githubusercontent.com/u/1676460?v=4&s=48" width="48" height="48" alt="jayhickey" title="jayhickey"/></a> <a href="https://github.com/jeffersonwarrior"><img src="https://avatars.githubusercontent.com/u/89030989?v=4&s=48" width="48" height="48" alt="jeffersonwarrior" title="jeffersonwarrior"/></a> <a href="https://github.com/search?q=jeffersonwarrior"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="jeffersonwarrior" title="jeffersonwarrior"/></a> <a href="https://github.com/jdrhyne"><img src="https://avatars.githubusercontent.com/u/7828464?v=4&s=48" width="48" height="48" alt="Jonathan D. Rhyne (DJ-D)" title="Jonathan D. Rhyne (DJ-D)"/></a> <a href="https://github.com/jverdi"><img src="https://avatars.githubusercontent.com/u/345050?v=4&s=48" width="48" height="48" alt="jverdi" title="jverdi"/></a> <a href="https://github.com/longmaba"><img src="https://avatars.githubusercontent.com/u/9361500?v=4&s=48" width="48" height="48" alt="longmaba" title="longmaba"/></a> <a href="https://github.com/mickahouan"><img src="https://avatars.githubusercontent.com/u/31423109?v=4&s=48" width="48" height="48" alt="mickahouan" title="mickahouan"/></a> <a href="https://github.com/mjrussell"><img src="https://avatars.githubusercontent.com/u/1641895?v=4&s=48" width="48" height="48" alt="mjrussell" title="mjrussell"/></a> <a href="https://github.com/p6l-richard"><img src="https://avatars.githubusercontent.com/u/18185649?v=4&s=48" width="48" height="48" alt="p6l-richard" title="p6l-richard"/></a> <a href="https://github.com/philipp-spiess"><img src="https://avatars.githubusercontent.com/u/458591?v=4&s=48" width="48" height="48" alt="philipp-spiess" title="philipp-spiess"/></a>
|
<a href="https://github.com/longmaba"><img src="https://avatars.githubusercontent.com/u/9361500?v=4&s=48" width="48" height="48" alt="longmaba" title="longmaba"/></a> <a href="https://github.com/mickahouan"><img src="https://avatars.githubusercontent.com/u/31423109?v=4&s=48" width="48" height="48" alt="mickahouan" title="mickahouan"/></a> <a href="https://github.com/mjrussell"><img src="https://avatars.githubusercontent.com/u/1641895?v=4&s=48" width="48" height="48" alt="mjrussell" title="mjrussell"/></a> <a href="https://github.com/p6l-richard"><img src="https://avatars.githubusercontent.com/u/18185649?v=4&s=48" width="48" height="48" alt="p6l-richard" title="p6l-richard"/></a> <a href="https://github.com/philipp-spiess"><img src="https://avatars.githubusercontent.com/u/458591?v=4&s=48" width="48" height="48" alt="philipp-spiess" title="philipp-spiess"/></a> <a href="https://github.com/robaxelsen"><img src="https://avatars.githubusercontent.com/u/13132899?v=4&s=48" width="48" height="48" alt="robaxelsen" title="robaxelsen"/></a> <a href="https://github.com/search?q=Sash%20Catanzarite"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Sash Catanzarite" title="Sash Catanzarite"/></a> <a href="https://github.com/T5-AndyML"><img src="https://avatars.githubusercontent.com/u/22801233?v=4&s=48" width="48" height="48" alt="T5-AndyML" title="T5-AndyML"/></a> <a href="https://github.com/search?q=VAC"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="VAC" title="VAC"/></a> <a href="https://github.com/zknicker"><img src="https://avatars.githubusercontent.com/u/1164085?v=4&s=48" width="48" height="48" alt="zknicker" title="zknicker"/></a>
|
||||||
<a href="https://github.com/robaxelsen"><img src="https://avatars.githubusercontent.com/u/13132899?v=4&s=48" width="48" height="48" alt="robaxelsen" title="robaxelsen"/></a> <a href="https://github.com/search?q=Sash%20Catanzarite"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Sash Catanzarite" title="Sash Catanzarite"/></a> <a href="https://github.com/T5-AndyML"><img src="https://avatars.githubusercontent.com/u/22801233?v=4&s=48" width="48" height="48" alt="T5-AndyML" title="T5-AndyML"/></a> <a href="https://github.com/search?q=VAC"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="VAC" title="VAC"/></a> <a href="https://github.com/zknicker"><img src="https://avatars.githubusercontent.com/u/1164085?v=4&s=48" width="48" height="48" alt="zknicker" title="zknicker"/></a> <a href="https://github.com/search?q=alejandro%20maza"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="alejandro maza" title="alejandro maza"/></a> <a href="https://github.com/ameno-"><img src="https://avatars.githubusercontent.com/u/2416135?v=4&s=48" width="48" height="48" alt="ameno-" title="ameno-"/></a> <a href="https://github.com/andrewting19"><img src="https://avatars.githubusercontent.com/u/10536704?v=4&s=48" width="48" height="48" alt="andrewting19" title="andrewting19"/></a> <a href="https://github.com/anpoirier"><img src="https://avatars.githubusercontent.com/u/1245729?v=4&s=48" width="48" height="48" alt="anpoirier" title="anpoirier"/></a> <a href="https://github.com/Asleep123"><img src="https://avatars.githubusercontent.com/u/122379135?v=4&s=48" width="48" height="48" alt="Asleep123" title="Asleep123"/></a>
|
<a href="https://github.com/search?q=alejandro%20maza"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="alejandro maza" title="alejandro maza"/></a> <a href="https://github.com/andrewting19"><img src="https://avatars.githubusercontent.com/u/10536704?v=4&s=48" width="48" height="48" alt="andrewting19" title="andrewting19"/></a> <a href="https://github.com/anpoirier"><img src="https://avatars.githubusercontent.com/u/1245729?v=4&s=48" width="48" height="48" alt="anpoirier" title="anpoirier"/></a> <a href="https://github.com/Asleep123"><img src="https://avatars.githubusercontent.com/u/122379135?v=4&s=48" width="48" height="48" alt="Asleep123" title="Asleep123"/></a> <a href="https://github.com/bolismauro"><img src="https://avatars.githubusercontent.com/u/771999?v=4&s=48" width="48" height="48" alt="bolismauro" title="bolismauro"/></a> <a href="https://github.com/cash-echo-bot"><img src="https://avatars.githubusercontent.com/u/252747386?v=4&s=48" width="48" height="48" alt="cash-echo-bot" title="cash-echo-bot"/></a> <a href="https://github.com/search?q=Clawd"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Clawd" title="Clawd"/></a> <a href="https://github.com/conhecendocontato"><img src="https://avatars.githubusercontent.com/u/82890727?v=4&s=48" width="48" height="48" alt="conhecendocontato" title="conhecendocontato"/></a> <a href="https://github.com/search?q=Dimitrios%20Ploutarchos"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Dimitrios Ploutarchos" title="Dimitrios Ploutarchos"/></a> <a href="https://github.com/search?q=Drake%20Thomsen"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Drake Thomsen" title="Drake Thomsen"/></a>
|
||||||
<a href="https://github.com/bolismauro"><img src="https://avatars.githubusercontent.com/u/771999?v=4&s=48" width="48" height="48" alt="bolismauro" title="bolismauro"/></a> <a href="https://github.com/cash-echo-bot"><img src="https://avatars.githubusercontent.com/u/252747386?v=4&s=48" width="48" height="48" alt="cash-echo-bot" title="cash-echo-bot"/></a> <a href="https://github.com/search?q=Clawd"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Clawd" title="Clawd"/></a> <a href="https://github.com/conhecendocontato"><img src="https://avatars.githubusercontent.com/u/82890727?v=4&s=48" width="48" height="48" alt="conhecendocontato" title="conhecendocontato"/></a> <a href="https://github.com/search?q=Dimitrios%20Ploutarchos"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Dimitrios Ploutarchos" title="Dimitrios Ploutarchos"/></a> <a href="https://github.com/search?q=Drake%20Thomsen"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Drake Thomsen" title="Drake Thomsen"/></a> <a href="https://github.com/search?q=Felix%20Krause"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Felix Krause" title="Felix Krause"/></a> <a href="https://github.com/gtsifrikas"><img src="https://avatars.githubusercontent.com/u/8904378?v=4&s=48" width="48" height="48" alt="gtsifrikas" title="gtsifrikas"/></a> <a href="https://github.com/HazAT"><img src="https://avatars.githubusercontent.com/u/363802?v=4&s=48" width="48" height="48" alt="HazAT" title="HazAT"/></a> <a href="https://github.com/hrdwdmrbl"><img src="https://avatars.githubusercontent.com/u/554881?v=4&s=48" width="48" height="48" alt="hrdwdmrbl" title="hrdwdmrbl"/></a>
|
<a href="https://github.com/search?q=Felix%20Krause"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Felix Krause" title="Felix Krause"/></a> <a href="https://github.com/gtsifrikas"><img src="https://avatars.githubusercontent.com/u/8904378?v=4&s=48" width="48" height="48" alt="gtsifrikas" title="gtsifrikas"/></a> <a href="https://github.com/HazAT"><img src="https://avatars.githubusercontent.com/u/363802?v=4&s=48" width="48" height="48" alt="HazAT" title="HazAT"/></a> <a href="https://github.com/hrdwdmrbl"><img src="https://avatars.githubusercontent.com/u/554881?v=4&s=48" width="48" height="48" alt="hrdwdmrbl" title="hrdwdmrbl"/></a> <a href="https://github.com/hugobarauna"><img src="https://avatars.githubusercontent.com/u/2719?v=4&s=48" width="48" height="48" alt="hugobarauna" title="hugobarauna"/></a> <a href="https://github.com/search?q=Jamie%20Openshaw"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Jamie Openshaw" title="Jamie Openshaw"/></a> <a href="https://github.com/search?q=Jarvis"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Jarvis" title="Jarvis"/></a> <a href="https://github.com/search?q=Jefferson%20Nunn"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Jefferson Nunn" title="Jefferson Nunn"/></a> <a href="https://github.com/search?q=Kevin%20Lin"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Kevin Lin" title="Kevin Lin"/></a> <a href="https://github.com/kitze"><img src="https://avatars.githubusercontent.com/u/1160594?v=4&s=48" width="48" height="48" alt="kitze" title="kitze"/></a>
|
||||||
<a href="https://github.com/hugobarauna"><img src="https://avatars.githubusercontent.com/u/2719?v=4&s=48" width="48" height="48" alt="hugobarauna" title="hugobarauna"/></a> <a href="https://github.com/search?q=Jamie%20Openshaw"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Jamie Openshaw" title="Jamie Openshaw"/></a> <a href="https://github.com/search?q=Jarvis"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Jarvis" title="Jarvis"/></a> <a href="https://github.com/search?q=Jefferson%20Nunn"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Jefferson Nunn" title="Jefferson Nunn"/></a> <a href="https://github.com/search?q=Kevin%20Lin"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Kevin Lin" title="Kevin Lin"/></a> <a href="https://github.com/kitze"><img src="https://avatars.githubusercontent.com/u/1160594?v=4&s=48" width="48" height="48" alt="kitze" title="kitze"/></a> <a href="https://github.com/levifig"><img src="https://avatars.githubusercontent.com/u/1605?v=4&s=48" width="48" height="48" alt="levifig" title="levifig"/></a> <a href="https://github.com/search?q=Lloyd"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Lloyd" title="Lloyd"/></a> <a href="https://github.com/loukotal"><img src="https://avatars.githubusercontent.com/u/18210858?v=4&s=48" width="48" height="48" alt="loukotal" title="loukotal"/></a> <a href="https://github.com/martinpucik"><img src="https://avatars.githubusercontent.com/u/5503097?v=4&s=48" width="48" height="48" alt="martinpucik" title="martinpucik"/></a>
|
<a href="https://github.com/levifig"><img src="https://avatars.githubusercontent.com/u/1605?v=4&s=48" width="48" height="48" alt="levifig" title="levifig"/></a> <a href="https://github.com/search?q=Lloyd"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Lloyd" title="Lloyd"/></a> <a href="https://github.com/loukotal"><img src="https://avatars.githubusercontent.com/u/18210858?v=4&s=48" width="48" height="48" alt="loukotal" title="loukotal"/></a> <a href="https://github.com/martinpucik"><img src="https://avatars.githubusercontent.com/u/5503097?v=4&s=48" width="48" height="48" alt="martinpucik" title="martinpucik"/></a> <a href="https://github.com/search?q=Miles"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Miles" title="Miles"/></a> <a href="https://github.com/mrdbstn"><img src="https://avatars.githubusercontent.com/u/58957632?v=4&s=48" width="48" height="48" alt="mrdbstn" title="mrdbstn"/></a> <a href="https://github.com/MSch"><img src="https://avatars.githubusercontent.com/u/7475?v=4&s=48" width="48" height="48" alt="MSch" title="MSch"/></a> <a href="https://github.com/search?q=Mustafa%20Tag%20Eldeen"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Mustafa Tag Eldeen" title="Mustafa Tag Eldeen"/></a> <a href="https://github.com/ndraiman"><img src="https://avatars.githubusercontent.com/u/12609607?v=4&s=48" width="48" height="48" alt="ndraiman" title="ndraiman"/></a> <a href="https://github.com/nexty5870"><img src="https://avatars.githubusercontent.com/u/3869659?v=4&s=48" width="48" height="48" alt="nexty5870" title="nexty5870"/></a>
|
||||||
<a href="https://github.com/search?q=Miles"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Miles" title="Miles"/></a> <a href="https://github.com/mrdbstn"><img src="https://avatars.githubusercontent.com/u/58957632?v=4&s=48" width="48" height="48" alt="mrdbstn" title="mrdbstn"/></a> <a href="https://github.com/MSch"><img src="https://avatars.githubusercontent.com/u/7475?v=4&s=48" width="48" height="48" alt="MSch" title="MSch"/></a> <a href="https://github.com/search?q=Mustafa%20Tag%20Eldeen"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Mustafa Tag Eldeen" title="Mustafa Tag Eldeen"/></a> <a href="https://github.com/ndraiman"><img src="https://avatars.githubusercontent.com/u/12609607?v=4&s=48" width="48" height="48" alt="ndraiman" title="ndraiman"/></a> <a href="https://github.com/nexty5870"><img src="https://avatars.githubusercontent.com/u/3869659?v=4&s=48" width="48" height="48" alt="nexty5870" title="nexty5870"/></a> <a href="https://github.com/odysseus0"><img src="https://avatars.githubusercontent.com/u/8635094?v=4&s=48" width="48" height="48" alt="odysseus0" title="odysseus0"/></a> <a href="https://github.com/prathamdby"><img src="https://avatars.githubusercontent.com/u/134331217?v=4&s=48" width="48" height="48" alt="prathamdby" title="prathamdby"/></a> <a href="https://github.com/reeltimeapps"><img src="https://avatars.githubusercontent.com/u/637338?v=4&s=48" width="48" height="48" alt="reeltimeapps" title="reeltimeapps"/></a> <a href="https://github.com/RLTCmpe"><img src="https://avatars.githubusercontent.com/u/10762242?v=4&s=48" width="48" height="48" alt="RLTCmpe" title="RLTCmpe"/></a>
|
<a href="https://github.com/prathamdby"><img src="https://avatars.githubusercontent.com/u/134331217?v=4&s=48" width="48" height="48" alt="prathamdby" title="prathamdby"/></a> <a href="https://github.com/reeltimeapps"><img src="https://avatars.githubusercontent.com/u/637338?v=4&s=48" width="48" height="48" alt="reeltimeapps" title="reeltimeapps"/></a> <a href="https://github.com/RLTCmpe"><img src="https://avatars.githubusercontent.com/u/10762242?v=4&s=48" width="48" height="48" alt="RLTCmpe" title="RLTCmpe"/></a> <a href="https://github.com/rodrigouroz"><img src="https://avatars.githubusercontent.com/u/384037?v=4&s=48" width="48" height="48" alt="rodrigouroz" title="rodrigouroz"/></a> <a href="https://github.com/search?q=Rolf%20Fredheim"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Rolf Fredheim" title="Rolf Fredheim"/></a> <a href="https://github.com/search?q=Rony%20Kelner"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Rony Kelner" title="Rony Kelner"/></a> <a href="https://github.com/search?q=Samrat%20Jha"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Samrat Jha" title="Samrat Jha"/></a> <a href="https://github.com/siraht"><img src="https://avatars.githubusercontent.com/u/73152895?v=4&s=48" width="48" height="48" alt="siraht" title="siraht"/></a> <a href="https://github.com/snopoke"><img src="https://avatars.githubusercontent.com/u/249606?v=4&s=48" width="48" height="48" alt="snopoke" title="snopoke"/></a> <a href="https://github.com/suminhthanh"><img src="https://avatars.githubusercontent.com/u/2907636?v=4&s=48" width="48" height="48" alt="suminhthanh" title="suminhthanh"/></a>
|
||||||
<a href="https://github.com/rodrigouroz"><img src="https://avatars.githubusercontent.com/u/384037?v=4&s=48" width="48" height="48" alt="rodrigouroz" title="rodrigouroz"/></a> <a href="https://github.com/search?q=Rolf%20Fredheim"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Rolf Fredheim" title="Rolf Fredheim"/></a> <a href="https://github.com/search?q=Rony%20Kelner"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Rony Kelner" title="Rony Kelner"/></a> <a href="https://github.com/search?q=Samrat%20Jha"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Samrat Jha" title="Samrat Jha"/></a> <a href="https://github.com/siraht"><img src="https://avatars.githubusercontent.com/u/73152895?v=4&s=48" width="48" height="48" alt="siraht" title="siraht"/></a> <a href="https://github.com/snopoke"><img src="https://avatars.githubusercontent.com/u/249606?v=4&s=48" width="48" height="48" alt="snopoke" title="snopoke"/></a> <a href="https://github.com/search?q=The%20Admiral"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="The Admiral" title="The Admiral"/></a> <a href="https://github.com/thesash"><img src="https://avatars.githubusercontent.com/u/1166151?v=4&s=48" width="48" height="48" alt="thesash" title="thesash"/></a> <a href="https://github.com/search?q=Ubuntu"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Ubuntu" title="Ubuntu"/></a> <a href="https://github.com/voidserf"><img src="https://avatars.githubusercontent.com/u/477673?v=4&s=48" width="48" height="48" alt="voidserf" title="voidserf"/></a>
|
<a href="https://github.com/search?q=The%20Admiral"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="The Admiral" title="The Admiral"/></a> <a href="https://github.com/thesash"><img src="https://avatars.githubusercontent.com/u/1166151?v=4&s=48" width="48" height="48" alt="thesash" title="thesash"/></a> <a href="https://github.com/search?q=Ubuntu"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Ubuntu" title="Ubuntu"/></a> <a href="https://github.com/voidserf"><img src="https://avatars.githubusercontent.com/u/477673?v=4&s=48" width="48" height="48" alt="voidserf" title="voidserf"/></a> <a href="https://github.com/wstock"><img src="https://avatars.githubusercontent.com/u/1394687?v=4&s=48" width="48" height="48" alt="wstock" title="wstock"/></a> <a href="https://github.com/search?q=Zach%20Knickerbocker"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Zach Knickerbocker" title="Zach Knickerbocker"/></a> <a href="https://github.com/Alphonse-arianee"><img src="https://avatars.githubusercontent.com/u/254457365?v=4&s=48" width="48" height="48" alt="Alphonse-arianee" title="Alphonse-arianee"/></a> <a href="https://github.com/search?q=Azade"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Azade" title="Azade"/></a> <a href="https://github.com/carlulsoe"><img src="https://avatars.githubusercontent.com/u/34673973?v=4&s=48" width="48" height="48" alt="carlulsoe" title="carlulsoe"/></a> <a href="https://github.com/search?q=ddyo"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="ddyo" title="ddyo"/></a>
|
||||||
<a href="https://github.com/wstock"><img src="https://avatars.githubusercontent.com/u/1394687?v=4&s=48" width="48" height="48" alt="wstock" title="wstock"/></a> <a href="https://github.com/search?q=Zach%20Knickerbocker"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Zach Knickerbocker" title="Zach Knickerbocker"/></a> <a href="https://github.com/Alphonse-arianee"><img src="https://avatars.githubusercontent.com/u/254457365?v=4&s=48" width="48" height="48" alt="Alphonse-arianee" title="Alphonse-arianee"/></a> <a href="https://github.com/search?q=Azade"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Azade" title="Azade"/></a> <a href="https://github.com/carlulsoe"><img src="https://avatars.githubusercontent.com/u/34673973?v=4&s=48" width="48" height="48" alt="carlulsoe" title="carlulsoe"/></a> <a href="https://github.com/search?q=ddyo"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="ddyo" title="ddyo"/></a> <a href="https://github.com/search?q=Erik"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Erik" title="Erik"/></a> <a href="https://github.com/latitudeki5223"><img src="https://avatars.githubusercontent.com/u/119656367?v=4&s=48" width="48" height="48" alt="latitudeki5223" title="latitudeki5223"/></a> <a href="https://github.com/search?q=Manuel%20Maly"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Manuel Maly" title="Manuel Maly"/></a> <a href="https://github.com/search?q=Mourad%20Boustani"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Mourad Boustani" title="Mourad Boustani"/></a>
|
<a href="https://github.com/search?q=Erik"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Erik" title="Erik"/></a> <a href="https://github.com/latitudeki5223"><img src="https://avatars.githubusercontent.com/u/119656367?v=4&s=48" width="48" height="48" alt="latitudeki5223" title="latitudeki5223"/></a> <a href="https://github.com/search?q=Manuel%20Maly"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Manuel Maly" title="Manuel Maly"/></a> <a href="https://github.com/search?q=Mourad%20Boustani"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Mourad Boustani" title="Mourad Boustani"/></a> <a href="https://github.com/odrobnik"><img src="https://avatars.githubusercontent.com/u/333270?v=4&s=48" width="48" height="48" alt="odrobnik" title="odrobnik"/></a> <a href="https://github.com/pcty-nextgen-ios-builder"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="pcty-nextgen-ios-builder" title="pcty-nextgen-ios-builder"/></a> <a href="https://github.com/search?q=Quentin"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Quentin" title="Quentin"/></a> <a href="https://github.com/search?q=Randy%20Torres"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Randy Torres" title="Randy Torres"/></a> <a href="https://github.com/rhjoh"><img src="https://avatars.githubusercontent.com/u/105699450?v=4&s=48" width="48" height="48" alt="rhjoh" title="rhjoh"/></a> <a href="https://github.com/ronak-guliani"><img src="https://avatars.githubusercontent.com/u/23518228?v=4&s=48" width="48" height="48" alt="ronak-guliani" title="ronak-guliani"/></a>
|
||||||
<a href="https://github.com/odrobnik"><img src="https://avatars.githubusercontent.com/u/333270?v=4&s=48" width="48" height="48" alt="odrobnik" title="odrobnik"/></a> <a href="https://github.com/pcty-nextgen-ios-builder"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="pcty-nextgen-ios-builder" title="pcty-nextgen-ios-builder"/></a> <a href="https://github.com/search?q=Quentin"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Quentin" title="Quentin"/></a> <a href="https://github.com/search?q=Randy%20Torres"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="Randy Torres" title="Randy Torres"/></a> <a href="https://github.com/rhjoh"><img src="https://avatars.githubusercontent.com/u/105699450?v=4&s=48" width="48" height="48" alt="rhjoh" title="rhjoh"/></a> <a href="https://github.com/ronak-guliani"><img src="https://avatars.githubusercontent.com/u/23518228?v=4&s=48" width="48" height="48" alt="ronak-guliani" title="ronak-guliani"/></a> <a href="https://github.com/search?q=William%20Stock"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="William Stock" title="William Stock"/></a>
|
<a href="https://github.com/search?q=William%20Stock"><img src="assets/avatar-placeholder.svg" width="48" height="48" alt="William Stock" title="William Stock"/></a> <a href="https://github.com/p6l-richard"><img src="https://avatars.githubusercontent.com/u/18185649?v=4&s=48" width="48" height="48" alt="p6l-richard" title="p6l-richard"/></a>
|
||||||
</p>
|
</p>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"originHash" : "c0677e232394b5f6b0191b6dbb5bae553d55264f65ae725cd03a8ffdfda9cdd3",
|
"originHash" : "2e6f580ad7d1e839d513aa883350369bf2e4193fad872030fdaea7827f34d8ef",
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"identity" : "commander",
|
"identity" : "commander",
|
||||||
@@ -10,6 +10,24 @@
|
|||||||
"version" : "0.2.1"
|
"version" : "0.2.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"identity" : "elevenlabskit",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/steipete/ElevenLabsKit",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "c8679fbd37416a8780fe43be88a497ff16209e2d",
|
||||||
|
"version" : "0.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "swift-concurrency-extras",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/pointfreeco/swift-concurrency-extras",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "5a3825302b1a0d744183200915a47b508c828e6f",
|
||||||
|
"version" : "1.3.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"identity" : "swift-syntax",
|
"identity" : "swift-syntax",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
@@ -27,6 +45,24 @@
|
|||||||
"revision" : "399f76dcd91e4c688ca2301fa24a8cc6d9927211",
|
"revision" : "399f76dcd91e4c688ca2301fa24a8cc6d9927211",
|
||||||
"version" : "0.99.0"
|
"version" : "0.99.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "swiftui-math",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/gonzalezreal/swiftui-math",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "0b5c2cfaaec8d6193db206f675048eeb5ce95f71",
|
||||||
|
"version" : "0.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "textual",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/gonzalezreal/textual",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "a03c1e103d88de4ea0dd8320ea1611ec0d4b29b3",
|
||||||
|
"version" : "0.2.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version" : 3
|
"version" : 3
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
## Clawdbot Node (Android) (internal)
|
## Clawdbot Node (Android) (internal)
|
||||||
|
|
||||||
Modern Android node app: connects to the **Gateway WebSocket** (`_clawdbot-gw._tcp`) and exposes **Canvas + Chat + Camera**.
|
Modern Android node app: connects to the **Gateway WebSocket** (`_clawdbot-gateway._tcp`) and exposes **Canvas + Chat + Camera**.
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
- The node keeps the connection alive via a **foreground service** (persistent notification with a Disconnect action).
|
- The node keeps the connection alive via a **foreground service** (persistent notification with a Disconnect action).
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ android {
|
|||||||
applicationId = "com.clawdbot.android"
|
applicationId = "com.clawdbot.android"
|
||||||
minSdk = 31
|
minSdk = 31
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 202601200
|
versionCode = 202601114
|
||||||
versionName = "2026.1.20"
|
versionName = "2026.1.11-4"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class GatewayDiscovery(
|
|||||||
private val nsd = context.getSystemService(NsdManager::class.java)
|
private val nsd = context.getSystemService(NsdManager::class.java)
|
||||||
private val connectivity = context.getSystemService(ConnectivityManager::class.java)
|
private val connectivity = context.getSystemService(ConnectivityManager::class.java)
|
||||||
private val dns = DnsResolver.getInstance()
|
private val dns = DnsResolver.getInstance()
|
||||||
private val serviceType = "_clawdbot-gw._tcp."
|
private val serviceType = "_clawdbot-gateway._tcp."
|
||||||
private val wideAreaDomain = "clawdbot.internal."
|
private val wideAreaDomain = "clawdbot.internal."
|
||||||
private val logTag = "Clawdbot/GatewayDiscovery"
|
private val logTag = "Clawdbot/GatewayDiscovery"
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,9 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2026.1.20</string>
|
<string>2026.1.9</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>20260120</string>
|
<string>20260109</string>
|
||||||
<key>NSAppTransportSecurity</key>
|
<key>NSAppTransportSecurity</key>
|
||||||
<dict>
|
<dict>
|
||||||
<key>NSAllowsArbitraryLoadsInWebContent</key>
|
<key>NSAllowsArbitraryLoadsInWebContent</key>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
</dict>
|
</dict>
|
||||||
<key>NSBonjourServices</key>
|
<key>NSBonjourServices</key>
|
||||||
<array>
|
<array>
|
||||||
<string>_clawdbot-gw._tcp</string>
|
<string>_clawdbot-gateway._tcp</string>
|
||||||
</array>
|
</array>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<string>Clawdbot can capture photos or short video clips when requested via the gateway.</string>
|
<string>Clawdbot can capture photos or short video clips when requested via the gateway.</string>
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ import Testing
|
|||||||
@Test func stableIDForServiceDecodesAndNormalizesName() {
|
@Test func stableIDForServiceDecodesAndNormalizesName() {
|
||||||
let endpoint = NWEndpoint.service(
|
let endpoint = NWEndpoint.service(
|
||||||
name: "Clawdbot\\032Gateway \\032 Node\n",
|
name: "Clawdbot\\032Gateway \\032 Node\n",
|
||||||
type: "_clawdbot-gw._tcp",
|
type: "_clawdbot-gateway._tcp",
|
||||||
domain: "local.",
|
domain: "local.",
|
||||||
interface: nil)
|
interface: nil)
|
||||||
|
|
||||||
#expect(GatewayEndpointID.stableID(endpoint) == "_clawdbot-gw._tcp|local.|Clawdbot Gateway Node")
|
#expect(GatewayEndpointID.stableID(endpoint) == "_clawdbot-gateway._tcp|local.|Clawdbot Gateway Node")
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test func stableIDForNonServiceUsesEndpointDescription() {
|
@Test func stableIDForNonServiceUsesEndpointDescription() {
|
||||||
@@ -22,7 +22,7 @@ import Testing
|
|||||||
@Test func prettyDescriptionDecodesBonjourEscapes() {
|
@Test func prettyDescriptionDecodesBonjourEscapes() {
|
||||||
let endpoint = NWEndpoint.service(
|
let endpoint = NWEndpoint.service(
|
||||||
name: "Clawdbot\\032Gateway",
|
name: "Clawdbot\\032Gateway",
|
||||||
type: "_clawdbot-gw._tcp",
|
type: "_clawdbot-gateway._tcp",
|
||||||
domain: "local.",
|
domain: "local.",
|
||||||
interface: nil)
|
interface: nil)
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>BNDL</string>
|
<string>BNDL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2026.1.20</string>
|
<string>2026.1.9</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>20260120</string>
|
<string>20260109</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
@@ -81,8 +81,8 @@ targets:
|
|||||||
properties:
|
properties:
|
||||||
CFBundleDisplayName: Clawdbot
|
CFBundleDisplayName: Clawdbot
|
||||||
CFBundleIconName: AppIcon
|
CFBundleIconName: AppIcon
|
||||||
CFBundleShortVersionString: "2026.1.20"
|
CFBundleShortVersionString: "2026.1.9"
|
||||||
CFBundleVersion: "20260120"
|
CFBundleVersion: "20260109"
|
||||||
UILaunchScreen: {}
|
UILaunchScreen: {}
|
||||||
UIApplicationSceneManifest:
|
UIApplicationSceneManifest:
|
||||||
UIApplicationSupportsMultipleScenes: false
|
UIApplicationSupportsMultipleScenes: false
|
||||||
@@ -92,7 +92,7 @@ targets:
|
|||||||
NSAppTransportSecurity:
|
NSAppTransportSecurity:
|
||||||
NSAllowsArbitraryLoadsInWebContent: true
|
NSAllowsArbitraryLoadsInWebContent: true
|
||||||
NSBonjourServices:
|
NSBonjourServices:
|
||||||
- _clawdbot-gw._tcp
|
- _clawdbot-gateway._tcp
|
||||||
NSCameraUsageDescription: Clawdbot can capture photos or short video clips when requested via the gateway.
|
NSCameraUsageDescription: Clawdbot can capture photos or short video clips when requested via the gateway.
|
||||||
NSLocationWhenInUseUsageDescription: Clawdbot uses your location when you allow location sharing.
|
NSLocationWhenInUseUsageDescription: Clawdbot uses your location when you allow location sharing.
|
||||||
NSLocationAlwaysAndWhenInUseUsageDescription: Clawdbot can share your location in the background when you enable Always.
|
NSLocationAlwaysAndWhenInUseUsageDescription: Clawdbot can share your location in the background when you enable Always.
|
||||||
@@ -130,5 +130,5 @@ targets:
|
|||||||
path: Tests/Info.plist
|
path: Tests/Info.plist
|
||||||
properties:
|
properties:
|
||||||
CFBundleDisplayName: ClawdbotTests
|
CFBundleDisplayName: ClawdbotTests
|
||||||
CFBundleShortVersionString: "2026.1.20"
|
CFBundleShortVersionString: "2026.1.9"
|
||||||
CFBundleVersion: "20260120"
|
CFBundleVersion: "20260109"
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"originHash" : "550d4ea41d4bb2546b99a7bfa1c5cba7e28a13862bc226727ea7426c61555a33",
|
"originHash" : "4ed05a95fa9feada29b97f81b3194392e59a0c7b9edf24851f922bc2b72b0438",
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"identity" : "axorcist",
|
"identity" : "axorcist",
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ let package = Package(
|
|||||||
.library(name: "ClawdbotIPC", targets: ["ClawdbotIPC"]),
|
.library(name: "ClawdbotIPC", targets: ["ClawdbotIPC"]),
|
||||||
.library(name: "ClawdbotDiscovery", targets: ["ClawdbotDiscovery"]),
|
.library(name: "ClawdbotDiscovery", targets: ["ClawdbotDiscovery"]),
|
||||||
.executable(name: "Clawdbot", targets: ["Clawdbot"]),
|
.executable(name: "Clawdbot", targets: ["Clawdbot"]),
|
||||||
.executable(name: "clawdbot-mac", targets: ["ClawdbotMacCLI"]),
|
.executable(name: "clawdbot-mac-discovery", targets: ["ClawdbotDiscoveryCLI"]),
|
||||||
|
.executable(name: "clawdbot-mac-wizard", targets: ["ClawdbotWizardCLI"]),
|
||||||
],
|
],
|
||||||
dependencies: [
|
dependencies: [
|
||||||
.package(url: "https://github.com/orchetect/MenuBarExtraAccess", exact: "1.2.2"),
|
.package(url: "https://github.com/orchetect/MenuBarExtraAccess", exact: "1.2.2"),
|
||||||
@@ -66,13 +67,21 @@ let package = Package(
|
|||||||
.enableUpcomingFeature("StrictConcurrency"),
|
.enableUpcomingFeature("StrictConcurrency"),
|
||||||
]),
|
]),
|
||||||
.executableTarget(
|
.executableTarget(
|
||||||
name: "ClawdbotMacCLI",
|
name: "ClawdbotDiscoveryCLI",
|
||||||
dependencies: [
|
dependencies: [
|
||||||
"ClawdbotDiscovery",
|
"ClawdbotDiscovery",
|
||||||
|
],
|
||||||
|
path: "Sources/ClawdbotDiscoveryCLI",
|
||||||
|
swiftSettings: [
|
||||||
|
.enableUpcomingFeature("StrictConcurrency"),
|
||||||
|
]),
|
||||||
|
.executableTarget(
|
||||||
|
name: "ClawdbotWizardCLI",
|
||||||
|
dependencies: [
|
||||||
.product(name: "ClawdbotKit", package: "ClawdbotKit"),
|
.product(name: "ClawdbotKit", package: "ClawdbotKit"),
|
||||||
.product(name: "ClawdbotProtocol", package: "ClawdbotKit"),
|
.product(name: "ClawdbotProtocol", package: "ClawdbotKit"),
|
||||||
],
|
],
|
||||||
path: "Sources/ClawdbotMacCLI",
|
path: "Sources/ClawdbotWizardCLI",
|
||||||
swiftSettings: [
|
swiftSettings: [
|
||||||
.enableUpcomingFeature("StrictConcurrency"),
|
.enableUpcomingFeature("StrictConcurrency"),
|
||||||
]),
|
]),
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ private struct EventRow: View {
|
|||||||
return f.string(from: date)
|
return f.string(from: date)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func prettyJSON(_ dict: [String: ClawdbotProtocol.AnyCodable]) -> String? {
|
private func prettyJSON(_ dict: [String: AnyCodable]) -> String? {
|
||||||
let normalized = dict.mapValues { $0.value }
|
let normalized = dict.mapValues { $0.value }
|
||||||
guard JSONSerialization.isValidJSONObject(normalized),
|
guard JSONSerialization.isValidJSONObject(normalized),
|
||||||
let data = try? JSONSerialization.data(withJSONObject: normalized, options: [.prettyPrinted]),
|
let data = try? JSONSerialization.data(withJSONObject: normalized, options: [.prettyPrinted]),
|
||||||
@@ -98,10 +98,7 @@ struct AgentEventsWindow_Previews: PreviewProvider {
|
|||||||
seq: 1,
|
seq: 1,
|
||||||
stream: "tool",
|
stream: "tool",
|
||||||
ts: Date().timeIntervalSince1970 * 1000,
|
ts: Date().timeIntervalSince1970 * 1000,
|
||||||
data: [
|
data: ["phase": AnyCodable("start"), "name": AnyCodable("bash")],
|
||||||
"phase": ClawdbotProtocol.AnyCodable("start"),
|
|
||||||
"name": ClawdbotProtocol.AnyCodable("bash"),
|
|
||||||
],
|
|
||||||
summary: nil)
|
summary: nil)
|
||||||
AgentEventStore.shared.append(sample)
|
AgentEventStore.shared.append(sample)
|
||||||
return AgentEventsWindow()
|
return AgentEventsWindow()
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
import ClawdbotKit
|
|
||||||
import ClawdbotProtocol
|
import ClawdbotProtocol
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
// Prefer the ClawdbotKit wrapper to keep gateway request payloads consistent.
|
|
||||||
typealias AnyCodable = ClawdbotKit.AnyCodable
|
|
||||||
typealias InstanceIdentity = ClawdbotKit.InstanceIdentity
|
|
||||||
|
|
||||||
extension AnyCodable {
|
extension AnyCodable {
|
||||||
var stringValue: String? { self.value as? String }
|
var stringValue: String? { self.value as? String }
|
||||||
var boolValue: Bool? { self.value as? Bool }
|
var boolValue: Bool? { self.value as? Bool }
|
||||||
@@ -25,23 +20,3 @@ extension AnyCodable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ClawdbotProtocol.AnyCodable {
|
|
||||||
var stringValue: String? { self.value as? String }
|
|
||||||
var boolValue: Bool? { self.value as? Bool }
|
|
||||||
var intValue: Int? { self.value as? Int }
|
|
||||||
var doubleValue: Double? { self.value as? Double }
|
|
||||||
var dictionaryValue: [String: ClawdbotProtocol.AnyCodable]? { self.value as? [String: ClawdbotProtocol.AnyCodable] }
|
|
||||||
var arrayValue: [ClawdbotProtocol.AnyCodable]? { self.value as? [ClawdbotProtocol.AnyCodable] }
|
|
||||||
|
|
||||||
var foundationValue: Any {
|
|
||||||
switch self.value {
|
|
||||||
case let dict as [String: ClawdbotProtocol.AnyCodable]:
|
|
||||||
dict.mapValues { $0.foundationValue }
|
|
||||||
case let array as [ClawdbotProtocol.AnyCodable]:
|
|
||||||
array.map(\.foundationValue)
|
|
||||||
default:
|
|
||||||
self.value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -432,11 +432,11 @@ extension ChannelsSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func resolveChannelDetailTitle(_ id: String) -> String {
|
private func resolveChannelDetailTitle(_ id: String) -> String {
|
||||||
self.store.resolveChannelDetailLabel(id)
|
return self.store.resolveChannelDetailLabel(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func resolveChannelSystemImage(_ id: String) -> String {
|
private func resolveChannelSystemImage(_ id: String) -> String {
|
||||||
self.store.resolveChannelSystemImage(id)
|
return self.store.resolveChannelSystemImage(id)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func channelStatusDictionary(_ id: String) -> [String: AnyCodable]? {
|
private func channelStatusDictionary(_ id: String) -> [String: AnyCodable]? {
|
||||||
|
|||||||
@@ -163,9 +163,9 @@ struct ChannelsStatusSnapshot: Codable {
|
|||||||
let ts: Double
|
let ts: Double
|
||||||
let channelOrder: [String]
|
let channelOrder: [String]
|
||||||
let channelLabels: [String: String]
|
let channelLabels: [String: String]
|
||||||
let channelDetailLabels: [String: String]?
|
let channelDetailLabels: [String: String]? = nil
|
||||||
let channelSystemImages: [String: String]?
|
let channelSystemImages: [String: String]? = nil
|
||||||
let channelMeta: [ChannelUiMetaEntry]?
|
let channelMeta: [ChannelUiMetaEntry]? = nil
|
||||||
let channels: [String: AnyCodable]
|
let channels: [String: AnyCodable]
|
||||||
let channelAccounts: [String: [ChannelAccountSnapshot]]
|
let channelAccounts: [String: [ChannelAccountSnapshot]]
|
||||||
let channelDefaultAccountId: [String: String]
|
let channelDefaultAccountId: [String: String]
|
||||||
@@ -263,7 +263,7 @@ final class ChannelsStore {
|
|||||||
|
|
||||||
func orderedChannelIds() -> [String] {
|
func orderedChannelIds() -> [String] {
|
||||||
if let meta = self.snapshot?.channelMeta, !meta.isEmpty {
|
if let meta = self.snapshot?.channelMeta, !meta.isEmpty {
|
||||||
return meta.map(\.id)
|
return meta.map { $0.id }
|
||||||
}
|
}
|
||||||
return self.snapshot?.channelOrder ?? []
|
return self.snapshot?.channelOrder ?? []
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,19 +6,15 @@ struct ConfigSettings: View {
|
|||||||
private let isNixMode = ProcessInfo.processInfo.isNixMode
|
private let isNixMode = ProcessInfo.processInfo.isNixMode
|
||||||
@Bindable var store: ChannelsStore
|
@Bindable var store: ChannelsStore
|
||||||
@State private var hasLoaded = false
|
@State private var hasLoaded = false
|
||||||
@State private var activeSectionKey: String?
|
|
||||||
@State private var activeSubsection: SubsectionSelection?
|
|
||||||
|
|
||||||
init(store: ChannelsStore = .shared) {
|
init(store: ChannelsStore = .shared) {
|
||||||
self.store = store
|
self.store = store
|
||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
HStack(spacing: 16) {
|
ScrollView {
|
||||||
self.sidebar
|
self.content
|
||||||
self.detail
|
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
|
||||||
.task {
|
.task {
|
||||||
guard !self.hasLoaded else { return }
|
guard !self.hasLoaded else { return }
|
||||||
guard !self.isPreview else { return }
|
guard !self.isPreview else { return }
|
||||||
@@ -26,125 +22,42 @@ struct ConfigSettings: View {
|
|||||||
await self.store.loadConfigSchema()
|
await self.store.loadConfigSchema()
|
||||||
await self.store.loadConfig()
|
await self.store.loadConfig()
|
||||||
}
|
}
|
||||||
.onAppear { self.ensureSelection() }
|
|
||||||
.onChange(of: self.store.configSchemaLoading) { _, loading in
|
|
||||||
if !loading { self.ensureSelection() }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ConfigSettings {
|
extension ConfigSettings {
|
||||||
private enum SubsectionSelection: Hashable {
|
private var content: some View {
|
||||||
case all
|
VStack(alignment: .leading, spacing: 16) {
|
||||||
case key(String)
|
self.header
|
||||||
}
|
if let status = self.store.configStatus {
|
||||||
|
Text(status)
|
||||||
private struct ConfigSection: Identifiable {
|
.font(.callout)
|
||||||
let key: String
|
.foregroundStyle(.secondary)
|
||||||
let label: String
|
}
|
||||||
let help: String?
|
self.actionRow
|
||||||
let node: ConfigSchemaNode
|
Group {
|
||||||
|
if self.store.configSchemaLoading {
|
||||||
var id: String { self.key }
|
ProgressView().controlSize(.small)
|
||||||
}
|
} else if let schema = self.store.configSchema {
|
||||||
|
ConfigSchemaForm(store: self.store, schema: schema, path: [])
|
||||||
private struct ConfigSubsection: Identifiable {
|
.disabled(self.isNixMode)
|
||||||
let key: String
|
} else {
|
||||||
let label: String
|
Text("Schema unavailable.")
|
||||||
let help: String?
|
|
||||||
let node: ConfigSchemaNode
|
|
||||||
let path: ConfigPath
|
|
||||||
|
|
||||||
var id: String { self.key }
|
|
||||||
}
|
|
||||||
|
|
||||||
private var sections: [ConfigSection] {
|
|
||||||
guard let schema = self.store.configSchema else { return [] }
|
|
||||||
return self.resolveSections(schema)
|
|
||||||
}
|
|
||||||
|
|
||||||
private var activeSection: ConfigSection? {
|
|
||||||
self.sections.first { $0.key == self.activeSectionKey }
|
|
||||||
}
|
|
||||||
|
|
||||||
private var sidebar: some View {
|
|
||||||
ScrollView {
|
|
||||||
LazyVStack(alignment: .leading, spacing: 8) {
|
|
||||||
if self.sections.isEmpty {
|
|
||||||
Text("No config sections available.")
|
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
.padding(.horizontal, 6)
|
|
||||||
.padding(.vertical, 4)
|
|
||||||
} else {
|
|
||||||
ForEach(self.sections) { section in
|
|
||||||
self.sidebarRow(section)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.vertical, 10)
|
if self.store.configDirty, !self.isNixMode {
|
||||||
.padding(.horizontal, 10)
|
Text("Unsaved changes")
|
||||||
}
|
|
||||||
.frame(minWidth: 220, idealWidth: 240, maxWidth: 280, maxHeight: .infinity, alignment: .topLeading)
|
|
||||||
.background(
|
|
||||||
RoundedRectangle(cornerRadius: 12, style: .continuous)
|
|
||||||
.fill(Color(nsColor: .windowBackgroundColor)))
|
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous))
|
|
||||||
}
|
|
||||||
|
|
||||||
private var detail: some View {
|
|
||||||
VStack(alignment: .leading, spacing: 16) {
|
|
||||||
if self.store.configSchemaLoading {
|
|
||||||
ProgressView().controlSize(.small)
|
|
||||||
} else if let section = self.activeSection {
|
|
||||||
self.sectionDetail(section)
|
|
||||||
} else if self.store.configSchema != nil {
|
|
||||||
self.emptyDetail
|
|
||||||
} else {
|
|
||||||
Text("Schema unavailable.")
|
|
||||||
.font(.caption)
|
.font(.caption)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
}
|
}
|
||||||
|
Spacer(minLength: 0)
|
||||||
}
|
}
|
||||||
.frame(minWidth: 460, maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
}
|
|
||||||
|
|
||||||
private var emptyDetail: some View {
|
|
||||||
VStack(alignment: .leading, spacing: 8) {
|
|
||||||
self.header
|
|
||||||
Text("Select a config section to view settings.")
|
|
||||||
.font(.callout)
|
|
||||||
.foregroundStyle(.secondary)
|
|
||||||
}
|
|
||||||
.padding(.horizontal, 24)
|
.padding(.horizontal, 24)
|
||||||
.padding(.vertical, 18)
|
.padding(.vertical, 18)
|
||||||
}
|
.groupBoxStyle(PlainSettingsGroupBoxStyle())
|
||||||
|
|
||||||
private func sectionDetail(_ section: ConfigSection) -> some View {
|
|
||||||
ScrollView(.vertical) {
|
|
||||||
VStack(alignment: .leading, spacing: 16) {
|
|
||||||
self.header
|
|
||||||
if let status = self.store.configStatus {
|
|
||||||
Text(status)
|
|
||||||
.font(.callout)
|
|
||||||
.foregroundStyle(.secondary)
|
|
||||||
}
|
|
||||||
self.actionRow
|
|
||||||
self.sectionHeader(section)
|
|
||||||
self.subsectionNav(section)
|
|
||||||
self.sectionForm(section)
|
|
||||||
if self.store.configDirty, !self.isNixMode {
|
|
||||||
Text("Unsaved changes")
|
|
||||||
.font(.caption)
|
|
||||||
.foregroundStyle(.secondary)
|
|
||||||
}
|
|
||||||
Spacer(minLength: 0)
|
|
||||||
}
|
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
|
||||||
.padding(.horizontal, 24)
|
|
||||||
.padding(.vertical, 18)
|
|
||||||
.groupBoxStyle(PlainSettingsGroupBoxStyle())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
@@ -158,18 +71,6 @@ extension ConfigSettings {
|
|||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func sectionHeader(_ section: ConfigSection) -> some View {
|
|
||||||
VStack(alignment: .leading, spacing: 6) {
|
|
||||||
Text(section.label)
|
|
||||||
.font(.title3.weight(.semibold))
|
|
||||||
if let help = section.help {
|
|
||||||
Text(help)
|
|
||||||
.font(.callout)
|
|
||||||
.foregroundStyle(.secondary)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private var actionRow: some View {
|
private var actionRow: some View {
|
||||||
HStack(spacing: 10) {
|
HStack(spacing: 10) {
|
||||||
Button("Reload") {
|
Button("Reload") {
|
||||||
@@ -184,204 +85,6 @@ extension ConfigSettings {
|
|||||||
}
|
}
|
||||||
.buttonStyle(.bordered)
|
.buttonStyle(.bordered)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func sidebarRow(_ section: ConfigSection) -> some View {
|
|
||||||
let isSelected = self.activeSectionKey == section.key
|
|
||||||
return Button {
|
|
||||||
self.selectSection(section)
|
|
||||||
} label: {
|
|
||||||
VStack(alignment: .leading, spacing: 2) {
|
|
||||||
Text(section.label)
|
|
||||||
if let help = section.help {
|
|
||||||
Text(help)
|
|
||||||
.font(.caption)
|
|
||||||
.foregroundStyle(.secondary)
|
|
||||||
.lineLimit(2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.padding(.vertical, 6)
|
|
||||||
.padding(.horizontal, 8)
|
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
|
||||||
.background(isSelected ? Color.accentColor.opacity(0.18) : Color.clear)
|
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 10, style: .continuous))
|
|
||||||
.background(Color.clear)
|
|
||||||
.contentShape(Rectangle())
|
|
||||||
}
|
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
|
||||||
.buttonStyle(.plain)
|
|
||||||
.contentShape(Rectangle())
|
|
||||||
}
|
|
||||||
|
|
||||||
@ViewBuilder
|
|
||||||
private func subsectionNav(_ section: ConfigSection) -> some View {
|
|
||||||
let subsections = self.resolveSubsections(for: section)
|
|
||||||
if subsections.isEmpty {
|
|
||||||
EmptyView()
|
|
||||||
} else {
|
|
||||||
ScrollView(.horizontal, showsIndicators: false) {
|
|
||||||
HStack(spacing: 8) {
|
|
||||||
self.subsectionButton(
|
|
||||||
title: "All",
|
|
||||||
isSelected: self.activeSubsection == .all)
|
|
||||||
{
|
|
||||||
self.activeSubsection = .all
|
|
||||||
}
|
|
||||||
ForEach(subsections) { subsection in
|
|
||||||
self.subsectionButton(
|
|
||||||
title: subsection.label,
|
|
||||||
isSelected: self.activeSubsection == .key(subsection.key))
|
|
||||||
{
|
|
||||||
self.activeSubsection = .key(subsection.key)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.padding(.vertical, 2)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func subsectionButton(
|
|
||||||
title: String,
|
|
||||||
isSelected: Bool,
|
|
||||||
action: @escaping () -> Void) -> some View
|
|
||||||
{
|
|
||||||
Button(action: action) {
|
|
||||||
Text(title)
|
|
||||||
.font(.callout.weight(.semibold))
|
|
||||||
.foregroundStyle(isSelected ? Color.accentColor : .primary)
|
|
||||||
.padding(.horizontal, 10)
|
|
||||||
.padding(.vertical, 6)
|
|
||||||
.background(isSelected ? Color.accentColor.opacity(0.18) : Color(nsColor: .controlBackgroundColor))
|
|
||||||
.clipShape(Capsule())
|
|
||||||
}
|
|
||||||
.buttonStyle(.plain)
|
|
||||||
}
|
|
||||||
|
|
||||||
private func sectionForm(_ section: ConfigSection) -> some View {
|
|
||||||
let subsection = self.activeSubsection
|
|
||||||
let defaultPath: ConfigPath = [.key(section.key)]
|
|
||||||
let subsections = self.resolveSubsections(for: section)
|
|
||||||
let resolved: (ConfigSchemaNode, ConfigPath) = {
|
|
||||||
if case let .key(key) = subsection,
|
|
||||||
let match = subsections.first(where: { $0.key == key })
|
|
||||||
{
|
|
||||||
return (match.node, match.path)
|
|
||||||
}
|
|
||||||
return (self.resolvedSchemaNode(section.node), defaultPath)
|
|
||||||
}()
|
|
||||||
|
|
||||||
return ConfigSchemaForm(store: self.store, schema: resolved.0, path: resolved.1)
|
|
||||||
.disabled(self.isNixMode)
|
|
||||||
}
|
|
||||||
|
|
||||||
private func ensureSelection() {
|
|
||||||
guard let schema = self.store.configSchema else { return }
|
|
||||||
let sections = self.resolveSections(schema)
|
|
||||||
guard !sections.isEmpty else { return }
|
|
||||||
|
|
||||||
let active = sections.first { $0.key == self.activeSectionKey } ?? sections[0]
|
|
||||||
if self.activeSectionKey != active.key {
|
|
||||||
self.activeSectionKey = active.key
|
|
||||||
}
|
|
||||||
self.ensureSubsection(for: active)
|
|
||||||
}
|
|
||||||
|
|
||||||
private func ensureSubsection(for section: ConfigSection) {
|
|
||||||
let subsections = self.resolveSubsections(for: section)
|
|
||||||
guard !subsections.isEmpty else {
|
|
||||||
self.activeSubsection = nil
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
switch self.activeSubsection {
|
|
||||||
case .all:
|
|
||||||
return
|
|
||||||
case let .key(key):
|
|
||||||
if subsections.contains(where: { $0.key == key }) { return }
|
|
||||||
case .none:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
if let first = subsections.first {
|
|
||||||
self.activeSubsection = .key(first.key)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func selectSection(_ section: ConfigSection) {
|
|
||||||
guard self.activeSectionKey != section.key else { return }
|
|
||||||
self.activeSectionKey = section.key
|
|
||||||
let subsections = self.resolveSubsections(for: section)
|
|
||||||
if let first = subsections.first {
|
|
||||||
self.activeSubsection = .key(first.key)
|
|
||||||
} else {
|
|
||||||
self.activeSubsection = nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func resolveSections(_ root: ConfigSchemaNode) -> [ConfigSection] {
|
|
||||||
let node = self.resolvedSchemaNode(root)
|
|
||||||
let hints = self.store.configUiHints
|
|
||||||
let keys = node.properties.keys.sorted { lhs, rhs in
|
|
||||||
let orderA = hintForPath([.key(lhs)], hints: hints)?.order ?? 0
|
|
||||||
let orderB = hintForPath([.key(rhs)], hints: hints)?.order ?? 0
|
|
||||||
if orderA != orderB { return orderA < orderB }
|
|
||||||
return lhs < rhs
|
|
||||||
}
|
|
||||||
|
|
||||||
return keys.compactMap { key in
|
|
||||||
guard let child = node.properties[key] else { return nil }
|
|
||||||
let path: ConfigPath = [.key(key)]
|
|
||||||
let hint = hintForPath(path, hints: hints)
|
|
||||||
let label = hint?.label
|
|
||||||
?? child.title
|
|
||||||
?? self.humanize(key)
|
|
||||||
let help = hint?.help ?? child.description
|
|
||||||
return ConfigSection(key: key, label: label, help: help, node: child)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func resolveSubsections(for section: ConfigSection) -> [ConfigSubsection] {
|
|
||||||
let node = self.resolvedSchemaNode(section.node)
|
|
||||||
guard node.schemaType == "object" else { return [] }
|
|
||||||
let hints = self.store.configUiHints
|
|
||||||
let keys = node.properties.keys.sorted { lhs, rhs in
|
|
||||||
let orderA = hintForPath([.key(section.key), .key(lhs)], hints: hints)?.order ?? 0
|
|
||||||
let orderB = hintForPath([.key(section.key), .key(rhs)], hints: hints)?.order ?? 0
|
|
||||||
if orderA != orderB { return orderA < orderB }
|
|
||||||
return lhs < rhs
|
|
||||||
}
|
|
||||||
|
|
||||||
return keys.compactMap { key in
|
|
||||||
guard let child = node.properties[key] else { return nil }
|
|
||||||
let path: ConfigPath = [.key(section.key), .key(key)]
|
|
||||||
let hint = hintForPath(path, hints: hints)
|
|
||||||
let label = hint?.label
|
|
||||||
?? child.title
|
|
||||||
?? self.humanize(key)
|
|
||||||
let help = hint?.help ?? child.description
|
|
||||||
return ConfigSubsection(
|
|
||||||
key: key,
|
|
||||||
label: label,
|
|
||||||
help: help,
|
|
||||||
node: child,
|
|
||||||
path: path)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func resolvedSchemaNode(_ node: ConfigSchemaNode) -> ConfigSchemaNode {
|
|
||||||
let variants = node.anyOf.isEmpty ? node.oneOf : node.anyOf
|
|
||||||
if !variants.isEmpty {
|
|
||||||
let nonNull = variants.filter { !$0.isNullSchema }
|
|
||||||
if nonNull.count == 1, let only = nonNull.first { return only }
|
|
||||||
}
|
|
||||||
return node
|
|
||||||
}
|
|
||||||
|
|
||||||
private func humanize(_ key: String) -> String {
|
|
||||||
key.replacingOccurrences(of: "_", with: " ")
|
|
||||||
.replacingOccurrences(of: "-", with: " ")
|
|
||||||
.capitalized
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ConfigSettings_Previews: PreviewProvider {
|
struct ConfigSettings_Previews: PreviewProvider {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ struct ControlAgentEvent: Codable, Sendable, Identifiable {
|
|||||||
let seq: Int
|
let seq: Int
|
||||||
let stream: String
|
let stream: String
|
||||||
let ts: Double
|
let ts: Double
|
||||||
let data: [String: ClawdbotProtocol.AnyCodable]
|
let data: [String: AnyCodable]
|
||||||
let summary: String?
|
let summary: String?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -87,7 +87,15 @@ final class ControlChannel {
|
|||||||
|
|
||||||
func configure() async {
|
func configure() async {
|
||||||
self.logger.info("control channel configure mode=local")
|
self.logger.info("control channel configure mode=local")
|
||||||
await self.refreshEndpoint(reason: "configure")
|
self.state = .connecting
|
||||||
|
do {
|
||||||
|
try await GatewayConnection.shared.refresh()
|
||||||
|
self.state = .connected
|
||||||
|
PresenceReporter.shared.sendImmediate(reason: "connect")
|
||||||
|
} catch {
|
||||||
|
let message = self.friendlyGatewayMessage(error)
|
||||||
|
self.state = .degraded(message)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func configure(mode: Mode = .local) async throws {
|
func configure(mode: Mode = .local) async throws {
|
||||||
@@ -103,7 +111,7 @@ final class ControlChannel {
|
|||||||
"target=\(target, privacy: .public) identitySet=\(idSet, privacy: .public)")
|
"target=\(target, privacy: .public) identitySet=\(idSet, privacy: .public)")
|
||||||
self.state = .connecting
|
self.state = .connecting
|
||||||
_ = try await GatewayEndpointStore.shared.ensureRemoteControlTunnel()
|
_ = try await GatewayEndpointStore.shared.ensureRemoteControlTunnel()
|
||||||
await self.refreshEndpoint(reason: "configure")
|
await self.configure()
|
||||||
} catch {
|
} catch {
|
||||||
self.state = .degraded(error.localizedDescription)
|
self.state = .degraded(error.localizedDescription)
|
||||||
throw error
|
throw error
|
||||||
@@ -111,19 +119,6 @@ final class ControlChannel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func refreshEndpoint(reason: String) async {
|
|
||||||
self.logger.info("control channel refresh endpoint reason=\(reason, privacy: .public)")
|
|
||||||
self.state = .connecting
|
|
||||||
do {
|
|
||||||
try await self.establishGatewayConnection()
|
|
||||||
self.state = .connected
|
|
||||||
PresenceReporter.shared.sendImmediate(reason: "connect")
|
|
||||||
} catch {
|
|
||||||
let message = self.friendlyGatewayMessage(error)
|
|
||||||
self.state = .degraded(message)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func disconnect() async {
|
func disconnect() async {
|
||||||
await GatewayConnection.shared.shutdown()
|
await GatewayConnection.shared.shutdown()
|
||||||
self.state = .disconnected
|
self.state = .disconnected
|
||||||
@@ -161,8 +156,8 @@ final class ControlChannel {
|
|||||||
timeoutMs: Double? = nil) async throws -> Data
|
timeoutMs: Double? = nil) async throws -> Data
|
||||||
{
|
{
|
||||||
do {
|
do {
|
||||||
let rawParams = params?.reduce(into: [String: ClawdbotKit.AnyCodable]()) {
|
let rawParams = params?.reduce(into: [String: AnyCodable]()) {
|
||||||
$0[$1.key] = ClawdbotKit.AnyCodable($1.value.base)
|
$0[$1.key] = AnyCodable($1.value.base)
|
||||||
}
|
}
|
||||||
let data = try await GatewayConnection.shared.request(
|
let data = try await GatewayConnection.shared.request(
|
||||||
method: method,
|
method: method,
|
||||||
@@ -280,28 +275,18 @@ final class ControlChannel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await self.refreshEndpoint(reason: "recovery:\(reasonText)")
|
do {
|
||||||
if case .connected = self.state {
|
try await GatewayConnection.shared.refresh()
|
||||||
self.logger.info("control channel recovery finished")
|
self.logger.info("control channel recovery finished")
|
||||||
} else if case let .degraded(message) = self.state {
|
} catch {
|
||||||
self.logger.error("control channel recovery failed \(message, privacy: .public)")
|
self.logger.error(
|
||||||
|
"control channel recovery failed \(error.localizedDescription, privacy: .public)")
|
||||||
}
|
}
|
||||||
|
|
||||||
self.recoveryTask = nil
|
self.recoveryTask = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func establishGatewayConnection(timeoutMs: Int = 5000) async throws {
|
|
||||||
try await GatewayConnection.shared.refresh()
|
|
||||||
let ok = try await GatewayConnection.shared.healthOK(timeoutMs: timeoutMs)
|
|
||||||
if ok == false {
|
|
||||||
throw NSError(
|
|
||||||
domain: "Gateway",
|
|
||||||
code: 0,
|
|
||||||
userInfo: [NSLocalizedDescriptionKey: "gateway health not ok"])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func sendSystemEvent(_ text: String, params: [String: AnyHashable] = [:]) async throws {
|
func sendSystemEvent(_ text: String, params: [String: AnyHashable] = [:]) async throws {
|
||||||
var merged = params
|
var merged = params
|
||||||
merged["text"] = AnyHashable(text)
|
merged["text"] = AnyHashable(text)
|
||||||
@@ -361,7 +346,7 @@ final class ControlChannel {
|
|||||||
let phase = event.data["phase"]?.value as? String ?? ""
|
let phase = event.data["phase"]?.value as? String ?? ""
|
||||||
let name = event.data["name"]?.value as? String
|
let name = event.data["name"]?.value as? String
|
||||||
let meta = event.data["meta"]?.value as? String
|
let meta = event.data["meta"]?.value as? String
|
||||||
let args = Self.bridgeToProtocolArgs(event.data["args"])
|
let args = event.data["args"]?.value as? [String: AnyCodable]
|
||||||
WorkActivityStore.shared.handleTool(
|
WorkActivityStore.shared.handleTool(
|
||||||
sessionKey: sessionKey,
|
sessionKey: sessionKey,
|
||||||
phase: phase,
|
phase: phase,
|
||||||
@@ -372,27 +357,6 @@ final class ControlChannel {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static func bridgeToProtocolArgs(
|
|
||||||
_ value: ClawdbotProtocol.AnyCodable?) -> [String: ClawdbotProtocol.AnyCodable]?
|
|
||||||
{
|
|
||||||
guard let value else { return nil }
|
|
||||||
if let dict = value.value as? [String: ClawdbotProtocol.AnyCodable] {
|
|
||||||
return dict
|
|
||||||
}
|
|
||||||
if let dict = value.value as? [String: ClawdbotKit.AnyCodable],
|
|
||||||
let data = try? JSONEncoder().encode(dict),
|
|
||||||
let decoded = try? JSONDecoder().decode([String: ClawdbotProtocol.AnyCodable].self, from: data)
|
|
||||||
{
|
|
||||||
return decoded
|
|
||||||
}
|
|
||||||
if let data = try? JSONEncoder().encode(value),
|
|
||||||
let decoded = try? JSONDecoder().decode([String: ClawdbotProtocol.AnyCodable].self, from: data)
|
|
||||||
{
|
|
||||||
return decoded
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension Notification.Name {
|
extension Notification.Name {
|
||||||
|
|||||||
@@ -259,20 +259,6 @@ enum ExecApprovalsPromptPresenter {
|
|||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
private enum ExecHostExecutor {
|
private enum ExecHostExecutor {
|
||||||
private struct ExecApprovalContext {
|
|
||||||
let command: [String]
|
|
||||||
let displayCommand: String
|
|
||||||
let trimmedAgent: String?
|
|
||||||
let approvals: ExecApprovalsResolved
|
|
||||||
let security: ExecSecurity
|
|
||||||
let ask: ExecAsk
|
|
||||||
let autoAllowSkills: Bool
|
|
||||||
let env: [String: String]?
|
|
||||||
let resolution: ExecCommandResolution?
|
|
||||||
let allowlistMatch: ExecAllowlistEntry?
|
|
||||||
let skillAllow: Bool
|
|
||||||
}
|
|
||||||
|
|
||||||
private static let blockedEnvKeys: Set<String> = [
|
private static let blockedEnvKeys: Set<String> = [
|
||||||
"PATH",
|
"PATH",
|
||||||
"NODE_OPTIONS",
|
"NODE_OPTIONS",
|
||||||
@@ -291,93 +277,14 @@ private enum ExecHostExecutor {
|
|||||||
static func handle(_ request: ExecHostRequest) async -> ExecHostResponse {
|
static func handle(_ request: ExecHostRequest) async -> ExecHostResponse {
|
||||||
let command = request.command.map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
|
let command = request.command.map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
|
||||||
guard !command.isEmpty else {
|
guard !command.isEmpty else {
|
||||||
return self.errorResponse(
|
return ExecHostResponse(
|
||||||
code: "INVALID_REQUEST",
|
type: "exec-res",
|
||||||
message: "command required",
|
id: UUID().uuidString,
|
||||||
reason: "invalid")
|
ok: false,
|
||||||
|
payload: nil,
|
||||||
|
error: ExecHostError(code: "INVALID_REQUEST", message: "command required", reason: "invalid"))
|
||||||
}
|
}
|
||||||
|
|
||||||
let context = await self.buildContext(request: request, command: command)
|
|
||||||
if context.security == .deny {
|
|
||||||
return self.errorResponse(
|
|
||||||
code: "UNAVAILABLE",
|
|
||||||
message: "SYSTEM_RUN_DISABLED: security=deny",
|
|
||||||
reason: "security=deny")
|
|
||||||
}
|
|
||||||
|
|
||||||
let approvalDecision = request.approvalDecision
|
|
||||||
if approvalDecision == .deny {
|
|
||||||
return self.errorResponse(
|
|
||||||
code: "UNAVAILABLE",
|
|
||||||
message: "SYSTEM_RUN_DENIED: user denied",
|
|
||||||
reason: "user-denied")
|
|
||||||
}
|
|
||||||
|
|
||||||
var approvedByAsk = approvalDecision != nil
|
|
||||||
if self.requiresAsk(
|
|
||||||
ask: context.ask,
|
|
||||||
security: context.security,
|
|
||||||
allowlistMatch: context.allowlistMatch,
|
|
||||||
skillAllow: context.skillAllow),
|
|
||||||
approvalDecision == nil
|
|
||||||
{
|
|
||||||
let decision = ExecApprovalsPromptPresenter.prompt(
|
|
||||||
ExecApprovalPromptRequest(
|
|
||||||
command: context.displayCommand,
|
|
||||||
cwd: request.cwd,
|
|
||||||
host: "node",
|
|
||||||
security: context.security.rawValue,
|
|
||||||
ask: context.ask.rawValue,
|
|
||||||
agentId: context.trimmedAgent,
|
|
||||||
resolvedPath: context.resolution?.resolvedPath))
|
|
||||||
|
|
||||||
switch decision {
|
|
||||||
case .deny:
|
|
||||||
return self.errorResponse(
|
|
||||||
code: "UNAVAILABLE",
|
|
||||||
message: "SYSTEM_RUN_DENIED: user denied",
|
|
||||||
reason: "user-denied")
|
|
||||||
case .allowAlways:
|
|
||||||
approvedByAsk = true
|
|
||||||
self.persistAllowlistEntry(decision: decision, context: context)
|
|
||||||
case .allowOnce:
|
|
||||||
approvedByAsk = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self.persistAllowlistEntry(decision: approvalDecision, context: context)
|
|
||||||
|
|
||||||
if context.security == .allowlist,
|
|
||||||
context.allowlistMatch == nil,
|
|
||||||
!context.skillAllow,
|
|
||||||
!approvedByAsk
|
|
||||||
{
|
|
||||||
return self.errorResponse(
|
|
||||||
code: "UNAVAILABLE",
|
|
||||||
message: "SYSTEM_RUN_DENIED: allowlist miss",
|
|
||||||
reason: "allowlist-miss")
|
|
||||||
}
|
|
||||||
|
|
||||||
if let match = context.allowlistMatch {
|
|
||||||
ExecApprovalsStore.recordAllowlistUse(
|
|
||||||
agentId: context.trimmedAgent,
|
|
||||||
pattern: match.pattern,
|
|
||||||
command: context.displayCommand,
|
|
||||||
resolvedPath: context.resolution?.resolvedPath)
|
|
||||||
}
|
|
||||||
|
|
||||||
if let errorResponse = await self.ensureScreenRecordingAccess(request.needsScreenRecording) {
|
|
||||||
return errorResponse
|
|
||||||
}
|
|
||||||
|
|
||||||
return await self.runCommand(
|
|
||||||
command: command,
|
|
||||||
cwd: request.cwd,
|
|
||||||
env: context.env,
|
|
||||||
timeoutMs: request.timeoutMs)
|
|
||||||
}
|
|
||||||
|
|
||||||
private static func buildContext(request: ExecHostRequest, command: [String]) async -> ExecApprovalContext {
|
|
||||||
let displayCommand = ExecCommandFormatter.displayString(
|
let displayCommand = ExecCommandFormatter.displayString(
|
||||||
for: command,
|
for: command,
|
||||||
rawCommand: request.rawCommand)
|
rawCommand: request.rawCommand)
|
||||||
@@ -403,72 +310,122 @@ private enum ExecHostExecutor {
|
|||||||
} else {
|
} else {
|
||||||
skillAllow = false
|
skillAllow = false
|
||||||
}
|
}
|
||||||
return ExecApprovalContext(
|
|
||||||
command: command,
|
|
||||||
displayCommand: displayCommand,
|
|
||||||
trimmedAgent: trimmedAgent,
|
|
||||||
approvals: approvals,
|
|
||||||
security: security,
|
|
||||||
ask: ask,
|
|
||||||
autoAllowSkills: autoAllowSkills,
|
|
||||||
env: env,
|
|
||||||
resolution: resolution,
|
|
||||||
allowlistMatch: allowlistMatch,
|
|
||||||
skillAllow: skillAllow)
|
|
||||||
}
|
|
||||||
|
|
||||||
private static func requiresAsk(
|
if security == .deny {
|
||||||
ask: ExecAsk,
|
return ExecHostResponse(
|
||||||
security: ExecSecurity,
|
type: "exec-res",
|
||||||
allowlistMatch: ExecAllowlistEntry?,
|
id: UUID().uuidString,
|
||||||
skillAllow: Bool) -> Bool
|
ok: false,
|
||||||
{
|
payload: nil,
|
||||||
if ask == .always { return true }
|
error: ExecHostError(
|
||||||
if ask == .onMiss, security == .allowlist, allowlistMatch == nil, !skillAllow { return true }
|
code: "UNAVAILABLE",
|
||||||
return false
|
message: "SYSTEM_RUN_DISABLED: security=deny",
|
||||||
}
|
reason: "security=deny"))
|
||||||
|
|
||||||
private static func persistAllowlistEntry(
|
|
||||||
decision: ExecApprovalDecision?,
|
|
||||||
context: ExecApprovalContext)
|
|
||||||
{
|
|
||||||
guard decision == .allowAlways, context.security == .allowlist else { return }
|
|
||||||
guard let pattern = self.allowlistPattern(command: context.command, resolution: context.resolution) else {
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
ExecApprovalsStore.addAllowlistEntry(agentId: context.trimmedAgent, pattern: pattern)
|
|
||||||
}
|
|
||||||
|
|
||||||
private static func allowlistPattern(
|
let requiresAsk: Bool = {
|
||||||
command: [String],
|
if ask == .always { return true }
|
||||||
resolution: ExecCommandResolution?) -> String?
|
if ask == .onMiss, security == .allowlist, allowlistMatch == nil, !skillAllow { return true }
|
||||||
{
|
return false
|
||||||
let pattern = resolution?.resolvedPath ?? resolution?.rawExecutable ?? command.first ?? ""
|
}()
|
||||||
return pattern.isEmpty ? nil : pattern
|
|
||||||
}
|
|
||||||
|
|
||||||
private static func ensureScreenRecordingAccess(_ needsScreenRecording: Bool?) async -> ExecHostResponse? {
|
let approvalDecision = request.approvalDecision
|
||||||
guard needsScreenRecording == true else { return nil }
|
if approvalDecision == .deny {
|
||||||
let authorized = await PermissionManager
|
return ExecHostResponse(
|
||||||
.status([.screenRecording])[.screenRecording] ?? false
|
type: "exec-res",
|
||||||
if authorized { return nil }
|
id: UUID().uuidString,
|
||||||
return self.errorResponse(
|
ok: false,
|
||||||
code: "UNAVAILABLE",
|
payload: nil,
|
||||||
message: "PERMISSION_MISSING: screenRecording",
|
error: ExecHostError(
|
||||||
reason: "permission:screenRecording")
|
code: "UNAVAILABLE",
|
||||||
}
|
message: "SYSTEM_RUN_DENIED: user denied",
|
||||||
|
reason: "user-denied"))
|
||||||
|
}
|
||||||
|
|
||||||
private static func runCommand(
|
var approvedByAsk = approvalDecision != nil
|
||||||
command: [String],
|
if requiresAsk, approvalDecision == nil {
|
||||||
cwd: String?,
|
let decision = ExecApprovalsPromptPresenter.prompt(
|
||||||
env: [String: String]?,
|
ExecApprovalPromptRequest(
|
||||||
timeoutMs: Int?) async -> ExecHostResponse
|
command: displayCommand,
|
||||||
{
|
cwd: request.cwd,
|
||||||
let timeoutSec = timeoutMs.flatMap { Double($0) / 1000.0 }
|
host: "node",
|
||||||
|
security: security.rawValue,
|
||||||
|
ask: ask.rawValue,
|
||||||
|
agentId: trimmedAgent,
|
||||||
|
resolvedPath: resolution?.resolvedPath))
|
||||||
|
|
||||||
|
switch decision {
|
||||||
|
case .deny:
|
||||||
|
return ExecHostResponse(
|
||||||
|
type: "exec-res",
|
||||||
|
id: UUID().uuidString,
|
||||||
|
ok: false,
|
||||||
|
payload: nil,
|
||||||
|
error: ExecHostError(
|
||||||
|
code: "UNAVAILABLE",
|
||||||
|
message: "SYSTEM_RUN_DENIED: user denied",
|
||||||
|
reason: "user-denied"))
|
||||||
|
case .allowAlways:
|
||||||
|
approvedByAsk = true
|
||||||
|
if security == .allowlist {
|
||||||
|
let pattern = resolution?.resolvedPath ?? resolution?.rawExecutable ?? command.first ?? ""
|
||||||
|
if !pattern.isEmpty {
|
||||||
|
ExecApprovalsStore.addAllowlistEntry(agentId: trimmedAgent, pattern: pattern)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case .allowOnce:
|
||||||
|
approvedByAsk = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if approvalDecision == .allowAlways, security == .allowlist {
|
||||||
|
let pattern = resolution?.resolvedPath ?? resolution?.rawExecutable ?? command.first ?? ""
|
||||||
|
if !pattern.isEmpty {
|
||||||
|
ExecApprovalsStore.addAllowlistEntry(agentId: trimmedAgent, pattern: pattern)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if security == .allowlist, allowlistMatch == nil, !skillAllow, !approvedByAsk {
|
||||||
|
return ExecHostResponse(
|
||||||
|
type: "exec-res",
|
||||||
|
id: UUID().uuidString,
|
||||||
|
ok: false,
|
||||||
|
payload: nil,
|
||||||
|
error: ExecHostError(
|
||||||
|
code: "UNAVAILABLE",
|
||||||
|
message: "SYSTEM_RUN_DENIED: allowlist miss",
|
||||||
|
reason: "allowlist-miss"))
|
||||||
|
}
|
||||||
|
|
||||||
|
if let match = allowlistMatch {
|
||||||
|
ExecApprovalsStore.recordAllowlistUse(
|
||||||
|
agentId: trimmedAgent,
|
||||||
|
pattern: match.pattern,
|
||||||
|
command: displayCommand,
|
||||||
|
resolvedPath: resolution?.resolvedPath)
|
||||||
|
}
|
||||||
|
|
||||||
|
if request.needsScreenRecording == true {
|
||||||
|
let authorized = await PermissionManager
|
||||||
|
.status([.screenRecording])[.screenRecording] ?? false
|
||||||
|
if !authorized {
|
||||||
|
return ExecHostResponse(
|
||||||
|
type: "exec-res",
|
||||||
|
id: UUID().uuidString,
|
||||||
|
ok: false,
|
||||||
|
payload: nil,
|
||||||
|
error: ExecHostError(
|
||||||
|
code: "UNAVAILABLE",
|
||||||
|
message: "PERMISSION_MISSING: screenRecording",
|
||||||
|
reason: "permission:screenRecording"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let timeoutSec = request.timeoutMs.flatMap { Double($0) / 1000.0 }
|
||||||
let result = await Task.detached { () -> ShellExecutor.ShellResult in
|
let result = await Task.detached { () -> ShellExecutor.ShellResult in
|
||||||
await ShellExecutor.runDetailed(
|
await ShellExecutor.runDetailed(
|
||||||
command: command,
|
command: command,
|
||||||
cwd: cwd,
|
cwd: request.cwd,
|
||||||
env: env,
|
env: env,
|
||||||
timeout: timeoutSec)
|
timeout: timeoutSec)
|
||||||
}.value
|
}.value
|
||||||
@@ -479,24 +436,7 @@ private enum ExecHostExecutor {
|
|||||||
stdout: result.stdout,
|
stdout: result.stdout,
|
||||||
stderr: result.stderr,
|
stderr: result.stderr,
|
||||||
error: result.errorMessage)
|
error: result.errorMessage)
|
||||||
return self.successResponse(payload)
|
return ExecHostResponse(
|
||||||
}
|
|
||||||
|
|
||||||
private static func errorResponse(
|
|
||||||
code: String,
|
|
||||||
message: String,
|
|
||||||
reason: String?) -> ExecHostResponse
|
|
||||||
{
|
|
||||||
ExecHostResponse(
|
|
||||||
type: "exec-res",
|
|
||||||
id: UUID().uuidString,
|
|
||||||
ok: false,
|
|
||||||
payload: nil,
|
|
||||||
error: ExecHostError(code: code, message: message, reason: reason))
|
|
||||||
}
|
|
||||||
|
|
||||||
private static func successResponse(_ payload: ExecHostRunResult) -> ExecHostResponse {
|
|
||||||
ExecHostResponse(
|
|
||||||
type: "exec-res",
|
type: "exec-res",
|
||||||
id: UUID().uuidString,
|
id: UUID().uuidString,
|
||||||
ok: true,
|
ok: true,
|
||||||
|
|||||||
@@ -148,27 +148,6 @@ actor GatewayConnection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let nsError = lastError as NSError
|
|
||||||
if nsError.domain == URLError.errorDomain,
|
|
||||||
let fallback = await GatewayEndpointStore.shared.maybeFallbackToTailnet(from: cfg.url)
|
|
||||||
{
|
|
||||||
await self.configure(url: fallback.url, token: fallback.token, password: fallback.password)
|
|
||||||
for delayMs in [150, 400, 900] {
|
|
||||||
try await Task.sleep(nanoseconds: UInt64(delayMs) * 1_000_000)
|
|
||||||
do {
|
|
||||||
guard let client = self.client else {
|
|
||||||
throw NSError(
|
|
||||||
domain: "Gateway",
|
|
||||||
code: 0,
|
|
||||||
userInfo: [NSLocalizedDescriptionKey: "gateway not configured"])
|
|
||||||
}
|
|
||||||
return try await client.request(method: method, params: params, timeoutMs: timeoutMs)
|
|
||||||
} catch {
|
|
||||||
lastError = error
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw lastError
|
throw lastError
|
||||||
case .remote:
|
case .remote:
|
||||||
let nsError = error as NSError
|
let nsError = error as NSError
|
||||||
@@ -265,9 +244,9 @@ actor GatewayConnection {
|
|||||||
return trimmed.isEmpty ? nil : trimmed
|
return trimmed.isEmpty ? nil : trimmed
|
||||||
}
|
}
|
||||||
|
|
||||||
private func sessionDefaultString(_ defaults: [String: ClawdbotProtocol.AnyCodable]?, key: String) -> String {
|
private func sessionDefaultString(_ defaults: [String: AnyCodable]?, key: String) -> String {
|
||||||
let raw = defaults?[key]?.value as? String
|
(defaults?[key]?.stringValue ?? "")
|
||||||
return (raw ?? "").trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
|
.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
|
||||||
}
|
}
|
||||||
|
|
||||||
func cachedMainSessionKey() -> String? {
|
func cachedMainSessionKey() -> String? {
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
import Foundation
|
|
||||||
import Observation
|
|
||||||
import OSLog
|
|
||||||
|
|
||||||
@MainActor
|
|
||||||
@Observable
|
|
||||||
final class GatewayConnectivityCoordinator {
|
|
||||||
static let shared = GatewayConnectivityCoordinator()
|
|
||||||
|
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "gateway.connectivity")
|
|
||||||
private var endpointTask: Task<Void, Never>?
|
|
||||||
private var lastResolvedURL: URL?
|
|
||||||
|
|
||||||
private(set) var endpointState: GatewayEndpointState?
|
|
||||||
private(set) var resolvedURL: URL?
|
|
||||||
private(set) var resolvedMode: AppState.ConnectionMode?
|
|
||||||
private(set) var resolvedHostLabel: String?
|
|
||||||
|
|
||||||
private init() {
|
|
||||||
self.start()
|
|
||||||
}
|
|
||||||
|
|
||||||
func start() {
|
|
||||||
guard self.endpointTask == nil else { return }
|
|
||||||
self.endpointTask = Task { [weak self] in
|
|
||||||
guard let self else { return }
|
|
||||||
let stream = await GatewayEndpointStore.shared.subscribe()
|
|
||||||
for await state in stream {
|
|
||||||
await MainActor.run { self.handleEndpointState(state) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var localEndpointHostLabel: String? {
|
|
||||||
guard self.resolvedMode == .local, let url = self.resolvedURL else { return nil }
|
|
||||||
return Self.hostLabel(for: url)
|
|
||||||
}
|
|
||||||
|
|
||||||
private func handleEndpointState(_ state: GatewayEndpointState) {
|
|
||||||
self.endpointState = state
|
|
||||||
switch state {
|
|
||||||
case let .ready(mode, url, _, _):
|
|
||||||
self.resolvedMode = mode
|
|
||||||
self.resolvedURL = url
|
|
||||||
self.resolvedHostLabel = Self.hostLabel(for: url)
|
|
||||||
let urlChanged = self.lastResolvedURL?.absoluteString != url.absoluteString
|
|
||||||
if urlChanged {
|
|
||||||
self.lastResolvedURL = url
|
|
||||||
Task { await ControlChannel.shared.refreshEndpoint(reason: "endpoint changed") }
|
|
||||||
}
|
|
||||||
case let .connecting(mode, _):
|
|
||||||
self.resolvedMode = mode
|
|
||||||
case let .unavailable(mode, _):
|
|
||||||
self.resolvedMode = mode
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static func hostLabel(for url: URL) -> String {
|
|
||||||
let host = url.host ?? url.absoluteString
|
|
||||||
if let port = url.port { return "\(host):\(port)" }
|
|
||||||
return host
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -68,7 +68,6 @@ actor GatewayEndpointStore {
|
|||||||
env: ProcessInfo.processInfo.environment)
|
env: ProcessInfo.processInfo.environment)
|
||||||
let customBindHost = GatewayEndpointStore.resolveGatewayCustomBindHost(root: root)
|
let customBindHost = GatewayEndpointStore.resolveGatewayCustomBindHost(root: root)
|
||||||
let tailscaleIP = await MainActor.run { TailscaleService.shared.tailscaleIP }
|
let tailscaleIP = await MainActor.run { TailscaleService.shared.tailscaleIP }
|
||||||
?? TailscaleService.fallbackTailnetIPv4()
|
|
||||||
return GatewayEndpointStore.resolveLocalGatewayHost(
|
return GatewayEndpointStore.resolveLocalGatewayHost(
|
||||||
bindMode: bind,
|
bindMode: bind,
|
||||||
customBindHost: customBindHost,
|
customBindHost: customBindHost,
|
||||||
@@ -173,10 +172,6 @@ actor GatewayEndpointStore {
|
|||||||
return configToken
|
return configToken
|
||||||
}
|
}
|
||||||
|
|
||||||
if isRemote {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
if let token = launchdSnapshot?.token?.trimmingCharacters(in: .whitespacesAndNewlines),
|
if let token = launchdSnapshot?.token?.trimmingCharacters(in: .whitespacesAndNewlines),
|
||||||
!token.isEmpty
|
!token.isEmpty
|
||||||
{
|
{
|
||||||
@@ -474,36 +469,6 @@ actor GatewayEndpointStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func maybeFallbackToTailnet(from currentURL: URL) async -> GatewayConnection.Config? {
|
|
||||||
let mode = await self.deps.mode()
|
|
||||||
guard mode == .local else { return nil }
|
|
||||||
|
|
||||||
let root = ClawdbotConfigFile.loadDict()
|
|
||||||
let bind = GatewayEndpointStore.resolveGatewayBindMode(
|
|
||||||
root: root,
|
|
||||||
env: ProcessInfo.processInfo.environment)
|
|
||||||
guard bind == "auto" else { return nil }
|
|
||||||
|
|
||||||
let currentHost = currentURL.host?.lowercased() ?? ""
|
|
||||||
guard currentHost == "127.0.0.1" || currentHost == "localhost" else { return nil }
|
|
||||||
|
|
||||||
let tailscaleIP = await MainActor.run { TailscaleService.shared.tailscaleIP }
|
|
||||||
?? TailscaleService.fallbackTailnetIPv4()
|
|
||||||
guard let tailscaleIP, !tailscaleIP.isEmpty else { return nil }
|
|
||||||
|
|
||||||
let scheme = GatewayEndpointStore.resolveGatewayScheme(
|
|
||||||
root: root,
|
|
||||||
env: ProcessInfo.processInfo.environment)
|
|
||||||
let port = self.deps.localPort()
|
|
||||||
let token = self.deps.token()
|
|
||||||
let password = self.deps.password()
|
|
||||||
let url = URL(string: "\(scheme)://\(tailscaleIP):\(port)")!
|
|
||||||
|
|
||||||
self.logger.info("auto bind fallback to tailnet host=\(tailscaleIP, privacy: .public)")
|
|
||||||
self.setState(.ready(mode: .local, url: url, token: token, password: password))
|
|
||||||
return (url, token, password)
|
|
||||||
}
|
|
||||||
|
|
||||||
private static func resolveGatewayBindMode(
|
private static func resolveGatewayBindMode(
|
||||||
root: [String: Any],
|
root: [String: Any],
|
||||||
env: [String: String]) -> String?
|
env: [String: String]) -> String?
|
||||||
@@ -559,17 +524,12 @@ actor GatewayEndpointStore {
|
|||||||
tailscaleIP: String?) -> String
|
tailscaleIP: String?) -> String
|
||||||
{
|
{
|
||||||
switch bindMode {
|
switch bindMode {
|
||||||
case "tailnet":
|
case "tailnet", "auto":
|
||||||
return tailscaleIP ?? "127.0.0.1"
|
tailscaleIP ?? "127.0.0.1"
|
||||||
case "auto":
|
|
||||||
if let tailscaleIP, !tailscaleIP.isEmpty {
|
|
||||||
return tailscaleIP
|
|
||||||
}
|
|
||||||
return "127.0.0.1"
|
|
||||||
case "custom":
|
case "custom":
|
||||||
return customBindHost ?? "127.0.0.1"
|
customBindHost ?? "127.0.0.1"
|
||||||
default:
|
default:
|
||||||
return "127.0.0.1"
|
"127.0.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -640,12 +600,11 @@ extension GatewayEndpointStore {
|
|||||||
|
|
||||||
static func _testResolveLocalGatewayHost(
|
static func _testResolveLocalGatewayHost(
|
||||||
bindMode: String?,
|
bindMode: String?,
|
||||||
tailscaleIP: String?,
|
tailscaleIP: String?) -> String
|
||||||
customBindHost: String? = nil) -> String
|
|
||||||
{
|
{
|
||||||
self.resolveLocalGatewayHost(
|
self.resolveLocalGatewayHost(
|
||||||
bindMode: bindMode,
|
bindMode: bindMode,
|
||||||
customBindHost: customBindHost,
|
customBindHost: nil,
|
||||||
tailscaleIP: tailscaleIP)
|
tailscaleIP: tailscaleIP)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,8 +235,8 @@ final class HealthStore {
|
|||||||
let lower = error.lowercased()
|
let lower = error.lowercased()
|
||||||
if lower.contains("connection refused") {
|
if lower.contains("connection refused") {
|
||||||
let port = GatewayEnvironment.gatewayPort()
|
let port = GatewayEnvironment.gatewayPort()
|
||||||
let host = GatewayConnectivityCoordinator.shared.localEndpointHostLabel ?? "127.0.0.1:\(port)"
|
return "The gateway control port (127.0.0.1:\(port)) isn’t listening — " +
|
||||||
return "The gateway control port (\(host)) isn’t listening — restart Clawdbot to bring it back."
|
"restart Clawdbot to bring it back."
|
||||||
}
|
}
|
||||||
if lower.contains("timeout") {
|
if lower.contains("timeout") {
|
||||||
return "Timed out waiting for the control server; the gateway may be crashed or still starting."
|
return "Timed out waiting for the control server; the gateway may be crashed or still starting."
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ struct ClawdbotApp: App {
|
|||||||
private let gatewayManager = GatewayProcessManager.shared
|
private let gatewayManager = GatewayProcessManager.shared
|
||||||
private let controlChannel = ControlChannel.shared
|
private let controlChannel = ControlChannel.shared
|
||||||
private let activityStore = WorkActivityStore.shared
|
private let activityStore = WorkActivityStore.shared
|
||||||
private let connectivityCoordinator = GatewayConnectivityCoordinator.shared
|
|
||||||
@State private var statusItem: NSStatusItem?
|
@State private var statusItem: NSStatusItem?
|
||||||
@State private var isMenuPresented = false
|
@State private var isMenuPresented = false
|
||||||
@State private var isPanelVisible = false
|
@State private var isPanelVisible = false
|
||||||
|
|||||||
@@ -469,7 +469,7 @@ extension MenuSessionsInjector {
|
|||||||
}
|
}
|
||||||
case .local:
|
case .local:
|
||||||
platform = "local"
|
platform = "local"
|
||||||
host = GatewayConnectivityCoordinator.shared.localEndpointHostLabel ?? "127.0.0.1:\(port)"
|
host = "127.0.0.1:\(port)"
|
||||||
case .unconfigured:
|
case .unconfigured:
|
||||||
platform = nil
|
platform = nil
|
||||||
host = nil
|
host = nil
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ final class OnboardingWizardModel {
|
|||||||
struct OnboardingWizardStepView: View {
|
struct OnboardingWizardStepView: View {
|
||||||
let step: WizardStep
|
let step: WizardStep
|
||||||
let isSubmitting: Bool
|
let isSubmitting: Bool
|
||||||
let onStepSubmit: (AnyCodable?) -> Void
|
let onSubmit: (AnyCodable?) -> Void
|
||||||
|
|
||||||
@State private var textValue: String
|
@State private var textValue: String
|
||||||
@State private var confirmValue: Bool
|
@State private var confirmValue: Bool
|
||||||
@@ -229,7 +229,7 @@ struct OnboardingWizardStepView: View {
|
|||||||
init(step: WizardStep, isSubmitting: Bool, onSubmit: @escaping (AnyCodable?) -> Void) {
|
init(step: WizardStep, isSubmitting: Bool, onSubmit: @escaping (AnyCodable?) -> Void) {
|
||||||
self.step = step
|
self.step = step
|
||||||
self.isSubmitting = isSubmitting
|
self.isSubmitting = isSubmitting
|
||||||
self.onStepSubmit = onSubmit
|
self.onSubmit = onSubmit
|
||||||
let options = parseWizardOptions(step.options).enumerated().map { index, option in
|
let options = parseWizardOptions(step.options).enumerated().map { index, option in
|
||||||
WizardOptionItem(index: index, option: option)
|
WizardOptionItem(index: index, option: option)
|
||||||
}
|
}
|
||||||
@@ -379,27 +379,27 @@ struct OnboardingWizardStepView: View {
|
|||||||
private func submit() {
|
private func submit() {
|
||||||
switch wizardStepType(self.step) {
|
switch wizardStepType(self.step) {
|
||||||
case "note", "progress":
|
case "note", "progress":
|
||||||
self.onStepSubmit(nil)
|
self.onSubmit(nil)
|
||||||
case "text":
|
case "text":
|
||||||
self.onStepSubmit(AnyCodable(self.textValue))
|
self.onSubmit(AnyCodable(self.textValue))
|
||||||
case "confirm":
|
case "confirm":
|
||||||
self.onStepSubmit(AnyCodable(self.confirmValue))
|
self.onSubmit(AnyCodable(self.confirmValue))
|
||||||
case "select":
|
case "select":
|
||||||
guard self.optionItems.indices.contains(self.selectedIndex) else {
|
guard self.optionItems.indices.contains(self.selectedIndex) else {
|
||||||
self.onStepSubmit(nil)
|
self.onSubmit(nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let option = self.optionItems[self.selectedIndex].option
|
let option = self.optionItems[self.selectedIndex].option
|
||||||
self.onStepSubmit(bridgeToLocal(option.value) ?? AnyCodable(option.label))
|
self.onSubmit(bridgeToLocal(option.value) ?? AnyCodable(option.label))
|
||||||
case "multiselect":
|
case "multiselect":
|
||||||
let values = self.optionItems
|
let values = self.optionItems
|
||||||
.filter { self.selectedIndices.contains($0.index) }
|
.filter { self.selectedIndices.contains($0.index) }
|
||||||
.map { bridgeToLocal($0.option.value) ?? AnyCodable($0.option.label) }
|
.map { bridgeToLocal($0.option.value) ?? AnyCodable($0.option.label) }
|
||||||
self.onStepSubmit(AnyCodable(values))
|
self.onSubmit(AnyCodable(values))
|
||||||
case "action":
|
case "action":
|
||||||
self.onStepSubmit(AnyCodable(true))
|
self.onSubmit(AnyCodable(true))
|
||||||
default:
|
default:
|
||||||
self.onStepSubmit(nil)
|
self.onSubmit(nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,9 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2026.1.20</string>
|
<string>2026.1.11-4</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>202601200</string>
|
<string>202601113</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>Clawdbot</string>
|
<string>Clawdbot</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
|
|||||||
@@ -2,9 +2,6 @@ import AppKit
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Observation
|
import Observation
|
||||||
import os
|
import os
|
||||||
#if canImport(Darwin)
|
|
||||||
import Darwin
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/// Manages Tailscale integration and status checking.
|
/// Manages Tailscale integration and status checking.
|
||||||
@Observable
|
@Observable
|
||||||
@@ -103,14 +100,16 @@ final class TailscaleService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func checkTailscaleStatus() async {
|
func checkTailscaleStatus() async {
|
||||||
let previousIP = self.tailscaleIP
|
|
||||||
self.isInstalled = self.checkAppInstallation()
|
self.isInstalled = self.checkAppInstallation()
|
||||||
if !self.isInstalled {
|
guard self.isInstalled else {
|
||||||
self.isRunning = false
|
self.isRunning = false
|
||||||
self.tailscaleHostname = nil
|
self.tailscaleHostname = nil
|
||||||
self.tailscaleIP = nil
|
self.tailscaleIP = nil
|
||||||
self.statusError = "Tailscale is not installed"
|
self.statusError = "Tailscale is not installed"
|
||||||
} else if let apiResponse = await fetchTailscaleStatus() {
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if let apiResponse = await fetchTailscaleStatus() {
|
||||||
self.isRunning = apiResponse.status.lowercased() == "running"
|
self.isRunning = apiResponse.status.lowercased() == "running"
|
||||||
|
|
||||||
if self.isRunning {
|
if self.isRunning {
|
||||||
@@ -139,19 +138,6 @@ final class TailscaleService {
|
|||||||
self.statusError = "Please start the Tailscale app"
|
self.statusError = "Please start the Tailscale app"
|
||||||
self.logger.info("Tailscale API not responding; app likely not running")
|
self.logger.info("Tailscale API not responding; app likely not running")
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.tailscaleIP == nil, let fallback = Self.detectTailnetIPv4() {
|
|
||||||
self.tailscaleIP = fallback
|
|
||||||
if !self.isRunning {
|
|
||||||
self.isRunning = true
|
|
||||||
}
|
|
||||||
self.statusError = nil
|
|
||||||
self.logger.info("Tailscale interface IP detected (fallback) ip=\(fallback, privacy: .public)")
|
|
||||||
}
|
|
||||||
|
|
||||||
if previousIP != self.tailscaleIP {
|
|
||||||
await GatewayEndpointStore.shared.refresh()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func openTailscaleApp() {
|
func openTailscaleApp() {
|
||||||
@@ -177,50 +163,4 @@ final class TailscaleService {
|
|||||||
NSWorkspace.shared.open(url)
|
NSWorkspace.shared.open(url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static func isTailnetIPv4(_ address: String) -> Bool {
|
|
||||||
let parts = address.split(separator: ".")
|
|
||||||
guard parts.count == 4 else { return false }
|
|
||||||
let octets = parts.compactMap { Int($0) }
|
|
||||||
guard octets.count == 4 else { return false }
|
|
||||||
let a = octets[0]
|
|
||||||
let b = octets[1]
|
|
||||||
return a == 100 && b >= 64 && b <= 127
|
|
||||||
}
|
|
||||||
|
|
||||||
private static func detectTailnetIPv4() -> String? {
|
|
||||||
var addrList: UnsafeMutablePointer<ifaddrs>?
|
|
||||||
guard getifaddrs(&addrList) == 0, let first = addrList else { return nil }
|
|
||||||
defer { freeifaddrs(addrList) }
|
|
||||||
|
|
||||||
for ptr in sequence(first: first, next: { $0.pointee.ifa_next }) {
|
|
||||||
let flags = Int32(ptr.pointee.ifa_flags)
|
|
||||||
let isUp = (flags & IFF_UP) != 0
|
|
||||||
let isLoopback = (flags & IFF_LOOPBACK) != 0
|
|
||||||
let family = ptr.pointee.ifa_addr.pointee.sa_family
|
|
||||||
if !isUp || isLoopback || family != UInt8(AF_INET) { continue }
|
|
||||||
|
|
||||||
var addr = ptr.pointee.ifa_addr.pointee
|
|
||||||
var buffer = [CChar](repeating: 0, count: Int(NI_MAXHOST))
|
|
||||||
let result = getnameinfo(
|
|
||||||
&addr,
|
|
||||||
socklen_t(ptr.pointee.ifa_addr.pointee.sa_len),
|
|
||||||
&buffer,
|
|
||||||
socklen_t(buffer.count),
|
|
||||||
nil,
|
|
||||||
0,
|
|
||||||
NI_NUMERICHOST)
|
|
||||||
guard result == 0 else { continue }
|
|
||||||
let len = buffer.prefix { $0 != 0 }
|
|
||||||
let bytes = len.map { UInt8(bitPattern: $0) }
|
|
||||||
guard let ip = String(bytes: bytes, encoding: .utf8) else { continue }
|
|
||||||
if Self.isTailnetIPv4(ip) { return ip }
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
nonisolated static func fallbackTailnetIPv4() -> String? {
|
|
||||||
Self.detectTailnetIPv4()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ enum WideAreaGatewayDiscovery {
|
|||||||
|
|
||||||
let domain = ClawdbotBonjour.wideAreaGatewayServiceDomain
|
let domain = ClawdbotBonjour.wideAreaGatewayServiceDomain
|
||||||
let domainTrimmed = domain.trimmingCharacters(in: CharacterSet(charactersIn: "."))
|
let domainTrimmed = domain.trimmingCharacters(in: CharacterSet(charactersIn: "."))
|
||||||
let probeName = "_clawdbot-gw._tcp.\(domainTrimmed)"
|
let probeName = "_clawdbot-gateway._tcp.\(domainTrimmed)"
|
||||||
guard let ptrLines = context.dig(
|
guard let ptrLines = context.dig(
|
||||||
["+short", "+time=1", "+tries=1", "@\(nameserver)", probeName, "PTR"],
|
["+short", "+time=1", "+tries=1", "@\(nameserver)", probeName, "PTR"],
|
||||||
min(defaultTimeoutSeconds, remaining()))?.split(whereSeparator: \.isNewline),
|
min(defaultTimeoutSeconds, remaining()))?.split(whereSeparator: \.isNewline),
|
||||||
@@ -66,7 +66,7 @@ enum WideAreaGatewayDiscovery {
|
|||||||
let ptr = raw.trimmingCharacters(in: .whitespacesAndNewlines)
|
let ptr = raw.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
if ptr.isEmpty { continue }
|
if ptr.isEmpty { continue }
|
||||||
let ptrName = ptr.hasSuffix(".") ? String(ptr.dropLast()) : ptr
|
let ptrName = ptr.hasSuffix(".") ? String(ptr.dropLast()) : ptr
|
||||||
let suffix = "._clawdbot-gw._tcp.\(domainTrimmed)"
|
let suffix = "._clawdbot-gateway._tcp.\(domainTrimmed)"
|
||||||
let rawInstanceName = ptrName.hasSuffix(suffix)
|
let rawInstanceName = ptrName.hasSuffix(suffix)
|
||||||
? String(ptrName.dropLast(suffix.count))
|
? String(ptrName.dropLast(suffix.count))
|
||||||
: ptrName
|
: ptrName
|
||||||
@@ -156,7 +156,7 @@ enum WideAreaGatewayDiscovery {
|
|||||||
{
|
{
|
||||||
let domain = ClawdbotBonjour.wideAreaGatewayServiceDomain
|
let domain = ClawdbotBonjour.wideAreaGatewayServiceDomain
|
||||||
let domainTrimmed = domain.trimmingCharacters(in: CharacterSet(charactersIn: "."))
|
let domainTrimmed = domain.trimmingCharacters(in: CharacterSet(charactersIn: "."))
|
||||||
let probeName = "_clawdbot-gw._tcp.\(domainTrimmed)"
|
let probeName = "_clawdbot-gateway._tcp.\(domainTrimmed)"
|
||||||
|
|
||||||
let ips = candidates
|
let ips = candidates
|
||||||
candidates.removeAll(keepingCapacity: true)
|
candidates.removeAll(keepingCapacity: true)
|
||||||
|
|||||||
@@ -0,0 +1,150 @@
|
|||||||
|
import ClawdbotDiscovery
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
struct DiscoveryOptions {
|
||||||
|
var timeoutMs: Int = 2000
|
||||||
|
var json: Bool = false
|
||||||
|
var includeLocal: Bool = false
|
||||||
|
var help: Bool = false
|
||||||
|
|
||||||
|
static func parse(_ args: [String]) -> DiscoveryOptions {
|
||||||
|
var opts = DiscoveryOptions()
|
||||||
|
var i = 0
|
||||||
|
while i < args.count {
|
||||||
|
let arg = args[i]
|
||||||
|
switch arg {
|
||||||
|
case "-h", "--help":
|
||||||
|
opts.help = true
|
||||||
|
case "--json":
|
||||||
|
opts.json = true
|
||||||
|
case "--include-local":
|
||||||
|
opts.includeLocal = true
|
||||||
|
case "--timeout":
|
||||||
|
let next = (i + 1 < args.count) ? args[i + 1] : nil
|
||||||
|
if let next, let parsed = Int(next.trimmingCharacters(in: .whitespacesAndNewlines)) {
|
||||||
|
opts.timeoutMs = max(100, parsed)
|
||||||
|
i += 1
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
i += 1
|
||||||
|
}
|
||||||
|
return opts
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct DiscoveryOutput: Encodable {
|
||||||
|
struct Gateway: Encodable {
|
||||||
|
var displayName: String
|
||||||
|
var lanHost: String?
|
||||||
|
var tailnetDns: String?
|
||||||
|
var sshPort: Int
|
||||||
|
var gatewayPort: Int?
|
||||||
|
var cliPath: String?
|
||||||
|
var stableID: String
|
||||||
|
var debugID: String
|
||||||
|
var isLocal: Bool
|
||||||
|
}
|
||||||
|
|
||||||
|
var status: String
|
||||||
|
var timeoutMs: Int
|
||||||
|
var includeLocal: Bool
|
||||||
|
var count: Int
|
||||||
|
var gateways: [Gateway]
|
||||||
|
}
|
||||||
|
|
||||||
|
@main
|
||||||
|
struct ClawdbotDiscoveryCLI {
|
||||||
|
static func main() async {
|
||||||
|
let opts = DiscoveryOptions.parse(Array(CommandLine.arguments.dropFirst()))
|
||||||
|
if opts.help {
|
||||||
|
print("""
|
||||||
|
clawdbot-mac-discovery
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
clawdbot-mac-discovery [--timeout <ms>] [--json] [--include-local]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--timeout <ms> Discovery window in milliseconds (default: 2000)
|
||||||
|
--json Emit JSON
|
||||||
|
--include-local Include gateways considered local
|
||||||
|
-h, --help Show help
|
||||||
|
""")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let displayName = Host.current().localizedName ?? ProcessInfo.processInfo.hostName
|
||||||
|
let model = GatewayDiscoveryModel(
|
||||||
|
localDisplayName: displayName,
|
||||||
|
filterLocalGateways: !opts.includeLocal)
|
||||||
|
|
||||||
|
await MainActor.run {
|
||||||
|
model.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
let nanos = UInt64(max(100, opts.timeoutMs)) * 1_000_000
|
||||||
|
try? await Task.sleep(nanoseconds: nanos)
|
||||||
|
|
||||||
|
let gateways = await MainActor.run { model.gateways }
|
||||||
|
let status = await MainActor.run { model.statusText }
|
||||||
|
|
||||||
|
await MainActor.run {
|
||||||
|
model.stop()
|
||||||
|
}
|
||||||
|
|
||||||
|
if opts.json {
|
||||||
|
let payload = DiscoveryOutput(
|
||||||
|
status: status,
|
||||||
|
timeoutMs: opts.timeoutMs,
|
||||||
|
includeLocal: opts.includeLocal,
|
||||||
|
count: gateways.count,
|
||||||
|
gateways: gateways.map {
|
||||||
|
DiscoveryOutput.Gateway(
|
||||||
|
displayName: $0.displayName,
|
||||||
|
lanHost: $0.lanHost,
|
||||||
|
tailnetDns: $0.tailnetDns,
|
||||||
|
sshPort: $0.sshPort,
|
||||||
|
gatewayPort: $0.gatewayPort,
|
||||||
|
cliPath: $0.cliPath,
|
||||||
|
stableID: $0.stableID,
|
||||||
|
debugID: $0.debugID,
|
||||||
|
isLocal: $0.isLocal)
|
||||||
|
})
|
||||||
|
let encoder = JSONEncoder()
|
||||||
|
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
|
||||||
|
if let data = try? encoder.encode(payload),
|
||||||
|
let json = String(data: data, encoding: .utf8)
|
||||||
|
{
|
||||||
|
print(json)
|
||||||
|
} else {
|
||||||
|
print("{\"error\":\"failed to encode JSON\"}")
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
print("Gateway Discovery (macOS NWBrowser)")
|
||||||
|
print("Status: \(status)")
|
||||||
|
print("Found \(gateways.count) gateway(s)\(opts.includeLocal ? "" : " (local filtered)")")
|
||||||
|
if gateways.isEmpty { return }
|
||||||
|
|
||||||
|
for gateway in gateways {
|
||||||
|
let hosts = [gateway.tailnetDns, gateway.lanHost]
|
||||||
|
.compactMap { $0?.trimmingCharacters(in: .whitespacesAndNewlines) }
|
||||||
|
.filter { !$0.isEmpty }
|
||||||
|
.joined(separator: ", ")
|
||||||
|
print("- \(gateway.displayName)")
|
||||||
|
print(" hosts: \(hosts.isEmpty ? "(none)" : hosts)")
|
||||||
|
print(" ssh: \(gateway.sshPort)")
|
||||||
|
if let port = gateway.gatewayPort {
|
||||||
|
print(" gatewayPort: \(port)")
|
||||||
|
}
|
||||||
|
if let cliPath = gateway.cliPath {
|
||||||
|
print(" cliPath: \(cliPath)")
|
||||||
|
}
|
||||||
|
print(" isLocal: \(gateway.isLocal)")
|
||||||
|
print(" stableID: \(gateway.stableID)")
|
||||||
|
print(" debugID: \(gateway.debugID)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -408,7 +408,8 @@ extension Request: Codable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Shared transport settings
|
// Shared transport settings
|
||||||
public let controlSocketPath = FileManager()
|
public let controlSocketPath =
|
||||||
.homeDirectoryForCurrentUser
|
FileManager()
|
||||||
.appendingPathComponent("Library/Application Support/clawdbot/control.sock")
|
.homeDirectoryForCurrentUser
|
||||||
.path
|
.appendingPathComponent("Library/Application Support/clawdbot/control.sock")
|
||||||
|
.path
|
||||||
@@ -1,359 +0,0 @@
|
|||||||
import ClawdbotKit
|
|
||||||
import ClawdbotProtocol
|
|
||||||
import Foundation
|
|
||||||
#if canImport(Darwin)
|
|
||||||
import Darwin
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct ConnectOptions {
|
|
||||||
var url: String?
|
|
||||||
var token: String?
|
|
||||||
var password: String?
|
|
||||||
var mode: String?
|
|
||||||
var timeoutMs: Int = 15000
|
|
||||||
var json: Bool = false
|
|
||||||
var probe: Bool = false
|
|
||||||
var clientId: String = "clawdbot-macos"
|
|
||||||
var clientMode: String = "ui"
|
|
||||||
var displayName: String?
|
|
||||||
var role: String = "operator"
|
|
||||||
var scopes: [String] = ["operator.admin", "operator.approvals", "operator.pairing"]
|
|
||||||
var help: Bool = false
|
|
||||||
|
|
||||||
static func parse(_ args: [String]) -> ConnectOptions {
|
|
||||||
var opts = ConnectOptions()
|
|
||||||
let flagHandlers: [String: (inout ConnectOptions) -> Void] = [
|
|
||||||
"-h": { $0.help = true },
|
|
||||||
"--help": { $0.help = true },
|
|
||||||
"--json": { $0.json = true },
|
|
||||||
"--probe": { $0.probe = true },
|
|
||||||
]
|
|
||||||
let valueHandlers: [String: (inout ConnectOptions, String) -> Void] = [
|
|
||||||
"--url": { $0.url = $1 },
|
|
||||||
"--token": { $0.token = $1 },
|
|
||||||
"--password": { $0.password = $1 },
|
|
||||||
"--mode": { $0.mode = $1 },
|
|
||||||
"--timeout": { opts, raw in
|
|
||||||
if let parsed = Int(raw.trimmingCharacters(in: .whitespacesAndNewlines)) {
|
|
||||||
opts.timeoutMs = max(250, parsed)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"--client-id": { $0.clientId = $1 },
|
|
||||||
"--client-mode": { $0.clientMode = $1 },
|
|
||||||
"--display-name": { $0.displayName = $1 },
|
|
||||||
"--role": { $0.role = $1 },
|
|
||||||
"--scopes": { opts, raw in
|
|
||||||
opts.scopes = raw.split(separator: ",").map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
|
|
||||||
.filter { !$0.isEmpty }
|
|
||||||
},
|
|
||||||
]
|
|
||||||
var i = 0
|
|
||||||
while i < args.count {
|
|
||||||
let arg = args[i]
|
|
||||||
if let handler = flagHandlers[arg] {
|
|
||||||
handler(&opts)
|
|
||||||
i += 1
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if let handler = valueHandlers[arg], let value = self.nextValue(args, index: &i) {
|
|
||||||
handler(&opts, value)
|
|
||||||
i += 1
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
i += 1
|
|
||||||
}
|
|
||||||
return opts
|
|
||||||
}
|
|
||||||
|
|
||||||
private static func nextValue(_ args: [String], index: inout Int) -> String? {
|
|
||||||
guard index + 1 < args.count else { return nil }
|
|
||||||
index += 1
|
|
||||||
return args[index].trimmingCharacters(in: .whitespacesAndNewlines)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct ConnectOutput: Encodable {
|
|
||||||
var status: String
|
|
||||||
var url: String
|
|
||||||
var mode: String
|
|
||||||
var role: String
|
|
||||||
var clientId: String
|
|
||||||
var clientMode: String
|
|
||||||
var scopes: [String]
|
|
||||||
var snapshot: HelloOk?
|
|
||||||
var health: ProtoAnyCodable?
|
|
||||||
var error: String?
|
|
||||||
}
|
|
||||||
|
|
||||||
actor SnapshotStore {
|
|
||||||
private var value: HelloOk?
|
|
||||||
|
|
||||||
func set(_ snapshot: HelloOk) {
|
|
||||||
self.value = snapshot
|
|
||||||
}
|
|
||||||
|
|
||||||
func get() -> HelloOk? {
|
|
||||||
self.value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func runConnect(_ args: [String]) async {
|
|
||||||
let opts = ConnectOptions.parse(args)
|
|
||||||
if opts.help {
|
|
||||||
print("""
|
|
||||||
clawdbot-mac connect
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
clawdbot-mac connect [--url <ws://host:port>] [--token <token>] [--password <password>]
|
|
||||||
[--mode <local|remote>] [--timeout <ms>] [--probe] [--json]
|
|
||||||
[--client-id <id>] [--client-mode <mode>] [--display-name <name>]
|
|
||||||
[--role <role>] [--scopes <a,b,c>]
|
|
||||||
|
|
||||||
Options:
|
|
||||||
--url <url> Gateway WebSocket URL (overrides config)
|
|
||||||
--token <token> Gateway token (if required)
|
|
||||||
--password <pw> Gateway password (if required)
|
|
||||||
--mode <mode> Resolve from config: local|remote (default: config or local)
|
|
||||||
--timeout <ms> Request timeout (default: 15000)
|
|
||||||
--probe Force a fresh health probe
|
|
||||||
--json Emit JSON
|
|
||||||
--client-id <id> Override client id (default: clawdbot-macos)
|
|
||||||
--client-mode <m> Override client mode (default: ui)
|
|
||||||
--display-name <n> Override display name
|
|
||||||
--role <role> Override role (default: operator)
|
|
||||||
--scopes <a,b,c> Override scopes list
|
|
||||||
-h, --help Show help
|
|
||||||
""")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
let config = loadGatewayConfig()
|
|
||||||
do {
|
|
||||||
let endpoint = try resolveGatewayEndpoint(opts: opts, config: config)
|
|
||||||
let displayName = opts.displayName ?? Host.current().localizedName ?? "Clawdbot macOS Debug CLI"
|
|
||||||
let connectOptions = GatewayConnectOptions(
|
|
||||||
role: opts.role,
|
|
||||||
scopes: opts.scopes,
|
|
||||||
caps: [],
|
|
||||||
commands: [],
|
|
||||||
permissions: [:],
|
|
||||||
clientId: opts.clientId,
|
|
||||||
clientMode: opts.clientMode,
|
|
||||||
clientDisplayName: displayName)
|
|
||||||
|
|
||||||
let snapshotStore = SnapshotStore()
|
|
||||||
let channel = GatewayChannelActor(
|
|
||||||
url: endpoint.url,
|
|
||||||
token: endpoint.token,
|
|
||||||
password: endpoint.password,
|
|
||||||
pushHandler: { push in
|
|
||||||
if case let .snapshot(ok) = push {
|
|
||||||
await snapshotStore.set(ok)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
connectOptions: connectOptions)
|
|
||||||
|
|
||||||
let params: [String: KitAnyCodable]? = opts.probe ? ["probe": KitAnyCodable(true)] : nil
|
|
||||||
let data = try await channel.request(
|
|
||||||
method: "health",
|
|
||||||
params: params,
|
|
||||||
timeoutMs: Double(opts.timeoutMs))
|
|
||||||
let health = try? JSONDecoder().decode(ProtoAnyCodable.self, from: data)
|
|
||||||
let snapshot = await snapshotStore.get()
|
|
||||||
await channel.shutdown()
|
|
||||||
|
|
||||||
let output = ConnectOutput(
|
|
||||||
status: "ok",
|
|
||||||
url: endpoint.url.absoluteString,
|
|
||||||
mode: endpoint.mode,
|
|
||||||
role: opts.role,
|
|
||||||
clientId: opts.clientId,
|
|
||||||
clientMode: opts.clientMode,
|
|
||||||
scopes: opts.scopes,
|
|
||||||
snapshot: snapshot,
|
|
||||||
health: health,
|
|
||||||
error: nil)
|
|
||||||
printConnectOutput(output, json: opts.json)
|
|
||||||
} catch {
|
|
||||||
let endpoint = bestEffortEndpoint(opts: opts, config: config)
|
|
||||||
let fallbackMode = (opts.mode ?? config.mode ?? "local").lowercased()
|
|
||||||
let output = ConnectOutput(
|
|
||||||
status: "error",
|
|
||||||
url: endpoint?.url.absoluteString ?? "unknown",
|
|
||||||
mode: endpoint?.mode ?? fallbackMode,
|
|
||||||
role: opts.role,
|
|
||||||
clientId: opts.clientId,
|
|
||||||
clientMode: opts.clientMode,
|
|
||||||
scopes: opts.scopes,
|
|
||||||
snapshot: nil,
|
|
||||||
health: nil,
|
|
||||||
error: error.localizedDescription)
|
|
||||||
printConnectOutput(output, json: opts.json)
|
|
||||||
exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func printConnectOutput(_ output: ConnectOutput, json: Bool) {
|
|
||||||
if json {
|
|
||||||
let encoder = JSONEncoder()
|
|
||||||
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
|
|
||||||
if let data = try? encoder.encode(output),
|
|
||||||
let text = String(data: data, encoding: .utf8)
|
|
||||||
{
|
|
||||||
print(text)
|
|
||||||
} else {
|
|
||||||
print("{\"error\":\"failed to encode JSON\"}")
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
print("Clawdbot macOS Gateway Connect")
|
|
||||||
print("Status: \(output.status)")
|
|
||||||
print("URL: \(output.url)")
|
|
||||||
print("Mode: \(output.mode)")
|
|
||||||
print("Client: \(output.clientId) (\(output.clientMode))")
|
|
||||||
print("Role: \(output.role)")
|
|
||||||
print("Scopes: \(output.scopes.joined(separator: ", "))")
|
|
||||||
if let snapshot = output.snapshot {
|
|
||||||
print("Protocol: \(snapshot._protocol)")
|
|
||||||
if let version = snapshot.server["version"]?.value as? String {
|
|
||||||
print("Server: \(version)")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if let health = output.health,
|
|
||||||
let ok = (health.value as? [String: ProtoAnyCodable])?["ok"]?.value as? Bool
|
|
||||||
{
|
|
||||||
print("Health: \(ok ? "ok" : "error")")
|
|
||||||
} else if output.health != nil {
|
|
||||||
print("Health: received")
|
|
||||||
}
|
|
||||||
if let error = output.error {
|
|
||||||
print("Error: \(error)")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func resolveGatewayEndpoint(opts: ConnectOptions, config: GatewayConfig) throws -> GatewayEndpoint {
|
|
||||||
let resolvedMode = (opts.mode ?? config.mode ?? "local").lowercased()
|
|
||||||
if let raw = opts.url, !raw.isEmpty {
|
|
||||||
guard let url = URL(string: raw) else {
|
|
||||||
throw NSError(domain: "Gateway", code: 1, userInfo: [NSLocalizedDescriptionKey: "invalid url: \(raw)"])
|
|
||||||
}
|
|
||||||
return GatewayEndpoint(
|
|
||||||
url: url,
|
|
||||||
token: resolvedToken(opts: opts, mode: resolvedMode, config: config),
|
|
||||||
password: resolvedPassword(opts: opts, mode: resolvedMode, config: config),
|
|
||||||
mode: resolvedMode)
|
|
||||||
}
|
|
||||||
|
|
||||||
if resolvedMode == "remote" {
|
|
||||||
guard let raw = config.remoteUrl?.trimmingCharacters(in: .whitespacesAndNewlines),
|
|
||||||
!raw.isEmpty
|
|
||||||
else {
|
|
||||||
throw NSError(
|
|
||||||
domain: "Gateway",
|
|
||||||
code: 1,
|
|
||||||
userInfo: [NSLocalizedDescriptionKey: "gateway.remote.url is missing"])
|
|
||||||
}
|
|
||||||
guard let url = URL(string: raw) else {
|
|
||||||
throw NSError(domain: "Gateway", code: 1, userInfo: [NSLocalizedDescriptionKey: "invalid url: \(raw)"])
|
|
||||||
}
|
|
||||||
return GatewayEndpoint(
|
|
||||||
url: url,
|
|
||||||
token: resolvedToken(opts: opts, mode: resolvedMode, config: config),
|
|
||||||
password: resolvedPassword(opts: opts, mode: resolvedMode, config: config),
|
|
||||||
mode: resolvedMode)
|
|
||||||
}
|
|
||||||
|
|
||||||
let port = config.port ?? 18789
|
|
||||||
let host = resolveLocalHost(bind: config.bind)
|
|
||||||
guard let url = URL(string: "ws://\(host):\(port)") else {
|
|
||||||
throw NSError(
|
|
||||||
domain: "Gateway",
|
|
||||||
code: 1,
|
|
||||||
userInfo: [NSLocalizedDescriptionKey: "invalid url: ws://\(host):\(port)"])
|
|
||||||
}
|
|
||||||
return GatewayEndpoint(
|
|
||||||
url: url,
|
|
||||||
token: resolvedToken(opts: opts, mode: resolvedMode, config: config),
|
|
||||||
password: resolvedPassword(opts: opts, mode: resolvedMode, config: config),
|
|
||||||
mode: resolvedMode)
|
|
||||||
}
|
|
||||||
|
|
||||||
private func bestEffortEndpoint(opts: ConnectOptions, config: GatewayConfig) -> GatewayEndpoint? {
|
|
||||||
try? resolveGatewayEndpoint(opts: opts, config: config)
|
|
||||||
}
|
|
||||||
|
|
||||||
private func resolvedToken(opts: ConnectOptions, mode: String, config: GatewayConfig) -> String? {
|
|
||||||
if let token = opts.token, !token.isEmpty { return token }
|
|
||||||
if let token = ProcessInfo.processInfo.environment["CLAWDBOT_GATEWAY_TOKEN"], !token.isEmpty {
|
|
||||||
return token
|
|
||||||
}
|
|
||||||
if mode == "remote" {
|
|
||||||
return config.remoteToken
|
|
||||||
}
|
|
||||||
return config.token
|
|
||||||
}
|
|
||||||
|
|
||||||
private func resolvedPassword(opts: ConnectOptions, mode: String, config: GatewayConfig) -> String? {
|
|
||||||
if let password = opts.password, !password.isEmpty { return password }
|
|
||||||
if let password = ProcessInfo.processInfo.environment["CLAWDBOT_GATEWAY_PASSWORD"], !password.isEmpty {
|
|
||||||
return password
|
|
||||||
}
|
|
||||||
if mode == "remote" {
|
|
||||||
return config.remotePassword
|
|
||||||
}
|
|
||||||
return config.password
|
|
||||||
}
|
|
||||||
|
|
||||||
private func resolveLocalHost(bind: String?) -> String {
|
|
||||||
let normalized = (bind ?? "").trimmingCharacters(in: .whitespacesAndNewlines).lowercased()
|
|
||||||
let tailnetIP = detectTailnetIPv4()
|
|
||||||
switch normalized {
|
|
||||||
case "tailnet", "auto":
|
|
||||||
return tailnetIP ?? "127.0.0.1"
|
|
||||||
default:
|
|
||||||
return "127.0.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func detectTailnetIPv4() -> String? {
|
|
||||||
var addrList: UnsafeMutablePointer<ifaddrs>?
|
|
||||||
guard getifaddrs(&addrList) == 0, let first = addrList else { return nil }
|
|
||||||
defer { freeifaddrs(addrList) }
|
|
||||||
|
|
||||||
for ptr in sequence(first: first, next: { $0.pointee.ifa_next }) {
|
|
||||||
let flags = Int32(ptr.pointee.ifa_flags)
|
|
||||||
let isUp = (flags & IFF_UP) != 0
|
|
||||||
let isLoopback = (flags & IFF_LOOPBACK) != 0
|
|
||||||
let family = ptr.pointee.ifa_addr.pointee.sa_family
|
|
||||||
if !isUp || isLoopback || family != UInt8(AF_INET) { continue }
|
|
||||||
|
|
||||||
var addr = ptr.pointee.ifa_addr.pointee
|
|
||||||
var buffer = [CChar](repeating: 0, count: Int(NI_MAXHOST))
|
|
||||||
let result = getnameinfo(
|
|
||||||
&addr,
|
|
||||||
socklen_t(ptr.pointee.ifa_addr.pointee.sa_len),
|
|
||||||
&buffer,
|
|
||||||
socklen_t(buffer.count),
|
|
||||||
nil,
|
|
||||||
0,
|
|
||||||
NI_NUMERICHOST)
|
|
||||||
guard result == 0 else { continue }
|
|
||||||
let len = buffer.prefix { $0 != 0 }
|
|
||||||
let bytes = len.map { UInt8(bitPattern: $0) }
|
|
||||||
guard let ip = String(bytes: bytes, encoding: .utf8) else { continue }
|
|
||||||
if isTailnetIPv4(ip) { return ip }
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
private func isTailnetIPv4(_ address: String) -> Bool {
|
|
||||||
let parts = address.split(separator: ".")
|
|
||||||
guard parts.count == 4 else { return false }
|
|
||||||
let octets = parts.compactMap { Int($0) }
|
|
||||||
guard octets.count == 4 else { return false }
|
|
||||||
let a = octets[0]
|
|
||||||
let b = octets[1]
|
|
||||||
return a == 100 && b >= 64 && b <= 127
|
|
||||||
}
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
import ClawdbotDiscovery
|
|
||||||
import Foundation
|
|
||||||
|
|
||||||
struct DiscoveryOptions {
|
|
||||||
var timeoutMs: Int = 2000
|
|
||||||
var json: Bool = false
|
|
||||||
var includeLocal: Bool = false
|
|
||||||
var help: Bool = false
|
|
||||||
|
|
||||||
static func parse(_ args: [String]) -> DiscoveryOptions {
|
|
||||||
var opts = DiscoveryOptions()
|
|
||||||
var i = 0
|
|
||||||
while i < args.count {
|
|
||||||
let arg = args[i]
|
|
||||||
switch arg {
|
|
||||||
case "-h", "--help":
|
|
||||||
opts.help = true
|
|
||||||
case "--json":
|
|
||||||
opts.json = true
|
|
||||||
case "--include-local":
|
|
||||||
opts.includeLocal = true
|
|
||||||
case "--timeout":
|
|
||||||
let next = (i + 1 < args.count) ? args[i + 1] : nil
|
|
||||||
if let next, let parsed = Int(next.trimmingCharacters(in: .whitespacesAndNewlines)) {
|
|
||||||
opts.timeoutMs = max(100, parsed)
|
|
||||||
i += 1
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
i += 1
|
|
||||||
}
|
|
||||||
return opts
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct DiscoveryOutput: Encodable {
|
|
||||||
struct Gateway: Encodable {
|
|
||||||
var displayName: String
|
|
||||||
var lanHost: String?
|
|
||||||
var tailnetDns: String?
|
|
||||||
var sshPort: Int
|
|
||||||
var gatewayPort: Int?
|
|
||||||
var cliPath: String?
|
|
||||||
var stableID: String
|
|
||||||
var debugID: String
|
|
||||||
var isLocal: Bool
|
|
||||||
}
|
|
||||||
|
|
||||||
var status: String
|
|
||||||
var timeoutMs: Int
|
|
||||||
var includeLocal: Bool
|
|
||||||
var count: Int
|
|
||||||
var gateways: [Gateway]
|
|
||||||
}
|
|
||||||
|
|
||||||
func runDiscover(_ args: [String]) async {
|
|
||||||
let opts = DiscoveryOptions.parse(args)
|
|
||||||
if opts.help {
|
|
||||||
print("""
|
|
||||||
clawdbot-mac discover
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
clawdbot-mac discover [--timeout <ms>] [--json] [--include-local]
|
|
||||||
|
|
||||||
Options:
|
|
||||||
--timeout <ms> Discovery window in milliseconds (default: 2000)
|
|
||||||
--json Emit JSON
|
|
||||||
--include-local Include gateways considered local
|
|
||||||
-h, --help Show help
|
|
||||||
""")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
let displayName = Host.current().localizedName ?? ProcessInfo.processInfo.hostName
|
|
||||||
let model = await MainActor.run {
|
|
||||||
GatewayDiscoveryModel(
|
|
||||||
localDisplayName: displayName,
|
|
||||||
filterLocalGateways: !opts.includeLocal)
|
|
||||||
}
|
|
||||||
|
|
||||||
await MainActor.run {
|
|
||||||
model.start()
|
|
||||||
}
|
|
||||||
|
|
||||||
let nanos = UInt64(max(100, opts.timeoutMs)) * 1_000_000
|
|
||||||
try? await Task.sleep(nanoseconds: nanos)
|
|
||||||
|
|
||||||
let gateways = await MainActor.run { model.gateways }
|
|
||||||
let status = await MainActor.run { model.statusText }
|
|
||||||
|
|
||||||
await MainActor.run {
|
|
||||||
model.stop()
|
|
||||||
}
|
|
||||||
|
|
||||||
if opts.json {
|
|
||||||
let payload = DiscoveryOutput(
|
|
||||||
status: status,
|
|
||||||
timeoutMs: opts.timeoutMs,
|
|
||||||
includeLocal: opts.includeLocal,
|
|
||||||
count: gateways.count,
|
|
||||||
gateways: gateways.map {
|
|
||||||
DiscoveryOutput.Gateway(
|
|
||||||
displayName: $0.displayName,
|
|
||||||
lanHost: $0.lanHost,
|
|
||||||
tailnetDns: $0.tailnetDns,
|
|
||||||
sshPort: $0.sshPort,
|
|
||||||
gatewayPort: $0.gatewayPort,
|
|
||||||
cliPath: $0.cliPath,
|
|
||||||
stableID: $0.stableID,
|
|
||||||
debugID: $0.debugID,
|
|
||||||
isLocal: $0.isLocal)
|
|
||||||
})
|
|
||||||
let encoder = JSONEncoder()
|
|
||||||
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
|
|
||||||
if let data = try? encoder.encode(payload),
|
|
||||||
let json = String(data: data, encoding: .utf8)
|
|
||||||
{
|
|
||||||
print(json)
|
|
||||||
} else {
|
|
||||||
print("{\"error\":\"failed to encode JSON\"}")
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
print("Gateway Discovery (macOS NWBrowser)")
|
|
||||||
print("Status: \(status)")
|
|
||||||
print("Found \(gateways.count) gateway(s)\(opts.includeLocal ? "" : " (local filtered)")")
|
|
||||||
if gateways.isEmpty { return }
|
|
||||||
|
|
||||||
for gateway in gateways {
|
|
||||||
let hosts = [gateway.tailnetDns, gateway.lanHost]
|
|
||||||
.compactMap { $0?.trimmingCharacters(in: .whitespacesAndNewlines) }
|
|
||||||
.filter { !$0.isEmpty }
|
|
||||||
.joined(separator: ", ")
|
|
||||||
print("- \(gateway.displayName)")
|
|
||||||
print(" hosts: \(hosts.isEmpty ? "(none)" : hosts)")
|
|
||||||
print(" ssh: \(gateway.sshPort)")
|
|
||||||
if let port = gateway.gatewayPort {
|
|
||||||
print(" gatewayPort: \(port)")
|
|
||||||
}
|
|
||||||
if let cliPath = gateway.cliPath {
|
|
||||||
print(" cliPath: \(cliPath)")
|
|
||||||
}
|
|
||||||
print(" isLocal: \(gateway.isLocal)")
|
|
||||||
print(" stableID: \(gateway.stableID)")
|
|
||||||
print(" debugID: \(gateway.debugID)")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
import Foundation
|
|
||||||
|
|
||||||
private struct RootCommand {
|
|
||||||
var name: String
|
|
||||||
var args: [String]
|
|
||||||
}
|
|
||||||
|
|
||||||
@main
|
|
||||||
struct ClawdbotMacCLI {
|
|
||||||
static func main() async {
|
|
||||||
let args = Array(CommandLine.arguments.dropFirst())
|
|
||||||
let command = parseRootCommand(args)
|
|
||||||
switch command?.name {
|
|
||||||
case nil:
|
|
||||||
printUsage()
|
|
||||||
case "-h", "--help", "help":
|
|
||||||
printUsage()
|
|
||||||
case "connect":
|
|
||||||
await runConnect(command?.args ?? [])
|
|
||||||
case "discover":
|
|
||||||
await runDiscover(command?.args ?? [])
|
|
||||||
case "wizard":
|
|
||||||
await runWizardCommand(command?.args ?? [])
|
|
||||||
default:
|
|
||||||
fputs("clawdbot-mac: unknown command\n", stderr)
|
|
||||||
printUsage()
|
|
||||||
exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func parseRootCommand(_ args: [String]) -> RootCommand? {
|
|
||||||
guard let first = args.first else { return nil }
|
|
||||||
return RootCommand(name: first, args: Array(args.dropFirst()))
|
|
||||||
}
|
|
||||||
|
|
||||||
private func printUsage() {
|
|
||||||
print("""
|
|
||||||
clawdbot-mac
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
clawdbot-mac connect [--url <ws://host:port>] [--token <token>] [--password <password>]
|
|
||||||
[--mode <local|remote>] [--timeout <ms>] [--probe] [--json]
|
|
||||||
[--client-id <id>] [--client-mode <mode>] [--display-name <name>]
|
|
||||||
[--role <role>] [--scopes <a,b,c>]
|
|
||||||
clawdbot-mac discover [--timeout <ms>] [--json] [--include-local]
|
|
||||||
clawdbot-mac wizard [--url <ws://host:port>] [--token <token>] [--password <password>]
|
|
||||||
[--mode <local|remote>] [--workspace <path>] [--json]
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
clawdbot-mac connect
|
|
||||||
clawdbot-mac connect --url ws://127.0.0.1:18789 --json
|
|
||||||
clawdbot-mac discover --timeout 3000 --json
|
|
||||||
clawdbot-mac wizard --mode local
|
|
||||||
""")
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
import Foundation
|
|
||||||
|
|
||||||
struct GatewayConfig {
|
|
||||||
var mode: String?
|
|
||||||
var bind: String?
|
|
||||||
var port: Int?
|
|
||||||
var remoteUrl: String?
|
|
||||||
var token: String?
|
|
||||||
var password: String?
|
|
||||||
var remoteToken: String?
|
|
||||||
var remotePassword: String?
|
|
||||||
}
|
|
||||||
|
|
||||||
struct GatewayEndpoint {
|
|
||||||
let url: URL
|
|
||||||
let token: String?
|
|
||||||
let password: String?
|
|
||||||
let mode: String
|
|
||||||
}
|
|
||||||
|
|
||||||
func loadGatewayConfig() -> GatewayConfig {
|
|
||||||
let url = FileManager().homeDirectoryForCurrentUser
|
|
||||||
.appendingPathComponent(".clawdbot")
|
|
||||||
.appendingPathComponent("clawdbot.json")
|
|
||||||
guard let data = try? Data(contentsOf: url) else { return GatewayConfig() }
|
|
||||||
guard let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any] else {
|
|
||||||
return GatewayConfig()
|
|
||||||
}
|
|
||||||
|
|
||||||
var cfg = GatewayConfig()
|
|
||||||
if let gateway = json["gateway"] as? [String: Any] {
|
|
||||||
cfg.mode = gateway["mode"] as? String
|
|
||||||
cfg.bind = gateway["bind"] as? String
|
|
||||||
cfg.port = gateway["port"] as? Int ?? parseInt(gateway["port"])
|
|
||||||
|
|
||||||
if let auth = gateway["auth"] as? [String: Any] {
|
|
||||||
cfg.token = auth["token"] as? String
|
|
||||||
cfg.password = auth["password"] as? String
|
|
||||||
}
|
|
||||||
if let remote = gateway["remote"] as? [String: Any] {
|
|
||||||
cfg.remoteUrl = remote["url"] as? String
|
|
||||||
cfg.remoteToken = remote["token"] as? String
|
|
||||||
cfg.remotePassword = remote["password"] as? String
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return cfg
|
|
||||||
}
|
|
||||||
|
|
||||||
func parseInt(_ value: Any?) -> Int? {
|
|
||||||
switch value {
|
|
||||||
case let number as Int:
|
|
||||||
number
|
|
||||||
case let number as Double:
|
|
||||||
Int(number)
|
|
||||||
case let raw as String:
|
|
||||||
Int(raw.trimmingCharacters(in: .whitespacesAndNewlines))
|
|
||||||
default:
|
|
||||||
nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
import ClawdbotKit
|
|
||||||
import ClawdbotProtocol
|
|
||||||
|
|
||||||
typealias ProtoAnyCodable = ClawdbotProtocol.AnyCodable
|
|
||||||
typealias KitAnyCodable = ClawdbotKit.AnyCodable
|
|
||||||
@@ -473,7 +473,6 @@ public struct AgentParams: Codable, Sendable {
|
|||||||
public let replychannel: String?
|
public let replychannel: String?
|
||||||
public let accountid: String?
|
public let accountid: String?
|
||||||
public let replyaccountid: String?
|
public let replyaccountid: String?
|
||||||
public let threadid: String?
|
|
||||||
public let timeout: Int?
|
public let timeout: Int?
|
||||||
public let lane: String?
|
public let lane: String?
|
||||||
public let extrasystemprompt: String?
|
public let extrasystemprompt: String?
|
||||||
@@ -495,7 +494,6 @@ public struct AgentParams: Codable, Sendable {
|
|||||||
replychannel: String?,
|
replychannel: String?,
|
||||||
accountid: String?,
|
accountid: String?,
|
||||||
replyaccountid: String?,
|
replyaccountid: String?,
|
||||||
threadid: String?,
|
|
||||||
timeout: Int?,
|
timeout: Int?,
|
||||||
lane: String?,
|
lane: String?,
|
||||||
extrasystemprompt: String?,
|
extrasystemprompt: String?,
|
||||||
@@ -516,7 +514,6 @@ public struct AgentParams: Codable, Sendable {
|
|||||||
self.replychannel = replychannel
|
self.replychannel = replychannel
|
||||||
self.accountid = accountid
|
self.accountid = accountid
|
||||||
self.replyaccountid = replyaccountid
|
self.replyaccountid = replyaccountid
|
||||||
self.threadid = threadid
|
|
||||||
self.timeout = timeout
|
self.timeout = timeout
|
||||||
self.lane = lane
|
self.lane = lane
|
||||||
self.extrasystemprompt = extrasystemprompt
|
self.extrasystemprompt = extrasystemprompt
|
||||||
@@ -538,7 +535,6 @@ public struct AgentParams: Codable, Sendable {
|
|||||||
case replychannel = "replyChannel"
|
case replychannel = "replyChannel"
|
||||||
case accountid = "accountId"
|
case accountid = "accountId"
|
||||||
case replyaccountid = "replyAccountId"
|
case replyaccountid = "replyAccountId"
|
||||||
case threadid = "threadId"
|
|
||||||
case timeout
|
case timeout
|
||||||
case lane
|
case lane
|
||||||
case extrasystemprompt = "extraSystemPrompt"
|
case extrasystemprompt = "extraSystemPrompt"
|
||||||
@@ -839,47 +835,35 @@ public struct SessionsListParams: Codable, Sendable {
|
|||||||
public let activeminutes: Int?
|
public let activeminutes: Int?
|
||||||
public let includeglobal: Bool?
|
public let includeglobal: Bool?
|
||||||
public let includeunknown: Bool?
|
public let includeunknown: Bool?
|
||||||
public let includederivedtitles: Bool?
|
|
||||||
public let includelastmessage: Bool?
|
|
||||||
public let label: String?
|
public let label: String?
|
||||||
public let spawnedby: String?
|
public let spawnedby: String?
|
||||||
public let agentid: String?
|
public let agentid: String?
|
||||||
public let search: String?
|
|
||||||
|
|
||||||
public init(
|
public init(
|
||||||
limit: Int?,
|
limit: Int?,
|
||||||
activeminutes: Int?,
|
activeminutes: Int?,
|
||||||
includeglobal: Bool?,
|
includeglobal: Bool?,
|
||||||
includeunknown: Bool?,
|
includeunknown: Bool?,
|
||||||
includederivedtitles: Bool?,
|
|
||||||
includelastmessage: Bool?,
|
|
||||||
label: String?,
|
label: String?,
|
||||||
spawnedby: String?,
|
spawnedby: String?,
|
||||||
agentid: String?,
|
agentid: String?
|
||||||
search: String?
|
|
||||||
) {
|
) {
|
||||||
self.limit = limit
|
self.limit = limit
|
||||||
self.activeminutes = activeminutes
|
self.activeminutes = activeminutes
|
||||||
self.includeglobal = includeglobal
|
self.includeglobal = includeglobal
|
||||||
self.includeunknown = includeunknown
|
self.includeunknown = includeunknown
|
||||||
self.includederivedtitles = includederivedtitles
|
|
||||||
self.includelastmessage = includelastmessage
|
|
||||||
self.label = label
|
self.label = label
|
||||||
self.spawnedby = spawnedby
|
self.spawnedby = spawnedby
|
||||||
self.agentid = agentid
|
self.agentid = agentid
|
||||||
self.search = search
|
|
||||||
}
|
}
|
||||||
private enum CodingKeys: String, CodingKey {
|
private enum CodingKeys: String, CodingKey {
|
||||||
case limit
|
case limit
|
||||||
case activeminutes = "activeMinutes"
|
case activeminutes = "activeMinutes"
|
||||||
case includeglobal = "includeGlobal"
|
case includeglobal = "includeGlobal"
|
||||||
case includeunknown = "includeUnknown"
|
case includeunknown = "includeUnknown"
|
||||||
case includederivedtitles = "includeDerivedTitles"
|
|
||||||
case includelastmessage = "includeLastMessage"
|
|
||||||
case label
|
case label
|
||||||
case spawnedby = "spawnedBy"
|
case spawnedby = "spawnedBy"
|
||||||
case agentid = "agentId"
|
case agentid = "agentId"
|
||||||
case search
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+111
-49
@@ -3,6 +3,8 @@ import ClawdbotProtocol
|
|||||||
import Darwin
|
import Darwin
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
private typealias ProtoAnyCodable = ClawdbotProtocol.AnyCodable
|
||||||
|
|
||||||
struct WizardCliOptions {
|
struct WizardCliOptions {
|
||||||
var url: String?
|
var url: String?
|
||||||
var token: String?
|
var token: String?
|
||||||
@@ -49,6 +51,17 @@ struct WizardCliOptions {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct GatewayConfig {
|
||||||
|
var mode: String?
|
||||||
|
var bind: String?
|
||||||
|
var port: Int?
|
||||||
|
var remoteUrl: String?
|
||||||
|
var token: String?
|
||||||
|
var password: String?
|
||||||
|
var remoteToken: String?
|
||||||
|
var remotePassword: String?
|
||||||
|
}
|
||||||
|
|
||||||
enum WizardCliError: Error, CustomStringConvertible {
|
enum WizardCliError: Error, CustomStringConvertible {
|
||||||
case invalidUrl(String)
|
case invalidUrl(String)
|
||||||
case missingRemoteUrl
|
case missingRemoteUrl
|
||||||
@@ -67,56 +80,68 @@ enum WizardCliError: Error, CustomStringConvertible {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func runWizardCommand(_ args: [String]) async {
|
@main
|
||||||
let opts = WizardCliOptions.parse(args)
|
struct ClawdbotWizardCLI {
|
||||||
if opts.help {
|
static func main() async {
|
||||||
print("""
|
let opts = WizardCliOptions.parse(Array(CommandLine.arguments.dropFirst()))
|
||||||
clawdbot-mac wizard
|
if opts.help {
|
||||||
|
printUsage()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
Usage:
|
let config = loadGatewayConfig()
|
||||||
clawdbot-mac wizard [--url <ws://host:port>] [--token <token>] [--password <password>]
|
do {
|
||||||
[--mode <local|remote>] [--workspace <path>] [--json]
|
guard isatty(STDIN_FILENO) != 0 else {
|
||||||
|
throw WizardCliError.gatewayError("Wizard requires an interactive TTY.")
|
||||||
Options:
|
}
|
||||||
--url <url> Gateway WebSocket URL (overrides config)
|
let endpoint = try resolveGatewayEndpoint(opts: opts, config: config)
|
||||||
--token <token> Gateway token (if required)
|
let client = GatewayWizardClient(
|
||||||
--password <pw> Gateway password (if required)
|
url: endpoint.url,
|
||||||
--mode <mode> Wizard mode (local|remote). Default: local
|
token: endpoint.token,
|
||||||
--workspace <path> Wizard workspace override
|
password: endpoint.password,
|
||||||
--json Print raw wizard responses
|
json: opts.json)
|
||||||
-h, --help Show help
|
try await client.connect()
|
||||||
""")
|
defer { Task { await client.close() } }
|
||||||
return
|
try await runWizard(client: client, opts: opts)
|
||||||
}
|
} catch {
|
||||||
|
fputs("wizard: \(error)\n", stderr)
|
||||||
let config = loadGatewayConfig()
|
exit(1)
|
||||||
do {
|
|
||||||
guard isatty(STDIN_FILENO) != 0 else {
|
|
||||||
throw WizardCliError.gatewayError("Wizard requires an interactive TTY.")
|
|
||||||
}
|
}
|
||||||
let endpoint = try resolveWizardGatewayEndpoint(opts: opts, config: config)
|
|
||||||
let client = GatewayWizardClient(
|
|
||||||
url: endpoint.url,
|
|
||||||
token: endpoint.token,
|
|
||||||
password: endpoint.password,
|
|
||||||
json: opts.json)
|
|
||||||
try await client.connect()
|
|
||||||
defer { Task { await client.close() } }
|
|
||||||
try await runWizard(client: client, opts: opts)
|
|
||||||
} catch {
|
|
||||||
fputs("wizard: \(error)\n", stderr)
|
|
||||||
exit(1)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func resolveWizardGatewayEndpoint(opts: WizardCliOptions, config: GatewayConfig) throws -> GatewayEndpoint {
|
private struct GatewayEndpoint {
|
||||||
|
let url: URL
|
||||||
|
let token: String?
|
||||||
|
let password: String?
|
||||||
|
}
|
||||||
|
|
||||||
|
private func printUsage() {
|
||||||
|
print("""
|
||||||
|
clawdbot-mac-wizard
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
clawdbot-mac-wizard [--url <ws://host:port>] [--token <token>] [--password <password>]
|
||||||
|
[--mode <local|remote>] [--workspace <path>] [--json]
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--url <url> Gateway WebSocket URL (overrides config)
|
||||||
|
--token <token> Gateway token (if required)
|
||||||
|
--password <pw> Gateway password (if required)
|
||||||
|
--mode <mode> Wizard mode (local|remote). Default: local
|
||||||
|
--workspace <path> Wizard workspace override
|
||||||
|
--json Print raw wizard responses
|
||||||
|
-h, --help Show help
|
||||||
|
""")
|
||||||
|
}
|
||||||
|
|
||||||
|
private func resolveGatewayEndpoint(opts: WizardCliOptions, config: GatewayConfig) throws -> GatewayEndpoint {
|
||||||
if let raw = opts.url, !raw.isEmpty {
|
if let raw = opts.url, !raw.isEmpty {
|
||||||
guard let url = URL(string: raw) else { throw WizardCliError.invalidUrl(raw) }
|
guard let url = URL(string: raw) else { throw WizardCliError.invalidUrl(raw) }
|
||||||
return GatewayEndpoint(
|
return GatewayEndpoint(
|
||||||
url: url,
|
url: url,
|
||||||
token: resolvedToken(opts: opts, config: config),
|
token: resolvedToken(opts: opts, config: config),
|
||||||
password: resolvedPassword(opts: opts, config: config),
|
password: resolvedPassword(opts: opts, config: config))
|
||||||
mode: (config.mode ?? "local").lowercased())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let mode = (config.mode ?? "local").lowercased()
|
let mode = (config.mode ?? "local").lowercased()
|
||||||
@@ -128,8 +153,7 @@ private func resolveWizardGatewayEndpoint(opts: WizardCliOptions, config: Gatewa
|
|||||||
return GatewayEndpoint(
|
return GatewayEndpoint(
|
||||||
url: url,
|
url: url,
|
||||||
token: resolvedToken(opts: opts, config: config),
|
token: resolvedToken(opts: opts, config: config),
|
||||||
password: resolvedPassword(opts: opts, config: config),
|
password: resolvedPassword(opts: opts, config: config))
|
||||||
mode: mode)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let port = config.port ?? 18789
|
let port = config.port ?? 18789
|
||||||
@@ -140,8 +164,7 @@ private func resolveWizardGatewayEndpoint(opts: WizardCliOptions, config: Gatewa
|
|||||||
return GatewayEndpoint(
|
return GatewayEndpoint(
|
||||||
url: url,
|
url: url,
|
||||||
token: resolvedToken(opts: opts, config: config),
|
token: resolvedToken(opts: opts, config: config),
|
||||||
password: resolvedPassword(opts: opts, config: config),
|
password: resolvedPassword(opts: opts, config: config))
|
||||||
mode: mode)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func resolvedToken(opts: WizardCliOptions, config: GatewayConfig) -> String? {
|
private func resolvedToken(opts: WizardCliOptions, config: GatewayConfig) -> String? {
|
||||||
@@ -166,6 +189,47 @@ private func resolvedPassword(opts: WizardCliOptions, config: GatewayConfig) ->
|
|||||||
return config.password
|
return config.password
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func loadGatewayConfig() -> GatewayConfig {
|
||||||
|
let url = FileManager().homeDirectoryForCurrentUser
|
||||||
|
.appendingPathComponent(".clawdbot")
|
||||||
|
.appendingPathComponent("clawdbot.json")
|
||||||
|
guard let data = try? Data(contentsOf: url) else { return GatewayConfig() }
|
||||||
|
guard let json = try? JSONSerialization.jsonObject(with: data) as? [String: Any] else {
|
||||||
|
return GatewayConfig()
|
||||||
|
}
|
||||||
|
|
||||||
|
var cfg = GatewayConfig()
|
||||||
|
if let gateway = json["gateway"] as? [String: Any] {
|
||||||
|
cfg.mode = gateway["mode"] as? String
|
||||||
|
cfg.bind = gateway["bind"] as? String
|
||||||
|
cfg.port = gateway["port"] as? Int ?? parseInt(gateway["port"])
|
||||||
|
|
||||||
|
if let auth = gateway["auth"] as? [String: Any] {
|
||||||
|
cfg.token = auth["token"] as? String
|
||||||
|
cfg.password = auth["password"] as? String
|
||||||
|
}
|
||||||
|
if let remote = gateway["remote"] as? [String: Any] {
|
||||||
|
cfg.remoteUrl = remote["url"] as? String
|
||||||
|
cfg.remoteToken = remote["token"] as? String
|
||||||
|
cfg.remotePassword = remote["password"] as? String
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
private func parseInt(_ value: Any?) -> Int? {
|
||||||
|
switch value {
|
||||||
|
case let number as Int:
|
||||||
|
number
|
||||||
|
case let number as Double:
|
||||||
|
Int(number)
|
||||||
|
case let raw as String:
|
||||||
|
Int(raw.trimmingCharacters(in: .whitespacesAndNewlines))
|
||||||
|
default:
|
||||||
|
nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
actor GatewayWizardClient {
|
actor GatewayWizardClient {
|
||||||
private enum ConnectChallengeError: Error {
|
private enum ConnectChallengeError: Error {
|
||||||
case timeout
|
case timeout
|
||||||
@@ -301,8 +365,7 @@ actor GatewayWizardClient {
|
|||||||
}
|
}
|
||||||
let payload = payloadParts.joined(separator: "|")
|
let payload = payloadParts.joined(separator: "|")
|
||||||
if let signature = DeviceIdentityStore.signPayload(payload, identity: identity),
|
if let signature = DeviceIdentityStore.signPayload(payload, identity: identity),
|
||||||
let publicKey = DeviceIdentityStore.publicKeyBase64Url(identity)
|
let publicKey = DeviceIdentityStore.publicKeyBase64Url(identity) {
|
||||||
{
|
|
||||||
var device: [String: ProtoAnyCodable] = [
|
var device: [String: ProtoAnyCodable] = [
|
||||||
"id": ProtoAnyCodable(identity.deviceId),
|
"id": ProtoAnyCodable(identity.deviceId),
|
||||||
"publicKey": ProtoAnyCodable(publicKey),
|
"publicKey": ProtoAnyCodable(publicKey),
|
||||||
@@ -347,11 +410,10 @@ actor GatewayWizardClient {
|
|||||||
operation: {
|
operation: {
|
||||||
while true {
|
while true {
|
||||||
let message = try await task.receive()
|
let message = try await task.receive()
|
||||||
let frame = try await self.decodeFrame(message)
|
let frame = try decodeFrame(message)
|
||||||
if case let .event(evt) = frame, evt.event == "connect.challenge" {
|
if case let .event(evt) = frame, evt.event == "connect.challenge" {
|
||||||
if let payload = evt.payload?.value as? [String: ProtoAnyCodable],
|
if let payload = evt.payload?.value as? [String: ProtoAnyCodable],
|
||||||
let nonce = payload["nonce"]?.value as? String
|
let nonce = payload["nonce"]?.value as? String {
|
||||||
{
|
|
||||||
return nonce
|
return nonce
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,8 +3,6 @@ import SwiftUI
|
|||||||
import Testing
|
import Testing
|
||||||
@testable import Clawdbot
|
@testable import Clawdbot
|
||||||
|
|
||||||
private typealias SnapshotAnyCodable = Clawdbot.AnyCodable
|
|
||||||
|
|
||||||
@Suite(.serialized)
|
@Suite(.serialized)
|
||||||
@MainActor
|
@MainActor
|
||||||
struct ChannelsSettingsSmokeTests {
|
struct ChannelsSettingsSmokeTests {
|
||||||
@@ -19,11 +17,8 @@ struct ChannelsSettingsSmokeTests {
|
|||||||
"signal": "Signal",
|
"signal": "Signal",
|
||||||
"imessage": "iMessage",
|
"imessage": "iMessage",
|
||||||
],
|
],
|
||||||
channelDetailLabels: nil,
|
|
||||||
channelSystemImages: nil,
|
|
||||||
channelMeta: nil,
|
|
||||||
channels: [
|
channels: [
|
||||||
"whatsapp": SnapshotAnyCodable([
|
"whatsapp": AnyCodable([
|
||||||
"configured": true,
|
"configured": true,
|
||||||
"linked": true,
|
"linked": true,
|
||||||
"authAgeMs": 86_400_000,
|
"authAgeMs": 86_400_000,
|
||||||
@@ -42,7 +37,7 @@ struct ChannelsSettingsSmokeTests {
|
|||||||
"lastEventAt": 1_700_000_060_000,
|
"lastEventAt": 1_700_000_060_000,
|
||||||
"lastError": "needs login",
|
"lastError": "needs login",
|
||||||
]),
|
]),
|
||||||
"telegram": SnapshotAnyCodable([
|
"telegram": AnyCodable([
|
||||||
"configured": true,
|
"configured": true,
|
||||||
"tokenSource": "env",
|
"tokenSource": "env",
|
||||||
"running": true,
|
"running": true,
|
||||||
@@ -57,7 +52,7 @@ struct ChannelsSettingsSmokeTests {
|
|||||||
],
|
],
|
||||||
"lastProbeAt": 1_700_000_050_000,
|
"lastProbeAt": 1_700_000_050_000,
|
||||||
]),
|
]),
|
||||||
"signal": SnapshotAnyCodable([
|
"signal": AnyCodable([
|
||||||
"configured": true,
|
"configured": true,
|
||||||
"baseUrl": "http://127.0.0.1:8080",
|
"baseUrl": "http://127.0.0.1:8080",
|
||||||
"running": true,
|
"running": true,
|
||||||
@@ -70,7 +65,7 @@ struct ChannelsSettingsSmokeTests {
|
|||||||
],
|
],
|
||||||
"lastProbeAt": 1_700_000_050_000,
|
"lastProbeAt": 1_700_000_050_000,
|
||||||
]),
|
]),
|
||||||
"imessage": SnapshotAnyCodable([
|
"imessage": AnyCodable([
|
||||||
"configured": false,
|
"configured": false,
|
||||||
"running": false,
|
"running": false,
|
||||||
"lastError": "not configured",
|
"lastError": "not configured",
|
||||||
@@ -105,18 +100,15 @@ struct ChannelsSettingsSmokeTests {
|
|||||||
"signal": "Signal",
|
"signal": "Signal",
|
||||||
"imessage": "iMessage",
|
"imessage": "iMessage",
|
||||||
],
|
],
|
||||||
channelDetailLabels: nil,
|
|
||||||
channelSystemImages: nil,
|
|
||||||
channelMeta: nil,
|
|
||||||
channels: [
|
channels: [
|
||||||
"whatsapp": SnapshotAnyCodable([
|
"whatsapp": AnyCodable([
|
||||||
"configured": false,
|
"configured": false,
|
||||||
"linked": false,
|
"linked": false,
|
||||||
"running": false,
|
"running": false,
|
||||||
"connected": false,
|
"connected": false,
|
||||||
"reconnectAttempts": 0,
|
"reconnectAttempts": 0,
|
||||||
]),
|
]),
|
||||||
"telegram": SnapshotAnyCodable([
|
"telegram": AnyCodable([
|
||||||
"configured": false,
|
"configured": false,
|
||||||
"running": false,
|
"running": false,
|
||||||
"lastError": "bot missing",
|
"lastError": "bot missing",
|
||||||
@@ -128,7 +120,7 @@ struct ChannelsSettingsSmokeTests {
|
|||||||
],
|
],
|
||||||
"lastProbeAt": 1_700_000_100_000,
|
"lastProbeAt": 1_700_000_100_000,
|
||||||
]),
|
]),
|
||||||
"signal": SnapshotAnyCodable([
|
"signal": AnyCodable([
|
||||||
"configured": false,
|
"configured": false,
|
||||||
"baseUrl": "http://127.0.0.1:8080",
|
"baseUrl": "http://127.0.0.1:8080",
|
||||||
"running": false,
|
"running": false,
|
||||||
@@ -141,7 +133,7 @@ struct ChannelsSettingsSmokeTests {
|
|||||||
],
|
],
|
||||||
"lastProbeAt": 1_700_000_200_000,
|
"lastProbeAt": 1_700_000_200_000,
|
||||||
]),
|
]),
|
||||||
"imessage": SnapshotAnyCodable([
|
"imessage": AnyCodable([
|
||||||
"configured": false,
|
"configured": false,
|
||||||
"running": false,
|
"running": false,
|
||||||
"lastError": "not configured",
|
"lastError": "not configured",
|
||||||
|
|||||||
@@ -11,19 +11,16 @@ struct CronJobEditorSmokeTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test func cronJobEditorBuildsBodyForNewJob() {
|
@Test func cronJobEditorBuildsBodyForNewJob() {
|
||||||
let channelsStore = ChannelsStore(isPreview: true)
|
|
||||||
let view = CronJobEditor(
|
let view = CronJobEditor(
|
||||||
job: nil,
|
job: nil,
|
||||||
isSaving: .constant(false),
|
isSaving: .constant(false),
|
||||||
error: .constant(nil),
|
error: .constant(nil),
|
||||||
channelsStore: channelsStore,
|
|
||||||
onCancel: {},
|
onCancel: {},
|
||||||
onSave: { _ in })
|
onSave: { _ in })
|
||||||
_ = view.body
|
_ = view.body
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test func cronJobEditorBuildsBodyForExistingJob() {
|
@Test func cronJobEditorBuildsBodyForExistingJob() {
|
||||||
let channelsStore = ChannelsStore(isPreview: true)
|
|
||||||
let job = CronJob(
|
let job = CronJob(
|
||||||
id: "job-1",
|
id: "job-1",
|
||||||
agentId: "ops",
|
agentId: "ops",
|
||||||
@@ -57,36 +54,31 @@ struct CronJobEditorSmokeTests {
|
|||||||
job: job,
|
job: job,
|
||||||
isSaving: .constant(false),
|
isSaving: .constant(false),
|
||||||
error: .constant(nil),
|
error: .constant(nil),
|
||||||
channelsStore: channelsStore,
|
|
||||||
onCancel: {},
|
onCancel: {},
|
||||||
onSave: { _ in })
|
onSave: { _ in })
|
||||||
_ = view.body
|
_ = view.body
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test func cronJobEditorExercisesBuilders() {
|
@Test func cronJobEditorExercisesBuilders() {
|
||||||
let channelsStore = ChannelsStore(isPreview: true)
|
|
||||||
var view = CronJobEditor(
|
var view = CronJobEditor(
|
||||||
job: nil,
|
job: nil,
|
||||||
isSaving: .constant(false),
|
isSaving: .constant(false),
|
||||||
error: .constant(nil),
|
error: .constant(nil),
|
||||||
channelsStore: channelsStore,
|
|
||||||
onCancel: {},
|
onCancel: {},
|
||||||
onSave: { _ in })
|
onSave: { _ in })
|
||||||
view.exerciseForTesting()
|
view.exerciseForTesting()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test func cronJobEditorIncludesDeleteAfterRunForAtSchedule() throws {
|
@Test func cronJobEditorIncludesDeleteAfterRunForAtSchedule() throws {
|
||||||
let channelsStore = ChannelsStore(isPreview: true)
|
|
||||||
let view = CronJobEditor(
|
let view = CronJobEditor(
|
||||||
job: nil,
|
job: nil,
|
||||||
isSaving: .constant(false),
|
isSaving: .constant(false),
|
||||||
error: .constant(nil),
|
error: .constant(nil),
|
||||||
channelsStore: channelsStore,
|
|
||||||
onCancel: {},
|
onCancel: {},
|
||||||
onSave: { _ in })
|
onSave: { _ in })
|
||||||
|
|
||||||
var root: [String: Any] = [:]
|
var root: [String: Any] = [:]
|
||||||
view.applyDeleteAfterRun(to: &root, scheduleKind: CronJobEditor.ScheduleKind.at, deleteAfterRun: true)
|
view.applyDeleteAfterRun(to: &root, scheduleKind: .at, deleteAfterRun: true)
|
||||||
let raw = root["deleteAfterRun"] as? Bool
|
let raw = root["deleteAfterRun"] as? Bool
|
||||||
#expect(raw == true)
|
#expect(raw == true)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import ClawdbotKit
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import os
|
import os
|
||||||
import Testing
|
import Testing
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import ClawdbotKit
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import os
|
import os
|
||||||
import Testing
|
import Testing
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import ClawdbotKit
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import os
|
import os
|
||||||
import Testing
|
import Testing
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import ClawdbotKit
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import os
|
import os
|
||||||
import Testing
|
import Testing
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import ClawdbotKit
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import Testing
|
import Testing
|
||||||
@testable import Clawdbot
|
@testable import Clawdbot
|
||||||
|
|||||||
@@ -139,40 +139,4 @@ import Testing
|
|||||||
let resolved = ConnectionModeResolver.resolve(root: root, defaults: defaults)
|
let resolved = ConnectionModeResolver.resolve(root: root, defaults: defaults)
|
||||||
#expect(resolved.mode == .remote)
|
#expect(resolved.mode == .remote)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test func resolveLocalGatewayHostPrefersTailnetForAuto() {
|
|
||||||
let host = GatewayEndpointStore._testResolveLocalGatewayHost(
|
|
||||||
bindMode: "auto",
|
|
||||||
tailscaleIP: "100.64.1.2")
|
|
||||||
#expect(host == "100.64.1.2")
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test func resolveLocalGatewayHostFallsBackToLoopbackForAuto() {
|
|
||||||
let host = GatewayEndpointStore._testResolveLocalGatewayHost(
|
|
||||||
bindMode: "auto",
|
|
||||||
tailscaleIP: nil)
|
|
||||||
#expect(host == "127.0.0.1")
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test func resolveLocalGatewayHostPrefersTailnetForTailnetMode() {
|
|
||||||
let host = GatewayEndpointStore._testResolveLocalGatewayHost(
|
|
||||||
bindMode: "tailnet",
|
|
||||||
tailscaleIP: "100.64.1.5")
|
|
||||||
#expect(host == "100.64.1.5")
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test func resolveLocalGatewayHostFallsBackToLoopbackForTailnetMode() {
|
|
||||||
let host = GatewayEndpointStore._testResolveLocalGatewayHost(
|
|
||||||
bindMode: "tailnet",
|
|
||||||
tailscaleIP: nil)
|
|
||||||
#expect(host == "127.0.0.1")
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test func resolveLocalGatewayHostUsesCustomBindHost() {
|
|
||||||
let host = GatewayEndpointStore._testResolveLocalGatewayHost(
|
|
||||||
bindMode: "custom",
|
|
||||||
tailscaleIP: "100.64.1.9",
|
|
||||||
customBindHost: "192.168.1.10")
|
|
||||||
#expect(host == "192.168.1.10")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -7,17 +7,15 @@ import Testing
|
|||||||
|
|
||||||
@Suite(.serialized)
|
@Suite(.serialized)
|
||||||
struct LowCoverageHelperTests {
|
struct LowCoverageHelperTests {
|
||||||
private typealias ProtoAnyCodable = ClawdbotProtocol.AnyCodable
|
|
||||||
|
|
||||||
@Test func anyCodableHelperAccessors() throws {
|
@Test func anyCodableHelperAccessors() throws {
|
||||||
let payload: [String: ProtoAnyCodable] = [
|
let payload: [String: AnyCodable] = [
|
||||||
"title": ProtoAnyCodable("Hello"),
|
"title": AnyCodable("Hello"),
|
||||||
"flag": ProtoAnyCodable(true),
|
"flag": AnyCodable(true),
|
||||||
"count": ProtoAnyCodable(3),
|
"count": AnyCodable(3),
|
||||||
"ratio": ProtoAnyCodable(1.25),
|
"ratio": AnyCodable(1.25),
|
||||||
"list": ProtoAnyCodable([ProtoAnyCodable("a"), ProtoAnyCodable(2)]),
|
"list": AnyCodable([AnyCodable("a"), AnyCodable(2)]),
|
||||||
]
|
]
|
||||||
let any = ProtoAnyCodable(payload)
|
let any = AnyCodable(payload)
|
||||||
let dict = try #require(any.dictionaryValue)
|
let dict = try #require(any.dictionaryValue)
|
||||||
#expect(dict["title"]?.stringValue == "Hello")
|
#expect(dict["title"]?.stringValue == "Hello")
|
||||||
#expect(dict["flag"]?.boolValue == true)
|
#expect(dict["flag"]?.boolValue == true)
|
||||||
@@ -78,27 +76,31 @@ struct LowCoverageHelperTests {
|
|||||||
#expect(result.stderr.contains("stderr-1999"))
|
#expect(result.stderr.contains("stderr-1999"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test func nodeInfoCodableRoundTrip() throws {
|
@Test func pairedNodesStorePersists() async throws {
|
||||||
let info = NodeInfo(
|
let dir = FileManager().temporaryDirectory
|
||||||
|
.appendingPathComponent("paired-\(UUID().uuidString)", isDirectory: true)
|
||||||
|
try FileManager().createDirectory(at: dir, withIntermediateDirectories: true)
|
||||||
|
let url = dir.appendingPathComponent("nodes.json")
|
||||||
|
let store = PairedNodesStore(fileURL: url)
|
||||||
|
await store.load()
|
||||||
|
#expect(await store.all().isEmpty)
|
||||||
|
|
||||||
|
let node = PairedNode(
|
||||||
nodeId: "node-1",
|
nodeId: "node-1",
|
||||||
displayName: "Node One",
|
displayName: "Node One",
|
||||||
platform: "macOS",
|
platform: "macOS",
|
||||||
version: "1.0",
|
version: "1.0",
|
||||||
coreVersion: "1.0-core",
|
|
||||||
uiVersion: "1.0-ui",
|
|
||||||
deviceFamily: "Mac",
|
deviceFamily: "Mac",
|
||||||
modelIdentifier: "MacBookPro",
|
modelIdentifier: "MacBookPro",
|
||||||
remoteIp: "192.168.1.2",
|
token: "token",
|
||||||
caps: ["chat"],
|
createdAtMs: 1,
|
||||||
commands: ["send"],
|
lastSeenAtMs: nil)
|
||||||
permissions: ["send": true],
|
try await store.upsert(node)
|
||||||
paired: true,
|
#expect(await store.find(nodeId: "node-1")?.displayName == "Node One")
|
||||||
connected: false)
|
|
||||||
let data = try JSONEncoder().encode(info)
|
try await store.touchSeen(nodeId: "node-1")
|
||||||
let decoded = try JSONDecoder().decode(NodeInfo.self, from: data)
|
let updated = await store.find(nodeId: "node-1")
|
||||||
#expect(decoded.nodeId == "node-1")
|
#expect(updated?.lastSeenAtMs != nil)
|
||||||
#expect(decoded.isPaired == true)
|
|
||||||
#expect(decoded.isConnected == false)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test @MainActor func presenceReporterHelpers() {
|
@Test @MainActor func presenceReporterHelpers() {
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import Testing
|
|||||||
features: [:],
|
features: [:],
|
||||||
snapshot: snapshot,
|
snapshot: snapshot,
|
||||||
canvashosturl: nil,
|
canvashosturl: nil,
|
||||||
auth: nil,
|
|
||||||
policy: [:])
|
policy: [:])
|
||||||
|
|
||||||
let mapped = MacGatewayChatTransport.mapPushToTransportEvent(.snapshot(hello))
|
let mapped = MacGatewayChatTransport.mapPushToTransportEvent(.snapshot(hello))
|
||||||
|
|||||||
@@ -3,15 +3,13 @@ import SwiftUI
|
|||||||
import Testing
|
import Testing
|
||||||
@testable import Clawdbot
|
@testable import Clawdbot
|
||||||
|
|
||||||
private typealias ProtoAnyCodable = ClawdbotProtocol.AnyCodable
|
|
||||||
|
|
||||||
@Suite(.serialized)
|
@Suite(.serialized)
|
||||||
@MainActor
|
@MainActor
|
||||||
struct OnboardingWizardStepViewTests {
|
struct OnboardingWizardStepViewTests {
|
||||||
@Test func noteStepBuilds() {
|
@Test func noteStepBuilds() {
|
||||||
let step = WizardStep(
|
let step = WizardStep(
|
||||||
id: "step-1",
|
id: "step-1",
|
||||||
type: ProtoAnyCodable("note"),
|
type: AnyCodable("note"),
|
||||||
title: "Welcome",
|
title: "Welcome",
|
||||||
message: "Hello",
|
message: "Hello",
|
||||||
options: nil,
|
options: nil,
|
||||||
@@ -24,17 +22,17 @@ struct OnboardingWizardStepViewTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test func selectStepBuilds() {
|
@Test func selectStepBuilds() {
|
||||||
let options: [[String: ProtoAnyCodable]] = [
|
let options: [[String: AnyCodable]] = [
|
||||||
["value": ProtoAnyCodable("local"), "label": ProtoAnyCodable("Local"), "hint": ProtoAnyCodable("This Mac")],
|
["value": AnyCodable("local"), "label": AnyCodable("Local"), "hint": AnyCodable("This Mac")],
|
||||||
["value": ProtoAnyCodable("remote"), "label": ProtoAnyCodable("Remote")],
|
["value": AnyCodable("remote"), "label": AnyCodable("Remote")],
|
||||||
]
|
]
|
||||||
let step = WizardStep(
|
let step = WizardStep(
|
||||||
id: "step-2",
|
id: "step-2",
|
||||||
type: ProtoAnyCodable("select"),
|
type: AnyCodable("select"),
|
||||||
title: "Mode",
|
title: "Mode",
|
||||||
message: "Choose a mode",
|
message: "Choose a mode",
|
||||||
options: options,
|
options: options,
|
||||||
initialvalue: ProtoAnyCodable("local"),
|
initialvalue: AnyCodable("local"),
|
||||||
placeholder: nil,
|
placeholder: nil,
|
||||||
sensitive: nil,
|
sensitive: nil,
|
||||||
executor: nil)
|
executor: nil)
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ struct WideAreaGatewayDiscoveryTests {
|
|||||||
let nameserver = args.first(where: { $0.hasPrefix("@") }) ?? ""
|
let nameserver = args.first(where: { $0.hasPrefix("@") }) ?? ""
|
||||||
if recordType == "PTR" {
|
if recordType == "PTR" {
|
||||||
if nameserver == "@100.123.224.76" {
|
if nameserver == "@100.123.224.76" {
|
||||||
return "steipetacstudio-gateway._clawdbot-gw._tcp.clawdbot.internal.\n"
|
return "steipetacstudio-gateway._clawdbot-gateway._tcp.clawdbot.internal.\n"
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import Foundation
|
|||||||
|
|
||||||
public enum ClawdbotBonjour {
|
public enum ClawdbotBonjour {
|
||||||
// v0: internal-only, subject to rename.
|
// v0: internal-only, subject to rename.
|
||||||
public static let gatewayServiceType = "_clawdbot-gw._tcp"
|
public static let gatewayServiceType = "_clawdbot-gateway._tcp"
|
||||||
public static let gatewayServiceDomain = "local."
|
public static let gatewayServiceDomain = "local."
|
||||||
public static let wideAreaGatewayServiceDomain = "clawdbot.internal."
|
public static let wideAreaGatewayServiceDomain = "clawdbot.internal."
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ extension URLSessionWebSocketTask: WebSocketTasking {}
|
|||||||
|
|
||||||
public struct WebSocketTaskBox: @unchecked Sendable {
|
public struct WebSocketTaskBox: @unchecked Sendable {
|
||||||
public let task: any WebSocketTasking
|
public let task: any WebSocketTasking
|
||||||
public init(task: any WebSocketTasking) {
|
|
||||||
self.task = task
|
|
||||||
}
|
|
||||||
|
|
||||||
public var state: URLSessionTask.State { self.task.state }
|
public var state: URLSessionTask.State { self.task.state }
|
||||||
|
|
||||||
|
|||||||
@@ -29,10 +29,5 @@ public struct GatewayDecodingError: LocalizedError, Sendable {
|
|||||||
public let method: String
|
public let method: String
|
||||||
public let message: String
|
public let message: String
|
||||||
|
|
||||||
public init(method: String, message: String) {
|
|
||||||
self.method = method
|
|
||||||
self.message = message
|
|
||||||
}
|
|
||||||
|
|
||||||
public var errorDescription: String? { "\(self.method): \(self.message)" }
|
public var errorDescription: String? { "\(self.method): \(self.message)" }
|
||||||
}
|
}
|
||||||
@@ -11,35 +11,6 @@ private struct NodeInvokeRequestPayload: Codable, Sendable {
|
|||||||
var idempotencyKey: String?
|
var idempotencyKey: String?
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensures the timeout can win even if the invoke task never completes.
|
|
||||||
private actor InvokeTimeoutRace {
|
|
||||||
private var finished = false
|
|
||||||
private let continuation: CheckedContinuation<BridgeInvokeResponse, Never>
|
|
||||||
private var invokeTask: Task<Void, Never>?
|
|
||||||
private var timeoutTask: Task<Void, Never>?
|
|
||||||
|
|
||||||
init(continuation: CheckedContinuation<BridgeInvokeResponse, Never>) {
|
|
||||||
self.continuation = continuation
|
|
||||||
}
|
|
||||||
|
|
||||||
func registerTasks(invoke: Task<Void, Never>, timeout: Task<Void, Never>) {
|
|
||||||
self.invokeTask = invoke
|
|
||||||
self.timeoutTask = timeout
|
|
||||||
if finished {
|
|
||||||
invoke.cancel()
|
|
||||||
timeout.cancel()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func finish(_ response: BridgeInvokeResponse) {
|
|
||||||
guard !finished else { return }
|
|
||||||
finished = true
|
|
||||||
continuation.resume(returning: response)
|
|
||||||
invokeTask?.cancel()
|
|
||||||
timeoutTask?.cancel()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public actor GatewayNodeSession {
|
public actor GatewayNodeSession {
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "node.gateway")
|
private let logger = Logger(subsystem: "com.clawdbot", category: "node.gateway")
|
||||||
private let decoder = JSONDecoder()
|
private let decoder = JSONDecoder()
|
||||||
@@ -52,45 +23,6 @@ public actor GatewayNodeSession {
|
|||||||
private var onConnected: (@Sendable () async -> Void)?
|
private var onConnected: (@Sendable () async -> Void)?
|
||||||
private var onDisconnected: (@Sendable (String) async -> Void)?
|
private var onDisconnected: (@Sendable (String) async -> Void)?
|
||||||
private var onInvoke: (@Sendable (BridgeInvokeRequest) async -> BridgeInvokeResponse)?
|
private var onInvoke: (@Sendable (BridgeInvokeRequest) async -> BridgeInvokeResponse)?
|
||||||
|
|
||||||
static func invokeWithTimeout(
|
|
||||||
request: BridgeInvokeRequest,
|
|
||||||
timeoutMs: Int?,
|
|
||||||
onInvoke: @escaping @Sendable (BridgeInvokeRequest) async -> BridgeInvokeResponse
|
|
||||||
) async -> BridgeInvokeResponse {
|
|
||||||
let timeout = max(0, timeoutMs ?? 0)
|
|
||||||
guard timeout > 0 else {
|
|
||||||
return await onInvoke(request)
|
|
||||||
}
|
|
||||||
|
|
||||||
let cappedTimeout = min(timeout, Int(UInt64.max / 1_000_000))
|
|
||||||
let timeoutResponse = BridgeInvokeResponse(
|
|
||||||
id: request.id,
|
|
||||||
ok: false,
|
|
||||||
error: ClawdbotNodeError(
|
|
||||||
code: .unavailable,
|
|
||||||
message: "node invoke timed out")
|
|
||||||
)
|
|
||||||
|
|
||||||
return await withCheckedContinuation { continuation in
|
|
||||||
let race = InvokeTimeoutRace(continuation: continuation)
|
|
||||||
let invokeTask = Task {
|
|
||||||
let response = await onInvoke(request)
|
|
||||||
await race.finish(response)
|
|
||||||
}
|
|
||||||
let timeoutTask = Task {
|
|
||||||
do {
|
|
||||||
try await Task.sleep(nanoseconds: UInt64(cappedTimeout) * 1_000_000)
|
|
||||||
} catch {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
await race.finish(timeoutResponse)
|
|
||||||
}
|
|
||||||
Task {
|
|
||||||
await race.registerTasks(invoke: invokeTask, timeout: timeoutTask)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private var serverEventSubscribers: [UUID: AsyncStream<EventFrame>.Continuation] = [:]
|
private var serverEventSubscribers: [UUID: AsyncStream<EventFrame>.Continuation] = [:]
|
||||||
private var canvasHostUrl: String?
|
private var canvasHostUrl: String?
|
||||||
|
|
||||||
@@ -235,11 +167,7 @@ public actor GatewayNodeSession {
|
|||||||
let request = try self.decoder.decode(NodeInvokeRequestPayload.self, from: data)
|
let request = try self.decoder.decode(NodeInvokeRequestPayload.self, from: data)
|
||||||
guard let onInvoke else { return }
|
guard let onInvoke else { return }
|
||||||
let req = BridgeInvokeRequest(id: request.id, command: request.command, paramsJSON: request.paramsJSON)
|
let req = BridgeInvokeRequest(id: request.id, command: request.command, paramsJSON: request.paramsJSON)
|
||||||
let response = await Self.invokeWithTimeout(
|
let response = await onInvoke(req)
|
||||||
request: req,
|
|
||||||
timeoutMs: request.timeoutMs,
|
|
||||||
onInvoke: onInvoke
|
|
||||||
)
|
|
||||||
await self.sendInvokeResult(request: request, response: response)
|
await self.sendInvokeResult(request: request, response: response)
|
||||||
} catch {
|
} catch {
|
||||||
self.logger.error("node invoke decode failed: \(error.localizedDescription, privacy: .public)")
|
self.logger.error("node invoke decode failed: \(error.localizedDescription, privacy: .public)")
|
||||||
@@ -252,10 +180,8 @@ public actor GatewayNodeSession {
|
|||||||
"id": AnyCodable(request.id),
|
"id": AnyCodable(request.id),
|
||||||
"nodeId": AnyCodable(request.nodeId),
|
"nodeId": AnyCodable(request.nodeId),
|
||||||
"ok": AnyCodable(response.ok),
|
"ok": AnyCodable(response.ok),
|
||||||
|
"payloadJSON": AnyCodable(response.payloadJSON ?? NSNull()),
|
||||||
]
|
]
|
||||||
if let payloadJSON = response.payloadJSON {
|
|
||||||
params["payloadJSON"] = AnyCodable(payloadJSON)
|
|
||||||
}
|
|
||||||
if let error = response.error {
|
if let error = response.error {
|
||||||
params["error"] = AnyCodable([
|
params["error"] = AnyCodable([
|
||||||
"code": AnyCodable(error.code.rawValue),
|
"code": AnyCodable(error.code.rawValue),
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public enum GatewayTLSStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class GatewayTLSPinningSession: NSObject, WebSocketSessioning, URLSessionDelegate, @unchecked Sendable {
|
public final class GatewayTLSPinningSession: NSObject, WebSocketSessioning, URLSessionDelegate {
|
||||||
private let params: GatewayTLSParams
|
private let params: GatewayTLSParams
|
||||||
private lazy var session: URLSession = {
|
private lazy var session: URLSession = {
|
||||||
let config = URLSessionConfiguration.default
|
let config = URLSessionConfiguration.default
|
||||||
@@ -96,12 +96,10 @@ public final class GatewayTLSPinningSession: NSObject, WebSocketSessioning, URLS
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func certificateFingerprint(_ trust: SecTrust) -> String? {
|
private func certificateFingerprint(_ trust: SecTrust) -> String? {
|
||||||
guard let chain = SecTrustCopyCertificateChain(trust) as? [SecCertificate],
|
let count = SecTrustGetCertificateCount(trust)
|
||||||
let cert = chain.first
|
guard count > 0, let cert = SecTrustGetCertificateAtIndex(trust, 0) else { return nil }
|
||||||
else {
|
let data = SecCertificateCopyData(cert) as Data
|
||||||
return nil
|
return sha256Hex(data)
|
||||||
}
|
|
||||||
return sha256Hex(SecCertificateCopyData(cert) as Data)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func sha256Hex(_ data: Data) -> String {
|
private func sha256Hex(_ data: Data) -> String {
|
||||||
|
|||||||
@@ -473,7 +473,6 @@ public struct AgentParams: Codable, Sendable {
|
|||||||
public let replychannel: String?
|
public let replychannel: String?
|
||||||
public let accountid: String?
|
public let accountid: String?
|
||||||
public let replyaccountid: String?
|
public let replyaccountid: String?
|
||||||
public let threadid: String?
|
|
||||||
public let timeout: Int?
|
public let timeout: Int?
|
||||||
public let lane: String?
|
public let lane: String?
|
||||||
public let extrasystemprompt: String?
|
public let extrasystemprompt: String?
|
||||||
@@ -495,7 +494,6 @@ public struct AgentParams: Codable, Sendable {
|
|||||||
replychannel: String?,
|
replychannel: String?,
|
||||||
accountid: String?,
|
accountid: String?,
|
||||||
replyaccountid: String?,
|
replyaccountid: String?,
|
||||||
threadid: String?,
|
|
||||||
timeout: Int?,
|
timeout: Int?,
|
||||||
lane: String?,
|
lane: String?,
|
||||||
extrasystemprompt: String?,
|
extrasystemprompt: String?,
|
||||||
@@ -516,7 +514,6 @@ public struct AgentParams: Codable, Sendable {
|
|||||||
self.replychannel = replychannel
|
self.replychannel = replychannel
|
||||||
self.accountid = accountid
|
self.accountid = accountid
|
||||||
self.replyaccountid = replyaccountid
|
self.replyaccountid = replyaccountid
|
||||||
self.threadid = threadid
|
|
||||||
self.timeout = timeout
|
self.timeout = timeout
|
||||||
self.lane = lane
|
self.lane = lane
|
||||||
self.extrasystemprompt = extrasystemprompt
|
self.extrasystemprompt = extrasystemprompt
|
||||||
@@ -538,7 +535,6 @@ public struct AgentParams: Codable, Sendable {
|
|||||||
case replychannel = "replyChannel"
|
case replychannel = "replyChannel"
|
||||||
case accountid = "accountId"
|
case accountid = "accountId"
|
||||||
case replyaccountid = "replyAccountId"
|
case replyaccountid = "replyAccountId"
|
||||||
case threadid = "threadId"
|
|
||||||
case timeout
|
case timeout
|
||||||
case lane
|
case lane
|
||||||
case extrasystemprompt = "extraSystemPrompt"
|
case extrasystemprompt = "extraSystemPrompt"
|
||||||
@@ -839,47 +835,35 @@ public struct SessionsListParams: Codable, Sendable {
|
|||||||
public let activeminutes: Int?
|
public let activeminutes: Int?
|
||||||
public let includeglobal: Bool?
|
public let includeglobal: Bool?
|
||||||
public let includeunknown: Bool?
|
public let includeunknown: Bool?
|
||||||
public let includederivedtitles: Bool?
|
|
||||||
public let includelastmessage: Bool?
|
|
||||||
public let label: String?
|
public let label: String?
|
||||||
public let spawnedby: String?
|
public let spawnedby: String?
|
||||||
public let agentid: String?
|
public let agentid: String?
|
||||||
public let search: String?
|
|
||||||
|
|
||||||
public init(
|
public init(
|
||||||
limit: Int?,
|
limit: Int?,
|
||||||
activeminutes: Int?,
|
activeminutes: Int?,
|
||||||
includeglobal: Bool?,
|
includeglobal: Bool?,
|
||||||
includeunknown: Bool?,
|
includeunknown: Bool?,
|
||||||
includederivedtitles: Bool?,
|
|
||||||
includelastmessage: Bool?,
|
|
||||||
label: String?,
|
label: String?,
|
||||||
spawnedby: String?,
|
spawnedby: String?,
|
||||||
agentid: String?,
|
agentid: String?
|
||||||
search: String?
|
|
||||||
) {
|
) {
|
||||||
self.limit = limit
|
self.limit = limit
|
||||||
self.activeminutes = activeminutes
|
self.activeminutes = activeminutes
|
||||||
self.includeglobal = includeglobal
|
self.includeglobal = includeglobal
|
||||||
self.includeunknown = includeunknown
|
self.includeunknown = includeunknown
|
||||||
self.includederivedtitles = includederivedtitles
|
|
||||||
self.includelastmessage = includelastmessage
|
|
||||||
self.label = label
|
self.label = label
|
||||||
self.spawnedby = spawnedby
|
self.spawnedby = spawnedby
|
||||||
self.agentid = agentid
|
self.agentid = agentid
|
||||||
self.search = search
|
|
||||||
}
|
}
|
||||||
private enum CodingKeys: String, CodingKey {
|
private enum CodingKeys: String, CodingKey {
|
||||||
case limit
|
case limit
|
||||||
case activeminutes = "activeMinutes"
|
case activeminutes = "activeMinutes"
|
||||||
case includeglobal = "includeGlobal"
|
case includeglobal = "includeGlobal"
|
||||||
case includeunknown = "includeUnknown"
|
case includeunknown = "includeUnknown"
|
||||||
case includederivedtitles = "includeDerivedTitles"
|
|
||||||
case includelastmessage = "includeLastMessage"
|
|
||||||
case label
|
case label
|
||||||
case spawnedby = "spawnedBy"
|
case spawnedby = "spawnedBy"
|
||||||
case agentid = "agentId"
|
case agentid = "agentId"
|
||||||
case search
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1340,9 +1324,6 @@ public struct ChannelsStatusResult: Codable, Sendable {
|
|||||||
public let ts: Int
|
public let ts: Int
|
||||||
public let channelorder: [String]
|
public let channelorder: [String]
|
||||||
public let channellabels: [String: AnyCodable]
|
public let channellabels: [String: AnyCodable]
|
||||||
public let channeldetaillabels: [String: AnyCodable]?
|
|
||||||
public let channelsystemimages: [String: AnyCodable]?
|
|
||||||
public let channelmeta: [[String: AnyCodable]]?
|
|
||||||
public let channels: [String: AnyCodable]
|
public let channels: [String: AnyCodable]
|
||||||
public let channelaccounts: [String: AnyCodable]
|
public let channelaccounts: [String: AnyCodable]
|
||||||
public let channeldefaultaccountid: [String: AnyCodable]
|
public let channeldefaultaccountid: [String: AnyCodable]
|
||||||
@@ -1351,9 +1332,6 @@ public struct ChannelsStatusResult: Codable, Sendable {
|
|||||||
ts: Int,
|
ts: Int,
|
||||||
channelorder: [String],
|
channelorder: [String],
|
||||||
channellabels: [String: AnyCodable],
|
channellabels: [String: AnyCodable],
|
||||||
channeldetaillabels: [String: AnyCodable]?,
|
|
||||||
channelsystemimages: [String: AnyCodable]?,
|
|
||||||
channelmeta: [[String: AnyCodable]]?,
|
|
||||||
channels: [String: AnyCodable],
|
channels: [String: AnyCodable],
|
||||||
channelaccounts: [String: AnyCodable],
|
channelaccounts: [String: AnyCodable],
|
||||||
channeldefaultaccountid: [String: AnyCodable]
|
channeldefaultaccountid: [String: AnyCodable]
|
||||||
@@ -1361,9 +1339,6 @@ public struct ChannelsStatusResult: Codable, Sendable {
|
|||||||
self.ts = ts
|
self.ts = ts
|
||||||
self.channelorder = channelorder
|
self.channelorder = channelorder
|
||||||
self.channellabels = channellabels
|
self.channellabels = channellabels
|
||||||
self.channeldetaillabels = channeldetaillabels
|
|
||||||
self.channelsystemimages = channelsystemimages
|
|
||||||
self.channelmeta = channelmeta
|
|
||||||
self.channels = channels
|
self.channels = channels
|
||||||
self.channelaccounts = channelaccounts
|
self.channelaccounts = channelaccounts
|
||||||
self.channeldefaultaccountid = channeldefaultaccountid
|
self.channeldefaultaccountid = channeldefaultaccountid
|
||||||
@@ -1372,9 +1347,6 @@ public struct ChannelsStatusResult: Codable, Sendable {
|
|||||||
case ts
|
case ts
|
||||||
case channelorder = "channelOrder"
|
case channelorder = "channelOrder"
|
||||||
case channellabels = "channelLabels"
|
case channellabels = "channelLabels"
|
||||||
case channeldetaillabels = "channelDetailLabels"
|
|
||||||
case channelsystemimages = "channelSystemImages"
|
|
||||||
case channelmeta = "channelMeta"
|
|
||||||
case channels
|
case channels
|
||||||
case channelaccounts = "channelAccounts"
|
case channelaccounts = "channelAccounts"
|
||||||
case channeldefaultaccountid = "channelDefaultAccountId"
|
case channeldefaultaccountid = "channelDefaultAccountId"
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
import Foundation
|
|
||||||
import Testing
|
|
||||||
@testable import ClawdbotKit
|
|
||||||
import ClawdbotProtocol
|
|
||||||
|
|
||||||
struct GatewayNodeSessionTests {
|
|
||||||
@Test
|
|
||||||
func invokeWithTimeoutReturnsUnderlyingResponseBeforeTimeout() async {
|
|
||||||
let request = BridgeInvokeRequest(id: "1", command: "x", paramsJSON: nil)
|
|
||||||
let response = await GatewayNodeSession.invokeWithTimeout(
|
|
||||||
request: request,
|
|
||||||
timeoutMs: 50,
|
|
||||||
onInvoke: { req in
|
|
||||||
#expect(req.id == "1")
|
|
||||||
return BridgeInvokeResponse(id: req.id, ok: true, payloadJSON: "{}", error: nil)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
#expect(response.ok == true)
|
|
||||||
#expect(response.error == nil)
|
|
||||||
#expect(response.payloadJSON == "{}")
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
func invokeWithTimeoutReturnsTimeoutError() async {
|
|
||||||
let request = BridgeInvokeRequest(id: "abc", command: "x", paramsJSON: nil)
|
|
||||||
let response = await GatewayNodeSession.invokeWithTimeout(
|
|
||||||
request: request,
|
|
||||||
timeoutMs: 10,
|
|
||||||
onInvoke: { _ in
|
|
||||||
try? await Task.sleep(nanoseconds: 200_000_000) // 200ms
|
|
||||||
return BridgeInvokeResponse(id: "abc", ok: true, payloadJSON: "{}", error: nil)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
#expect(response.ok == false)
|
|
||||||
#expect(response.error?.code == .unavailable)
|
|
||||||
#expect(response.error?.message.contains("timed out") == true)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
func invokeWithTimeoutReturnsWhenHandlerNeverCompletes() async {
|
|
||||||
let request = BridgeInvokeRequest(id: "stall", command: "x", paramsJSON: nil)
|
|
||||||
let response = try? await AsyncTimeout.withTimeoutMs(
|
|
||||||
timeoutMs: 200,
|
|
||||||
onTimeout: { NSError(domain: "GatewayNodeSessionTests", code: 1) },
|
|
||||||
operation: {
|
|
||||||
await GatewayNodeSession.invokeWithTimeout(
|
|
||||||
request: request,
|
|
||||||
timeoutMs: 10,
|
|
||||||
onInvoke: { _ in
|
|
||||||
await withCheckedContinuation { _ in }
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
#expect(response != nil)
|
|
||||||
#expect(response?.ok == false)
|
|
||||||
#expect(response?.error?.code == .unavailable)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
|
||||||
func invokeWithTimeoutZeroDisablesTimeout() async {
|
|
||||||
let request = BridgeInvokeRequest(id: "1", command: "x", paramsJSON: nil)
|
|
||||||
let response = await GatewayNodeSession.invokeWithTimeout(
|
|
||||||
request: request,
|
|
||||||
timeoutMs: 0,
|
|
||||||
onInvoke: { req in
|
|
||||||
try? await Task.sleep(nanoseconds: 5_000_000)
|
|
||||||
return BridgeInvokeResponse(id: req.id, ok: true, payloadJSON: nil, error: nil)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
#expect(response.ok == true)
|
|
||||||
#expect(response.error == nil)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -127,11 +127,6 @@ Isolated jobs can deliver output to a channel. The job payload can specify:
|
|||||||
If `channel` or `to` is omitted, cron can fall back to the main session’s “last route”
|
If `channel` or `to` is omitted, cron can fall back to the main session’s “last route”
|
||||||
(the last place the agent replied).
|
(the last place the agent replied).
|
||||||
|
|
||||||
Delivery notes:
|
|
||||||
- If `to` is set, cron auto-delivers the agent’s final output even if `deliver` is omitted.
|
|
||||||
- Use `deliver: true` when you want last-route delivery without an explicit `to`.
|
|
||||||
- Use `deliver: false` to keep output internal even if a `to` is present.
|
|
||||||
|
|
||||||
Target format reminders:
|
Target format reminders:
|
||||||
- Slack/Discord targets should use explicit prefixes (e.g. `channel:<id>`, `user:<id>`) to avoid ambiguity.
|
- Slack/Discord targets should use explicit prefixes (e.g. `channel:<id>`, `user:<id>`) to avoid ambiguity.
|
||||||
- Telegram topics should use the `:topic:` form (see below).
|
- Telegram topics should use the `:topic:` form (see below).
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ Text is supported everywhere; media and reactions vary by channel.
|
|||||||
- [Microsoft Teams](/channels/msteams) — Bot Framework; enterprise support (plugin, installed separately).
|
- [Microsoft Teams](/channels/msteams) — Bot Framework; enterprise support (plugin, installed separately).
|
||||||
- [Nextcloud Talk](/channels/nextcloud-talk) — Self-hosted chat via Nextcloud Talk (plugin, installed separately).
|
- [Nextcloud Talk](/channels/nextcloud-talk) — Self-hosted chat via Nextcloud Talk (plugin, installed separately).
|
||||||
- [Matrix](/channels/matrix) — Matrix protocol (plugin, installed separately).
|
- [Matrix](/channels/matrix) — Matrix protocol (plugin, installed separately).
|
||||||
- [Nostr](/channels/nostr) — Decentralized DMs via NIP-04 (plugin, installed separately).
|
|
||||||
- [Zalo](/channels/zalo) — Zalo Bot API; Vietnam's popular messenger (plugin, installed separately).
|
- [Zalo](/channels/zalo) — Zalo Bot API; Vietnam's popular messenger (plugin, installed separately).
|
||||||
- [Zalo Personal](/channels/zalouser) — Zalo personal account via QR login (plugin, installed separately).
|
- [Zalo Personal](/channels/zalouser) — Zalo personal account via QR login (plugin, installed separately).
|
||||||
- [WebChat](/web/webchat) — Gateway WebChat UI over WebSocket.
|
- [WebChat](/web/webchat) — Gateway WebChat UI over WebSocket.
|
||||||
|
|||||||
@@ -1,235 +0,0 @@
|
|||||||
---
|
|
||||||
summary: "Nostr DM channel via NIP-04 encrypted messages"
|
|
||||||
read_when:
|
|
||||||
- You want Clawdbot to receive DMs via Nostr
|
|
||||||
- You're setting up decentralized messaging
|
|
||||||
---
|
|
||||||
# Nostr
|
|
||||||
|
|
||||||
**Status:** Optional plugin (disabled by default).
|
|
||||||
|
|
||||||
Nostr is a decentralized protocol for social networking. This channel enables Clawdbot to receive and respond to encrypted direct messages (DMs) via NIP-04.
|
|
||||||
|
|
||||||
## Install (on demand)
|
|
||||||
|
|
||||||
### Onboarding (recommended)
|
|
||||||
|
|
||||||
- The onboarding wizard (`clawdbot onboard`) and `clawdbot channels add` list optional channel plugins.
|
|
||||||
- Selecting Nostr prompts you to install the plugin on demand.
|
|
||||||
|
|
||||||
Install defaults:
|
|
||||||
|
|
||||||
- **Dev channel + git checkout available:** uses the local plugin path.
|
|
||||||
- **Stable/Beta:** downloads from npm.
|
|
||||||
|
|
||||||
You can always override the choice in the prompt.
|
|
||||||
|
|
||||||
### Manual install
|
|
||||||
|
|
||||||
```bash
|
|
||||||
clawdbot plugins install @clawdbot/nostr
|
|
||||||
```
|
|
||||||
|
|
||||||
Use a local checkout (dev workflows):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
clawdbot plugins install --link <path-to-clawdbot>/extensions/nostr
|
|
||||||
```
|
|
||||||
|
|
||||||
Restart the Gateway after installing or enabling plugins.
|
|
||||||
|
|
||||||
## Quick setup
|
|
||||||
|
|
||||||
1) Generate a Nostr keypair (if needed):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Using nak
|
|
||||||
nak key generate
|
|
||||||
```
|
|
||||||
|
|
||||||
2) Add to config:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"channels": {
|
|
||||||
"nostr": {
|
|
||||||
"privateKey": "${NOSTR_PRIVATE_KEY}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
3) Export the key:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
export NOSTR_PRIVATE_KEY="nsec1..."
|
|
||||||
```
|
|
||||||
|
|
||||||
4) Restart the Gateway.
|
|
||||||
|
|
||||||
## Configuration reference
|
|
||||||
|
|
||||||
| Key | Type | Default | Description |
|
|
||||||
| --- | --- | --- | --- |
|
|
||||||
| `privateKey` | string | required | Private key in `nsec` or hex format |
|
|
||||||
| `relays` | string[] | `['wss://relay.damus.io', 'wss://nos.lol']` | Relay URLs (WebSocket) |
|
|
||||||
| `dmPolicy` | string | `pairing` | DM access policy |
|
|
||||||
| `allowFrom` | string[] | `[]` | Allowed sender pubkeys |
|
|
||||||
| `enabled` | boolean | `true` | Enable/disable channel |
|
|
||||||
| `name` | string | - | Display name |
|
|
||||||
| `profile` | object | - | NIP-01 profile metadata |
|
|
||||||
|
|
||||||
## Profile metadata
|
|
||||||
|
|
||||||
Profile data is published as a NIP-01 `kind:0` event. You can manage it from the Control UI (Channels -> Nostr -> Profile) or set it directly in config.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"channels": {
|
|
||||||
"nostr": {
|
|
||||||
"privateKey": "${NOSTR_PRIVATE_KEY}",
|
|
||||||
"profile": {
|
|
||||||
"name": "clawdbot",
|
|
||||||
"displayName": "Clawdbot",
|
|
||||||
"about": "Personal assistant DM bot",
|
|
||||||
"picture": "https://example.com/avatar.png",
|
|
||||||
"banner": "https://example.com/banner.png",
|
|
||||||
"website": "https://example.com",
|
|
||||||
"nip05": "clawdbot@example.com",
|
|
||||||
"lud16": "clawdbot@example.com"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Notes:
|
|
||||||
|
|
||||||
- Profile URLs must use `https://`.
|
|
||||||
- Importing from relays merges fields and preserves local overrides.
|
|
||||||
|
|
||||||
## Access control
|
|
||||||
|
|
||||||
### DM policies
|
|
||||||
|
|
||||||
- **pairing** (default): unknown senders get a pairing code.
|
|
||||||
- **allowlist**: only pubkeys in `allowFrom` can DM.
|
|
||||||
- **open**: public inbound DMs (requires `allowFrom: ["*"]`).
|
|
||||||
- **disabled**: ignore inbound DMs.
|
|
||||||
|
|
||||||
### Allowlist example
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"channels": {
|
|
||||||
"nostr": {
|
|
||||||
"privateKey": "${NOSTR_PRIVATE_KEY}",
|
|
||||||
"dmPolicy": "allowlist",
|
|
||||||
"allowFrom": ["npub1abc...", "npub1xyz..."]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Key formats
|
|
||||||
|
|
||||||
Accepted formats:
|
|
||||||
|
|
||||||
- **Private key:** `nsec...` or 64-char hex
|
|
||||||
- **Pubkeys (`allowFrom`):** `npub...` or hex
|
|
||||||
|
|
||||||
## Relays
|
|
||||||
|
|
||||||
Defaults: `relay.damus.io` and `nos.lol`.
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"channels": {
|
|
||||||
"nostr": {
|
|
||||||
"privateKey": "${NOSTR_PRIVATE_KEY}",
|
|
||||||
"relays": [
|
|
||||||
"wss://relay.damus.io",
|
|
||||||
"wss://relay.primal.net",
|
|
||||||
"wss://nostr.wine"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Tips:
|
|
||||||
|
|
||||||
- Use 2-3 relays for redundancy.
|
|
||||||
- Avoid too many relays (latency, duplication).
|
|
||||||
- Paid relays can improve reliability.
|
|
||||||
- Local relays are fine for testing (`ws://localhost:7777`).
|
|
||||||
|
|
||||||
## Protocol support
|
|
||||||
|
|
||||||
| NIP | Status | Description |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| NIP-01 | Supported | Basic event format + profile metadata |
|
|
||||||
| NIP-04 | Supported | Encrypted DMs (`kind:4`) |
|
|
||||||
| NIP-17 | Planned | Gift-wrapped DMs |
|
|
||||||
| NIP-44 | Planned | Versioned encryption |
|
|
||||||
|
|
||||||
## Testing
|
|
||||||
|
|
||||||
### Local relay
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Start strfry
|
|
||||||
docker run -p 7777:7777 ghcr.io/hoytech/strfry
|
|
||||||
```
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"channels": {
|
|
||||||
"nostr": {
|
|
||||||
"privateKey": "${NOSTR_PRIVATE_KEY}",
|
|
||||||
"relays": ["ws://localhost:7777"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Manual test
|
|
||||||
|
|
||||||
1) Note the bot pubkey (npub) from logs.
|
|
||||||
2) Open a Nostr client (Damus, Amethyst, etc.).
|
|
||||||
3) DM the bot pubkey.
|
|
||||||
4) Verify the response.
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
### Not receiving messages
|
|
||||||
|
|
||||||
- Verify the private key is valid.
|
|
||||||
- Ensure relay URLs are reachable and use `wss://` (or `ws://` for local).
|
|
||||||
- Confirm `enabled` is not `false`.
|
|
||||||
- Check Gateway logs for relay connection errors.
|
|
||||||
|
|
||||||
### Not sending responses
|
|
||||||
|
|
||||||
- Check relay accepts writes.
|
|
||||||
- Verify outbound connectivity.
|
|
||||||
- Watch for relay rate limits.
|
|
||||||
|
|
||||||
### Duplicate responses
|
|
||||||
|
|
||||||
- Expected when using multiple relays.
|
|
||||||
- Messages are deduplicated by event ID; only the first delivery triggers a response.
|
|
||||||
|
|
||||||
## Security
|
|
||||||
|
|
||||||
- Never commit private keys.
|
|
||||||
- Use environment variables for keys.
|
|
||||||
- Consider `allowlist` for production bots.
|
|
||||||
|
|
||||||
## Limitations (MVP)
|
|
||||||
|
|
||||||
- Direct messages only (no group chats).
|
|
||||||
- No media attachments.
|
|
||||||
- NIP-04 only (NIP-17 gift-wrap planned).
|
|
||||||
@@ -286,11 +286,6 @@ WhatsApp can automatically send emoji reactions to incoming messages immediately
|
|||||||
- CLI: `clawdbot message send --media <mp4> --gif-playback`
|
- CLI: `clawdbot message send --media <mp4> --gif-playback`
|
||||||
- Gateway: `send` params include `gifPlayback: true`
|
- Gateway: `send` params include `gifPlayback: true`
|
||||||
|
|
||||||
## Voice notes (PTT audio)
|
|
||||||
WhatsApp sends audio as **voice notes** (PTT bubble).
|
|
||||||
- Best results: OGG/Opus. Clawdbot rewrites `audio/ogg` to `audio/ogg; codecs=opus`.
|
|
||||||
- `[[audio_as_voice]]` is ignored for WhatsApp (audio already ships as voice note).
|
|
||||||
|
|
||||||
## Media limits + optimization
|
## Media limits + optimization
|
||||||
- Default outbound cap: 5 MB (per media item).
|
- Default outbound cap: 5 MB (per media item).
|
||||||
- Override: `agents.defaults.mediaMaxMb`.
|
- Override: `agents.defaults.mediaMaxMb`.
|
||||||
|
|||||||
@@ -14,16 +14,3 @@ Related:
|
|||||||
|
|
||||||
Tip: run `clawdbot cron --help` for the full command surface.
|
Tip: run `clawdbot cron --help` for the full command surface.
|
||||||
|
|
||||||
## Common edits
|
|
||||||
|
|
||||||
Update delivery settings without changing the message:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
clawdbot cron edit <job-id> --deliver --channel telegram --to "123456789"
|
|
||||||
```
|
|
||||||
|
|
||||||
Disable delivery for an isolated job:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
clawdbot cron edit <job-id> --no-deliver
|
|
||||||
```
|
|
||||||
+1
-1
@@ -116,7 +116,7 @@ clawdbot gateway call logs.tail --params '{"sinceMs": 60000}'
|
|||||||
|
|
||||||
## Discover gateways (Bonjour)
|
## Discover gateways (Bonjour)
|
||||||
|
|
||||||
`gateway discover` scans for Gateway beacons (`_clawdbot-gw._tcp`).
|
`gateway discover` scans for Gateway beacons (`_clawdbot-gateway._tcp`).
|
||||||
|
|
||||||
- Multicast DNS-SD: `local.`
|
- Multicast DNS-SD: `local.`
|
||||||
- Unicast DNS-SD (Wide-Area Bonjour): `clawdbot.internal.` (requires split DNS + DNS server; see [/gateway/bonjour](/gateway/bonjour))
|
- Unicast DNS-SD (Wide-Area Bonjour): `clawdbot.internal.` (requires split DNS + DNS server; see [/gateway/bonjour](/gateway/bonjour))
|
||||||
|
|||||||
+2
-2
@@ -825,9 +825,9 @@ Common options:
|
|||||||
- `--url`, `--token`, `--timeout`, `--json`
|
- `--url`, `--token`, `--timeout`, `--json`
|
||||||
|
|
||||||
Subcommands:
|
Subcommands:
|
||||||
- `nodes status [--connected] [--last-connected <duration>]`
|
- `nodes status`
|
||||||
- `nodes describe --node <id|name|ip>`
|
- `nodes describe --node <id|name|ip>`
|
||||||
- `nodes list [--connected] [--last-connected <duration>]`
|
- `nodes list`
|
||||||
- `nodes pending`
|
- `nodes pending`
|
||||||
- `nodes approve <requestId>`
|
- `nodes approve <requestId>`
|
||||||
- `nodes reject <requestId>`
|
- `nodes reject <requestId>`
|
||||||
|
|||||||
+1
-8
@@ -18,22 +18,15 @@ Related:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
clawdbot nodes list
|
clawdbot nodes list
|
||||||
clawdbot nodes list --connected
|
|
||||||
clawdbot nodes list --last-connected 24h
|
|
||||||
clawdbot nodes pending
|
clawdbot nodes pending
|
||||||
clawdbot nodes approve <requestId>
|
clawdbot nodes approve <requestId>
|
||||||
clawdbot nodes status
|
clawdbot nodes status
|
||||||
clawdbot nodes status --connected
|
|
||||||
clawdbot nodes status --last-connected 24h
|
|
||||||
```
|
```
|
||||||
|
|
||||||
`nodes list` prints pending/paired tables. Paired rows include the most recent connect age (Last Connect).
|
|
||||||
Use `--connected` to only show currently-connected nodes. Use `--last-connected <duration>` to
|
|
||||||
filter to nodes that connected within a duration (e.g. `24h`, `7d`).
|
|
||||||
|
|
||||||
## Invoke / run
|
## Invoke / run
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
clawdbot nodes invoke --node <id|name|ip> --command <command> --params <json>
|
clawdbot nodes invoke --node <id|name|ip> --command <command> --params <json>
|
||||||
clawdbot nodes run --node <id|name|ip> <command...>
|
clawdbot nodes run --node <id|name|ip> <command...>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -114,9 +114,6 @@ clawdbot sandbox recreate --agent alfred
|
|||||||
|
|
||||||
**Solution:** Use `clawdbot sandbox recreate` to force removal of old containers. They'll be recreated automatically with current settings when next needed.
|
**Solution:** Use `clawdbot sandbox recreate` to force removal of old containers. They'll be recreated automatically with current settings when next needed.
|
||||||
|
|
||||||
Tip: prefer `clawdbot sandbox recreate` over manual `docker rm`. It uses the
|
|
||||||
Gateway’s container naming and avoids mismatches when scope/session keys change.
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Sandbox settings live in `~/.clawdbot/clawdbot.json` under `agents.defaults.sandbox` (per-agent overrides go in `agents.list[].sandbox`):
|
Sandbox settings live in `~/.clawdbot/clawdbot.json` under `agents.defaults.sandbox` (per-agent overrides go in `agents.list[].sandbox`):
|
||||||
|
|||||||
@@ -21,4 +21,3 @@ clawdbot security audit --fix
|
|||||||
```
|
```
|
||||||
|
|
||||||
The audit warns when multiple DM senders share the main session and recommends `session.dmScope="per-channel-peer"` for shared inboxes.
|
The audit warns when multiple DM senders share the main session and recommends `session.dmScope="per-channel-peer"` for shared inboxes.
|
||||||
It also warns when small models (`<=300B`) are used without sandboxing and with web/browser tools enabled.
|
|
||||||
@@ -64,7 +64,6 @@ High-level:
|
|||||||
4. Installs deps (pnpm preferred; npm fallback).
|
4. Installs deps (pnpm preferred; npm fallback).
|
||||||
5. Builds + builds the Control UI.
|
5. Builds + builds the Control UI.
|
||||||
6. Runs `clawdbot doctor` as the final “safe update” check.
|
6. Runs `clawdbot doctor` as the final “safe update” check.
|
||||||
7. Syncs plugins to the active channel (dev uses bundled extensions; stable/beta uses npm) and updates npm-installed plugins.
|
|
||||||
|
|
||||||
## `--update` shorthand
|
## `--update` shorthand
|
||||||
|
|
||||||
|
|||||||
@@ -77,21 +77,6 @@ Client Gateway
|
|||||||
safely retry; the server keeps a short‑lived dedupe cache.
|
safely retry; the server keeps a short‑lived dedupe cache.
|
||||||
- Nodes must include `role: "node"` plus caps/commands/permissions in `connect`.
|
- Nodes must include `role: "node"` plus caps/commands/permissions in `connect`.
|
||||||
|
|
||||||
## Pairing + local trust
|
|
||||||
|
|
||||||
- All WS clients (operators + nodes) include a **device identity** on `connect`.
|
|
||||||
- New device IDs require pairing approval; the Gateway issues a **device token**
|
|
||||||
for subsequent connects.
|
|
||||||
- **Local** connects (loopback or the gateway host’s own tailnet address) can be
|
|
||||||
auto‑approved to keep same‑host UX smooth.
|
|
||||||
- **Non‑local** connects must sign the `connect.challenge` nonce and require
|
|
||||||
explicit approval.
|
|
||||||
- Gateway auth (`gateway.auth.*`) still applies to **all** connections, local or
|
|
||||||
remote.
|
|
||||||
|
|
||||||
Details: [Gateway protocol](/gateway/protocol), [Pairing](/start/pairing),
|
|
||||||
[Security](/gateway/security).
|
|
||||||
|
|
||||||
## Protocol typing and codegen
|
## Protocol typing and codegen
|
||||||
|
|
||||||
- TypeBox schemas define the protocol.
|
- TypeBox schemas define the protocol.
|
||||||
|
|||||||
@@ -256,52 +256,6 @@ Keep WhatsApp on the fast agent, but route one DM to Opus:
|
|||||||
|
|
||||||
Peer bindings always win, so keep them above the channel-wide rule.
|
Peer bindings always win, so keep them above the channel-wide rule.
|
||||||
|
|
||||||
## Family agent bound to a WhatsApp group
|
|
||||||
|
|
||||||
Bind a dedicated family agent to a single WhatsApp group, with mention gating
|
|
||||||
and a tighter tool policy:
|
|
||||||
|
|
||||||
```json5
|
|
||||||
{
|
|
||||||
agents: {
|
|
||||||
list: [
|
|
||||||
{
|
|
||||||
id: "family",
|
|
||||||
name: "Family",
|
|
||||||
workspace: "~/clawd-family",
|
|
||||||
identity: { name: "Family Bot" },
|
|
||||||
groupChat: {
|
|
||||||
mentionPatterns: ["@family", "@familybot", "@Family Bot"]
|
|
||||||
},
|
|
||||||
sandbox: {
|
|
||||||
mode: "all",
|
|
||||||
scope: "agent"
|
|
||||||
},
|
|
||||||
tools: {
|
|
||||||
allow: ["exec", "read", "sessions_list", "sessions_history", "sessions_send", "sessions_spawn", "session_status"],
|
|
||||||
deny: ["write", "edit", "apply_patch", "browser", "canvas", "nodes", "cron"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
bindings: [
|
|
||||||
{
|
|
||||||
agentId: "family",
|
|
||||||
match: {
|
|
||||||
channel: "whatsapp",
|
|
||||||
peer: { kind: "group", id: "120363999999999999@g.us" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Notes:
|
|
||||||
- Tool allow/deny lists are **tools**, not skills. If a skill needs to run a
|
|
||||||
binary, ensure `exec` is allowed and the binary exists in the sandbox.
|
|
||||||
- For stricter gating, set `agents.list[].groupChat.mentionPatterns` and keep
|
|
||||||
group allowlists enabled for the channel.
|
|
||||||
|
|
||||||
## Per-Agent Sandbox and Tool Configuration
|
## Per-Agent Sandbox and Tool Configuration
|
||||||
|
|
||||||
Starting with v2026.1.6, each agent can have its own sandbox and tool restrictions:
|
Starting with v2026.1.6, each agent can have its own sandbox and tool restrictions:
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ boundary. You can keep the same discovery UX by switching to **unicast DNS‑SD*
|
|||||||
High‑level steps:
|
High‑level steps:
|
||||||
|
|
||||||
1) Run a DNS server on the gateway host (reachable over Tailnet).
|
1) Run a DNS server on the gateway host (reachable over Tailnet).
|
||||||
2) Publish DNS‑SD records for `_clawdbot-gw._tcp` under a dedicated zone
|
2) Publish DNS‑SD records for `_clawdbot-bridge._tcp` under a dedicated zone
|
||||||
(example: `clawdbot.internal.`).
|
(example: `clawdbot.internal.`).
|
||||||
3) Configure Tailscale **split DNS** so `clawdbot.internal` resolves via that
|
3) Configure Tailscale **split DNS** so `clawdbot.internal` resolves via that
|
||||||
DNS server for clients (including iOS).
|
DNS server for clients (including iOS).
|
||||||
@@ -49,8 +49,8 @@ This installs CoreDNS and configures it to:
|
|||||||
Validate from a tailnet‑connected machine:
|
Validate from a tailnet‑connected machine:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dns-sd -B _clawdbot-gw._tcp clawdbot.internal.
|
dns-sd -B _clawdbot-bridge._tcp clawdbot.internal.
|
||||||
dig @<TAILNET_IPV4> -p 53 _clawdbot-gw._tcp.clawdbot.internal PTR +short
|
dig @<TAILNET_IPV4> -p 53 _clawdbot-bridge._tcp.clawdbot.internal PTR +short
|
||||||
```
|
```
|
||||||
|
|
||||||
### Tailscale DNS settings
|
### Tailscale DNS settings
|
||||||
@@ -61,7 +61,7 @@ In the Tailscale admin console:
|
|||||||
- Add split DNS so the domain `clawdbot.internal` uses that nameserver.
|
- Add split DNS so the domain `clawdbot.internal` uses that nameserver.
|
||||||
|
|
||||||
Once clients accept tailnet DNS, iOS nodes can browse
|
Once clients accept tailnet DNS, iOS nodes can browse
|
||||||
`_clawdbot-gw._tcp` in `clawdbot.internal.` without multicast.
|
`_clawdbot-bridge._tcp` in `clawdbot.internal.` without multicast.
|
||||||
|
|
||||||
### Bridge listener security (recommended)
|
### Bridge listener security (recommended)
|
||||||
|
|
||||||
@@ -74,11 +74,11 @@ For tailnet‑only setups:
|
|||||||
|
|
||||||
## What advertises
|
## What advertises
|
||||||
|
|
||||||
Only the Gateway advertises `_clawdbot-gw._tcp`.
|
Only the Gateway (when the **bridge is enabled**) advertises `_clawdbot-bridge._tcp`.
|
||||||
|
|
||||||
## Service types
|
## Service types
|
||||||
|
|
||||||
- `_clawdbot-gw._tcp` — gateway transport beacon (used by macOS/iOS/Android nodes).
|
- `_clawdbot-bridge._tcp` — bridge transport beacon (used by macOS/iOS/Android nodes).
|
||||||
|
|
||||||
## TXT keys (non‑secret hints)
|
## TXT keys (non‑secret hints)
|
||||||
|
|
||||||
@@ -101,11 +101,11 @@ Useful built‑in tools:
|
|||||||
|
|
||||||
- Browse instances:
|
- Browse instances:
|
||||||
```bash
|
```bash
|
||||||
dns-sd -B _clawdbot-gw._tcp local.
|
dns-sd -B _clawdbot-bridge._tcp local.
|
||||||
```
|
```
|
||||||
- Resolve one instance (replace `<instance>`):
|
- Resolve one instance (replace `<instance>`):
|
||||||
```bash
|
```bash
|
||||||
dns-sd -L "<instance>" _clawdbot-gw._tcp local.
|
dns-sd -L "<instance>" _clawdbot-bridge._tcp local.
|
||||||
```
|
```
|
||||||
|
|
||||||
If browsing works but resolving fails, you’re usually hitting a LAN policy or
|
If browsing works but resolving fails, you’re usually hitting a LAN policy or
|
||||||
@@ -122,7 +122,7 @@ The Gateway writes a rolling log file (printed on startup as
|
|||||||
|
|
||||||
## Debugging on iOS node
|
## Debugging on iOS node
|
||||||
|
|
||||||
The iOS node uses `NWBrowser` to discover `_clawdbot-gw._tcp`.
|
The iOS node uses `NWBrowser` to discover `_clawdbot-bridge._tcp`.
|
||||||
|
|
||||||
To capture logs:
|
To capture logs:
|
||||||
- Settings → Bridge → Advanced → **Discovery Debug Logs**
|
- Settings → Bridge → Advanced → **Discovery Debug Logs**
|
||||||
|
|||||||
@@ -1414,7 +1414,7 @@ Each `agents.defaults.models` entry can include:
|
|||||||
- `alias` (optional model shortcut, e.g. `/opus`).
|
- `alias` (optional model shortcut, e.g. `/opus`).
|
||||||
- `params` (optional provider-specific API params passed through to the model request).
|
- `params` (optional provider-specific API params passed through to the model request).
|
||||||
|
|
||||||
`params` is also applied to streaming runs (embedded agent + compaction). Supported keys today: `temperature`, `maxTokens`, `cacheControlTtl` (`"5m"` or `"1h"`, Anthropic API + OpenRouter Anthropic models only; ignored for Anthropic OAuth/Claude Code tokens). These merge with call-time options; caller-supplied values win. `temperature` is an advanced knob—leave unset unless you know the model’s defaults and need a change. Anthropic API defaults to `"1h"` unless you override (`cacheControlTtl: "5m"`). Clawdbot includes the `extended-cache-ttl-2025-04-11` beta flag for Anthropic API; keep it if you override provider headers.
|
`params` is also applied to streaming runs (embedded agent + compaction). Supported keys today: `temperature`, `maxTokens`. These merge with call-time options; caller-supplied values win. `temperature` is an advanced knob—leave unset unless you know the model’s defaults and need a change.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@@ -1774,7 +1774,6 @@ Note: `applyPatch` is only under `tools.exec`.
|
|||||||
- `tools.web.fetch.maxChars` (default 50000)
|
- `tools.web.fetch.maxChars` (default 50000)
|
||||||
- `tools.web.fetch.timeoutSeconds` (default 30)
|
- `tools.web.fetch.timeoutSeconds` (default 30)
|
||||||
- `tools.web.fetch.cacheTtlMinutes` (default 15)
|
- `tools.web.fetch.cacheTtlMinutes` (default 15)
|
||||||
- `tools.web.fetch.maxRedirects` (default 3)
|
|
||||||
- `tools.web.fetch.userAgent` (optional override)
|
- `tools.web.fetch.userAgent` (optional override)
|
||||||
- `tools.web.fetch.readability` (default true; disable to use basic HTML cleanup only)
|
- `tools.web.fetch.readability` (default true; disable to use basic HTML cleanup only)
|
||||||
- `tools.web.fetch.firecrawl.enabled` (default true when an API key is set)
|
- `tools.web.fetch.firecrawl.enabled` (default true when an API key is set)
|
||||||
@@ -2615,13 +2614,10 @@ Defaults:
|
|||||||
// noSandbox: false,
|
// noSandbox: false,
|
||||||
// executablePath: "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser",
|
// executablePath: "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser",
|
||||||
// attachOnly: false, // set true when tunneling a remote CDP to localhost
|
// attachOnly: false, // set true when tunneling a remote CDP to localhost
|
||||||
// snapshotDefaults: { mode: "efficient" }, // tool/CLI default snapshot preset
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: `browser.snapshotDefaults` only affects Clawdbot's browser tool + CLI. Direct HTTP clients must pass `mode` explicitly.
|
|
||||||
|
|
||||||
### `ui` (Appearance)
|
### `ui` (Appearance)
|
||||||
|
|
||||||
Optional accent color used by the native apps for UI chrome (e.g. Talk Mode bubble tint).
|
Optional accent color used by the native apps for UI chrome (e.g. Talk Mode bubble tint).
|
||||||
@@ -2992,7 +2988,7 @@ Auto-generated certs require `openssl` on PATH; if generation fails, the bridge
|
|||||||
|
|
||||||
### `discovery.wideArea` (Wide-Area Bonjour / unicast DNS‑SD)
|
### `discovery.wideArea` (Wide-Area Bonjour / unicast DNS‑SD)
|
||||||
|
|
||||||
When enabled, the Gateway writes a unicast DNS-SD zone for `_clawdbot-gw._tcp` under `~/.clawdbot/dns/` using the standard discovery domain `clawdbot.internal.`
|
When enabled, the Gateway writes a unicast DNS-SD zone for `_clawdbot-bridge._tcp` under `~/.clawdbot/dns/` using the standard discovery domain `clawdbot.internal.`
|
||||||
|
|
||||||
To make iOS/Android discover across networks (Vienna ⇄ London), pair this with:
|
To make iOS/Android discover across networks (Vienna ⇄ London), pair this with:
|
||||||
- a DNS server on the gateway host serving `clawdbot.internal.` (CoreDNS is recommended)
|
- a DNS server on the gateway host serving `clawdbot.internal.` (CoreDNS is recommended)
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ Troubleshooting and beacon details: [Bonjour](/gateway/bonjour).
|
|||||||
#### Service beacon details
|
#### Service beacon details
|
||||||
|
|
||||||
- Service types:
|
- Service types:
|
||||||
- `_clawdbot-gw._tcp` (gateway transport beacon)
|
- `_clawdbot-bridge._tcp` (bridge transport beacon)
|
||||||
- TXT keys (non-secret):
|
- TXT keys (non-secret):
|
||||||
- `role=gateway`
|
- `role=gateway`
|
||||||
- `lanHost=<hostname>.local`
|
- `lanHost=<hostname>.local`
|
||||||
|
|||||||
@@ -195,8 +195,6 @@ The Gateway treats these as **claims** and enforces server-side allowlists.
|
|||||||
- Gateways issue tokens per device + role.
|
- Gateways issue tokens per device + role.
|
||||||
- Pairing approvals are required for new device IDs unless local auto-approval
|
- Pairing approvals are required for new device IDs unless local auto-approval
|
||||||
is enabled.
|
is enabled.
|
||||||
- **Local** connects include loopback and the gateway host’s own tailnet address
|
|
||||||
(so same‑host tailnet binds can still auto‑approve).
|
|
||||||
- All WS clients must include `device` identity during `connect` (operator + node).
|
- All WS clients must include `device` identity during `connect` (operator + node).
|
||||||
- Non-local connections must sign the server-provided `connect.challenge` nonce.
|
- Non-local connections must sign the server-provided `connect.challenge` nonce.
|
||||||
|
|
||||||
|
|||||||
@@ -105,11 +105,6 @@ Build it once:
|
|||||||
scripts/sandbox-setup.sh
|
scripts/sandbox-setup.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: the default image does **not** include Node. If a skill needs Node (or
|
|
||||||
other runtimes), either bake a custom image or install via
|
|
||||||
`sandbox.docker.setupCommand` (requires network egress + writable root +
|
|
||||||
root user).
|
|
||||||
|
|
||||||
Sandboxed browser image:
|
Sandboxed browser image:
|
||||||
```bash
|
```bash
|
||||||
scripts/sandbox-browser-setup.sh
|
scripts/sandbox-browser-setup.sh
|
||||||
@@ -134,8 +129,6 @@ Common pitfalls:
|
|||||||
- Default `docker.network` is `"none"` (no egress), so package installs will fail.
|
- Default `docker.network` is `"none"` (no egress), so package installs will fail.
|
||||||
- `readOnlyRoot: true` prevents writes; set `readOnlyRoot: false` or bake a custom image.
|
- `readOnlyRoot: true` prevents writes; set `readOnlyRoot: false` or bake a custom image.
|
||||||
- `user` must be root for package installs (omit `user` or set `user: "0:0"`).
|
- `user` must be root for package installs (omit `user` or set `user: "0:0"`).
|
||||||
- Sandbox exec does **not** inherit host `process.env`. Use
|
|
||||||
`agents.defaults.sandbox.docker.env` (or a custom image) for skill API keys.
|
|
||||||
|
|
||||||
## Tool policy + escape hatches
|
## Tool policy + escape hatches
|
||||||
Tool allow/deny policies still apply before sandbox rules. If a tool is denied
|
Tool allow/deny policies still apply before sandbox rules. If a tool is denied
|
||||||
|
|||||||
@@ -177,7 +177,6 @@ Recommendations:
|
|||||||
- **Use the latest generation, best-tier model** for any bot that can run tools or touch files/networks.
|
- **Use the latest generation, best-tier model** for any bot that can run tools or touch files/networks.
|
||||||
- **Avoid weaker tiers** (for example, Sonnet or Haiku) for tool-enabled agents or untrusted inboxes.
|
- **Avoid weaker tiers** (for example, Sonnet or Haiku) for tool-enabled agents or untrusted inboxes.
|
||||||
- If you must use a smaller model, **reduce blast radius** (read-only tools, strong sandboxing, minimal filesystem access, strict allowlists).
|
- If you must use a smaller model, **reduce blast radius** (read-only tools, strong sandboxing, minimal filesystem access, strict allowlists).
|
||||||
- When running small models, **enable sandboxing for all sessions** and **disable web_search/web_fetch/browser** unless inputs are tightly controlled.
|
|
||||||
|
|
||||||
## Reasoning & verbose output in groups
|
## Reasoning & verbose output in groups
|
||||||
|
|
||||||
@@ -270,12 +269,6 @@ Note: `gateway.remote.token` is **only** for remote CLI calls; it does not
|
|||||||
protect local WS access.
|
protect local WS access.
|
||||||
Optional: pin remote TLS with `gateway.remote.tlsFingerprint` when using `wss://`.
|
Optional: pin remote TLS with `gateway.remote.tlsFingerprint` when using `wss://`.
|
||||||
|
|
||||||
Local device pairing:
|
|
||||||
- Device pairing is auto‑approved for **local** connects (loopback or the
|
|
||||||
gateway host’s own tailnet address) to keep same‑host clients smooth.
|
|
||||||
- Other tailnet peers are **not** treated as local; they still need pairing
|
|
||||||
approval.
|
|
||||||
|
|
||||||
Auth modes:
|
Auth modes:
|
||||||
- `gateway.auth.mode: "token"`: shared bearer token (recommended for most setups).
|
- `gateway.auth.mode: "token"`: shared bearer token (recommended for most setups).
|
||||||
- `gateway.auth.mode: "password"`: password auth (prefer setting via env: `CLAWDBOT_GATEWAY_PASSWORD`).
|
- `gateway.auth.mode: "password"`: password auth (prefer setting via env: `CLAWDBOT_GATEWAY_PASSWORD`).
|
||||||
|
|||||||
@@ -87,17 +87,6 @@ WhatsApp + Telegram channels require **Node**; Bun is unsupported. If your
|
|||||||
service was installed with Bun or a version-managed Node path, run `clawdbot doctor`
|
service was installed with Bun or a version-managed Node path, run `clawdbot doctor`
|
||||||
to migrate to a system Node install.
|
to migrate to a system Node install.
|
||||||
|
|
||||||
### Skill missing API key in sandbox
|
|
||||||
|
|
||||||
**Symptom:** Skill works on host but fails in sandbox with missing API key.
|
|
||||||
|
|
||||||
**Why:** sandboxed exec runs inside Docker and does **not** inherit host `process.env`.
|
|
||||||
|
|
||||||
**Fix:**
|
|
||||||
- set `agents.defaults.sandbox.docker.env` (or per-agent `agents.list[].sandbox.docker.env`)
|
|
||||||
- or bake the key into your custom sandbox image
|
|
||||||
- then run `clawdbot sandbox recreate --agent <id>` (or `--all`)
|
|
||||||
|
|
||||||
### Service Running but Port Not Listening
|
### Service Running but Port Not Listening
|
||||||
|
|
||||||
If the service reports **running** but nothing is listening on the gateway port,
|
If the service reports **running** but nothing is listening on the gateway port,
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ read_when:
|
|||||||
|
|
||||||
# Development channels
|
# Development channels
|
||||||
|
|
||||||
Last updated: 2026-01-20
|
|
||||||
|
|
||||||
Clawdbot ships three update channels:
|
Clawdbot ships three update channels:
|
||||||
|
|
||||||
- **stable**: tagged releases (`vYYYY.M.D` or `vYYYY.M.D-<patch>`). npm dist-tag: `latest`.
|
- **stable**: tagged releases (`vYYYY.M.D` or `vYYYY.M.D-<patch>`). npm dist-tag: `latest`.
|
||||||
@@ -40,13 +38,6 @@ This updates via the corresponding npm dist-tag (`latest`, `beta`, `dev`).
|
|||||||
|
|
||||||
Tip: if you want stable + dev in parallel, keep two clones and point your gateway at the stable one.
|
Tip: if you want stable + dev in parallel, keep two clones and point your gateway at the stable one.
|
||||||
|
|
||||||
## Plugins and channels
|
|
||||||
|
|
||||||
When you switch channels with `clawdbot update`, Clawdbot also syncs plugin sources:
|
|
||||||
|
|
||||||
- `dev` prefers bundled plugins from the git checkout.
|
|
||||||
- `stable` and `beta` restore npm-installed plugin packages.
|
|
||||||
|
|
||||||
## Tagging best practices
|
## Tagging best practices
|
||||||
|
|
||||||
- Stable: tag each release (`vYYYY.M.D` or `vYYYY.M.D-<patch>`).
|
- Stable: tag each release (`vYYYY.M.D` or `vYYYY.M.D-<patch>`).
|
||||||
|
|||||||
-173
@@ -136,179 +136,6 @@ Tool summaries can redact sensitive tokens before they hit the console:
|
|||||||
|
|
||||||
Redaction affects **console output only** and does not alter file logs.
|
Redaction affects **console output only** and does not alter file logs.
|
||||||
|
|
||||||
## Diagnostics + OpenTelemetry
|
|
||||||
|
|
||||||
Diagnostics are structured, machine-readable events for model runs **and**
|
|
||||||
message-flow telemetry (webhooks, queueing, session state). They do **not**
|
|
||||||
replace logs; they exist to feed metrics, traces, and other exporters.
|
|
||||||
|
|
||||||
Diagnostics events are emitted in-process, but exporters only attach when
|
|
||||||
diagnostics + the exporter plugin are enabled.
|
|
||||||
|
|
||||||
### OpenTelemetry vs OTLP
|
|
||||||
|
|
||||||
- **OpenTelemetry (OTel)**: the data model + SDKs for traces, metrics, and logs.
|
|
||||||
- **OTLP**: the wire protocol used to export OTel data to a collector/backend.
|
|
||||||
- Clawdbot exports via **OTLP/HTTP (protobuf)** today.
|
|
||||||
|
|
||||||
### Signals exported
|
|
||||||
|
|
||||||
- **Metrics**: counters + histograms (token usage, message flow, queueing).
|
|
||||||
- **Traces**: spans for model usage + webhook/message processing.
|
|
||||||
- **Logs**: exported over OTLP when `diagnostics.otel.logs` is enabled. Log
|
|
||||||
volume can be high; keep `logging.level` and exporter filters in mind.
|
|
||||||
|
|
||||||
### Diagnostic event catalog
|
|
||||||
|
|
||||||
Model usage:
|
|
||||||
- `model.usage`: tokens, cost, duration, context, provider/model/channel, session ids.
|
|
||||||
|
|
||||||
Message flow:
|
|
||||||
- `webhook.received`: webhook ingress per channel.
|
|
||||||
- `webhook.processed`: webhook handled + duration.
|
|
||||||
- `webhook.error`: webhook handler errors.
|
|
||||||
- `message.queued`: message enqueued for processing.
|
|
||||||
- `message.processed`: outcome + duration + optional error.
|
|
||||||
|
|
||||||
Queue + session:
|
|
||||||
- `queue.lane.enqueue`: command queue lane enqueue + depth.
|
|
||||||
- `queue.lane.dequeue`: command queue lane dequeue + wait time.
|
|
||||||
- `session.state`: session state transition + reason.
|
|
||||||
- `session.stuck`: session stuck warning + age.
|
|
||||||
- `run.attempt`: run retry/attempt metadata.
|
|
||||||
- `diagnostic.heartbeat`: aggregate counters (webhooks/queue/session).
|
|
||||||
|
|
||||||
### Enable diagnostics (no exporter)
|
|
||||||
|
|
||||||
Use this if you want diagnostics events available to plugins or custom sinks:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"diagnostics": {
|
|
||||||
"enabled": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Export to OpenTelemetry
|
|
||||||
|
|
||||||
Diagnostics can be exported via the `diagnostics-otel` plugin (OTLP/HTTP). This
|
|
||||||
works with any OpenTelemetry collector/backend that accepts OTLP/HTTP.
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"plugins": {
|
|
||||||
"allow": ["diagnostics-otel"],
|
|
||||||
"entries": {
|
|
||||||
"diagnostics-otel": {
|
|
||||||
"enabled": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"diagnostics": {
|
|
||||||
"enabled": true,
|
|
||||||
"otel": {
|
|
||||||
"enabled": true,
|
|
||||||
"endpoint": "http://otel-collector:4318",
|
|
||||||
"protocol": "http/protobuf",
|
|
||||||
"serviceName": "clawdbot-gateway",
|
|
||||||
"traces": true,
|
|
||||||
"metrics": true,
|
|
||||||
"logs": true,
|
|
||||||
"sampleRate": 0.2,
|
|
||||||
"flushIntervalMs": 60000
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Notes:
|
|
||||||
- You can also enable the plugin with `clawdbot plugins enable diagnostics-otel`.
|
|
||||||
- `protocol` currently supports `http/protobuf` only. `grpc` is ignored.
|
|
||||||
- Metrics include token usage, cost, context size, run duration, and message-flow
|
|
||||||
counters/histograms (webhooks, queueing, session state, queue depth/wait).
|
|
||||||
- Traces/metrics can be toggled with `traces` / `metrics` (default: on). Traces
|
|
||||||
include model usage spans plus webhook/message processing spans when enabled.
|
|
||||||
- Set `headers` when your collector requires auth.
|
|
||||||
- Environment variables supported: `OTEL_EXPORTER_OTLP_ENDPOINT`,
|
|
||||||
`OTEL_SERVICE_NAME`, `OTEL_EXPORTER_OTLP_PROTOCOL`.
|
|
||||||
|
|
||||||
### Exported metrics (names + types)
|
|
||||||
|
|
||||||
Model usage:
|
|
||||||
- `clawdbot.tokens` (counter, attrs: `clawdbot.token`, `clawdbot.channel`,
|
|
||||||
`clawdbot.provider`, `clawdbot.model`)
|
|
||||||
- `clawdbot.cost.usd` (counter, attrs: `clawdbot.channel`, `clawdbot.provider`,
|
|
||||||
`clawdbot.model`)
|
|
||||||
- `clawdbot.run.duration_ms` (histogram, attrs: `clawdbot.channel`,
|
|
||||||
`clawdbot.provider`, `clawdbot.model`)
|
|
||||||
- `clawdbot.context.tokens` (histogram, attrs: `clawdbot.context`,
|
|
||||||
`clawdbot.channel`, `clawdbot.provider`, `clawdbot.model`)
|
|
||||||
|
|
||||||
Message flow:
|
|
||||||
- `clawdbot.webhook.received` (counter, attrs: `clawdbot.channel`,
|
|
||||||
`clawdbot.webhook`)
|
|
||||||
- `clawdbot.webhook.error` (counter, attrs: `clawdbot.channel`,
|
|
||||||
`clawdbot.webhook`)
|
|
||||||
- `clawdbot.webhook.duration_ms` (histogram, attrs: `clawdbot.channel`,
|
|
||||||
`clawdbot.webhook`)
|
|
||||||
- `clawdbot.message.queued` (counter, attrs: `clawdbot.channel`,
|
|
||||||
`clawdbot.source`)
|
|
||||||
- `clawdbot.message.processed` (counter, attrs: `clawdbot.channel`,
|
|
||||||
`clawdbot.outcome`)
|
|
||||||
- `clawdbot.message.duration_ms` (histogram, attrs: `clawdbot.channel`,
|
|
||||||
`clawdbot.outcome`)
|
|
||||||
|
|
||||||
Queues + sessions:
|
|
||||||
- `clawdbot.queue.lane.enqueue` (counter, attrs: `clawdbot.lane`)
|
|
||||||
- `clawdbot.queue.lane.dequeue` (counter, attrs: `clawdbot.lane`)
|
|
||||||
- `clawdbot.queue.depth` (histogram, attrs: `clawdbot.lane` or
|
|
||||||
`clawdbot.channel=heartbeat`)
|
|
||||||
- `clawdbot.queue.wait_ms` (histogram, attrs: `clawdbot.lane`)
|
|
||||||
- `clawdbot.session.state` (counter, attrs: `clawdbot.state`, `clawdbot.reason`)
|
|
||||||
- `clawdbot.session.stuck` (counter, attrs: `clawdbot.state`)
|
|
||||||
- `clawdbot.session.stuck_age_ms` (histogram, attrs: `clawdbot.state`)
|
|
||||||
- `clawdbot.run.attempt` (counter, attrs: `clawdbot.attempt`)
|
|
||||||
|
|
||||||
### Exported spans (names + key attributes)
|
|
||||||
|
|
||||||
- `clawdbot.model.usage`
|
|
||||||
- `clawdbot.channel`, `clawdbot.provider`, `clawdbot.model`
|
|
||||||
- `clawdbot.sessionKey`, `clawdbot.sessionId`
|
|
||||||
- `clawdbot.tokens.*` (input/output/cache_read/cache_write/total)
|
|
||||||
- `clawdbot.webhook.processed`
|
|
||||||
- `clawdbot.channel`, `clawdbot.webhook`, `clawdbot.chatId`
|
|
||||||
- `clawdbot.webhook.error`
|
|
||||||
- `clawdbot.channel`, `clawdbot.webhook`, `clawdbot.chatId`,
|
|
||||||
`clawdbot.error`
|
|
||||||
- `clawdbot.message.processed`
|
|
||||||
- `clawdbot.channel`, `clawdbot.outcome`, `clawdbot.chatId`,
|
|
||||||
`clawdbot.messageId`, `clawdbot.sessionKey`, `clawdbot.sessionId`,
|
|
||||||
`clawdbot.reason`
|
|
||||||
- `clawdbot.session.stuck`
|
|
||||||
- `clawdbot.state`, `clawdbot.ageMs`, `clawdbot.queueDepth`,
|
|
||||||
`clawdbot.sessionKey`, `clawdbot.sessionId`
|
|
||||||
|
|
||||||
### Sampling + flushing
|
|
||||||
|
|
||||||
- Trace sampling: `diagnostics.otel.sampleRate` (0.0–1.0, root spans only).
|
|
||||||
- Metric export interval: `diagnostics.otel.flushIntervalMs` (min 1000ms).
|
|
||||||
|
|
||||||
### Protocol notes
|
|
||||||
|
|
||||||
- OTLP/HTTP endpoints can be set via `diagnostics.otel.endpoint` or
|
|
||||||
`OTEL_EXPORTER_OTLP_ENDPOINT`.
|
|
||||||
- If the endpoint already contains `/v1/traces` or `/v1/metrics`, it is used as-is.
|
|
||||||
- If the endpoint already contains `/v1/logs`, it is used as-is for logs.
|
|
||||||
- `diagnostics.otel.logs` enables OTLP log export for the main logger output.
|
|
||||||
|
|
||||||
### Log export behavior
|
|
||||||
|
|
||||||
- OTLP logs use the same structured records written to `logging.file`.
|
|
||||||
- Respect `logging.level` (file log level). Console redaction does **not** apply
|
|
||||||
to OTLP logs.
|
|
||||||
- High-volume installs should prefer OTLP collector sampling/filtering.
|
|
||||||
|
|
||||||
## Troubleshooting tips
|
## Troubleshooting tips
|
||||||
|
|
||||||
- **Gateway not reachable?** Run `clawdbot doctor` first.
|
- **Gateway not reachable?** Run `clawdbot doctor` first.
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
---
|
|
||||||
summary: "Network hub: gateway surfaces, pairing, discovery, and security"
|
|
||||||
read_when:
|
|
||||||
- You need the network architecture + security overview
|
|
||||||
- You are debugging local vs tailnet access or pairing
|
|
||||||
- You want the canonical list of networking docs
|
|
||||||
---
|
|
||||||
# Network hub
|
|
||||||
|
|
||||||
This hub links the core docs for how Clawdbot connects, pairs, and secures
|
|
||||||
devices across localhost, LAN, and tailnet.
|
|
||||||
|
|
||||||
## Core model
|
|
||||||
|
|
||||||
- [Gateway architecture](/concepts/architecture)
|
|
||||||
- [Gateway protocol](/gateway/protocol)
|
|
||||||
- [Gateway runbook](/gateway)
|
|
||||||
- [Web surfaces + bind modes](/web)
|
|
||||||
|
|
||||||
## Pairing + identity
|
|
||||||
|
|
||||||
- [Pairing overview (DM + nodes)](/start/pairing)
|
|
||||||
- [Gateway-owned node pairing](/gateway/pairing)
|
|
||||||
- [Devices CLI (pairing + token rotation)](/cli/devices)
|
|
||||||
- [Pairing CLI (DM approvals)](/cli/pairing)
|
|
||||||
|
|
||||||
Local trust:
|
|
||||||
- Local connections (loopback or the gateway host’s own tailnet address) can be
|
|
||||||
auto‑approved for pairing to keep same‑host UX smooth.
|
|
||||||
- Non‑local tailnet/LAN clients still require explicit pairing approval.
|
|
||||||
|
|
||||||
## Discovery + transports
|
|
||||||
|
|
||||||
- [Discovery & transports](/gateway/discovery)
|
|
||||||
- [Bonjour / mDNS](/gateway/bonjour)
|
|
||||||
- [Remote access (SSH)](/gateway/remote)
|
|
||||||
- [Tailscale](/gateway/tailscale)
|
|
||||||
|
|
||||||
## Nodes + bridge
|
|
||||||
|
|
||||||
- [Nodes overview](/nodes)
|
|
||||||
- [Bridge protocol (legacy nodes)](/gateway/bridge-protocol)
|
|
||||||
- [Node runbook: iOS](/platforms/ios)
|
|
||||||
- [Node runbook: Android](/platforms/android)
|
|
||||||
|
|
||||||
## Security
|
|
||||||
|
|
||||||
- [Security overview](/gateway/security)
|
|
||||||
- [Gateway config reference](/gateway/configuration)
|
|
||||||
- [Troubleshooting](/gateway/troubleshooting)
|
|
||||||
- [Doctor](/gateway/doctor)
|
|
||||||
@@ -34,81 +34,6 @@ clawdbot nodes rename --node <idOrNameOrIp> --name "Kitchen iPad"
|
|||||||
Notes:
|
Notes:
|
||||||
- `nodes rename` stores a display name override in the gateway pairing store.
|
- `nodes rename` stores a display name override in the gateway pairing store.
|
||||||
|
|
||||||
## Remote node host (system.run)
|
|
||||||
|
|
||||||
Use a **node host** when your Gateway runs on one machine and you want commands
|
|
||||||
to execute on another. The model still talks to the **gateway**; the gateway
|
|
||||||
forwards `exec` calls to the **node host** when `host=node` is selected.
|
|
||||||
|
|
||||||
### What runs where
|
|
||||||
- **Gateway host**: receives messages, runs the model, routes tool calls.
|
|
||||||
- **Node host**: executes `system.run`/`system.which` on the node machine.
|
|
||||||
- **Approvals**: enforced on the node host via `~/.clawdbot/exec-approvals.json`.
|
|
||||||
|
|
||||||
### Start a node host (foreground)
|
|
||||||
|
|
||||||
On the node machine:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
clawdbot node start --host <gateway-host> --port 18789 --display-name "Build Node"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Start a node host (service)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
clawdbot node service install --host <gateway-host> --port 18789 --display-name "Build Node"
|
|
||||||
clawdbot node service start
|
|
||||||
```
|
|
||||||
|
|
||||||
### Pair + name
|
|
||||||
|
|
||||||
On the gateway host:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
clawdbot nodes pending
|
|
||||||
clawdbot nodes approve <requestId>
|
|
||||||
clawdbot nodes list
|
|
||||||
```
|
|
||||||
|
|
||||||
Naming options:
|
|
||||||
- `--display-name` on `clawdbot node start/service install` (persists in `~/.clawdbot/node.json` on the node).
|
|
||||||
- `clawdbot nodes rename --node <id|name|ip> --name "Build Node"` (gateway override).
|
|
||||||
|
|
||||||
### Allowlist the commands
|
|
||||||
|
|
||||||
Exec approvals are **per node host**. Add allowlist entries from the gateway:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
clawdbot approvals allowlist add --node <id|name|ip> "/usr/bin/uname"
|
|
||||||
clawdbot approvals allowlist add --node <id|name|ip> "/usr/bin/sw_vers"
|
|
||||||
```
|
|
||||||
|
|
||||||
Approvals live on the node host at `~/.clawdbot/exec-approvals.json`.
|
|
||||||
|
|
||||||
### Point exec at the node
|
|
||||||
|
|
||||||
Configure defaults (gateway config):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
clawdbot config set tools.exec.host node
|
|
||||||
clawdbot config set tools.exec.security allowlist
|
|
||||||
clawdbot config set tools.exec.node "<id-or-name>"
|
|
||||||
```
|
|
||||||
|
|
||||||
Or per session:
|
|
||||||
|
|
||||||
```
|
|
||||||
/exec host=node security=allowlist node=<id-or-name>
|
|
||||||
```
|
|
||||||
|
|
||||||
Once set, any `exec` call with `host=node` runs on the node host (subject to the
|
|
||||||
node allowlist/approvals).
|
|
||||||
|
|
||||||
Related:
|
|
||||||
- [Node host CLI](/cli/node)
|
|
||||||
- [Exec tool](/tools/exec)
|
|
||||||
- [Exec approvals](/tools/exec-approvals)
|
|
||||||
|
|
||||||
## Invoking commands
|
## Invoking commands
|
||||||
|
|
||||||
Low-level (raw RPC):
|
Low-level (raw RPC):
|
||||||
@@ -289,9 +214,6 @@ Notes:
|
|||||||
- The node host stores its node id + pairing token in `~/.clawdbot/node.json`.
|
- The node host stores its node id + pairing token in `~/.clawdbot/node.json`.
|
||||||
- Exec approvals are enforced locally via `~/.clawdbot/exec-approvals.json`
|
- Exec approvals are enforced locally via `~/.clawdbot/exec-approvals.json`
|
||||||
(see [Exec approvals](/tools/exec-approvals)).
|
(see [Exec approvals](/tools/exec-approvals)).
|
||||||
- On macOS, the headless node host prefers the companion app exec host when reachable and falls
|
|
||||||
back to local execution if the app is unavailable. Set `CLAWDBOT_NODE_EXEC_HOST=app` to require
|
|
||||||
the app, or `CLAWDBOT_NODE_EXEC_FALLBACK=0` to disable fallback.
|
|
||||||
- Add `--tls` / `--tls-fingerprint` when the bridge requires TLS.
|
- Add `--tls` / `--tls-fingerprint` when the bridge requires TLS.
|
||||||
|
|
||||||
## Mac node mode
|
## Mac node mode
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ For tailnet-only setups (recommended for Vienna ⇄ London), bind the gateway to
|
|||||||
From the gateway machine:
|
From the gateway machine:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dns-sd -B _clawdbot-gw._tcp local.
|
dns-sd -B _clawdbot-gateway._tcp local.
|
||||||
```
|
```
|
||||||
|
|
||||||
More debugging notes: [Bonjour](/gateway/bonjour).
|
More debugging notes: [Bonjour](/gateway/bonjour).
|
||||||
@@ -61,7 +61,7 @@ More debugging notes: [Bonjour](/gateway/bonjour).
|
|||||||
|
|
||||||
Android NSD/mDNS discovery won’t cross networks. If your Android node and the gateway are on different networks but connected via Tailscale, use Wide-Area Bonjour / unicast DNS-SD instead:
|
Android NSD/mDNS discovery won’t cross networks. If your Android node and the gateway are on different networks but connected via Tailscale, use Wide-Area Bonjour / unicast DNS-SD instead:
|
||||||
|
|
||||||
1) Set up a DNS-SD zone (example `clawdbot.internal.`) on the gateway host and publish `_clawdbot-gw._tcp` records.
|
1) Set up a DNS-SD zone (example `clawdbot.internal.`) on the gateway host and publish `_clawdbot-gateway._tcp` records.
|
||||||
2) Configure Tailscale split DNS for `clawdbot.internal` pointing at that DNS server.
|
2) Configure Tailscale split DNS for `clawdbot.internal` pointing at that DNS server.
|
||||||
|
|
||||||
Details and example CoreDNS config: [Bonjour](/gateway/bonjour).
|
Details and example CoreDNS config: [Bonjour](/gateway/bonjour).
|
||||||
|
|||||||
@@ -29,17 +29,17 @@ Notes:
|
|||||||
# From repo root; set release IDs so Sparkle feed is enabled.
|
# From repo root; set release IDs so Sparkle feed is enabled.
|
||||||
# APP_BUILD must be numeric + monotonic for Sparkle compare.
|
# APP_BUILD must be numeric + monotonic for Sparkle compare.
|
||||||
BUNDLE_ID=com.clawdbot.mac \
|
BUNDLE_ID=com.clawdbot.mac \
|
||||||
APP_VERSION=2026.1.20 \
|
APP_VERSION=2026.1.13 \
|
||||||
APP_BUILD="$(git rev-list --count HEAD)" \
|
APP_BUILD="$(git rev-list --count HEAD)" \
|
||||||
BUILD_CONFIG=release \
|
BUILD_CONFIG=release \
|
||||||
SIGN_IDENTITY="Developer ID Application: <Developer Name> (<TEAMID>)" \
|
SIGN_IDENTITY="Developer ID Application: <Developer Name> (<TEAMID>)" \
|
||||||
scripts/package-mac-app.sh
|
scripts/package-mac-app.sh
|
||||||
|
|
||||||
# Zip for distribution (includes resource forks for Sparkle delta support)
|
# Zip for distribution (includes resource forks for Sparkle delta support)
|
||||||
ditto -c -k --sequesterRsrc --keepParent dist/Clawdbot.app dist/Clawdbot-2026.1.20.zip
|
ditto -c -k --sequesterRsrc --keepParent dist/Clawdbot.app dist/Clawdbot-2026.1.13.zip
|
||||||
|
|
||||||
# Optional: also build a styled DMG for humans (drag to /Applications)
|
# Optional: also build a styled DMG for humans (drag to /Applications)
|
||||||
scripts/create-dmg.sh dist/Clawdbot.app dist/Clawdbot-2026.1.20.dmg
|
scripts/create-dmg.sh dist/Clawdbot.app dist/Clawdbot-2026.1.13.dmg
|
||||||
|
|
||||||
# Recommended: build + notarize/staple zip + DMG
|
# Recommended: build + notarize/staple zip + DMG
|
||||||
# First, create a keychain profile once:
|
# First, create a keychain profile once:
|
||||||
@@ -47,26 +47,26 @@ scripts/create-dmg.sh dist/Clawdbot.app dist/Clawdbot-2026.1.20.dmg
|
|||||||
# --apple-id "<apple-id>" --team-id "<team-id>" --password "<app-specific-password>"
|
# --apple-id "<apple-id>" --team-id "<team-id>" --password "<app-specific-password>"
|
||||||
NOTARIZE=1 NOTARYTOOL_PROFILE=clawdbot-notary \
|
NOTARIZE=1 NOTARYTOOL_PROFILE=clawdbot-notary \
|
||||||
BUNDLE_ID=com.clawdbot.mac \
|
BUNDLE_ID=com.clawdbot.mac \
|
||||||
APP_VERSION=2026.1.20 \
|
APP_VERSION=2026.1.13 \
|
||||||
APP_BUILD="$(git rev-list --count HEAD)" \
|
APP_BUILD="$(git rev-list --count HEAD)" \
|
||||||
BUILD_CONFIG=release \
|
BUILD_CONFIG=release \
|
||||||
SIGN_IDENTITY="Developer ID Application: <Developer Name> (<TEAMID>)" \
|
SIGN_IDENTITY="Developer ID Application: <Developer Name> (<TEAMID>)" \
|
||||||
scripts/package-mac-dist.sh
|
scripts/package-mac-dist.sh
|
||||||
|
|
||||||
# Optional: ship dSYM alongside the release
|
# Optional: ship dSYM alongside the release
|
||||||
ditto -c -k --keepParent apps/macos/.build/release/Clawdbot.app.dSYM dist/Clawdbot-2026.1.20.dSYM.zip
|
ditto -c -k --keepParent apps/macos/.build/release/Clawdbot.app.dSYM dist/Clawdbot-2026.1.13.dSYM.zip
|
||||||
```
|
```
|
||||||
|
|
||||||
## Appcast entry
|
## Appcast entry
|
||||||
Use the release note generator so Sparkle renders formatted HTML notes:
|
Use the release note generator so Sparkle renders formatted HTML notes:
|
||||||
```bash
|
```bash
|
||||||
SPARKLE_PRIVATE_KEY_FILE=/path/to/ed25519-private-key scripts/make_appcast.sh dist/Clawdbot-2026.1.20.zip https://raw.githubusercontent.com/clawdbot/clawdbot/main/appcast.xml
|
SPARKLE_PRIVATE_KEY_FILE=/path/to/ed25519-private-key scripts/make_appcast.sh dist/Clawdbot-2026.1.13.zip https://raw.githubusercontent.com/clawdbot/clawdbot/main/appcast.xml
|
||||||
```
|
```
|
||||||
Generates HTML release notes from `CHANGELOG.md` (via [`scripts/changelog-to-html.sh`](https://github.com/clawdbot/clawdbot/blob/main/scripts/changelog-to-html.sh)) and embeds them in the appcast entry.
|
Generates HTML release notes from `CHANGELOG.md` (via [`scripts/changelog-to-html.sh`](https://github.com/clawdbot/clawdbot/blob/main/scripts/changelog-to-html.sh)) and embeds them in the appcast entry.
|
||||||
Commit the updated `appcast.xml` alongside the release assets (zip + dSYM) when publishing.
|
Commit the updated `appcast.xml` alongside the release assets (zip + dSYM) when publishing.
|
||||||
|
|
||||||
## Publish & verify
|
## Publish & verify
|
||||||
- Upload `Clawdbot-2026.1.20.zip` (and `Clawdbot-2026.1.20.dSYM.zip`) to the GitHub release for tag `v2026.1.20`.
|
- Upload `Clawdbot-2026.1.13.zip` (and `Clawdbot-2026.1.13.dSYM.zip`) to the GitHub release for tag `v2026.1.13`.
|
||||||
- Ensure the raw appcast URL matches the baked feed: `https://raw.githubusercontent.com/clawdbot/clawdbot/main/appcast.xml`.
|
- Ensure the raw appcast URL matches the baked feed: `https://raw.githubusercontent.com/clawdbot/clawdbot/main/appcast.xml`.
|
||||||
- Sanity checks:
|
- Sanity checks:
|
||||||
- `curl -I https://raw.githubusercontent.com/clawdbot/clawdbot/main/appcast.xml` returns 200.
|
- `curl -I https://raw.githubusercontent.com/clawdbot/clawdbot/main/appcast.xml` returns 200.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ read_when:
|
|||||||
---
|
---
|
||||||
# Clawdbot macOS IPC architecture
|
# Clawdbot macOS IPC architecture
|
||||||
|
|
||||||
**Current model:** a local Unix socket connects the **node service** to the **macOS app** for exec approvals + `system.run`. A `clawdbot-mac` debug CLI exists for discovery/connect checks; agent actions still flow through the Gateway WebSocket and `node.invoke`. UI automation uses PeekabooBridge.
|
**Current model:** a local Unix socket connects the **node service** to the **macOS app** for exec approvals + `system.run`. There is no `clawdbot-mac` CLI; agent actions still flow through the Gateway WebSocket and `node.invoke`. UI automation uses PeekabooBridge.
|
||||||
|
|
||||||
## Goals
|
## Goals
|
||||||
- Single GUI app instance that owns all TCC-facing work (notifications, screen recording, mic, speech, AppleScript).
|
- Single GUI app instance that owns all TCC-facing work (notifications, screen recording, mic, speech, AppleScript).
|
||||||
|
|||||||
+6
-14
@@ -140,27 +140,19 @@ Safety:
|
|||||||
- `swift run Clawdbot` (or Xcode)
|
- `swift run Clawdbot` (or Xcode)
|
||||||
- Package app: `scripts/package-mac-app.sh`
|
- Package app: `scripts/package-mac-app.sh`
|
||||||
|
|
||||||
## Debug gateway connectivity (macOS CLI)
|
## Debug gateway discovery (macOS CLI)
|
||||||
|
|
||||||
Use the debug CLI to exercise the same Gateway WebSocket handshake and discovery
|
Use the debug CLI to exercise the same Bonjour + wide‑area discovery code that the
|
||||||
logic that the macOS app uses, without launching the app.
|
macOS app uses, without launching the app.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd apps/macos
|
cd apps/macos
|
||||||
swift run clawdbot-mac connect --json
|
swift run clawdbot-mac-discovery --timeout 3000 --json
|
||||||
swift run clawdbot-mac discover --timeout 3000 --json
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Connect options:
|
Options:
|
||||||
- `--url <ws://host:port>`: override config
|
|
||||||
- `--mode <local|remote>`: resolve from config (default: config or local)
|
|
||||||
- `--probe`: force a fresh health probe
|
|
||||||
- `--timeout <ms>`: request timeout (default: `15000`)
|
|
||||||
- `--json`: structured output for diffing
|
|
||||||
|
|
||||||
Discovery options:
|
|
||||||
- `--include-local`: include gateways that would be filtered as “local”
|
- `--include-local`: include gateways that would be filtered as “local”
|
||||||
- `--timeout <ms>`: overall discovery window (default: `2000`)
|
- `--timeout <ms>`: overall discovery window (default `2000`)
|
||||||
- `--json`: structured output for diffing
|
- `--json`: structured output for diffing
|
||||||
|
|
||||||
Tip: compare against `clawdbot gateway discover --json` to see whether the
|
Tip: compare against `clawdbot gateway discover --json` to see whether the
|
||||||
|
|||||||
@@ -49,50 +49,6 @@ Repair/migrate:
|
|||||||
clawdbot doctor
|
clawdbot doctor
|
||||||
```
|
```
|
||||||
|
|
||||||
## Advanced: expose WSL services over LAN (portproxy)
|
|
||||||
|
|
||||||
WSL has its own virtual network. If another machine needs to reach a service
|
|
||||||
running **inside WSL** (SSH, a local TTS server, or the Gateway), you must
|
|
||||||
forward a Windows port to the current WSL IP. The WSL IP changes after restarts,
|
|
||||||
so you may need to refresh the forwarding rule.
|
|
||||||
|
|
||||||
Example (PowerShell **as Administrator**):
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
$Distro = "Ubuntu-24.04"
|
|
||||||
$ListenPort = 2222
|
|
||||||
$TargetPort = 22
|
|
||||||
|
|
||||||
$WslIp = (wsl -d $Distro -- hostname -I).Trim().Split(" ")[0]
|
|
||||||
if (-not $WslIp) { throw "WSL IP not found." }
|
|
||||||
|
|
||||||
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=$ListenPort `
|
|
||||||
connectaddress=$WslIp connectport=$TargetPort
|
|
||||||
```
|
|
||||||
|
|
||||||
Allow the port through Windows Firewall (one-time):
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
New-NetFirewallRule -DisplayName "WSL SSH $ListenPort" -Direction Inbound `
|
|
||||||
-Protocol TCP -LocalPort $ListenPort -Action Allow
|
|
||||||
```
|
|
||||||
|
|
||||||
Refresh the portproxy after WSL restarts:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
netsh interface portproxy delete v4tov4 listenport=$ListenPort listenaddress=0.0.0.0 | Out-Null
|
|
||||||
netsh interface portproxy add v4tov4 listenport=$ListenPort listenaddress=0.0.0.0 `
|
|
||||||
connectaddress=$WslIp connectport=$TargetPort | Out-Null
|
|
||||||
```
|
|
||||||
|
|
||||||
Notes:
|
|
||||||
- SSH from another machine targets the **Windows host IP** (example: `ssh user@windows-host -p 2222`).
|
|
||||||
- Remote nodes must point at a **reachable** Gateway URL (not `127.0.0.1`); use
|
|
||||||
`clawdbot status --all` to confirm.
|
|
||||||
- Use `listenaddress=0.0.0.0` for LAN access; `127.0.0.1` keeps it local only.
|
|
||||||
- If you want this automatic, register a Scheduled Task to run the refresh
|
|
||||||
step at login.
|
|
||||||
|
|
||||||
## Step-by-step WSL2 install
|
## Step-by-step WSL2 install
|
||||||
|
|
||||||
### 1) Install WSL2 + Ubuntu
|
### 1) Install WSL2 + Ubuntu
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ See [Voice Call](/plugins/voice-call) for a concrete example plugin.
|
|||||||
- [Voice Call](/plugins/voice-call) — `@clawdbot/voice-call`
|
- [Voice Call](/plugins/voice-call) — `@clawdbot/voice-call`
|
||||||
- [Zalo Personal](/plugins/zalouser) — `@clawdbot/zalouser`
|
- [Zalo Personal](/plugins/zalouser) — `@clawdbot/zalouser`
|
||||||
- [Matrix](/channels/matrix) — `@clawdbot/matrix`
|
- [Matrix](/channels/matrix) — `@clawdbot/matrix`
|
||||||
- [Nostr](/channels/nostr) — `@clawdbot/nostr`
|
|
||||||
- [Zalo](/channels/zalo) — `@clawdbot/zalo`
|
- [Zalo](/channels/zalo) — `@clawdbot/zalo`
|
||||||
- [Microsoft Teams](/channels/msteams) — `@clawdbot/msteams`
|
- [Microsoft Teams](/channels/msteams) — `@clawdbot/msteams`
|
||||||
- Google Antigravity OAuth (provider auth) — bundled as `google-antigravity-auth` (disabled by default)
|
- Google Antigravity OAuth (provider auth) — bundled as `google-antigravity-auth` (disabled by default)
|
||||||
|
|||||||
@@ -34,30 +34,6 @@ clawdbot onboard --anthropic-api-key "$ANTHROPIC_API_KEY"
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Prompt caching (Anthropic API)
|
|
||||||
|
|
||||||
Clawdbot enables **1-hour prompt caching by default** for Anthropic API keys.
|
|
||||||
This is **API-only**; Claude Code CLI OAuth ignores TTL settings.
|
|
||||||
|
|
||||||
To override the TTL per model, set `cacheControlTtl` in the model `params`:
|
|
||||||
|
|
||||||
```json5
|
|
||||||
{
|
|
||||||
agents: {
|
|
||||||
defaults: {
|
|
||||||
models: {
|
|
||||||
"anthropic/claude-opus-4-5": {
|
|
||||||
params: { cacheControlTtl: "5m" } // or "1h"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Clawdbot includes the `extended-cache-ttl-2025-04-11` beta flag for Anthropic API
|
|
||||||
requests; keep it if you override provider headers (see [/gateway/configuration](/gateway/configuration)).
|
|
||||||
|
|
||||||
## Option B: Claude Code CLI (setup-token or OAuth)
|
## Option B: Claude Code CLI (setup-token or OAuth)
|
||||||
|
|
||||||
**Best for:** using your Claude subscription or existing Claude Code CLI login.
|
**Best for:** using your Claude subscription or existing Claude Code CLI login.
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ Use these hubs to discover every page, including deep dives and reference docs t
|
|||||||
## Core concepts
|
## Core concepts
|
||||||
|
|
||||||
- [Architecture](/concepts/architecture)
|
- [Architecture](/concepts/architecture)
|
||||||
- [Network hub](/network)
|
|
||||||
- [Agent runtime](/concepts/agent)
|
- [Agent runtime](/concepts/agent)
|
||||||
- [Agent workspace](/concepts/agent-workspace)
|
- [Agent workspace](/concepts/agent-workspace)
|
||||||
- [Memory](/concepts/memory)
|
- [Memory](/concepts/memory)
|
||||||
|
|||||||
@@ -500,7 +500,6 @@ Notes:
|
|||||||
- `--format ai` (default when Playwright is installed): returns an AI snapshot with numeric refs (`aria-ref="<n>"`).
|
- `--format ai` (default when Playwright is installed): returns an AI snapshot with numeric refs (`aria-ref="<n>"`).
|
||||||
- `--format aria`: returns the accessibility tree (no refs; inspection only).
|
- `--format aria`: returns the accessibility tree (no refs; inspection only).
|
||||||
- `--efficient` (or `--mode efficient`): compact role snapshot preset (interactive + compact + depth + lower maxChars).
|
- `--efficient` (or `--mode efficient`): compact role snapshot preset (interactive + compact + depth + lower maxChars).
|
||||||
- Config default (tool/CLI only): set `browser.snapshotDefaults.mode: "efficient"` to use efficient snapshots when the caller does not pass a mode (see [Gateway configuration](/gateway/configuration#browser-clawd-managed-browser)).
|
|
||||||
- Role snapshot options (`--interactive`, `--compact`, `--depth`, `--selector`) force a role-based snapshot with refs like `ref=e12`.
|
- Role snapshot options (`--interactive`, `--compact`, `--depth`, `--selector`) force a role-based snapshot with refs like `ref=e12`.
|
||||||
- `--frame "<iframe selector>"` scopes role snapshots to an iframe (pairs with role refs like `e12`).
|
- `--frame "<iframe selector>"` scopes role snapshots to an iframe (pairs with role refs like `e12`).
|
||||||
- `--interactive` outputs a flat, easy-to-pick list of interactive elements (best for driving actions).
|
- `--interactive` outputs a flat, easy-to-pick list of interactive elements (best for driving actions).
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ Notes:
|
|||||||
|
|
||||||
- `tools.exec.notifyOnExit` (default: true): when true, backgrounded exec sessions enqueue a system event and request a heartbeat on exit.
|
- `tools.exec.notifyOnExit` (default: true): when true, backgrounded exec sessions enqueue a system event and request a heartbeat on exit.
|
||||||
- `tools.exec.host` (default: `sandbox`)
|
- `tools.exec.host` (default: `sandbox`)
|
||||||
- `tools.exec.security` (default: `deny` for sandbox, `allowlist` for gateway + node when unset)
|
- `tools.exec.security` (default: `deny`)
|
||||||
- `tools.exec.ask` (default: `on-miss`)
|
- `tools.exec.ask` (default: `on-miss`)
|
||||||
- `tools.exec.node` (default: unset)
|
- `tools.exec.node` (default: unset)
|
||||||
- `tools.exec.pathPrepend`: list of directories to prepend to `PATH` for exec runs.
|
- `tools.exec.pathPrepend`: list of directories to prepend to `PATH` for exec runs.
|
||||||
|
|||||||
@@ -62,14 +62,3 @@ Per-skill fields:
|
|||||||
- Keys under `entries` map to the skill name by default. If a skill defines
|
- Keys under `entries` map to the skill name by default. If a skill defines
|
||||||
`metadata.clawdbot.skillKey`, use that key instead.
|
`metadata.clawdbot.skillKey`, use that key instead.
|
||||||
- Changes to skills are picked up on the next agent turn when the watcher is enabled.
|
- Changes to skills are picked up on the next agent turn when the watcher is enabled.
|
||||||
|
|
||||||
### Sandboxed skills + env vars
|
|
||||||
|
|
||||||
When a session is **sandboxed**, skill processes run inside Docker. The sandbox
|
|
||||||
does **not** inherit the host `process.env`.
|
|
||||||
|
|
||||||
Use one of:
|
|
||||||
- `agents.defaults.sandbox.docker.env` (or per-agent `agents.list[].sandbox.docker.env`)
|
|
||||||
- bake the env into your custom sandbox image
|
|
||||||
|
|
||||||
Global `env` and `skills.entries.<skill>.env/apiKey` apply to **host** runs only.
|
|
||||||
@@ -111,7 +111,7 @@ Fields under `metadata.clawdbot`:
|
|||||||
- `requires.env` — list; env var must exist **or** be provided in config.
|
- `requires.env` — list; env var must exist **or** be provided in config.
|
||||||
- `requires.config` — list of `clawdbot.json` paths that must be truthy.
|
- `requires.config` — list of `clawdbot.json` paths that must be truthy.
|
||||||
- `primaryEnv` — env var name associated with `skills.entries.<name>.apiKey`.
|
- `primaryEnv` — env var name associated with `skills.entries.<name>.apiKey`.
|
||||||
- `install` — optional array of installer specs used by the macOS Skills UI (brew/node/go/uv/download).
|
- `install` — optional array of installer specs used by the macOS Skills UI (brew/node/go/uv).
|
||||||
|
|
||||||
Note on sandboxing:
|
Note on sandboxing:
|
||||||
- `requires.bins` is checked on the **host** at skill load time.
|
- `requires.bins` is checked on the **host** at skill load time.
|
||||||
@@ -134,13 +134,10 @@ metadata: {"clawdbot":{"emoji":"♊️","requires":{"bins":["gemini"]},"install"
|
|||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
- If multiple installers are listed, the gateway picks a **single** preferred option (brew when available, otherwise node).
|
- If multiple installers are listed, the gateway picks a **single** preferred option (brew when available, otherwise node).
|
||||||
- If all installers are `download`, Clawdbot lists each entry so you can see the available artifacts.
|
|
||||||
- Installer specs can include `os: ["darwin"|"linux"|"win32"]` to filter options by platform.
|
|
||||||
- Node installs honor `skills.install.nodeManager` in `clawdbot.json` (default: npm; options: npm/pnpm/yarn/bun).
|
- Node installs honor `skills.install.nodeManager` in `clawdbot.json` (default: npm; options: npm/pnpm/yarn/bun).
|
||||||
This only affects **skill installs**; the Gateway runtime should still be Node
|
This only affects **skill installs**; the Gateway runtime should still be Node
|
||||||
(Bun is not recommended for WhatsApp/Telegram).
|
(Bun is not recommended for WhatsApp/Telegram).
|
||||||
- Go installs: if `go` is missing and `brew` is available, the gateway installs Go via Homebrew first and sets `GOBIN` to Homebrew’s `bin` when possible.
|
- Go installs: if `go` is missing and `brew` is available, the gateway installs Go via Homebrew first and sets `GOBIN` to Homebrew’s `bin` when possible.
|
||||||
- Download installs: `url` (required), `archive` (`tar.gz` | `tar.bz2` | `zip`), `extract` (default: auto when archive detected), `stripComponents`, `targetDir` (default: `~/.clawdbot/tools/<skillKey>`).
|
|
||||||
|
|
||||||
If no `metadata.clawdbot` is present, the skill is always eligible (unless
|
If no `metadata.clawdbot` is present, the skill is always eligible (unless
|
||||||
disabled in config or blocked by `skills.allowBundled` for bundled skills).
|
disabled in config or blocked by `skills.allowBundled` for bundled skills).
|
||||||
@@ -158,10 +155,6 @@ Bundled/managed skills can be toggled and supplied with env values:
|
|||||||
apiKey: "GEMINI_KEY_HERE",
|
apiKey: "GEMINI_KEY_HERE",
|
||||||
env: {
|
env: {
|
||||||
GEMINI_API_KEY: "GEMINI_KEY_HERE"
|
GEMINI_API_KEY: "GEMINI_KEY_HERE"
|
||||||
},
|
|
||||||
config: {
|
|
||||||
endpoint: "https://example.invalid",
|
|
||||||
model: "nano-pro"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
peekaboo: { enabled: true },
|
peekaboo: { enabled: true },
|
||||||
@@ -180,7 +173,6 @@ Rules:
|
|||||||
- `enabled: false` disables the skill even if it’s bundled/installed.
|
- `enabled: false` disables the skill even if it’s bundled/installed.
|
||||||
- `env`: injected **only if** the variable isn’t already set in the process.
|
- `env`: injected **only if** the variable isn’t already set in the process.
|
||||||
- `apiKey`: convenience for skills that declare `metadata.clawdbot.primaryEnv`.
|
- `apiKey`: convenience for skills that declare `metadata.clawdbot.primaryEnv`.
|
||||||
- `config`: optional bag for custom per-skill fields; custom keys must live here.
|
|
||||||
- `allowBundled`: optional allowlist for **bundled** skills only. If set, only
|
- `allowBundled`: optional allowlist for **bundled** skills only. If set, only
|
||||||
bundled skills in the list are eligible (managed/workspace skills unaffected).
|
bundled skills in the list are eligible (managed/workspace skills unaffected).
|
||||||
|
|
||||||
|
|||||||
@@ -69,8 +69,7 @@ Note: the merge is additive, so main profiles are always available as fallbacks.
|
|||||||
Sub-agents report back via an announce step:
|
Sub-agents report back via an announce step:
|
||||||
- The announce step runs inside the sub-agent session (not the requester session).
|
- The announce step runs inside the sub-agent session (not the requester session).
|
||||||
- If the sub-agent replies exactly `ANNOUNCE_SKIP`, nothing is posted.
|
- If the sub-agent replies exactly `ANNOUNCE_SKIP`, nothing is posted.
|
||||||
- Otherwise the announce reply is posted to the requester chat channel via a follow-up `agent` call (`deliver=true`).
|
- Otherwise the announce reply is posted to the requester chat channel via the gateway `send` method.
|
||||||
- Announce replies preserve thread/topic routing when available (Slack threads, Telegram topics, Matrix threads).
|
|
||||||
- Announce messages are normalized to a stable template:
|
- Announce messages are normalized to a stable template:
|
||||||
- `Status:` derived from the run outcome (`success`, `error`, `timeout`, or `unknown`).
|
- `Status:` derived from the run outcome (`success`, `error`, `timeout`, or `unknown`).
|
||||||
- `Result:` the summary content from the announce step (or `(not available)` if missing).
|
- `Result:` the summary content from the announce step (or `(not available)` if missing).
|
||||||
|
|||||||
@@ -215,7 +215,6 @@ Fetch a URL and extract readable content.
|
|||||||
maxChars: 50000,
|
maxChars: 50000,
|
||||||
timeoutSeconds: 30,
|
timeoutSeconds: 30,
|
||||||
cacheTtlMinutes: 15,
|
cacheTtlMinutes: 15,
|
||||||
maxRedirects: 3,
|
|
||||||
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_7_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
|
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 14_7_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
|
||||||
readability: true,
|
readability: true,
|
||||||
firecrawl: {
|
firecrawl: {
|
||||||
@@ -242,7 +241,6 @@ Notes:
|
|||||||
- `web_fetch` uses Readability (main-content extraction) first, then Firecrawl (if configured). If both fail, the tool returns an error.
|
- `web_fetch` uses Readability (main-content extraction) first, then Firecrawl (if configured). If both fail, the tool returns an error.
|
||||||
- Firecrawl requests use bot-circumvention mode and cache results by default.
|
- Firecrawl requests use bot-circumvention mode and cache results by default.
|
||||||
- `web_fetch` sends a Chrome-like User-Agent and `Accept-Language` by default; override `userAgent` if needed.
|
- `web_fetch` sends a Chrome-like User-Agent and `Accept-Language` by default; override `userAgent` if needed.
|
||||||
- `web_fetch` blocks private/internal hostnames and re-checks redirects (limit with `maxRedirects`).
|
|
||||||
- `web_fetch` is best-effort extraction; some sites will need the browser tool.
|
- `web_fetch` is best-effort extraction; some sites will need the browser tool.
|
||||||
- See [Firecrawl](/tools/firecrawl) for key setup and service details.
|
- See [Firecrawl](/tools/firecrawl) for key setup and service details.
|
||||||
- Responses are cached (default 15 minutes) to reduce repeated fetches.
|
- Responses are cached (default 15 minutes) to reduce repeated fetches.
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"id": "diagnostics-otel",
|
|
||||||
"configSchema": {
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": false,
|
|
||||||
"properties": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
import type { ClawdbotPluginApi } from "clawdbot/plugin-sdk";
|
|
||||||
import { emptyPluginConfigSchema } from "clawdbot/plugin-sdk";
|
|
||||||
|
|
||||||
import { createDiagnosticsOtelService } from "./src/service.js";
|
|
||||||
|
|
||||||
const plugin = {
|
|
||||||
id: "diagnostics-otel",
|
|
||||||
name: "Diagnostics OpenTelemetry",
|
|
||||||
description: "Export diagnostics events to OpenTelemetry",
|
|
||||||
configSchema: emptyPluginConfigSchema(),
|
|
||||||
register(api: ClawdbotPluginApi) {
|
|
||||||
api.registerService(createDiagnosticsOtelService());
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default plugin;
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@clawdbot/diagnostics-otel",
|
|
||||||
"version": "2026.1.17-1",
|
|
||||||
"type": "module",
|
|
||||||
"description": "Clawdbot diagnostics OpenTelemetry exporter",
|
|
||||||
"clawdbot": {
|
|
||||||
"extensions": ["./index.ts"]
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@opentelemetry/api": "^1.9.0",
|
|
||||||
"@opentelemetry/api-logs": "^0.210.0",
|
|
||||||
"@opentelemetry/exporter-logs-otlp-http": "^0.210.0",
|
|
||||||
"@opentelemetry/exporter-metrics-otlp-http": "^0.210.0",
|
|
||||||
"@opentelemetry/exporter-trace-otlp-http": "^0.210.0",
|
|
||||||
"@opentelemetry/resources": "^2.4.0",
|
|
||||||
"@opentelemetry/sdk-logs": "^0.210.0",
|
|
||||||
"@opentelemetry/sdk-metrics": "^2.4.0",
|
|
||||||
"@opentelemetry/sdk-node": "^0.210.0",
|
|
||||||
"@opentelemetry/sdk-trace-base": "^2.4.0",
|
|
||||||
"@opentelemetry/semantic-conventions": "^1.39.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,220 +0,0 @@
|
|||||||
import { beforeEach, describe, expect, test, vi } from "vitest";
|
|
||||||
|
|
||||||
const registerLogTransportMock = vi.hoisted(() => vi.fn());
|
|
||||||
|
|
||||||
const telemetryState = vi.hoisted(() => {
|
|
||||||
const counters = new Map<string, { add: ReturnType<typeof vi.fn> }>();
|
|
||||||
const histograms = new Map<string, { record: ReturnType<typeof vi.fn> }>();
|
|
||||||
const tracer = {
|
|
||||||
startSpan: vi.fn((_name: string, _opts?: unknown) => ({
|
|
||||||
end: vi.fn(),
|
|
||||||
setStatus: vi.fn(),
|
|
||||||
})),
|
|
||||||
};
|
|
||||||
const meter = {
|
|
||||||
createCounter: vi.fn((name: string) => {
|
|
||||||
const counter = { add: vi.fn() };
|
|
||||||
counters.set(name, counter);
|
|
||||||
return counter;
|
|
||||||
}),
|
|
||||||
createHistogram: vi.fn((name: string) => {
|
|
||||||
const histogram = { record: vi.fn() };
|
|
||||||
histograms.set(name, histogram);
|
|
||||||
return histogram;
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
return { counters, histograms, tracer, meter };
|
|
||||||
});
|
|
||||||
|
|
||||||
const sdkStart = vi.hoisted(() => vi.fn().mockResolvedValue(undefined));
|
|
||||||
const sdkShutdown = vi.hoisted(() => vi.fn().mockResolvedValue(undefined));
|
|
||||||
const logEmit = vi.hoisted(() => vi.fn());
|
|
||||||
const logShutdown = vi.hoisted(() => vi.fn().mockResolvedValue(undefined));
|
|
||||||
|
|
||||||
vi.mock("@opentelemetry/api", () => ({
|
|
||||||
metrics: {
|
|
||||||
getMeter: () => telemetryState.meter,
|
|
||||||
},
|
|
||||||
trace: {
|
|
||||||
getTracer: () => telemetryState.tracer,
|
|
||||||
},
|
|
||||||
SpanStatusCode: {
|
|
||||||
ERROR: 2,
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock("@opentelemetry/sdk-node", () => ({
|
|
||||||
NodeSDK: class {
|
|
||||||
start = sdkStart;
|
|
||||||
shutdown = sdkShutdown;
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock("@opentelemetry/exporter-metrics-otlp-http", () => ({
|
|
||||||
OTLPMetricExporter: class {},
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock("@opentelemetry/exporter-trace-otlp-http", () => ({
|
|
||||||
OTLPTraceExporter: class {},
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock("@opentelemetry/exporter-logs-otlp-http", () => ({
|
|
||||||
OTLPLogExporter: class {},
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock("@opentelemetry/sdk-logs", () => ({
|
|
||||||
BatchLogRecordProcessor: class {},
|
|
||||||
LoggerProvider: class {
|
|
||||||
addLogRecordProcessor = vi.fn();
|
|
||||||
getLogger = vi.fn(() => ({
|
|
||||||
emit: logEmit,
|
|
||||||
}));
|
|
||||||
shutdown = logShutdown;
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock("@opentelemetry/sdk-metrics", () => ({
|
|
||||||
PeriodicExportingMetricReader: class {},
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock("@opentelemetry/sdk-trace-base", () => ({
|
|
||||||
ParentBasedSampler: class {},
|
|
||||||
TraceIdRatioBasedSampler: class {},
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock("@opentelemetry/resources", () => ({
|
|
||||||
Resource: class {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
||||||
constructor(_value?: unknown) {}
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock("@opentelemetry/semantic-conventions", () => ({
|
|
||||||
SemanticResourceAttributes: {
|
|
||||||
SERVICE_NAME: "service.name",
|
|
||||||
},
|
|
||||||
}));
|
|
||||||
|
|
||||||
vi.mock("clawdbot/plugin-sdk", async () => {
|
|
||||||
const actual = await vi.importActual<typeof import("clawdbot/plugin-sdk")>("clawdbot/plugin-sdk");
|
|
||||||
return {
|
|
||||||
...actual,
|
|
||||||
registerLogTransport: registerLogTransportMock,
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
import { createDiagnosticsOtelService } from "./service.js";
|
|
||||||
import { emitDiagnosticEvent } from "clawdbot/plugin-sdk";
|
|
||||||
|
|
||||||
describe("diagnostics-otel service", () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
telemetryState.counters.clear();
|
|
||||||
telemetryState.histograms.clear();
|
|
||||||
telemetryState.tracer.startSpan.mockClear();
|
|
||||||
telemetryState.meter.createCounter.mockClear();
|
|
||||||
telemetryState.meter.createHistogram.mockClear();
|
|
||||||
sdkStart.mockClear();
|
|
||||||
sdkShutdown.mockClear();
|
|
||||||
logEmit.mockClear();
|
|
||||||
logShutdown.mockClear();
|
|
||||||
registerLogTransportMock.mockReset();
|
|
||||||
});
|
|
||||||
|
|
||||||
test("records message-flow metrics and spans", async () => {
|
|
||||||
const registeredTransports: Array<(logObj: Record<string, unknown>) => void> = [];
|
|
||||||
const stopTransport = vi.fn();
|
|
||||||
registerLogTransportMock.mockImplementation((transport) => {
|
|
||||||
registeredTransports.push(transport);
|
|
||||||
return stopTransport;
|
|
||||||
});
|
|
||||||
|
|
||||||
const service = createDiagnosticsOtelService();
|
|
||||||
await service.start({
|
|
||||||
config: {
|
|
||||||
diagnostics: {
|
|
||||||
enabled: true,
|
|
||||||
otel: {
|
|
||||||
enabled: true,
|
|
||||||
endpoint: "http://otel-collector:4318",
|
|
||||||
protocol: "http/protobuf",
|
|
||||||
traces: true,
|
|
||||||
metrics: true,
|
|
||||||
logs: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
logger: {
|
|
||||||
info: vi.fn(),
|
|
||||||
warn: vi.fn(),
|
|
||||||
error: vi.fn(),
|
|
||||||
debug: vi.fn(),
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
emitDiagnosticEvent({
|
|
||||||
type: "webhook.received",
|
|
||||||
channel: "telegram",
|
|
||||||
updateType: "telegram-post",
|
|
||||||
});
|
|
||||||
emitDiagnosticEvent({
|
|
||||||
type: "webhook.processed",
|
|
||||||
channel: "telegram",
|
|
||||||
updateType: "telegram-post",
|
|
||||||
durationMs: 120,
|
|
||||||
});
|
|
||||||
emitDiagnosticEvent({
|
|
||||||
type: "message.queued",
|
|
||||||
channel: "telegram",
|
|
||||||
source: "telegram",
|
|
||||||
queueDepth: 2,
|
|
||||||
});
|
|
||||||
emitDiagnosticEvent({
|
|
||||||
type: "message.processed",
|
|
||||||
channel: "telegram",
|
|
||||||
outcome: "completed",
|
|
||||||
durationMs: 55,
|
|
||||||
});
|
|
||||||
emitDiagnosticEvent({
|
|
||||||
type: "queue.lane.dequeue",
|
|
||||||
lane: "main",
|
|
||||||
queueSize: 3,
|
|
||||||
waitMs: 10,
|
|
||||||
});
|
|
||||||
emitDiagnosticEvent({
|
|
||||||
type: "session.stuck",
|
|
||||||
state: "processing",
|
|
||||||
ageMs: 125_000,
|
|
||||||
});
|
|
||||||
emitDiagnosticEvent({
|
|
||||||
type: "run.attempt",
|
|
||||||
runId: "run-1",
|
|
||||||
attempt: 2,
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(telemetryState.counters.get("clawdbot.webhook.received")?.add).toHaveBeenCalled();
|
|
||||||
expect(telemetryState.histograms.get("clawdbot.webhook.duration_ms")?.record).toHaveBeenCalled();
|
|
||||||
expect(telemetryState.counters.get("clawdbot.message.queued")?.add).toHaveBeenCalled();
|
|
||||||
expect(telemetryState.counters.get("clawdbot.message.processed")?.add).toHaveBeenCalled();
|
|
||||||
expect(telemetryState.histograms.get("clawdbot.message.duration_ms")?.record).toHaveBeenCalled();
|
|
||||||
expect(telemetryState.histograms.get("clawdbot.queue.wait_ms")?.record).toHaveBeenCalled();
|
|
||||||
expect(telemetryState.counters.get("clawdbot.session.stuck")?.add).toHaveBeenCalled();
|
|
||||||
expect(telemetryState.histograms.get("clawdbot.session.stuck_age_ms")?.record).toHaveBeenCalled();
|
|
||||||
expect(telemetryState.counters.get("clawdbot.run.attempt")?.add).toHaveBeenCalled();
|
|
||||||
|
|
||||||
const spanNames = telemetryState.tracer.startSpan.mock.calls.map((call) => call[0]);
|
|
||||||
expect(spanNames).toContain("clawdbot.webhook.processed");
|
|
||||||
expect(spanNames).toContain("clawdbot.message.processed");
|
|
||||||
expect(spanNames).toContain("clawdbot.session.stuck");
|
|
||||||
|
|
||||||
expect(registerLogTransportMock).toHaveBeenCalledTimes(1);
|
|
||||||
expect(registeredTransports).toHaveLength(1);
|
|
||||||
registeredTransports[0]?.({
|
|
||||||
0: "{\"subsystem\":\"diagnostic\"}",
|
|
||||||
1: "hello",
|
|
||||||
_meta: { logLevelName: "INFO", date: new Date() },
|
|
||||||
});
|
|
||||||
expect(logEmit).toHaveBeenCalled();
|
|
||||||
|
|
||||||
await service.stop?.();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,566 +0,0 @@
|
|||||||
import { metrics, trace, SpanStatusCode } from "@opentelemetry/api";
|
|
||||||
import type { SeverityNumber } from "@opentelemetry/api-logs";
|
|
||||||
import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";
|
|
||||||
import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-http";
|
|
||||||
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|
|
||||||
import { Resource } from "@opentelemetry/resources";
|
|
||||||
import { BatchLogRecordProcessor, LoggerProvider } from "@opentelemetry/sdk-logs";
|
|
||||||
import { PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";
|
|
||||||
import { NodeSDK } from "@opentelemetry/sdk-node";
|
|
||||||
import { ParentBasedSampler, TraceIdRatioBasedSampler } from "@opentelemetry/sdk-trace-base";
|
|
||||||
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
|
|
||||||
|
|
||||||
import type { ClawdbotPluginService, DiagnosticEventPayload } from "clawdbot/plugin-sdk";
|
|
||||||
import { onDiagnosticEvent, registerLogTransport } from "clawdbot/plugin-sdk";
|
|
||||||
|
|
||||||
const DEFAULT_SERVICE_NAME = "clawdbot";
|
|
||||||
|
|
||||||
function normalizeEndpoint(endpoint?: string): string | undefined {
|
|
||||||
const trimmed = endpoint?.trim();
|
|
||||||
return trimmed ? trimmed.replace(/\/+$/, "") : undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
function resolveOtelUrl(endpoint: string | undefined, path: string): string | undefined {
|
|
||||||
if (!endpoint) return undefined;
|
|
||||||
if (endpoint.includes("/v1/")) return endpoint;
|
|
||||||
return `${endpoint}/${path}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function resolveSampleRate(value: number | undefined): number | undefined {
|
|
||||||
if (typeof value !== "number" || !Number.isFinite(value)) return undefined;
|
|
||||||
if (value < 0 || value > 1) return undefined;
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function createDiagnosticsOtelService(): ClawdbotPluginService {
|
|
||||||
let sdk: NodeSDK | null = null;
|
|
||||||
let logProvider: LoggerProvider | null = null;
|
|
||||||
let stopLogTransport: (() => void) | null = null;
|
|
||||||
let unsubscribe: (() => void) | null = null;
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: "diagnostics-otel",
|
|
||||||
async start(ctx) {
|
|
||||||
const cfg = ctx.config.diagnostics;
|
|
||||||
const otel = cfg?.otel;
|
|
||||||
if (!cfg?.enabled || !otel?.enabled) return;
|
|
||||||
|
|
||||||
const protocol = otel.protocol ?? process.env.OTEL_EXPORTER_OTLP_PROTOCOL ?? "http/protobuf";
|
|
||||||
if (protocol !== "http/protobuf") {
|
|
||||||
ctx.logger.warn(`diagnostics-otel: unsupported protocol ${protocol}`);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const endpoint = normalizeEndpoint(otel.endpoint ?? process.env.OTEL_EXPORTER_OTLP_ENDPOINT);
|
|
||||||
const headers = otel.headers ?? undefined;
|
|
||||||
const serviceName =
|
|
||||||
otel.serviceName?.trim() || process.env.OTEL_SERVICE_NAME || DEFAULT_SERVICE_NAME;
|
|
||||||
const sampleRate = resolveSampleRate(otel.sampleRate);
|
|
||||||
|
|
||||||
const tracesEnabled = otel.traces !== false;
|
|
||||||
const metricsEnabled = otel.metrics !== false;
|
|
||||||
const logsEnabled = otel.logs === true;
|
|
||||||
if (!tracesEnabled && !metricsEnabled && !logsEnabled) return;
|
|
||||||
|
|
||||||
const resource = new Resource({
|
|
||||||
[SemanticResourceAttributes.SERVICE_NAME]: serviceName,
|
|
||||||
});
|
|
||||||
|
|
||||||
const traceUrl = resolveOtelUrl(endpoint, "v1/traces");
|
|
||||||
const metricUrl = resolveOtelUrl(endpoint, "v1/metrics");
|
|
||||||
const logUrl = resolveOtelUrl(endpoint, "v1/logs");
|
|
||||||
const traceExporter = tracesEnabled
|
|
||||||
? new OTLPTraceExporter({
|
|
||||||
...(traceUrl ? { url: traceUrl } : {}),
|
|
||||||
...(headers ? { headers } : {}),
|
|
||||||
})
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
const metricExporter = metricsEnabled
|
|
||||||
? new OTLPMetricExporter({
|
|
||||||
...(metricUrl ? { url: metricUrl } : {}),
|
|
||||||
...(headers ? { headers } : {}),
|
|
||||||
})
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
const metricReader = metricExporter
|
|
||||||
? new PeriodicExportingMetricReader({
|
|
||||||
exporter: metricExporter,
|
|
||||||
...(typeof otel.flushIntervalMs === "number"
|
|
||||||
? { exportIntervalMillis: Math.max(1000, otel.flushIntervalMs) }
|
|
||||||
: {}),
|
|
||||||
})
|
|
||||||
: undefined;
|
|
||||||
|
|
||||||
if (tracesEnabled || metricsEnabled) {
|
|
||||||
sdk = new NodeSDK({
|
|
||||||
resource,
|
|
||||||
...(traceExporter ? { traceExporter } : {}),
|
|
||||||
...(metricReader ? { metricReader } : {}),
|
|
||||||
...(sampleRate !== undefined
|
|
||||||
? {
|
|
||||||
sampler: new ParentBasedSampler({
|
|
||||||
root: new TraceIdRatioBasedSampler(sampleRate),
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
: {}),
|
|
||||||
});
|
|
||||||
|
|
||||||
await sdk.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
const logSeverityMap: Record<string, SeverityNumber> = {
|
|
||||||
TRACE: 1 as SeverityNumber,
|
|
||||||
DEBUG: 5 as SeverityNumber,
|
|
||||||
INFO: 9 as SeverityNumber,
|
|
||||||
WARN: 13 as SeverityNumber,
|
|
||||||
ERROR: 17 as SeverityNumber,
|
|
||||||
FATAL: 21 as SeverityNumber,
|
|
||||||
};
|
|
||||||
|
|
||||||
const meter = metrics.getMeter("clawdbot");
|
|
||||||
const tracer = trace.getTracer("clawdbot");
|
|
||||||
|
|
||||||
const tokensCounter = meter.createCounter("clawdbot.tokens", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Token usage by type",
|
|
||||||
});
|
|
||||||
const costCounter = meter.createCounter("clawdbot.cost.usd", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Estimated model cost (USD)",
|
|
||||||
});
|
|
||||||
const durationHistogram = meter.createHistogram("clawdbot.run.duration_ms", {
|
|
||||||
unit: "ms",
|
|
||||||
description: "Agent run duration",
|
|
||||||
});
|
|
||||||
const contextHistogram = meter.createHistogram("clawdbot.context.tokens", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Context window size and usage",
|
|
||||||
});
|
|
||||||
const webhookReceivedCounter = meter.createCounter("clawdbot.webhook.received", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Webhook requests received",
|
|
||||||
});
|
|
||||||
const webhookErrorCounter = meter.createCounter("clawdbot.webhook.error", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Webhook processing errors",
|
|
||||||
});
|
|
||||||
const webhookDurationHistogram = meter.createHistogram("clawdbot.webhook.duration_ms", {
|
|
||||||
unit: "ms",
|
|
||||||
description: "Webhook processing duration",
|
|
||||||
});
|
|
||||||
const messageQueuedCounter = meter.createCounter("clawdbot.message.queued", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Messages queued for processing",
|
|
||||||
});
|
|
||||||
const messageProcessedCounter = meter.createCounter("clawdbot.message.processed", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Messages processed by outcome",
|
|
||||||
});
|
|
||||||
const messageDurationHistogram = meter.createHistogram("clawdbot.message.duration_ms", {
|
|
||||||
unit: "ms",
|
|
||||||
description: "Message processing duration",
|
|
||||||
});
|
|
||||||
const queueDepthHistogram = meter.createHistogram("clawdbot.queue.depth", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Queue depth on enqueue/dequeue",
|
|
||||||
});
|
|
||||||
const queueWaitHistogram = meter.createHistogram("clawdbot.queue.wait_ms", {
|
|
||||||
unit: "ms",
|
|
||||||
description: "Queue wait time before execution",
|
|
||||||
});
|
|
||||||
const laneEnqueueCounter = meter.createCounter("clawdbot.queue.lane.enqueue", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Command queue lane enqueue events",
|
|
||||||
});
|
|
||||||
const laneDequeueCounter = meter.createCounter("clawdbot.queue.lane.dequeue", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Command queue lane dequeue events",
|
|
||||||
});
|
|
||||||
const sessionStateCounter = meter.createCounter("clawdbot.session.state", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Session state transitions",
|
|
||||||
});
|
|
||||||
const sessionStuckCounter = meter.createCounter("clawdbot.session.stuck", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Sessions stuck in processing",
|
|
||||||
});
|
|
||||||
const sessionStuckAgeHistogram = meter.createHistogram("clawdbot.session.stuck_age_ms", {
|
|
||||||
unit: "ms",
|
|
||||||
description: "Age of stuck sessions",
|
|
||||||
});
|
|
||||||
const runAttemptCounter = meter.createCounter("clawdbot.run.attempt", {
|
|
||||||
unit: "1",
|
|
||||||
description: "Run attempts",
|
|
||||||
});
|
|
||||||
|
|
||||||
if (logsEnabled) {
|
|
||||||
const logExporter = new OTLPLogExporter({
|
|
||||||
...(logUrl ? { url: logUrl } : {}),
|
|
||||||
...(headers ? { headers } : {}),
|
|
||||||
});
|
|
||||||
logProvider = new LoggerProvider({ resource });
|
|
||||||
logProvider.addLogRecordProcessor(
|
|
||||||
new BatchLogRecordProcessor(logExporter, {
|
|
||||||
...(typeof otel.flushIntervalMs === "number"
|
|
||||||
? { scheduledDelayMillis: Math.max(1000, otel.flushIntervalMs) }
|
|
||||||
: {}),
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
const otelLogger = logProvider.getLogger("clawdbot");
|
|
||||||
|
|
||||||
stopLogTransport = registerLogTransport((logObj) => {
|
|
||||||
const safeStringify = (value: unknown) => {
|
|
||||||
try {
|
|
||||||
return JSON.stringify(value);
|
|
||||||
} catch {
|
|
||||||
return String(value);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const meta = (logObj as Record<string, unknown>)._meta as
|
|
||||||
| {
|
|
||||||
logLevelName?: string;
|
|
||||||
date?: Date;
|
|
||||||
name?: string;
|
|
||||||
parentNames?: string[];
|
|
||||||
path?: {
|
|
||||||
filePath?: string;
|
|
||||||
fileLine?: string;
|
|
||||||
fileColumn?: string;
|
|
||||||
filePathWithLine?: string;
|
|
||||||
method?: string;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
| undefined;
|
|
||||||
const logLevelName = meta?.logLevelName ?? "INFO";
|
|
||||||
const severityNumber = logSeverityMap[logLevelName] ?? (9 as SeverityNumber);
|
|
||||||
|
|
||||||
const numericArgs = Object.entries(logObj)
|
|
||||||
.filter(([key]) => /^\d+$/.test(key))
|
|
||||||
.sort((a, b) => Number(a[0]) - Number(b[0]))
|
|
||||||
.map(([, value]) => value);
|
|
||||||
|
|
||||||
let bindings: Record<string, unknown> | undefined;
|
|
||||||
if (typeof numericArgs[0] === "string" && numericArgs[0].trim().startsWith("{")) {
|
|
||||||
try {
|
|
||||||
const parsed = JSON.parse(numericArgs[0]);
|
|
||||||
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
||||||
bindings = parsed as Record<string, unknown>;
|
|
||||||
numericArgs.shift();
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
// ignore malformed json bindings
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let message = "";
|
|
||||||
if (numericArgs.length > 0 && typeof numericArgs[numericArgs.length - 1] === "string") {
|
|
||||||
message = String(numericArgs.pop());
|
|
||||||
} else if (numericArgs.length === 1) {
|
|
||||||
message = safeStringify(numericArgs[0]);
|
|
||||||
numericArgs.length = 0;
|
|
||||||
}
|
|
||||||
if (!message) {
|
|
||||||
message = "log";
|
|
||||||
}
|
|
||||||
|
|
||||||
const attributes: Record<string, string | number | boolean> = {
|
|
||||||
"clawdbot.log.level": logLevelName,
|
|
||||||
};
|
|
||||||
if (meta?.name) attributes["clawdbot.logger"] = meta.name;
|
|
||||||
if (meta?.parentNames?.length) {
|
|
||||||
attributes["clawdbot.logger.parents"] = meta.parentNames.join(".");
|
|
||||||
}
|
|
||||||
if (bindings) {
|
|
||||||
for (const [key, value] of Object.entries(bindings)) {
|
|
||||||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
||||||
attributes[`clawdbot.${key}`] = value;
|
|
||||||
} else if (value != null) {
|
|
||||||
attributes[`clawdbot.${key}`] = safeStringify(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (numericArgs.length > 0) {
|
|
||||||
attributes["clawdbot.log.args"] = safeStringify(numericArgs);
|
|
||||||
}
|
|
||||||
if (meta?.path?.filePath) attributes["code.filepath"] = meta.path.filePath;
|
|
||||||
if (meta?.path?.fileLine) attributes["code.lineno"] = Number(meta.path.fileLine);
|
|
||||||
if (meta?.path?.method) attributes["code.function"] = meta.path.method;
|
|
||||||
if (meta?.path?.filePathWithLine) {
|
|
||||||
attributes["clawdbot.code.location"] = meta.path.filePathWithLine;
|
|
||||||
}
|
|
||||||
|
|
||||||
otelLogger.emit({
|
|
||||||
body: message,
|
|
||||||
severityText: logLevelName,
|
|
||||||
severityNumber,
|
|
||||||
attributes,
|
|
||||||
timestamp: meta?.date ?? new Date(),
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
const spanWithDuration = (
|
|
||||||
name: string,
|
|
||||||
attributes: Record<string, string | number>,
|
|
||||||
durationMs?: number,
|
|
||||||
) => {
|
|
||||||
const startTime =
|
|
||||||
typeof durationMs === "number" ? Date.now() - Math.max(0, durationMs) : undefined;
|
|
||||||
const span = tracer.startSpan(name, {
|
|
||||||
attributes,
|
|
||||||
...(startTime ? { startTime } : {}),
|
|
||||||
});
|
|
||||||
return span;
|
|
||||||
};
|
|
||||||
|
|
||||||
const recordModelUsage = (evt: Extract<DiagnosticEventPayload, { type: "model.usage" }>) => {
|
|
||||||
const attrs = {
|
|
||||||
"clawdbot.channel": evt.channel ?? "unknown",
|
|
||||||
"clawdbot.provider": evt.provider ?? "unknown",
|
|
||||||
"clawdbot.model": evt.model ?? "unknown",
|
|
||||||
};
|
|
||||||
|
|
||||||
const usage = evt.usage;
|
|
||||||
if (usage.input) tokensCounter.add(usage.input, { ...attrs, "clawdbot.token": "input" });
|
|
||||||
if (usage.output) tokensCounter.add(usage.output, { ...attrs, "clawdbot.token": "output" });
|
|
||||||
if (usage.cacheRead)
|
|
||||||
tokensCounter.add(usage.cacheRead, { ...attrs, "clawdbot.token": "cache_read" });
|
|
||||||
if (usage.cacheWrite)
|
|
||||||
tokensCounter.add(usage.cacheWrite, { ...attrs, "clawdbot.token": "cache_write" });
|
|
||||||
if (usage.promptTokens)
|
|
||||||
tokensCounter.add(usage.promptTokens, { ...attrs, "clawdbot.token": "prompt" });
|
|
||||||
if (usage.total) tokensCounter.add(usage.total, { ...attrs, "clawdbot.token": "total" });
|
|
||||||
|
|
||||||
if (evt.costUsd) costCounter.add(evt.costUsd, attrs);
|
|
||||||
if (evt.durationMs) durationHistogram.record(evt.durationMs, attrs);
|
|
||||||
if (evt.context?.limit)
|
|
||||||
contextHistogram.record(evt.context.limit, {
|
|
||||||
...attrs,
|
|
||||||
"clawdbot.context": "limit",
|
|
||||||
});
|
|
||||||
if (evt.context?.used)
|
|
||||||
contextHistogram.record(evt.context.used, {
|
|
||||||
...attrs,
|
|
||||||
"clawdbot.context": "used",
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!tracesEnabled) return;
|
|
||||||
const spanAttrs: Record<string, string | number> = {
|
|
||||||
...attrs,
|
|
||||||
"clawdbot.sessionKey": evt.sessionKey ?? "",
|
|
||||||
"clawdbot.sessionId": evt.sessionId ?? "",
|
|
||||||
"clawdbot.tokens.input": usage.input ?? 0,
|
|
||||||
"clawdbot.tokens.output": usage.output ?? 0,
|
|
||||||
"clawdbot.tokens.cache_read": usage.cacheRead ?? 0,
|
|
||||||
"clawdbot.tokens.cache_write": usage.cacheWrite ?? 0,
|
|
||||||
"clawdbot.tokens.total": usage.total ?? 0,
|
|
||||||
};
|
|
||||||
|
|
||||||
const span = spanWithDuration("clawdbot.model.usage", spanAttrs, evt.durationMs);
|
|
||||||
span.end();
|
|
||||||
};
|
|
||||||
|
|
||||||
const recordWebhookReceived = (
|
|
||||||
evt: Extract<DiagnosticEventPayload, { type: "webhook.received" }>,
|
|
||||||
) => {
|
|
||||||
const attrs = {
|
|
||||||
"clawdbot.channel": evt.channel ?? "unknown",
|
|
||||||
"clawdbot.webhook": evt.updateType ?? "unknown",
|
|
||||||
};
|
|
||||||
webhookReceivedCounter.add(1, attrs);
|
|
||||||
};
|
|
||||||
|
|
||||||
const recordWebhookProcessed = (
|
|
||||||
evt: Extract<DiagnosticEventPayload, { type: "webhook.processed" }>,
|
|
||||||
) => {
|
|
||||||
const attrs = {
|
|
||||||
"clawdbot.channel": evt.channel ?? "unknown",
|
|
||||||
"clawdbot.webhook": evt.updateType ?? "unknown",
|
|
||||||
};
|
|
||||||
if (typeof evt.durationMs === "number") {
|
|
||||||
webhookDurationHistogram.record(evt.durationMs, attrs);
|
|
||||||
}
|
|
||||||
if (!tracesEnabled) return;
|
|
||||||
const spanAttrs: Record<string, string | number> = { ...attrs };
|
|
||||||
if (evt.chatId !== undefined) spanAttrs["clawdbot.chatId"] = String(evt.chatId);
|
|
||||||
const span = spanWithDuration("clawdbot.webhook.processed", spanAttrs, evt.durationMs);
|
|
||||||
span.end();
|
|
||||||
};
|
|
||||||
|
|
||||||
const recordWebhookError = (
|
|
||||||
evt: Extract<DiagnosticEventPayload, { type: "webhook.error" }>,
|
|
||||||
) => {
|
|
||||||
const attrs = {
|
|
||||||
"clawdbot.channel": evt.channel ?? "unknown",
|
|
||||||
"clawdbot.webhook": evt.updateType ?? "unknown",
|
|
||||||
};
|
|
||||||
webhookErrorCounter.add(1, attrs);
|
|
||||||
if (!tracesEnabled) return;
|
|
||||||
const spanAttrs: Record<string, string | number> = {
|
|
||||||
...attrs,
|
|
||||||
"clawdbot.error": evt.error,
|
|
||||||
};
|
|
||||||
if (evt.chatId !== undefined) spanAttrs["clawdbot.chatId"] = String(evt.chatId);
|
|
||||||
const span = tracer.startSpan("clawdbot.webhook.error", {
|
|
||||||
attributes: spanAttrs,
|
|
||||||
});
|
|
||||||
span.setStatus({ code: SpanStatusCode.ERROR, message: evt.error });
|
|
||||||
span.end();
|
|
||||||
};
|
|
||||||
|
|
||||||
const recordMessageQueued = (
|
|
||||||
evt: Extract<DiagnosticEventPayload, { type: "message.queued" }>,
|
|
||||||
) => {
|
|
||||||
const attrs = {
|
|
||||||
"clawdbot.channel": evt.channel ?? "unknown",
|
|
||||||
"clawdbot.source": evt.source ?? "unknown",
|
|
||||||
};
|
|
||||||
messageQueuedCounter.add(1, attrs);
|
|
||||||
if (typeof evt.queueDepth === "number") {
|
|
||||||
queueDepthHistogram.record(evt.queueDepth, attrs);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const recordMessageProcessed = (
|
|
||||||
evt: Extract<DiagnosticEventPayload, { type: "message.processed" }>,
|
|
||||||
) => {
|
|
||||||
const attrs = {
|
|
||||||
"clawdbot.channel": evt.channel ?? "unknown",
|
|
||||||
"clawdbot.outcome": evt.outcome ?? "unknown",
|
|
||||||
};
|
|
||||||
messageProcessedCounter.add(1, attrs);
|
|
||||||
if (typeof evt.durationMs === "number") {
|
|
||||||
messageDurationHistogram.record(evt.durationMs, attrs);
|
|
||||||
}
|
|
||||||
if (!tracesEnabled) return;
|
|
||||||
const spanAttrs: Record<string, string | number> = { ...attrs };
|
|
||||||
if (evt.sessionKey) spanAttrs["clawdbot.sessionKey"] = evt.sessionKey;
|
|
||||||
if (evt.sessionId) spanAttrs["clawdbot.sessionId"] = evt.sessionId;
|
|
||||||
if (evt.chatId !== undefined) spanAttrs["clawdbot.chatId"] = String(evt.chatId);
|
|
||||||
if (evt.messageId !== undefined) spanAttrs["clawdbot.messageId"] = String(evt.messageId);
|
|
||||||
if (evt.reason) spanAttrs["clawdbot.reason"] = evt.reason;
|
|
||||||
const span = spanWithDuration("clawdbot.message.processed", spanAttrs, evt.durationMs);
|
|
||||||
if (evt.outcome === "error") {
|
|
||||||
span.setStatus({ code: SpanStatusCode.ERROR, message: evt.error });
|
|
||||||
}
|
|
||||||
span.end();
|
|
||||||
};
|
|
||||||
|
|
||||||
const recordLaneEnqueue = (
|
|
||||||
evt: Extract<DiagnosticEventPayload, { type: "queue.lane.enqueue" }>,
|
|
||||||
) => {
|
|
||||||
const attrs = { "clawdbot.lane": evt.lane };
|
|
||||||
laneEnqueueCounter.add(1, attrs);
|
|
||||||
queueDepthHistogram.record(evt.queueSize, attrs);
|
|
||||||
};
|
|
||||||
|
|
||||||
const recordLaneDequeue = (
|
|
||||||
evt: Extract<DiagnosticEventPayload, { type: "queue.lane.dequeue" }>,
|
|
||||||
) => {
|
|
||||||
const attrs = { "clawdbot.lane": evt.lane };
|
|
||||||
laneDequeueCounter.add(1, attrs);
|
|
||||||
queueDepthHistogram.record(evt.queueSize, attrs);
|
|
||||||
if (typeof evt.waitMs === "number") {
|
|
||||||
queueWaitHistogram.record(evt.waitMs, attrs);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const recordSessionState = (
|
|
||||||
evt: Extract<DiagnosticEventPayload, { type: "session.state" }>,
|
|
||||||
) => {
|
|
||||||
const attrs: Record<string, string> = { "clawdbot.state": evt.state };
|
|
||||||
if (evt.reason) attrs["clawdbot.reason"] = evt.reason;
|
|
||||||
sessionStateCounter.add(1, attrs);
|
|
||||||
};
|
|
||||||
|
|
||||||
const recordSessionStuck = (
|
|
||||||
evt: Extract<DiagnosticEventPayload, { type: "session.stuck" }>,
|
|
||||||
) => {
|
|
||||||
const attrs: Record<string, string> = { "clawdbot.state": evt.state };
|
|
||||||
sessionStuckCounter.add(1, attrs);
|
|
||||||
if (typeof evt.ageMs === "number") {
|
|
||||||
sessionStuckAgeHistogram.record(evt.ageMs, attrs);
|
|
||||||
}
|
|
||||||
if (!tracesEnabled) return;
|
|
||||||
const spanAttrs: Record<string, string | number> = { ...attrs };
|
|
||||||
if (evt.sessionKey) spanAttrs["clawdbot.sessionKey"] = evt.sessionKey;
|
|
||||||
if (evt.sessionId) spanAttrs["clawdbot.sessionId"] = evt.sessionId;
|
|
||||||
spanAttrs["clawdbot.queueDepth"] = evt.queueDepth ?? 0;
|
|
||||||
spanAttrs["clawdbot.ageMs"] = evt.ageMs;
|
|
||||||
const span = tracer.startSpan("clawdbot.session.stuck", { attributes: spanAttrs });
|
|
||||||
span.setStatus({ code: SpanStatusCode.ERROR, message: "session stuck" });
|
|
||||||
span.end();
|
|
||||||
};
|
|
||||||
|
|
||||||
const recordRunAttempt = (evt: Extract<DiagnosticEventPayload, { type: "run.attempt" }>) => {
|
|
||||||
runAttemptCounter.add(1, { "clawdbot.attempt": evt.attempt });
|
|
||||||
};
|
|
||||||
|
|
||||||
const recordHeartbeat = (
|
|
||||||
evt: Extract<DiagnosticEventPayload, { type: "diagnostic.heartbeat" }>,
|
|
||||||
) => {
|
|
||||||
queueDepthHistogram.record(evt.queued, { "clawdbot.channel": "heartbeat" });
|
|
||||||
};
|
|
||||||
|
|
||||||
unsubscribe = onDiagnosticEvent((evt: DiagnosticEventPayload) => {
|
|
||||||
switch (evt.type) {
|
|
||||||
case "model.usage":
|
|
||||||
recordModelUsage(evt);
|
|
||||||
return;
|
|
||||||
case "webhook.received":
|
|
||||||
recordWebhookReceived(evt);
|
|
||||||
return;
|
|
||||||
case "webhook.processed":
|
|
||||||
recordWebhookProcessed(evt);
|
|
||||||
return;
|
|
||||||
case "webhook.error":
|
|
||||||
recordWebhookError(evt);
|
|
||||||
return;
|
|
||||||
case "message.queued":
|
|
||||||
recordMessageQueued(evt);
|
|
||||||
return;
|
|
||||||
case "message.processed":
|
|
||||||
recordMessageProcessed(evt);
|
|
||||||
return;
|
|
||||||
case "queue.lane.enqueue":
|
|
||||||
recordLaneEnqueue(evt);
|
|
||||||
return;
|
|
||||||
case "queue.lane.dequeue":
|
|
||||||
recordLaneDequeue(evt);
|
|
||||||
return;
|
|
||||||
case "session.state":
|
|
||||||
recordSessionState(evt);
|
|
||||||
return;
|
|
||||||
case "session.stuck":
|
|
||||||
recordSessionStuck(evt);
|
|
||||||
return;
|
|
||||||
case "run.attempt":
|
|
||||||
recordRunAttempt(evt);
|
|
||||||
return;
|
|
||||||
case "diagnostic.heartbeat":
|
|
||||||
recordHeartbeat(evt);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (logsEnabled) {
|
|
||||||
ctx.logger.info("diagnostics-otel: logs exporter enabled (OTLP/HTTP)");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async stop() {
|
|
||||||
unsubscribe?.();
|
|
||||||
unsubscribe = null;
|
|
||||||
stopLogTransport?.();
|
|
||||||
stopLogTransport = null;
|
|
||||||
if (logProvider) {
|
|
||||||
await logProvider.shutdown().catch(() => undefined);
|
|
||||||
logProvider = null;
|
|
||||||
}
|
|
||||||
if (sdk) {
|
|
||||||
await sdk.shutdown().catch(() => undefined);
|
|
||||||
sdk = null;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
} satisfies ClawdbotPluginService;
|
|
||||||
}
|
|
||||||
Loaded 100 of 374 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user