@yu_robotics/remote-cli-router
Router server for remote-cli — manages message forwarding between Feishu (Lark) and local CLI clients via WebSocket.
From Router 1.6.205, public /health responses expose health and connection counts without device identifiers. The unauthenticated HTTP /api/feishu/card-callback endpoint is retired; card actions use the existing Feishu long connection. Binding requests and unregistered WebSocket connections have bounded admission. Existing CLI registration, enrolled-device proofs, and protocol version 1 remain supported. This does not introduce message encryption or require device rebinding.
Rate-limited binding requests return HTTP 429 with Retry-After. Admission uses the direct socket peer and ignores X-Forwarded-For; devices behind a shared proxy or NAT share a peer budget. Unregistered connections have a fixed 30-second registration deadline that heartbeats cannot extend, a 16 KiB message limit, and limits of 64 pending connections per peer and 512 globally. Registered WebSocket messages have a 16 MiB limit, including cumulative fragmented messages. Existing monitoring should use the health status and connection count instead of the removed device list.
From CLI 1.6.210, managed workers receive fixed delegation instructions once per confirmed native conversation. Follow-up tasks keep their own objective, current workspace and checkpoint, external-link warnings, and required outputs. Fresh or unconfirmed contexts receive the full instructions again. Worker conversation reuse is preserved; this does not archive or delete sessions.
From CLI 1.6.204, Claude Code model aliases show the alias name followed by the native resolved model ID, preserving provider prefixes. If the resolved ID is unavailable, the native display name is used. Direct model and Default labels, selection values, and other backends remain unchanged.
Backend executable discovery is local-client behavior. CLI 1.6.119 supplements Linux/macOS startup PATH and honors configured backend commands across detection and execution, preserving ZCode's native unset/empty-command lookup. Upgrade and restart the client to obtain this fix; upgrading only the Router does not repair an older client's environment. Valid client services need no reinstallation. The Router runtime, wire protocol, and existing compatibility requirements are unchanged. See Backend Executable Discovery.
Public Activity
From Router 1.6.158, completion pagination keeps the final body item (or complete worker group) with the completion note, optional model metadata and thread controls when they fit together. This avoids preventable footer-only continuations, including replies without model metadata. Indivisible oversized groups still split according to node, size and table limits; thread-button refreshes preserve the final body. This does not change streaming completion timing or the wire protocol.
From CLI 1.6.153, Codex shell calls no longer lose their label when native command actions are absent or unknown. Native reads, searches, and directory listings remain preferred. Other calls use fixed operation labels such as Run npm command or Run Git command for simple allowlisted programs, and Run shell command for compound or unrecognized commands. These are deterministic operation labels, not model-authored purpose summaries: installed Codex 0.160.0 command items have no per-call description field. Arguments, full paths, output, and execution-wide reasoning are never copied into these fallback labels. Late native action metadata can enrich a pending row before its first result; repeated results retain one row. Existing description fields, heading limits, and card-node counts are unchanged; upgrade the CLI, with no new Router capability required.
From Router 1.6.145, a foreground tool result updates its original collapsed tool row rather than adding a second disclosure. Input, output, and per-file diff previews remain inside; later text and worker slots stay stable. Unknown IDs and orphan results are not guessed into another call. Existing CLI peers are compatible, and worker cards and approvals are unchanged. See Code Change Previews.
From Router 1.6.146, Bash and other foreground tools share a compact heading with a gray success dot, pending hourglass, or gray failure cross, plus the tool name and an optional public description or file basename. Full tool IDs and explicit status labels remain in the expanded details. Raw commands are not fallback headings. Recursive card-node accounting and cross-page replacement continue to preserve activity tails and completion controls.
CLI and Router 1.6.147 prefer meaningful per-call descriptions or titles over file basenames, including ACP call/update titles and explicit AGY/Pi labels forwarded by the CLI. Redundant tool-name titles are omitted. Terminal-only titles never synthesize calls; results update status/output and preserve the existing label. Missing summaries are not generated from commands or execution-wide activity. Labels remain literal and bounded in the existing heading, without extra card nodes or a protocol-version change. Older clients keep input-label and basename fallbacks; older Routers ignore the new optional fields.
From Router 1.6.148, the status symbol is always a dot (•): green for success, blue while awaiting a result, and red for failure. This replaces the pending hourglass and failure cross without changing per-call labels, expanded status text, asynchronous in-place updates, or card-node counts. The color change alone does not require a CLI protocol update.
CLI and Router 1.6.144 negotiate optional activityProgress without a protocol
version bump. One mutable status row sits at the tail of the newest active main
card, after tools and workers, and moves when the reply paginates. Historical
pages do not retain a live Running row. Each worker shows its own bounded activity
below its identity. Input requests and final results win over progress; completion
preserves the terminal status, model/effort note, and thread controls. Raw thinking
is not displayed as activity and progress is not a percentage. Older clients keep
their existing cards. See Public Activity.
Settings Cards
CLI and Router 1.6.152 negotiate settingsCards on protocol version 1. Bare /backend, /model, and /effort replace their command placeholder with a standalone interactive settings card. From Router 1.6.160, backend choices submit immediately using the selected scope, defaulting to Current thread, without Confirm. Scope buttons only change the next click's target; scope persists within the same card after backend acknowledgements and defaults to Current thread on reopening. Follow global submits immediately for the original thread and restores Current thread scope after acknowledgement. Model and effort buttons submit immediately, including an inactive target backend, without switching the coordinator. The CLI remains authoritative for native validation and persistence; the Router shows pending or unknown state until a matching result confirms application.
From 1.6.154, numbered headings, subtitles and dividers distinguish backend selection above application scope (Confirm removed in Router 1.6.160), or target backend, its model/effort choices and secondary actions. Explicit checks identify the acknowledged backend, selected scope and known preferences without guessing unknown values. Section elements participate in recursive node and byte accounting and still render as one bounded settings card. AGY catalog-format compatibility is handled by the CLI; no new Router capability is required.
From 1.6.155, the selected application scope is highlighted in blue. Model/effort selectors separate the current thread's main backend from other backends' worker preferences; the main role remains bound to the coordinator even while viewing another target. Same-backend worker preferences remain shared with the main backend.
From CLI and Router 1.6.156, delegationCards additionally gates a thread-scoped /delegation menu with On/Off controls and a separate, non-selectable availability section. The selected option stays unchanged while a request is pending or unknown and changes only after a matching CLI acknowledgement. Busy/queued work disables toggles; Refresh remains available. The Router does not launch workers or bypass sandbox restrictions. Both capabilities are required for the new menu; older peers and parameterized text commands retain their behavior.
Backend availability uses colored status badges: blue for the coordinator, green for installed workers, orange for blocked workers, red for unavailable backends and gray for unknown worker availability. Text labels and version or restriction details remain visible; these badges do not prove authentication or quota.
Choices use opaque stored tokens rather than command text or stale ordinals. Callback ownership includes the delivered card, original user/device/thread, connection, snapshot and page revision. Show all model/effort choices when the complete card fits its recursive tagged-node and serialized-byte budgets; only oversized catalogs paginate, using the capacity of each page rather than a fixed eight-choice limit. Include headers, groups, navigation, notices and pending/retry controls when packing and updating cards. Missing backends are disabled, native-unavailable states remain explicit, and expired or stale controls require a fresh menu. Socket changes invalidate action bindings. No native settings, credentials, installations or model inference run on the Router. Older peers retain text lists. See Model and Reasoning Effort.
Scheduled tasks
After upgrading, scheduling is enabled by default for Claude Code, Codex,
DeepSeek Harness (DSH), AGY, OpenCode, Kimi, Pi, and ZCode. In an established
conversation, ask for a one-shot or recurring task, for example, “Every weekday
at 9 AM America/New_York, summarize my open tasks.” The local CLI stores the
rule and submits the prompt to that same conversation when due. The result
belongs to the user and Feishu thread that created the task.
Upgrade both the CLI and Router to 1.6.265 or later. A compatible Router
confirms the device's current user binding before a task can be created or
dispatched. Rebinding the device invalidates tasks from the previous binding.
The CLI handles timing, cancellation, restart recovery, and result retries
locally. A model interprets a natural-language request and performs the
scheduled work. The slash commands below also work directly.
/schedule after 5m -- Check the build and summarize failures
/schedule cron "15 9 * * 1-5" --tz Asia/Shanghai -- Summarize open tasks
/schedule list
/schedule cancel <id>
For a one-shot at a specific time, use /schedule at <ISO timestamp with Z or offset> -- <prompt>.
Cron takes five fields and an explicit IANA timezone. Month and weekday names
are supported. You can also ask
the agent in this thread to create, list, or cancel tasks.
Keep the CLI running when a task is due. Starting with CLI 1.6.265, it saves
new definitions locally and reloads them after restart. Cron resumes at the next
scheduled time and skips firings missed while the CLI was offline. Each run
requires the original thread and a backend that can safely use its conversation.
If the CLI cannot tell whether a prompt reached the backend, it does not send
that occurrence again.
Use the managed ID from /schedule list to cancel future runs. Work already
dispatched may still finish. Results awaiting Feishu delivery can be retried
when a compatible Router reconnects. After an upgrade, existing native tasks
remain available for manual cleanup. The CLI does not migrate them to its timer.
Illustrated Tips
Use /tips to browse 30 short Chinese scenario cards, each with its own bundled
illustration based on the actual settings panels or task cards, a benefit, and a copyable example. Examples are educational text;
card buttons never execute them or change backend, model, effort, device, or thread.
Browsing works for bound users even while their CLI is offline.
Copyable examples appear directly below the usage instructions, followed by usage
notes. Cards offer only Next, Mastered, and Settings controls.
The library includes directory browsing, named project threads, tool-row details,
managed delegation controls and worker resets, Codex speed and goals, and native
command sandbox settings. Backend-specific tutorials explain their prerequisites;
examples and illustrations never activate those features themselves.
Two Easter-egg tutorials explain the Codex weekly-quota and banked-reset-credit
notifications. These are passive status snapshots: remote-cli does not grant,
claim, or consume reset credits, and reading a tip never starts a model task.
| Command |
Result |
/tips next / /tips list |
Read another tip or browse the library |
/tips settings |
View subscription, mute, and timezone settings |
/tips daily / /tips weekly |
Explicitly subscribe daily or on Tuesday and Thursday |
/tips mute 7 |
Pause automatic tips for seven days (1-365 supported) |
/tips unmute |
Remove the pause without enabling a disabled subscription |
/tips off |
Disable automatic tips permanently until explicitly subscribed again |
/tips timezone Asia/Shanghai |
Select the IANA timezone for this user's schedule |
Automatic delivery is daily by default. Tips are due at 10:30 in the
user's timezone (default Asia/Shanghai), within 10:30-19:00 only, at most once per
local day and at least 20 hours apart. Delivery requires a bound online device,
bot activity within seven days, two minutes of quiet, and no task currently visible
to the Router. This check cannot observe every backend-local operation or queue.
Offline periods create no backlog; device registration never triggers tips.
Settings cards offer 1/3/7/14-day mute controls. Seen or mastered tips are skipped.
Existing default-off records adopt daily delivery; explicit opt-outs, mute deadlines,
chosen frequencies, reading progress, and delivery cooldowns are preserved.
The Router stores private per-user preferences and delivery intent beside its
configuration. A send with an uncertain result is suppressed rather than replayed.
Run one Router process per storage directory; this is not multi-replica delivery.
Optional Router configuration tips.enabled: false disables automatic delivery
globally while retaining browsing; tips.timezone sets the default IANA timezone.
Tips use reviewed bundled content and static PNGs, with no model calls or catalog
probes. Some examples require a compatible CLI; the backend tip includes the text
command alternative for clients without settings cards.
Background Task Notifications
From CLI and Router 1.6.228, standalone native background-task terminal cards are retired. The CLI no longer publishes Claude Code hook or Codex callback completions as task_notification frames, including with legacy notification settings or explicit enable calls. The Router quietly discards these frames from older clients without creating cards, text fallbacks, or new reply associations. Existing main replies and their thread routing continue normally; no new setting or migration is required.
Native background work and internal completion processing continue. Codex still consumes and deduplicates terminal items so late background output does not enter another turn. Authorization and waiting-for-input prompts, device/file approval, maintenance cards, managed worker progress and closeout, and inline attachment retrieval retain their existing behavior. This change does not delete native history, task results, or previously published messages.
Maintenance Notices