@nordbyte/nordrelay 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +45 -2
- package/README.md +227 -47
- package/dist/agent-activity.js +300 -0
- package/dist/agent-adapter.js +17 -30
- package/dist/agent-factory.js +27 -0
- package/dist/agent.js +123 -9
- package/dist/artifacts.js +1 -1
- package/dist/audit-log.js +1 -1
- package/dist/bot-ui.js +1 -1
- package/dist/bot.js +333 -161
- package/dist/claude-code-auth.js +121 -0
- package/dist/claude-code-cli.js +19 -0
- package/dist/claude-code-launch.js +73 -0
- package/dist/claude-code-session.js +660 -0
- package/dist/claude-code-state.js +590 -0
- package/dist/codex-session.js +15 -2
- package/dist/config.js +113 -9
- package/dist/context-key.js +23 -0
- package/dist/hermes-api.js +150 -0
- package/dist/hermes-auth.js +96 -0
- package/dist/hermes-cli.js +19 -0
- package/dist/hermes-launch.js +57 -0
- package/dist/hermes-session.js +477 -0
- package/dist/hermes-state.js +609 -0
- package/dist/index.js +51 -8
- package/dist/openclaw-auth.js +27 -0
- package/dist/openclaw-cli.js +19 -0
- package/dist/openclaw-gateway.js +285 -0
- package/dist/openclaw-launch.js +65 -0
- package/dist/openclaw-session.js +549 -0
- package/dist/openclaw-state.js +409 -0
- package/dist/operations.js +84 -3
- package/dist/pi-auth.js +59 -0
- package/dist/pi-launch.js +61 -0
- package/dist/pi-rpc.js +18 -0
- package/dist/pi-session.js +103 -15
- package/dist/pi-state.js +253 -0
- package/dist/relay-runtime.js +1073 -22
- package/dist/session-format.js +28 -18
- package/dist/session-registry.js +43 -18
- package/dist/settings-service.js +80 -26
- package/dist/state-backend.js +17 -8
- package/dist/web-dashboard-ui.js +18 -0
- package/dist/web-dashboard.js +463 -55
- package/dist/web-state.js +131 -0
- package/docker-compose.yml +1 -1
- package/package.json +8 -3
- package/plugins/nordrelay/.codex-plugin/plugin.json +7 -4
- package/plugins/nordrelay/commands/remote.md +2 -2
- package/plugins/nordrelay/scripts/nordrelay.mjs +173 -20
- package/plugins/nordrelay/skills/telegram-remote/SKILL.md +2 -2
- package/CHANGELOG.md +0 -17
package/.env.example
CHANGED
|
@@ -20,10 +20,16 @@ TELEGRAM_ALLOWED_CHAT_IDS=
|
|
|
20
20
|
# Optional explicit override. Keep false for private bots.
|
|
21
21
|
TELEGRAM_ALLOW_ANY_CHAT=false
|
|
22
22
|
|
|
23
|
-
# Agent access. Codex is enabled by default; Pi
|
|
24
|
-
# `pi` CLI from https://pi.dev/ on the host.
|
|
23
|
+
# Agent access. Codex is enabled by default; Pi, Hermes, OpenClaw, and Claude Code are opt-in.
|
|
24
|
+
# Pi requires the `pi` CLI from https://pi.dev/ on the host. Hermes uses
|
|
25
|
+
# the Hermes API Server (`hermes gateway` with API_SERVER_ENABLED=true).
|
|
26
|
+
# OpenClaw uses the OpenClaw Gateway WebSocket RPC endpoint.
|
|
27
|
+
# Claude Code uses the Claude Agent SDK and the host `claude` CLI when present.
|
|
25
28
|
NORDRELAY_CODEX_ENABLED=true
|
|
26
29
|
NORDRELAY_PI_ENABLED=false
|
|
30
|
+
NORDRELAY_HERMES_ENABLED=false
|
|
31
|
+
NORDRELAY_OPENCLAW_ENABLED=false
|
|
32
|
+
NORDRELAY_CLAUDE_CODE_ENABLED=false
|
|
27
33
|
NORDRELAY_DEFAULT_AGENT=codex
|
|
28
34
|
|
|
29
35
|
# Codex defaults for newly created or reattached Telegram sessions.
|
|
@@ -47,6 +53,43 @@ PI_CLI_PATH=
|
|
|
47
53
|
PI_SESSION_DIR=
|
|
48
54
|
PI_DEFAULT_MODEL=
|
|
49
55
|
PI_DEFAULT_THINKING=medium
|
|
56
|
+
PI_DEFAULT_PROFILE=default
|
|
57
|
+
|
|
58
|
+
# Hermes Agent defaults. HERMES_DEFAULT_REASONING: none, minimal, low,
|
|
59
|
+
# medium, high, xhigh. HERMES_API_KEY must match API_SERVER_KEY when the
|
|
60
|
+
# Hermes API Server is protected.
|
|
61
|
+
HERMES_CLI_PATH=
|
|
62
|
+
HERMES_HOME=
|
|
63
|
+
HERMES_STATE_DB_PATH=
|
|
64
|
+
HERMES_API_BASE_URL=http://127.0.0.1:8642
|
|
65
|
+
HERMES_API_KEY=
|
|
66
|
+
HERMES_DEFAULT_MODEL=
|
|
67
|
+
HERMES_DEFAULT_REASONING=
|
|
68
|
+
HERMES_DEFAULT_PROFILE=default
|
|
69
|
+
|
|
70
|
+
# OpenClaw Agent defaults. OPENCLAW_DEFAULT_THINKING: off, minimal, low,
|
|
71
|
+
# medium, high, xhigh. Gateway token/password are optional unless your
|
|
72
|
+
# OpenClaw Gateway requires shared-secret authentication.
|
|
73
|
+
OPENCLAW_CLI_PATH=
|
|
74
|
+
OPENCLAW_GATEWAY_URL=ws://127.0.0.1:18789
|
|
75
|
+
OPENCLAW_GATEWAY_TOKEN=
|
|
76
|
+
OPENCLAW_GATEWAY_PASSWORD=
|
|
77
|
+
OPENCLAW_AGENT_ID=main
|
|
78
|
+
OPENCLAW_HOME=
|
|
79
|
+
OPENCLAW_STATE_DIR=
|
|
80
|
+
OPENCLAW_DEFAULT_MODEL=
|
|
81
|
+
OPENCLAW_DEFAULT_THINKING=
|
|
82
|
+
OPENCLAW_DEFAULT_PROFILE=default
|
|
83
|
+
|
|
84
|
+
# Claude Code defaults. CLAUDE_CODE_DEFAULT_EFFORT: off, low, medium, high,
|
|
85
|
+
# xhigh. CLAUDE_CODE_CLI_PATH is optional; NordRelay uses `claude` on PATH or
|
|
86
|
+
# the Claude Agent SDK bundled runtime.
|
|
87
|
+
CLAUDE_CODE_CLI_PATH=
|
|
88
|
+
CLAUDE_CONFIG_DIR=
|
|
89
|
+
CLAUDE_CODE_DEFAULT_MODEL=
|
|
90
|
+
CLAUDE_CODE_DEFAULT_EFFORT=
|
|
91
|
+
CLAUDE_CODE_DEFAULT_PROFILE=default
|
|
92
|
+
CLAUDE_CODE_MAX_TURNS=100
|
|
50
93
|
|
|
51
94
|
# Telegram output controls.
|
|
52
95
|
CONNECTOR_LOG_FORMAT=text
|
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# NordRelay
|
|
2
2
|
|
|
3
|
-
NordRelay is a remote control plane for coding agents across messaging channels. The current implementation connects Codex and
|
|
3
|
+
NordRelay is a remote control plane for coding agents across messaging channels. The current implementation connects Codex, Pi, Hermes, OpenClaw, and Claude Code coding-agent sessions to Telegram, keeps independent sessions per chat or forum topic, streams replies and tool activity back to Telegram, supports files, photos, voice input, model controls, session browsing, retry/abort, and CLI handback.
|
|
4
4
|
|
|
5
|
-
The repo is both a local Codex marketplace and a standalone Node app. The plugin lives in `plugins/nordrelay/`; the full bot runtime lives in `src/` and uses `@openai/codex-sdk` for Codex
|
|
5
|
+
The repo is both a local Codex marketplace and a standalone Node app. The plugin lives in `plugins/nordrelay/`; the full bot runtime lives in `src/` and uses `@openai/codex-sdk` for Codex, Pi RPC mode for Pi, the Hermes API Server for Hermes, the OpenClaw Gateway WebSocket RPC surface for OpenClaw, and the Claude Agent SDK for Claude Code.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
9
|
Session control:
|
|
10
10
|
|
|
11
11
|
- Independent coding-agent sessions per Telegram private chat, group chat, and forum topic.
|
|
12
|
-
- `/agent` switches a Telegram context between enabled agents such as Codex and
|
|
12
|
+
- `/agent` switches a Telegram context between enabled agents such as Codex, Pi, Hermes, OpenClaw, and Claude Code.
|
|
13
13
|
- Persistent Telegram context metadata in the active workspace under `.nordrelay/contexts.json`.
|
|
14
14
|
- `/new` starts a fresh thread, with workspace selection when known workspaces are available.
|
|
15
15
|
- `/session` shows thread id, workspace, launch profile, launch behavior, model, reasoning, fast mode, context usage, token totals, and subscription limit remaining percentages.
|
|
@@ -27,8 +27,8 @@ Session control:
|
|
|
27
27
|
- `/queue later <minutes> <prompt>` schedules a prompt for later execution, and `/queue inspect <queue-id>` shows full queue metadata.
|
|
28
28
|
- `/abort`, `/stop`, and the inline Abort button cancel the active agent turn.
|
|
29
29
|
- Busy prompts are queued per Telegram context instead of being dropped.
|
|
30
|
-
- If the attached thread is currently active in the local
|
|
31
|
-
- Active Codex CLI turns are mirrored into Telegram with configurable `off`, `status`, `final`, or `full` modes.
|
|
30
|
+
- If the attached thread is currently active in the local agent CLI, Telegram prompts are queued until that CLI task finishes.
|
|
31
|
+
- Active Codex, Pi, Hermes, OpenClaw, and Claude Code CLI/API turns are mirrored into Telegram with configurable `off`, `status`, `final`, or `full` modes.
|
|
32
32
|
- `/mirror` controls CLI mirroring per Telegram context.
|
|
33
33
|
- Queues survive connector restarts and are resumed automatically when the external CLI turn becomes idle.
|
|
34
34
|
- `/notify` controls completion/status notifications and quiet hours per Telegram context.
|
|
@@ -44,8 +44,8 @@ Adapter architecture:
|
|
|
44
44
|
|
|
45
45
|
- Telegram is implemented as the first channel adapter with text, typing, streaming edits, inline buttons, files, photos, voice, topics, and webhook capability metadata.
|
|
46
46
|
- `/channels` shows available and planned messaging adapters for Discord, WhatsApp, Slack, and Matrix.
|
|
47
|
-
- Codex
|
|
48
|
-
- `/agents` shows available/planned agent adapters and whether Codex
|
|
47
|
+
- Codex, Pi, Hermes, OpenClaw, and Claude Code are implemented as agent adapters.
|
|
48
|
+
- `/agents` shows available/planned agent adapters and whether Codex, Pi, Hermes, OpenClaw, and Claude Code are enabled.
|
|
49
49
|
|
|
50
50
|
Codex runtime:
|
|
51
51
|
|
|
@@ -59,7 +59,7 @@ Codex runtime:
|
|
|
59
59
|
- Unsafe `danger-full-access` profiles require `ENABLE_UNSAFE_LAUNCH_PROFILES=true` and Telegram confirmation.
|
|
60
60
|
- Review or unsafe launch profiles require an inline Telegram approval before each prompt is executed.
|
|
61
61
|
- Fast mode can be toggled with `/fast` and mirrors Codex's `fast_default_opt_out` setting from `~/.codex/config.toml`.
|
|
62
|
-
- Active Telegram sessions periodically sync model, reasoning, workspace, launch metadata, and fast-mode defaults from local
|
|
62
|
+
- Active Telegram sessions periodically sync model, reasoning, workspace, launch metadata, and fast-mode defaults from local agent state where supported.
|
|
63
63
|
- Active local Codex CLI tasks are detected from rollout JSONL files so Telegram does not race the CLI on the same thread.
|
|
64
64
|
- `/diagnostics` includes rollout path, activity status, stale/idle reason, line count, and last update time.
|
|
65
65
|
- Optional per-turn token usage footer with `SHOW_TURN_TOKEN_USAGE=true`.
|
|
@@ -67,14 +67,62 @@ Codex runtime:
|
|
|
67
67
|
Pi runtime:
|
|
68
68
|
|
|
69
69
|
- Pi support is opt-in with `NORDRELAY_PI_ENABLED=true`.
|
|
70
|
-
- The default Telegram agent is selected with `NORDRELAY_DEFAULT_AGENT=codex` or `
|
|
70
|
+
- The default Telegram agent is selected with `NORDRELAY_DEFAULT_AGENT=codex`, `pi`, `hermes`, `openclaw`, or `claude-code`.
|
|
71
71
|
- Pi sessions are driven through official `pi --mode rpc` JSONL commands and events.
|
|
72
72
|
- Existing Pi sessions are discovered from `~/.pi/agent/sessions/` or `PI_SESSION_DIR`.
|
|
73
73
|
- `/sessions`, `/switch`, `/attach`, `/new`, `/session`, `/handback`, `/model`, `/reasoning`, `/abort`, `/stop`, `/retry`, `/queue`, files, photos, and voice input work for Pi contexts.
|
|
74
74
|
- Pi model selection uses `pi --list-models` and sends `set_model` through RPC for active sessions.
|
|
75
75
|
- Pi thinking levels use `/reasoning` and support `off`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
|
|
76
76
|
- Pi token and context stats are read through `get_session_stats` when an RPC session is active.
|
|
77
|
-
-
|
|
77
|
+
- Pi launch profiles expose CLI safety modes such as default, read-only tools, no tools, offline, and safe offline.
|
|
78
|
+
- Pi external CLI activity is detected from Pi session JSONL files so Telegram/WebUI prompts queue while the same Pi session is busy.
|
|
79
|
+
- Pi CLI turns can be mirrored into Telegram/WebUI with status, tool activity, final answers, activity timelines, diagnostics, and generated artifact discovery.
|
|
80
|
+
- Pi provider auth checks report the environment variables expected for the selected provider.
|
|
81
|
+
- Codex-only subscription limit percentages remain Codex-specific; Pi reports token/context stats when available.
|
|
82
|
+
|
|
83
|
+
Hermes runtime:
|
|
84
|
+
|
|
85
|
+
- Hermes support is opt-in with `NORDRELAY_HERMES_ENABLED=true`.
|
|
86
|
+
- The default Telegram agent can be set with `NORDRELAY_DEFAULT_AGENT=hermes`.
|
|
87
|
+
- Hermes turns are executed through the Hermes API Server `/v1/runs` endpoint and streamed through `/v1/runs/{run_id}/events`.
|
|
88
|
+
- `/abort` and `/stop` use the Hermes run stop endpoint when a NordRelay-started Hermes run is active.
|
|
89
|
+
- Existing Hermes sessions are discovered from `~/.hermes/state.db`, or from `HERMES_STATE_DB_PATH` when configured.
|
|
90
|
+
- `/sessions`, `/switch`, `/attach`, `/new`, `/session`, `/handback`, `/model`, `/reasoning`, `/abort`, `/stop`, `/retry`, `/queue`, files, photos, and voice input work for Hermes contexts.
|
|
91
|
+
- Hermes model selection uses `/v1/models` when the API Server is reachable and falls back to the selected/default model.
|
|
92
|
+
- Hermes reasoning uses `/reasoning` and supports `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
|
|
93
|
+
- Hermes launch profiles include `default`, `safe`, `readonly`, and `yolo`; profiles map to run instructions and Hermes approval responses.
|
|
94
|
+
- Hermes external activity is detected from `state.db`, so Telegram/WebUI prompts queue while the same Hermes session has an unfinished CLI turn.
|
|
95
|
+
- Hermes CLI/API turns can be mirrored into Telegram/WebUI with status, tool activity, final answers, activity timelines, diagnostics, and generated artifact discovery.
|
|
96
|
+
- `/auth` checks that the Hermes API Server is reachable and that `HERMES_API_KEY` is usable when configured.
|
|
97
|
+
|
|
98
|
+
OpenClaw runtime:
|
|
99
|
+
|
|
100
|
+
- OpenClaw support is opt-in with `NORDRELAY_OPENCLAW_ENABLED=true`.
|
|
101
|
+
- The default Telegram agent can be set with `NORDRELAY_DEFAULT_AGENT=openclaw`.
|
|
102
|
+
- OpenClaw turns are executed through the OpenClaw Gateway WebSocket RPC endpoint configured by `OPENCLAW_GATEWAY_URL`.
|
|
103
|
+
- `/abort` and `/stop` call the OpenClaw Gateway cancel method when a NordRelay-started OpenClaw run is active.
|
|
104
|
+
- Existing OpenClaw sessions are discovered from `openclaw sessions --all-agents --json`, or from the state directory configured with `OPENCLAW_HOME` or `OPENCLAW_STATE_DIR`.
|
|
105
|
+
- `/sessions`, `/switch`, `/attach`, `/new`, `/session`, `/handback`, `/model`, `/reasoning`, `/abort`, `/stop`, `/retry`, `/queue`, files, photos, and voice input work for OpenClaw contexts.
|
|
106
|
+
- OpenClaw model selection uses the Gateway `models.list` method when reachable and falls back to `openclaw models list --json`.
|
|
107
|
+
- OpenClaw thinking uses `/reasoning` and supports `off`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
|
|
108
|
+
- OpenClaw launch profiles include `default`, `safe`, `readonly`, `local`, and `deliver`; profiles map to Gateway run flags and additional instructions.
|
|
109
|
+
- OpenClaw external activity is detected from OpenClaw session state, so Telegram/WebUI prompts queue while the same OpenClaw session has an unfinished CLI turn.
|
|
110
|
+
- OpenClaw Gateway turns can be mirrored into Telegram/WebUI with status, tool activity, final answers, activity timelines, diagnostics, and generated artifact discovery.
|
|
111
|
+
- `/auth` checks that the OpenClaw Gateway is reachable and that `OPENCLAW_GATEWAY_TOKEN` or `OPENCLAW_GATEWAY_PASSWORD` is usable when configured.
|
|
112
|
+
|
|
113
|
+
Claude Code runtime:
|
|
114
|
+
|
|
115
|
+
- Claude Code support is opt-in with `NORDRELAY_CLAUDE_CODE_ENABLED=true`.
|
|
116
|
+
- The default Telegram agent can be set with `NORDRELAY_DEFAULT_AGENT=claude-code`.
|
|
117
|
+
- Claude Code turns are executed through `@anthropic-ai/claude-agent-sdk`, using the host `claude` executable when available and the SDK bundled runtime otherwise.
|
|
118
|
+
- Existing Claude Code sessions are discovered from `~/.claude/projects/`, or from `CLAUDE_CONFIG_DIR/projects` when configured.
|
|
119
|
+
- `/sessions`, `/switch`, `/attach`, `/new`, `/session`, `/handback`, `/model`, `/reasoning`, `/abort`, `/stop`, `/retry`, `/queue`, files, photos, and voice input work for Claude Code contexts.
|
|
120
|
+
- Claude Code model selection exposes common aliases and model ids; explicit values from existing sessions are preserved.
|
|
121
|
+
- Claude Code effort uses `/reasoning` and supports `off`, `low`, `medium`, `high`, and `xhigh`.
|
|
122
|
+
- Claude Code launch profiles include `default`, `accept-edits`, `plan`, `readonly`, `no-tools`, and optional `bypass-permissions`.
|
|
123
|
+
- Claude Code external activity is detected from transcript JSONL files, so Telegram/WebUI prompts queue while the same Claude Code session has an unfinished CLI turn.
|
|
124
|
+
- Claude Code SDK turns can be mirrored into Telegram/WebUI with status, tool activity, final answers, activity timelines, diagnostics, and generated artifact discovery.
|
|
125
|
+
- `/auth` checks the host Claude Code CLI auth state when `claude auth status` is available.
|
|
78
126
|
|
|
79
127
|
Telegram input:
|
|
80
128
|
|
|
@@ -84,7 +132,7 @@ Telegram input:
|
|
|
84
132
|
- `/voice` can select backend preference, language, and transcribe-only mode.
|
|
85
133
|
- Photo messages are passed to the selected agent as local image input when supported.
|
|
86
134
|
- Document messages are downloaded, sanitized, size-checked, and staged under `.nordrelay/inbox/<turn-id>/`.
|
|
87
|
-
- Telegram media groups and albums are combined into one
|
|
135
|
+
- Telegram media groups and albums are combined into one agent turn with all photos and documents staged together.
|
|
88
136
|
- Uploaded documents include prompt instructions telling the selected agent where files were staged.
|
|
89
137
|
- Staged document and photo prompts are persisted so `/retry` and queued execution can replay them after a restart.
|
|
90
138
|
- Telegram forum topics are treated as separate work contexts.
|
|
@@ -99,7 +147,7 @@ Telegram output:
|
|
|
99
147
|
- Command execution, web search, file changes, MCP tool calls, error items, and todo-list updates are surfaced.
|
|
100
148
|
- Todo-list updates are rendered as a live plan/status message.
|
|
101
149
|
- Generated artifacts from `.nordrelay/turns/<turn-id>/out/` are retained for manual retrieval with `/artifacts`.
|
|
102
|
-
- Workspace files detected after mirrored Codex CLI turns are indexed as `/artifacts` entries, even when automatic artifact delivery is disabled.
|
|
150
|
+
- Workspace files detected after mirrored Codex, Pi, Hermes, OpenClaw, or Claude Code CLI/API turns are indexed as `/artifacts` entries, even when automatic artifact delivery is disabled.
|
|
103
151
|
- Automatic artifact summaries and file uploads are disabled by default; set `TELEGRAM_AUTO_SEND_ARTIFACTS=true` to send them after turns.
|
|
104
152
|
- Workspace artifact detection sorts by modification time and supports configurable ignored directories and globs.
|
|
105
153
|
- Image artifacts are sent with Telegram previews; large multi-file outputs are bundled into one ZIP when possible.
|
|
@@ -118,9 +166,9 @@ Authentication and safety:
|
|
|
118
166
|
- `TELEGRAM_ADMIN_USER_IDS` restricts admin-only commands such as `/logs`, `/restart`, and `/update`.
|
|
119
167
|
- `TELEGRAM_READONLY_USER_IDS` can inspect status and sessions but cannot send prompts or run mutating commands by default.
|
|
120
168
|
- `TELEGRAM_ROLE_POLICIES_JSON` can override role permissions for `admin`, `operator`, and `readonly`.
|
|
121
|
-
- `/auth` reports Codex authentication
|
|
122
|
-
- `/login` starts
|
|
123
|
-
- `/logout` signs out of CLI auth
|
|
169
|
+
- `/auth` reports Codex authentication, Pi provider environment health, Hermes API Server reachability, OpenClaw Gateway reachability, or Claude Code CLI auth for the selected agent.
|
|
170
|
+
- `/login` starts Telegram-managed CLI auth for Codex, Hermes, or Claude Code when enabled.
|
|
171
|
+
- `/logout` signs out of CLI auth for Codex, Hermes, or Claude Code; Codex logout is disabled while `CODEX_API_KEY` is in use.
|
|
124
172
|
- `CODEX_API_KEY` can be used for host-side Codex authentication.
|
|
125
173
|
- Friendly error messages are returned for auth, network, model, rate-limit, timeout, and context-length failures.
|
|
126
174
|
- Outgoing Telegram messages and logs redact common token/API-key patterns, with optional custom redaction patterns.
|
|
@@ -137,7 +185,7 @@ Operations:
|
|
|
137
185
|
- Telegram sends/edits/documents are routed through a rate-limit queue that honors Telegram retry-after responses.
|
|
138
186
|
- Context metadata, queues, and preferences are written atomically with backup recovery.
|
|
139
187
|
- Context metadata, queues, preferences, audit events, and locks can use JSON files or the optional SQLite state backend with `NORDRELAY_STATE_BACKEND=sqlite`.
|
|
140
|
-
- Runtime state and logs are written under `~/.
|
|
188
|
+
- Runtime config, state, and logs are written under `~/.nordrelay/`.
|
|
141
189
|
- `nordrelay init` creates a private runtime config, `nordrelay doctor` validates host prerequisites, and `nordrelay web` starts a full local WebUI dashboard.
|
|
142
190
|
- The WebUI has responsive header/sidebar/footer navigation, live chat streaming, session controls, queue/artifact/log/diagnostic views, and settings management.
|
|
143
191
|
- The WebUI supports light and dark themes, tabbed settings groups, paginated session browsing, and chat uploads for images, documents, and audio transcription.
|
|
@@ -161,7 +209,7 @@ nordrelay doctor
|
|
|
161
209
|
nordrelay start
|
|
162
210
|
```
|
|
163
211
|
|
|
164
|
-
npm is the fastest install path and is the recommended default for normal use.
|
|
212
|
+
npm is the fastest install path and is the recommended default for normal use. `nordrelay init` writes the private runtime config to `~/.nordrelay/nordrelay.env`.
|
|
165
213
|
|
|
166
214
|
Non-interactive setup is also supported:
|
|
167
215
|
|
|
@@ -176,7 +224,9 @@ Install dependencies and build the runtime:
|
|
|
176
224
|
```bash
|
|
177
225
|
npm install
|
|
178
226
|
npm run build
|
|
179
|
-
|
|
227
|
+
mkdir -p ~/.nordrelay
|
|
228
|
+
cp .env.example ~/.nordrelay/nordrelay.env
|
|
229
|
+
chmod 600 ~/.nordrelay/nordrelay.env
|
|
180
230
|
```
|
|
181
231
|
|
|
182
232
|
Create the Telegram bot:
|
|
@@ -184,17 +234,20 @@ Create the Telegram bot:
|
|
|
184
234
|
1. Open Telegram and talk to `@BotFather`.
|
|
185
235
|
2. Run `/newbot`.
|
|
186
236
|
3. Choose a display name and bot username.
|
|
187
|
-
4. Copy the bot token into `TELEGRAM_BOT_TOKEN` in
|
|
237
|
+
4. Copy the bot token into `TELEGRAM_BOT_TOKEN` in `~/.nordrelay/nordrelay.env`.
|
|
188
238
|
5. Find your Telegram user id with a trusted id helper bot, for example `@userinfobot`, or from Telegram API tooling.
|
|
189
239
|
6. Put your user id into `TELEGRAM_ADMIN_USER_IDS`.
|
|
190
240
|
|
|
191
|
-
Minimal private-bot
|
|
241
|
+
Minimal private-bot `~/.nordrelay/nordrelay.env`:
|
|
192
242
|
|
|
193
243
|
```dotenv
|
|
194
244
|
TELEGRAM_BOT_TOKEN=123456789:replace-me
|
|
195
245
|
TELEGRAM_ADMIN_USER_IDS=123456789
|
|
196
246
|
NORDRELAY_CODEX_ENABLED=true
|
|
197
247
|
NORDRELAY_PI_ENABLED=false
|
|
248
|
+
NORDRELAY_HERMES_ENABLED=false
|
|
249
|
+
NORDRELAY_OPENCLAW_ENABLED=false
|
|
250
|
+
NORDRELAY_CLAUDE_CODE_ENABLED=false
|
|
198
251
|
NORDRELAY_DEFAULT_AGENT=codex
|
|
199
252
|
CODEX_SANDBOX_MODE=workspace-write
|
|
200
253
|
CODEX_APPROVAL_POLICY=never
|
|
@@ -217,11 +270,45 @@ Codex authentication:
|
|
|
217
270
|
Pi setup:
|
|
218
271
|
|
|
219
272
|
- Install Pi from https://pi.dev/ and confirm `pi --help` works on the host.
|
|
220
|
-
- Set `NORDRELAY_PI_ENABLED=true` in
|
|
273
|
+
- Set `NORDRELAY_PI_ENABLED=true` in `~/.nordrelay/nordrelay.env`.
|
|
221
274
|
- Keep `NORDRELAY_DEFAULT_AGENT=codex` to start chats in Codex, or set `NORDRELAY_DEFAULT_AGENT=pi` to start chats in Pi.
|
|
222
275
|
- Optional: set `PI_SESSION_DIR` if your Pi sessions are not stored in `~/.pi/agent/sessions/`.
|
|
223
276
|
- Optional: set `PI_DEFAULT_MODEL=openai-codex/gpt-5.5` and `PI_DEFAULT_THINKING=medium`.
|
|
224
277
|
|
|
278
|
+
Hermes setup:
|
|
279
|
+
|
|
280
|
+
- Install Hermes Agent and confirm `hermes --help` works on the host.
|
|
281
|
+
- Start the Hermes API Server locally and confirm `GET http://127.0.0.1:8642/health` returns OK.
|
|
282
|
+
- Set `NORDRELAY_HERMES_ENABLED=true` in `~/.nordrelay/nordrelay.env`.
|
|
283
|
+
- Keep `NORDRELAY_DEFAULT_AGENT=codex` to start chats in Codex, or set `NORDRELAY_DEFAULT_AGENT=hermes` to start chats in Hermes.
|
|
284
|
+
- Set `HERMES_API_BASE_URL` if the API Server is not listening on `http://127.0.0.1:8642`.
|
|
285
|
+
- Set `HERMES_API_KEY` when the Hermes API Server is protected with `API_SERVER_KEY`.
|
|
286
|
+
- Optional: use `/login` or run `hermes login --no-browser` on the host to refresh Hermes provider credentials.
|
|
287
|
+
- Optional: set `HERMES_STATE_DB_PATH` if your Hermes session database is not stored at `~/.hermes/state.db`.
|
|
288
|
+
- Optional: set `HERMES_DEFAULT_MODEL`, `HERMES_DEFAULT_REASONING`, and `HERMES_DEFAULT_PROFILE`.
|
|
289
|
+
|
|
290
|
+
OpenClaw setup:
|
|
291
|
+
|
|
292
|
+
- Install OpenClaw and confirm `openclaw --help` works on the host.
|
|
293
|
+
- Start the OpenClaw Gateway and confirm the WebSocket endpoint is reachable.
|
|
294
|
+
- Set `NORDRELAY_OPENCLAW_ENABLED=true` in `~/.nordrelay/nordrelay.env`.
|
|
295
|
+
- Keep `NORDRELAY_DEFAULT_AGENT=codex` to start chats in Codex, or set `NORDRELAY_DEFAULT_AGENT=openclaw` to start chats in OpenClaw.
|
|
296
|
+
- Set `OPENCLAW_GATEWAY_URL` if the Gateway is not listening on `ws://127.0.0.1:18789`.
|
|
297
|
+
- Set `OPENCLAW_GATEWAY_TOKEN` or `OPENCLAW_GATEWAY_PASSWORD` when the Gateway requires shared-secret auth.
|
|
298
|
+
- Optional: set `OPENCLAW_AGENT_ID` if you want a specific OpenClaw agent instead of `main`.
|
|
299
|
+
- Optional: set `OPENCLAW_HOME` or `OPENCLAW_STATE_DIR` if your OpenClaw session state is stored outside `~/.openclaw`.
|
|
300
|
+
- Optional: set `OPENCLAW_DEFAULT_MODEL`, `OPENCLAW_DEFAULT_THINKING`, and `OPENCLAW_DEFAULT_PROFILE`.
|
|
301
|
+
|
|
302
|
+
Claude Code setup:
|
|
303
|
+
|
|
304
|
+
- Install Claude Code and confirm `claude --help` works on the host, or use the SDK bundled runtime.
|
|
305
|
+
- Use `/login` or run `claude auth login` on the host when your Claude Code installation requires local auth.
|
|
306
|
+
- Set `NORDRELAY_CLAUDE_CODE_ENABLED=true` in `~/.nordrelay/nordrelay.env`.
|
|
307
|
+
- Keep `NORDRELAY_DEFAULT_AGENT=codex` to start chats in Codex, or set `NORDRELAY_DEFAULT_AGENT=claude-code` to start chats in Claude Code.
|
|
308
|
+
- Optional: set `CLAUDE_CODE_CLI_PATH` if `claude` is not on `PATH`.
|
|
309
|
+
- Optional: set `CLAUDE_CONFIG_DIR` if your Claude Code sessions are not stored under `~/.claude`.
|
|
310
|
+
- Optional: set `CLAUDE_CODE_DEFAULT_MODEL`, `CLAUDE_CODE_DEFAULT_EFFORT`, `CLAUDE_CODE_DEFAULT_PROFILE`, and `CLAUDE_CODE_MAX_TURNS`.
|
|
311
|
+
|
|
225
312
|
Register the local Codex marketplace:
|
|
226
313
|
|
|
227
314
|
```bash
|
|
@@ -282,9 +369,9 @@ npm run foreground
|
|
|
282
369
|
|
|
283
370
|
Runtime files:
|
|
284
371
|
|
|
285
|
-
- PID file: `~/.
|
|
286
|
-
- State file: `~/.
|
|
287
|
-
- Log file: `~/.
|
|
372
|
+
- PID file: `~/.nordrelay/nordrelay.pid`
|
|
373
|
+
- State file: `~/.nordrelay/state.json`
|
|
374
|
+
- Log file: `~/.nordrelay/nordrelay.log`
|
|
288
375
|
- Home override: `NORDRELAY_HOME=/custom/path`
|
|
289
376
|
- Local dashboard: `nordrelay web --host 127.0.0.1 --port 31878`
|
|
290
377
|
|
|
@@ -304,15 +391,19 @@ http://127.0.0.1:31878/
|
|
|
304
391
|
|
|
305
392
|
The dashboard is a second NordRelay client next to Telegram. It can:
|
|
306
393
|
|
|
307
|
-
- Start a new Codex or
|
|
308
|
-
-
|
|
394
|
+
- Start a new Codex, Pi, Hermes, OpenClaw, or Claude Code session.
|
|
395
|
+
- Start a new session from a modal with agent, workspace, model, reasoning/thinking, fast mode, and launch-profile choices.
|
|
396
|
+
- Switch or attach existing sessions, and copy thread IDs from the session list.
|
|
309
397
|
- Send prompts and receive streamed text/tool/plan updates through Server-Sent Events.
|
|
310
398
|
- Upload images, documents, and audio files from the chat composer. Images are passed as image inputs, documents are staged for the agent, and audio is transcribed through the configured voice backend.
|
|
399
|
+
- Keep a persistent per-thread WebUI chat history across page reloads.
|
|
400
|
+
- Control the active session model, reasoning/thinking, fast mode, and launch profile directly from the chat view.
|
|
311
401
|
- Abort turns, hand sessions back to the native CLI, and inspect the active session.
|
|
312
|
-
- Manage queued prompts.
|
|
313
|
-
- Browse, download, ZIP, and delete artifacts.
|
|
314
|
-
-
|
|
315
|
-
-
|
|
402
|
+
- Manage queued prompts with pause/resume, run, cancel, reorder buttons, and drag-and-drop prioritization.
|
|
403
|
+
- Browse, preview, download, ZIP, and delete artifacts.
|
|
404
|
+
- Inspect the activity timeline for WebUI and mirrored CLI turns.
|
|
405
|
+
- Edit all supported runtime settings from tabbed Settings groups with option selects, validation feedback, and restart actions.
|
|
406
|
+
- View filtered logs, structured diagnostics, enabled channels, and agent adapters.
|
|
316
407
|
|
|
317
408
|
Dashboard API endpoints are served under `/api/*`. Streaming uses `GET /api/events`.
|
|
318
409
|
|
|
@@ -383,22 +474,22 @@ Run NordRelay behind your reverse proxy so the public URL forwards to `http://12
|
|
|
383
474
|
- `/launch_profiles` or `/launch` opens the launch profile picker.
|
|
384
475
|
- `/fast [on|off]` toggles Codex fast mode. Without an argument it flips the current state.
|
|
385
476
|
- `/model` opens the model picker.
|
|
386
|
-
- `/reasoning` opens the
|
|
477
|
+
- `/reasoning` opens the selected agent's reasoning or thinking picker.
|
|
387
478
|
- `/effort` is a backward-compatible alias for `/reasoning`.
|
|
388
479
|
- `/mirror [off|status|final|full]` controls local CLI mirroring for this Telegram context.
|
|
389
480
|
- `/notify [off|minimal|all]` controls Telegram notifications.
|
|
390
481
|
- `/notify quiet HH-HH` sets quiet hours; `/notify quiet off` disables them.
|
|
391
|
-
- `/auth` reports Codex authentication status,
|
|
392
|
-
- `/login` starts Telegram-initiated
|
|
393
|
-
- `/logout` signs out from
|
|
482
|
+
- `/auth` reports Codex authentication status, Pi provider environment health, Hermes API Server reachability, OpenClaw Gateway reachability, or Claude Code CLI auth for the selected agent.
|
|
483
|
+
- `/login` starts Telegram-initiated CLI login for Codex, Hermes, or Claude Code when one of those agents is selected.
|
|
484
|
+
- `/logout` signs out from CLI auth for Codex, Hermes, or Claude Code when one of those agents is selected; Codex logout is disabled while `CODEX_API_KEY` is active.
|
|
394
485
|
- `/voice` reports voice transcription backends and current voice preferences.
|
|
395
486
|
- `/voice backend auto|parakeet|faster-whisper|openai` selects backend preference.
|
|
396
487
|
- `/voice language auto|<code>` selects transcription language.
|
|
397
|
-
- `/voice transcribe_only on|off` controls whether voice is only transcribed or also sent to
|
|
488
|
+
- `/voice transcribe_only on|off` controls whether voice is only transcribed or also sent to the selected agent.
|
|
398
489
|
- `/tasks` or `/progress` reports the current turn and queue progress.
|
|
399
490
|
- `/status` reports connector runtime status.
|
|
400
|
-
- `/health` reports runtime health, auth, PIDs, Codex CLI, Pi CLI, and state DB.
|
|
401
|
-
- `/version` reports connector, Codex CLI, and
|
|
491
|
+
- `/health` reports runtime health, auth, PIDs, Codex CLI, Pi CLI, Hermes CLI, OpenClaw CLI, Claude Code CLI, and state DB.
|
|
492
|
+
- `/version` reports connector, Codex CLI, Pi CLI, Hermes CLI, OpenClaw CLI, and Claude Code CLI paths plus installed/latest NordRelay, Codex, Pi, Hermes, OpenClaw, and Claude Code versions with status icons.
|
|
402
493
|
- `/logs [lines]` shows a redacted, timestamped connector log tail. Admin only.
|
|
403
494
|
- `/logs update [lines]` shows the self-update log. Admin only.
|
|
404
495
|
- `/logs all [lines]` shows connector and self-update logs together. Admin only.
|
|
@@ -446,6 +537,24 @@ For Pi sessions the command looks like:
|
|
|
446
537
|
cd ~/projects/my-workspace && pi --session ~/.pi/agent/sessions/.../session.jsonl
|
|
447
538
|
```
|
|
448
539
|
|
|
540
|
+
For Hermes sessions the command looks like:
|
|
541
|
+
|
|
542
|
+
```bash
|
|
543
|
+
cd ~/projects/my-workspace && hermes --resume 20260512_181422_ab12cd34
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
For OpenClaw sessions the command looks like:
|
|
547
|
+
|
|
548
|
+
```bash
|
|
549
|
+
cd ~/projects/my-workspace && openclaw agent --agent main --session-id nordrelay-openclaw-a1b2c3d4e5f6 --message '<your next message>'
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
For Claude Code sessions the command looks like:
|
|
553
|
+
|
|
554
|
+
```bash
|
|
555
|
+
cd ~/projects/my-workspace && claude --resume 019e178a-f275-7d01-95d6-c244ff3e30ed
|
|
556
|
+
```
|
|
557
|
+
|
|
449
558
|
Change model:
|
|
450
559
|
|
|
451
560
|
```text
|
|
@@ -460,7 +569,7 @@ Change reasoning effort:
|
|
|
460
569
|
/reasoning
|
|
461
570
|
```
|
|
462
571
|
|
|
463
|
-
For Codex choose one of `minimal`, `low`, `medium`, `high`, or `xhigh`. For Pi choose one of `off`, `minimal`, `low`, `medium`, `high`, or `xhigh`.
|
|
572
|
+
For Codex choose one of `minimal`, `low`, `medium`, `high`, or `xhigh`. For Pi choose one of `off`, `minimal`, `low`, `medium`, `high`, or `xhigh`. For Hermes choose one of `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`. For OpenClaw choose one of `off`, `minimal`, `low`, `medium`, `high`, or `xhigh`. For Claude Code choose one of `off`, `low`, `medium`, `high`, or `xhigh`.
|
|
464
573
|
|
|
465
574
|
Toggle fast mode:
|
|
466
575
|
|
|
@@ -530,7 +639,7 @@ Artifacts:
|
|
|
530
639
|
Voice and audio:
|
|
531
640
|
|
|
532
641
|
- Send a Telegram voice note or audio file.
|
|
533
|
-
- The connector transcribes it, then sends the transcript to
|
|
642
|
+
- The connector transcribes it, then sends the transcript to the selected agent.
|
|
534
643
|
- Local transcription is tried first with `parakeet-coreml` or `faster-whisper` when installed.
|
|
535
644
|
- OpenAI Whisper is used when `OPENAI_API_KEY` is set.
|
|
536
645
|
|
|
@@ -599,7 +708,10 @@ Agent selection:
|
|
|
599
708
|
|
|
600
709
|
- `NORDRELAY_CODEX_ENABLED`: enables Codex contexts. Defaults to `true`.
|
|
601
710
|
- `NORDRELAY_PI_ENABLED`: enables Pi contexts. Defaults to `false`.
|
|
602
|
-
- `
|
|
711
|
+
- `NORDRELAY_HERMES_ENABLED`: enables Hermes contexts through the Hermes API Server. Defaults to `false`.
|
|
712
|
+
- `NORDRELAY_OPENCLAW_ENABLED`: enables OpenClaw contexts through the OpenClaw Gateway. Defaults to `false`.
|
|
713
|
+
- `NORDRELAY_CLAUDE_CODE_ENABLED`: enables Claude Code contexts through the Claude Agent SDK. Defaults to `false`.
|
|
714
|
+
- `NORDRELAY_DEFAULT_AGENT`: `codex`, `pi`, `hermes`, `openclaw`, or `claude-code`, used for new Telegram contexts. Defaults to the first enabled agent.
|
|
603
715
|
- `NORDRELAY_STATE_BACKEND`: `json` or `sqlite`. JSON is the default; SQLite requires `better-sqlite3`.
|
|
604
716
|
- `NORDRELAY_AUDIT_MAX_EVENTS`: maximum audit events retained. Defaults to `1000`.
|
|
605
717
|
- `NORDRELAY_SESSION_LOCK_TTL_MS`: session write-lock TTL. Defaults to `1800000`.
|
|
@@ -612,7 +724,7 @@ Dashboard:
|
|
|
612
724
|
- `NORDRELAY_DASHBOARD_TOKEN`: optional dashboard bearer/login token. Required when binding to `0.0.0.0` unless basic auth is configured.
|
|
613
725
|
- `NORDRELAY_DASHBOARD_USER`: optional dashboard basic-auth user.
|
|
614
726
|
- `NORDRELAY_DASHBOARD_PASSWORD`: optional dashboard basic-auth password. Required with `NORDRELAY_DASHBOARD_USER`.
|
|
615
|
-
- `NORDRELAY_ENV_FILE`: optional env
|
|
727
|
+
- `NORDRELAY_ENV_FILE`: optional explicit env-file path used by the wrapper and edited by the dashboard settings page. Defaults to `~/.nordrelay/nordrelay.env`.
|
|
616
728
|
|
|
617
729
|
Codex:
|
|
618
730
|
|
|
@@ -635,6 +747,40 @@ Pi:
|
|
|
635
747
|
- `PI_SESSION_DIR`: optional Pi session directory. Defaults to `~/.pi/agent/sessions/` or `PI_CODING_AGENT_SESSION_DIR`.
|
|
636
748
|
- `PI_DEFAULT_MODEL`: optional default model pattern for new Pi sessions, for example `openai-codex/gpt-5.5`.
|
|
637
749
|
- `PI_DEFAULT_THINKING`: default Pi thinking level: `off`, `minimal`, `low`, `medium`, `high`, or `xhigh`. Defaults to `medium`.
|
|
750
|
+
- `PI_DEFAULT_PROFILE`: default Pi launch profile: `default`, `readonly`, `no-tools`, `offline`, or `safe-offline`. Defaults to `default`.
|
|
751
|
+
|
|
752
|
+
Hermes:
|
|
753
|
+
|
|
754
|
+
- `HERMES_CLI_PATH`: optional explicit path to the Hermes CLI executable. Defaults to `hermes` on `PATH`.
|
|
755
|
+
- `HERMES_HOME`: optional Hermes home directory. Defaults to `~/.hermes`.
|
|
756
|
+
- `HERMES_STATE_DB_PATH`: optional explicit Hermes `state.db` path. Overrides `HERMES_HOME`.
|
|
757
|
+
- `HERMES_API_BASE_URL`: Hermes API Server base URL. Defaults to `http://127.0.0.1:8642`.
|
|
758
|
+
- `HERMES_API_KEY`: optional bearer token for the Hermes API Server.
|
|
759
|
+
- `HERMES_DEFAULT_MODEL`: optional model label sent with new Hermes API runs.
|
|
760
|
+
- `HERMES_DEFAULT_REASONING`: default Hermes reasoning effort: `none`, `minimal`, `low`, `medium`, `high`, or `xhigh`.
|
|
761
|
+
- `HERMES_DEFAULT_PROFILE`: default Hermes launch profile: `default`, `safe`, `readonly`, or `yolo`. Defaults to `default`.
|
|
762
|
+
|
|
763
|
+
OpenClaw:
|
|
764
|
+
|
|
765
|
+
- `OPENCLAW_CLI_PATH`: optional explicit path to the OpenClaw CLI executable. Defaults to `openclaw` on `PATH`.
|
|
766
|
+
- `OPENCLAW_GATEWAY_URL`: OpenClaw Gateway WebSocket URL. Defaults to `ws://127.0.0.1:18789`.
|
|
767
|
+
- `OPENCLAW_GATEWAY_TOKEN`: optional shared-secret token for the OpenClaw Gateway.
|
|
768
|
+
- `OPENCLAW_GATEWAY_PASSWORD`: optional shared-secret password for the OpenClaw Gateway.
|
|
769
|
+
- `OPENCLAW_AGENT_ID`: OpenClaw agent id used for runs and session discovery. Defaults to `main`.
|
|
770
|
+
- `OPENCLAW_HOME`: optional OpenClaw home directory. Defaults to `~/.openclaw`.
|
|
771
|
+
- `OPENCLAW_STATE_DIR`: optional explicit OpenClaw state directory. Overrides `OPENCLAW_HOME`.
|
|
772
|
+
- `OPENCLAW_DEFAULT_MODEL`: optional model label sent with new OpenClaw Gateway runs.
|
|
773
|
+
- `OPENCLAW_DEFAULT_THINKING`: default OpenClaw thinking level: `off`, `minimal`, `low`, `medium`, `high`, or `xhigh`.
|
|
774
|
+
- `OPENCLAW_DEFAULT_PROFILE`: default OpenClaw launch profile: `default`, `safe`, `readonly`, `local`, or `deliver`. Defaults to `default`.
|
|
775
|
+
|
|
776
|
+
Claude Code:
|
|
777
|
+
|
|
778
|
+
- `CLAUDE_CODE_CLI_PATH`: optional explicit path to the Claude Code CLI executable. Defaults to `claude` on `PATH`, then the SDK bundled runtime.
|
|
779
|
+
- `CLAUDE_CONFIG_DIR`: optional Claude config directory. Defaults to `~/.claude`.
|
|
780
|
+
- `CLAUDE_CODE_DEFAULT_MODEL`: optional default Claude Code model alias or model id.
|
|
781
|
+
- `CLAUDE_CODE_DEFAULT_EFFORT`: default Claude Code effort: `off`, `low`, `medium`, `high`, or `xhigh`.
|
|
782
|
+
- `CLAUDE_CODE_DEFAULT_PROFILE`: default Claude Code launch profile: `default`, `accept-edits`, `plan`, `readonly`, `no-tools`, or `bypass-permissions`. Defaults to `default`.
|
|
783
|
+
- `CLAUDE_CODE_MAX_TURNS`: maximum agentic turns per Claude Code prompt. Defaults to `100`.
|
|
638
784
|
|
|
639
785
|
Telegram output:
|
|
640
786
|
|
|
@@ -667,11 +813,11 @@ Auth and voice:
|
|
|
667
813
|
- `OPENAI_API_KEY`: enables Whisper transcription fallback for voice/audio.
|
|
668
814
|
- `VOICE_PREFERRED_BACKEND`: `auto`, `parakeet`, `faster-whisper`, or `openai`. Defaults to `auto`.
|
|
669
815
|
- `VOICE_DEFAULT_LANGUAGE`: optional default language code, for example `de` or `en`.
|
|
670
|
-
- `VOICE_TRANSCRIBE_ONLY`: when `true`, voice/audio messages are transcribed but not sent to
|
|
816
|
+
- `VOICE_TRANSCRIBE_ONLY`: when `true`, voice/audio messages are transcribed but not sent to the selected agent.
|
|
671
817
|
|
|
672
818
|
NordRelay wrapper:
|
|
673
819
|
|
|
674
|
-
- `NORDRELAY_HOME`: state/log directory override. Defaults to `~/.
|
|
820
|
+
- `NORDRELAY_HOME`: config/state/log directory override. Defaults to `~/.nordrelay`.
|
|
675
821
|
- `NORDRELAY_SOURCE_ROOT`: runtime source root override. Useful when the plugin is launched from Codex cache.
|
|
676
822
|
- `NORDRELAY_UPDATE_METHOD`: optional `auto`, `npm`, or `git` self-update method override. Auto uses git when the runtime root has a `.git` directory and npm otherwise.
|
|
677
823
|
- `NORDRELAY_KEEP_PENDING_UPDATES`: set true to avoid dropping pending Telegram updates on start.
|
|
@@ -719,8 +865,8 @@ Unsafe profiles are intentionally gated. Telegram asks for confirmation before a
|
|
|
719
865
|
- Do not leave `TELEGRAM_ALLOW_ANY_CHAT=true` enabled after setup.
|
|
720
866
|
- Treat `danger-full-access` as equivalent to shell access on the host.
|
|
721
867
|
- Treat uploaded files as untrusted input. They are staged inside the active workspace so the selected sandbox policy still matters.
|
|
722
|
-
- Keep `CODEX_API_KEY` and `OPENAI_API_KEY` in
|
|
723
|
-
- In group chats, remember that any allowed user can prompt
|
|
868
|
+
- Keep `CODEX_API_KEY`, `HERMES_API_KEY`, `OPENCLAW_GATEWAY_TOKEN`, `OPENCLAW_GATEWAY_PASSWORD`, and `OPENAI_API_KEY` in `~/.nordrelay/nordrelay.env` or host secret management.
|
|
869
|
+
- In group chats, remember that any allowed user can prompt the selected agent in that chat context.
|
|
724
870
|
- Use `TOOL_VERBOSITY=summary` or `errors-only` when command output may include sensitive data.
|
|
725
871
|
- Review and unsafe launch profiles add a Telegram approve/deny gate before each turn starts.
|
|
726
872
|
|
|
@@ -759,12 +905,18 @@ No sessions listed:
|
|
|
759
905
|
- Symptom: `/sessions` says no recent threads found.
|
|
760
906
|
- Cause for Codex: `~/.codex/state_*.sqlite` is missing, unreadable, or has no active threads.
|
|
761
907
|
- Cause for Pi: `~/.pi/agent/sessions/` or `PI_SESSION_DIR` is missing, unreadable, or has no session JSONL files.
|
|
908
|
+
- Cause for Hermes: `~/.hermes/state.db` or `HERMES_STATE_DB_PATH` is missing, unreadable, or has no session rows.
|
|
909
|
+
- Cause for OpenClaw: `openclaw sessions --all-agents --json` returns no sessions, or `OPENCLAW_HOME`/`OPENCLAW_STATE_DIR` points at the wrong state location.
|
|
910
|
+
- Cause for Claude Code: `~/.claude/projects/` or `CLAUDE_CONFIG_DIR/projects` is missing, unreadable, or has no session JSONL files.
|
|
762
911
|
- Fix: run the selected agent locally once, resume or create a session, then try `/sessions` again.
|
|
763
912
|
|
|
764
913
|
Wrong model, reasoning, or fast mode after switching:
|
|
765
914
|
|
|
766
|
-
- The connector reads model, reasoning, sandbox, and approval
|
|
915
|
+
- The connector reads model, reasoning, workspace, sandbox, and approval metadata from supported local agent state on `/sessions`, `/switch`, `/attach`, and `/session`; Codex fast mode is read from `~/.codex/config.toml`.
|
|
767
916
|
- For Pi, the connector reads model/thinking from Pi JSONL sessions and refreshes active RPC state when a session is running.
|
|
917
|
+
- For Hermes, the connector reads model, reasoning, token usage, and message activity from Hermes `state.db`; `/model` and `/reasoning` values are sent with future API runs.
|
|
918
|
+
- For OpenClaw, the connector reads model, thinking, token usage, and activity from OpenClaw session state; `/model` and `/reasoning` values are sent with future Gateway runs.
|
|
919
|
+
- For Claude Code, the connector reads model, effort, token usage, and activity from Claude Code transcript JSONL files; `/model` and `/reasoning` values are sent with future SDK runs.
|
|
768
920
|
- If values look stale, make sure the selected local CLI has finished writing session state.
|
|
769
921
|
|
|
770
922
|
Pi not available:
|
|
@@ -773,11 +925,29 @@ Pi not available:
|
|
|
773
925
|
- Fix: install Pi from https://pi.dev/, ensure `pi` is on `PATH`, or set `PI_CLI_PATH`.
|
|
774
926
|
- Enable Pi with `NORDRELAY_PI_ENABLED=true`.
|
|
775
927
|
|
|
928
|
+
Hermes not available:
|
|
929
|
+
|
|
930
|
+
- Symptom: `/agent` cannot switch to Hermes, `/auth` fails, or prompt execution says the Hermes API request failed.
|
|
931
|
+
- Fix: start the Hermes API Server, ensure `HERMES_API_BASE_URL` points to it, and set `HERMES_API_KEY` if the server requires a key.
|
|
932
|
+
- Enable Hermes with `NORDRELAY_HERMES_ENABLED=true`.
|
|
933
|
+
|
|
934
|
+
OpenClaw not available:
|
|
935
|
+
|
|
936
|
+
- Symptom: `/agent` cannot switch to OpenClaw, `/auth` fails, or prompt execution says the OpenClaw Gateway request failed.
|
|
937
|
+
- Fix: start the OpenClaw Gateway, ensure `OPENCLAW_GATEWAY_URL` points to it, and set `OPENCLAW_GATEWAY_TOKEN` or `OPENCLAW_GATEWAY_PASSWORD` if the Gateway requires shared-secret auth.
|
|
938
|
+
- Enable OpenClaw with `NORDRELAY_OPENCLAW_ENABLED=true`.
|
|
939
|
+
|
|
940
|
+
Claude Code not available:
|
|
941
|
+
|
|
942
|
+
- Symptom: `/agent` cannot switch to Claude Code, `/auth` fails, or prompt execution says Claude Code auth is missing.
|
|
943
|
+
- Fix: run `claude auth login` on the host, ensure `claude` is on `PATH`, or set `CLAUDE_CODE_CLI_PATH`.
|
|
944
|
+
- Enable Claude Code with `NORDRELAY_CLAUDE_CODE_ENABLED=true`.
|
|
945
|
+
|
|
776
946
|
Voice not working:
|
|
777
947
|
|
|
778
948
|
- Run `/voice` to list available backends.
|
|
779
949
|
- Install `ffmpeg` and `faster-whisper` on Linux, install `parakeet-coreml` on macOS Apple Silicon, or set `OPENAI_API_KEY`.
|
|
780
|
-
- Check `~/.
|
|
950
|
+
- Check `~/.nordrelay/nordrelay.log` for transcription errors.
|
|
781
951
|
|
|
782
952
|
Files not returned:
|
|
783
953
|
|
|
@@ -861,9 +1031,19 @@ npm run build
|
|
|
861
1031
|
- `src/workspace-policy.ts`: workspace allow/warn root evaluation.
|
|
862
1032
|
- `src/access-control.ts`: Telegram role permissions and command/callback permission mapping.
|
|
863
1033
|
- `src/codex-session.ts`: Codex SDK service for new/resumed threads, streaming events, abort, model, reasoning, launch profiles, and handback.
|
|
1034
|
+
- `src/pi-session.ts`: Pi RPC service for JSONL RPC sessions, streaming events, abort, model, thinking, launch profiles, and handback.
|
|
1035
|
+
- `src/hermes-session.ts`: Hermes API Server service for streamed runs, stop, model, reasoning, launch profiles, attachments, and handback.
|
|
1036
|
+
- `src/openclaw-session.ts`: OpenClaw Gateway service for streamed runs, cancel, model, thinking, launch profiles, attachments, and handback.
|
|
1037
|
+
- `src/claude-code-session.ts`: Claude Agent SDK service for streamed runs, abort, model, effort, launch profiles, attachments, and handback.
|
|
864
1038
|
- `src/session-registry.ts`: per-chat/topic session registry and persisted context metadata.
|
|
865
1039
|
- `src/session-format.ts`: compact Telegram rendering for session details, token usage, and limits.
|
|
866
1040
|
- `src/codex-state.ts`: reader for Codex `~/.codex/state_*.sqlite` thread, workspace, model, reasoning, sandbox, and approval metadata.
|
|
1041
|
+
- `src/pi-state.ts`: reader for Pi session JSONL files, activity timelines, diagnostics, and external busy detection.
|
|
1042
|
+
- `src/hermes-state.ts`: reader for Hermes `state.db` sessions, messages, token usage, activity timelines, diagnostics, and external busy detection.
|
|
1043
|
+
- `src/hermes-api.ts`: Hermes API Server client for health, capabilities, models, runs, events, approvals, and stop.
|
|
1044
|
+
- `src/openclaw-state.ts`: reader for OpenClaw session metadata, token usage, activity timelines, diagnostics, and external busy detection.
|
|
1045
|
+
- `src/openclaw-gateway.ts`: OpenClaw Gateway WebSocket RPC client for health, models, runs, stream events, and cancel.
|
|
1046
|
+
- `src/claude-code-state.ts`: reader for Claude Code transcript JSONL files, token usage, activity timelines, diagnostics, and external busy detection.
|
|
867
1047
|
- `src/attachments.ts`: inbound file staging and artifact output path construction.
|
|
868
1048
|
- `src/artifacts.ts`: generated artifact discovery, ZIP bundling, retention, and Telegram delivery filtering.
|
|
869
1049
|
- `src/voice.ts`: audio decoding and transcription backend selection.
|