Compare commits
161
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c01bfcbc12 | ||
|
|
47110e88c7 | ||
|
|
51dfd6efdb | ||
|
|
4fad74738a | ||
|
|
69f0469530 | ||
|
|
eb1ee36f59 | ||
|
|
b341512564 | ||
|
|
6734f2d71c | ||
|
|
e12abf3114 | ||
|
|
2dfd3b9a81 | ||
|
|
7b6cbf5869 | ||
|
|
8686b3b951 | ||
|
|
2e7e135bc0 | ||
|
|
c287664923 | ||
|
|
18f0051d26 | ||
|
|
b012b1105e | ||
|
|
21370fc09b | ||
|
|
4999f15688 | ||
|
|
e4f9555f21 | ||
|
|
243a8b019e | ||
|
|
5c4079f66c | ||
|
|
b1f086b536 | ||
|
|
d298b8c16b | ||
|
|
40968bd5e0 | ||
|
|
80e6c070bf | ||
|
|
26fcca087b | ||
|
|
02ca148583 | ||
|
|
ae1c6f4313 | ||
|
|
9faed2226a | ||
|
|
cf04b24632 | ||
|
|
9f856abfe7 | ||
|
|
e74fd9196c | ||
|
|
40e928a4c4 | ||
|
|
faa5838147 | ||
|
|
f6abe62e5f | ||
|
|
5c5745dee5 | ||
|
|
15c735de4d | ||
|
|
8bf484bdad | ||
|
|
36719690a2 | ||
|
|
f2666d2092 | ||
|
|
a28c271488 | ||
|
|
1d9d5b30ce | ||
|
|
14f56a4e18 | ||
|
|
687c41e838 | ||
|
|
ddb7b5c6a4 | ||
|
|
262e35c219 | ||
|
|
95f0befd65 | ||
|
|
83d5e30027 | ||
|
|
842be7b864 | ||
|
|
cb5d76ed3d | ||
|
|
3d5ffee07f | ||
|
|
bd8f4b052d | ||
|
|
929d50b7d1 | ||
|
|
4fda10c508 | ||
|
|
0b0d8b2406 | ||
|
|
844ff2ee8f | ||
|
|
8c666666ef | ||
|
|
2394703593 | ||
|
|
404470853a | ||
|
|
99fc0fbac1 | ||
|
|
91ed00f800 | ||
|
|
76698ed296 | ||
|
|
716546824f | ||
|
|
74f382f732 | ||
|
|
a76aea1bc0 | ||
|
|
533766207f | ||
|
|
59fa002561 | ||
|
|
48ab168df2 | ||
|
|
bef9d5bdc8 | ||
|
|
c6812c6af4 | ||
|
|
1f7cb4b853 | ||
|
|
d161f3ab0f | ||
|
|
c65b91c841 | ||
|
|
760b1e8fc6 | ||
|
|
188893f319 | ||
|
|
04ee9e7765 | ||
|
|
390ba5f42a | ||
|
|
b8593fd4fb | ||
|
|
68a467dd66 | ||
|
|
d18319a57d | ||
|
|
15e5bb3459 | ||
|
|
41f6d06967 | ||
|
|
e3a99aa2ce | ||
|
|
c1d8456860 | ||
|
|
da10ca1585 | ||
|
|
5d017dae5a | ||
|
|
30fd7001f2 | ||
|
|
da4b124480 | ||
|
|
710c681283 | ||
|
|
e45228ac37 | ||
|
|
a0180f364d | ||
|
|
d69f246ba7 | ||
|
|
a81989048d | ||
|
|
b56e9964f5 | ||
|
|
ddd7fc1513 | ||
|
|
4ebf55f1db | ||
|
|
cc24ede586 | ||
|
|
eb3b84f3d2 | ||
|
|
304244f2be | ||
|
|
f067ea25b4 | ||
|
|
fa51294f65 | ||
|
|
a4d1c4d522 | ||
|
|
6e17c463ae | ||
|
|
63797e841d | ||
|
|
fdb171cb15 | ||
|
|
6f9861bb9b | ||
|
|
759068304e | ||
|
|
ded578b1fa | ||
|
|
dcb8d16591 | ||
|
|
06c17a333e | ||
|
|
409a16060b | ||
|
|
7720106624 | ||
|
|
c613769d22 | ||
|
|
87343c374e | ||
|
|
67be9aed28 | ||
|
|
b48d5d96d3 | ||
|
|
d8cc7db5e6 | ||
|
|
dfbf6ac263 | ||
|
|
121ae6036b | ||
|
|
6e1ad31b49 | ||
|
|
b8b0b3f0e7 | ||
|
|
0330b483ad | ||
|
|
9a2bf57e1c | ||
|
|
439044068a | ||
|
|
4c3b4aeb76 | ||
|
|
1e8b291374 | ||
|
|
95f82154f7 | ||
|
|
7bc3998451 | ||
|
|
d029ceab1c | ||
|
|
c331bdc27d | ||
|
|
b0b42b4e14 | ||
|
|
e5514d4854 | ||
|
|
20bc89d96c | ||
|
|
199fef2a5e | ||
|
|
d9a2ac7e72 | ||
|
|
a16934b2ab | ||
|
|
14a072f5fa | ||
|
|
574b848863 | ||
|
|
2e6c58bf75 | ||
|
|
a5d89e6eb1 | ||
|
|
61907ddf3e | ||
|
|
1eab8fa9b0 | ||
|
|
2cf444be02 | ||
|
|
7870ce8177 | ||
|
|
e9d691d472 | ||
|
|
ac2fcfe96a | ||
|
|
627fa3083b | ||
|
|
e4877656ca | ||
|
|
d91f0ceeb3 | ||
|
|
9b71382efb | ||
|
|
dd82d32d85 | ||
|
|
5a42f7cabd | ||
|
|
f2c25c5f40 | ||
|
|
528524e4c7 | ||
|
|
c9d02f0132 | ||
|
|
0bd99717be | ||
|
|
154c49511c | ||
|
|
34462b3221 | ||
|
|
0372bdf6fe | ||
|
|
cd8309cc31 | ||
|
|
5d9a5b7958 |
No files matched your search
@@ -66,3 +66,6 @@ apps/ios/*.mobileprovision
|
|||||||
IDENTITY.md
|
IDENTITY.md
|
||||||
USER.md
|
USER.md
|
||||||
.tgz
|
.tgz
|
||||||
|
|
||||||
|
# local tooling
|
||||||
|
.serena/
|
||||||
@@ -1 +1 @@
|
|||||||
allow-build-scripts=@whiskeysockets/baileys,sharp,esbuild,protobufjs,fs-ext,node-pty,@lydell/node-pty
|
allow-build-scripts=@whiskeysockets/baileys,sharp,esbuild,protobufjs,fs-ext,node-pty,@lydell/node-pty,@matrix-org/matrix-sdk-crypto-nodejs
|
||||||
@@ -1 +0,0 @@
|
|||||||
/cache
|
|
||||||
BIN
Binary file not shown.
Binary file not shown.
@@ -1,87 +0,0 @@
|
|||||||
# list of languages for which language servers are started; choose from:
|
|
||||||
# al bash clojure cpp csharp csharp_omnisharp
|
|
||||||
# dart elixir elm erlang fortran fsharp
|
|
||||||
# go groovy haskell java julia kotlin
|
|
||||||
# lua markdown nix pascal perl php
|
|
||||||
# powershell python python_jedi r rego ruby
|
|
||||||
# ruby_solargraph rust scala swift terraform toml
|
|
||||||
# typescript typescript_vts yaml zig
|
|
||||||
# Note:
|
|
||||||
# - For C, use cpp
|
|
||||||
# - For JavaScript, use typescript
|
|
||||||
# - For Free Pascal / Lazarus, use pascal
|
|
||||||
# Special requirements:
|
|
||||||
# - csharp: Requires the presence of a .sln file in the project folder.
|
|
||||||
# - pascal: Requires Free Pascal Compiler (fpc) and optionally Lazarus.
|
|
||||||
# When using multiple languages, the first language server that supports a given file will be used for that file.
|
|
||||||
# The first language is the default language and the respective language server will be used as a fallback.
|
|
||||||
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
|
|
||||||
languages:
|
|
||||||
- typescript
|
|
||||||
|
|
||||||
# the encoding used by text files in the project
|
|
||||||
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
|
|
||||||
encoding: "utf-8"
|
|
||||||
|
|
||||||
# whether to use the project's gitignore file to ignore files
|
|
||||||
# Added on 2025-04-07
|
|
||||||
ignore_all_files_in_gitignore: true
|
|
||||||
|
|
||||||
# list of additional paths to ignore
|
|
||||||
# same syntax as gitignore, so you can use * and **
|
|
||||||
# Was previously called `ignored_dirs`, please update your config if you are using that.
|
|
||||||
# Added (renamed) on 2025-04-07
|
|
||||||
ignored_paths: []
|
|
||||||
|
|
||||||
# whether the project is in read-only mode
|
|
||||||
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
|
|
||||||
# Added on 2025-04-18
|
|
||||||
read_only: false
|
|
||||||
|
|
||||||
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
|
|
||||||
# Below is the complete list of tools for convenience.
|
|
||||||
# To make sure you have the latest list of tools, and to view their descriptions,
|
|
||||||
# execute `uv run scripts/print_tool_overview.py`.
|
|
||||||
#
|
|
||||||
# * `activate_project`: Activates a project by name.
|
|
||||||
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
|
|
||||||
# * `create_text_file`: Creates/overwrites a file in the project directory.
|
|
||||||
# * `delete_lines`: Deletes a range of lines within a file.
|
|
||||||
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
|
|
||||||
# * `execute_shell_command`: Executes a shell command.
|
|
||||||
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
|
|
||||||
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
|
|
||||||
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
|
|
||||||
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
|
|
||||||
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
|
|
||||||
# * `initial_instructions`: Gets the initial instructions for the current project.
|
|
||||||
# Should only be used in settings where the system prompt cannot be set,
|
|
||||||
# e.g. in clients you have no control over, like Claude Desktop.
|
|
||||||
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
|
|
||||||
# * `insert_at_line`: Inserts content at a given line in a file.
|
|
||||||
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
|
|
||||||
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
|
|
||||||
# * `list_memories`: Lists memories in Serena's project-specific memory store.
|
|
||||||
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
|
|
||||||
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
|
|
||||||
# * `read_file`: Reads a file within the project directory.
|
|
||||||
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
|
|
||||||
# * `remove_project`: Removes a project from the Serena configuration.
|
|
||||||
# * `replace_lines`: Replaces a range of lines within a file with new content.
|
|
||||||
# * `replace_symbol_body`: Replaces the full definition of a symbol.
|
|
||||||
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
|
|
||||||
# * `search_for_pattern`: Performs a search for a pattern in the project.
|
|
||||||
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
|
|
||||||
# * `switch_modes`: Activates modes by providing a list of their names
|
|
||||||
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
|
|
||||||
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
|
|
||||||
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
|
|
||||||
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
|
|
||||||
excluded_tools: []
|
|
||||||
|
|
||||||
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
|
||||||
# (contrary to the memories, which are loaded on demand).
|
|
||||||
initial_prompt: ""
|
|
||||||
|
|
||||||
project_name: "clawdbot"
|
|
||||||
included_optional_tools: []
|
|
||||||
@@ -41,6 +41,11 @@
|
|||||||
- Aim to keep files under ~700 LOC; guideline only (not a hard guardrail). Split/refactor when it improves clarity or testability.
|
- Aim to keep files under ~700 LOC; guideline only (not a hard guardrail). Split/refactor when it improves clarity or testability.
|
||||||
- Naming: use **Clawdbot** for product/app/docs headings; use `clawdbot` for CLI command, package/binary, paths, and config keys.
|
- Naming: use **Clawdbot** for product/app/docs headings; use `clawdbot` for CLI command, package/binary, paths, and config keys.
|
||||||
|
|
||||||
|
## Release Channels (Naming)
|
||||||
|
- stable: tagged releases only (e.g. `vYYYY.M.D`), npm dist-tag `latest`.
|
||||||
|
- beta: prerelease tags `vYYYY.M.D-beta.N`, npm dist-tag `beta` (may ship without macOS app).
|
||||||
|
- dev: moving head on `main` (no tag; git checkout main).
|
||||||
|
|
||||||
## Testing Guidelines
|
## Testing Guidelines
|
||||||
- Framework: Vitest with V8 coverage thresholds (70% lines/branches/functions/statements).
|
- Framework: Vitest with V8 coverage thresholds (70% lines/branches/functions/statements).
|
||||||
- Naming: match source names with `*.test.ts`; e2e in `*.e2e.test.ts`.
|
- Naming: match source names with `*.test.ts`; e2e in `*.e2e.test.ts`.
|
||||||
|
|||||||
+31
-2
@@ -2,19 +2,44 @@
|
|||||||
|
|
||||||
Docs: https://docs.clawd.bot
|
Docs: https://docs.clawd.bot
|
||||||
|
|
||||||
## 2026.1.20-1
|
## 2026.1.20
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
- Deps: update workspace + memory-lancedb dependencies.
|
||||||
- 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`.
|
||||||
|
- 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.
|
||||||
- UI: separate tool output from assistant reasoning and add a thinking toggle. (#1292) — thanks @bradleypriest.
|
- Discord: fall back to /skill when native command limits are exceeded; expose /skill globally. (#1287) — thanks @thewilloftheshadow.
|
||||||
|
- Docs: refresh bird skill install metadata and usage notes. (#1302) — thanks @odysseus0.
|
||||||
|
- 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.
|
||||||
|
- 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.
|
||||||
### 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.
|
||||||
|
- 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.
|
||||||
|
- UI: keep config form enums typed, preserve empty strings, protect sensitive defaults, and deepen config search. (#1315) — thanks @MaudeBot.
|
||||||
- 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).
|
||||||
- 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.
|
||||||
- CLI: avoid duplicating --profile/--dev flags when formatting commands.
|
- CLI: avoid duplicating --profile/--dev flags when formatting commands.
|
||||||
|
- CLI: load channel plugins for commands that need registry-backed lookups. (#1338) — thanks @MaudeBot.
|
||||||
|
- 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)
|
||||||
- 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
|
||||||
|
|
||||||
@@ -27,6 +52,8 @@ Docs: https://docs.clawd.bot
|
|||||||
### Fixes
|
### Fixes
|
||||||
- Gateway: strip inbound envelope headers from chat history messages to keep clients clean.
|
- Gateway: strip inbound envelope headers from chat history messages to keep clients clean.
|
||||||
- UI: prevent double-scroll in Control UI chat by locking chat layout to the viewport. (#1283) — thanks @bradleypriest.
|
- UI: prevent double-scroll in Control UI chat by locking chat layout to the viewport. (#1283) — thanks @bradleypriest.
|
||||||
|
- Config: allow Perplexity as a web_search provider in config validation. (#1230)
|
||||||
|
- Browser: register AI snapshot refs for act commands. (#1282) — thanks @John-Rood.
|
||||||
|
|
||||||
## 2026.1.19-2
|
## 2026.1.19-2
|
||||||
|
|
||||||
@@ -49,6 +76,7 @@ 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.
|
||||||
@@ -61,6 +89,7 @@ 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
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,15 @@ clawdbot agent --message "Ship checklist" --thinking high
|
|||||||
|
|
||||||
Upgrading? [Updating guide](https://docs.clawd.bot/install/updating) (and run `clawdbot doctor`).
|
Upgrading? [Updating guide](https://docs.clawd.bot/install/updating) (and run `clawdbot doctor`).
|
||||||
|
|
||||||
|
## Development channels
|
||||||
|
|
||||||
|
- **stable**: tagged releases (`vYYYY.M.D` or `vYYYY.M.D-<patch>`), npm dist-tag `latest`.
|
||||||
|
- **beta**: prerelease tags (`vYYYY.M.D-beta.N`), npm dist-tag `beta` (macOS app may be missing).
|
||||||
|
- **dev**: moving head of `main`, npm dist-tag `dev` (when published).
|
||||||
|
|
||||||
|
Switch channels (git + npm): `clawdbot update --channel stable|beta|dev`.
|
||||||
|
Details: [Development channels](https://docs.clawd.bot/install/development-channels).
|
||||||
|
|
||||||
## From source (development)
|
## From source (development)
|
||||||
|
|
||||||
Prefer `pnpm` for builds from source. Bun is optional for running TypeScript directly.
|
Prefer `pnpm` for builds from source. Bun is optional for running TypeScript directly.
|
||||||
@@ -473,24 +482,24 @@ Thanks to all clawtributors:
|
|||||||
<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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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=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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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=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/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/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/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/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=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/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/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=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/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/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=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=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>
|
||||||
</p>
|
</p>
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"originHash" : "5d29ee82825e0764775562242cfa1ff4dc79584797dd638f76c9876545454748",
|
"originHash" : "c0677e232394b5f6b0191b6dbb5bae553d55264f65ae725cd03a8ffdfda9cdd3",
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"identity" : "elevenlabskit",
|
"identity" : "commander",
|
||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/steipete/ElevenLabsKit",
|
"location" : "https://github.com/steipete/Commander.git",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "7e3c948d8340abe3977014f3de020edf221e9269",
|
"revision" : "9e349575c8e3c6745e81fe19e5bb5efa01b078ce",
|
||||||
"version" : "0.1.0"
|
"version" : "0.2.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
## Clawdbot Node (Android) (internal)
|
## Clawdbot Node (Android) (internal)
|
||||||
|
|
||||||
Modern Android node app: connects to the **Gateway WebSocket** (`_clawdbot-gateway._tcp`) and exposes **Canvas + Chat + Camera**.
|
Modern Android node app: connects to the **Gateway WebSocket** (`_clawdbot-gw._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 = 202601114
|
versionCode = 202601200
|
||||||
versionName = "2026.1.11-4"
|
versionName = "2026.1.20"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.clawdbot.android.chat.ChatMessage
|
|||||||
import com.clawdbot.android.chat.ChatPendingToolCall
|
import com.clawdbot.android.chat.ChatPendingToolCall
|
||||||
import com.clawdbot.android.chat.ChatSessionEntry
|
import com.clawdbot.android.chat.ChatSessionEntry
|
||||||
import com.clawdbot.android.chat.OutgoingAttachment
|
import com.clawdbot.android.chat.OutgoingAttachment
|
||||||
|
import com.clawdbot.android.gateway.DeviceAuthStore
|
||||||
import com.clawdbot.android.gateway.DeviceIdentityStore
|
import com.clawdbot.android.gateway.DeviceIdentityStore
|
||||||
import com.clawdbot.android.gateway.GatewayClientInfo
|
import com.clawdbot.android.gateway.GatewayClientInfo
|
||||||
import com.clawdbot.android.gateway.GatewayConnectOptions
|
import com.clawdbot.android.gateway.GatewayConnectOptions
|
||||||
@@ -62,6 +63,7 @@ class NodeRuntime(context: Context) {
|
|||||||
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
|
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
|
||||||
|
|
||||||
val prefs = SecurePrefs(appContext)
|
val prefs = SecurePrefs(appContext)
|
||||||
|
private val deviceAuthStore = DeviceAuthStore(prefs)
|
||||||
val canvas = CanvasController()
|
val canvas = CanvasController()
|
||||||
val camera = CameraCaptureManager(appContext)
|
val camera = CameraCaptureManager(appContext)
|
||||||
val location = LocationCaptureManager(appContext)
|
val location = LocationCaptureManager(appContext)
|
||||||
@@ -153,6 +155,7 @@ class NodeRuntime(context: Context) {
|
|||||||
GatewaySession(
|
GatewaySession(
|
||||||
scope = scope,
|
scope = scope,
|
||||||
identityStore = identityStore,
|
identityStore = identityStore,
|
||||||
|
deviceAuthStore = deviceAuthStore,
|
||||||
onConnected = { name, remote, mainSessionKey ->
|
onConnected = { name, remote, mainSessionKey ->
|
||||||
operatorConnected = true
|
operatorConnected = true
|
||||||
operatorStatusText = "Connected"
|
operatorStatusText = "Connected"
|
||||||
@@ -188,6 +191,7 @@ class NodeRuntime(context: Context) {
|
|||||||
GatewaySession(
|
GatewaySession(
|
||||||
scope = scope,
|
scope = scope,
|
||||||
identityStore = identityStore,
|
identityStore = identityStore,
|
||||||
|
deviceAuthStore = deviceAuthStore,
|
||||||
onConnected = { _, _, _ ->
|
onConnected = { _, _, _ ->
|
||||||
nodeConnected = true
|
nodeConnected = true
|
||||||
nodeStatusText = "Connected"
|
nodeStatusText = "Connected"
|
||||||
|
|||||||
@@ -189,6 +189,18 @@ class SecurePrefs(context: Context) {
|
|||||||
prefs.edit { putString(key, fingerprint.trim()) }
|
prefs.edit { putString(key, fingerprint.trim()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getString(key: String): String? {
|
||||||
|
return prefs.getString(key, null)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun putString(key: String, value: String) {
|
||||||
|
prefs.edit { putString(key, value) }
|
||||||
|
}
|
||||||
|
|
||||||
|
fun remove(key: String) {
|
||||||
|
prefs.edit { remove(key) }
|
||||||
|
}
|
||||||
|
|
||||||
private fun loadOrCreateInstanceId(): String {
|
private fun loadOrCreateInstanceId(): String {
|
||||||
val existing = prefs.getString("node.instanceId", null)?.trim()
|
val existing = prefs.getString("node.instanceId", null)?.trim()
|
||||||
if (!existing.isNullOrBlank()) return existing
|
if (!existing.isNullOrBlank()) return existing
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.clawdbot.android.gateway
|
||||||
|
|
||||||
|
import com.clawdbot.android.SecurePrefs
|
||||||
|
|
||||||
|
class DeviceAuthStore(private val prefs: SecurePrefs) {
|
||||||
|
fun loadToken(deviceId: String, role: String): String? {
|
||||||
|
val key = tokenKey(deviceId, role)
|
||||||
|
return prefs.getString(key)?.trim()?.takeIf { it.isNotEmpty() }
|
||||||
|
}
|
||||||
|
|
||||||
|
fun saveToken(deviceId: String, role: String, token: String) {
|
||||||
|
val key = tokenKey(deviceId, role)
|
||||||
|
prefs.putString(key, token.trim())
|
||||||
|
}
|
||||||
|
|
||||||
|
fun clearToken(deviceId: String, role: String) {
|
||||||
|
val key = tokenKey(deviceId, role)
|
||||||
|
prefs.remove(key)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun tokenKey(deviceId: String, role: String): String {
|
||||||
|
val normalizedDevice = deviceId.trim().lowercase()
|
||||||
|
val normalizedRole = role.trim().lowercase()
|
||||||
|
return "gateway.deviceToken.$normalizedDevice.$normalizedRole"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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-gateway._tcp."
|
private val serviceType = "_clawdbot-gw._tcp."
|
||||||
private val wideAreaDomain = "clawdbot.internal."
|
private val wideAreaDomain = "clawdbot.internal."
|
||||||
private val logTag = "Clawdbot/GatewayDiscovery"
|
private val logTag = "Clawdbot/GatewayDiscovery"
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ data class GatewayConnectOptions(
|
|||||||
class GatewaySession(
|
class GatewaySession(
|
||||||
private val scope: CoroutineScope,
|
private val scope: CoroutineScope,
|
||||||
private val identityStore: DeviceIdentityStore,
|
private val identityStore: DeviceIdentityStore,
|
||||||
|
private val deviceAuthStore: DeviceAuthStore,
|
||||||
private val onConnected: (serverName: String?, remoteAddress: String?, mainSessionKey: String?) -> Unit,
|
private val onConnected: (serverName: String?, remoteAddress: String?, mainSessionKey: String?) -> Unit,
|
||||||
private val onDisconnected: (message: String) -> Unit,
|
private val onDisconnected: (message: String) -> Unit,
|
||||||
private val onEvent: (event: String, payloadJson: String?) -> Unit,
|
private val onEvent: (event: String, payloadJson: String?) -> Unit,
|
||||||
@@ -177,6 +178,7 @@ class GatewaySession(
|
|||||||
private val connectDeferred = CompletableDeferred<Unit>()
|
private val connectDeferred = CompletableDeferred<Unit>()
|
||||||
private val closedDeferred = CompletableDeferred<Unit>()
|
private val closedDeferred = CompletableDeferred<Unit>()
|
||||||
private val isClosed = AtomicBoolean(false)
|
private val isClosed = AtomicBoolean(false)
|
||||||
|
private val connectNonceDeferred = CompletableDeferred<String?>()
|
||||||
private val client: OkHttpClient = buildClient()
|
private val client: OkHttpClient = buildClient()
|
||||||
private var socket: WebSocket? = null
|
private var socket: WebSocket? = null
|
||||||
private val loggerTag = "ClawdbotGateway"
|
private val loggerTag = "ClawdbotGateway"
|
||||||
@@ -253,7 +255,8 @@ class GatewaySession(
|
|||||||
override fun onOpen(webSocket: WebSocket, response: Response) {
|
override fun onOpen(webSocket: WebSocket, response: Response) {
|
||||||
scope.launch {
|
scope.launch {
|
||||||
try {
|
try {
|
||||||
sendConnect()
|
val nonce = awaitConnectNonce()
|
||||||
|
sendConnect(nonce)
|
||||||
} catch (err: Throwable) {
|
} catch (err: Throwable) {
|
||||||
connectDeferred.completeExceptionally(err)
|
connectDeferred.completeExceptionally(err)
|
||||||
closeQuietly()
|
closeQuietly()
|
||||||
@@ -288,16 +291,30 @@ class GatewaySession(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun sendConnect() {
|
private suspend fun sendConnect(connectNonce: String?) {
|
||||||
val payload = buildConnectParams()
|
val identity = identityStore.loadOrCreate()
|
||||||
|
val storedToken = deviceAuthStore.loadToken(identity.deviceId, options.role)
|
||||||
|
val trimmedToken = token?.trim().orEmpty()
|
||||||
|
val authToken = if (storedToken.isNullOrBlank()) trimmedToken else storedToken
|
||||||
|
val canFallbackToShared = !storedToken.isNullOrBlank() && trimmedToken.isNotBlank()
|
||||||
|
val payload = buildConnectParams(identity, connectNonce, authToken, password?.trim())
|
||||||
val res = request("connect", payload, timeoutMs = 8_000)
|
val res = request("connect", payload, timeoutMs = 8_000)
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
val msg = res.error?.message ?: "connect failed"
|
val msg = res.error?.message ?: "connect failed"
|
||||||
|
if (canFallbackToShared) {
|
||||||
|
deviceAuthStore.clearToken(identity.deviceId, options.role)
|
||||||
|
}
|
||||||
throw IllegalStateException(msg)
|
throw IllegalStateException(msg)
|
||||||
}
|
}
|
||||||
val payloadJson = res.payloadJson ?: throw IllegalStateException("connect failed: missing payload")
|
val payloadJson = res.payloadJson ?: throw IllegalStateException("connect failed: missing payload")
|
||||||
val obj = json.parseToJsonElement(payloadJson).asObjectOrNull() ?: throw IllegalStateException("connect failed")
|
val obj = json.parseToJsonElement(payloadJson).asObjectOrNull() ?: throw IllegalStateException("connect failed")
|
||||||
val serverName = obj["server"].asObjectOrNull()?.get("host").asStringOrNull()
|
val serverName = obj["server"].asObjectOrNull()?.get("host").asStringOrNull()
|
||||||
|
val authObj = obj["auth"].asObjectOrNull()
|
||||||
|
val deviceToken = authObj?.get("deviceToken").asStringOrNull()
|
||||||
|
val authRole = authObj?.get("role").asStringOrNull() ?: options.role
|
||||||
|
if (!deviceToken.isNullOrBlank()) {
|
||||||
|
deviceAuthStore.saveToken(identity.deviceId, authRole, deviceToken)
|
||||||
|
}
|
||||||
val rawCanvas = obj["canvasHostUrl"].asStringOrNull()
|
val rawCanvas = obj["canvasHostUrl"].asStringOrNull()
|
||||||
canvasHostUrl = normalizeCanvasHostUrl(rawCanvas, endpoint)
|
canvasHostUrl = normalizeCanvasHostUrl(rawCanvas, endpoint)
|
||||||
val sessionDefaults =
|
val sessionDefaults =
|
||||||
@@ -308,7 +325,12 @@ class GatewaySession(
|
|||||||
connectDeferred.complete(Unit)
|
connectDeferred.complete(Unit)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun buildConnectParams(): JsonObject {
|
private fun buildConnectParams(
|
||||||
|
identity: DeviceIdentity,
|
||||||
|
connectNonce: String?,
|
||||||
|
authToken: String,
|
||||||
|
authPassword: String?,
|
||||||
|
): JsonObject {
|
||||||
val client = options.client
|
val client = options.client
|
||||||
val locale = Locale.getDefault().toLanguageTag()
|
val locale = Locale.getDefault().toLanguageTag()
|
||||||
val clientObj =
|
val clientObj =
|
||||||
@@ -323,22 +345,20 @@ class GatewaySession(
|
|||||||
client.modelIdentifier?.let { put("modelIdentifier", JsonPrimitive(it)) }
|
client.modelIdentifier?.let { put("modelIdentifier", JsonPrimitive(it)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
val authToken = token?.trim().orEmpty()
|
val password = authPassword?.trim().orEmpty()
|
||||||
val authPassword = password?.trim().orEmpty()
|
|
||||||
val authJson =
|
val authJson =
|
||||||
when {
|
when {
|
||||||
authToken.isNotEmpty() ->
|
authToken.isNotEmpty() ->
|
||||||
buildJsonObject {
|
buildJsonObject {
|
||||||
put("token", JsonPrimitive(authToken))
|
put("token", JsonPrimitive(authToken))
|
||||||
}
|
}
|
||||||
authPassword.isNotEmpty() ->
|
password.isNotEmpty() ->
|
||||||
buildJsonObject {
|
buildJsonObject {
|
||||||
put("password", JsonPrimitive(authPassword))
|
put("password", JsonPrimitive(password))
|
||||||
}
|
}
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
|
||||||
val identity = identityStore.loadOrCreate()
|
|
||||||
val signedAtMs = System.currentTimeMillis()
|
val signedAtMs = System.currentTimeMillis()
|
||||||
val payload =
|
val payload =
|
||||||
buildDeviceAuthPayload(
|
buildDeviceAuthPayload(
|
||||||
@@ -349,6 +369,7 @@ class GatewaySession(
|
|||||||
scopes = options.scopes,
|
scopes = options.scopes,
|
||||||
signedAtMs = signedAtMs,
|
signedAtMs = signedAtMs,
|
||||||
token = if (authToken.isNotEmpty()) authToken else null,
|
token = if (authToken.isNotEmpty()) authToken else null,
|
||||||
|
nonce = connectNonce,
|
||||||
)
|
)
|
||||||
val signature = identityStore.signPayload(payload, identity)
|
val signature = identityStore.signPayload(payload, identity)
|
||||||
val publicKey = identityStore.publicKeyBase64Url(identity)
|
val publicKey = identityStore.publicKeyBase64Url(identity)
|
||||||
@@ -359,6 +380,9 @@ class GatewaySession(
|
|||||||
put("publicKey", JsonPrimitive(publicKey))
|
put("publicKey", JsonPrimitive(publicKey))
|
||||||
put("signature", JsonPrimitive(signature))
|
put("signature", JsonPrimitive(signature))
|
||||||
put("signedAt", JsonPrimitive(signedAtMs))
|
put("signedAt", JsonPrimitive(signedAtMs))
|
||||||
|
if (!connectNonce.isNullOrBlank()) {
|
||||||
|
put("nonce", JsonPrimitive(connectNonce))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
@@ -416,6 +440,13 @@ class GatewaySession(
|
|||||||
val event = frame["event"].asStringOrNull() ?: return
|
val event = frame["event"].asStringOrNull() ?: return
|
||||||
val payloadJson =
|
val payloadJson =
|
||||||
frame["payload"]?.let { it.toString() } ?: frame["payloadJSON"].asStringOrNull()
|
frame["payload"]?.let { it.toString() } ?: frame["payloadJSON"].asStringOrNull()
|
||||||
|
if (event == "connect.challenge") {
|
||||||
|
val nonce = extractConnectNonce(payloadJson)
|
||||||
|
if (!connectNonceDeferred.isCompleted) {
|
||||||
|
connectNonceDeferred.complete(nonce)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
if (event == "node.invoke.request" && payloadJson != null && onInvoke != null) {
|
if (event == "node.invoke.request" && payloadJson != null && onInvoke != null) {
|
||||||
handleInvokeEvent(payloadJson)
|
handleInvokeEvent(payloadJson)
|
||||||
return
|
return
|
||||||
@@ -423,6 +454,21 @@ class GatewaySession(
|
|||||||
onEvent(event, payloadJson)
|
onEvent(event, payloadJson)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private suspend fun awaitConnectNonce(): String? {
|
||||||
|
if (isLoopbackHost(endpoint.host)) return null
|
||||||
|
return try {
|
||||||
|
withTimeout(2_000) { connectNonceDeferred.await() }
|
||||||
|
} catch (_: Throwable) {
|
||||||
|
null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun extractConnectNonce(payloadJson: String?): String? {
|
||||||
|
if (payloadJson.isNullOrBlank()) return null
|
||||||
|
val obj = parseJsonOrNull(payloadJson)?.asObjectOrNull() ?: return null
|
||||||
|
return obj["nonce"].asStringOrNull()
|
||||||
|
}
|
||||||
|
|
||||||
private fun handleInvokeEvent(payloadJson: String) {
|
private fun handleInvokeEvent(payloadJson: String) {
|
||||||
val payload =
|
val payload =
|
||||||
try {
|
try {
|
||||||
@@ -544,19 +590,26 @@ class GatewaySession(
|
|||||||
scopes: List<String>,
|
scopes: List<String>,
|
||||||
signedAtMs: Long,
|
signedAtMs: Long,
|
||||||
token: String?,
|
token: String?,
|
||||||
|
nonce: String?,
|
||||||
): String {
|
): String {
|
||||||
val scopeString = scopes.joinToString(",")
|
val scopeString = scopes.joinToString(",")
|
||||||
val authToken = token.orEmpty()
|
val authToken = token.orEmpty()
|
||||||
return listOf(
|
val version = if (nonce.isNullOrBlank()) "v1" else "v2"
|
||||||
"v1",
|
val parts =
|
||||||
deviceId,
|
mutableListOf(
|
||||||
clientId,
|
version,
|
||||||
clientMode,
|
deviceId,
|
||||||
role,
|
clientId,
|
||||||
scopeString,
|
clientMode,
|
||||||
signedAtMs.toString(),
|
role,
|
||||||
authToken,
|
scopeString,
|
||||||
).joinToString("|")
|
signedAtMs.toString(),
|
||||||
|
authToken,
|
||||||
|
)
|
||||||
|
if (!nonce.isNullOrBlank()) {
|
||||||
|
parts.add(nonce)
|
||||||
|
}
|
||||||
|
return parts.joinToString("|")
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun normalizeCanvasHostUrl(raw: String?, endpoint: GatewayEndpoint): String? {
|
private fun normalizeCanvasHostUrl(raw: String?, endpoint: GatewayEndpoint): String? {
|
||||||
|
|||||||
@@ -84,5 +84,7 @@ private fun sha256Hex(data: ByteArray): String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun normalizeFingerprint(raw: String): String {
|
private fun normalizeFingerprint(raw: String): String {
|
||||||
return raw.lowercase().filter { it in '0'..'9' || it in 'a'..'f' }
|
val stripped = raw.trim()
|
||||||
|
.replace(Regex("^sha-?256\\s*:?\\s*", RegexOption.IGNORE_CASE), "")
|
||||||
|
return stripped.lowercase().filter { it in '0'..'9' || it in 'a'..'f' }
|
||||||
}
|
}
|
||||||
@@ -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.11-4</string>
|
<string>2026.1.20</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>202601113</string>
|
<string>20260120</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-gateway._tcp</string>
|
<string>_clawdbot-gw._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>
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
Sources/Bridge/BridgeClient.swift
|
Sources/Gateway/GatewayConnectionController.swift
|
||||||
Sources/Bridge/BridgeConnectionController.swift
|
Sources/Gateway/GatewayDiscoveryDebugLogView.swift
|
||||||
Sources/Bridge/BridgeDiscoveryDebugLogView.swift
|
Sources/Gateway/GatewayDiscoveryModel.swift
|
||||||
Sources/Bridge/BridgeDiscoveryModel.swift
|
Sources/Gateway/GatewaySettingsStore.swift
|
||||||
Sources/Bridge/BridgeEndpointID.swift
|
Sources/Gateway/KeychainStore.swift
|
||||||
Sources/Bridge/BridgeSession.swift
|
|
||||||
Sources/Bridge/BridgeSettingsStore.swift
|
|
||||||
Sources/Bridge/KeychainStore.swift
|
|
||||||
Sources/Camera/CameraController.swift
|
Sources/Camera/CameraController.swift
|
||||||
Sources/Chat/ChatSheet.swift
|
Sources/Chat/ChatSheet.swift
|
||||||
Sources/Chat/IOSBridgeChatTransport.swift
|
Sources/Chat/IOSGatewayChatTransport.swift
|
||||||
Sources/ClawdbotApp.swift
|
Sources/ClawdbotApp.swift
|
||||||
|
Sources/Location/LocationService.swift
|
||||||
Sources/Model/NodeAppModel.swift
|
Sources/Model/NodeAppModel.swift
|
||||||
Sources/RootCanvas.swift
|
Sources/RootCanvas.swift
|
||||||
Sources/RootTabs.swift
|
Sources/RootTabs.swift
|
||||||
@@ -17,6 +15,7 @@ Sources/Screen/ScreenController.swift
|
|||||||
Sources/Screen/ScreenRecordService.swift
|
Sources/Screen/ScreenRecordService.swift
|
||||||
Sources/Screen/ScreenTab.swift
|
Sources/Screen/ScreenTab.swift
|
||||||
Sources/Screen/ScreenWebView.swift
|
Sources/Screen/ScreenWebView.swift
|
||||||
|
Sources/SessionKey.swift
|
||||||
Sources/Settings/SettingsNetworkingHelpers.swift
|
Sources/Settings/SettingsNetworkingHelpers.swift
|
||||||
Sources/Settings/SettingsTab.swift
|
Sources/Settings/SettingsTab.swift
|
||||||
Sources/Settings/VoiceWakeWordsSettingsView.swift
|
Sources/Settings/VoiceWakeWordsSettingsView.swift
|
||||||
|
|||||||
@@ -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-gateway._tcp",
|
type: "_clawdbot-gw._tcp",
|
||||||
domain: "local.",
|
domain: "local.",
|
||||||
interface: nil)
|
interface: nil)
|
||||||
|
|
||||||
#expect(GatewayEndpointID.stableID(endpoint) == "_clawdbot-gateway._tcp|local.|Clawdbot Gateway Node")
|
#expect(GatewayEndpointID.stableID(endpoint) == "_clawdbot-gw._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-gateway._tcp",
|
type: "_clawdbot-gw._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.11-4</string>
|
<string>2026.1.20</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>202601113</string>
|
<string>20260120</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
@@ -81,8 +81,8 @@ targets:
|
|||||||
properties:
|
properties:
|
||||||
CFBundleDisplayName: Clawdbot
|
CFBundleDisplayName: Clawdbot
|
||||||
CFBundleIconName: AppIcon
|
CFBundleIconName: AppIcon
|
||||||
CFBundleShortVersionString: "2026.1.9"
|
CFBundleShortVersionString: "2026.1.20"
|
||||||
CFBundleVersion: "20260109"
|
CFBundleVersion: "20260120"
|
||||||
UILaunchScreen: {}
|
UILaunchScreen: {}
|
||||||
UIApplicationSceneManifest:
|
UIApplicationSceneManifest:
|
||||||
UIApplicationSupportsMultipleScenes: false
|
UIApplicationSupportsMultipleScenes: false
|
||||||
@@ -92,7 +92,7 @@ targets:
|
|||||||
NSAppTransportSecurity:
|
NSAppTransportSecurity:
|
||||||
NSAllowsArbitraryLoadsInWebContent: true
|
NSAllowsArbitraryLoadsInWebContent: true
|
||||||
NSBonjourServices:
|
NSBonjourServices:
|
||||||
- _clawdbot-gateway._tcp
|
- _clawdbot-gw._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.9"
|
CFBundleShortVersionString: "2026.1.20"
|
||||||
CFBundleVersion: "20260109"
|
CFBundleVersion: "20260120"
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"originHash" : "4ed05a95fa9feada29b97f81b3194392e59a0c7b9edf24851f922bc2b72b0438",
|
"originHash" : "550d4ea41d4bb2546b99a7bfa1c5cba7e28a13862bc226727ea7426c61555a33",
|
||||||
"pins" : [
|
"pins" : [
|
||||||
{
|
{
|
||||||
"identity" : "axorcist",
|
"identity" : "axorcist",
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ 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-discovery", targets: ["ClawdbotDiscoveryCLI"]),
|
.executable(name: "clawdbot-mac", targets: ["ClawdbotMacCLI"]),
|
||||||
.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"),
|
||||||
@@ -67,20 +66,13 @@ let package = Package(
|
|||||||
.enableUpcomingFeature("StrictConcurrency"),
|
.enableUpcomingFeature("StrictConcurrency"),
|
||||||
]),
|
]),
|
||||||
.executableTarget(
|
.executableTarget(
|
||||||
name: "ClawdbotDiscoveryCLI",
|
name: "ClawdbotMacCLI",
|
||||||
dependencies: [
|
dependencies: [
|
||||||
"ClawdbotDiscovery",
|
"ClawdbotDiscovery",
|
||||||
],
|
.product(name: "ClawdbotKit", package: "ClawdbotKit"),
|
||||||
path: "Sources/ClawdbotDiscoveryCLI",
|
|
||||||
swiftSettings: [
|
|
||||||
.enableUpcomingFeature("StrictConcurrency"),
|
|
||||||
]),
|
|
||||||
.executableTarget(
|
|
||||||
name: "ClawdbotWizardCLI",
|
|
||||||
dependencies: [
|
|
||||||
.product(name: "ClawdbotProtocol", package: "ClawdbotKit"),
|
.product(name: "ClawdbotProtocol", package: "ClawdbotKit"),
|
||||||
],
|
],
|
||||||
path: "Sources/ClawdbotWizardCLI",
|
path: "Sources/ClawdbotMacCLI",
|
||||||
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: AnyCodable]) -> String? {
|
private func prettyJSON(_ dict: [String: ClawdbotProtocol.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,7 +98,10 @@ struct AgentEventsWindow_Previews: PreviewProvider {
|
|||||||
seq: 1,
|
seq: 1,
|
||||||
stream: "tool",
|
stream: "tool",
|
||||||
ts: Date().timeIntervalSince1970 * 1000,
|
ts: Date().timeIntervalSince1970 * 1000,
|
||||||
data: ["phase": AnyCodable("start"), "name": AnyCodable("bash")],
|
data: [
|
||||||
|
"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,6 +1,11 @@
|
|||||||
|
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 }
|
||||||
@@ -20,3 +25,23 @@ 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -426,34 +426,17 @@ extension ChannelsSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func resolveChannelTitle(_ id: String) -> String {
|
private func resolveChannelTitle(_ id: String) -> String {
|
||||||
if let label = self.store.snapshot?.channelLabels[id], !label.isEmpty {
|
let label = self.store.resolveChannelLabel(id)
|
||||||
return label
|
if label != id { return label }
|
||||||
}
|
|
||||||
return id.prefix(1).uppercased() + id.dropFirst()
|
return id.prefix(1).uppercased() + id.dropFirst()
|
||||||
}
|
}
|
||||||
|
|
||||||
private func resolveChannelDetailTitle(_ id: String) -> String {
|
private func resolveChannelDetailTitle(_ id: String) -> String {
|
||||||
switch id {
|
self.store.resolveChannelDetailLabel(id)
|
||||||
case "whatsapp": "WhatsApp Web"
|
|
||||||
case "telegram": "Telegram Bot"
|
|
||||||
case "discord": "Discord Bot"
|
|
||||||
case "slack": "Slack Bot"
|
|
||||||
case "signal": "Signal REST"
|
|
||||||
case "imessage": "iMessage"
|
|
||||||
default: self.resolveChannelTitle(id)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func resolveChannelSystemImage(_ id: String) -> String {
|
private func resolveChannelSystemImage(_ id: String) -> String {
|
||||||
switch id {
|
self.store.resolveChannelSystemImage(id)
|
||||||
case "whatsapp": "message"
|
|
||||||
case "telegram": "paperplane"
|
|
||||||
case "discord": "bubble.left.and.bubble.right"
|
|
||||||
case "slack": "number"
|
|
||||||
case "signal": "antenna.radiowaves.left.and.right"
|
|
||||||
case "imessage": "message.fill"
|
|
||||||
default: "message"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func channelStatusDictionary(_ id: String) -> [String: AnyCodable]? {
|
private func channelStatusDictionary(_ id: String) -> [String: AnyCodable]? {
|
||||||
|
|||||||
@@ -153,9 +153,19 @@ struct ChannelsStatusSnapshot: Codable {
|
|||||||
let application: AnyCodable?
|
let application: AnyCodable?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct ChannelUiMetaEntry: Codable {
|
||||||
|
let id: String
|
||||||
|
let label: String
|
||||||
|
let detailLabel: String
|
||||||
|
let systemImage: String?
|
||||||
|
}
|
||||||
|
|
||||||
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 channelSystemImages: [String: String]?
|
||||||
|
let channelMeta: [ChannelUiMetaEntry]?
|
||||||
let channels: [String: AnyCodable]
|
let channels: [String: AnyCodable]
|
||||||
let channelAccounts: [String: [ChannelAccountSnapshot]]
|
let channelAccounts: [String: [ChannelAccountSnapshot]]
|
||||||
let channelDefaultAccountId: [String: String]
|
let channelDefaultAccountId: [String: String]
|
||||||
@@ -217,6 +227,47 @@ final class ChannelsStore {
|
|||||||
var configRoot: [String: Any] = [:]
|
var configRoot: [String: Any] = [:]
|
||||||
var configLoaded = false
|
var configLoaded = false
|
||||||
|
|
||||||
|
func channelMetaEntry(_ id: String) -> ChannelsStatusSnapshot.ChannelUiMetaEntry? {
|
||||||
|
self.snapshot?.channelMeta?.first(where: { $0.id == id })
|
||||||
|
}
|
||||||
|
|
||||||
|
func resolveChannelLabel(_ id: String) -> String {
|
||||||
|
if let meta = self.channelMetaEntry(id), !meta.label.isEmpty {
|
||||||
|
return meta.label
|
||||||
|
}
|
||||||
|
if let label = self.snapshot?.channelLabels[id], !label.isEmpty {
|
||||||
|
return label
|
||||||
|
}
|
||||||
|
return id
|
||||||
|
}
|
||||||
|
|
||||||
|
func resolveChannelDetailLabel(_ id: String) -> String {
|
||||||
|
if let meta = self.channelMetaEntry(id), !meta.detailLabel.isEmpty {
|
||||||
|
return meta.detailLabel
|
||||||
|
}
|
||||||
|
if let detail = self.snapshot?.channelDetailLabels?[id], !detail.isEmpty {
|
||||||
|
return detail
|
||||||
|
}
|
||||||
|
return self.resolveChannelLabel(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
func resolveChannelSystemImage(_ id: String) -> String {
|
||||||
|
if let meta = self.channelMetaEntry(id), let symbol = meta.systemImage, !symbol.isEmpty {
|
||||||
|
return symbol
|
||||||
|
}
|
||||||
|
if let symbol = self.snapshot?.channelSystemImages?[id], !symbol.isEmpty {
|
||||||
|
return symbol
|
||||||
|
}
|
||||||
|
return "message"
|
||||||
|
}
|
||||||
|
|
||||||
|
func orderedChannelIds() -> [String] {
|
||||||
|
if let meta = self.snapshot?.channelMeta, !meta.isEmpty {
|
||||||
|
return meta.map(\.id)
|
||||||
|
}
|
||||||
|
return self.snapshot?.channelOrder ?? []
|
||||||
|
}
|
||||||
|
|
||||||
init(isPreview: Bool = ProcessInfo.processInfo.isPreview) {
|
init(isPreview: Bool = ProcessInfo.processInfo.isPreview) {
|
||||||
self.isPreview = isPreview
|
self.isPreview = isPreview
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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: AnyCodable]
|
let data: [String: ClawdbotProtocol.AnyCodable]
|
||||||
let summary: String?
|
let summary: String?
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,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: AnyCodable]()) {
|
let rawParams = params?.reduce(into: [String: ClawdbotKit.AnyCodable]()) {
|
||||||
$0[$1.key] = AnyCodable($1.value.base)
|
$0[$1.key] = ClawdbotKit.AnyCodable($1.value.base)
|
||||||
}
|
}
|
||||||
let data = try await GatewayConnection.shared.request(
|
let data = try await GatewayConnection.shared.request(
|
||||||
method: method,
|
method: method,
|
||||||
@@ -346,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 = event.data["args"]?.value as? [String: AnyCodable]
|
let args = Self.bridgeToProtocolArgs(event.data["args"])
|
||||||
WorkActivityStore.shared.handleTool(
|
WorkActivityStore.shared.handleTool(
|
||||||
sessionKey: sessionKey,
|
sessionKey: sessionKey,
|
||||||
phase: phase,
|
phase: phase,
|
||||||
@@ -357,6 +357,27 @@ 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 {
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ extension CronJobEditor {
|
|||||||
self.thinking = thinking ?? ""
|
self.thinking = thinking ?? ""
|
||||||
self.timeoutSeconds = timeoutSeconds.map(String.init) ?? ""
|
self.timeoutSeconds = timeoutSeconds.map(String.init) ?? ""
|
||||||
self.deliver = deliver ?? false
|
self.deliver = deliver ?? false
|
||||||
self.channel = GatewayAgentChannel(raw: channel)
|
let trimmed = (channel ?? "").trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
|
self.channel = trimmed.isEmpty ? "last" : trimmed
|
||||||
self.to = to ?? ""
|
self.to = to ?? ""
|
||||||
self.bestEffortDeliver = bestEffortDeliver ?? false
|
self.bestEffortDeliver = bestEffortDeliver ?? false
|
||||||
}
|
}
|
||||||
@@ -210,7 +211,8 @@ extension CronJobEditor {
|
|||||||
if let n = Int(self.timeoutSeconds), n > 0 { payload["timeoutSeconds"] = n }
|
if let n = Int(self.timeoutSeconds), n > 0 { payload["timeoutSeconds"] = n }
|
||||||
payload["deliver"] = self.deliver
|
payload["deliver"] = self.deliver
|
||||||
if self.deliver {
|
if self.deliver {
|
||||||
payload["channel"] = self.channel.rawValue
|
let trimmed = self.channel.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
|
payload["channel"] = trimmed.isEmpty ? "last" : trimmed
|
||||||
let to = self.to.trimmingCharacters(in: .whitespacesAndNewlines)
|
let to = self.to.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
if !to.isEmpty { payload["to"] = to }
|
if !to.isEmpty { payload["to"] = to }
|
||||||
payload["bestEffortDeliver"] = self.bestEffortDeliver
|
payload["bestEffortDeliver"] = self.bestEffortDeliver
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ extension CronJobEditor {
|
|||||||
self.payloadKind = .agentTurn
|
self.payloadKind = .agentTurn
|
||||||
self.agentMessage = "Run diagnostic"
|
self.agentMessage = "Run diagnostic"
|
||||||
self.deliver = true
|
self.deliver = true
|
||||||
self.channel = .last
|
self.channel = "last"
|
||||||
self.to = "+15551230000"
|
self.to = "+15551230000"
|
||||||
self.thinking = "low"
|
self.thinking = "low"
|
||||||
self.timeoutSeconds = "90"
|
self.timeoutSeconds = "90"
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import ClawdbotProtocol
|
import ClawdbotProtocol
|
||||||
|
import Observation
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct CronJobEditor: View {
|
struct CronJobEditor: View {
|
||||||
let job: CronJob?
|
let job: CronJob?
|
||||||
@Binding var isSaving: Bool
|
@Binding var isSaving: Bool
|
||||||
@Binding var error: String?
|
@Binding var error: String?
|
||||||
|
@Bindable var channelsStore: ChannelsStore
|
||||||
let onCancel: () -> Void
|
let onCancel: () -> Void
|
||||||
let onSave: ([String: AnyCodable]) -> Void
|
let onSave: ([String: AnyCodable]) -> Void
|
||||||
|
|
||||||
@@ -45,13 +47,29 @@ struct CronJobEditor: View {
|
|||||||
@State var systemEventText: String = ""
|
@State var systemEventText: String = ""
|
||||||
@State var agentMessage: String = ""
|
@State var agentMessage: String = ""
|
||||||
@State var deliver: Bool = false
|
@State var deliver: Bool = false
|
||||||
@State var channel: GatewayAgentChannel = .last
|
@State var channel: String = "last"
|
||||||
@State var to: String = ""
|
@State var to: String = ""
|
||||||
@State var thinking: String = ""
|
@State var thinking: String = ""
|
||||||
@State var timeoutSeconds: String = ""
|
@State var timeoutSeconds: String = ""
|
||||||
@State var bestEffortDeliver: Bool = false
|
@State var bestEffortDeliver: Bool = false
|
||||||
@State var postPrefix: String = "Cron"
|
@State var postPrefix: String = "Cron"
|
||||||
|
|
||||||
|
var channelOptions: [String] {
|
||||||
|
let ordered = self.channelsStore.orderedChannelIds()
|
||||||
|
var options = ["last"] + ordered
|
||||||
|
let trimmed = self.channel.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
|
if !trimmed.isEmpty, !options.contains(trimmed) {
|
||||||
|
options.append(trimmed)
|
||||||
|
}
|
||||||
|
var seen = Set<String>()
|
||||||
|
return options.filter { seen.insert($0).inserted }
|
||||||
|
}
|
||||||
|
|
||||||
|
func channelLabel(for id: String) -> String {
|
||||||
|
if id == "last" { return "last" }
|
||||||
|
return self.channelsStore.resolveChannelLabel(id)
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading, spacing: 16) {
|
VStack(alignment: .leading, spacing: 16) {
|
||||||
VStack(alignment: .leading, spacing: 6) {
|
VStack(alignment: .leading, spacing: 6) {
|
||||||
@@ -333,13 +351,9 @@ struct CronJobEditor: View {
|
|||||||
GridRow {
|
GridRow {
|
||||||
self.gridLabel("Channel")
|
self.gridLabel("Channel")
|
||||||
Picker("", selection: self.$channel) {
|
Picker("", selection: self.$channel) {
|
||||||
Text("last").tag(GatewayAgentChannel.last)
|
ForEach(self.channelOptions, id: \.self) { channel in
|
||||||
Text("whatsapp").tag(GatewayAgentChannel.whatsapp)
|
Text(self.channelLabel(for: channel)).tag(channel)
|
||||||
Text("telegram").tag(GatewayAgentChannel.telegram)
|
}
|
||||||
Text("discord").tag(GatewayAgentChannel.discord)
|
|
||||||
Text("slack").tag(GatewayAgentChannel.slack)
|
|
||||||
Text("signal").tag(GatewayAgentChannel.signal)
|
|
||||||
Text("imessage").tag(GatewayAgentChannel.imessage)
|
|
||||||
}
|
}
|
||||||
.labelsHidden()
|
.labelsHidden()
|
||||||
.pickerStyle(.segmented)
|
.pickerStyle(.segmented)
|
||||||
|
|||||||
@@ -8,13 +8,20 @@ extension CronSettings {
|
|||||||
self.content
|
self.content
|
||||||
Spacer(minLength: 0)
|
Spacer(minLength: 0)
|
||||||
}
|
}
|
||||||
.onAppear { self.store.start() }
|
.onAppear {
|
||||||
.onDisappear { self.store.stop() }
|
self.store.start()
|
||||||
|
self.channelsStore.start()
|
||||||
|
}
|
||||||
|
.onDisappear {
|
||||||
|
self.store.stop()
|
||||||
|
self.channelsStore.stop()
|
||||||
|
}
|
||||||
.sheet(isPresented: self.$showEditor) {
|
.sheet(isPresented: self.$showEditor) {
|
||||||
CronJobEditor(
|
CronJobEditor(
|
||||||
job: self.editingJob,
|
job: self.editingJob,
|
||||||
isSaving: self.$isSaving,
|
isSaving: self.$isSaving,
|
||||||
error: self.$editorError,
|
error: self.$editorError,
|
||||||
|
channelsStore: self.channelsStore,
|
||||||
onCancel: {
|
onCancel: {
|
||||||
self.showEditor = false
|
self.showEditor = false
|
||||||
self.editingJob = nil
|
self.editingJob = nil
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ struct CronSettings_Previews: PreviewProvider {
|
|||||||
durationMs: 1234,
|
durationMs: 1234,
|
||||||
nextRunAtMs: nil),
|
nextRunAtMs: nil),
|
||||||
]
|
]
|
||||||
return CronSettings(store: store)
|
return CronSettings(store: store, channelsStore: ChannelsStore(isPreview: true))
|
||||||
.frame(width: SettingsTab.windowWidth, height: SettingsTab.windowHeight)
|
.frame(width: SettingsTab.windowWidth, height: SettingsTab.windowHeight)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@ extension CronSettings {
|
|||||||
store.selectedJobId = job.id
|
store.selectedJobId = job.id
|
||||||
store.runEntries = [run]
|
store.runEntries = [run]
|
||||||
|
|
||||||
let view = CronSettings(store: store)
|
let view = CronSettings(store: store, channelsStore: ChannelsStore(isPreview: true))
|
||||||
_ = view.body
|
_ = view.body
|
||||||
_ = view.jobRow(job)
|
_ = view.jobRow(job)
|
||||||
_ = view.jobContextMenu(job)
|
_ = view.jobContextMenu(job)
|
||||||
|
|||||||
@@ -3,13 +3,15 @@ import SwiftUI
|
|||||||
|
|
||||||
struct CronSettings: View {
|
struct CronSettings: View {
|
||||||
@Bindable var store: CronJobsStore
|
@Bindable var store: CronJobsStore
|
||||||
|
@Bindable var channelsStore: ChannelsStore
|
||||||
@State var showEditor = false
|
@State var showEditor = false
|
||||||
@State var editingJob: CronJob?
|
@State var editingJob: CronJob?
|
||||||
@State var editorError: String?
|
@State var editorError: String?
|
||||||
@State var isSaving = false
|
@State var isSaving = false
|
||||||
@State var confirmDelete: CronJob?
|
@State var confirmDelete: CronJob?
|
||||||
|
|
||||||
init(store: CronJobsStore = .shared) {
|
init(store: CronJobsStore = .shared, channelsStore: ChannelsStore = .shared) {
|
||||||
self.store = store
|
self.store = store
|
||||||
|
self.channelsStore = channelsStore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -46,6 +46,7 @@ private struct ExecHostRequest: Codable {
|
|||||||
var needsScreenRecording: Bool?
|
var needsScreenRecording: Bool?
|
||||||
var agentId: String?
|
var agentId: String?
|
||||||
var sessionKey: String?
|
var sessionKey: String?
|
||||||
|
var approvalDecision: ExecApprovalDecision?
|
||||||
}
|
}
|
||||||
|
|
||||||
private struct ExecHostRunResult: Codable {
|
private struct ExecHostRunResult: Codable {
|
||||||
@@ -258,6 +259,20 @@ 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",
|
||||||
@@ -276,14 +291,93 @@ 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 ExecHostResponse(
|
return self.errorResponse(
|
||||||
type: "exec-res",
|
code: "INVALID_REQUEST",
|
||||||
id: UUID().uuidString,
|
message: "command required",
|
||||||
ok: false,
|
reason: "invalid")
|
||||||
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)
|
||||||
@@ -309,102 +403,72 @@ 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)
|
||||||
|
}
|
||||||
|
|
||||||
if security == .deny {
|
private static func requiresAsk(
|
||||||
return ExecHostResponse(
|
ask: ExecAsk,
|
||||||
type: "exec-res",
|
security: ExecSecurity,
|
||||||
id: UUID().uuidString,
|
allowlistMatch: ExecAllowlistEntry?,
|
||||||
ok: false,
|
skillAllow: Bool) -> Bool
|
||||||
payload: nil,
|
{
|
||||||
error: ExecHostError(
|
if ask == .always { return true }
|
||||||
code: "UNAVAILABLE",
|
if ask == .onMiss, security == .allowlist, allowlistMatch == nil, !skillAllow { return true }
|
||||||
message: "SYSTEM_RUN_DISABLED: security=deny",
|
return false
|
||||||
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)
|
||||||
|
}
|
||||||
|
|
||||||
let requiresAsk: Bool = {
|
private static func allowlistPattern(
|
||||||
if ask == .always { return true }
|
command: [String],
|
||||||
if ask == .onMiss, security == .allowlist, allowlistMatch == nil, !skillAllow { return true }
|
resolution: ExecCommandResolution?) -> String?
|
||||||
return false
|
{
|
||||||
}()
|
let pattern = resolution?.resolvedPath ?? resolution?.rawExecutable ?? command.first ?? ""
|
||||||
|
return pattern.isEmpty ? nil : pattern
|
||||||
|
}
|
||||||
|
|
||||||
var approvedByAsk = false
|
private static func ensureScreenRecordingAccess(_ needsScreenRecording: Bool?) async -> ExecHostResponse? {
|
||||||
if requiresAsk {
|
guard needsScreenRecording == true else { return nil }
|
||||||
let decision = ExecApprovalsPromptPresenter.prompt(
|
let authorized = await PermissionManager
|
||||||
ExecApprovalPromptRequest(
|
.status([.screenRecording])[.screenRecording] ?? false
|
||||||
command: displayCommand,
|
if authorized { return nil }
|
||||||
cwd: request.cwd,
|
return self.errorResponse(
|
||||||
host: "node",
|
code: "UNAVAILABLE",
|
||||||
security: security.rawValue,
|
message: "PERMISSION_MISSING: screenRecording",
|
||||||
ask: ask.rawValue,
|
reason: "permission:screenRecording")
|
||||||
agentId: trimmedAgent,
|
}
|
||||||
resolvedPath: resolution?.resolvedPath))
|
|
||||||
|
|
||||||
switch decision {
|
private static func runCommand(
|
||||||
case .deny:
|
command: [String],
|
||||||
return ExecHostResponse(
|
cwd: String?,
|
||||||
type: "exec-res",
|
env: [String: String]?,
|
||||||
id: UUID().uuidString,
|
timeoutMs: Int?) async -> ExecHostResponse
|
||||||
ok: false,
|
{
|
||||||
payload: nil,
|
let timeoutSec = timeoutMs.flatMap { Double($0) / 1000.0 }
|
||||||
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 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: request.cwd,
|
cwd: cwd,
|
||||||
env: env,
|
env: env,
|
||||||
timeout: timeoutSec)
|
timeout: timeoutSec)
|
||||||
}.value
|
}.value
|
||||||
@@ -415,7 +479,24 @@ private enum ExecHostExecutor {
|
|||||||
stdout: result.stdout,
|
stdout: result.stdout,
|
||||||
stderr: result.stderr,
|
stderr: result.stderr,
|
||||||
error: result.errorMessage)
|
error: result.errorMessage)
|
||||||
return ExecHostResponse(
|
return self.successResponse(payload)
|
||||||
|
}
|
||||||
|
|
||||||
|
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,
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ enum GatewayAgentChannel: String, Codable, CaseIterable, Sendable {
|
|||||||
case signal
|
case signal
|
||||||
case imessage
|
case imessage
|
||||||
case msteams
|
case msteams
|
||||||
|
case bluebubbles
|
||||||
case webchat
|
case webchat
|
||||||
|
|
||||||
init(raw: String?) {
|
init(raw: String?) {
|
||||||
@@ -147,6 +148,27 @@ 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
|
||||||
@@ -243,9 +265,9 @@ actor GatewayConnection {
|
|||||||
return trimmed.isEmpty ? nil : trimmed
|
return trimmed.isEmpty ? nil : trimmed
|
||||||
}
|
}
|
||||||
|
|
||||||
private func sessionDefaultString(_ defaults: [String: AnyCodable]?, key: String) -> String {
|
private func sessionDefaultString(_ defaults: [String: ClawdbotProtocol.AnyCodable]?, key: String) -> String {
|
||||||
(defaults?[key]?.stringValue ?? "")
|
let raw = defaults?[key]?.value as? String
|
||||||
.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
|
return (raw ?? "").trimmingCharacters(in: CharacterSet.whitespacesAndNewlines)
|
||||||
}
|
}
|
||||||
|
|
||||||
func cachedMainSessionKey() -> String? {
|
func cachedMainSessionKey() -> String? {
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ actor GatewayEndpointStore {
|
|||||||
}
|
}
|
||||||
return trimmed
|
return trimmed
|
||||||
}
|
}
|
||||||
|
|
||||||
if let configToken = self.resolveConfigToken(isRemote: isRemote, root: root),
|
if let configToken = self.resolveConfigToken(isRemote: isRemote, root: root),
|
||||||
!configToken.isEmpty
|
!configToken.isEmpty
|
||||||
{
|
{
|
||||||
@@ -177,7 +177,7 @@ actor GatewayEndpointStore {
|
|||||||
{
|
{
|
||||||
return token
|
return token
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -469,6 +469,35 @@ 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 }
|
||||||
|
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?
|
||||||
@@ -524,8 +553,10 @@ actor GatewayEndpointStore {
|
|||||||
tailscaleIP: String?) -> String
|
tailscaleIP: String?) -> String
|
||||||
{
|
{
|
||||||
switch bindMode {
|
switch bindMode {
|
||||||
case "tailnet", "auto":
|
case "tailnet":
|
||||||
tailscaleIP ?? "127.0.0.1"
|
tailscaleIP ?? "127.0.0.1"
|
||||||
|
case "auto":
|
||||||
|
"127.0.0.1"
|
||||||
case "custom":
|
case "custom":
|
||||||
customBindHost ?? "127.0.0.1"
|
customBindHost ?? "127.0.0.1"
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -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 onSubmit: (AnyCodable?) -> Void
|
let onStepSubmit: (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.onSubmit = onSubmit
|
self.onStepSubmit = 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.onSubmit(nil)
|
self.onStepSubmit(nil)
|
||||||
case "text":
|
case "text":
|
||||||
self.onSubmit(AnyCodable(self.textValue))
|
self.onStepSubmit(AnyCodable(self.textValue))
|
||||||
case "confirm":
|
case "confirm":
|
||||||
self.onSubmit(AnyCodable(self.confirmValue))
|
self.onStepSubmit(AnyCodable(self.confirmValue))
|
||||||
case "select":
|
case "select":
|
||||||
guard self.optionItems.indices.contains(self.selectedIndex) else {
|
guard self.optionItems.indices.contains(self.selectedIndex) else {
|
||||||
self.onSubmit(nil)
|
self.onStepSubmit(nil)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let option = self.optionItems[self.selectedIndex].option
|
let option = self.optionItems[self.selectedIndex].option
|
||||||
self.onSubmit(bridgeToLocal(option.value) ?? AnyCodable(option.label))
|
self.onStepSubmit(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.onSubmit(AnyCodable(values))
|
self.onStepSubmit(AnyCodable(values))
|
||||||
case "action":
|
case "action":
|
||||||
self.onSubmit(AnyCodable(true))
|
self.onStepSubmit(AnyCodable(true))
|
||||||
default:
|
default:
|
||||||
self.onSubmit(nil)
|
self.onStepSubmit(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.11-4</string>
|
<string>2026.1.20</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>202601113</string>
|
<string>202601200</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>Clawdbot</string>
|
<string>Clawdbot</string>
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
|
|||||||
@@ -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-gateway._tcp.\(domainTrimmed)"
|
let probeName = "_clawdbot-gw._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-gateway._tcp.\(domainTrimmed)"
|
let suffix = "._clawdbot-gw._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-gateway._tcp.\(domainTrimmed)"
|
let probeName = "_clawdbot-gw._tcp.\(domainTrimmed)"
|
||||||
|
|
||||||
let ips = candidates
|
let ips = candidates
|
||||||
candidates.removeAll(keepingCapacity: true)
|
candidates.removeAll(keepingCapacity: true)
|
||||||
|
|||||||
@@ -1,150 +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]
|
|
||||||
}
|
|
||||||
|
|
||||||
@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,8 +408,7 @@ extension Request: Codable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Shared transport settings
|
// Shared transport settings
|
||||||
public let controlSocketPath =
|
public let controlSocketPath = FileManager()
|
||||||
FileManager()
|
.homeDirectoryForCurrentUser
|
||||||
.homeDirectoryForCurrentUser
|
.appendingPathComponent("Library/Application Support/clawdbot/control.sock")
|
||||||
.appendingPathComponent("Library/Application Support/clawdbot/control.sock")
|
.path
|
||||||
.path
|
|
||||||
@@ -0,0 +1,306 @@
|
|||||||
|
import ClawdbotKit
|
||||||
|
import ClawdbotProtocol
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
struct ConnectOptions {
|
||||||
|
var url: String?
|
||||||
|
var token: String?
|
||||||
|
var password: String?
|
||||||
|
var mode: String?
|
||||||
|
var timeoutMs: Int = 15_000
|
||||||
|
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()
|
||||||
|
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 "--probe":
|
||||||
|
opts.probe = true
|
||||||
|
case "--url":
|
||||||
|
opts.url = self.nextValue(args, index: &i)
|
||||||
|
case "--token":
|
||||||
|
opts.token = self.nextValue(args, index: &i)
|
||||||
|
case "--password":
|
||||||
|
opts.password = self.nextValue(args, index: &i)
|
||||||
|
case "--mode":
|
||||||
|
if let value = self.nextValue(args, index: &i) {
|
||||||
|
opts.mode = value
|
||||||
|
}
|
||||||
|
case "--timeout":
|
||||||
|
if let raw = self.nextValue(args, index: &i),
|
||||||
|
let parsed = Int(raw.trimmingCharacters(in: .whitespacesAndNewlines))
|
||||||
|
{
|
||||||
|
opts.timeoutMs = max(250, parsed)
|
||||||
|
}
|
||||||
|
case "--client-id":
|
||||||
|
if let value = self.nextValue(args, index: &i) {
|
||||||
|
opts.clientId = value
|
||||||
|
}
|
||||||
|
case "--client-mode":
|
||||||
|
if let value = self.nextValue(args, index: &i) {
|
||||||
|
opts.clientMode = value
|
||||||
|
}
|
||||||
|
case "--display-name":
|
||||||
|
opts.displayName = self.nextValue(args, index: &i)
|
||||||
|
case "--role":
|
||||||
|
if let value = self.nextValue(args, index: &i) {
|
||||||
|
opts.role = value
|
||||||
|
}
|
||||||
|
case "--scopes":
|
||||||
|
if let value = self.nextValue(args, index: &i) {
|
||||||
|
opts.scopes = value.split(separator: ",").map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
|
||||||
|
.filter { !$0.isEmpty }
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
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 = "127.0.0.1"
|
||||||
|
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? {
|
||||||
|
return 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
|
||||||
|
}
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
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)")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
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
|
||||||
|
""")
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import ClawdbotKit
|
||||||
|
import ClawdbotProtocol
|
||||||
|
|
||||||
|
typealias ProtoAnyCodable = ClawdbotProtocol.AnyCodable
|
||||||
|
typealias KitAnyCodable = ClawdbotKit.AnyCodable
|
||||||
+153
-144
@@ -1,3 +1,4 @@
|
|||||||
|
import ClawdbotKit
|
||||||
import ClawdbotProtocol
|
import ClawdbotProtocol
|
||||||
import Darwin
|
import Darwin
|
||||||
import Foundation
|
import Foundation
|
||||||
@@ -48,17 +49,6 @@ 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
|
||||||
@@ -77,68 +67,56 @@ enum WizardCliError: Error, CustomStringConvertible {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@main
|
func runWizardCommand(_ args: [String]) async {
|
||||||
struct ClawdbotWizardCLI {
|
let opts = WizardCliOptions.parse(args)
|
||||||
static func main() async {
|
if opts.help {
|
||||||
let opts = WizardCliOptions.parse(Array(CommandLine.arguments.dropFirst()))
|
print("""
|
||||||
if opts.help {
|
clawdbot-mac wizard
|
||||||
printUsage()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
let config = loadGatewayConfig()
|
Usage:
|
||||||
do {
|
clawdbot-mac wizard [--url <ws://host:port>] [--token <token>] [--password <password>]
|
||||||
guard isatty(STDIN_FILENO) != 0 else {
|
[--mode <local|remote>] [--workspace <path>] [--json]
|
||||||
throw WizardCliError.gatewayError("Wizard requires an interactive TTY.")
|
|
||||||
}
|
Options:
|
||||||
let endpoint = try resolveGatewayEndpoint(opts: opts, config: config)
|
--url <url> Gateway WebSocket URL (overrides config)
|
||||||
let client = GatewayWizardClient(
|
--token <token> Gateway token (if required)
|
||||||
url: endpoint.url,
|
--password <pw> Gateway password (if required)
|
||||||
token: endpoint.token,
|
--mode <mode> Wizard mode (local|remote). Default: local
|
||||||
password: endpoint.password,
|
--workspace <path> Wizard workspace override
|
||||||
json: opts.json)
|
--json Print raw wizard responses
|
||||||
try await client.connect()
|
-h, --help Show help
|
||||||
defer { Task { await client.close() } }
|
""")
|
||||||
try await runWizard(client: client, opts: opts)
|
return
|
||||||
} catch {
|
}
|
||||||
fputs("wizard: \(error)\n", stderr)
|
|
||||||
exit(1)
|
let config = loadGatewayConfig()
|
||||||
|
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 struct GatewayEndpoint {
|
private func resolveWizardGatewayEndpoint(opts: WizardCliOptions, config: GatewayConfig) throws -> 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()
|
||||||
@@ -150,7 +128,8 @@ private func resolveGatewayEndpoint(opts: WizardCliOptions, config: GatewayConfi
|
|||||||
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
|
||||||
@@ -161,7 +140,8 @@ private func resolveGatewayEndpoint(opts: WizardCliOptions, config: GatewayConfi
|
|||||||
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? {
|
||||||
@@ -186,48 +166,11 @@ 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 {
|
||||||
|
case timeout
|
||||||
|
}
|
||||||
|
|
||||||
private let url: URL
|
private let url: URL
|
||||||
private let token: String?
|
private let token: String?
|
||||||
private let password: String?
|
private let password: String?
|
||||||
@@ -235,6 +178,7 @@ actor GatewayWizardClient {
|
|||||||
private let encoder = JSONEncoder()
|
private let encoder = JSONEncoder()
|
||||||
private let decoder = JSONDecoder()
|
private let decoder = JSONDecoder()
|
||||||
private let session = URLSession(configuration: .default)
|
private let session = URLSession(configuration: .default)
|
||||||
|
private let connectChallengeTimeoutSeconds: Double = 0.75
|
||||||
private var task: URLSessionWebSocketTask?
|
private var task: URLSessionWebSocketTask?
|
||||||
|
|
||||||
init(url: URL, token: String?, password: String?, json: Bool) {
|
init(url: URL, token: String?, password: String?, json: Bool) {
|
||||||
@@ -257,7 +201,7 @@ actor GatewayWizardClient {
|
|||||||
self.task = nil
|
self.task = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func request(method: String, params: [String: AnyCodable]?) async throws -> ResponseFrame {
|
func request(method: String, params: [String: ProtoAnyCodable]?) async throws -> ResponseFrame {
|
||||||
guard let task = self.task else {
|
guard let task = self.task else {
|
||||||
throw WizardCliError.gatewayError("gateway not connected")
|
throw WizardCliError.gatewayError("gateway not connected")
|
||||||
}
|
}
|
||||||
@@ -266,7 +210,7 @@ actor GatewayWizardClient {
|
|||||||
type: "req",
|
type: "req",
|
||||||
id: id,
|
id: id,
|
||||||
method: method,
|
method: method,
|
||||||
params: params.map { AnyCodable($0) })
|
params: params.map { ProtoAnyCodable($0) })
|
||||||
let data = try self.encoder.encode(frame)
|
let data = try self.encoder.encode(frame)
|
||||||
try await task.send(.data(data))
|
try await task.send(.data(data))
|
||||||
|
|
||||||
@@ -309,28 +253,66 @@ actor GatewayWizardClient {
|
|||||||
}
|
}
|
||||||
let osVersion = ProcessInfo.processInfo.operatingSystemVersion
|
let osVersion = ProcessInfo.processInfo.operatingSystemVersion
|
||||||
let platform = "macos \(osVersion.majorVersion).\(osVersion.minorVersion).\(osVersion.patchVersion)"
|
let platform = "macos \(osVersion.majorVersion).\(osVersion.minorVersion).\(osVersion.patchVersion)"
|
||||||
let client: [String: AnyCodable] = [
|
let clientId = "clawdbot-macos"
|
||||||
"id": AnyCodable("clawdbot-macos"),
|
let clientMode = "ui"
|
||||||
"displayName": AnyCodable(Host.current().localizedName ?? "Clawdbot macOS Wizard CLI"),
|
let role = "operator"
|
||||||
"version": AnyCodable("dev"),
|
let scopes: [String] = []
|
||||||
"platform": AnyCodable(platform),
|
let client: [String: ProtoAnyCodable] = [
|
||||||
"deviceFamily": AnyCodable("Mac"),
|
"id": ProtoAnyCodable(clientId),
|
||||||
"mode": AnyCodable("ui"),
|
"displayName": ProtoAnyCodable(Host.current().localizedName ?? "Clawdbot macOS Wizard CLI"),
|
||||||
"instanceId": AnyCodable(UUID().uuidString),
|
"version": ProtoAnyCodable("dev"),
|
||||||
|
"platform": ProtoAnyCodable(platform),
|
||||||
|
"deviceFamily": ProtoAnyCodable("Mac"),
|
||||||
|
"mode": ProtoAnyCodable(clientMode),
|
||||||
|
"instanceId": ProtoAnyCodable(UUID().uuidString),
|
||||||
]
|
]
|
||||||
|
|
||||||
var params: [String: AnyCodable] = [
|
var params: [String: ProtoAnyCodable] = [
|
||||||
"minProtocol": AnyCodable(GATEWAY_PROTOCOL_VERSION),
|
"minProtocol": ProtoAnyCodable(GATEWAY_PROTOCOL_VERSION),
|
||||||
"maxProtocol": AnyCodable(GATEWAY_PROTOCOL_VERSION),
|
"maxProtocol": ProtoAnyCodable(GATEWAY_PROTOCOL_VERSION),
|
||||||
"client": AnyCodable(client),
|
"client": ProtoAnyCodable(client),
|
||||||
"caps": AnyCodable([String]()),
|
"caps": ProtoAnyCodable([String]()),
|
||||||
"locale": AnyCodable(Locale.preferredLanguages.first ?? Locale.current.identifier),
|
"locale": ProtoAnyCodable(Locale.preferredLanguages.first ?? Locale.current.identifier),
|
||||||
"userAgent": AnyCodable(ProcessInfo.processInfo.operatingSystemVersionString),
|
"userAgent": ProtoAnyCodable(ProcessInfo.processInfo.operatingSystemVersionString),
|
||||||
|
"role": ProtoAnyCodable(role),
|
||||||
|
"scopes": ProtoAnyCodable(scopes),
|
||||||
]
|
]
|
||||||
if let token = self.token {
|
if let token = self.token {
|
||||||
params["auth"] = AnyCodable(["token": AnyCodable(token)])
|
params["auth"] = ProtoAnyCodable(["token": ProtoAnyCodable(token)])
|
||||||
} else if let password = self.password {
|
} else if let password = self.password {
|
||||||
params["auth"] = AnyCodable(["password": AnyCodable(password)])
|
params["auth"] = ProtoAnyCodable(["password": ProtoAnyCodable(password)])
|
||||||
|
}
|
||||||
|
let connectNonce = try await self.waitForConnectChallenge()
|
||||||
|
let identity = DeviceIdentityStore.loadOrCreate()
|
||||||
|
let signedAtMs = Int(Date().timeIntervalSince1970 * 1000)
|
||||||
|
let scopesValue = scopes.joined(separator: ",")
|
||||||
|
var payloadParts = [
|
||||||
|
connectNonce == nil ? "v1" : "v2",
|
||||||
|
identity.deviceId,
|
||||||
|
clientId,
|
||||||
|
clientMode,
|
||||||
|
role,
|
||||||
|
scopesValue,
|
||||||
|
String(signedAtMs),
|
||||||
|
self.token ?? "",
|
||||||
|
]
|
||||||
|
if let connectNonce {
|
||||||
|
payloadParts.append(connectNonce)
|
||||||
|
}
|
||||||
|
let payload = payloadParts.joined(separator: "|")
|
||||||
|
if let signature = DeviceIdentityStore.signPayload(payload, identity: identity),
|
||||||
|
let publicKey = DeviceIdentityStore.publicKeyBase64Url(identity)
|
||||||
|
{
|
||||||
|
var device: [String: ProtoAnyCodable] = [
|
||||||
|
"id": ProtoAnyCodable(identity.deviceId),
|
||||||
|
"publicKey": ProtoAnyCodable(publicKey),
|
||||||
|
"signature": ProtoAnyCodable(signature),
|
||||||
|
"signedAt": ProtoAnyCodable(signedAtMs),
|
||||||
|
]
|
||||||
|
if let connectNonce {
|
||||||
|
device["nonce"] = ProtoAnyCodable(connectNonce)
|
||||||
|
}
|
||||||
|
params["device"] = ProtoAnyCodable(device)
|
||||||
}
|
}
|
||||||
|
|
||||||
let reqId = UUID().uuidString
|
let reqId = UUID().uuidString
|
||||||
@@ -338,31 +320,58 @@ actor GatewayWizardClient {
|
|||||||
type: "req",
|
type: "req",
|
||||||
id: reqId,
|
id: reqId,
|
||||||
method: "connect",
|
method: "connect",
|
||||||
params: AnyCodable(params))
|
params: ProtoAnyCodable(params))
|
||||||
let data = try self.encoder.encode(frame)
|
let data = try self.encoder.encode(frame)
|
||||||
try await task.send(.data(data))
|
try await task.send(.data(data))
|
||||||
|
|
||||||
let message = try await task.receive()
|
while true {
|
||||||
let frameResponse = try decodeFrame(message)
|
let message = try await task.receive()
|
||||||
guard case let .res(res) = frameResponse, res.id == reqId else {
|
let frameResponse = try decodeFrame(message)
|
||||||
throw WizardCliError.gatewayError("connect failed (unexpected response)")
|
if case let .res(res) = frameResponse, res.id == reqId {
|
||||||
|
if res.ok == false {
|
||||||
|
let msg = (res.error?["message"]?.value as? String) ?? "gateway connect failed"
|
||||||
|
throw WizardCliError.gatewayError(msg)
|
||||||
|
}
|
||||||
|
_ = try self.decodePayload(res, as: HelloOk.self)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if res.ok == false {
|
}
|
||||||
let msg = (res.error?["message"]?.value as? String) ?? "gateway connect failed"
|
|
||||||
throw WizardCliError.gatewayError(msg)
|
private func waitForConnectChallenge() async throws -> String? {
|
||||||
|
guard let task = self.task else { return nil }
|
||||||
|
do {
|
||||||
|
return try await AsyncTimeout.withTimeout(
|
||||||
|
seconds: self.connectChallengeTimeoutSeconds,
|
||||||
|
onTimeout: { ConnectChallengeError.timeout },
|
||||||
|
operation: {
|
||||||
|
while true {
|
||||||
|
let message = try await task.receive()
|
||||||
|
let frame = try await self.decodeFrame(message)
|
||||||
|
if case let .event(evt) = frame, evt.event == "connect.challenge" {
|
||||||
|
if let payload = evt.payload?.value as? [String: ProtoAnyCodable],
|
||||||
|
let nonce = payload["nonce"]?.value as? String
|
||||||
|
{
|
||||||
|
return nonce
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch {
|
||||||
|
if error is ConnectChallengeError { return nil }
|
||||||
|
throw error
|
||||||
}
|
}
|
||||||
_ = try self.decodePayload(res, as: HelloOk.self)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func runWizard(client: GatewayWizardClient, opts: WizardCliOptions) async throws {
|
private func runWizard(client: GatewayWizardClient, opts: WizardCliOptions) async throws {
|
||||||
var params: [String: AnyCodable] = [:]
|
var params: [String: ProtoAnyCodable] = [:]
|
||||||
let mode = opts.mode.trimmingCharacters(in: .whitespacesAndNewlines).lowercased()
|
let mode = opts.mode.trimmingCharacters(in: .whitespacesAndNewlines).lowercased()
|
||||||
if mode == "local" || mode == "remote" {
|
if mode == "local" || mode == "remote" {
|
||||||
params["mode"] = AnyCodable(mode)
|
params["mode"] = ProtoAnyCodable(mode)
|
||||||
}
|
}
|
||||||
if let workspace = opts.workspace?.trimmingCharacters(in: .whitespacesAndNewlines), !workspace.isEmpty {
|
if let workspace = opts.workspace?.trimmingCharacters(in: .whitespacesAndNewlines), !workspace.isEmpty {
|
||||||
params["workspace"] = AnyCodable(workspace)
|
params["workspace"] = ProtoAnyCodable(workspace)
|
||||||
}
|
}
|
||||||
|
|
||||||
let startResponse = try await client.request(method: "wizard.start", params: params)
|
let startResponse = try await client.request(method: "wizard.start", params: params)
|
||||||
@@ -395,17 +404,17 @@ private func runWizard(client: GatewayWizardClient, opts: WizardCliOptions) asyn
|
|||||||
|
|
||||||
if let step = decodeWizardStep(nextResult.step) {
|
if let step = decodeWizardStep(nextResult.step) {
|
||||||
let answer = try promptAnswer(for: step)
|
let answer = try promptAnswer(for: step)
|
||||||
var answerPayload: [String: AnyCodable] = [
|
var answerPayload: [String: ProtoAnyCodable] = [
|
||||||
"stepId": AnyCodable(step.id),
|
"stepId": ProtoAnyCodable(step.id),
|
||||||
]
|
]
|
||||||
if !(answer is NSNull) {
|
if !(answer is NSNull) {
|
||||||
answerPayload["value"] = AnyCodable(answer)
|
answerPayload["value"] = ProtoAnyCodable(answer)
|
||||||
}
|
}
|
||||||
let response = try await client.request(
|
let response = try await client.request(
|
||||||
method: "wizard.next",
|
method: "wizard.next",
|
||||||
params: [
|
params: [
|
||||||
"sessionId": AnyCodable(sessionId),
|
"sessionId": ProtoAnyCodable(sessionId),
|
||||||
"answer": AnyCodable(answerPayload),
|
"answer": ProtoAnyCodable(answerPayload),
|
||||||
])
|
])
|
||||||
nextResult = try await client.decodePayload(response, as: WizardNextResult.self)
|
nextResult = try await client.decodePayload(response, as: WizardNextResult.self)
|
||||||
if opts.json {
|
if opts.json {
|
||||||
@@ -414,7 +423,7 @@ private func runWizard(client: GatewayWizardClient, opts: WizardCliOptions) asyn
|
|||||||
} else {
|
} else {
|
||||||
let response = try await client.request(
|
let response = try await client.request(
|
||||||
method: "wizard.next",
|
method: "wizard.next",
|
||||||
params: ["sessionId": AnyCodable(sessionId)])
|
params: ["sessionId": ProtoAnyCodable(sessionId)])
|
||||||
nextResult = try await client.decodePayload(response, as: WizardNextResult.self)
|
nextResult = try await client.decodePayload(response, as: WizardNextResult.self)
|
||||||
if opts.json {
|
if opts.json {
|
||||||
dumpResult(response)
|
dumpResult(response)
|
||||||
@@ -424,7 +433,7 @@ private func runWizard(client: GatewayWizardClient, opts: WizardCliOptions) asyn
|
|||||||
} catch WizardCliError.cancelled {
|
} catch WizardCliError.cancelled {
|
||||||
_ = try? await client.request(
|
_ = try? await client.request(
|
||||||
method: "wizard.cancel",
|
method: "wizard.cancel",
|
||||||
params: ["sessionId": AnyCodable(sessionId)])
|
params: ["sessionId": ProtoAnyCodable(sessionId)])
|
||||||
throw WizardCliError.cancelled
|
throw WizardCliError.cancelled
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,7 +20,7 @@ public struct ConnectParams: Codable, Sendable {
|
|||||||
public let permissions: [String: AnyCodable]?
|
public let permissions: [String: AnyCodable]?
|
||||||
public let role: String?
|
public let role: String?
|
||||||
public let scopes: [String]?
|
public let scopes: [String]?
|
||||||
public let device: [String: AnyCodable]
|
public let device: [String: AnyCodable]?
|
||||||
public let auth: [String: AnyCodable]?
|
public let auth: [String: AnyCodable]?
|
||||||
public let locale: String?
|
public let locale: String?
|
||||||
public let useragent: String?
|
public let useragent: String?
|
||||||
@@ -34,7 +34,7 @@ public struct ConnectParams: Codable, Sendable {
|
|||||||
permissions: [String: AnyCodable]?,
|
permissions: [String: AnyCodable]?,
|
||||||
role: String?,
|
role: String?,
|
||||||
scopes: [String]?,
|
scopes: [String]?,
|
||||||
device: [String: AnyCodable],
|
device: [String: AnyCodable]?,
|
||||||
auth: [String: AnyCodable]?,
|
auth: [String: AnyCodable]?,
|
||||||
locale: String?,
|
locale: String?,
|
||||||
useragent: String?
|
useragent: String?
|
||||||
@@ -205,6 +205,9 @@ public struct PresenceEntry: Codable, Sendable {
|
|||||||
public let tags: [String]?
|
public let tags: [String]?
|
||||||
public let text: String?
|
public let text: String?
|
||||||
public let ts: Int
|
public let ts: Int
|
||||||
|
public let deviceid: String?
|
||||||
|
public let roles: [String]?
|
||||||
|
public let scopes: [String]?
|
||||||
public let instanceid: String?
|
public let instanceid: String?
|
||||||
|
|
||||||
public init(
|
public init(
|
||||||
@@ -220,6 +223,9 @@ public struct PresenceEntry: Codable, Sendable {
|
|||||||
tags: [String]?,
|
tags: [String]?,
|
||||||
text: String?,
|
text: String?,
|
||||||
ts: Int,
|
ts: Int,
|
||||||
|
deviceid: String?,
|
||||||
|
roles: [String]?,
|
||||||
|
scopes: [String]?,
|
||||||
instanceid: String?
|
instanceid: String?
|
||||||
) {
|
) {
|
||||||
self.host = host
|
self.host = host
|
||||||
@@ -234,6 +240,9 @@ public struct PresenceEntry: Codable, Sendable {
|
|||||||
self.tags = tags
|
self.tags = tags
|
||||||
self.text = text
|
self.text = text
|
||||||
self.ts = ts
|
self.ts = ts
|
||||||
|
self.deviceid = deviceid
|
||||||
|
self.roles = roles
|
||||||
|
self.scopes = scopes
|
||||||
self.instanceid = instanceid
|
self.instanceid = instanceid
|
||||||
}
|
}
|
||||||
private enum CodingKeys: String, CodingKey {
|
private enum CodingKeys: String, CodingKey {
|
||||||
@@ -249,6 +258,9 @@ public struct PresenceEntry: Codable, Sendable {
|
|||||||
case tags
|
case tags
|
||||||
case text
|
case text
|
||||||
case ts
|
case ts
|
||||||
|
case deviceid = "deviceId"
|
||||||
|
case roles
|
||||||
|
case scopes
|
||||||
case instanceid = "instanceId"
|
case instanceid = "instanceId"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1312,6 +1324,9 @@ 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]
|
||||||
@@ -1320,6 +1335,9 @@ 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]
|
||||||
@@ -1327,6 +1345,9 @@ 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
|
||||||
@@ -1335,6 +1356,9 @@ 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"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import Testing
|
|||||||
#expect(GatewayAgentChannel.last.shouldDeliver(true) == true)
|
#expect(GatewayAgentChannel.last.shouldDeliver(true) == true)
|
||||||
#expect(GatewayAgentChannel.whatsapp.shouldDeliver(true) == true)
|
#expect(GatewayAgentChannel.whatsapp.shouldDeliver(true) == true)
|
||||||
#expect(GatewayAgentChannel.telegram.shouldDeliver(true) == true)
|
#expect(GatewayAgentChannel.telegram.shouldDeliver(true) == true)
|
||||||
|
#expect(GatewayAgentChannel.bluebubbles.shouldDeliver(true) == true)
|
||||||
#expect(GatewayAgentChannel.last.shouldDeliver(false) == false)
|
#expect(GatewayAgentChannel.last.shouldDeliver(false) == false)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -18,6 +19,7 @@ import Testing
|
|||||||
#expect(GatewayAgentChannel(raw: nil) == .last)
|
#expect(GatewayAgentChannel(raw: nil) == .last)
|
||||||
#expect(GatewayAgentChannel(raw: " ") == .last)
|
#expect(GatewayAgentChannel(raw: " ") == .last)
|
||||||
#expect(GatewayAgentChannel(raw: "WEBCHAT") == .webchat)
|
#expect(GatewayAgentChannel(raw: "WEBCHAT") == .webchat)
|
||||||
|
#expect(GatewayAgentChannel(raw: "BLUEBUBBLES") == .bluebubbles)
|
||||||
#expect(GatewayAgentChannel(raw: "unknown") == .last)
|
#expect(GatewayAgentChannel(raw: "unknown") == .last)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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-gateway._tcp.clawdbot.internal.\n"
|
return "steipetacstudio-gateway._clawdbot-gw._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-gateway._tcp"
|
public static let gatewayServiceType = "_clawdbot-gw._tcp"
|
||||||
public static let gatewayServiceDomain = "local."
|
public static let gatewayServiceDomain = "local."
|
||||||
public static let wideAreaGatewayServiceDomain = "clawdbot.internal."
|
public static let wideAreaGatewayServiceDomain = "clawdbot.internal."
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,107 @@
|
|||||||
|
import Foundation
|
||||||
|
|
||||||
|
public struct DeviceAuthEntry: Codable, Sendable {
|
||||||
|
public let token: String
|
||||||
|
public let role: String
|
||||||
|
public let scopes: [String]
|
||||||
|
public let updatedAtMs: Int
|
||||||
|
|
||||||
|
public init(token: String, role: String, scopes: [String], updatedAtMs: Int) {
|
||||||
|
self.token = token
|
||||||
|
self.role = role
|
||||||
|
self.scopes = scopes
|
||||||
|
self.updatedAtMs = updatedAtMs
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private struct DeviceAuthStoreFile: Codable {
|
||||||
|
var version: Int
|
||||||
|
var deviceId: String
|
||||||
|
var tokens: [String: DeviceAuthEntry]
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum DeviceAuthStore {
|
||||||
|
private static let fileName = "device-auth.json"
|
||||||
|
|
||||||
|
public static func loadToken(deviceId: String, role: String) -> DeviceAuthEntry? {
|
||||||
|
guard let store = readStore(), store.deviceId == deviceId else { return nil }
|
||||||
|
let role = normalizeRole(role)
|
||||||
|
return store.tokens[role]
|
||||||
|
}
|
||||||
|
|
||||||
|
public static func storeToken(
|
||||||
|
deviceId: String,
|
||||||
|
role: String,
|
||||||
|
token: String,
|
||||||
|
scopes: [String] = []
|
||||||
|
) -> DeviceAuthEntry {
|
||||||
|
let normalizedRole = normalizeRole(role)
|
||||||
|
var next = readStore()
|
||||||
|
if next?.deviceId != deviceId {
|
||||||
|
next = DeviceAuthStoreFile(version: 1, deviceId: deviceId, tokens: [:])
|
||||||
|
}
|
||||||
|
let entry = DeviceAuthEntry(
|
||||||
|
token: token,
|
||||||
|
role: normalizedRole,
|
||||||
|
scopes: normalizeScopes(scopes),
|
||||||
|
updatedAtMs: Int(Date().timeIntervalSince1970 * 1000)
|
||||||
|
)
|
||||||
|
if next == nil {
|
||||||
|
next = DeviceAuthStoreFile(version: 1, deviceId: deviceId, tokens: [:])
|
||||||
|
}
|
||||||
|
next?.tokens[normalizedRole] = entry
|
||||||
|
if let store = next {
|
||||||
|
writeStore(store)
|
||||||
|
}
|
||||||
|
return entry
|
||||||
|
}
|
||||||
|
|
||||||
|
public static func clearToken(deviceId: String, role: String) {
|
||||||
|
guard var store = readStore(), store.deviceId == deviceId else { return }
|
||||||
|
let normalizedRole = normalizeRole(role)
|
||||||
|
guard store.tokens[normalizedRole] != nil else { return }
|
||||||
|
store.tokens.removeValue(forKey: normalizedRole)
|
||||||
|
writeStore(store)
|
||||||
|
}
|
||||||
|
|
||||||
|
private static func normalizeRole(_ role: String) -> String {
|
||||||
|
role.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
|
}
|
||||||
|
|
||||||
|
private static func normalizeScopes(_ scopes: [String]) -> [String] {
|
||||||
|
let trimmed = scopes
|
||||||
|
.map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
|
||||||
|
.filter { !$0.isEmpty }
|
||||||
|
return Array(Set(trimmed)).sorted()
|
||||||
|
}
|
||||||
|
|
||||||
|
private static func fileURL() -> URL {
|
||||||
|
DeviceIdentityPaths.stateDirURL()
|
||||||
|
.appendingPathComponent("identity", isDirectory: true)
|
||||||
|
.appendingPathComponent(fileName, isDirectory: false)
|
||||||
|
}
|
||||||
|
|
||||||
|
private static func readStore() -> DeviceAuthStoreFile? {
|
||||||
|
let url = fileURL()
|
||||||
|
guard let data = try? Data(contentsOf: url) else { return nil }
|
||||||
|
guard let decoded = try? JSONDecoder().decode(DeviceAuthStoreFile.self, from: data) else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
guard decoded.version == 1 else { return nil }
|
||||||
|
return decoded
|
||||||
|
}
|
||||||
|
|
||||||
|
private static func writeStore(_ store: DeviceAuthStoreFile) {
|
||||||
|
let url = fileURL()
|
||||||
|
do {
|
||||||
|
try FileManager.default.createDirectory(
|
||||||
|
at: url.deletingLastPathComponent(),
|
||||||
|
withIntermediateDirectories: true)
|
||||||
|
let data = try JSONEncoder().encode(store)
|
||||||
|
try data.write(to: url, options: [.atomic])
|
||||||
|
try? FileManager.default.setAttributes([.posixPermissions: 0o600], ofItemAtPath: url.path)
|
||||||
|
} catch {
|
||||||
|
// best-effort only
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,18 @@
|
|||||||
import CryptoKit
|
import CryptoKit
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
struct DeviceIdentity: Codable, Sendable {
|
public struct DeviceIdentity: Codable, Sendable {
|
||||||
var deviceId: String
|
public var deviceId: String
|
||||||
var publicKey: String
|
public var publicKey: String
|
||||||
var privateKey: String
|
public var privateKey: String
|
||||||
var createdAtMs: Int
|
public var createdAtMs: Int
|
||||||
|
|
||||||
|
public init(deviceId: String, publicKey: String, privateKey: String, createdAtMs: Int) {
|
||||||
|
self.deviceId = deviceId
|
||||||
|
self.publicKey = publicKey
|
||||||
|
self.privateKey = privateKey
|
||||||
|
self.createdAtMs = createdAtMs
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum DeviceIdentityPaths {
|
enum DeviceIdentityPaths {
|
||||||
@@ -27,10 +34,10 @@ enum DeviceIdentityPaths {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum DeviceIdentityStore {
|
public enum DeviceIdentityStore {
|
||||||
private static let fileName = "device.json"
|
private static let fileName = "device.json"
|
||||||
|
|
||||||
static func loadOrCreate() -> DeviceIdentity {
|
public static func loadOrCreate() -> DeviceIdentity {
|
||||||
let url = self.fileURL()
|
let url = self.fileURL()
|
||||||
if let data = try? Data(contentsOf: url),
|
if let data = try? Data(contentsOf: url),
|
||||||
let decoded = try? JSONDecoder().decode(DeviceIdentity.self, from: data),
|
let decoded = try? JSONDecoder().decode(DeviceIdentity.self, from: data),
|
||||||
@@ -44,7 +51,7 @@ enum DeviceIdentityStore {
|
|||||||
return identity
|
return identity
|
||||||
}
|
}
|
||||||
|
|
||||||
static func signPayload(_ payload: String, identity: DeviceIdentity) -> String? {
|
public static func signPayload(_ payload: String, identity: DeviceIdentity) -> String? {
|
||||||
guard let privateKeyData = Data(base64Encoded: identity.privateKey) else { return nil }
|
guard let privateKeyData = Data(base64Encoded: identity.privateKey) else { return nil }
|
||||||
do {
|
do {
|
||||||
let privateKey = try Curve25519.Signing.PrivateKey(rawRepresentation: privateKeyData)
|
let privateKey = try Curve25519.Signing.PrivateKey(rawRepresentation: privateKeyData)
|
||||||
@@ -76,7 +83,7 @@ enum DeviceIdentityStore {
|
|||||||
.replacingOccurrences(of: "=", with: "")
|
.replacingOccurrences(of: "=", with: "")
|
||||||
}
|
}
|
||||||
|
|
||||||
static func publicKeyBase64Url(_ identity: DeviceIdentity) -> String? {
|
public static func publicKeyBase64Url(_ identity: DeviceIdentity) -> String? {
|
||||||
guard let data = Data(base64Encoded: identity.publicKey) else { return nil }
|
guard let data = Data(base64Encoded: identity.publicKey) else { return nil }
|
||||||
return self.base64UrlEncode(data)
|
return self.base64UrlEncode(data)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,6 +94,10 @@ public struct GatewayConnectOptions: Sendable {
|
|||||||
// Avoid ambiguity with the app's own AnyCodable type.
|
// Avoid ambiguity with the app's own AnyCodable type.
|
||||||
private typealias ProtoAnyCodable = ClawdbotProtocol.AnyCodable
|
private typealias ProtoAnyCodable = ClawdbotProtocol.AnyCodable
|
||||||
|
|
||||||
|
private enum ConnectChallengeError: Error {
|
||||||
|
case timeout
|
||||||
|
}
|
||||||
|
|
||||||
public actor GatewayChannelActor {
|
public actor GatewayChannelActor {
|
||||||
private let logger = Logger(subsystem: "com.clawdbot", category: "gateway")
|
private let logger = Logger(subsystem: "com.clawdbot", category: "gateway")
|
||||||
private var task: WebSocketTaskBox?
|
private var task: WebSocketTaskBox?
|
||||||
@@ -113,6 +117,7 @@ public actor GatewayChannelActor {
|
|||||||
private let decoder = JSONDecoder()
|
private let decoder = JSONDecoder()
|
||||||
private let encoder = JSONEncoder()
|
private let encoder = JSONEncoder()
|
||||||
private let connectTimeoutSeconds: Double = 6
|
private let connectTimeoutSeconds: Double = 6
|
||||||
|
private let connectChallengeTimeoutSeconds: Double = 0.75
|
||||||
private var watchdogTask: Task<Void, Never>?
|
private var watchdogTask: Task<Void, Never>?
|
||||||
private var tickTask: Task<Void, Never>?
|
private var tickTask: Task<Void, Never>?
|
||||||
private let defaultRequestTimeoutMs: Double = 15000
|
private let defaultRequestTimeoutMs: Double = 15000
|
||||||
@@ -256,6 +261,8 @@ public actor GatewayChannelActor {
|
|||||||
let clientDisplayName = options.clientDisplayName ?? InstanceIdentity.displayName
|
let clientDisplayName = options.clientDisplayName ?? InstanceIdentity.displayName
|
||||||
let clientId = options.clientId
|
let clientId = options.clientId
|
||||||
let clientMode = options.clientMode
|
let clientMode = options.clientMode
|
||||||
|
let role = options.role
|
||||||
|
let scopes = options.scopes
|
||||||
|
|
||||||
let reqId = UUID().uuidString
|
let reqId = UUID().uuidString
|
||||||
var client: [String: ProtoAnyCodable] = [
|
var client: [String: ProtoAnyCodable] = [
|
||||||
@@ -278,8 +285,8 @@ public actor GatewayChannelActor {
|
|||||||
"caps": ProtoAnyCodable(options.caps),
|
"caps": ProtoAnyCodable(options.caps),
|
||||||
"locale": ProtoAnyCodable(primaryLocale),
|
"locale": ProtoAnyCodable(primaryLocale),
|
||||||
"userAgent": ProtoAnyCodable(ProcessInfo.processInfo.operatingSystemVersionString),
|
"userAgent": ProtoAnyCodable(ProcessInfo.processInfo.operatingSystemVersionString),
|
||||||
"role": ProtoAnyCodable(options.role),
|
"role": ProtoAnyCodable(role),
|
||||||
"scopes": ProtoAnyCodable(options.scopes),
|
"scopes": ProtoAnyCodable(scopes),
|
||||||
]
|
]
|
||||||
if !options.commands.isEmpty {
|
if !options.commands.isEmpty {
|
||||||
params["commands"] = ProtoAnyCodable(options.commands)
|
params["commands"] = ProtoAnyCodable(options.commands)
|
||||||
@@ -287,32 +294,44 @@ public actor GatewayChannelActor {
|
|||||||
if !options.permissions.isEmpty {
|
if !options.permissions.isEmpty {
|
||||||
params["permissions"] = ProtoAnyCodable(options.permissions)
|
params["permissions"] = ProtoAnyCodable(options.permissions)
|
||||||
}
|
}
|
||||||
if let token = self.token {
|
let identity = DeviceIdentityStore.loadOrCreate()
|
||||||
params["auth"] = ProtoAnyCodable(["token": ProtoAnyCodable(token)])
|
let storedToken = DeviceAuthStore.loadToken(deviceId: identity.deviceId, role: role)?.token
|
||||||
|
let authToken = storedToken ?? self.token
|
||||||
|
let canFallbackToShared = storedToken != nil && self.token != nil
|
||||||
|
if let authToken {
|
||||||
|
params["auth"] = ProtoAnyCodable(["token": ProtoAnyCodable(authToken)])
|
||||||
} else if let password = self.password {
|
} else if let password = self.password {
|
||||||
params["auth"] = ProtoAnyCodable(["password": ProtoAnyCodable(password)])
|
params["auth"] = ProtoAnyCodable(["password": ProtoAnyCodable(password)])
|
||||||
}
|
}
|
||||||
let identity = DeviceIdentityStore.loadOrCreate()
|
|
||||||
let signedAtMs = Int(Date().timeIntervalSince1970 * 1000)
|
let signedAtMs = Int(Date().timeIntervalSince1970 * 1000)
|
||||||
let scopes = options.scopes.joined(separator: ",")
|
let connectNonce = try await self.waitForConnectChallenge()
|
||||||
let payload = [
|
let scopesValue = scopes.joined(separator: ",")
|
||||||
"v1",
|
var payloadParts = [
|
||||||
|
connectNonce == nil ? "v1" : "v2",
|
||||||
identity.deviceId,
|
identity.deviceId,
|
||||||
clientId,
|
clientId,
|
||||||
clientMode,
|
clientMode,
|
||||||
options.role,
|
role,
|
||||||
scopes,
|
scopesValue,
|
||||||
String(signedAtMs),
|
String(signedAtMs),
|
||||||
self.token ?? "",
|
authToken ?? "",
|
||||||
].joined(separator: "|")
|
]
|
||||||
|
if let connectNonce {
|
||||||
|
payloadParts.append(connectNonce)
|
||||||
|
}
|
||||||
|
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) {
|
||||||
params["device"] = ProtoAnyCodable([
|
var device: [String: ProtoAnyCodable] = [
|
||||||
"id": ProtoAnyCodable(identity.deviceId),
|
"id": ProtoAnyCodable(identity.deviceId),
|
||||||
"publicKey": ProtoAnyCodable(publicKey),
|
"publicKey": ProtoAnyCodable(publicKey),
|
||||||
"signature": ProtoAnyCodable(signature),
|
"signature": ProtoAnyCodable(signature),
|
||||||
"signedAt": ProtoAnyCodable(signedAtMs),
|
"signedAt": ProtoAnyCodable(signedAtMs),
|
||||||
])
|
]
|
||||||
|
if let connectNonce {
|
||||||
|
device["nonce"] = ProtoAnyCodable(connectNonce)
|
||||||
|
}
|
||||||
|
params["device"] = ProtoAnyCodable(device)
|
||||||
}
|
}
|
||||||
|
|
||||||
let frame = RequestFrame(
|
let frame = RequestFrame(
|
||||||
@@ -322,40 +341,22 @@ public actor GatewayChannelActor {
|
|||||||
params: ProtoAnyCodable(params))
|
params: ProtoAnyCodable(params))
|
||||||
let data = try self.encoder.encode(frame)
|
let data = try self.encoder.encode(frame)
|
||||||
try await self.task?.send(.data(data))
|
try await self.task?.send(.data(data))
|
||||||
guard let msg = try await task?.receive() else {
|
do {
|
||||||
throw NSError(
|
let response = try await self.waitForConnectResponse(reqId: reqId)
|
||||||
domain: "Gateway",
|
try await self.handleConnectResponse(response, identity: identity, role: role)
|
||||||
code: 1,
|
} catch {
|
||||||
userInfo: [NSLocalizedDescriptionKey: "connect failed (no response)"])
|
if canFallbackToShared {
|
||||||
|
DeviceAuthStore.clearToken(deviceId: identity.deviceId, role: role)
|
||||||
|
}
|
||||||
|
throw error
|
||||||
}
|
}
|
||||||
try await self.handleConnectResponse(msg, reqId: reqId)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func handleConnectResponse(_ msg: URLSessionWebSocketTask.Message, reqId: String) async throws {
|
private func handleConnectResponse(
|
||||||
let data: Data? = switch msg {
|
_ res: ResponseFrame,
|
||||||
case let .data(d): d
|
identity: DeviceIdentity,
|
||||||
case let .string(s): s.data(using: .utf8)
|
role: String
|
||||||
@unknown default: nil
|
) async throws {
|
||||||
}
|
|
||||||
guard let data else {
|
|
||||||
throw NSError(
|
|
||||||
domain: "Gateway",
|
|
||||||
code: 1,
|
|
||||||
userInfo: [NSLocalizedDescriptionKey: "connect failed (empty response)"])
|
|
||||||
}
|
|
||||||
let decoder = JSONDecoder()
|
|
||||||
guard let frame = try? decoder.decode(GatewayFrame.self, from: data) else {
|
|
||||||
throw NSError(
|
|
||||||
domain: "Gateway",
|
|
||||||
code: 1,
|
|
||||||
userInfo: [NSLocalizedDescriptionKey: "connect failed (invalid response)"])
|
|
||||||
}
|
|
||||||
guard case let .res(res) = frame, res.id == reqId else {
|
|
||||||
throw NSError(
|
|
||||||
domain: "Gateway",
|
|
||||||
code: 1,
|
|
||||||
userInfo: [NSLocalizedDescriptionKey: "connect failed (unexpected response)"])
|
|
||||||
}
|
|
||||||
if res.ok == false {
|
if res.ok == false {
|
||||||
let msg = (res.error?["message"]?.value as? String) ?? "gateway connect failed"
|
let msg = (res.error?["message"]?.value as? String) ?? "gateway connect failed"
|
||||||
throw NSError(domain: "Gateway", code: 1008, userInfo: [NSLocalizedDescriptionKey: msg])
|
throw NSError(domain: "Gateway", code: 1008, userInfo: [NSLocalizedDescriptionKey: msg])
|
||||||
@@ -373,6 +374,17 @@ public actor GatewayChannelActor {
|
|||||||
} else if let tick = ok.policy["tickIntervalMs"]?.value as? Int {
|
} else if let tick = ok.policy["tickIntervalMs"]?.value as? Int {
|
||||||
self.tickIntervalMs = Double(tick)
|
self.tickIntervalMs = Double(tick)
|
||||||
}
|
}
|
||||||
|
if let auth = ok.auth,
|
||||||
|
let deviceToken = auth["deviceToken"]?.value as? String {
|
||||||
|
let authRole = auth["role"]?.value as? String ?? role
|
||||||
|
let scopes = (auth["scopes"]?.value as? [ProtoAnyCodable])?
|
||||||
|
.compactMap { $0.value as? String } ?? []
|
||||||
|
_ = DeviceAuthStore.storeToken(
|
||||||
|
deviceId: identity.deviceId,
|
||||||
|
role: authRole,
|
||||||
|
token: deviceToken,
|
||||||
|
scopes: scopes)
|
||||||
|
}
|
||||||
self.lastTick = Date()
|
self.lastTick = Date()
|
||||||
self.tickTask?.cancel()
|
self.tickTask?.cancel()
|
||||||
self.tickTask = Task { [weak self] in
|
self.tickTask = Task { [weak self] in
|
||||||
@@ -424,6 +436,7 @@ public actor GatewayChannelActor {
|
|||||||
waiter.resume(returning: .res(res))
|
waiter.resume(returning: .res(res))
|
||||||
}
|
}
|
||||||
case let .event(evt):
|
case let .event(evt):
|
||||||
|
if evt.event == "connect.challenge" { return }
|
||||||
if let seq = evt.seq {
|
if let seq = evt.seq {
|
||||||
if let last = lastSeq, seq > last + 1 {
|
if let last = lastSeq, seq > last + 1 {
|
||||||
await self.pushHandler?(.seqGap(expected: last + 1, received: seq))
|
await self.pushHandler?(.seqGap(expected: last + 1, received: seq))
|
||||||
@@ -437,6 +450,63 @@ public actor GatewayChannelActor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func waitForConnectChallenge() async throws -> String? {
|
||||||
|
guard let task = self.task else { return nil }
|
||||||
|
do {
|
||||||
|
return try await AsyncTimeout.withTimeout(
|
||||||
|
seconds: self.connectChallengeTimeoutSeconds,
|
||||||
|
onTimeout: { ConnectChallengeError.timeout },
|
||||||
|
operation: { [weak self] in
|
||||||
|
guard let self else { return nil }
|
||||||
|
while true {
|
||||||
|
let msg = try await task.receive()
|
||||||
|
guard let data = self.decodeMessageData(msg) else { continue }
|
||||||
|
guard let frame = try? self.decoder.decode(GatewayFrame.self, from: data) else { continue }
|
||||||
|
if case let .event(evt) = frame, evt.event == "connect.challenge" {
|
||||||
|
if let payload = evt.payload?.value as? [String: ProtoAnyCodable],
|
||||||
|
let nonce = payload["nonce"]?.value as? String {
|
||||||
|
return nonce
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch {
|
||||||
|
if error is ConnectChallengeError { return nil }
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private func waitForConnectResponse(reqId: String) async throws -> ResponseFrame {
|
||||||
|
guard let task = self.task else {
|
||||||
|
throw NSError(
|
||||||
|
domain: "Gateway",
|
||||||
|
code: 1,
|
||||||
|
userInfo: [NSLocalizedDescriptionKey: "connect failed (no response)"])
|
||||||
|
}
|
||||||
|
while true {
|
||||||
|
let msg = try await task.receive()
|
||||||
|
guard let data = self.decodeMessageData(msg) else { continue }
|
||||||
|
guard let frame = try? self.decoder.decode(GatewayFrame.self, from: data) else {
|
||||||
|
throw NSError(
|
||||||
|
domain: "Gateway",
|
||||||
|
code: 1,
|
||||||
|
userInfo: [NSLocalizedDescriptionKey: "connect failed (invalid response)"])
|
||||||
|
}
|
||||||
|
if case let .res(res) = frame, res.id == reqId {
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private nonisolated func decodeMessageData(_ msg: URLSessionWebSocketTask.Message) -> Data? {
|
||||||
|
let data: Data? = switch msg {
|
||||||
|
case let .data(data): data
|
||||||
|
case let .string(text): text.data(using: .utf8)
|
||||||
|
@unknown default: nil
|
||||||
|
}
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
private func watchTicks() async {
|
private func watchTicks() async {
|
||||||
let tolerance = self.tickIntervalMs * 2
|
let tolerance = self.tickIntervalMs * 2
|
||||||
while self.connected {
|
while self.connected {
|
||||||
|
|||||||
@@ -29,5 +29,10 @@ 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)" }
|
||||||
}
|
}
|
||||||
@@ -36,7 +36,7 @@ public enum GatewayTLSStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public final class GatewayTLSPinningSession: NSObject, WebSocketSessioning, URLSessionDelegate {
|
public final class GatewayTLSPinningSession: NSObject, WebSocketSessioning, URLSessionDelegate, @unchecked Sendable {
|
||||||
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,10 +96,12 @@ public final class GatewayTLSPinningSession: NSObject, WebSocketSessioning, URLS
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func certificateFingerprint(_ trust: SecTrust) -> String? {
|
private func certificateFingerprint(_ trust: SecTrust) -> String? {
|
||||||
let count = SecTrustGetCertificateCount(trust)
|
guard let chain = SecTrustCopyCertificateChain(trust) as? [SecCertificate],
|
||||||
guard count > 0, let cert = SecTrustGetCertificateAtIndex(trust, 0) else { return nil }
|
let cert = chain.first
|
||||||
let data = SecCertificateCopyData(cert) as Data
|
else {
|
||||||
return sha256Hex(data)
|
return nil
|
||||||
|
}
|
||||||
|
return sha256Hex(SecCertificateCopyData(cert) as Data)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func sha256Hex(_ data: Data) -> String {
|
private func sha256Hex(_ data: Data) -> String {
|
||||||
@@ -108,5 +110,9 @@ private func sha256Hex(_ data: Data) -> String {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func normalizeFingerprint(_ raw: String) -> String {
|
private func normalizeFingerprint(_ raw: String) -> String {
|
||||||
raw.lowercased().filter(\.isHexDigit)
|
let stripped = raw.replacingOccurrences(
|
||||||
|
of: #"(?i)^sha-?256\s*:?\s*"#,
|
||||||
|
with: "",
|
||||||
|
options: .regularExpression)
|
||||||
|
return stripped.lowercased().filter(\.isHexDigit)
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,7 @@ public let GATEWAY_PROTOCOL_VERSION = 3
|
|||||||
|
|
||||||
public enum ErrorCode: String, Codable, Sendable {
|
public enum ErrorCode: String, Codable, Sendable {
|
||||||
case notLinked = "NOT_LINKED"
|
case notLinked = "NOT_LINKED"
|
||||||
|
case notPaired = "NOT_PAIRED"
|
||||||
case agentTimeout = "AGENT_TIMEOUT"
|
case agentTimeout = "AGENT_TIMEOUT"
|
||||||
case invalidRequest = "INVALID_REQUEST"
|
case invalidRequest = "INVALID_REQUEST"
|
||||||
case unavailable = "UNAVAILABLE"
|
case unavailable = "UNAVAILABLE"
|
||||||
@@ -15,6 +16,11 @@ public struct ConnectParams: Codable, Sendable {
|
|||||||
public let maxprotocol: Int
|
public let maxprotocol: Int
|
||||||
public let client: [String: AnyCodable]
|
public let client: [String: AnyCodable]
|
||||||
public let caps: [String]?
|
public let caps: [String]?
|
||||||
|
public let commands: [String]?
|
||||||
|
public let permissions: [String: AnyCodable]?
|
||||||
|
public let role: String?
|
||||||
|
public let scopes: [String]?
|
||||||
|
public let device: [String: AnyCodable]?
|
||||||
public let auth: [String: AnyCodable]?
|
public let auth: [String: AnyCodable]?
|
||||||
public let locale: String?
|
public let locale: String?
|
||||||
public let useragent: String?
|
public let useragent: String?
|
||||||
@@ -24,6 +30,11 @@ public struct ConnectParams: Codable, Sendable {
|
|||||||
maxprotocol: Int,
|
maxprotocol: Int,
|
||||||
client: [String: AnyCodable],
|
client: [String: AnyCodable],
|
||||||
caps: [String]?,
|
caps: [String]?,
|
||||||
|
commands: [String]?,
|
||||||
|
permissions: [String: AnyCodable]?,
|
||||||
|
role: String?,
|
||||||
|
scopes: [String]?,
|
||||||
|
device: [String: AnyCodable]?,
|
||||||
auth: [String: AnyCodable]?,
|
auth: [String: AnyCodable]?,
|
||||||
locale: String?,
|
locale: String?,
|
||||||
useragent: String?
|
useragent: String?
|
||||||
@@ -32,6 +43,11 @@ public struct ConnectParams: Codable, Sendable {
|
|||||||
self.maxprotocol = maxprotocol
|
self.maxprotocol = maxprotocol
|
||||||
self.client = client
|
self.client = client
|
||||||
self.caps = caps
|
self.caps = caps
|
||||||
|
self.commands = commands
|
||||||
|
self.permissions = permissions
|
||||||
|
self.role = role
|
||||||
|
self.scopes = scopes
|
||||||
|
self.device = device
|
||||||
self.auth = auth
|
self.auth = auth
|
||||||
self.locale = locale
|
self.locale = locale
|
||||||
self.useragent = useragent
|
self.useragent = useragent
|
||||||
@@ -41,6 +57,11 @@ public struct ConnectParams: Codable, Sendable {
|
|||||||
case maxprotocol = "maxProtocol"
|
case maxprotocol = "maxProtocol"
|
||||||
case client
|
case client
|
||||||
case caps
|
case caps
|
||||||
|
case commands
|
||||||
|
case permissions
|
||||||
|
case role
|
||||||
|
case scopes
|
||||||
|
case device
|
||||||
case auth
|
case auth
|
||||||
case locale
|
case locale
|
||||||
case useragent = "userAgent"
|
case useragent = "userAgent"
|
||||||
@@ -54,6 +75,7 @@ public struct HelloOk: Codable, Sendable {
|
|||||||
public let features: [String: AnyCodable]
|
public let features: [String: AnyCodable]
|
||||||
public let snapshot: Snapshot
|
public let snapshot: Snapshot
|
||||||
public let canvashosturl: String?
|
public let canvashosturl: String?
|
||||||
|
public let auth: [String: AnyCodable]?
|
||||||
public let policy: [String: AnyCodable]
|
public let policy: [String: AnyCodable]
|
||||||
|
|
||||||
public init(
|
public init(
|
||||||
@@ -63,6 +85,7 @@ public struct HelloOk: Codable, Sendable {
|
|||||||
features: [String: AnyCodable],
|
features: [String: AnyCodable],
|
||||||
snapshot: Snapshot,
|
snapshot: Snapshot,
|
||||||
canvashosturl: String?,
|
canvashosturl: String?,
|
||||||
|
auth: [String: AnyCodable]?,
|
||||||
policy: [String: AnyCodable]
|
policy: [String: AnyCodable]
|
||||||
) {
|
) {
|
||||||
self.type = type
|
self.type = type
|
||||||
@@ -71,6 +94,7 @@ public struct HelloOk: Codable, Sendable {
|
|||||||
self.features = features
|
self.features = features
|
||||||
self.snapshot = snapshot
|
self.snapshot = snapshot
|
||||||
self.canvashosturl = canvashosturl
|
self.canvashosturl = canvashosturl
|
||||||
|
self.auth = auth
|
||||||
self.policy = policy
|
self.policy = policy
|
||||||
}
|
}
|
||||||
private enum CodingKeys: String, CodingKey {
|
private enum CodingKeys: String, CodingKey {
|
||||||
@@ -80,6 +104,7 @@ public struct HelloOk: Codable, Sendable {
|
|||||||
case features
|
case features
|
||||||
case snapshot
|
case snapshot
|
||||||
case canvashosturl = "canvasHostUrl"
|
case canvashosturl = "canvasHostUrl"
|
||||||
|
case auth
|
||||||
case policy
|
case policy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -180,6 +205,9 @@ public struct PresenceEntry: Codable, Sendable {
|
|||||||
public let tags: [String]?
|
public let tags: [String]?
|
||||||
public let text: String?
|
public let text: String?
|
||||||
public let ts: Int
|
public let ts: Int
|
||||||
|
public let deviceid: String?
|
||||||
|
public let roles: [String]?
|
||||||
|
public let scopes: [String]?
|
||||||
public let instanceid: String?
|
public let instanceid: String?
|
||||||
|
|
||||||
public init(
|
public init(
|
||||||
@@ -195,6 +223,9 @@ public struct PresenceEntry: Codable, Sendable {
|
|||||||
tags: [String]?,
|
tags: [String]?,
|
||||||
text: String?,
|
text: String?,
|
||||||
ts: Int,
|
ts: Int,
|
||||||
|
deviceid: String?,
|
||||||
|
roles: [String]?,
|
||||||
|
scopes: [String]?,
|
||||||
instanceid: String?
|
instanceid: String?
|
||||||
) {
|
) {
|
||||||
self.host = host
|
self.host = host
|
||||||
@@ -209,6 +240,9 @@ public struct PresenceEntry: Codable, Sendable {
|
|||||||
self.tags = tags
|
self.tags = tags
|
||||||
self.text = text
|
self.text = text
|
||||||
self.ts = ts
|
self.ts = ts
|
||||||
|
self.deviceid = deviceid
|
||||||
|
self.roles = roles
|
||||||
|
self.scopes = scopes
|
||||||
self.instanceid = instanceid
|
self.instanceid = instanceid
|
||||||
}
|
}
|
||||||
private enum CodingKeys: String, CodingKey {
|
private enum CodingKeys: String, CodingKey {
|
||||||
@@ -224,6 +258,9 @@ public struct PresenceEntry: Codable, Sendable {
|
|||||||
case tags
|
case tags
|
||||||
case text
|
case text
|
||||||
case ts
|
case ts
|
||||||
|
case deviceid = "deviceId"
|
||||||
|
case roles
|
||||||
|
case scopes
|
||||||
case instanceid = "instanceId"
|
case instanceid = "instanceId"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -706,6 +743,93 @@ public struct NodeInvokeParams: Codable, Sendable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public struct NodeInvokeResultParams: Codable, Sendable {
|
||||||
|
public let id: String
|
||||||
|
public let nodeid: String
|
||||||
|
public let ok: Bool
|
||||||
|
public let payload: AnyCodable?
|
||||||
|
public let payloadjson: String?
|
||||||
|
public let error: [String: AnyCodable]?
|
||||||
|
|
||||||
|
public init(
|
||||||
|
id: String,
|
||||||
|
nodeid: String,
|
||||||
|
ok: Bool,
|
||||||
|
payload: AnyCodable?,
|
||||||
|
payloadjson: String?,
|
||||||
|
error: [String: AnyCodable]?
|
||||||
|
) {
|
||||||
|
self.id = id
|
||||||
|
self.nodeid = nodeid
|
||||||
|
self.ok = ok
|
||||||
|
self.payload = payload
|
||||||
|
self.payloadjson = payloadjson
|
||||||
|
self.error = error
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case id
|
||||||
|
case nodeid = "nodeId"
|
||||||
|
case ok
|
||||||
|
case payload
|
||||||
|
case payloadjson = "payloadJSON"
|
||||||
|
case error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct NodeEventParams: Codable, Sendable {
|
||||||
|
public let event: String
|
||||||
|
public let payload: AnyCodable?
|
||||||
|
public let payloadjson: String?
|
||||||
|
|
||||||
|
public init(
|
||||||
|
event: String,
|
||||||
|
payload: AnyCodable?,
|
||||||
|
payloadjson: String?
|
||||||
|
) {
|
||||||
|
self.event = event
|
||||||
|
self.payload = payload
|
||||||
|
self.payloadjson = payloadjson
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case event
|
||||||
|
case payload
|
||||||
|
case payloadjson = "payloadJSON"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct NodeInvokeRequestEvent: Codable, Sendable {
|
||||||
|
public let id: String
|
||||||
|
public let nodeid: String
|
||||||
|
public let command: String
|
||||||
|
public let paramsjson: String?
|
||||||
|
public let timeoutms: Int?
|
||||||
|
public let idempotencykey: String?
|
||||||
|
|
||||||
|
public init(
|
||||||
|
id: String,
|
||||||
|
nodeid: String,
|
||||||
|
command: String,
|
||||||
|
paramsjson: String?,
|
||||||
|
timeoutms: Int?,
|
||||||
|
idempotencykey: String?
|
||||||
|
) {
|
||||||
|
self.id = id
|
||||||
|
self.nodeid = nodeid
|
||||||
|
self.command = command
|
||||||
|
self.paramsjson = paramsjson
|
||||||
|
self.timeoutms = timeoutms
|
||||||
|
self.idempotencykey = idempotencykey
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case id
|
||||||
|
case nodeid = "nodeId"
|
||||||
|
case command
|
||||||
|
case paramsjson = "paramsJSON"
|
||||||
|
case timeoutms = "timeoutMs"
|
||||||
|
case idempotencykey = "idempotencyKey"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public struct SessionsListParams: Codable, Sendable {
|
public struct SessionsListParams: Codable, Sendable {
|
||||||
public let limit: Int?
|
public let limit: Int?
|
||||||
public let activeminutes: Int?
|
public let activeminutes: Int?
|
||||||
@@ -1381,6 +1505,22 @@ public struct ModelsListResult: Codable, Sendable {
|
|||||||
public struct SkillsStatusParams: Codable, Sendable {
|
public struct SkillsStatusParams: Codable, Sendable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public struct SkillsBinsParams: Codable, Sendable {
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct SkillsBinsResult: Codable, Sendable {
|
||||||
|
public let bins: [String]
|
||||||
|
|
||||||
|
public init(
|
||||||
|
bins: [String]
|
||||||
|
) {
|
||||||
|
self.bins = bins
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case bins
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public struct SkillsInstallParams: Codable, Sendable {
|
public struct SkillsInstallParams: Codable, Sendable {
|
||||||
public let name: String
|
public let name: String
|
||||||
public let installid: String
|
public let installid: String
|
||||||
@@ -1735,6 +1875,225 @@ public struct ExecApprovalsSnapshot: Codable, Sendable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public struct ExecApprovalRequestParams: Codable, Sendable {
|
||||||
|
public let command: String
|
||||||
|
public let cwd: String?
|
||||||
|
public let host: String?
|
||||||
|
public let security: String?
|
||||||
|
public let ask: String?
|
||||||
|
public let agentid: String?
|
||||||
|
public let resolvedpath: String?
|
||||||
|
public let sessionkey: String?
|
||||||
|
public let timeoutms: Int?
|
||||||
|
|
||||||
|
public init(
|
||||||
|
command: String,
|
||||||
|
cwd: String?,
|
||||||
|
host: String?,
|
||||||
|
security: String?,
|
||||||
|
ask: String?,
|
||||||
|
agentid: String?,
|
||||||
|
resolvedpath: String?,
|
||||||
|
sessionkey: String?,
|
||||||
|
timeoutms: Int?
|
||||||
|
) {
|
||||||
|
self.command = command
|
||||||
|
self.cwd = cwd
|
||||||
|
self.host = host
|
||||||
|
self.security = security
|
||||||
|
self.ask = ask
|
||||||
|
self.agentid = agentid
|
||||||
|
self.resolvedpath = resolvedpath
|
||||||
|
self.sessionkey = sessionkey
|
||||||
|
self.timeoutms = timeoutms
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case command
|
||||||
|
case cwd
|
||||||
|
case host
|
||||||
|
case security
|
||||||
|
case ask
|
||||||
|
case agentid = "agentId"
|
||||||
|
case resolvedpath = "resolvedPath"
|
||||||
|
case sessionkey = "sessionKey"
|
||||||
|
case timeoutms = "timeoutMs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct ExecApprovalResolveParams: Codable, Sendable {
|
||||||
|
public let id: String
|
||||||
|
public let decision: String
|
||||||
|
|
||||||
|
public init(
|
||||||
|
id: String,
|
||||||
|
decision: String
|
||||||
|
) {
|
||||||
|
self.id = id
|
||||||
|
self.decision = decision
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case id
|
||||||
|
case decision
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct DevicePairListParams: Codable, Sendable {
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct DevicePairApproveParams: Codable, Sendable {
|
||||||
|
public let requestid: String
|
||||||
|
|
||||||
|
public init(
|
||||||
|
requestid: String
|
||||||
|
) {
|
||||||
|
self.requestid = requestid
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case requestid = "requestId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct DevicePairRejectParams: Codable, Sendable {
|
||||||
|
public let requestid: String
|
||||||
|
|
||||||
|
public init(
|
||||||
|
requestid: String
|
||||||
|
) {
|
||||||
|
self.requestid = requestid
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case requestid = "requestId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct DeviceTokenRotateParams: Codable, Sendable {
|
||||||
|
public let deviceid: String
|
||||||
|
public let role: String
|
||||||
|
public let scopes: [String]?
|
||||||
|
|
||||||
|
public init(
|
||||||
|
deviceid: String,
|
||||||
|
role: String,
|
||||||
|
scopes: [String]?
|
||||||
|
) {
|
||||||
|
self.deviceid = deviceid
|
||||||
|
self.role = role
|
||||||
|
self.scopes = scopes
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case deviceid = "deviceId"
|
||||||
|
case role
|
||||||
|
case scopes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct DeviceTokenRevokeParams: Codable, Sendable {
|
||||||
|
public let deviceid: String
|
||||||
|
public let role: String
|
||||||
|
|
||||||
|
public init(
|
||||||
|
deviceid: String,
|
||||||
|
role: String
|
||||||
|
) {
|
||||||
|
self.deviceid = deviceid
|
||||||
|
self.role = role
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case deviceid = "deviceId"
|
||||||
|
case role
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct DevicePairRequestedEvent: Codable, Sendable {
|
||||||
|
public let requestid: String
|
||||||
|
public let deviceid: String
|
||||||
|
public let publickey: String
|
||||||
|
public let displayname: String?
|
||||||
|
public let platform: String?
|
||||||
|
public let clientid: String?
|
||||||
|
public let clientmode: String?
|
||||||
|
public let role: String?
|
||||||
|
public let roles: [String]?
|
||||||
|
public let scopes: [String]?
|
||||||
|
public let remoteip: String?
|
||||||
|
public let silent: Bool?
|
||||||
|
public let isrepair: Bool?
|
||||||
|
public let ts: Int
|
||||||
|
|
||||||
|
public init(
|
||||||
|
requestid: String,
|
||||||
|
deviceid: String,
|
||||||
|
publickey: String,
|
||||||
|
displayname: String?,
|
||||||
|
platform: String?,
|
||||||
|
clientid: String?,
|
||||||
|
clientmode: String?,
|
||||||
|
role: String?,
|
||||||
|
roles: [String]?,
|
||||||
|
scopes: [String]?,
|
||||||
|
remoteip: String?,
|
||||||
|
silent: Bool?,
|
||||||
|
isrepair: Bool?,
|
||||||
|
ts: Int
|
||||||
|
) {
|
||||||
|
self.requestid = requestid
|
||||||
|
self.deviceid = deviceid
|
||||||
|
self.publickey = publickey
|
||||||
|
self.displayname = displayname
|
||||||
|
self.platform = platform
|
||||||
|
self.clientid = clientid
|
||||||
|
self.clientmode = clientmode
|
||||||
|
self.role = role
|
||||||
|
self.roles = roles
|
||||||
|
self.scopes = scopes
|
||||||
|
self.remoteip = remoteip
|
||||||
|
self.silent = silent
|
||||||
|
self.isrepair = isrepair
|
||||||
|
self.ts = ts
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case requestid = "requestId"
|
||||||
|
case deviceid = "deviceId"
|
||||||
|
case publickey = "publicKey"
|
||||||
|
case displayname = "displayName"
|
||||||
|
case platform
|
||||||
|
case clientid = "clientId"
|
||||||
|
case clientmode = "clientMode"
|
||||||
|
case role
|
||||||
|
case roles
|
||||||
|
case scopes
|
||||||
|
case remoteip = "remoteIp"
|
||||||
|
case silent
|
||||||
|
case isrepair = "isRepair"
|
||||||
|
case ts
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public struct DevicePairResolvedEvent: Codable, Sendable {
|
||||||
|
public let requestid: String
|
||||||
|
public let deviceid: String
|
||||||
|
public let decision: String
|
||||||
|
public let ts: Int
|
||||||
|
|
||||||
|
public init(
|
||||||
|
requestid: String,
|
||||||
|
deviceid: String,
|
||||||
|
decision: String,
|
||||||
|
ts: Int
|
||||||
|
) {
|
||||||
|
self.requestid = requestid
|
||||||
|
self.deviceid = deviceid
|
||||||
|
self.decision = decision
|
||||||
|
self.ts = ts
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case requestid = "requestId"
|
||||||
|
case deviceid = "deviceId"
|
||||||
|
case decision
|
||||||
|
case ts
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public struct ChatHistoryParams: Codable, Sendable {
|
public struct ChatHistoryParams: Codable, Sendable {
|
||||||
public let sessionkey: String
|
public let sessionkey: String
|
||||||
public let limit: Int?
|
public let limit: Int?
|
||||||
|
|||||||
@@ -127,6 +127,11 @@ 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).
|
||||||
|
|||||||
+178
-26
@@ -1,55 +1,203 @@
|
|||||||
---
|
---
|
||||||
summary: "iMessage via BlueBubbles macOS server (REST send/receive, typing, reactions, pairing)."
|
summary: "iMessage via BlueBubbles macOS server (REST send/receive, typing, reactions, pairing, advanced actions)."
|
||||||
read_when:
|
read_when:
|
||||||
- Setting up BlueBubbles channel
|
- Setting up BlueBubbles channel
|
||||||
- Troubleshooting webhook pairing
|
- Troubleshooting webhook pairing
|
||||||
|
- Configuring iMessage on macOS
|
||||||
---
|
---
|
||||||
# BlueBubbles (macOS REST)
|
# BlueBubbles (macOS REST)
|
||||||
|
|
||||||
Status: bundled plugin (disabled by default) that talks to the BlueBubbles macOS server over HTTP.
|
Status: bundled plugin that talks to the BlueBubbles macOS server over HTTP. **Recommended for iMessage integration** due to its richer API and easier setup compared to the legacy imsg channel.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
- Runs on macOS via the BlueBubbles helper app (`https://bluebubbles.app`).
|
- Runs on macOS via the BlueBubbles helper app ([bluebubbles.app](https://bluebubbles.app)).
|
||||||
|
- Recommended/tested: macOS Sequoia (15). macOS Tahoe (26) works; edit is currently broken on Tahoe, and group icon updates may report success but not sync.
|
||||||
- Clawdbot talks to it through its REST API (`GET /api/v1/ping`, `POST /message/text`, `POST /chat/:id/*`).
|
- Clawdbot talks to it through its REST API (`GET /api/v1/ping`, `POST /message/text`, `POST /chat/:id/*`).
|
||||||
- Incoming messages arrive via webhooks; outgoing replies, typing indicators, read receipts, and tapbacks are REST calls.
|
- Incoming messages arrive via webhooks; outgoing replies, typing indicators, read receipts, and tapbacks are REST calls.
|
||||||
- Attachments and stickers are ingested as inbound media (and surfaced to the agent when possible).
|
- Attachments and stickers are ingested as inbound media (and surfaced to the agent when possible).
|
||||||
- Pairing/allowlist works the same way as other channels (`/start/pairing` etc) with `channels.bluebubbles.allowFrom` + pairing codes.
|
- Pairing/allowlist works the same way as other channels (`/start/pairing` etc) with `channels.bluebubbles.allowFrom` + pairing codes.
|
||||||
- Reactions are surfaced as system events just like Slack/Telegram so agents can “mention” them before replying.
|
- Reactions are surfaced as system events just like Slack/Telegram so agents can "mention" them before replying.
|
||||||
|
- Advanced features: edit, unsend, reply threading, message effects, group management.
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
1. Install the BlueBubbles server on your Mac (follows the app store instructions at `https://bluebubbles.app/install`).
|
1. Install the BlueBubbles server on your Mac (follow the instructions at [bluebubbles.app/install](https://bluebubbles.app/install)).
|
||||||
2. In the BlueBubbles config, enable the web API and set a password for `guid`/`password`.
|
2. In the BlueBubbles config, enable the web API and set a password.
|
||||||
3. Configure Clawdbot:
|
3. Run `clawdbot onboard` and select BlueBubbles, or configure manually:
|
||||||
```json5
|
```json5
|
||||||
{
|
{
|
||||||
channels: {
|
channels: {
|
||||||
bluebubbles: {
|
bluebubbles: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
serverUrl: "http://bluebubbles-host:1234",
|
serverUrl: "http://192.168.1.100:1234",
|
||||||
password: "example-password",
|
password: "example-password",
|
||||||
webhookPath: "/bluebubbles-webhook",
|
webhookPath: "/bluebubbles-webhook"
|
||||||
actions: { reactions: true }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
4. Point BlueBubbles webhooks to your gateway (example: `http://your-gateway-host/bluebubbles-webhook?password=<password>`).
|
4. Point BlueBubbles webhooks to your gateway (example: `https://your-gateway-host:3000/bluebubbles-webhook?password=<password>`).
|
||||||
5. Start the gateway; it will register the webhook handler and start pairing.
|
5. Start the gateway; it will register the webhook handler and start pairing.
|
||||||
|
|
||||||
## Configuration notes
|
## Onboarding
|
||||||
- `channels.bluebubbles.serverUrl`: base URL of the BlueBubbles REST API.
|
BlueBubbles is available in the interactive setup wizard:
|
||||||
- `channels.bluebubbles.password`: password that BlueBubbles expects on every request (`?password=...` or header).
|
```
|
||||||
- `channels.bluebubbles.webhookPath`: HTTP path the gateway exposes for BlueBubbles webhooks.
|
clawdbot onboard
|
||||||
- `channels.bluebubbles.dmPolicy` / `groupPolicy` + `allowFrom`/`groupAllowFrom` behave like other channels; pairing/allowlist info is stored in `/pairing`.
|
```
|
||||||
- `channels.bluebubbles.actions.reactions` toggles whether the gateway enqueues system events for reactions/tapbacks.
|
|
||||||
- `channels.bluebubbles.textChunkLimit` overrides the default 4k limit.
|
|
||||||
- `channels.bluebubbles.mediaMaxMb` controls the max size of inbound attachments saved for analysis (default 8MB).
|
|
||||||
|
|
||||||
## How it works
|
The wizard prompts for:
|
||||||
- Outbound replies: `sendMessageBlueBubbles` resolves a chat GUID via `/api/v1/chat/query` and posts to `/api/v1/message/text`. Typing (`/api/v1/chat/<guid>/typing`) and read receipts (`/api/v1/chat/<guid>/read`) are sent before/after responses.
|
- **Server URL** (required): BlueBubbles server address (e.g., `http://192.168.1.100:1234`)
|
||||||
- Webhooks: BlueBubbles POSTs JSON payloads with `type` and `data`. The plugin ignores non-message events (typing indicator, read status) and extracts `chatGuid` from `data.chats[0].guid`.
|
- **Password** (required): API password from BlueBubbles Server settings
|
||||||
- Reactions/tapbacks generate `BlueBubbles reaction added/removed` system events so agents can mention them. Agents can also trigger tapbacks via the `react` action with `messageId`, `emoji`, and a `to`/`chatGuid`.
|
- **Webhook path** (optional): Defaults to `/bluebubbles-webhook`
|
||||||
- Attachments are downloaded via the REST API and stored in the inbound media cache; text-less messages are converted into `<media:...>` placeholders so the agent knows something was sent.
|
- **DM policy**: pairing, allowlist, open, or disabled
|
||||||
|
- **Allow list**: Phone numbers, emails, or chat targets
|
||||||
|
|
||||||
|
You can also add BlueBubbles via CLI:
|
||||||
|
```
|
||||||
|
clawdbot channels add bluebubbles --http-url http://192.168.1.100:1234 --password <password>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Access control (DMs + groups)
|
||||||
|
DMs:
|
||||||
|
- Default: `channels.bluebubbles.dmPolicy = "pairing"`.
|
||||||
|
- Unknown senders receive a pairing code; messages are ignored until approved (codes expire after 1 hour).
|
||||||
|
- Approve via:
|
||||||
|
- `clawdbot pairing list bluebubbles`
|
||||||
|
- `clawdbot pairing approve bluebubbles <CODE>`
|
||||||
|
- Pairing is the default token exchange. Details: [Pairing](/start/pairing)
|
||||||
|
|
||||||
|
Groups:
|
||||||
|
- `channels.bluebubbles.groupPolicy = open | allowlist | disabled` (default: `allowlist`).
|
||||||
|
- `channels.bluebubbles.groupAllowFrom` controls who can trigger in groups when `allowlist` is set.
|
||||||
|
|
||||||
|
### Mention gating (groups)
|
||||||
|
BlueBubbles supports mention gating for group chats, matching iMessage/WhatsApp behavior:
|
||||||
|
- Uses `agents.list[].groupChat.mentionPatterns` (or `messages.groupChat.mentionPatterns`) to detect mentions.
|
||||||
|
- When `requireMention` is enabled for a group, the agent only responds when mentioned.
|
||||||
|
- Control commands from authorized senders bypass mention gating.
|
||||||
|
|
||||||
|
Per-group configuration:
|
||||||
|
```json5
|
||||||
|
{
|
||||||
|
channels: {
|
||||||
|
bluebubbles: {
|
||||||
|
groupPolicy: "allowlist",
|
||||||
|
groupAllowFrom: ["+15555550123"],
|
||||||
|
groups: {
|
||||||
|
"*": { requireMention: true }, // default for all groups
|
||||||
|
"iMessage;-;chat123": { requireMention: false } // override for specific group
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Command gating
|
||||||
|
- Control commands (e.g., `/config`, `/model`) require authorization.
|
||||||
|
- Uses `allowFrom` and `groupAllowFrom` to determine command authorization.
|
||||||
|
- Authorized senders can run control commands even without mentioning in groups.
|
||||||
|
|
||||||
|
## Typing + read receipts
|
||||||
|
- **Typing indicators**: Sent automatically before and during response generation.
|
||||||
|
- **Read receipts**: Controlled by `channels.bluebubbles.sendReadReceipts` (default: `true`).
|
||||||
|
- **Typing indicators**: Clawdbot sends typing start events; BlueBubbles clears typing automatically on send or timeout (manual stop via DELETE is unreliable).
|
||||||
|
|
||||||
|
```json5
|
||||||
|
{
|
||||||
|
channels: {
|
||||||
|
bluebubbles: {
|
||||||
|
sendReadReceipts: false // disable read receipts
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Advanced actions
|
||||||
|
BlueBubbles supports advanced message actions when enabled in config:
|
||||||
|
|
||||||
|
```json5
|
||||||
|
{
|
||||||
|
channels: {
|
||||||
|
bluebubbles: {
|
||||||
|
actions: {
|
||||||
|
reactions: true, // tapbacks (default: true)
|
||||||
|
edit: true, // edit sent messages (macOS 13+, broken on macOS 26 Tahoe)
|
||||||
|
unsend: true, // unsend messages (macOS 13+)
|
||||||
|
reply: true, // reply threading by message GUID
|
||||||
|
sendWithEffect: true, // message effects (slam, loud, etc.)
|
||||||
|
renameGroup: true, // rename group chats
|
||||||
|
setGroupIcon: true, // set group chat icon/photo (flaky on macOS 26 Tahoe)
|
||||||
|
addParticipant: true, // add participants to groups
|
||||||
|
removeParticipant: true, // remove participants from groups
|
||||||
|
leaveGroup: true, // leave group chats
|
||||||
|
sendAttachment: true // send attachments/media
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Available actions:
|
||||||
|
- **react**: Add/remove tapback reactions (`messageId`, `emoji`, `remove`)
|
||||||
|
- **edit**: Edit a sent message (`messageId`, `text`)
|
||||||
|
- **unsend**: Unsend a message (`messageId`)
|
||||||
|
- **reply**: Reply to a specific message (`messageId`, `text`, `to`)
|
||||||
|
- **sendWithEffect**: Send with iMessage effect (`text`, `to`, `effectId`)
|
||||||
|
- **renameGroup**: Rename a group chat (`chatGuid`, `displayName`)
|
||||||
|
- **setGroupIcon**: Set a group chat's icon/photo (`chatGuid`, `media`) — flaky on macOS 26 Tahoe (API may return success but the icon does not sync).
|
||||||
|
- **addParticipant**: Add someone to a group (`chatGuid`, `address`)
|
||||||
|
- **removeParticipant**: Remove someone from a group (`chatGuid`, `address`)
|
||||||
|
- **leaveGroup**: Leave a group chat (`chatGuid`)
|
||||||
|
- **sendAttachment**: Send media/files (`to`, `buffer`, `filename`)
|
||||||
|
|
||||||
|
## Block streaming
|
||||||
|
Control whether responses are sent as a single message or streamed in blocks:
|
||||||
|
```json5
|
||||||
|
{
|
||||||
|
channels: {
|
||||||
|
bluebubbles: {
|
||||||
|
blockStreaming: true // enable block streaming (default behavior)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Media + limits
|
||||||
|
- Inbound attachments are downloaded and stored in the media cache.
|
||||||
|
- Media cap via `channels.bluebubbles.mediaMaxMb` (default: 8 MB).
|
||||||
|
- Outbound text is chunked to `channels.bluebubbles.textChunkLimit` (default: 4000 chars).
|
||||||
|
|
||||||
|
## Configuration reference
|
||||||
|
Full configuration: [Configuration](/gateway/configuration)
|
||||||
|
|
||||||
|
Provider options:
|
||||||
|
- `channels.bluebubbles.enabled`: Enable/disable the channel.
|
||||||
|
- `channels.bluebubbles.serverUrl`: BlueBubbles REST API base URL.
|
||||||
|
- `channels.bluebubbles.password`: API password.
|
||||||
|
- `channels.bluebubbles.webhookPath`: Webhook endpoint path (default: `/bluebubbles-webhook`).
|
||||||
|
- `channels.bluebubbles.dmPolicy`: `pairing | allowlist | open | disabled` (default: `pairing`).
|
||||||
|
- `channels.bluebubbles.allowFrom`: DM allowlist (handles, emails, E.164 numbers, `chat_id:*`, `chat_guid:*`).
|
||||||
|
- `channels.bluebubbles.groupPolicy`: `open | allowlist | disabled` (default: `allowlist`).
|
||||||
|
- `channels.bluebubbles.groupAllowFrom`: Group sender allowlist.
|
||||||
|
- `channels.bluebubbles.groups`: Per-group config (`requireMention`, etc.).
|
||||||
|
- `channels.bluebubbles.sendReadReceipts`: Send read receipts (default: `true`).
|
||||||
|
- `channels.bluebubbles.blockStreaming`: Enable block streaming (default: `true`).
|
||||||
|
- `channels.bluebubbles.textChunkLimit`: Outbound chunk size in chars (default: 4000).
|
||||||
|
- `channels.bluebubbles.mediaMaxMb`: Inbound media cap in MB (default: 8).
|
||||||
|
- `channels.bluebubbles.historyLimit`: Max group messages for context (0 disables).
|
||||||
|
- `channels.bluebubbles.dmHistoryLimit`: DM history limit.
|
||||||
|
- `channels.bluebubbles.actions`: Enable/disable specific actions.
|
||||||
|
- `channels.bluebubbles.accounts`: Multi-account configuration.
|
||||||
|
|
||||||
|
Related global options:
|
||||||
|
- `agents.list[].groupChat.mentionPatterns` (or `messages.groupChat.mentionPatterns`).
|
||||||
|
- `messages.responsePrefix`.
|
||||||
|
|
||||||
|
## Addressing / delivery targets
|
||||||
|
Prefer `chat_guid` for stable routing:
|
||||||
|
- `chat_guid:iMessage;-;+15555550123` (preferred for groups)
|
||||||
|
- `chat_id:123`
|
||||||
|
- `chat_identifier:...`
|
||||||
|
- Direct handles: `+15555550123`, `user@example.com`
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
- Webhook requests are authenticated by comparing `guid`/`password` query params or headers against `channels.bluebubbles.password`. Requests from `localhost` are also accepted.
|
- Webhook requests are authenticated by comparing `guid`/`password` query params or headers against `channels.bluebubbles.password`. Requests from `localhost` are also accepted.
|
||||||
@@ -57,8 +205,12 @@ Status: bundled plugin (disabled by default) that talks to the BlueBubbles macOS
|
|||||||
- Enable HTTPS + firewall rules on the BlueBubbles server if exposing it outside your LAN.
|
- Enable HTTPS + firewall rules on the BlueBubbles server if exposing it outside your LAN.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
- If Voice/typing events stop working, check the BlueBubbles webhook logs and verify the gateway path matches `channels.bluebubbles.webhookPath`.
|
- If typing/read events stop working, check the BlueBubbles webhook logs and verify the gateway path matches `channels.bluebubbles.webhookPath`.
|
||||||
- Pairing codes expire after one hour; use `clawdbot pairing list bluebubbles` and `clawdbot pairing approve bluebubbles <code>`.
|
- Pairing codes expire after one hour; use `clawdbot pairing list bluebubbles` and `clawdbot pairing approve bluebubbles <code>`.
|
||||||
- Reactions require the BlueBubbles private API (`POST /api/v1/message/react`); ensure the server version exposes it.
|
- Reactions require the BlueBubbles private API (`POST /api/v1/message/react`); ensure the server version exposes it.
|
||||||
|
- Edit/unsend require macOS 13+ and a compatible BlueBubbles server version. On macOS 26 (Tahoe), edit is currently broken due to private API changes.
|
||||||
|
- Group icon updates can be flaky on macOS 26 (Tahoe): the API may return success but the new icon does not sync.
|
||||||
|
- Clawdbot auto-hides known-broken actions based on the BlueBubbles server's macOS version. If edit still appears on macOS 26 (Tahoe), disable it manually with `channels.bluebubbles.actions.edit=false`.
|
||||||
|
- For status/health info: `clawdbot status --all` or `clawdbot status --deep`.
|
||||||
|
|
||||||
For general channel workflow reference, see [/channels/index] and the [[plugins|/plugin]] guide.
|
For general channel workflow reference, see [Channels](/channels) and the [Plugins](/plugins) guide.
|
||||||
@@ -16,11 +16,12 @@ Text is supported everywhere; media and reactions vary by channel.
|
|||||||
- [Discord](/channels/discord) — Discord Bot API + Gateway; supports servers, channels, and DMs.
|
- [Discord](/channels/discord) — Discord Bot API + Gateway; supports servers, channels, and DMs.
|
||||||
- [Slack](/channels/slack) — Bolt SDK; workspace apps.
|
- [Slack](/channels/slack) — Bolt SDK; workspace apps.
|
||||||
- [Signal](/channels/signal) — signal-cli; privacy-focused.
|
- [Signal](/channels/signal) — signal-cli; privacy-focused.
|
||||||
- [iMessage](/channels/imessage) — macOS only; native integration.
|
- [BlueBubbles](/channels/bluebubbles) — **Recommended for iMessage**; uses the BlueBubbles macOS server REST API with full feature support (edit, unsend, effects, reactions, group management — edit currently broken on macOS 26 Tahoe).
|
||||||
- [BlueBubbles](/channels/bluebubbles) — iMessage via BlueBubbles macOS server (bundled plugin, disabled by default).
|
- [iMessage](/channels/imessage) — macOS only; native integration via imsg (legacy, consider BlueBubbles for new setups).
|
||||||
- [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.
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ Clawdbot normalizes shared locations from chat channels into:
|
|||||||
Currently supported:
|
Currently supported:
|
||||||
- **Telegram** (location pins + venues + live locations)
|
- **Telegram** (location pins + venues + live locations)
|
||||||
- **WhatsApp** (locationMessage + liveLocationMessage)
|
- **WhatsApp** (locationMessage + liveLocationMessage)
|
||||||
|
- **Matrix** (`m.location` with `geo_uri`)
|
||||||
|
|
||||||
## Text formatting
|
## Text formatting
|
||||||
Locations are rendered as friendly lines without brackets:
|
Locations are rendered as friendly lines without brackets:
|
||||||
@@ -44,3 +45,4 @@ When a location is present, these fields are added to `ctx`:
|
|||||||
## Channel notes
|
## Channel notes
|
||||||
- **Telegram**: venues map to `LocationName/LocationAddress`; live locations use `live_period`.
|
- **Telegram**: venues map to `LocationName/LocationAddress`; live locations use `live_period`.
|
||||||
- **WhatsApp**: `locationMessage.comment` and `liveLocationMessage.caption` are appended as the caption line.
|
- **WhatsApp**: `locationMessage.comment` and `liveLocationMessage.caption` are appended as the caption line.
|
||||||
|
- **Matrix**: `geo_uri` is parsed as a pin location; altitude is ignored and `LocationIsLive` is always false.
|
||||||
+123
-26
@@ -5,17 +5,26 @@ read_when:
|
|||||||
---
|
---
|
||||||
# Matrix (plugin)
|
# Matrix (plugin)
|
||||||
|
|
||||||
Status: supported via plugin (matrix-js-sdk). Direct messages, rooms, threads, media, reactions, and polls.
|
Matrix is an open, decentralized messaging protocol. Clawdbot connects as a Matrix **user**
|
||||||
|
on any homeserver, so you need a Matrix account for the bot. Once it is logged in, you can DM
|
||||||
|
the bot directly or invite it to rooms (Matrix "groups"). Beeper is a valid client option too,
|
||||||
|
but it requires E2EE to be enabled.
|
||||||
|
|
||||||
|
Status: supported via plugin (matrix-bot-sdk). Direct messages, rooms, threads, media, reactions,
|
||||||
|
polls (send + poll-start as text), location, and E2EE (with crypto support).
|
||||||
|
|
||||||
## Plugin required
|
## Plugin required
|
||||||
|
|
||||||
Matrix ships as a plugin and is not bundled with the core install.
|
Matrix ships as a plugin and is not bundled with the core install.
|
||||||
|
|
||||||
Install via CLI (npm registry):
|
Install via CLI (npm registry):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
clawdbot plugins install @clawdbot/matrix
|
clawdbot plugins install @clawdbot/matrix
|
||||||
```
|
```
|
||||||
|
|
||||||
Local checkout (when running from a git repo):
|
Local checkout (when running from a git repo):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
clawdbot plugins install ./extensions/matrix
|
clawdbot plugins install ./extensions/matrix
|
||||||
```
|
```
|
||||||
@@ -25,27 +34,54 @@ Clawdbot will offer the local install path automatically.
|
|||||||
|
|
||||||
Details: [Plugins](/plugin)
|
Details: [Plugins](/plugin)
|
||||||
|
|
||||||
## Quick setup (beginner)
|
## Setup
|
||||||
|
|
||||||
1) Install the Matrix plugin:
|
1) Install the Matrix plugin:
|
||||||
- From npm: `clawdbot plugins install @clawdbot/matrix`
|
- From npm: `clawdbot plugins install @clawdbot/matrix`
|
||||||
- From a local checkout: `clawdbot plugins install ./extensions/matrix`
|
- From a local checkout: `clawdbot plugins install ./extensions/matrix`
|
||||||
2) Configure credentials:
|
2) Create a Matrix account on a homeserver:
|
||||||
- Env: `MATRIX_HOMESERVER`, `MATRIX_USER_ID`, `MATRIX_ACCESS_TOKEN` (or `MATRIX_PASSWORD`)
|
- Browse hosting options at [https://matrix.org/ecosystem/hosting/](https://matrix.org/ecosystem/hosting/)
|
||||||
|
- Or host it yourself.
|
||||||
|
3) Get an access token for the bot account:
|
||||||
|
- Use the Matrix login API with `curl` at your home server:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl --request POST \
|
||||||
|
--url https://matrix.example.org/_matrix/client/v3/login \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{
|
||||||
|
"type": "m.login.password",
|
||||||
|
"identifier": {
|
||||||
|
"type": "m.id.user",
|
||||||
|
"user": "your-user-name"
|
||||||
|
},
|
||||||
|
"password": "your-password"
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
- Replace `matrix.example.org` with your homeserver URL.
|
||||||
|
- Or set `channels.matrix.userId` + `channels.matrix.password`: Clawdbot calls the same
|
||||||
|
login endpoint, stores the access token in `~/.clawdbot/credentials/matrix/credentials.json`,
|
||||||
|
and reuses it on next start.
|
||||||
|
4) Configure credentials:
|
||||||
|
- Env: `MATRIX_HOMESERVER`, `MATRIX_ACCESS_TOKEN` (or `MATRIX_USER_ID` + `MATRIX_PASSWORD`)
|
||||||
- Or config: `channels.matrix.*`
|
- Or config: `channels.matrix.*`
|
||||||
- If both are set, config takes precedence.
|
- If both are set, config takes precedence.
|
||||||
3) Restart the gateway (or finish onboarding).
|
- With access token: user ID is fetched automatically via `/whoami`.
|
||||||
4) DM access defaults to pairing; approve the pairing code on first contact.
|
- When set, `channels.matrix.userId` should be the full Matrix ID (example: `@bot:example.org`).
|
||||||
|
5) Restart the gateway (or finish onboarding).
|
||||||
|
6) Start a DM with the bot or invite it to a room from any Matrix client
|
||||||
|
(Element, Beeper, etc.; see https://matrix.org/ecosystem/clients/). Beeper requires E2EE,
|
||||||
|
so set `channels.matrix.encryption: true` and verify the device.
|
||||||
|
|
||||||
Runtime note: Matrix requires Node.js (Bun is not supported).
|
Minimal config (access token, user ID auto-fetched):
|
||||||
|
|
||||||
Minimal config:
|
|
||||||
```json5
|
```json5
|
||||||
{
|
{
|
||||||
channels: {
|
channels: {
|
||||||
matrix: {
|
matrix: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
homeserver: "https://matrix.example.org",
|
homeserver: "https://matrix.example.org",
|
||||||
userId: "@clawdbot:example.org",
|
|
||||||
accessToken: "syt_***",
|
accessToken: "syt_***",
|
||||||
dm: { policy: "pairing" }
|
dm: { policy: "pairing" }
|
||||||
}
|
}
|
||||||
@@ -53,18 +89,57 @@ Minimal config:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Encryption (E2EE)
|
E2EE config (end to end encryption enabled):
|
||||||
End-to-end encrypted rooms are **not** supported.
|
|
||||||
- Use unencrypted rooms or disable encryption when creating the room.
|
|
||||||
- If a room is E2EE, the bot will receive encrypted events and won’t reply.
|
|
||||||
|
|
||||||
## What it is
|
```json5
|
||||||
Matrix is an open messaging protocol. Clawdbot connects as a Matrix user and listens to DMs and rooms.
|
{
|
||||||
- A Matrix user account owned by the Gateway.
|
channels: {
|
||||||
- Deterministic routing: replies go back to Matrix.
|
matrix: {
|
||||||
|
enabled: true,
|
||||||
|
homeserver: "https://matrix.example.org",
|
||||||
|
accessToken: "syt_***",
|
||||||
|
encryption: true,
|
||||||
|
dm: { policy: "pairing" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Encryption (E2EE)
|
||||||
|
|
||||||
|
End-to-end encryption is **supported** via the Rust crypto SDK.
|
||||||
|
|
||||||
|
Enable with `channels.matrix.encryption: true`:
|
||||||
|
|
||||||
|
- If the crypto module loads, encrypted rooms are decrypted automatically.
|
||||||
|
- Outbound media is encrypted when sending to encrypted rooms.
|
||||||
|
- On first connection, Clawdbot requests device verification from your other sessions.
|
||||||
|
- Verify the device in another Matrix client (Element, etc.) to enable key sharing.
|
||||||
|
- If the crypto module cannot be loaded, E2EE is disabled and encrypted rooms will not decrypt;
|
||||||
|
Clawdbot logs a warning.
|
||||||
|
- If you see missing crypto module errors (for example, `@matrix-org/matrix-sdk-crypto-nodejs-*`),
|
||||||
|
allow build scripts for `@matrix-org/matrix-sdk-crypto-nodejs` and run
|
||||||
|
`pnpm rebuild @matrix-org/matrix-sdk-crypto-nodejs` or fetch the binary with
|
||||||
|
`node node_modules/@matrix-org/matrix-sdk-crypto-nodejs/download-lib.js`.
|
||||||
|
|
||||||
|
Crypto state is stored per account + access token in
|
||||||
|
`~/.clawdbot/matrix/accounts/<account>/<homeserver>__<user>/<token-hash>/crypto/`
|
||||||
|
(SQLite database). Sync state lives alongside it in `bot-storage.json`.
|
||||||
|
If the access token (device) changes, a new store is created and the bot must be
|
||||||
|
re-verified for encrypted rooms.
|
||||||
|
|
||||||
|
**Device verification:**
|
||||||
|
When E2EE is enabled, the bot will request verification from your other sessions on startup.
|
||||||
|
Open Element (or another client) and approve the verification request to establish trust.
|
||||||
|
Once verified, the bot can decrypt messages in encrypted rooms.
|
||||||
|
|
||||||
|
## Routing model
|
||||||
|
|
||||||
|
- Replies always go back to Matrix.
|
||||||
- DMs share the agent's main session; rooms map to group sessions.
|
- DMs share the agent's main session; rooms map to group sessions.
|
||||||
|
|
||||||
## Access control (DMs)
|
## Access control (DMs)
|
||||||
|
|
||||||
- Default: `channels.matrix.dm.policy = "pairing"`. Unknown senders get a pairing code.
|
- Default: `channels.matrix.dm.policy = "pairing"`. Unknown senders get a pairing code.
|
||||||
- Approve via:
|
- Approve via:
|
||||||
- `clawdbot pairing list matrix`
|
- `clawdbot pairing list matrix`
|
||||||
@@ -73,58 +148,80 @@ Matrix is an open messaging protocol. Clawdbot connects as a Matrix user and lis
|
|||||||
- `channels.matrix.dm.allowFrom` accepts user IDs or display names. The wizard resolves display names to user IDs when directory search is available.
|
- `channels.matrix.dm.allowFrom` accepts user IDs or display names. The wizard resolves display names to user IDs when directory search is available.
|
||||||
|
|
||||||
## Rooms (groups)
|
## Rooms (groups)
|
||||||
|
|
||||||
- Default: `channels.matrix.groupPolicy = "allowlist"` (mention-gated). Use `channels.defaults.groupPolicy` to override the default when unset.
|
- Default: `channels.matrix.groupPolicy = "allowlist"` (mention-gated). Use `channels.defaults.groupPolicy` to override the default when unset.
|
||||||
- Allowlist rooms with `channels.matrix.rooms`:
|
- Allowlist rooms with `channels.matrix.groups` (room IDs, aliases, or names):
|
||||||
|
|
||||||
```json5
|
```json5
|
||||||
{
|
{
|
||||||
channels: {
|
channels: {
|
||||||
matrix: {
|
matrix: {
|
||||||
rooms: {
|
groupPolicy: "allowlist",
|
||||||
"!roomId:example.org": { requireMention: true }
|
groups: {
|
||||||
}
|
"!roomId:example.org": { allow: true },
|
||||||
|
"#alias:example.org": { allow: true }
|
||||||
|
},
|
||||||
|
groupAllowFrom: ["@owner:example.org"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `requireMention: false` enables auto-reply in that room.
|
- `requireMention: false` enables auto-reply in that room.
|
||||||
|
- `groups."*"` can set defaults for mention gating across rooms.
|
||||||
|
- `groupAllowFrom` restricts which senders can trigger the bot in rooms (optional).
|
||||||
|
- Per-room `users` allowlists can further restrict senders inside a specific room.
|
||||||
- The configure wizard prompts for room allowlists (room IDs, aliases, or names) and resolves names when possible.
|
- The configure wizard prompts for room allowlists (room IDs, aliases, or names) and resolves names when possible.
|
||||||
- On startup, Clawdbot resolves room/user names in allowlists to IDs and logs the mapping; unresolved entries are kept as typed.
|
- On startup, Clawdbot resolves room/user names in allowlists to IDs and logs the mapping; unresolved entries are kept as typed.
|
||||||
|
- Invites are auto-joined by default; control with `channels.matrix.autoJoin` and `channels.matrix.autoJoinAllowlist`.
|
||||||
- To allow **no rooms**, set `channels.matrix.groupPolicy: "disabled"` (or keep an empty allowlist).
|
- To allow **no rooms**, set `channels.matrix.groupPolicy: "disabled"` (or keep an empty allowlist).
|
||||||
|
- Legacy key: `channels.matrix.rooms` (same shape as `groups`).
|
||||||
|
|
||||||
## Threads
|
## Threads
|
||||||
|
|
||||||
- Reply threading is supported.
|
- Reply threading is supported.
|
||||||
- `channels.matrix.replyToMode` controls replies when tagged:
|
- `channels.matrix.threadReplies` controls whether replies stay in threads:
|
||||||
|
- `off`, `inbound` (default), `always`
|
||||||
|
- `channels.matrix.replyToMode` controls reply-to metadata when not replying in a thread:
|
||||||
- `off` (default), `first`, `all`
|
- `off` (default), `first`, `all`
|
||||||
|
|
||||||
## Capabilities
|
## Capabilities
|
||||||
|
|
||||||
| Feature | Status |
|
| Feature | Status |
|
||||||
|---------|--------|
|
|---------|--------|
|
||||||
| Direct messages | ✅ Supported |
|
| Direct messages | ✅ Supported |
|
||||||
| Rooms | ✅ Supported |
|
| Rooms | ✅ Supported |
|
||||||
| Threads | ✅ Supported |
|
| Threads | ✅ Supported |
|
||||||
| Media | ✅ Supported |
|
| Media | ✅ Supported |
|
||||||
| Reactions | ✅ Supported |
|
| E2EE | ✅ Supported (crypto module required) |
|
||||||
| Polls | ✅ Supported |
|
| Reactions | ✅ Supported (send/read via tools) |
|
||||||
|
| Polls | ✅ Send supported; inbound poll starts are converted to text (responses/ends ignored) |
|
||||||
|
| Location | ✅ Supported (geo URI; altitude ignored) |
|
||||||
| Native commands | ✅ Supported |
|
| Native commands | ✅ Supported |
|
||||||
|
|
||||||
## Configuration reference (Matrix)
|
## Configuration reference (Matrix)
|
||||||
|
|
||||||
Full configuration: [Configuration](/gateway/configuration)
|
Full configuration: [Configuration](/gateway/configuration)
|
||||||
|
|
||||||
Provider options:
|
Provider options:
|
||||||
|
|
||||||
- `channels.matrix.enabled`: enable/disable channel startup.
|
- `channels.matrix.enabled`: enable/disable channel startup.
|
||||||
- `channels.matrix.homeserver`: homeserver URL.
|
- `channels.matrix.homeserver`: homeserver URL.
|
||||||
- `channels.matrix.userId`: Matrix user ID.
|
- `channels.matrix.userId`: Matrix user ID (optional with access token).
|
||||||
- `channels.matrix.accessToken`: access token.
|
- `channels.matrix.accessToken`: access token.
|
||||||
- `channels.matrix.password`: password for login (token stored).
|
- `channels.matrix.password`: password for login (token stored).
|
||||||
- `channels.matrix.deviceName`: device display name.
|
- `channels.matrix.deviceName`: device display name.
|
||||||
|
- `channels.matrix.encryption`: enable E2EE (default: false).
|
||||||
- `channels.matrix.initialSyncLimit`: initial sync limit.
|
- `channels.matrix.initialSyncLimit`: initial sync limit.
|
||||||
- `channels.matrix.threadReplies`: `off | inbound | always` (default: inbound).
|
- `channels.matrix.threadReplies`: `off | inbound | always` (default: inbound).
|
||||||
- `channels.matrix.textChunkLimit`: outbound text chunk size (chars).
|
- `channels.matrix.textChunkLimit`: outbound text chunk size (chars).
|
||||||
- `channels.matrix.dm.policy`: `pairing | allowlist | open | disabled` (default: pairing).
|
- `channels.matrix.dm.policy`: `pairing | allowlist | open | disabled` (default: pairing).
|
||||||
- `channels.matrix.dm.allowFrom`: DM allowlist (user IDs or display names). `open` requires `"*"`. The wizard resolves names to IDs when possible.
|
- `channels.matrix.dm.allowFrom`: DM allowlist (user IDs or display names). `open` requires `"*"`. The wizard resolves names to IDs when possible.
|
||||||
- `channels.matrix.groupPolicy`: `allowlist | open | disabled` (default: allowlist).
|
- `channels.matrix.groupPolicy`: `allowlist | open | disabled` (default: allowlist).
|
||||||
|
- `channels.matrix.groupAllowFrom`: allowlisted senders for group messages.
|
||||||
- `channels.matrix.allowlistOnly`: force allowlist rules for DMs + rooms.
|
- `channels.matrix.allowlistOnly`: force allowlist rules for DMs + rooms.
|
||||||
- `channels.matrix.rooms`: per-room settings and allowlist.
|
- `channels.matrix.groups`: group allowlist + per-room settings map.
|
||||||
|
- `channels.matrix.rooms`: legacy group allowlist/config.
|
||||||
- `channels.matrix.replyToMode`: reply-to mode for threads/tags.
|
- `channels.matrix.replyToMode`: reply-to mode for threads/tags.
|
||||||
- `channels.matrix.mediaMaxMb`: inbound/outbound media cap (MB).
|
- `channels.matrix.mediaMaxMb`: inbound/outbound media cap (MB).
|
||||||
- `channels.matrix.autoJoin`: invite handling (`always | allowlist | off`, default: always).
|
- `channels.matrix.autoJoin`: invite handling (`always | allowlist | off`, default: always).
|
||||||
|
|||||||
@@ -0,0 +1,235 @@
|
|||||||
|
---
|
||||||
|
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).
|
||||||
+3
-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-gateway._tcp`).
|
`gateway discover` scans for Gateway beacons (`_clawdbot-gw._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))
|
||||||
@@ -124,6 +124,8 @@ clawdbot gateway call logs.tail --params '{"sinceMs": 60000}'
|
|||||||
Only gateways with Bonjour discovery enabled (default) advertise the beacon.
|
Only gateways with Bonjour discovery enabled (default) advertise the beacon.
|
||||||
|
|
||||||
Wide-Area discovery records include (TXT):
|
Wide-Area discovery records include (TXT):
|
||||||
|
- `role` (gateway role hint)
|
||||||
|
- `transport` (transport hint, e.g. `gateway`)
|
||||||
- `gatewayPort` (WebSocket port, usually `18789`)
|
- `gatewayPort` (WebSocket port, usually `18789`)
|
||||||
- `sshPort` (SSH port; defaults to `22` if not present)
|
- `sshPort` (SSH port; defaults to `22` if not present)
|
||||||
- `tailnetDns` (MagicDNS hostname, when available)
|
- `tailnetDns` (MagicDNS hostname, when available)
|
||||||
|
|||||||
@@ -114,6 +114,9 @@ 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,3 +21,4 @@ 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.
|
||||||
@@ -20,4 +20,5 @@ Notes:
|
|||||||
- `--deep` runs live probes (WhatsApp Web + Telegram + Discord + Slack + Signal).
|
- `--deep` runs live probes (WhatsApp Web + Telegram + Discord + Slack + Signal).
|
||||||
- Output includes per-agent session stores when multiple agents are configured.
|
- Output includes per-agent session stores when multiple agents are configured.
|
||||||
- Overview includes Gateway + Node service install/runtime status when available.
|
- Overview includes Gateway + Node service install/runtime status when available.
|
||||||
|
- Overview includes update channel + git SHA (for source checkouts).
|
||||||
- Update info surfaces in the Overview; if an update is available, status prints a hint to run `clawdbot update` (see [Updating](/install/updating)).
|
- Update info surfaces in the Overview; if an update is available, status prints a hint to run `clawdbot update` (see [Updating](/install/updating)).
|
||||||
+30
-5
@@ -15,7 +15,9 @@ If you installed via **npm/pnpm** (global install, no git metadata), use the pac
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
clawdbot update
|
clawdbot update
|
||||||
|
clawdbot update status
|
||||||
clawdbot update --channel beta
|
clawdbot update --channel beta
|
||||||
|
clawdbot update --channel dev
|
||||||
clawdbot update --tag beta
|
clawdbot update --tag beta
|
||||||
clawdbot update --restart
|
clawdbot update --restart
|
||||||
clawdbot update --json
|
clawdbot update --json
|
||||||
@@ -25,22 +27,44 @@ clawdbot --update
|
|||||||
## Options
|
## Options
|
||||||
|
|
||||||
- `--restart`: restart the Gateway daemon after a successful update.
|
- `--restart`: restart the Gateway daemon after a successful update.
|
||||||
- `--channel <stable|beta>`: set the update channel for npm installs (persisted in config).
|
- `--channel <stable|beta|dev>`: set the update channel (git + npm; persisted in config).
|
||||||
- `--tag <dist-tag|version>`: override the npm dist-tag or version for this update only.
|
- `--tag <dist-tag|version>`: override the npm dist-tag or version for this update only.
|
||||||
- `--json`: print machine-readable `UpdateRunResult` JSON.
|
- `--json`: print machine-readable `UpdateRunResult` JSON.
|
||||||
- `--timeout <seconds>`: per-step timeout (default is 1200s).
|
- `--timeout <seconds>`: per-step timeout (default is 1200s).
|
||||||
|
|
||||||
Note: downgrades require confirmation because older versions can break configuration.
|
Note: downgrades require confirmation because older versions can break configuration.
|
||||||
|
|
||||||
|
## `update status`
|
||||||
|
|
||||||
|
Show the active update channel + git tag/branch/SHA (for source checkouts), plus update availability.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
clawdbot update status
|
||||||
|
clawdbot update status --json
|
||||||
|
clawdbot update status --timeout 10
|
||||||
|
```
|
||||||
|
|
||||||
|
Options:
|
||||||
|
- `--json`: print machine-readable status JSON.
|
||||||
|
- `--timeout <seconds>`: timeout for checks (default is 3s).
|
||||||
|
|
||||||
## What it does (git checkout)
|
## What it does (git checkout)
|
||||||
|
|
||||||
|
Channels:
|
||||||
|
|
||||||
|
- `stable`: checkout the latest non-beta tag, then build + doctor.
|
||||||
|
- `beta`: checkout the latest `-beta` tag, then build + doctor.
|
||||||
|
- `dev`: checkout `main`, then fetch + rebase.
|
||||||
|
|
||||||
High-level:
|
High-level:
|
||||||
|
|
||||||
1. Requires a clean worktree (no uncommitted changes).
|
1. Requires a clean worktree (no uncommitted changes).
|
||||||
2. Fetches and rebases against `@{upstream}`.
|
2. Switches to the selected channel (tag or branch).
|
||||||
3. Installs deps (pnpm preferred; npm fallback).
|
3. Fetches and rebases against `@{upstream}` (dev only).
|
||||||
4. Builds + builds the Control UI.
|
4. Installs deps (pnpm preferred; npm fallback).
|
||||||
5. Runs `clawdbot doctor` as the final “safe update” check.
|
5. Builds + builds the Control UI.
|
||||||
|
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
|
||||||
|
|
||||||
@@ -49,5 +73,6 @@ High-level:
|
|||||||
## See also
|
## See also
|
||||||
|
|
||||||
- `clawdbot doctor` (offers to run update first on git checkouts)
|
- `clawdbot doctor` (offers to run update first on git checkouts)
|
||||||
|
- [Development channels](/install/development-channels)
|
||||||
- [Updating](/install/updating)
|
- [Updating](/install/updating)
|
||||||
- [CLI reference](/cli)
|
- [CLI reference](/cli)
|
||||||
@@ -149,6 +149,14 @@ Control how group/room messages are handled per channel:
|
|||||||
slack: {
|
slack: {
|
||||||
groupPolicy: "allowlist",
|
groupPolicy: "allowlist",
|
||||||
channels: { "#general": { allow: true } }
|
channels: { "#general": { allow: true } }
|
||||||
|
},
|
||||||
|
matrix: {
|
||||||
|
groupPolicy: "allowlist",
|
||||||
|
groupAllowFrom: ["@owner:example.org"],
|
||||||
|
groups: {
|
||||||
|
"!roomId:example.org": { allow: true },
|
||||||
|
"#alias:example.org": { allow: true }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -165,6 +173,7 @@ Notes:
|
|||||||
- WhatsApp/Telegram/Signal/iMessage/Microsoft Teams: use `groupAllowFrom` (fallback: explicit `allowFrom`).
|
- WhatsApp/Telegram/Signal/iMessage/Microsoft Teams: use `groupAllowFrom` (fallback: explicit `allowFrom`).
|
||||||
- Discord: allowlist uses `channels.discord.guilds.<id>.channels`.
|
- Discord: allowlist uses `channels.discord.guilds.<id>.channels`.
|
||||||
- Slack: allowlist uses `channels.slack.channels`.
|
- Slack: allowlist uses `channels.slack.channels`.
|
||||||
|
- Matrix: allowlist uses `channels.matrix.groups` (room IDs, aliases, or names). Use `channels.matrix.groupAllowFrom` to restrict senders; per-room `users` allowlists are also supported.
|
||||||
- Group DMs are controlled separately (`channels.discord.dm.*`, `channels.slack.dm.*`).
|
- Group DMs are controlled separately (`channels.discord.dm.*`, `channels.slack.dm.*`).
|
||||||
- Telegram allowlist can match user IDs (`"123456789"`, `"telegram:123456789"`, `"tg:123456789"`) or usernames (`"@alice"` or `"alice"`); prefixes are case-insensitive.
|
- Telegram allowlist can match user IDs (`"123456789"`, `"telegram:123456789"`, `"tg:123456789"`) or usernames (`"@alice"` or `"alice"`); prefixes are case-insensitive.
|
||||||
- Default is `groupPolicy: "allowlist"`; if your group allowlist is empty, group messages are blocked.
|
- Default is `groupPolicy: "allowlist"`; if your group allowlist is empty, group messages are blocked.
|
||||||
|
|||||||
@@ -256,6 +256,52 @@ 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:
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ the workspace is writable. See [Memory](/concepts/memory) and
|
|||||||
- Idle reset (optional): `idleMinutes` adds a sliding idle window. When both daily and idle resets are configured, **whichever expires first** forces a new session.
|
- Idle reset (optional): `idleMinutes` adds a sliding idle window. When both daily and idle resets are configured, **whichever expires first** forces a new session.
|
||||||
- Legacy idle-only: if you set `session.idleMinutes` without any `session.reset`/`resetByType` config, Clawdbot stays in idle-only mode for backward compatibility.
|
- Legacy idle-only: if you set `session.idleMinutes` without any `session.reset`/`resetByType` config, Clawdbot stays in idle-only mode for backward compatibility.
|
||||||
- Per-type overrides (optional): `resetByType` lets you override the policy for `dm`, `group`, and `thread` sessions (thread = Slack/Discord threads, Telegram topics, Matrix threads when provided by the connector).
|
- Per-type overrides (optional): `resetByType` lets you override the policy for `dm`, `group`, and `thread` sessions (thread = Slack/Discord threads, Telegram topics, Matrix threads when provided by the connector).
|
||||||
- Reset triggers: exact `/new` or `/reset` (plus any extras in `resetTriggers`) start a fresh session id and pass the remainder of the message through. If `/new` or `/reset` is sent alone, Clawdbot runs a short “hello” greeting turn to confirm the reset.
|
- Reset triggers: exact `/new` or `/reset` (plus any extras in `resetTriggers`) start a fresh session id and pass the remainder of the message through. `/new <model>` accepts a model alias, `provider/model`, or provider name (fuzzy match) to set the new session model. If `/new` or `/reset` is sent alone, Clawdbot runs a short “hello” greeting turn to confirm the reset.
|
||||||
- Manual reset: delete specific keys from the store or remove the JSONL transcript; the next message recreates them.
|
- Manual reset: delete specific keys from the store or remove the JSONL transcript; the next message recreates them.
|
||||||
- Isolated cron jobs always mint a fresh `sessionId` per run (no idle reuse).
|
- Isolated cron jobs always mint a fresh `sessionId` per run (no idle reuse).
|
||||||
|
|
||||||
|
|||||||
@@ -793,6 +793,7 @@
|
|||||||
"install/index",
|
"install/index",
|
||||||
"install/installer",
|
"install/installer",
|
||||||
"install/updating",
|
"install/updating",
|
||||||
|
"install/development-channels",
|
||||||
"install/uninstall",
|
"install/uninstall",
|
||||||
"install/ansible",
|
"install/ansible",
|
||||||
"install/nix",
|
"install/nix",
|
||||||
|
|||||||
@@ -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-bridge._tcp` under a dedicated zone
|
2) Publish DNS‑SD records for `_clawdbot-gw._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-bridge._tcp clawdbot.internal.
|
dns-sd -B _clawdbot-gw._tcp clawdbot.internal.
|
||||||
dig @<TAILNET_IPV4> -p 53 _clawdbot-bridge._tcp.clawdbot.internal PTR +short
|
dig @<TAILNET_IPV4> -p 53 _clawdbot-gw._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-bridge._tcp` in `clawdbot.internal.` without multicast.
|
`_clawdbot-gw._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 (when the **bridge is enabled**) advertises `_clawdbot-bridge._tcp`.
|
Only the Gateway advertises `_clawdbot-gw._tcp`.
|
||||||
|
|
||||||
## Service types
|
## Service types
|
||||||
|
|
||||||
- `_clawdbot-bridge._tcp` — bridge transport beacon (used by macOS/iOS/Android nodes).
|
- `_clawdbot-gw._tcp` — gateway 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-bridge._tcp local.
|
dns-sd -B _clawdbot-gw._tcp local.
|
||||||
```
|
```
|
||||||
- Resolve one instance (replace `<instance>`):
|
- Resolve one instance (replace `<instance>`):
|
||||||
```bash
|
```bash
|
||||||
dns-sd -L "<instance>" _clawdbot-bridge._tcp local.
|
dns-sd -L "<instance>" _clawdbot-gw._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-bridge._tcp`.
|
The iOS node uses `NWBrowser` to discover `_clawdbot-gw._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`. 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.
|
`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.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@@ -2697,6 +2697,7 @@ Remote client defaults (CLI):
|
|||||||
- `gateway.remote.url` sets the default Gateway WebSocket URL for CLI calls when `gateway.mode = "remote"`.
|
- `gateway.remote.url` sets the default Gateway WebSocket URL for CLI calls when `gateway.mode = "remote"`.
|
||||||
- `gateway.remote.token` supplies the token for remote calls (leave unset for no auth).
|
- `gateway.remote.token` supplies the token for remote calls (leave unset for no auth).
|
||||||
- `gateway.remote.password` supplies the password for remote calls (leave unset for no auth).
|
- `gateway.remote.password` supplies the password for remote calls (leave unset for no auth).
|
||||||
|
- `gateway.remote.tlsFingerprint` pins the gateway TLS cert fingerprint (sha256).
|
||||||
|
|
||||||
macOS app behavior:
|
macOS app behavior:
|
||||||
- Clawdbot.app watches `~/.clawdbot/clawdbot.json` and switches modes live when `gateway.mode` or `gateway.remote.url` changes.
|
- Clawdbot.app watches `~/.clawdbot/clawdbot.json` and switches modes live when `gateway.mode` or `gateway.remote.url` changes.
|
||||||
@@ -2710,7 +2711,8 @@ macOS app behavior:
|
|||||||
remote: {
|
remote: {
|
||||||
url: "ws://gateway.tailnet:18789",
|
url: "ws://gateway.tailnet:18789",
|
||||||
token: "your-token",
|
token: "your-token",
|
||||||
password: "your-password"
|
password: "your-password",
|
||||||
|
tlsFingerprint: "sha256:ab12cd34..."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2986,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-bridge._tcp` under `~/.clawdbot/dns/` using the standard discovery domain `clawdbot.internal.`
|
When enabled, the Gateway writes a unicast DNS-SD zone for `_clawdbot-gw._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-bridge._tcp` (bridge transport beacon)
|
- `_clawdbot-gw._tcp` (gateway transport beacon)
|
||||||
- TXT keys (non-secret):
|
- TXT keys (non-secret):
|
||||||
- `role=gateway`
|
- `role=gateway`
|
||||||
- `lanHost=<hostname>.local`
|
- `lanHost=<hostname>.local`
|
||||||
|
|||||||
@@ -20,6 +20,16 @@ handshake time.
|
|||||||
|
|
||||||
## Handshake (connect)
|
## Handshake (connect)
|
||||||
|
|
||||||
|
Gateway → Client (pre-connect challenge):
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type": "event",
|
||||||
|
"event": "connect.challenge",
|
||||||
|
"payload": { "nonce": "…", "ts": 1737264000000 }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Client → Gateway:
|
Client → Gateway:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@@ -43,7 +53,14 @@ Client → Gateway:
|
|||||||
"permissions": {},
|
"permissions": {},
|
||||||
"auth": { "token": "…" },
|
"auth": { "token": "…" },
|
||||||
"locale": "en-US",
|
"locale": "en-US",
|
||||||
"userAgent": "clawdbot-cli/1.2.3"
|
"userAgent": "clawdbot-cli/1.2.3",
|
||||||
|
"device": {
|
||||||
|
"id": "device_fingerprint",
|
||||||
|
"publicKey": "…",
|
||||||
|
"signature": "…",
|
||||||
|
"signedAt": 1737264000000,
|
||||||
|
"nonce": "…"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -99,7 +116,8 @@ When a device token is issued, `hello-ok` also includes:
|
|||||||
"id": "device_fingerprint",
|
"id": "device_fingerprint",
|
||||||
"publicKey": "…",
|
"publicKey": "…",
|
||||||
"signature": "…",
|
"signature": "…",
|
||||||
"signedAt": 1737264000000
|
"signedAt": 1737264000000,
|
||||||
|
"nonce": "…"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,11 +153,22 @@ Nodes declare capability claims at connect time:
|
|||||||
|
|
||||||
The Gateway treats these as **claims** and enforces server-side allowlists.
|
The Gateway treats these as **claims** and enforces server-side allowlists.
|
||||||
|
|
||||||
|
## Presence
|
||||||
|
|
||||||
|
- `system-presence` returns entries keyed by device identity.
|
||||||
|
- Presence entries include `deviceId`, `roles`, and `scopes` so UIs can show a single row per device
|
||||||
|
even when it connects as both **operator** and **node**.
|
||||||
|
|
||||||
### Node helper methods
|
### Node helper methods
|
||||||
|
|
||||||
- Nodes may call `skills.bins` to fetch the current list of skill executables
|
- Nodes may call `skills.bins` to fetch the current list of skill executables
|
||||||
for auto-allow checks.
|
for auto-allow checks.
|
||||||
|
|
||||||
|
## Exec approvals
|
||||||
|
|
||||||
|
- When an exec request needs approval, the gateway broadcasts `exec.approval.requested`.
|
||||||
|
- Operator clients resolve by calling `exec.approval.resolve` (requires `operator.approvals` scope).
|
||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
- `PROTOCOL_VERSION` lives in `src/gateway/protocol/schema.ts`.
|
- `PROTOCOL_VERSION` lives in `src/gateway/protocol/schema.ts`.
|
||||||
@@ -167,12 +196,13 @@ The Gateway treats these as **claims** and enforces server-side allowlists.
|
|||||||
- 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.
|
||||||
- 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.
|
||||||
|
|
||||||
## TLS + pinning
|
## TLS + pinning
|
||||||
|
|
||||||
- TLS is supported for WS connections.
|
- TLS is supported for WS connections.
|
||||||
- Clients may optionally pin the gateway cert fingerprint (see `gateway.tls`
|
- Clients may optionally pin the gateway cert fingerprint (see `gateway.tls`
|
||||||
config and client TLS settings).
|
config plus `gateway.remote.tlsFingerprint` or CLI `--tls-fingerprint`).
|
||||||
|
|
||||||
## Scope
|
## Scope
|
||||||
|
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ Short version: **keep the Gateway loopback-only** unless you’re sure you need
|
|||||||
- **Loopback + SSH/Tailscale Serve** is the safest default (no public exposure).
|
- **Loopback + SSH/Tailscale Serve** is the safest default (no public exposure).
|
||||||
- **Non-loopback binds** (`lan`/`tailnet`/`auto`) must use auth tokens/passwords.
|
- **Non-loopback binds** (`lan`/`tailnet`/`auto`) must use auth tokens/passwords.
|
||||||
- `gateway.remote.token` is **only** for remote CLI calls — it does **not** enable local auth.
|
- `gateway.remote.token` is **only** for remote CLI calls — it does **not** enable local auth.
|
||||||
|
- `gateway.remote.tlsFingerprint` pins the remote TLS cert when using `wss://`.
|
||||||
- **Tailscale Serve** can authenticate via identity headers when `gateway.auth.allowTailscale: true`.
|
- **Tailscale Serve** can authenticate via identity headers when `gateway.auth.allowTailscale: true`.
|
||||||
Set it to `false` if you want tokens/passwords instead.
|
Set it to `false` if you want tokens/passwords instead.
|
||||||
- Treat `browser.controlUrl` like an admin API: tailnet-only + token auth.
|
- Treat `browser.controlUrl` like an admin API: tailnet-only + token auth.
|
||||||
|
|||||||
@@ -105,6 +105,11 @@ 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
|
||||||
@@ -129,6 +134,8 @@ 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,6 +177,7 @@ 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
|
||||||
|
|
||||||
@@ -267,6 +268,7 @@ Doctor can generate one for you: `clawdbot doctor --generate-gateway-token`.
|
|||||||
|
|
||||||
Note: `gateway.remote.token` is **only** for remote CLI calls; it does not
|
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://`.
|
||||||
|
|
||||||
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).
|
||||||
|
|||||||
@@ -79,11 +79,25 @@ This intentionally excludes version managers (nvm/fnm/volta/asdf) and package
|
|||||||
managers (pnpm/npm) because the daemon does not load your shell init. Runtime
|
managers (pnpm/npm) because the daemon does not load your shell init. Runtime
|
||||||
variables like `DISPLAY` should live in `~/.clawdbot/.env` (loaded early by the
|
variables like `DISPLAY` should live in `~/.clawdbot/.env` (loaded early by the
|
||||||
gateway).
|
gateway).
|
||||||
|
Exec runs on `host=gateway` merge your login-shell `PATH` into the exec environment,
|
||||||
|
so missing tools usually mean your shell init isn’t exporting them (or set
|
||||||
|
`tools.exec.pathPrepend`). See [/tools/exec](/tools/exec).
|
||||||
|
|
||||||
WhatsApp + Telegram channels require **Node**; Bun is unsupported. If your
|
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,
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
---
|
||||||
|
summary: "Stable, beta, and dev channels: semantics, switching, and tagging"
|
||||||
|
read_when:
|
||||||
|
- You want to switch between stable/beta/dev
|
||||||
|
- You are tagging or publishing prereleases
|
||||||
|
---
|
||||||
|
|
||||||
|
# Development channels
|
||||||
|
|
||||||
|
Last updated: 2026-01-20
|
||||||
|
|
||||||
|
Clawdbot ships three update channels:
|
||||||
|
|
||||||
|
- **stable**: tagged releases (`vYYYY.M.D` or `vYYYY.M.D-<patch>`). npm dist-tag: `latest`.
|
||||||
|
- **beta**: prerelease tags (`vYYYY.M.D-beta.N`). npm dist-tag: `beta`.
|
||||||
|
- **dev**: moving head of `main` (git). npm dist-tag: `dev` (when published).
|
||||||
|
|
||||||
|
## Switching channels
|
||||||
|
|
||||||
|
Git checkout:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
clawdbot update --channel stable
|
||||||
|
clawdbot update --channel beta
|
||||||
|
clawdbot update --channel dev
|
||||||
|
```
|
||||||
|
|
||||||
|
- `stable`/`beta` check out the latest matching tag.
|
||||||
|
- `dev` switches to `main` and rebases on the upstream.
|
||||||
|
|
||||||
|
npm/pnpm global install:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
clawdbot update --channel stable
|
||||||
|
clawdbot update --channel beta
|
||||||
|
clawdbot update --channel dev
|
||||||
|
```
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
## 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
|
||||||
|
|
||||||
|
- Stable: tag each release (`vYYYY.M.D` or `vYYYY.M.D-<patch>`).
|
||||||
|
- Beta: use `vYYYY.M.D-beta.N` (increment `N`).
|
||||||
|
- Keep tags immutable: never move or reuse a tag.
|
||||||
|
- Publish dist-tags alongside git tags:
|
||||||
|
- `latest` → stable
|
||||||
|
- `beta` → prerelease
|
||||||
|
- `dev` → main snapshot (optional)
|
||||||
|
|
||||||
|
## macOS app availability
|
||||||
|
|
||||||
|
Beta and dev builds may **not** include a macOS app release. That’s OK:
|
||||||
|
|
||||||
|
- The git tag and npm dist-tag can still be published.
|
||||||
|
- Call out “no macOS build for this beta” in release notes or changelog.
|
||||||
@@ -50,20 +50,18 @@ pnpm add -g clawdbot@latest
|
|||||||
```
|
```
|
||||||
We do **not** recommend Bun for the Gateway runtime (WhatsApp/Telegram bugs).
|
We do **not** recommend Bun for the Gateway runtime (WhatsApp/Telegram bugs).
|
||||||
|
|
||||||
To stay on the beta channel for CLI updates:
|
To switch update channels (git + npm installs):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
clawdbot update --channel beta
|
clawdbot update --channel beta
|
||||||
```
|
clawdbot update --channel dev
|
||||||
|
|
||||||
Switch back to stable later:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
clawdbot update --channel stable
|
clawdbot update --channel stable
|
||||||
```
|
```
|
||||||
|
|
||||||
Use `--tag <dist-tag|version>` for a one-off install tag/version.
|
Use `--tag <dist-tag|version>` for a one-off install tag/version.
|
||||||
|
|
||||||
|
See [Development channels](/install/development-channels) for channel semantics and release notes.
|
||||||
|
|
||||||
Note: on npm installs, the gateway logs an update hint on startup (checks the current channel tag). Disable via `update.checkOnStart: false`.
|
Note: on npm installs, the gateway logs an update hint on startup (checks the current channel tag). Disable via `update.checkOnStart: false`.
|
||||||
|
|
||||||
Then:
|
Then:
|
||||||
@@ -88,7 +86,8 @@ clawdbot update --restart
|
|||||||
|
|
||||||
It runs a safe-ish update flow:
|
It runs a safe-ish update flow:
|
||||||
- Requires a clean worktree.
|
- Requires a clean worktree.
|
||||||
- Fetches + rebases against the configured upstream.
|
- Switches to the selected channel (tag or branch).
|
||||||
|
- Fetches + rebases against the configured upstream (dev channel).
|
||||||
- Installs deps, builds, builds the Control UI, and runs `clawdbot doctor`.
|
- Installs deps, builds, builds the Control UI, and runs `clawdbot doctor`.
|
||||||
|
|
||||||
If you installed via **npm/pnpm** (no git metadata), `clawdbot update` will try to update via your package manager. If it can’t detect the install, use “Update (global install)” instead.
|
If you installed via **npm/pnpm** (no git metadata), `clawdbot update` will try to update via your package manager. If it can’t detect the install, use “Update (global install)” instead.
|
||||||
|
|||||||
+173
@@ -136,6 +136,179 @@ 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.
|
||||||
|
|||||||
@@ -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-gateway._tcp local.
|
dns-sd -B _clawdbot-gw._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-gateway._tcp` records.
|
1) Set up a DNS-SD zone (example `clawdbot.internal.`) on the gateway host and publish `_clawdbot-gw._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.13 \
|
APP_VERSION=2026.1.20 \
|
||||||
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.13.zip
|
ditto -c -k --sequesterRsrc --keepParent dist/Clawdbot.app dist/Clawdbot-2026.1.20.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.13.dmg
|
scripts/create-dmg.sh dist/Clawdbot.app dist/Clawdbot-2026.1.20.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.13.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.13 \
|
APP_VERSION=2026.1.20 \
|
||||||
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.13.dSYM.zip
|
ditto -c -k --keepParent apps/macos/.build/release/Clawdbot.app.dSYM dist/Clawdbot-2026.1.20.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.13.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.20.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.13.zip` (and `Clawdbot-2026.1.13.dSYM.zip`) to the GitHub release for tag `v2026.1.13`.
|
- Upload `Clawdbot-2026.1.20.zip` (and `Clawdbot-2026.1.20.dSYM.zip`) to the GitHub release for tag `v2026.1.20`.
|
||||||
- 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`. There is no `clawdbot-mac` CLI; 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`. 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.
|
||||||
|
|
||||||
## 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).
|
||||||
|
|||||||
+14
-6
@@ -140,19 +140,27 @@ 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 discovery (macOS CLI)
|
## Debug gateway connectivity (macOS CLI)
|
||||||
|
|
||||||
Use the debug CLI to exercise the same Bonjour + wide‑area discovery code that the
|
Use the debug CLI to exercise the same Gateway WebSocket handshake and discovery
|
||||||
macOS app uses, without launching the app.
|
logic that the macOS app uses, without launching the app.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd apps/macos
|
cd apps/macos
|
||||||
swift run clawdbot-mac-discovery --timeout 3000 --json
|
swift run clawdbot-mac connect --json
|
||||||
|
swift run clawdbot-mac discover --timeout 3000 --json
|
||||||
```
|
```
|
||||||
|
|
||||||
Options:
|
Connect 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
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ 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)
|
||||||
@@ -375,6 +376,8 @@ Notes:
|
|||||||
- Put config under `channels.<id>` (not `plugins.entries`).
|
- Put config under `channels.<id>` (not `plugins.entries`).
|
||||||
- `meta.label` is used for labels in CLI/UI lists.
|
- `meta.label` is used for labels in CLI/UI lists.
|
||||||
- `meta.aliases` adds alternate ids for normalization and CLI inputs.
|
- `meta.aliases` adds alternate ids for normalization and CLI inputs.
|
||||||
|
- `meta.preferOver` lists channel ids to skip auto-enable when both are configured.
|
||||||
|
- `meta.detailLabel` and `meta.systemImage` let UIs show richer channel labels/icons.
|
||||||
|
|
||||||
### Write a new messaging channel (step‑by‑step)
|
### Write a new messaging channel (step‑by‑step)
|
||||||
|
|
||||||
@@ -388,6 +391,8 @@ Model provider docs live under `/providers/*`.
|
|||||||
2) Define the channel metadata
|
2) Define the channel metadata
|
||||||
- `meta.label`, `meta.selectionLabel`, `meta.docsPath`, `meta.blurb` control CLI/UI lists.
|
- `meta.label`, `meta.selectionLabel`, `meta.docsPath`, `meta.blurb` control CLI/UI lists.
|
||||||
- `meta.docsPath` should point at a docs page like `/channels/<id>`.
|
- `meta.docsPath` should point at a docs page like `/channels/<id>`.
|
||||||
|
- `meta.preferOver` lets a plugin replace another channel (auto-enable prefers it).
|
||||||
|
- `meta.detailLabel` and `meta.systemImage` are used by UIs for detail text/icons.
|
||||||
|
|
||||||
3) Implement the required adapters
|
3) Implement the required adapters
|
||||||
- `config.listAccountIds` + `config.resolveAccount`
|
- `config.listAccountIds` + `config.resolveAccount`
|
||||||
|
|||||||
@@ -61,3 +61,6 @@ Optional keys:
|
|||||||
- The manifest is **required for all plugins**, including local filesystem loads.
|
- The manifest is **required for all plugins**, including local filesystem loads.
|
||||||
- Runtime still loads the plugin module separately; the manifest is only for
|
- Runtime still loads the plugin module separately; the manifest is only for
|
||||||
discovery + validation.
|
discovery + validation.
|
||||||
|
- If your plugin depends on native modules, document the build steps and any
|
||||||
|
package-manager allowlist requirements (for example, pnpm `allow-build-scripts`
|
||||||
|
+ `pnpm rebuild <package>`).
|
||||||
@@ -34,6 +34,30 @@ 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.
|
||||||
|
|||||||
@@ -120,7 +120,11 @@ CLI: `clawdbot approvals` supports gateway or node editing (see [Approvals CLI](
|
|||||||
|
|
||||||
## Approval flow
|
## Approval flow
|
||||||
|
|
||||||
When a prompt is required, the companion app displays a confirmation dialog with:
|
When a prompt is required, the gateway broadcasts `exec.approval.requested` to operator clients.
|
||||||
|
The Control UI and macOS app resolve it via `exec.approval.resolve`, then the gateway forwards the
|
||||||
|
approved request to the node host.
|
||||||
|
|
||||||
|
The confirmation dialog includes:
|
||||||
- command + args
|
- command + args
|
||||||
- cwd
|
- cwd
|
||||||
- agent id
|
- agent id
|
||||||
|
|||||||
+2
-1
@@ -57,7 +57,8 @@ Example:
|
|||||||
|
|
||||||
### PATH handling
|
### PATH handling
|
||||||
|
|
||||||
- `host=gateway`: uses the Gateway process `PATH`. Daemons install a minimal `PATH`:
|
- `host=gateway`: merges your login-shell `PATH` into the exec environment (unless the exec call
|
||||||
|
already sets `env.PATH`). The daemon itself still runs with a minimal `PATH`:
|
||||||
- macOS: `/opt/homebrew/bin`, `/usr/local/bin`, `/usr/bin`, `/bin`
|
- macOS: `/opt/homebrew/bin`, `/usr/local/bin`, `/usr/bin`, `/bin`
|
||||||
- Linux: `/usr/local/bin`, `/usr/bin`, `/bin`
|
- Linux: `/usr/local/bin`, `/usr/bin`, `/bin`
|
||||||
- `host=sandbox`: runs `sh -lc` (login shell) inside the container, so `/etc/profile` may reset `PATH`.
|
- `host=sandbox`: runs `sh -lc` (login shell) inside the container, so `/etc/profile` may reset `PATH`.
|
||||||
|
|||||||
@@ -62,3 +62,14 @@ 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.
|
||||||
@@ -155,6 +155,10 @@ 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 },
|
||||||
@@ -173,6 +177,7 @@ 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).
|
||||||
|
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ They run immediately, are stripped before the model sees the message, and the re
|
|||||||
Text + native (when enabled):
|
Text + native (when enabled):
|
||||||
- `/help`
|
- `/help`
|
||||||
- `/commands`
|
- `/commands`
|
||||||
|
- `/skill <name> [input]` (run a skill by name)
|
||||||
- `/status` (show current status; includes provider usage/quota for the current model provider when available)
|
- `/status` (show current status; includes provider usage/quota for the current model provider when available)
|
||||||
- `/context [list|detail|json]` (explain “context”; `detail` shows per-file + per-tool + per-skill + system prompt size)
|
- `/context [list|detail|json]` (explain “context”; `detail` shows per-file + per-tool + per-skill + system prompt size)
|
||||||
- `/whoami` (show your sender id; alias: `/id`)
|
- `/whoami` (show your sender id; alias: `/id`)
|
||||||
@@ -72,7 +73,7 @@ Text + native (when enabled):
|
|||||||
- `/dock-slack` (alias: `/dock_slack`) (switch replies to Slack)
|
- `/dock-slack` (alias: `/dock_slack`) (switch replies to Slack)
|
||||||
- `/activation mention|always` (groups only)
|
- `/activation mention|always` (groups only)
|
||||||
- `/send on|off|inherit` (owner-only)
|
- `/send on|off|inherit` (owner-only)
|
||||||
- `/reset` or `/new`
|
- `/reset` or `/new [model]` (optional model hint; remainder is passed through)
|
||||||
- `/think <off|minimal|low|medium|high|xhigh>` (dynamic choices by model/provider; aliases: `/thinking`, `/t`)
|
- `/think <off|minimal|low|medium|high|xhigh>` (dynamic choices by model/provider; aliases: `/thinking`, `/t`)
|
||||||
- `/verbose on|full|off` (alias: `/v`)
|
- `/verbose on|full|off` (alias: `/v`)
|
||||||
- `/reasoning on|off|stream` (alias: `/reason`; when on, sends a separate message prefixed `Reasoning:`; `stream` = Telegram draft only)
|
- `/reasoning on|off|stream` (alias: `/reason`; when on, sends a separate message prefixed `Reasoning:`; `stream` = Telegram draft only)
|
||||||
@@ -90,6 +91,7 @@ Text-only:
|
|||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
- Commands accept an optional `:` between the command and args (e.g. `/think: high`, `/send: on`, `/help:`).
|
- Commands accept an optional `:` between the command and args (e.g. `/think: high`, `/send: on`, `/help:`).
|
||||||
|
- `/new <model>` accepts a model alias, `provider/model`, or a provider name (fuzzy match); if no match, the text is treated as the message body.
|
||||||
- For full provider usage breakdown, use `clawdbot status --usage`.
|
- For full provider usage breakdown, use `clawdbot status --usage`.
|
||||||
- `/usage` controls the per-response usage footer; `/usage cost` prints a local cost summary from Clawdbot session logs.
|
- `/usage` controls the per-response usage footer; `/usage cost` prints a local cost summary from Clawdbot session logs.
|
||||||
- `/restart` is disabled by default; set `commands.restart: true` to enable it.
|
- `/restart` is disabled by default; set `commands.restart: true` to enable it.
|
||||||
@@ -102,6 +104,7 @@ Notes:
|
|||||||
- Currently: `/help`, `/commands`, `/status`, `/whoami` (`/id`).
|
- Currently: `/help`, `/commands`, `/status`, `/whoami` (`/id`).
|
||||||
- Unauthorized command-only messages are silently ignored, and inline `/...` tokens are treated as plain text.
|
- Unauthorized command-only messages are silently ignored, and inline `/...` tokens are treated as plain text.
|
||||||
- **Skill commands:** `user-invocable` skills are exposed as slash commands. Names are sanitized to `a-z0-9_` (max 32 chars); collisions get numeric suffixes (e.g. `_2`).
|
- **Skill commands:** `user-invocable` skills are exposed as slash commands. Names are sanitized to `a-z0-9_` (max 32 chars); collisions get numeric suffixes (e.g. `_2`).
|
||||||
|
- `/skill <name> [input]` runs a skill by name (useful when native command limits prevent per-skill commands).
|
||||||
- By default, skill commands are forwarded to the model as a normal request.
|
- By default, skill commands are forwarded to the model as a normal request.
|
||||||
- Skills may optionally declare `command-dispatch: tool` to route the command directly to a tool (deterministic, no model).
|
- Skills may optionally declare `command-dispatch: tool` to route the command directly to a tool (deterministic, no model).
|
||||||
- **Native command arguments:** Discord uses autocomplete for dynamic options (and button menus when you omit required args). Telegram and Slack show a button menu when a command supports choices and you omit the arg.
|
- **Native command arguments:** Discord uses autocomplete for dynamic options (and button menus when you omit required args). Telegram and Slack show a button menu when a command supports choices and you omit the arg.
|
||||||
|
|||||||
@@ -69,7 +69,8 @@ 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 the gateway `send` method.
|
- Otherwise the announce reply is posted to the requester chat channel via a follow-up `agent` call (`deliver=true`).
|
||||||
|
- 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).
|
||||||
|
|||||||
@@ -9,9 +9,17 @@
|
|||||||
"id": "bluebubbles",
|
"id": "bluebubbles",
|
||||||
"label": "BlueBubbles",
|
"label": "BlueBubbles",
|
||||||
"selectionLabel": "BlueBubbles (macOS app)",
|
"selectionLabel": "BlueBubbles (macOS app)",
|
||||||
|
"detailLabel": "BlueBubbles",
|
||||||
"docsPath": "/channels/bluebubbles",
|
"docsPath": "/channels/bluebubbles",
|
||||||
"docsLabel": "bluebubbles",
|
"docsLabel": "bluebubbles",
|
||||||
"blurb": "iMessage via the BlueBubbles mac app + REST API.",
|
"blurb": "iMessage via the BlueBubbles mac app + REST API.",
|
||||||
|
"aliases": [
|
||||||
|
"bb"
|
||||||
|
],
|
||||||
|
"preferOver": [
|
||||||
|
"imessage"
|
||||||
|
],
|
||||||
|
"systemImage": "bubble.left.and.text.bubble.right",
|
||||||
"order": 75
|
"order": 75
|
||||||
},
|
},
|
||||||
"install": {
|
"install": {
|
||||||
|
|||||||
Loaded 100 of 502 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user